/* ==========================================================================
   Montaser Hussam — Portfolio v3
   Single shared stylesheet for every page.
   ========================================================================== */

:root {
  --ink: #0b0f18;
  --panel: rgba(16, 21, 36, .66);
  --violet: #7c5cff;
  --teal: #22d3c5;
  --sand: #f2e8d5;
  --body: #b9c1d1;
  --muted: #8892a6;
  --line: rgba(136, 146, 166, .18);
  --amber: #ffb545;
  --success: #4ade80;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --container: 1160px;
  --pad: 28px;
  --rhythm: 110px;
  --nav-h: 68px;

  --radius-tag: 6px;
  --radius-btn: 10px;
  --radius-card: 14px;
  --radius-modal: 16px;
}

@media (max-width: 860px) { :root { --pad: 20px; --rhythm: 78px; --nav-h: 58px; } }
@media (max-width: 640px) { :root { --pad: 16px; --rhythm: 62px; } }
@media (max-width: 380px) { :root { --pad: 14px; } }

/* ==========================================================================
   Theme system (§16) — dark is the base :root above; light overrides via
   [data-theme="light"], or automatically under prefers-color-scheme when
   [data-theme="system"] (or no explicit attribute is set by the blocking
   inline script, which always stamps one of dark/light/system).
   ========================================================================== */
:root[data-theme="light"],
:root[data-theme="system"] {
  color-scheme: light;
}
:root[data-theme="light"] {
  --ink: #f2efe7;
  --panel: rgba(255, 255, 255, .74);
  --violet: #5b3df5;
  --teal: #0d9488;
  --sand: #12151f;
  --body: #414a5c;
  --muted: #6b7689;
  --line: rgba(20, 25, 40, .14);
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    --ink: #f2efe7;
    --panel: rgba(255, 255, 255, .74);
    --violet: #5b3df5;
    --teal: #0d9488;
    --sand: #12151f;
    --body: #414a5c;
    --muted: #6b7689;
    --line: rgba(20, 25, 40, .14);
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--body);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, canvas, video { max-width: 100%; display: block; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--sand);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(1.95rem, 4.6vw + 1rem, 4.9rem); line-height: 1.05; }
h2 { font-size: clamp(1.6rem, 2.6vw + 1rem, 2.6rem); line-height: 1.15; }
h3 { font-size: clamp(1.15rem, 1vw + 1rem, 1.5rem); }
p { margin: 0 0 1em; }

code, pre, .mono { font-family: var(--font-mono); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

section { padding: var(--rhythm) 0; scroll-margin-top: var(--nav-h); }

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--violet);
  display: inline-block;
  margin-bottom: 14px;
}

/* §152: eyebrow icon pills — upgrades .label inside section/page heads */
.label.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: .1em;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}
.eyebrow-icon { width: 13px; height: 13px; flex-shrink: 0; color: var(--teal); }

.lede { font-size: 1.15rem; color: var(--body); max-width: 60ch; }

/* focus & a11y ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--teal);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius-btn);
  font-family: var(--font-mono);
  font-weight: 500;
  z-index: 999;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: var(--radius-btn);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  text-decoration: none;
  background: none;
}
.btn:hover { text-decoration: none; }
.btn-solid { background: linear-gradient(135deg, var(--violet), #5a3fe0); color: #fff; }
.btn-solid:hover { transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--sand); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-sm { min-height: 36px; padding: 8px 16px; font-size: 12.5px; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* cards --------------------------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-tag);
  padding: 4px 9px;
  display: inline-block;
}

/* ==========================================================================
   Background 3D canvas
   ========================================================================== */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  opacity: .62;
}
@media (max-width: 640px) { #bg-canvas { opacity: .5; } }

.veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 24%, color-mix(in srgb, var(--ink) 62%, transparent), transparent 62%),
    radial-gradient(ellipse 80% 60% at 50% 78%, color-mix(in srgb, var(--ink) 50%, transparent), transparent 65%),
    radial-gradient(circle at 18% 20%, rgba(124,92,255,.10), transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(34,211,197,.08), transparent 45%),
    linear-gradient(180deg, color-mix(in srgb, var(--ink) 15%, transparent), transparent 12%, transparent 88%, color-mix(in srgb, var(--ink) 25%, transparent));
}

