/* ==========================================================================
   Mawarith Pro — Design System  (v3 · dark editorial)
   Charcoal + muted gold, heavy grotesque display type, RTL-ready.
   Dark by default (the brand look); an optional light variant via
   [data-theme="light"]. One stylesheet drives all 120 pages.
   ========================================================================== */
:root {
  /* Accent — muted editorial gold */
  --gold-600: #b08a32;
  --gold-500: #c8a14b;
  --gold-400: #ddbd78;
  --gold-300: #ecd9a6;

  /* Legacy emerald tokens kept defined for safety (unused by components) */
  --emerald-900: #082b20; --emerald-800: #0b3d2e; --emerald-700: #0f5740;
  --emerald-600: #157a59; --emerald-500: #1f9e74;

  /* Dark neutrals (default theme) — elevation: paper < paper-2 < card */
  --paper: #121316;     /* page background — near-black charcoal */
  --paper-2: #191b21;   /* muted surface (table stripes, callouts, hovers) */
  --card: #23262f;      /* cards & panels — clearly raised above sections */
  --ink: #f3f4f6;       /* primary text — near-white */
  --ink-soft: #b7bcc5;  /* body text grey */
  --ink-faint: #9aa0ab; /* faint / meta (AA on all dark surfaces) */
  --line: #2c2f38;      /* borders */
  --line-soft: #24272f;

  --accent: var(--gold-500);
  --accent-strong: var(--gold-600);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 40px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.6);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1180px;

  --sans: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Manrope", "Inter", system-ui, sans-serif;
  --serif: "Manrope", "Inter", system-ui, sans-serif;
  --arabic: "Amiri", "Scheherazade New", "Traditional Arabic", serif;
}

/* Optional light variant */
[data-theme="light"] {
  --paper: #f6f5f1;
  --paper-2: #ecebe4;
  --card: #ffffff;
  --ink: #191b1f;
  --ink-soft: #4c515a;
  --ink-faint: #5f6571;   /* AA on light surfaces */
  --line: #e3e0d8;
  --line-soft: #efece4;
  --shadow: 0 1px 2px rgba(20,20,20,.04), 0 10px 30px rgba(20,20,20,.07);
  --shadow-lg: 0 16px 44px rgba(20,20,20,.12);
}
/* Gold links need a darker tone to stay legible on light surfaces */
[data-theme="light"] a { color: #82661a; }
[data-theme="light"] a:hover,
[data-theme="light"] .breadcrumb a:hover,
[data-theme="light"] .toc a:hover { color: #6b540f; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body[dir="rtl"] { font-family: var(--arabic), var(--sans); }

img { max-width: 100%; display: block; }

a { color: var(--gold-500); text-decoration: none; }
a:hover { color: var(--gold-400); text-decoration: underline; }

/* Heavy grotesque display */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.05;
  color: var(--ink); letter-spacing: -.03em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-top: 2.2em; }
h3 { font-size: 1.4rem; margin-top: 1.8em; font-weight: 700; letter-spacing: -.02em; }
.eyebrow-num { font-family: var(--sans); font-weight: 700; font-size: .8rem; letter-spacing: .2em;
  color: var(--gold-500); text-transform: uppercase; }

p { margin: 0 0 1.1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

.arabic { font-family: var(--arabic); font-size: 1.35em; line-height: 2; direction: rtl; }

/* --- Skip link & a11y --- */
.skip { position: absolute; inset-inline-start: -999px; top: 0; background: var(--gold-500); color: #16130a;
  padding: 10px 16px; border-end-end-radius: 8px; z-index: 200; font-weight: 700; }
.skip:focus { inset-inline-start: 0; }

/* Visible keyboard focus across interactive elements (WCAG 2.4.7) */
a:focus-visible, .btn:focus-visible, .nav-links a:focus-visible, .hero-bar a:focus-visible,
.card:focus-visible, .article-card:focus-visible, .faq-item summary:focus-visible,
.icon-btn:focus-visible, .lang-btn:focus-visible, .lang-menu a:focus-visible,
.stepper button:focus-visible, .seg button:focus-visible {
  outline: 2px solid var(--gold-500); outline-offset: 2px; border-radius: 6px;
}

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 12px; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display);
  font-weight: 800; font-size: 1.24rem; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 34px; height: 34px; flex: 0 0 auto; }
