/* سكرتيري V2 — طبقة التحسين المشتركة */
:root {
  --v2-ink: #201914;
  --v2-gold: #b98b32;
  --v2-gold-bright: #e8cc85;
  --v2-cream: #fffaf0;
  --v2-line: rgba(140, 105, 44, .18);
}

html { text-size-adjust: 100%; }
body { overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.v2-reading-progress {
  position: fixed;
  z-index: 10000;
  top: 0;
  inset-inline: 0;
  height: 3px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: right center;
  background: linear-gradient(90deg, #a47f2e, #e8cc85);
}

[dir="ltr"] .v2-reading-progress { transform-origin: left center; }

.sk-consent {
  position: fixed;
  z-index: 9999;
  inset-inline: 20px;
  bottom: 20px;
  max-width: 1080px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  color: #f8f2e7;
  background: rgba(28, 22, 18, .97);
  border: 1px solid rgba(232, 204, 133, .26);
  border-radius: 22px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .34);
  backdrop-filter: blur(18px);
  direction: inherit;
}

.sk-consent__mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #271c0e;
  background: linear-gradient(135deg, #f3d993, #b98b32);
  border-radius: 15px;
  font-size: 23px;
}

.sk-consent__label {
  color: #e8cc85;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.sk-consent h2 {
  margin: 2px 0 3px !important;
  color: #fff !important;
  font-size: 18px !important;
  line-height: 1.45 !important;
}

.sk-consent p {
  margin: 0 !important;
  max-width: 720px;
  color: #c9bcaa !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}

.sk-consent a {
  color: #e8cc85 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sk-consent__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sk-consent button {
  min-height: 42px;
  padding: 9px 15px;
  color: #f8f2e7;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.sk-consent button:hover { background: rgba(255, 255, 255, .11); }
.sk-consent button.sk-consent__primary {
  color: #271c0e;
  background: linear-gradient(135deg, #f0d486, #bd913b);
  border-color: transparent;
}

.sk-consent__settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.sk-consent__settings[hidden] { display: none !important; }

.sk-consent__settings label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 13px;
  cursor: pointer;
}

.sk-consent__settings b,
.sk-consent__settings small { display: block; }
.sk-consent__settings b { color: #fff; font-size: 13px; }
.sk-consent__settings small { margin-top: 2px; color: #a99a87; line-height: 1.45; }
.sk-consent__settings input { width: 20px; height: 20px; accent-color: #c9a34d; flex: none; }
.sk-consent.is-customizing { grid-template-columns: auto minmax(0, 1fr); }
.sk-consent.is-customizing .sk-consent__actions { grid-column: 2; }

.sk-privacy-button {
  position: fixed;
  z-index: 9000;
  inset-inline-start: 14px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  color: #f8efd9;
  background: #271f19;
  border: 1px solid rgba(232, 204, 133, .36);
  border-radius: 50%;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
  cursor: pointer;
}

.v2-trust-bar {
  max-width: 980px;
  margin: 0 auto 22px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 26px;
  flex-wrap: wrap;
  color: var(--text-secondary, #6f6256);
  background: linear-gradient(135deg, rgba(194, 154, 69, .10), rgba(255, 255, 255, .45));
  border: 1px solid var(--border, #e8decc);
  border-radius: 14px;
  font-size: 13px;
}

.v2-trust-bar span:first-child,
.v2-trust-bar span:nth-child(2) { color: #31735b; }

.v2-page-actions {
  max-width: 780px;
  margin: 0 auto 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.v2-page-actions button {
  padding: 8px 13px;
  color: var(--text-secondary, #665b51);
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e6ddcf);
  border-radius: 10px;
  cursor: pointer;
}

.v2-page-actions button:hover {
  color: var(--text-primary, #2b2320);
  border-color: var(--accent, #c29a45);
}

/* صفحات الأدلة المعرفية */
.guide-shell {
  min-height: 100vh;
  color: #2b2320;
  background:
    radial-gradient(circle at 92% 0, rgba(194, 154, 69, .12), transparent 34rem),
    #f7f2e9;
}

.guide-nav {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(140, 105, 44, .14);
  background: rgba(247, 242, 233, .9);
  backdrop-filter: blur(18px);
}

.guide-nav__inner,
.guide-hero__inner,
.guide-layout,
.guide-footer__inner {
  width: min(1160px, calc(100% - 36px));
  margin-inline: auto;
}

.guide-nav__inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.guide-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #2b2320;
  font-family: var(--font-display, sans-serif);
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
}

.guide-brand img { width: 32px; height: 32px; }
.guide-nav__links { display: flex; gap: 22px; align-items: center; }
.guide-nav__links a { color: #716558; text-decoration: none; font-size: 14px; font-weight: 600; }
.guide-nav__links a:hover { color: #9c7427; }

.guide-hero {
  padding: 76px 0 58px;
  color: #f8f1e6;
  background:
    radial-gradient(circle at 78% 10%, rgba(232, 204, 133, .19), transparent 35rem),
    linear-gradient(135deg, #171210, #2a2119);
  overflow: hidden;
}

.guide-breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #c3b49f;
  font-size: 13px;
}

.guide-breadcrumb a { color: #e8cc85; text-decoration: none; }
.guide-kicker {
  display: inline-flex;
  margin-top: 30px;
  padding: 7px 13px;
  color: #e8cc85;
  background: rgba(232, 204, 133, .09);
  border: 1px solid rgba(232, 204, 133, .22);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.guide-hero h1 {
  max-width: 860px;
  margin: 18px 0 16px;
  color: #fffaf0;
  font-family: var(--font-display, sans-serif);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.35;
  letter-spacing: -.02em;
}

.guide-hero__lede {
  max-width: 780px;
  color: #cfc2b1;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.85;
}

.guide-meta {
  display: flex;
  gap: 10px 24px;
  flex-wrap: wrap;
  margin-top: 25px;
  color: #a99b89;
  font-size: 13px;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 42px;
  align-items: start;
  padding: 54px 0 90px;
}

.guide-article {
  min-width: 0;
  padding: clamp(24px, 4vw, 54px);
  background: #fff;
  border: 1px solid #e8dece;
  border-radius: 24px;
  box-shadow: 0 18px 60px rgba(71, 52, 29, .07);
}

.guide-article h2 {
  margin: 2.25em 0 .65em;
  color: #211a16;
  font-family: var(--font-display, sans-serif);
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.45;
}

.guide-article h2:first-child { margin-top: 0; }
.guide-article h3 { margin: 1.7em 0 .55em; font-size: 19px; color: #5b4223; }
.guide-article p, .guide-article li { color: #5f554c; font-size: 16px; line-height: 2; }
.guide-article p { margin: 0 0 1.2em; }
.guide-article ul, .guide-article ol { padding-inline-start: 1.3em; margin: 0 0 1.5em; }
.guide-article a { color: #8e6520; font-weight: 700; text-underline-offset: 3px; }

.guide-note,
.guide-example {
  margin: 26px 0;
  padding: 20px 22px;
  border-radius: 16px;
}

.guide-note {
  background: #f9f3e7;
  border-inline-start: 4px solid #c29a45;
}

.guide-example {
  background: #edf6f1;
  border: 1px solid #d3e8dc;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 32px;
}

.guide-card {
  display: block;
  padding: 19px;
  color: inherit !important;
  text-decoration: none;
  background: #fffcf6;
  border: 1px solid #e9dfcf;
  border-radius: 15px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.guide-card:hover {
  transform: translateY(-3px);
  border-color: #c8a354;
  box-shadow: 0 12px 30px rgba(89, 64, 30, .08);
}

.guide-card b { display: block; margin-bottom: 4px; color: #2d241e; font-size: 16px; }
.guide-card span { color: #7a6e62; font-size: 13px; line-height: 1.7; }

.guide-aside {
  position: sticky;
  top: 94px;
  padding: 22px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid #e7dccb;
  border-radius: 18px;
}

.guide-aside h2 { margin: 0 0 13px; font-size: 16px; }
.guide-aside a {
  display: block;
  padding: 9px 0;
  color: #73675b;
  border-bottom: 1px solid #eee5d8;
  text-decoration: none;
  font-size: 13px;
}
.guide-aside a:last-child { border: 0; }
.guide-aside a:hover { color: #8e6520; }

.guide-footer {
  padding: 34px 0;
  color: #b9aa96;
  background: #1d1713;
}
.guide-footer__inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.guide-footer a { color: #e2c77f; }

.guide-hub-grid {
  width: min(1160px, calc(100% - 36px));
  margin: -32px auto 80px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.guide-hub-card {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 30px;
  color: #2b2320;
  background: #fff;
  border: 1px solid #e8dece;
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(71, 52, 29, .08);
  text-decoration: none;
}

.guide-hub-card:hover { border-color: #c6a04f; transform: translateY(-3px); }
.guide-hub-card__icon { font-size: 28px; }
.guide-hub-card h2 { margin: 18px 0 9px; font-size: 24px; }
.guide-hub-card p { margin: 0; color: #74685d; line-height: 1.8; }
.guide-hub-card span:last-child { margin-top: auto; padding-top: 22px; color: #946b24; font-weight: 800; }

@media (max-width: 820px) {
  .sk-consent,
  .sk-consent.is-customizing { grid-template-columns: 1fr; gap: 12px; }
  .sk-consent__mark { display: none; }
  .sk-consent__actions,
  .sk-consent.is-customizing .sk-consent__actions { grid-column: auto; justify-content: stretch; }
  .sk-consent__actions button { flex: 1 1 auto; }
  .sk-consent__settings { grid-template-columns: 1fr; }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-aside { position: static; }
}

@media (max-width: 640px) {
  .sk-consent { inset-inline: 10px; bottom: 10px; padding: 16px; border-radius: 17px; }
  .sk-consent__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .sk-consent__actions .sk-consent__primary { grid-column: 1 / -1; }
  .guide-nav__links a:not(:last-child) { display: none; }
  .guide-hero { padding: 52px 0 45px; }
  .guide-layout { padding-top: 28px; }
  .guide-article { border-radius: 18px; }
  .guide-grid, .guide-hub-grid { grid-template-columns: 1fr; }
  .guide-hub-grid { margin-top: -22px; }
  .demo-halo { inset: -10px !important; }
}

@media print {
  .sk-consent,
  .sk-privacy-button,
  .v2-page-actions,
  .v2-reading-progress,
  .guide-nav,
  .guide-aside,
  .site-footer,
  .mobile-nav,
  .sidebar,
  .topbar { display: none !important; }
  .guide-shell, body { background: #fff !important; }
  .guide-layout { display: block; padding: 0; }
  .guide-article { box-shadow: none; border: 0; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