/* ==========================================================================
   Preloader
   ========================================================================== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity .5s ease, visibility .5s ease;
}
#preloader .pl-name {
  font-family: var(--font-mono);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--sand);
  font-size: 13px;
}
#preloader .pl-track {
  width: 220px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
#preloader .pl-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--teal));
}
#preloader .pl-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
body.ready #preloader { opacity: 0; visibility: hidden; pointer-events: none; }

/* ==========================================================================
   Custom cursor
   ========================================================================== */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
}
.cursor-dot { width: 6px; height: 6px; background: var(--teal); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid var(--violet);
  transition: width .18s ease, height .18s ease, border-color .18s ease;
}
.cursor-ring.hover { width: 54px; height: 54px; border-color: var(--teal); }
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ==========================================================================
   Scroll progress bar
   ========================================================================== */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--violet), var(--teal));
  z-index: 9997;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
header.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 500;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease, height .25s ease;
}
header.site-header.scrolled {
  border-color: var(--line);
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(10px);
}
.nav-wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--sand);
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand svg { width: 22px; height: 22px; }
nav.main-nav { display: flex; align-items: center; gap: 26px; }
nav.main-nav a {
  color: var(--body);
  font-size: 14.5px;
  font-family: var(--font-mono);
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--teal); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
#kbtn {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-tag);
  padding: 6px 10px;
  background: none;
  cursor: pointer;
}
.burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-tag);
  background: none;
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--sand);
  transition: transform .2s ease, opacity .2s ease;
}
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 19px; }
.burger span:nth-child(3) { top: 24px; }
body.nav-open .burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 860px) {
  #kbtn { display: none; }
  nav.main-nav {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: color-mix(in srgb, var(--ink) 98%, transparent);
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    transform: translateX(100%);
    transition: transform .3s ease;
  }
  body.nav-open nav.main-nav { transform: translateX(0); }
  nav.main-nav a { font-size: 20px; }
  .burger { display: block; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 64px) var(--pad) 60px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
  min-height: 88vh;
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: calc(var(--nav-h) + 36px); min-height: auto; }
  .hero-stage { order: 2; height: 320px; }
  .hero-copy { order: 1; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding-top: calc(var(--nav-h) + 16px); min-height: auto; }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--body);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
}
.chip .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 rgba(74,222,128,.6);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(74,222,128,.5); }
  70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
@media (prefers-reduced-motion: reduce) { .chip .dot { animation: none; } }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.chip-row .tag { padding: 7px 12px; }

/* §128: single large latency figure beneath the hero headline */
.hero-bignum {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin: 6px 0 26px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.hero-bignum-figure {
  font-family: var(--font-mono);
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 500;
  color: var(--teal);
  white-space: nowrap;
}
.hero-bignum-unit { font-size: .55em; color: var(--body); margin-inline-start: 2px; }
.hero-bignum p { margin: 0; font-size: 13.5px; color: var(--body); line-height: 1.7; max-width: 42ch; }

/* §129: metric row visible above the fold, animates on load */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 14px;
}
.hstat .num { font-family: var(--font-mono); font-size: 1.5rem; color: var(--sand); font-weight: 500; }
.hstat .lbl { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 640px) { .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* §130: real, linkable external verification beside the metrics */
.hero-verify { margin-bottom: 26px; }
.hero-verify a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 1px;
}
.hero-verify a:hover { color: var(--teal); border-color: var(--teal); }

.scroll-hint {
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.scroll-hint .bar {
  width: 1px; height: 26px; background: var(--line); position: relative; overflow: hidden;
}
.scroll-hint .bar::after {
  content: ""; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--teal); animation: hint-drop 1.8s infinite;
}
@keyframes hint-drop { to { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .scroll-hint .bar::after { animation: none; top: 0; } }

.hero-stage { position: relative; height: 460px; }
#hero3d { position: absolute; inset: 0; }
#hero3d canvas { width: 100% !important; height: 100% !important; }

/* v10 §149: contact page room scene, beside the pitch line */
.contact-scene-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.contact-stage { height: 320px; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.02); }
@media (max-width: 900px) { .contact-scene-grid { grid-template-columns: 1fr; } .contact-stage { order: -1; } }

/* ==========================================================================
   Split headline reveal
   ========================================================================== */