.brand b { color: var(--gold-500); font-weight: 800; }
.brand .pro { color: var(--gold-500); font-style: normal; }

.nav-links { display: flex; gap: 2px; margin-inline-start: auto; align-items: center; }
.nav-links a {
  color: var(--ink-soft); font-weight: 600; font-size: .92rem; letter-spacing: .01em;
  padding: 8px 14px; border-radius: 8px; font-family: var(--sans); position: relative;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--gold-400); }
.nav-links a.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; background: var(--gold-500); border-radius: 2px; }
.nav-links .btn { white-space: nowrap; }
.nav-links .btn.active::after { display: none; }
@media (max-width: 1060px) { .nav-links > a.btn-primary { display: none; } }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  cursor: pointer; color: var(--ink-soft); font-size: 1.05rem;
}
.icon-btn:hover { color: var(--ink); border-color: var(--accent); }
.nav-toggle { display: none; }

/* --- Language switcher --- */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); background: var(--card); border-radius: 10px; cursor: pointer;
  color: var(--ink-soft); font: inherit; font-size: .9rem; font-weight: 600; }
.lang-btn:hover { color: var(--ink); border-color: var(--accent); }
.lang-btn .globe { font-size: 1rem; }
.lang-btn .chev { font-size: .7rem; opacity: .7; }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: 48px; min-width: 188px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px;
  display: none; z-index: 130; max-height: 70vh; overflow: auto; }
.lang-menu.open { display: block; }
.lang-menu a, .lang-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 9px 11px;
  border: none; background: transparent; cursor: pointer; border-radius: 8px; font: inherit;
  font-size: .92rem; color: var(--ink-soft); text-decoration: none; }
.lang-menu a:hover, .lang-menu button:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.lang-menu a.on, .lang-menu button.on { color: var(--gold-400); font-weight: 700; }
.lang-menu .flag { font-size: 1.05rem; }
.lang-menu .native { color: var(--ink-faint); font-size: .8rem; margin-inline-start: auto; }

/* RTL refinements */
[dir="rtl"] .hero h1, [dir="rtl"] .hero .lede, [dir="rtl"] .prose { text-align: right; }
[dir="rtl"] .side-rail { left: auto; right: 0; }
[dir="rtl"] body { font-family: var(--arabic), var(--sans); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  font-family: var(--sans); font-weight: 700; font-size: .96rem; letter-spacing: .01em;
  padding: 13px 24px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s, color .2s; text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--gold-400); color: #16130a; }
.btn-gold { background: linear-gradient(135deg, var(--gold-400), var(--gold-600)); color: #16130a; box-shadow: 0 8px 30px rgba(200,161,75,.18); }
.btn-gold:hover { color: #16130a; box-shadow: 0 12px 38px rgba(200,161,75,.3); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }
.btn-lg { padding: 16px 30px; font-size: 1.04rem; }

/* --- Hero (dark editorial) --- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 560px at 80% -12%, rgba(200,161,75,.12), transparent 60%),
    radial-gradient(900px 520px at 2% 118%, rgba(255,255,255,.035), transparent 60%),
    linear-gradient(162deg, #0d0e11, #121316 52%, #15171c);
  color: #eef0f3;
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='%23c8a14b' stroke-width='1'%3E%3Cpath d='M45 0l45 45-45 45L0 45z'/%3E%3Cpath d='M45 22l23 23-23 23-23-23z'/%3E%3Ccircle cx='45' cy='45' r='6'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; z-index: 1; padding: 100px 0 0; }
.hero .eyebrow-line { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.hero .eyebrow-line .num { font-family: var(--display); font-size: 1.05rem; color: var(--gold-400); font-weight: 800; letter-spacing: .04em; }
.hero .eyebrow-line .rule { height: 1px; width: 70px; background: linear-gradient(90deg, var(--gold-500), transparent); }
.hero h1 { color: #fff; max-width: 18ch; font-weight: 800; letter-spacing: -.035em; line-height: .98; }
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero .lede { font-size: 1.2rem; color: #aab0ba; max-width: 56ch; margin: 26px 0 32px; line-height: 1.6; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans);
  font-weight: 700; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-400);
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; margin: 48px 0 60px; flex-wrap: wrap; }
.hero-stats .s b { font-family: var(--display); font-size: 2rem; color: #fff; display: block; font-weight: 800; letter-spacing: -.02em; }
.hero-stats .s span { color: #8e949e; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }

/* hero bottom feature bar (editorial strip) */
.hero-bar { position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.1);
  display: grid; grid-template-columns: repeat(3, 1fr); }
.hero-bar a { padding-block: 28px; padding-inline: 0 24px; color: #aab0ba; display: block; border-inline-end: 1px solid rgba(255,255,255,.08); }
.hero-bar a:last-child { border-inline-end: none; }
.hero-bar a:hover { text-decoration: none; }
.hero-bar .lbl { font-family: var(--sans); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-500); font-weight: 700; }
.hero-bar .ttl { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: #fff; margin-top: 7px; display: block; letter-spacing: -.01em; }
.hero-bar .ttl::after { content: " →"; color: var(--gold-400); opacity: 0; transition: opacity .2s, margin .2s; }
.hero-bar a:hover .ttl::after { opacity: 1; margin-inline-start: 4px; }

/* slim vertical side rail */
.side-rail { position: fixed; left: 0; top: 0; bottom: 0; width: 48px; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 84px 0 28px; pointer-events: none; border-inline-end: 1px solid rgba(255,255,255,.05); }
.side-rail .vtxt { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--sans);
  font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-faint); pointer-events: auto; }
.side-rail .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); margin: 14px 0; }
@media (max-width: 1180px) { .side-rail { display: none; } }

/* --- Sections --- */
section { padding: 70px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 46px; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }
.kicker { font-family: var(--sans); font-weight: 700; font-size: .76rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold-500); margin-bottom: 12px; }

/* --- Cards / grid --- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: inset 0 1px 0 rgba(255,255,255,.045), var(--shadow);
  transition: border-color .2s, transform .15s;
}
[data-theme="light"] .card { box-shadow: var(--shadow); }
.card:hover { border-color: color-mix(in srgb, var(--gold-500) 45%, var(--line)); }
.card h3 { margin-top: 0; }
.card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--paper-2); color: var(--gold-400); margin-bottom: 16px; font-size: 1.3rem; }
.feature-card p { color: var(--ink-soft); margin-bottom: 0; }

.article-card { display: flex; flex-direction: column; }
.article-card:hover { transform: translateY(-3px); }
.article-card .tag { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-500); }
.article-card h3 { margin: 10px 0 10px; font-size: 1.2rem; }
.article-card p { color: var(--ink-soft); flex: 1; }
.article-card .meta { color: var(--ink-faint); font-size: .82rem; margin-top: 16px; letter-spacing: .04em; text-transform: uppercase; }

/* --- Calculator --- */
.calc-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; }
.panel h2, .panel h3 { margin-top: 0; }

.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 7px; }
.field .hint { color: var(--ink-faint); font-size: .82rem; font-weight: 400; }
input[type="number"], input[type="text"], input[type="email"], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-500); outline-offset: 1px; border-color: transparent; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); }
.stepper button { width: 42px; height: 44px; border: none; background: transparent; font-size: 1.3rem;
  cursor: pointer; color: var(--gold-400); }