[data-split] .split-line {
  display: block;
  overflow: hidden;
  padding-bottom: .14em;
  margin-bottom: -.14em;
}
[data-split] .split-line > span {
  display: block;
  transform: translateY(110%);
  transition: transform .8s cubic-bezier(.16,1,.3,1);
}
[data-split].revealed .split-line > span { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-split] .split-line > span { transition: none; transform: translateY(0); }
}

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1);
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none; opacity: 1; transform: none; }
}

/* ==========================================================================
   Grids / generic sections
   ========================================================================== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.sidebar-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; }
.sticky-panel { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
@media (max-width: 860px) { .sticky-panel { position: static; } }
@media (max-width: 1100px) { .sidebar-grid { grid-template-columns: 1.3fr 1fr; } }
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .sidebar-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.section-head { max-width: 640px; margin-bottom: 48px; }

/* marquee -------------------------------------------------------------------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; }
.marquee-track { display: flex; gap: 60px; width: max-content; animation: marquee 26s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; overflow-x: auto; } }
.marquee-track span { font-family: var(--font-mono); font-size: 13px; color: var(--muted); white-space: nowrap; }

/* stats -------------------------------------------------------------------- */
.stat { text-align: center; }
.stat .num { font-family: var(--font-display); font-size: clamp(2rem,3vw,2.8rem); color: var(--sand); font-weight: 600; }
.stat .lbl { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* skill bars ----------------------------------------------------------------- */
.skill { margin-bottom: 18px; }
.skill-top { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12.5px; color: var(--body); margin-bottom: 8px; }
.skill-track { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.skill-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--violet), var(--teal)); transition: width 1.1s cubic-bezier(.16,1,.3,1); }

/* FAQ -------------------------------------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 0; display: flex; justify-content: space-between; align-items: center;
  color: var(--sand); font-family: var(--font-display); font-size: 1.02rem; gap: 20px;
}
.faq-q .plus { font-family: var(--font-mono); color: var(--teal); transition: transform .25s ease; }
.faq-q[aria-expanded="true"] .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding-bottom: 20px; color: var(--body); }

/* process steps (services.html, landing pages) ------------------------------ */
.process { display: flex; flex-direction: column; gap: 0; margin-top: 20px; }
.process-step { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.process-step:last-child { border-bottom: none; }
.process-num { font-family: var(--font-mono); color: var(--violet); font-size: 13px; min-width: 28px; }

/* landing pages (v9 §120-123) ------------------------------------------------ */
.checklist { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-direction: column; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--body); line-height: 1.6; }
.checklist li::before { content: "—"; color: var(--teal); font-family: var(--font-mono); flex-shrink: 0; }
.objection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 20px; }
.objection-grid .card h4 { color: var(--teal); font-size: .85rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
@media (max-width: 760px) { .objection-grid { grid-template-columns: 1fr; } }
.specialism-crosslinks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.specialism-crosslinks a { font-family: var(--font-mono); font-size: 12.5px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--body); }
.specialism-crosslinks a:hover { color: var(--teal); border-color: var(--teal); }
.specialism-crosslinks a[aria-current="page"] { color: var(--teal); border-color: var(--teal); }

/* §131: currency selector --------------------------------------------------- */
.currency-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 26px; }
.currency-bar-label { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.currency-select { display: flex; gap: 6px; }
.currency-btn { font-family: var(--font-mono); font-size: 12px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--body); cursor: pointer; }
.currency-btn[aria-pressed="true"] { border-color: var(--teal); color: var(--teal); }
.currency-note { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-inline-start: auto; }
@media (max-width: 640px) { .currency-note { margin-inline-start: 0; width: 100%; } }