.stepper button:hover { background: var(--paper-2); }
.stepper input { width: 58px; text-align: center; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; }

.heir-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.heir-row:last-child { border-bottom: none; }
.heir-row .nm { font-weight: 600; }
.heir-row .ar { font-family: var(--arabic); color: var(--ink-faint); font-size: 1.05rem; margin-inline-start: 7px; }
.heir-group-title { font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--gold-400);
  letter-spacing: .02em; margin: 24px 0 4px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }

.toggle-row { display: flex; gap: 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { padding: 10px 16px; border: none; background: var(--card); cursor: pointer; color: var(--ink-soft); font: inherit; font-weight: 600; }
.seg button.on { background: var(--gold-500); color: #16130a; }

/* Results */
.result-empty { color: var(--ink-faint); text-align: center; padding: 40px 10px; }
.result-total { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.result-total b { font-family: var(--display); font-weight: 800; font-size: 1.7rem; color: var(--gold-400); letter-spacing: -.02em; }
.share-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.share-row .who { font-weight: 600; }
.share-row .who small { display: block; font-weight: 400; color: var(--ink-faint); font-size: .8rem; }
.share-row .frac { font-family: var(--display); font-weight: 700; color: var(--gold-400); text-align: right; min-width: 52px; }
.share-row .amt { font-weight: 700; text-align: right; min-width: 92px; }
.bar { height: 7px; border-radius: 4px; background: var(--line-soft); overflow: hidden; margin-top: 4px; grid-column: 1 / -1; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-600), var(--gold-400)); }
.note-awl { background: #2a2410; border: 1px solid #4a4017; color: #e7cf8e; padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin-top: 14px; }
.note-radd { background: #182a1f; border: 1px solid #2b4636; color: #9fe0c1; padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin-top: 10px; }
[data-theme="light"] .note-awl { background: #fff6e0; border-color: #f0dca8; color: #6b4e09; }
[data-theme="light"] .note-radd { background: #e8f6ef; border-color: #b9e2cd; color: #145138; }

.steps-list { list-style: none; padding: 0; margin: 16px 0 0; }
.steps-list li { padding: 10px 0 10px 30px; position: relative; border-bottom: 1px dashed var(--line-soft); color: var(--ink-soft); font-size: .94rem; }
.steps-list li::before { content: ""; position: absolute; left: 6px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); }
[dir="rtl"] .steps-list li { padding: 10px 30px 10px 0; }
[dir="rtl"] .steps-list li::before { left: auto; right: 6px; }

/* --- Prose (articles/guide) --- */
.prose { max-width: 760px; margin: 0 auto; }
.prose { color: var(--ink-soft); }
.prose > p:first-of-type { font-size: 1.16rem; color: var(--ink); }
.prose h2, .prose h3 { color: var(--ink); }
.prose h2 { padding-top: 8px; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose blockquote { margin: 1.7em 0; padding: 6px 24px; border-inline-start: 3px solid var(--gold-500);
  font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--ink); letter-spacing: -.01em; }
.prose blockquote .src { display: block; font-weight: 500; font-size: .82rem; color: var(--ink-faint); margin-top: 10px; font-family: var(--sans); letter-spacing: .02em; }
.callout { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; margin: 1.7em 0; }
.callout.tip { border-inline-start: 4px solid var(--gold-400); }
.callout.warn { border-inline-start: 4px solid var(--gold-600); }
.callout h4 { margin: 0 0 6px; font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-400); }
.callout p { color: var(--ink-soft); }

table.tbl { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
table.tbl th, table.tbl td { text-align: start; padding: 11px 13px; border: 1px solid var(--line); color: var(--ink-soft); }
table.tbl th { background: var(--paper-2); font-family: var(--sans); font-weight: 700; color: var(--ink); }
table.tbl tr:nth-child(even) td { background: color-mix(in srgb, var(--paper-2) 55%, transparent); }

.page-head { padding: 60px 0 8px; }
.page-head .kicker { color: var(--gold-500); }
.breadcrumb { font-size: .82rem; color: var(--ink-faint); margin-bottom: 16px; letter-spacing: .03em; }
.breadcrumb a { color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--gold-400); }

.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin: 0 0 30px; }
.toc strong { font-family: var(--sans); font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-faint); }
.toc ol { margin: 12px 0 0; padding-inline-start: 1.2em; }
.toc a { color: var(--ink-soft); }
.toc a:hover { color: var(--gold-400); }

/* --- FAQ accordion --- */
.faq-item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: var(--card); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 1.04rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--gold-500); font-size: 1.4rem; font-weight: 400; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item .a { padding: 0 22px 20px; color: var(--ink-soft); }
.faq-item .a p:last-child { margin-bottom: 0; }