/* §132: risk-reversal row -------------------------------------------------- */
.risk-reversal {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 30px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.risk-item .risk-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 7px; box-sizing: border-box; border-radius: 50%;
  border: 1px solid var(--teal); color: var(--teal);
  margin-bottom: 10px;
}
.risk-item h4 { font-size: .92rem; margin-bottom: 6px; }
.risk-item p { font-size: 13px; color: var(--body); line-height: 1.6; }
@media (max-width: 900px) { .risk-reversal { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .risk-reversal { grid-template-columns: 1fr; } }

/* filters ------------------------------------------------------------------- */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-pill {
  font-family: var(--font-mono); font-size: 13px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: none; color: var(--body); cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.filter-pill[aria-pressed="true"] { border-color: var(--teal); color: var(--teal); }

/* footer ---------------------------------------------------------------------- */
footer.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
.footer-col h4 { font-size: .95rem; }
.footer-col a { display: block; color: var(--muted); font-size: 13.5px; margin-bottom: 8px; }
.footer-col a:hover { color: var(--teal); }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; color: var(--muted); flex-wrap: wrap; gap: 10px;
}
@media (max-width: 860px) { .footer-grid { flex-direction: column; } }

/* v10 §155: testimonial grid — only ever rendered with real, verified entries */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.testimonial-stars { color: var(--amber); letter-spacing: 2px; font-size: 14px; margin-bottom: 12px; }
.testimonial-quote { font-size: 14.5px; color: var(--body); line-height: 1.7; margin-bottom: 18px; }
.testimonial-attr { display: flex; align-items: center; gap: 12px; }
.testimonial-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; }
.testimonial-name { font-size: 13.5px; color: var(--sand); font-weight: 500; }
.testimonial-role { font-size: 12px; color: var(--muted); }
.testimonial-verify { display: inline-block; margin-top: 14px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.testimonial-verify:hover { color: var(--teal); }

/* §125: sticky in-page section rail --------------------------------------- */
.section-rail {
  position: sticky;
  top: var(--nav-h);
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 var(--pad);
  height: 0;
  overflow: hidden;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
  transition: height .2s ease, border-color .2s ease;
}
.section-rail.is-visible { height: 52px; border-color: var(--line); }
.rail-links { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.rail-links::-webkit-scrollbar { display: none; }
.rail-links a {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 12px; white-space: nowrap;
  color: var(--muted); padding: 7px 13px; border-radius: 999px; border: 1px solid transparent;
}
.rail-links a:hover { color: var(--sand); }
.rail-links a[aria-current="true"] { color: var(--teal); border-color: var(--teal); }
.rail-cta { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 640px) { .rail-cta { display: none; } }

/* §139: four-column footer site map */
.footer-grid-4 { flex-wrap: wrap; }
.footer-grid-4 .footer-col { min-width: 150px; flex: 1 1 150px; }
.footer-status { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.footer-status .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px var(--success); flex-shrink: 0; }
.footer-status[hidden] { display: none; }
.footer-social { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.footer-social a { color: var(--muted); font-size: 13px; font-family: var(--font-mono); }
.footer-social a:hover { color: var(--teal); }

/* ==========================================================================
   Command palette
   ========================================================================== */
#cmdk-backdrop {
  position: fixed; inset: 0; background: rgba(5,7,13,.7); backdrop-filter: blur(4px);
  z-index: 9990; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh;
}
body.cmdk-open #cmdk-backdrop { display: flex; }
#cmdk {
  width: min(560px, 92vw); background: color-mix(in srgb, var(--ink) 96%, var(--panel)); border: 1px solid var(--line);
  border-radius: var(--radius-modal); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
#cmdk input {
  width: 100%; border: none; background: none; padding: 18px 20px; font-family: var(--font-mono);
  font-size: 15px; color: var(--sand); border-bottom: 1px solid var(--line);
}
#cmdk input:focus { outline: none; }
#cmdk ul { list-style: none; margin: 0; padding: 8px; max-height: 340px; overflow-y: auto; }
#cmdk li {
  padding: 12px 14px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 13.5px; color: var(--body);
}
#cmdk li[aria-selected="true"] { background: rgba(124,92,255,.16); color: var(--sand); }
#cmdk li span.hint { color: var(--muted); font-size: 11.5px; }

/* ==========================================================================
   Forms
   ========================================================================== */
label { display: block; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
input, select, textarea {
  width: 100%; background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: var(--radius-btn);
  padding: 12px 14px; color: var(--sand); font-family: var(--font-body); font-size: 14.5px; min-height: 44px;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); }
.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
th { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* ==========================================================================
   Code blocks
   ========================================================================== */
.code-window { border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; margin: 22px 0; }
.code-chrome { display: flex; gap: 6px; padding: 10px 14px; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--line); }
.code-chrome span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.code-window pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 12.5px; line-height: 1.7; }
.code-window .c { color: var(--muted); font-style: italic; }
.code-window .k { color: var(--violet); }
.code-window .s { color: var(--amber); }
.code-window .f { color: var(--teal); }
.code-window .n { color: var(--sand); }