/* --- Ads (blended into the design; label kept for policy compliance) --- */
.ad-slot { margin: 34px auto; text-align: center; min-height: 90px; }
.ad-slot small, .ad-banner small, .ad-infeed small {
  display: block; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 6px; font-weight: 600; }
.ad-banner {
  margin: 0; padding: 14px 18px; background: var(--paper-2);
  border-block: 1px solid var(--line-soft); text-align: center; }
.ad-banner .wrap-ad { max-width: var(--maxw); margin: 0 auto; }
.ad-banner ins { min-height: 90px; }
.ad-infeed {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 18px; box-shadow: var(--shadow); }
.ad-infeed ins { min-height: 110px; }

/* --- CTA band --- */
.band { position: relative; overflow: hidden; border: 1px solid var(--line);
  background:
    radial-gradient(700px 300px at 85% -40%, rgba(200,161,75,.16), transparent 60%),
    linear-gradient(160deg, #191b20, #121316);
  color: #eef0f3; border-radius: 22px; padding: 54px; text-align: center; }
.band::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M40 0l40 40-40 40L0 40z' fill='none' stroke='%23c8a14b'/%3E%3C/svg%3E"); }
.band h2 { color: #fff; margin-top: 0; position: relative; }
.band p { color: #aab0ba; max-width: 52ch; margin-inline: auto; position: relative; }

/* --- Footer --- */
.site-footer { background: #0c0d10; color: #9298a2; padding: 60px 0 32px; margin-top: 80px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 16px; }
.site-footer a { color: #9298a2; display: block; padding: 5px 0; font-size: .92rem; }
.site-footer a:hover { color: var(--gold-400); text-decoration: none; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer .brand b { color: var(--gold-500); }
.site-footer .about { color: #757b85; font-size: .92rem; max-width: 36ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 38px; padding-top: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: #868c96; }

/* --- Misc --- */
.pill { display: inline-block; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-soft);
  padding: 4px 12px; border-radius: 100px; font-size: .82rem; font-weight: 600; }
.disclaimer-box { background: var(--paper-2); border: 1px dashed var(--line); border-radius: 12px; padding: 16px 20px; font-size: .9rem; color: var(--ink-soft); }
.disclaimer-box strong { color: var(--ink); }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .calc-shell { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* Mobile/tablet nav drawer — engages before the inline row gets cramped */
  .nav-links { position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; gap: 2px;
    transform: translateY(-135%); transition: transform .25s ease; box-shadow: var(--shadow-lg); margin: 0;
    max-height: calc(100vh - 70px); overflow-y: auto; }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 10px; }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: inline-grid; margin-inline-start: auto; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-bar { grid-template-columns: 1fr; }
  .hero-bar a { border-inline-end: none; border-bottom: 1px solid rgba(255,255,255,.08); padding: 20px 0; }
  .band { padding: 36px 24px; }
  section { padding: 52px 0; }
  .hero-inner { padding: 64px 0 0; }
}

@media print {
  .site-header, .site-footer, .ad-slot, .ad-banner, .hero-cta, .nav-toggle, .side-rail { display: none; }
}