/* pull quote ----------------------------------------------------------------- */
blockquote.pull {
  border-left: 2px solid var(--violet);
  padding: 4px 0 4px 22px;
  margin: 30px 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--sand);
}

/* tilt cards --------------------------------------------------------------- */
[data-tilt] { transform-style: preserve-3d; position: relative; will-change: transform; }
[data-tilt] .tilt-content { transform: translateZ(22px); }
[data-tilt] .glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,.12), transparent 60%);
  transition: opacity .3s ease;
}
[data-tilt]:hover .glare { opacity: 1; }

/* magnetic ------------------------------------------------------------------- */
[data-magnetic] { will-change: transform; }

/* utility -------------------------------------------------------------------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.no-print { }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* page head -------------------------------------------------------------------- */
.page-head {
  padding: calc(var(--nav-h) + 56px) 0 40px;
}
@media (max-height: 480px) and (orientation: landscape) { .page-head { padding-top: calc(var(--nav-h) + 20px); } }

/* diagram -------------------------------------------------------------------- */
.diagram { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; background: rgba(255,255,255,.02); }

/* radar / canvas demo shells ------------------------------------------------ */
.demo-block { margin-bottom: var(--rhythm); }
.demo-scope {
  font-family: var(--font-mono); font-size: 12px; color: var(--amber);
  border: 1px solid rgba(255,181,69,.3); border-radius: var(--radius-tag);
  padding: 10px 14px; margin: 16px 0 24px; background: rgba(255,181,69,.05);
}
canvas.demo-canvas { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-card); background: rgba(255,255,255,.02); }

/* 404 --------------------------------------------------------------------------- */
.notfound { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 var(--pad); }

/* payment ------------------------------------------------------------------- */
.wallet-row { display: flex; gap: 10px; align-items: stretch; }
@media (max-width: 640px) { .wallet-row { flex-direction: column; } }
.wallet-addr { flex: 1; font-family: var(--font-mono); font-size: 13px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-btn); word-break: break-all; background: rgba(255,255,255,.02); }
.network-select { display: flex; gap: 8px; margin-bottom: 16px; }
.warning { border: 1px solid rgba(255,181,69,.35); background: rgba(255,181,69,.06); color: var(--amber); padding: 14px 16px; border-radius: var(--radius-btn); font-size: 13.5px; margin: 18px 0; }

/* print ---------------------------------------------------------------------- */
@media print {
  #bg-canvas, .veil, header.site-header, #scroll-progress, .cursor-dot, .cursor-ring,
  footer.site-footer, #preloader, #cmdk-backdrop, .no-print { display: none !important; }
  body { background: #fff; color: #111; }
  h1, h2, h3, h4 { color: #111; }
  .card { background: none; border: none; padding: 0; backdrop-filter: none; }
  body, p, li { font-size: 10.5pt; color: #111; }
  section { break-inside: avoid; padding: 14px 0; }
}

/* ==========================================================================
   PART B additions
   ========================================================================== */

/* RTL: logical-property conversions for the two rules called out in the brief.
   Horizontal padding/margin is preserved, just expressed as inline-* so it
   flips automatically under [dir="rtl"]. */
.hero {
  max-width: var(--container);
  margin-inline: auto;
  padding-block: calc(var(--nav-h) + 64px) 60px;
  padding-inline: var(--pad);
}
.page-head {
  padding-block: calc(var(--nav-h) + 56px) 40px;
}
.container { margin-inline: auto; padding-inline: var(--pad); padding-block: 0; }
.skip-link { inset-inline-start: 12px; }
blockquote.pull { border-inline-start: 2px solid var(--violet); border-left: none; padding: 4px 0 4px 22px; padding-inline-start: 22px; padding-left: 0; }
th, td { text-align: start; }
.faq-q { text-align: start; }

/* Arabic font stack + RTL body rules */
html[lang="ar"] { --font-display: "Reem Kufi", var(--font-display); --font-body: "IBM Plex Sans Arabic", var(--font-body); }
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .mono,
html[dir="rtl"] code, html[dir="rtl"] pre,
html[dir="rtl"] .code-window,
html[dir="rtl"] .diagram,
html[dir="rtl"] .num,
html[dir="rtl"] .wallet-addr { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .cursor-dot, html[dir="rtl"] .cursor-ring { direction: ltr; }

/* theme + lang toggle buttons in header */
#theme-toggle, #lang-toggle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-tag);
  padding: 6px 10px;
  background: none;
  cursor: pointer;
  min-height: 32px;
}
#theme-toggle:hover, #lang-toggle:hover { border-color: var(--teal); color: var(--teal); }

/* availability banner */
#availability-banner {
  position: relative;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
  padding: 10px var(--pad);
  margin-top: var(--nav-h);
  background: linear-gradient(90deg, rgba(124,92,255,.14), rgba(34,211,197,.1));
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--sand);
}
#availability-banner button.dismiss {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1;
  padding: 4px 6px;
}
#availability-banner[hidden] { display: none; }

/* trusted-stack strip */
.trust-strip { padding: 46px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-strip .label { display: block; text-align: center; margin-bottom: 22px; }
.trust-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 34px; }
.trust-logos span {
  font-family: var(--font-mono); font-size: 14px; color: var(--muted);
  opacity: .55; filter: grayscale(1); transition: opacity .2s ease, filter .2s ease;
}
.trust-logos span:hover { opacity: 1; filter: grayscale(0); color: var(--teal); }

/* search */
.search-box { position: relative; margin-bottom: 30px; }
.search-box input { padding-inline-start: 44px; }
.search-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.search-results li a { display: block; }
.search-results mark { background: rgba(124,92,255,.28); color: var(--sand); border-radius: 3px; }
.search-empty { color: var(--muted); font-family: var(--font-mono); font-size: 13.5px; }

/* notes index list */
.notes-list { display: flex; flex-direction: column; gap: 0; }
.note-row { border-bottom: 1px solid var(--line); padding: 26px 0; display: flex; flex-direction: column; gap: 6px; }
.note-row .meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); display: flex; gap: 14px; }
.note-row h2 { margin-bottom: 2px; }
.note-row p { color: var(--body); margin-bottom: 0; }

/* note article page */
.note-meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.toc { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px 22px; margin: 30px 0; background: rgba(255,255,255,.02); }
.toc h2 { font-size: 1rem; margin-bottom: 10px; }
.toc ol { margin: 0; padding-inline-start: 20px; }
.toc a { color: var(--body); font-size: 13.5px; }
.note-pagenav { display: flex; justify-content: space-between; gap: 20px; margin-top: var(--rhythm); padding-top: 24px; border-top: 1px solid var(--line); }
.note-pagenav a { max-width: 45%; }
.note-pagenav .dir { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 640px) { .note-pagenav { flex-direction: column; } .note-pagenav a { max-width: 100%; } }
.heading-anchor { opacity: 0; margin-inline-start: 8px; color: var(--muted); text-decoration: none; font-size: .8em; }
h2:hover .heading-anchor, h3:hover .heading-anchor { opacity: 1; }

/* copy-code button */
.code-window { position: relative; }
.code-copy {
  position: absolute; inset-inline-end: 12px; top: 10px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--radius-tag);
  background: rgba(5,7,13,.4); padding: 4px 9px; cursor: pointer;
}
.code-copy:hover { color: var(--teal); border-color: var(--teal); }
.code-copy.copied { color: var(--success); border-color: var(--success); }

/* timezone converter + booking */
.tz-widget { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px 22px; margin: 20px 0; background: rgba(255,255,255,.02); }
.tz-widget .tz-row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 13.5px; margin-bottom: 6px; }
.tz-widget .tz-row span:last-child { color: var(--sand); }

/* uses.html / changelog.html */
.uses-group { margin-bottom: 44px; }
.uses-group h2 { font-size: 1.2rem; }
.uses-item { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.uses-item .name { font-family: var(--font-mono); color: var(--sand); font-size: 14.5px; }
.uses-item .why { color: var(--muted); font-size: 13.5px; }

.changelog-entry { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.changelog-entry .when { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.changelog-entry .when .ver { display: block; color: var(--teal); margin-top: 4px; }
.changelog-entry ul { margin: 8px 0 10px; padding-inline-start: 18px; }
.changelog-entry .why { font-size: 13px; color: var(--muted); font-style: italic; }
@media (max-width: 640px) { .changelog-entry { grid-template-columns: 1fr; gap: 6px; } }

/* shortcut overlay */
#shortcut-overlay {
  position: fixed; inset: 0; z-index: 9995; display: none; align-items: center; justify-content: center;
  background: rgba(5,7,13,.75); backdrop-filter: blur(4px); padding: var(--pad);
}
body.shortcuts-open #shortcut-overlay { display: flex; }
#shortcut-overlay .panel {
  width: min(480px, 100%); background: color-mix(in srgb, var(--ink) 96%, var(--panel)); border: 1px solid var(--line); border-radius: var(--radius-modal);
  padding: 28px 30px;
}
#shortcut-overlay dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 18px 0 0; }
#shortcut-overlay dt { font-family: var(--font-mono); background: var(--line); color: var(--sand); padding: 2px 8px; border-radius: 4px; }
#shortcut-overlay dd { margin: 0; color: var(--body); font-size: 13.5px; }

/* contact form states */
.form-status[data-state="pending"] { color: var(--muted); }
.form-status[data-state="success"] { color: var(--success); }
.form-status[data-state="error"] { color: var(--amber); }
.field-error { color: var(--amber); font-size: 12px; margin-top: 6px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* view transitions (§28) — cross-document transitions where supported, full no-op elsewhere */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* offline banner */
#offline-note {
  position: fixed; bottom: 16px; inset-inline-start: 16px; z-index: 9996;
  font-family: var(--font-mono); font-size: 12px; color: var(--amber);
  border: 1px solid rgba(255,181,69,.35); background: rgba(255,181,69,.08);
  padding: 8px 14px; border-radius: var(--radius-tag); display: none;
}
body.is-offline #offline-note { display: block; }

/* ===== v5 §36 — film grain, vignette, mesh glow (assets/js/polish.js) ===== */
#mh-polish-layer {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
#mh-polish-layer .mh-mesh {
  position: absolute;
  inset: -20%;
  opacity: .5;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(139,92,246,.35), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(45,212,191,.30), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(139,92,246,.18), transparent 55%);
  filter: blur(10px);
  animation: mh-mesh-drift 22s ease-in-out infinite alternate;
}
#mh-polish-layer .mh-grain {
  position: absolute;
  inset: -120%;
  opacity: .05;
  background-repeat: repeat;
  background-size: 120px 120px;
  animation: mh-grain-shift 7s steps(6) infinite;
}
#mh-polish-layer .mh-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 200px rgba(0,0,0,.55);
}
#mh-polish-layer.mh-static .mh-mesh,
#mh-polish-layer.mh-static .mh-grain {
  animation: none;
}
@keyframes mh-mesh-drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-3%,2%,0) scale(1.06); }
}
@keyframes mh-grain-shift {
  0%   { transform: translate(0,0); }
  16%  { transform: translate(-2%,1%); }
  32%  { transform: translate(1%,-2%); }
  48%  { transform: translate(-1%,2%); }
  64%  { transform: translate(2%,-1%); }
  80%  { transform: translate(-2%,-2%); }
  100% { transform: translate(0,0); }
}
@media (prefers-reduced-motion: reduce) {
  #mh-polish-layer .mh-mesh,
  #mh-polish-layer .mh-grain {
    animation: none;
  }
}

/* ===== v5 §37 — curtain page transitions (assets/js/motion.js) ===== */
#mh-curtain { position: fixed; inset: 0; z-index: 150; display: flex; pointer-events: none; }
#mh-curtain .mh-panel {
  flex: 1 1 20%; background: var(--ink); transform-origin: top; transform: scaleY(0);
}
#mh-curtain.mh-in .mh-panel { animation: mh-curtain-in 580ms cubic-bezier(.76,0,.24,1) forwards; }
#mh-curtain.mh-out .mh-panel { transform-origin: bottom; animation: mh-curtain-out 420ms cubic-bezier(.76,0,.24,1) forwards; }
@keyframes mh-curtain-in { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes mh-curtain-out { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { #mh-curtain { display: none !important; } }

/* ===== v5 §39 — scroll-velocity skew ===== */
[data-skew] { will-change: transform; }
@media (prefers-reduced-motion: reduce) { [data-skew] { transform: none !important; } }

/* ===== v6 §56 — five-second answer band ===== */
.answer-band { padding: 18px 0 30px; }
.answer-band .container { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.answer-band a.answer-cell { background: var(--panel); backdrop-filter: blur(6px); padding: 16px 14px; text-decoration: none; display: block; transition: background .2s; }
.answer-band a.answer-cell:hover { background: rgba(124,92,255,.10); }
.answer-band .answer-k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); display: block; margin-bottom: 6px; }
.answer-band .answer-v { font-size: 13.5px; color: var(--sand); line-height: 1.4; }
@media (max-width: 860px) { .answer-band .container { grid-template-columns: 1fr; } }

/* ===== v6 §48 — live status strip ===== */
.status-strip { padding: 12px 0; margin-top: var(--nav-h); border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
#availability-banner:not([hidden]) ~ .status-strip { margin-top: 0; }
.status-strip .container { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.status-strip strong { color: var(--sand); font-weight: 500; }
.status-strip .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; margin-inline-end: 6px; box-shadow: 0 0 8px var(--success); }
.status-strip .status-updated { margin-inline-start: auto; opacity: .7; }
@media (max-width: 640px) { .status-strip .status-updated { margin-inline-start: 0; width: 100%; } }

/* ===== v5 §44 — case study metrics band ===== */
.metrics-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; margin: 28px 0 40px; }
.metrics-band .m-cell { background: var(--panel); padding: 20px 16px; text-align: center; }
.metrics-band .m-num { font-family: var(--font-display); font-size: clamp(24px,4vw,34px); color: var(--violet); font-weight: 600; }
.metrics-band .m-lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 640px) { .metrics-band { grid-template-columns: 1fr 1fr; } }

/* ===== v6 §63 — what happens after you send this ===== */
.next-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 32px 0; }
.next-steps .step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px; position: relative; }
.next-steps .step .n { font-family: var(--font-mono); color: var(--teal); font-size: 12px; display: block; margin-bottom: 8px; }
.next-steps .step p { font-size: 13.5px; color: var(--body); margin: 0; }
@media (max-width: 860px) { .next-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .next-steps { grid-template-columns: 1fr; } }

/* ===== v6 §64 — risk reversal cards ===== */
.risk-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 32px 0; }
.risk-cards .card { padding: 18px; }
.risk-cards .card h4 { margin: 0 0 8px; font-size: 14.5px; color: var(--sand); }
.risk-cards .card p { font-size: 13px; color: var(--muted); margin: 0; }
@media (max-width: 860px) { .risk-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .risk-cards { grid-template-columns: 1fr; } }

/* ===== v6 §57 — contact-everywhere CTA band ===== */
.mh-cta-band { border-top: 1px solid var(--line); background: rgba(124,92,255,.06); padding: 18px 0; }
.mh-cta-band .mh-cta-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.mh-cta-band p { margin: 0; font-size: 14px; color: var(--sand); }
.mh-footer-email { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.mh-footer-email a { color: var(--teal); }

/* ===== v6 §58 — project tiers ===== */
.tier-label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 40px 0 16px; }
.also-built-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.also-built-list a { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--panel); padding: 14px 18px; text-decoration: none; color: var(--body); font-size: 14px; transition: background .2s; }
.also-built-list a:hover { background: rgba(124,92,255,.08); color: var(--sand); }
.also-built-list a span.arrow { color: var(--teal); font-family: var(--font-mono); }

/* ===== v6 §69 — payment matrix ===== */
.payment-matrix { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 13.5px; }
.payment-matrix th, .payment-matrix td { border: 1px solid var(--line); padding: 10px 14px; text-align: start; }
.payment-matrix th { background: var(--panel); color: var(--sand); font-weight: 500; }
.payment-matrix td { color: var(--body); }
.payment-matrix tr td:first-child { color: var(--sand); font-family: var(--font-mono); font-size: 12.5px; }

/* ===== v6 §46/§78 — comparison table ===== */
.compare-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 13.5px; }
.compare-table th, .compare-table td { border: 1px solid var(--line); padding: 10px 14px; text-align: start; vertical-align: top; }
.compare-table th { background: var(--panel); color: var(--sand); font-weight: 500; }
.compare-table td { color: var(--body); }
.compare-table .weak { color: var(--amber); }

/* ===== v6 §65 — legal page ===== */
.legal-section { margin-bottom: 36px; }
.legal-section h2 { font-size: 19px; margin-bottom: 10px; }
.legal-unconfirmed { display: inline-block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--amber); border: 1px solid rgba(255,181,69,.35); background: rgba(255,181,69,.08); padding: 2px 8px; border-radius: var(--radius-tag); margin-inline-start: 8px; }

