/* dajin.ai v4 · tokens R1 «الخيط» (design/tokens.css, 13 Nov 2026). Fonts first, then the semantic roles.
   Every text pair holds WCAG AA 4.5:1; values marked "UI only" hold 3:1 and never carry running text. */
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/ibm-plex-sans-arabic-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/ibm-plex-sans-arabic-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/ibm-plex-sans-arabic-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/manrope-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/manrope-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/manrope-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }

:root {
  /* ── brand constants (N1.5 THE LINK kit; never recoloured) ───────────────── */
  --deep-teal: #003943;
  --connected-teal: #40827d;      /* UI only on light grounds (3.4–4.5:1): icons, large labels, lines */
  --champagne-gold: #d2a366;      /* never body text on light grounds (2.1:1) */
  --warm-sand: #ede0cf;
  --pearl: #f5f5f3;
  --ink: #101f38;
  --light-teal: #4fa7a2;
  --cream: #f2e9da;

  /* ── semantic roles · light ──────────────────────────────────────────────── */
  --bg: var(--pearl);                       /* page ground */
  --bg-alt: var(--warm-sand);               /* alternating band ground */
  --surface: #ffffff;                       /* cards, panels */
  --surface-raised: #ffffff;                /* drawer, menus, sheets */
  --text: var(--ink);                       /* 15.1:1 pearl · 12.7:1 sand */
  --text-soft: #3a4558;                     /* 8.9:1 pearl · 7.4:1 sand */
  --text-why: #4d5a6e;                      /* the «ليه بتشوف ده» line · 6.4:1 pearl */
  --line: rgb(16 31 56 / 0.14);
  --line-strong: rgb(16 31 56 / 0.28);
  --accent: var(--deep-teal);               /* links, primary button, headings on pearl/sand · 11.6:1 */
  --accent-ink: #2f6b66;                    /* teal-family running text where deep teal is too heavy · 5.6:1 pearl, 4.7:1 sand */
  --accent-ui: var(--connected-teal);       /* icons, 2px rules, large labels only */
  --gold: var(--champagne-gold);            /* 1 accent per screen: thread, seal, focus ring on teal */
  --gold-ink: #7a5520;                      /* gold-family text · 6.1:1 pearl · 5.1:1 sand */
  --thread: rgb(210 163 102 / 0.7);         /* the one-history thread line */
  --band: var(--deep-teal);                 /* teal band ground (hero, finance, footer) */
  --on-band: var(--pearl);                  /* 11.6:1 */
  --on-band-soft: #c9d6d7;                  /* 8.5:1 */
  --band-line: rgb(245 245 243 / 0.16);
  --band-accent: var(--gold);               /* links and focus inside a band · 5.5:1 on deep teal */
  --tile: #ffffff;                          /* partner logo tiles stay white in both themes */
  --focus: var(--deep-teal);                /* on pearl/sand grounds */
  --scrim: rgb(16 31 56 / 0.45);

  /* status chips (honesty): word + glyph + colour, never colour alone */
  --st-sim: #61370d;      --st-sim-bg: #fdecd1;      /* «محاكاة» · 8.8:1 */
  --st-pilot: #1f5c12;    --st-pilot-bg: #e3f6dc;    /* «تجريبي» · 7.1:1 */
  --st-planned: #3d4a44;  --st-planned-bg: #ecefec;  /* «مُخطَّط» · 8.0:1 */
  --st-live: #0e4a52;     --st-live-bg: #dcebea;     /* «شغّال في البايلوت» · 8.1:1 */
  --st-note: var(--gold-ink); --st-note-bg: #f6ecdd; /* «منتج الشريك» (D1) */

  /* ── type ────────────────────────────────────────────────────────────────── */
  --font-ar: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', 'Geeza Pro', system-ui, sans-serif;
  --font-en: 'Manrope', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-code: ui-monospace, 'SF Mono', Menlo, monospace;   /* codes, phone, order refs only, always dir=ltr */

  /* fluid scale, 344 → 1280. Arabic leading is tashkeel-safe (≥1.6 body, ≥1.3 display); EN runs one step tighter. */
  --step--1: clamp(0.875rem, 0.85rem + 0.12vw, 0.9375rem);   /* 14 → 15 · meta, captions (floor 14; 12 only in chips) */
  --step-0:  clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);      /* 17 → 18 · AR body (EN body uses --step-0-en) */
  --step-0-en: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);      /* 16 → 17 */
  --step-1:  clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);     /* 19 → 22 · lead, h4 */
  --step-2:  clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);       /* 22 → 28 · h3, pull line */
  --step-3:  clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);        /* 28 → 40 · h2 */
  --step-4:  clamp(2.125rem, 1.5rem + 2.9vw, 3.5rem);        /* 34 → 56 · page h1 */
  --step-5:  clamp(2.5rem, 1.6rem + 4.2vw, 4.5rem);          /* 40 → 72 · home hero line (the one visual event) */
  --lh-body-ar: 1.75;  --lh-body-en: 1.6;
  --lh-head-ar: 1.35;  --lh-head-en: 1.12;
  --lh-display-ar: 1.3; /* tashkeel on «مَنَصَّة دَاچِن» needs ≥1.3 or the marks clip the line above */
  --measure: 46rem;     /* ≈ 70 AR chars at body size; EN caps at 68ch */

  /* ── space · 4/8 scale ───────────────────────────────────────────────────── */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px;
  --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;
  --sec-y: clamp(var(--s-12), 4vw + 24px, var(--s-24));   /* section block padding */
  --sec-y-tight: clamp(var(--s-8), 3vw + 12px, var(--s-16));
  --wrap: 76rem;                                          /* 1216px content, 1280 viewport */
  --wrap-prose: 48rem;
  --gutter: clamp(16px, 4vw, 40px);                       /* 16 at 344, 35 at 884, 40 at 1280 */
  --thread-x: max(18px, calc((100% - var(--wrap)) / 2 - 18px));

  /* ── shape ───────────────────────────────────────────────────────────────── */
  --r-xs: 4px;    /* focus halo, code */
  --r-s: 8px;     /* buttons, inputs, chips that are not pills */
  --r-m: 14px;    /* cards, tiles */
  --r-l: 22px;    /* video stage, device frames, drawer sheet */
  --r-pill: 999px;
  --device-bezel: 10px;

  /* ── elevation · borders first, shadows only where something floats ──────── */
  --shadow-0: none;
  --shadow-1: 0 1px 0 var(--line), 0 14px 32px -28px rgb(0 57 67 / 0.4);     /* resting card */
  --shadow-2: 0 1px 0 var(--line), 0 24px 48px -30px rgb(0 57 67 / 0.5);     /* hovered card, device frame */
  --shadow-float: 0 12px 36px -8px rgb(16 31 56 / 0.28);                       /* drawer, menu, sticky CTA */

  /* ── motion ──────────────────────────────────────────────────────────────── */
  --ease-out: cubic-bezier(0.2, 0, 0, 1);       /* M3 standard: arrives fast, settles */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-draw: cubic-bezier(0.33, 0, 0.1, 1);   /* line-draw */
  --dur-1: 120ms;   /* press, toggle */
  --dur-2: 200ms;   /* hover, chip, disclosure */
  --dur-3: 320ms;   /* drawer, card reveal */
  --dur-4: 600ms;   /* diagram line-draw, thread */
  --dur-5: 900ms;   /* hero sequence, logo settle */
  --stagger: 70ms;

  /* ── grid & breakpoints (documentation; CSS cannot read vars in @media) ──── */
  /* cover 344 · phone ≤ 599 · inner-fold 600–899 (884 target) · tablet 900–1239 · desktop ≥ 1240 (1280 target) */
  --cols: 4;
  --z-sticky: 40; --z-header: 50; --z-drawer: 60; --z-skip: 100;

  color-scheme: only light; /* halo hotfix r1 (13 Nov): opt out of browser auto/forced dark (Chrome/Edge/WebView); our own dark theme sets color-scheme: dark */
  accent-color: var(--deep-teal);
}
@media (min-width: 600px)  { :root { --cols: 8; } }
@media (min-width: 1240px) { :root { --cols: 12; } }

/* ── brand dark ─────────────────────────────────────────────────────────────
   ground ≈ #0B1A20 · cream text · gold · light teal #4FA7A2. Brand teal appears only as a band.
   Two selectors, same block: OS preference when nothing is stored, and the visible switch. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1a20; --bg-alt: #10252c; --surface: #132b33; --surface-raised: #163340;
    --text: var(--cream); --text-soft: #c7c0b3; --text-why: #a9b6b5;
    --line: rgb(242 233 218 / 0.14); --line-strong: rgb(242 233 218 / 0.3);
    --accent: var(--light-teal); --accent-ink: #7cc3bf; --accent-ui: var(--light-teal);
    --gold: #dcb57c; --gold-ink: #dcb57c; --thread: rgb(220 181 124 / 0.55);
    --band: #05282f; --on-band: var(--cream); --on-band-soft: #b9c8c6; --band-line: rgb(242 233 218 / 0.14); --band-accent: #dcb57c;
    --tile: #f2e9da; --focus: #dcb57c; --scrim: rgb(0 0 0 / 0.6);
    --st-sim: #f0c48c; --st-sim-bg: #352411; --st-pilot: #8fd18a; --st-pilot-bg: #15301f;
    --st-planned: #b9c4c0; --st-planned-bg: #1e2e2f; --st-live: #8fd3ce; --st-live-bg: #0f3a3e; --st-note: #dcb57c; --st-note-bg: #2b2416;
    --shadow-1: 0 1px 0 var(--line), 0 16px 36px -28px rgb(0 0 0 / 0.8);
    --shadow-2: 0 1px 0 var(--line), 0 26px 52px -30px rgb(0 0 0 / 0.85);
    --shadow-float: 0 14px 40px -8px rgb(0 0 0 / 0.7);
    color-scheme: dark; accent-color: var(--light-teal);
  }
}
:root[data-theme='dark'] {
  --bg: #0b1a20; --bg-alt: #10252c; --surface: #132b33; --surface-raised: #163340;
  --text: var(--cream); --text-soft: #c7c0b3; --text-why: #a9b6b5;
  --line: rgb(242 233 218 / 0.14); --line-strong: rgb(242 233 218 / 0.3);
  --accent: var(--light-teal); --accent-ink: #7cc3bf; --accent-ui: var(--light-teal);
  --gold: #dcb57c; --gold-ink: #dcb57c; --thread: rgb(220 181 124 / 0.55);
  --band: #05282f; --on-band: var(--cream); --on-band-soft: #b9c8c6; --band-line: rgb(242 233 218 / 0.14); --band-accent: #dcb57c;
  --tile: #f2e9da; --focus: #dcb57c; --scrim: rgb(0 0 0 / 0.6);
  --st-sim: #f0c48c; --st-sim-bg: #352411; --st-pilot: #8fd18a; --st-pilot-bg: #15301f;
  --st-planned: #b9c4c0; --st-planned-bg: #1e2e2f; --st-live: #8fd3ce; --st-live-bg: #0f3a3e; --st-note: #dcb57c; --st-note-bg: #2b2416;
  --shadow-1: 0 1px 0 var(--line), 0 16px 36px -28px rgb(0 0 0 / 0.8);
  --shadow-2: 0 1px 0 var(--line), 0 26px 52px -30px rgb(0 0 0 / 0.85);
  --shadow-float: 0 14px 40px -8px rgb(0 0 0 / 0.7);
  color-scheme: dark; accent-color: var(--light-teal);
}

/* band context: inside a teal band the semantic roles re-point so components need no theme rules of their own */
.band--teal, .ftr, .drawer__panel {
  --text: var(--on-band); --text-soft: var(--on-band-soft); --text-why: var(--on-band-soft);
  --line: var(--band-line); --line-strong: rgb(245 245 243 / 0.32);
  --accent: var(--band-accent); --accent-ink: var(--on-band); --gold-ink: var(--band-accent); --focus: var(--band-accent);
  --surface: rgb(245 245 243 / 0.06); --surface-raised: rgb(245 245 243 / 0.1);
}

/* reduced motion: the token values collapse so every transition that reads them becomes instant */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; --dur-4: 0ms; --dur-5: 0ms; --stagger: 0ms; }
}

/* legacy aliases (pre-R1 selectors keep working while they are rewritten) */
:root { --band-teal: var(--band); --on-teal: var(--on-band); --on-teal-soft: var(--on-band-soft); --teal-line: var(--band-line); --accent-2: var(--accent-ui); --shadow: var(--shadow-1); --ease: var(--ease-out); }
/* status «فكرة» (idea): planned family, dotted */
:root { --st-idea: var(--st-planned); --st-idea-bg: transparent; }

/* dajin.ai v4 · base R1 «الخيط»: reset, type, bands, flow, and the gold thread that runs down every page. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-ar); font-size: var(--step-0); line-height: var(--lh-body-ar);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
html[lang='en'] body { font-family: var(--font-en); font-size: var(--step-0-en); line-height: var(--lh-body-en); }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-underline-offset: 0.24em; text-decoration-thickness: 1px; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { margin: 0; line-height: var(--lh-head-ar); font-weight: 700; text-wrap: balance; }
html[lang='en'] :is(h1, h2, h3, h4) { line-height: var(--lh-head-en); letter-spacing: -0.015em; }
p, li, dd { text-wrap: pretty; overflow-wrap: anywhere; }
[lang='en'] { font-family: var(--font-en); }
code, kbd { font-family: inherit; font-weight: 600; }
bdi[dir='ltr'] { unicode-bidi: isolate; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--r-xs); }
::selection { background: var(--gold); color: var(--ink); }

.skip { position: fixed; inset-inline-start: 1rem; top: -4rem; z-index: var(--z-skip); background: var(--gold); color: var(--ink); padding: 0.6rem 1.1rem; border-radius: var(--r-pill); font-weight: 700; text-decoration: none; transition: transform var(--dur-2) var(--ease-out); }
.skip:focus { transform: translateY(5rem); outline-color: var(--ink); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* bands: pearl and sand alternate; teal only for the moments that matter (hero, finance, nasheet, footer) */
.band--teal { background: var(--band); color: var(--on-band); }
.band--pearl { background: var(--bg); }
.band--sand { background: var(--bg-alt); }

/* type: Arabic is the protagonist; the editorial 3–5× jump lives in the home hero only */
.h1 { font-size: var(--step-4); line-height: var(--lh-display-ar); }
html[lang='en'] .h1 { line-height: 1.08; }
.h2 { font-size: var(--step-3); }
.h3 { font-size: var(--step-2); }
.h4 { font-size: var(--step-1); }
.lead { font-size: var(--step-1); color: var(--text-soft); max-width: var(--measure); line-height: 1.7; }
html[lang='en'] .lead { line-height: 1.55; max-width: 68ch; }
.p { max-width: var(--measure); }
html[lang='en'] .p { max-width: 68ch; }
.p-strong { font-weight: 600; max-width: var(--measure); }
.p-small { font-size: var(--step--1); color: var(--text-soft); }
.p-big { font-size: var(--step-2); font-weight: 700; color: var(--gold-ink); }
.display { font-size: var(--step-3); font-weight: 700; color: var(--gold-ink); line-height: var(--lh-display-ar); }
.eyebrow { display: inline-flex; align-items: center; gap: 0.55rem; font-size: var(--step--1); font-weight: 700; color: var(--gold-ink); }
.eyebrow::before { content: ''; width: 9px; height: 9px; flex: none; background: var(--gold); transform: rotate(45deg); border-radius: 2px; }
.why { font-size: var(--step--1); color: var(--text-why); }
.prose { max-width: var(--wrap-prose); }
.prose > * + * { margin-top: var(--s-4); }

/* vertical rhythm: whitespace is the hierarchy */
.flow > * + * { margin-top: var(--s-4); }
.flow > :is(.h2, h2) + * { margin-top: var(--s-5); }
.flow > * + :is(.h2, h2) { margin-top: var(--s-10); }
.flow > * + :is(.h3, h3) { margin-top: var(--s-8); }
.flow > * + :is(.cards, .cols, .figure, .diagram, .split, .vid, .principles, .hist, .safe, .rel, .engines-lit, .tiles) { margin-top: var(--s-10); }
.flow > .faq + .faq { margin-top: 0; }
.flow > :is(.chip, .eyebrow) + * { margin-top: var(--s-3); }

blockquote.quote { position: relative; padding-inline-start: var(--s-6); font-size: var(--step-2); font-weight: 600; line-height: 1.55; color: var(--accent); max-width: 44rem; }
blockquote.quote::before { content: ''; position: absolute; inset-inline-start: 0; top: 0.35em; bottom: 0.35em; width: 2px; background: var(--gold); }
blockquote.quote::after { content: ''; position: absolute; inset-inline-start: -4px; top: 0.35em; width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); border-radius: 2px; }
.band--teal blockquote.quote { color: var(--on-band); }

/* ── the thread «كُلُّه عَ الْمَنَصَّة»: one gold line down the inline-start edge, hero to footer ─────────────
   Every section carries a node on it (a small diamond at its heading). Nodes settle as each section arrives. */
main { position: relative; display: block; }
main::before { content: ''; position: absolute; z-index: 3; inset-block: 0; inset-inline-start: var(--thread-x); width: 2px; background: var(--thread); pointer-events: none; transform-origin: top; }
.sec { position: relative; }
.sec::after { content: ''; position: absolute; z-index: 4; inset-inline-start: calc(var(--thread-x) - 5px); top: calc(var(--sec-y) + 0.6rem); width: 12px; height: 12px; border: 2px solid var(--gold); background: var(--bg); transform: rotate(45deg) scale(var(--node-s, 1)); transition: transform var(--dur-3) var(--ease-out), background-color var(--dur-3) var(--ease-out); transition-delay: 120ms; pointer-events: none; }
.band--sand.sec::after { background: var(--bg-alt); }
.band--teal.sec::after { background: var(--band); }
.sec[data-seen='true']::after { background: var(--gold); }
.sec--tight::after, .sec--strip::after, .sec--answer::after { top: calc(var(--sec-y-tight) + 0.6rem); }
.hhero::after, .phero::after { display: none; }
.js .sec[data-seen='false']::after { --node-s: 0.25; }
@media (max-width: 599px) {
  main::before { inset-inline-start: 5px; }
  .sec::after { width: 9px; height: 9px; inset-inline-start: 1.5px; border-width: 1.5px; }
}

/* reduced motion (OS or the footer «حركة أقل»): the finished page, instantly */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
}
:root[data-motion='reduced'] *, :root[data-motion='reduced'] *::before, :root[data-motion='reduced'] *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }

/* dajin.ai v4 · chrome R1: header (frosted band, logo join once per session), menus, drawer sheet, footer, CTA bar */
.hdr { position: sticky; top: 0; z-index: var(--z-header); color: var(--on-band); background: var(--band); border-bottom: 1px solid var(--band-line); transition: box-shadow var(--dur-3) var(--ease-out); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .hdr { background: color-mix(in srgb, var(--band) 90%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
}
.hdr[data-scrolled='true'] { box-shadow: var(--shadow-float); }
.hdr .wrap { display: flex; align-items: center; gap: var(--s-3); min-height: 68px; }
.hdr :focus-visible { outline-color: var(--gold); }
.hdr__logo { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; border-radius: var(--r-s); color: var(--on-band); }
.hdr__logo svg { display: block; height: 40px; width: auto; overflow: visible; }
html[lang='en'] .hdr__logo svg { height: 32px; }

/* desktop nav */
.nav { margin-inline-start: auto; display: none; }
.nav > ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__a, .nav__btn { position: relative; display: inline-flex; align-items: center; gap: 0.3rem; min-height: 44px; padding: 0 0.62rem; border-radius: var(--r-pill); font: inherit; font-size: 0.94rem; font-weight: 600; color: var(--on-band); text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap; transition: background-color var(--dur-2) var(--ease-out); }
html[lang='en'] .nav__a, html[lang='en'] .nav__btn { font-size: 0.9rem; }
.nav__a:hover, .nav__btn:hover, .nav__btn[aria-expanded='true'] { background: rgb(245 245 243 / 0.1); }
.nav__a[aria-current='page'] { border-radius: var(--r-s) var(--r-s) 0 0; box-shadow: inset 0 -2px 0 var(--gold); }
.nav__div { width: 1px; height: 20px; background: var(--band-line); margin-inline: 0.35rem; }
.nav__grp { position: relative; }
.nav__btn svg { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease-out); }
.nav__btn[aria-expanded='true'] svg { transform: rotate(180deg); }
.nav__menu { position: absolute; inset-inline-start: 0; top: calc(100% + 8px); min-width: 16rem; list-style: none; margin: 0; padding: 6px; border-radius: var(--r-m); background: var(--surface-raised); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-float); opacity: 0; transform: translateY(-6px); visibility: hidden; transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-2); }
.nav__btn[aria-expanded='true'] + .nav__menu { opacity: 1; transform: none; visibility: visible; transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.nav__menu a { display: flex; align-items: center; min-height: 44px; padding: 0 0.85rem; border-radius: var(--r-s); text-decoration: none; font-weight: 500; }
.nav__menu a:hover { background: var(--bg-alt); }
.nav__menu a[aria-current='page'] { font-weight: 700; background: var(--bg-alt); box-shadow: inset 2px 0 0 var(--gold); }
html[dir='rtl'] .nav__menu a[aria-current='page'] { box-shadow: inset -2px 0 0 var(--gold); }
.hdr .nav__menu :focus-visible { outline-color: var(--accent); outline-offset: -3px; }

/* tools: search, theme switch, language, write, menu */
.tools { display: flex; align-items: center; gap: var(--s-2); margin-inline-start: auto; }
.nav + .tools { margin-inline-start: var(--s-3); }
.ibtn { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 0.6rem; border-radius: var(--r-pill); border: 1px solid rgb(245 245 243 / 0.32); background: none; color: var(--on-band); font: inherit; font-weight: 700; font-size: 0.88rem; text-decoration: none; cursor: pointer; transition: border-color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out); }
.ibtn:hover { border-color: var(--gold); background: rgb(245 245 243 / 0.06); }
.ibtn svg { width: 19px; height: 19px; }
/* theme switch: a 64×36 pill with a gold knob that travels (aria-pressed = dark) */
.theme-btn { position: relative; display: inline-flex; align-items: center; width: 64px; min-width: 64px; height: 36px; padding: 3px; border-radius: var(--r-pill); border: 1px solid rgb(245 245 243 / 0.32); background: rgb(245 245 243 / 0.08); color: var(--ink); cursor: pointer; }
.theme-btn:hover { border-color: var(--gold); }
.theme-btn__knob { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--ink); transition: transform var(--dur-2) var(--ease-out); }
.theme-btn__knob svg { width: 16px; height: 16px; }
:root[data-theme='dark'] .theme-btn__knob { transform: translateX(-28px); }
html[dir='ltr']:root[data-theme='dark'] .theme-btn__knob { transform: translateX(28px); }
.theme-btn .i-sun { display: none; }
:root[data-theme='dark'] .theme-btn .i-sun { display: block; }
:root[data-theme='dark'] .theme-btn .i-moon { display: none; }
.write { display: none; align-items: center; gap: 0.45rem; height: 44px; padding: 0 1.05rem; border-radius: var(--r-s); background: var(--gold); color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color var(--dur-2) var(--ease-out), transform var(--dur-1) var(--ease-out); }
.write:hover { background: #dfba84; }
.write:active { transform: translateY(1px); }
.write svg { width: 18px; height: 18px; }
.menu-btn { display: inline-grid; }
@media (min-width: 768px) { .write { display: inline-flex; } }
@media (min-width: 1240px) { .nav { display: block; } .menu-btn { display: none; } .tools { margin-inline-start: 0; } }
@media (min-width: 1240px) and (max-width: 1339px) { .nav__a, .nav__btn { padding-inline: 0.48rem; } .hdr .wrap { gap: var(--s-2); } }
/* cover 344: logo + three tools; search lives in the drawer, the switch becomes a round icon */
@media (max-width: 599px) {
  .hdr .wrap { gap: var(--s-2); }
  .tools { gap: 6px; }
  .tools .ibtn--search { display: none; }
  .theme-btn { width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; background: transparent; }
  .theme-btn__knob { width: 30px; height: 30px; transform: none !important; }
}
@media (max-width: 380px) { .hdr__logo svg { height: 34px; } html[lang='en'] .hdr__logo svg { height: 28px; } }

/* drawer: a sheet from the inline-start edge (RTL: from the right), scrim, focus trapped and returned */
.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); display: none; }
.drawer[data-open='true'] { display: block; }
.drawer__scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity var(--dur-3) var(--ease-out); }
.drawer__panel { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(88vw, 24rem); overflow-y: auto; overscroll-behavior: contain; background: var(--band); color: var(--on-band); padding: var(--s-4) var(--s-5) var(--s-10); border-start-end-radius: var(--r-l); border-end-end-radius: var(--r-l); box-shadow: var(--shadow-float); transform: translateX(100%); transition: transform var(--dur-3) var(--ease-out); }
html[dir='ltr'] .drawer__panel { transform: translateX(-100%); }
.drawer[data-shown='true'] .drawer__scrim { opacity: 1; }
.drawer[data-shown='true'] .drawer__panel { transform: none; }
.drawer__top { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); padding-bottom: var(--s-4); border-bottom: 1px solid var(--band-line); }
.drawer__top img { height: 32px; width: auto; }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer a { display: flex; align-items: center; min-height: 48px; text-decoration: none; font-weight: 600; color: var(--on-band); padding-inline: var(--s-3); border-radius: var(--r-s); }
.drawer a:hover { background: rgb(245 245 243 / 0.08); }
.drawer a[aria-current='page'] { color: var(--gold); box-shadow: inset -2px 0 0 var(--gold); }
html[dir='ltr'] .drawer a[aria-current='page'] { box-shadow: inset 2px 0 0 var(--gold); }
.drawer__grp { border-top: 1px solid var(--band-line); margin-top: var(--s-3); padding-top: var(--s-3); }
.drawer__h { font-size: var(--step--1); color: var(--gold); font-weight: 700; margin: var(--s-1) var(--s-3) var(--s-1); }
.drawer__grp a { font-weight: 500; }
.drawer__tools { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.drawer__tools .ibtn { padding-inline: var(--s-4); gap: 0.4rem; display: inline-flex; align-items: center; }
.drawer__write { margin-top: var(--s-5); justify-content: center; gap: 0.5rem; background: var(--gold); color: var(--ink) !important; border-radius: var(--r-s); font-weight: 700 !important; }
.drawer__write svg { width: 18px; height: 18px; }
.drawer :focus-visible { outline-color: var(--gold); }
body[data-lock='true'] { overflow: hidden; }

/* footer: band, brand block with the mark on its tile, four columns of 48 px rows, the status line */
.ftr { position: relative; overflow: hidden; background: var(--band); color: var(--on-band); }
.ftr::before { content: ''; position: absolute; inset-block: 0; inset-inline-end: 0; width: min(38%, 420px); background: url('/brand/dajin-pattern-mashrabiya-teal-960x960.svg') center / 320px repeat; opacity: 0.14; pointer-events: none; -webkit-mask-image: linear-gradient(to left, #000, transparent); mask-image: linear-gradient(to left, #000, transparent); }
html[dir='rtl'] .ftr::before { -webkit-mask-image: linear-gradient(to right, #000, transparent); mask-image: linear-gradient(to right, #000, transparent); }
.ftr .wrap { position: relative; padding-block: var(--s-16) var(--s-8); }
.ftr__grid { display: grid; gap: var(--s-10) var(--s-8); }
.ftr__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ftr__brand { grid-column: 1 / -1; }
@media (max-width: 599px) { .ftr__grid { column-gap: var(--s-5); } .ftr__col a { font-size: 0.9rem; } }
@media (min-width: 1100px) { .ftr__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } .ftr__brand { grid-column: auto; } }
.ftr__brand a { display: inline-flex; align-items: center; min-height: 44px; border-radius: var(--r-s); }
.ftr__brand img { height: 52px; width: auto; }
html[lang='en'] .ftr__brand img { height: 44px; }
.ftr__line { font-size: var(--step-1); font-weight: 700; margin-top: var(--s-5); color: var(--on-band); }
.ftr__tag { font-size: var(--step-2); font-weight: 700; margin-top: var(--s-1); color: var(--gold); line-height: var(--lh-display-ar); }
.ftr__status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: var(--s-5); font-size: var(--step--1); color: var(--on-band-soft); }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr__contacts { margin-top: var(--s-4); font-size: var(--step--1); }
.ftr__contacts a { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; text-decoration: none; color: var(--on-band); }
.ftr__contacts a:hover { color: var(--gold); }
.ftr__contacts svg { width: 18px; height: 18px; }
.ftr h2 { font-size: var(--step--1); color: var(--gold); font-weight: 700; padding-bottom: var(--s-3); border-bottom: 1px solid var(--band-line); }
.ftr__col ul { margin-top: var(--s-2); }
.ftr__col a { display: flex; align-items: center; min-height: 44px; color: var(--on-band-soft); text-decoration: none; font-size: var(--step--1); transition: color var(--dur-2) var(--ease-out); }
.ftr__col a:hover, .ftr__col a[aria-current='page'] { color: var(--on-band); text-decoration: underline; text-decoration-color: var(--gold); }
.ftr__col2 { margin-top: var(--s-8); }
.ftr__rule { position: relative; height: 1px; background: var(--band-line); margin-top: var(--s-12); }
.ftr__rule::after { content: ''; position: absolute; top: -4px; inset-inline-start: 0; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }
.ftr__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3) var(--s-6); margin-top: var(--s-5); font-size: var(--step--1); color: var(--on-band-soft); }
.ftr__switches { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.ftr .ibtn { min-height: 44px; height: auto; gap: 0.4rem; display: inline-flex; align-items: center; padding-inline: 0.9rem; font-size: var(--step--1); }
.motion-switch[aria-pressed='true'] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.ftr :focus-visible { outline-color: var(--gold); }

/* CTA bar (≤767): a floating gold pill; slides in after the hero has scrolled away */
.sticky-cta { position: fixed; z-index: var(--z-sticky); inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-3) var(--ease-out); }
.sticky-cta a { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 56px; padding: 0 1.2rem; border-radius: var(--r-pill); background: var(--gold); color: var(--ink); font-weight: 700; text-decoration: none; box-shadow: var(--shadow-float); }
.sticky-cta svg { width: 20px; height: 20px; }
.sticky-cta :focus-visible { outline-color: var(--ink); outline-offset: -5px; }
.js .sticky-cta[data-show='false'] { transform: translateY(calc(100% + 24px)); opacity: 0; pointer-events: none; }
.sticky-pad { height: 84px; background: var(--band); }
@media (min-width: 768px) { .sticky-cta, .sticky-pad { display: none; } }
@media (max-width: 767px) { html { scroll-padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); } }

/* dajin.ai v4 · sections R1: rhythm, Hero A (home: brand block + relations ring), Hero B (pages), split, CTA */
.sec { padding-block: var(--sec-y); }
.sec--tight, .sec--answer { padding-block: var(--sec-y-tight); }
.sec--strip { padding-block: var(--sec-y-tight); }
.sec--strip.sec--tight { padding-block: clamp(28px, 2.5vw + 12px, 48px); }
.sec--strip.sec--tight::after { top: calc(clamp(28px, 2.5vw + 12px, 48px) + 0.3rem); }
/* two neighbouring sections on the same ground read as one band: the second loses its top padding seam */
.band--pearl + .band--pearl, .band--sand + .band--sand { border-top: 1px solid var(--line); }
.sec__head { max-width: 50rem; }
.sec__head > * + * { margin-top: var(--s-3); }

/* ── Hero B · page: band, crumbs, gold eyebrow, h1 step-4, lead, the brand pattern outside the text column ── */
.phero { padding-block: var(--s-6) clamp(var(--s-12), 6vw, var(--s-24)); overflow: hidden; isolation: isolate; }
.phero .wrap { position: relative; z-index: 1; }
.phero__art { position: absolute; z-index: 0; inset-block: 0; inset-inline-end: 0; width: min(46%, 560px); pointer-events: none; overflow: hidden; }
.phero__art::before { content: ''; position: absolute; inset: -10%; background: url('/brand/dajin-pattern-mashrabiya-teal-960x960.svg') center / 300px repeat; opacity: 0.2; -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent); mask-image: radial-gradient(closest-side, #000 35%, transparent); }
.phero__art::after { content: ''; position: absolute; top: 50%; inset-inline-end: -70px; width: 360px; height: 360px; margin-top: -180px; background: url('/brand/dajin-n15-mark-mono-reverse-r2.svg') center / contain no-repeat; opacity: 0.06; }
@media (max-width: 899px) { .phero__art { width: 70%; opacity: 0.6; } .phero__art::after { width: 240px; height: 240px; margin-top: -120px; inset-inline-end: -80px; } }
.phero .crumbs { margin-bottom: var(--s-8); }
.phero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: var(--s-3); }
.phero .eyebrow { color: var(--gold); }
.phero .h1 { max-width: 22ch; margin-top: var(--s-2); }
html[lang='en'] .phero .h1 { max-width: 24ch; }
.phero .hero-in > .h1:first-child { margin-top: 0; }
.phero .lead { margin-top: var(--s-5); color: var(--on-band-soft); }
.phero .hero-in > * + * { margin-top: var(--s-4); }
.phero .hero-in > .h1 + .lead { margin-top: var(--s-5); }
.phero .actions { margin-top: var(--s-8); }
.phero .sw { width: 14px; height: 14px; transform: rotate(45deg); border-radius: 3px; display: inline-block; background: var(--q); outline: 2px solid var(--gold); outline-offset: 1px; flex: none; }
.phero .eyebrow:has(.sw)::before { display: none; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; list-style: none; margin: 0; padding: 0; font-size: var(--step--1); color: var(--text-soft); }
.crumbs li + li::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-inline-end: 0.5rem; vertical-align: middle; background: var(--gold); transform: rotate(45deg); opacity: 0.85; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-color: rgb(210 163 102 / 0.6); }
.crumbs a:hover { color: var(--on-band); text-decoration-color: var(--gold); }
.crumbs [aria-current='page'] { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-band); }

/* ── Hero A · home ───────────────────────────────────────────────────────────────────────────────────── */
.hhero { padding-block: clamp(var(--s-10), 6vw, var(--s-24)) clamp(var(--s-12), 7vw, 112px); overflow: hidden; isolation: isolate; }
.hhero::before { content: ''; position: absolute; z-index: 0; top: -160px; inset-inline-end: -140px; width: 560px; height: 560px; background: url('/brand/dajin-n15-mark-mono-reverse-r2.svg') center / contain no-repeat; opacity: 0.03; pointer-events: none; }
.hhero .wrap { position: relative; z-index: 1; }
.hhero__grid { display: grid; gap: var(--s-12); align-items: center; }
@media (min-width: 900px) { .hhero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: var(--s-12); } }
@media (min-width: 1240px) { .hhero__grid { gap: var(--s-16); } }
.hhero__meta { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: var(--s-6); }
.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 0.7rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--text-soft); font-size: 0.8rem; font-weight: 600; }
.brandblock__name { font-size: var(--step-1); font-weight: 600; color: var(--on-band-soft); line-height: var(--lh-display-ar); }
.brandblock__h1 { margin-top: var(--s-2); font-size: var(--step-5); line-height: var(--lh-display-ar); max-width: 12ch; color: var(--on-band); }
html[lang='en'] .brandblock__h1 { line-height: 1.04; max-width: 17ch; letter-spacing: -0.025em; }
.brandblock__tag { margin-top: var(--s-4); font-size: var(--step-2); font-weight: 700; color: var(--gold); line-height: 1.4; }
.brandblock__about { margin-top: var(--s-5); max-width: 34rem; color: var(--on-band-soft); }
.hhero .actions { margin-top: var(--s-8); }
.hhero .act .p-small { color: var(--on-band-soft); }
.hhero__roles { position: relative; min-width: 0; }

/* split: text beside a diagram, video, capture or motif. A column whose only child was a capture slot collapses. */
.split { display: grid; gap: var(--s-10); align-items: center; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-16); } }
.split__col { min-width: 0; }
.split__col > * + * { margin-top: var(--s-4); }
.split__col > :is(.h2, h2) + * { margin-top: var(--s-5); }
.split__col > * + :is(.actions, .list, .diagram, .rel, .hist, .opp) { margin-top: var(--s-6); }
.split__col:empty, .split__col:has(> .capture--pending[hidden]:only-child) { display: none; }
@media (min-width: 1000px) { .split:has(> .split__col:empty), .split:has(> .split__col > .capture--pending[hidden]:only-child) { grid-template-columns: minmax(0, 52rem); } }

/* CTA sections and the 404 */
.sec--cta .cols { align-items: center; }
.sec--cta .h2 { font-size: var(--step-3); }
.nf { min-height: 50vh; display: grid; align-content: center; }

/* dajin.ai v4 · components R1: chips, buttons, lists, cols, the one card family, steps on the thread, FAQ, tables */

/* status chips: word + glyph + colour, never colour alone. sim ◆ · pilot ● · planned ○ · idea ⋯ · note (partner) */
.chip { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 28px; padding: 0 0.72rem; border-radius: var(--r-pill); font-size: 0.8rem; font-weight: 700; line-height: 1.2; white-space: nowrap; vertical-align: middle; border: 1px solid transparent; }
html[lang='en'] .chip { font-size: 0.78rem; }
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: currentColor; flex: none; }
.chip[data-s='sim'] { color: var(--st-sim); background: var(--st-sim-bg); }
.chip[data-s='sim']::before { transform: rotate(45deg); width: 7px; height: 7px; }
.chip[data-s='pilot'] { color: var(--st-pilot); background: var(--st-pilot-bg); }
.chip[data-s='pilot']::before { border-radius: 50%; }
.chip[data-s='planned'] { color: var(--st-planned); background: var(--st-planned-bg); }
.chip[data-s='planned']::before { background: none; border: 2px solid currentColor; border-radius: 50%; width: 9px; height: 9px; }
.chip[data-s='idea'] { color: var(--st-planned); background: transparent; border: 1px dashed currentColor; }
.chip[data-s='idea']::before { background: none; border: 2px dotted currentColor; border-radius: 50%; width: 9px; height: 9px; }
.chip[data-s='note'] { color: var(--st-note); background: var(--st-note-bg); }
.chip[data-s='note']::before { width: 10px; height: 2px; border-radius: 1px; }
/* on a teal band the chips sit on cream-tinted pills so every pair keeps its contrast */
.band--teal .chip[data-s='planned'], .band--teal .chip[data-s='idea'] { color: var(--on-band); background: rgb(245 245 243 / 0.1); border-color: rgb(245 245 243 / 0.3); }
.band--teal .chip[data-s='idea'] { border-style: dashed; }
.ftr .chip[data-s='sim'] { color: #61370d; background: #fdecd1; }
:root[data-theme='dark'] .ftr .chip[data-s='sim'] { color: var(--st-sim); background: var(--st-sim-bg); }

/* buttons: one hierarchy, verb + object labels. primary = gold, secondary = outline, teal = solid brand */
.actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-3) var(--s-4); }
.act { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0 1.3rem; border-radius: var(--r-s); font-weight: 700; text-decoration: none; border: 1.5px solid transparent; white-space: nowrap; transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--gold); color: var(--ink); }
.btn--primary:hover { background: #dfba84; box-shadow: 0 8px 20px -12px rgb(122 85 32 / 0.6); }
.btn--secondary { color: var(--accent); border-color: currentColor; background: transparent; }
.btn--secondary:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.band--teal .btn--secondary { color: var(--on-band); border-color: rgb(245 245 243 / 0.5); }
.band--teal .btn--secondary:hover { border-color: var(--gold); background: rgb(245 245 243 / 0.08); }
.btn svg { width: 19px; height: 19px; flex-shrink: 0; transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .i-arrow { transform: translateX(3px); }
html[dir='rtl'] .i-arrow { transform: scaleX(-1); }
html[dir='rtl'] .btn:hover .i-arrow, html[dir='rtl'] .tlink:hover .i-arrow, html[dir='rtl'] .card--door:hover .i-arrow { transform: scaleX(-1) translateX(3px); }
.btn [dir='ltr'] { font-weight: 500; opacity: 0.85; margin-inline-start: 0.2rem; }
@media (max-width: 380px) { .btn { white-space: normal; text-align: center; } }
.tlink { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; font-weight: 700; color: var(--accent); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 0.32em; }
.tlink svg { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease-out); }
.tlink:hover .i-arrow { transform: translateX(3px); }
.prose a, .p a, .lead a, li a, dd a, td a, summary a, .p-small a, .p-strong a { color: var(--accent); text-decoration-color: var(--gold); }
.band--teal :is(.prose, .p, .lead, li, dd, .p-small, .p-strong) a { color: var(--on-band); }

/* lists */
.list { padding-inline-start: 1.25rem; max-width: var(--measure); }
.list li + li { margin-top: var(--s-2); }
.list li::marker { color: var(--gold-ink); }
.list--checks { list-style: none; padding: 0; }
.list--checks li { position: relative; padding-inline-start: 2rem; }
.list--checks li::before { content: ''; position: absolute; inset-inline-start: 0; top: 0.42em; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f3' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 0.72rem no-repeat; }
:root[data-theme='dark'] .list--checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1a20' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.band--teal .list--checks li::before { background-color: var(--gold); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101f38' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.list--pills, .list--links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); max-width: none; }
.list--pills li + li, .list--links li + li { margin-top: 0; }
.list--pills a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.05rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; text-decoration: none; color: inherit; transition: border-color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out); }
.band--sand .list--pills a { background: var(--bg); }
.band--teal .list--pills a { background: transparent; }
.list--pills a:hover { border-color: var(--gold); }
.list--pills a[aria-current='page'] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.list--links { flex-direction: column; gap: 2px; }
.list--links a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; }

/* tags (role selectors on the live site, rendered static) */
.tags__label { font-size: var(--step--1); font-weight: 700; color: var(--text-soft); margin-bottom: var(--s-2); }
.tags ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { display: inline-flex; align-items: center; min-height: 32px; padding: 0 0.8rem; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: var(--step--1); font-weight: 600; }
.band--sand .tags li { background: var(--bg); }
.band--teal .tags li { background: rgb(245 245 243 / 0.08); }

/* ruled columns (did / learned / building, boundaries, contact) */
.cols { display: grid; gap: var(--s-8) var(--s-10); }
@media (min-width: 900px) {
  .cols--2 { grid-template-columns: 1fr 1fr; }
  .cols--3 { grid-template-columns: repeat(3, 1fr); }
  .cols--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) { .cols--4 { grid-template-columns: repeat(4, 1fr); } }
.cols > .col { min-width: 0; }
.cols--3 > .col { padding-top: var(--s-5); border-top: 1px solid var(--line-strong); }
.cols > .col > * + * { margin-top: var(--s-3); }
.cols > .col > * + :is(h2, h3, .h2, .h3) { margin-top: var(--s-8); }
.cols > .col > * + :is(.cards, .list, .actions) { margin-top: var(--s-5); }
.cols > .col > :is(h3, .h3):first-child { font-size: var(--step-2); }

/* ── the card family: 14 px radius, 1 px line, resting shadow; hover lifts 2 px (pointer only); never a side stripe ── */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); }
.cards--grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.cards--grid > li { display: flex; flex-direction: column; min-width: 0; }
.cards--grid > li > .card { flex: 1; }
.card { position: relative; display: flex; flex-direction: column; padding: var(--s-5) var(--s-5) var(--s-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-1); transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.band--teal .card { box-shadow: none; }
.card > * + * { margin-top: var(--s-2); }
.card > .chip { align-self: flex-start; }
.card > .chip + * { margin-top: var(--s-3); }
.card :is(h3, .h3) { font-size: var(--step-1); }
.card .p, .card .p-small { color: var(--text-soft); }
.card .p { font-size: var(--step--1); line-height: 1.7; }
html[lang='en'] .card .p { line-height: 1.55; }
.card .p-big { font-size: var(--step-1); }
.card .actions { margin-top: auto; padding-top: var(--s-4); }
/* door cards: the whole card is the link */
.card--door { text-decoration: none; color: inherit; height: 100%; }
.card--door::before { content: ''; position: absolute; top: -1px; inset-inline: var(--s-5); height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); transform: scaleX(0.18); transform-origin: var(--origin, right); transition: transform var(--dur-3) var(--ease-out); }
html[dir='ltr'] .card--door::before { --origin: left; }
.card--door:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--r-m); }
.card--door .card__go { margin-top: auto; padding-top: var(--s-4); display: inline-flex; gap: 0.4rem; align-items: center; font-weight: 700; color: var(--accent); }
.card--door .card__go svg { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease-out); }
@media (hover: hover) {
  .card--door:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
  .card--door:hover::before { transform: scaleX(1); }
  .card--door:hover .card__go .i-arrow { transform: translateX(3px); }
  html[dir='rtl'] .card--door:hover .card__go .i-arrow { transform: scaleX(-1) translateX(3px); }
}
/* logo tiles: white in both themes, real marks only */
.cards--stack { grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: var(--s-3); }
.logo-tile { display: grid; place-items: center; min-height: 88px; height: 100%; padding: var(--s-3); border-radius: var(--r-m); background: var(--tile); border: 1px solid var(--line); color: var(--ink); text-align: center; font-weight: 700; font-size: var(--step--1); text-decoration: none; transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.logo-tile img { max-height: 3.2rem; width: auto; object-fit: contain; }
.logo-tile > * + * { margin-top: var(--s-1); }
@media (hover: hover) { a.logo-tile:hover { border-color: var(--gold); transform: translateY(-2px); } }

/* steps on the thread: numbered because the content is a sequence; the counter sits on a gold line */
.cards--steps { counter-reset: step; gap: 0; max-width: 52rem; }
.cards--steps > li { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s-4); padding-bottom: var(--s-6); }
.cards--steps > li::before { counter-increment: step; content: counter(step); position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--band); color: var(--on-band); font-weight: 700; box-shadow: 0 0 0 5px var(--bg); }
.band--sand .cards--steps > li::before { box-shadow: 0 0 0 5px var(--bg-alt); }
.band--teal .cards--steps > li::before { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 5px var(--band); }
.cards--steps > li::after { content: ''; position: absolute; inset-inline-start: 21px; top: 44px; bottom: 0; width: 2px; background: var(--thread); transform-origin: top; transition: transform var(--dur-4) var(--ease-draw); transition-delay: calc(var(--i, 0) * var(--stagger) + 200ms); }
.cards--steps > li:last-child::after { display: none; }
.js .sec[data-seen='false'] .cards--steps > li::after { transform: scaleY(0); }
.cards--steps .card { border: 0; box-shadow: none; background: none; padding: 8px 0 0; }
.cards--steps .card:hover { transform: none; }
@media (min-width: 1000px) {
  .cards--steps:has(> li:nth-child(4)) { max-width: none; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0 var(--s-4); }
  .cards--steps:has(> li:nth-child(4)) > li { grid-template-columns: 1fr; gap: var(--s-3); }
  .cards--steps:has(> li:nth-child(4)) > li::after { inset-inline-start: 44px; inset-inline-end: calc(-1 * var(--s-4)); top: 21px; bottom: auto; width: auto; height: 2px; transform-origin: right; }
  html[dir='ltr'] .cards--steps:has(> li:nth-child(4)) > li::after { transform-origin: left; }
  .js .sec[data-seen='false'] .cards--steps:has(> li:nth-child(4)) > li::after { transform: scaleX(0); }
  .cards--steps:has(> li:nth-child(4)) .card { padding-top: 0; }
}

/* rail: scroll-snaps inside its own box, never the page */
.cards--rail { grid-auto-flow: column; grid-auto-columns: minmax(220px, 248px); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px var(--s-4); overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.cards--rail > li { scroll-snap-align: start; }
.cards--rail:focus-visible { outline-offset: 2px; }
/* Grok R1 #30 (T14): the rail's scroll region + focus stop is the wrapper; the <ul> keeps list semantics */
.cards-rail-wrap { overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; border-radius: var(--r-m); }
.cards-rail-wrap > .cards--rail { overflow: visible; scroll-snap-type: none; width: max-content; min-width: 100%; }
.cards-rail-wrap:focus-visible { outline-offset: 2px; }
.flow > * + .cards-rail-wrap { margin-top: var(--s-10); }
.cols > .col > * + .cards-rail-wrap { margin-top: var(--s-5); }

/* the live "illustrative" phone: a Fold cover frame */
.figure figcaption { margin-top: var(--s-3); font-size: var(--step--1); color: var(--text-soft); }
.phone { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.phone__frame { width: 228px; border-radius: var(--r-l); background: var(--ink); padding: var(--device-bezel); box-shadow: var(--shadow-2), inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.phone__screen { aspect-ratio: 9 / 17; border-radius: 14px; overflow: hidden; background: var(--pearl); color: var(--ink); display: flex; flex-direction: column; }
.phone__bar { background: var(--deep-teal); color: var(--pearl); padding: 1.25rem 0.9rem 0.75rem; }
.phone__bar small { display: block; opacity: 0.85; font-size: 0.72rem; font-weight: 700; color: var(--champagne-gold); }
.phone__bar strong { font-size: 0.92rem; line-height: 1.4; }
.phone__steps { list-style: none; margin: 0; padding: 0.7rem; display: grid; gap: 0.45rem; }
.phone__steps li { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.5rem 0.55rem; border-radius: 10px; border: 1px solid rgb(16 31 56 / 0.1); background: #fff; font-size: 0.8rem; font-weight: 600; line-height: 1.45; }
.phone__steps b { display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--deep-teal); color: var(--pearl); font-size: 0.68rem; flex-shrink: 0; }
.phone > .chip { order: -1; }
.phone figcaption { text-align: center; max-width: 20rem; }

/* FAQ: ruled rows, 56 px summary, gold chevron */
.faq { border-top: 1px solid var(--line-strong); max-width: 54rem; }
.faq:last-of-type { border-bottom: 1px solid var(--line-strong); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 56px; padding-block: var(--s-3); cursor: pointer; font-weight: 700; list-style: none; transition: color var(--dur-2) var(--ease-out); }
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; width: 0.62rem; height: 0.62rem; border-inline-end: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg) translate(-2px, -2px); flex-shrink: 0; transition: transform var(--dur-2) var(--ease-out); margin-inline-end: 0.35rem; }
.faq[open] summary::after { transform: rotate(-135deg); }
.faq__body { padding-bottom: var(--s-5); color: var(--text-soft); max-width: var(--measure); }
.faq__body > * + * { margin-top: var(--s-3); }
.cols--4 > .col > .faq:first-of-type, .col > .faq:first-child { border-top: 1px solid var(--line-strong); }

/* definitions + tables: ruled, sand header */
.defs { display: grid; gap: 0; }
.defs > div { display: grid; gap: var(--s-1) var(--s-8); padding-block: var(--s-4); border-top: 1px solid var(--line); }
.defs > div:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .defs > div { grid-template-columns: 14rem 1fr; } }
.defs dt { font-weight: 700; }
.defs dd { margin: 0; color: var(--text-soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: var(--step--1); }
.table-wrap th, .table-wrap td { text-align: start; padding: 0.75rem 0.95rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap th { background: var(--bg-alt); font-weight: 700; }

/* on-device search */
.search { max-width: 44rem; min-height: 70vh; }
.search label { display: block; font-weight: 700; margin-bottom: var(--s-2); }
.search input { width: 100%; min-height: 56px; padding: 0 1.2rem; border-radius: var(--r-s); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; transition: border-color var(--dur-2) var(--ease-out); }
.search input:hover { border-color: var(--accent-ui); }
.search input:focus { outline: none; }
.search input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.search__results { list-style: none; margin: var(--s-6) 0 0; padding: 0; }
.search__results li { border-top: 1px solid var(--line); padding-block: var(--s-4); }
.search__results a { font-weight: 700; color: var(--accent); }
.search__results p { font-size: var(--step--1); color: var(--text-soft); }
.search__status { margin-top: var(--s-4); font-size: var(--step--1); color: var(--text-soft); }

/* GEO answer: quotable, dated; a pull paragraph that hangs off the section's node on the thread */
.answer { max-width: 54rem; }
.answer__q { font-size: var(--step-2); display: flex; align-items: baseline; gap: var(--s-3); }
.answer__text { margin-top: var(--s-3); font-size: var(--step-1); line-height: 1.75; }
html[lang='en'] .answer__text { line-height: 1.6; }
.answer__date { margin-top: var(--s-4); display: inline-flex; align-items: center; gap: 0.5rem; min-height: 28px; padding: 0 0.75rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font-size: var(--step--1); color: var(--text-soft); }

/* door glyph: a 44 px tile in the accent family */
.card__g { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent-ui) 12%, transparent); transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
.card__g svg { width: 22px; height: 22px; stroke-width: 1.8; }
.card--door > .card__g + * { margin-top: var(--s-4); }
@media (hover: hover) { .card--door:hover .card__g { background: var(--band); color: var(--gold); } }
/* role doors: five fit one row at 1280 */
.cards--grid:has(> li > .card--door) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.25rem), 1fr)); }

/* dajin.ai v4 · enhancements R1: diagrams (static default complete, line-draw once), video stage, device frames,
   principles strip, audit-mode markers. */

/* ── diagrams: inline SVG in brand strokes, themed through tokens, with a text twin under each ── */
.diagram { margin-inline: auto; max-width: 40rem; width: 100%; }
.diagram--tall { max-width: 26rem; }
.dg { --halo: var(--bg); width: 100%; height: auto; display: block; overflow: visible; font-family: inherit; }
.band--sand .dg { --halo: var(--bg-alt); }
.dg-box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.band--sand .dg-box { fill: var(--bg); }
.dg-box--alt { fill: var(--bg-alt); }
.band--sand .dg-box--alt { fill: var(--surface); }
.dg-bar { fill: var(--gold); }
.dg-n--gold .dg-box { stroke: var(--gold); stroke-width: 2.5; }
.dg-t { fill: var(--text); }
.dg-s, .dg-cs { fill: var(--text-soft); }
.dg-h { fill: var(--gold-ink); }
.dg-core { fill: var(--deep-teal); stroke: var(--gold); stroke-width: 3; }
:root[data-theme='dark'] .dg-core { fill: #05282f; }
.dg-ct { fill: #f5f5f3; }
.dg-core + .dg-ct + .dg-cs { fill: #c9d6d7; }
.dg-ring { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 3 9; stroke-linecap: round; opacity: 0.9; }
.dg-l { stroke: var(--gold); stroke-width: 2; stroke-linecap: round; fill: none; }
.dg-l--dash { stroke-dasharray: 6 7; }
.dg-spine { stroke: var(--thread); stroke-width: 3; stroke-linecap: round; }
.dg-pill { fill: var(--gold); }
.dg-pt { fill: var(--ink); }
.dg-dot { fill: var(--gold); }
.dg-step { fill: var(--surface); stroke: var(--gold); stroke-width: 2.5; }
.band--sand .dg-step { fill: var(--bg); }
.dg-num { fill: var(--gold-ink); }
.dg-num--gold { fill: var(--ink); }
/* halo hotfix r1 (13 Nov): no text halos. Removing them changes <=6 px on any diagram (no label crosses a line), and
   forced-dark browsers (Samsung Internet) lighten the text but keep the light halo, smearing it into a white blob */
.dg-s, .dg-h, .dg-t, .dg-why { stroke: none; }
.diagram figcaption { text-align: center; margin-top: var(--s-3); font-size: var(--step--1); color: var(--text-soft); }

/* text twin: always available, same chevron as the FAQ */
.twin { margin-top: var(--s-4); font-size: var(--step--1); }
.twin summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 0.55rem; color: var(--accent); font-weight: 700; list-style: none; }
.twin summary::-webkit-details-marker { display: none; }
.twin summary::before { content: ''; width: 0.5rem; height: 0.5rem; border-inline-end: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform var(--dur-2) var(--ease-out); }
.twin[open] summary::before { transform: rotate(-135deg); }
.twin > :is(ul, ol) { margin-top: var(--s-2); }
.diagram > .twin { text-align: start; }

/* ── video (D4): poster + gold play button over the native player; nothing loads before the tap ── */
.vid { max-width: 64rem; margin-inline: auto; }
.vid__stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-l); overflow: hidden; background: var(--deep-teal); box-shadow: var(--shadow-2); border: 1px solid var(--line); isolation: isolate; }
.vid__stage::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(210 163 102 / 0.35); pointer-events: none; z-index: 3; }
.vid__stage video, .vid__poster, .vid__poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid__poster img { transition: transform var(--dur-5) var(--ease-out); }
.vid__btn { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; width: 100%; border: 0; background: linear-gradient(to top, rgb(0 57 67 / 0.5), transparent 55%); cursor: pointer; color: var(--ink); }
.vid__play { position: relative; display: grid; place-items: center; width: clamp(64px, 11vw, 92px); aspect-ratio: 1; border-radius: 50%; background: var(--champagne-gold); box-shadow: 0 0 0 10px rgb(210 163 102 / 0.28), 0 18px 40px -12px rgb(0 0 0 / 0.5); transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.vid__play svg { width: 40%; height: 40%; fill: currentColor; stroke: none; transform: translateX(7%); }
@media (hover: hover) { .vid__btn:hover .vid__play { transform: scale(1.06); box-shadow: 0 0 0 14px rgb(210 163 102 / 0.32), 0 22px 44px -12px rgb(0 0 0 / 0.55); } .vid__btn:hover + * img, .vid__stage:hover .vid__poster img { transform: scale(1.015); } }
.vid__btn:focus-visible { outline: 3px solid var(--champagne-gold); outline-offset: -8px; border-radius: var(--r-l); }
.vid__stage video:focus-visible { outline: 3px solid var(--gold); outline-offset: -4px; }
.vid[data-state='playing'] :is(.vid__btn, .vid__poster) { opacity: 0; visibility: hidden; transition: opacity var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-2); }
.vid figcaption { margin-top: var(--s-4); font-size: var(--step--1); color: var(--text-soft); max-width: 50rem; line-height: 1.8; }
.vid figcaption strong { color: var(--text); font-size: var(--step-0); margin-inline: 0.15rem 0.35rem; }
.vid figcaption .chip { margin-inline-end: 0.35rem; }
.vid__meta { display: inline-flex; align-items: center; min-height: 26px; margin-inline-start: 0.2rem; padding: 0 0.6rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font-size: 0.78rem; font-weight: 700; }
.vid__note { display: inline-block; margin-block-start: 0.35rem; font-size: 0.85rem; color: inherit; font-style: italic; }
.vid figcaption a { color: var(--accent); text-decoration-color: var(--gold); }
.band--teal .vid figcaption strong { color: var(--on-band); }
.vid > .twin { max-width: 50rem; }
@media (max-width: 480px) { .vid__stage { border-radius: var(--r-m); } }

/* ── device frame: Fold 6 cover, 10 px ink bezel, radius 22; light and dark captures swap with the theme ── */
.capture { max-width: 20rem; margin-inline: auto; }
.capture--wide { max-width: 44rem; }
/* S7: a restrained «المشربية» lattice behind the frame only, faded at the edges; never under text */
.capture__stage { position: relative; isolation: isolate; padding: var(--s-5) var(--s-6); }
.capture__stage::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; border-radius: var(--r-l);
  background: var(--mash-line) center / 150px repeat; opacity: 0.32;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent); mask-image: radial-gradient(closest-side, #000 55%, transparent); }
.capture__img { display: block; width: 100%; height: auto; }
.capture > .chip { margin-bottom: var(--s-3); }
.capture__frame { border-radius: var(--r-l); overflow: hidden; border: var(--device-bezel) solid var(--ink); background: var(--ink); box-shadow: var(--shadow-2); }
.capture__img--dark { display: none; }
:root[data-theme='dark'] .capture__img--dark { display: block; }
:root[data-theme='dark'] .capture__frame:has(.capture__img--dark) .capture__img--light { display: none; }
.capture figcaption { margin-top: var(--s-3); font-size: var(--step--1); color: var(--text-soft); }
.capture__slot { display: grid; place-items: center; align-content: center; gap: var(--s-2); aspect-ratio: 9 / 16; max-width: 16rem; padding: var(--s-4); border: 2px dashed var(--gold); border-radius: var(--r-l); text-align: center; background: color-mix(in srgb, var(--gold) 6%, transparent); }
.capture__slot span { font-weight: 700; font-size: var(--step-1); }
/* S7: the real-screen rail: a sideways row on phones, a wrapped grid from 900 px */
.screens-wrap { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; margin-inline: calc(var(--s-4) * -1); padding-inline: var(--s-4); }
.screens { list-style: none; margin: 0; padding: 0 0 var(--s-3); display: grid; grid-auto-flow: column; grid-auto-columns: min(15rem, 72vw); gap: var(--s-6); }
.screens > li { scroll-snap-align: center; }
.screens .capture { max-width: none; }
.screens .capture__stage { padding: var(--s-3) var(--s-4); }
@media (min-width: 900px) { .screens-wrap { overflow: visible; margin-inline: 0; padding-inline: 0; } .screens { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(13rem, 15rem)); justify-content: center; } }
.captures { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.vid-pending { border: 2px dashed var(--gold); border-radius: var(--r-l); padding: var(--s-8); text-align: center; font-weight: 700; }

/* ── three principles: three ruled columns, gold top rule, a diamond numeral on the rule ── */
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-8) var(--s-10); }
@media (min-width: 800px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principles li { position: relative; padding-top: var(--s-6); border-top: 2px solid var(--gold); }
.principles__n { position: absolute; top: -15px; inset-inline-start: 0; display: grid; place-items: center; width: 28px; height: 28px; color: var(--gold-ink); font-weight: 700; font-size: 0.8rem; isolation: isolate; }
.principles__n::before { content: ''; position: absolute; inset: 3px; z-index: -1; transform: rotate(45deg); background: var(--bg); border: 2px solid var(--gold); border-radius: 3px; }
.band--sand .principles__n::before { background: var(--bg-alt); }
.band--teal .principles__n::before { background: var(--band); }
.principles h3 { font-size: var(--step-2); }
.principles p { margin-top: var(--s-2); color: var(--text-soft); max-width: 28rem; }

/* founder decisions + capture slots: shown only in audit mode (?audit=1) */
:root[data-audit='true'] [data-decision] { outline: 2px dashed #c0392b; outline-offset: 4px; position: relative; }
:root[data-audit='true'] [data-decision]::after { content: attr(data-decision); position: absolute; inset-block-start: -0.7rem; inset-inline-end: -0.4rem; z-index: 5; padding: 0 0.4rem; border-radius: 4px; background: #c0392b; color: #fff; font: 700 0.7rem/1.4 var(--font-en); }
:root[data-audit='true'] [data-origin='v4'] { box-shadow: inset 4px 0 0 #2e86c1; }

/* phones: node diagrams read as HTML (labels ≥15 px); the SVG takes over from 600 px */
.dg-alt { display: none; }
@media (max-width: 599px) {
  .diagram:has(> .dg-alt) > svg.dg { display: none; }
  .dg-alt { display: block; position: relative; }
  .dg-alt__core { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0 var(--s-4); margin-bottom: var(--s-3); border-radius: var(--r-pill); background: var(--band); color: var(--on-band); font-weight: 700; text-align: center; box-shadow: inset 0 0 0 2px var(--gold); }
  .dg-alt ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
  .dg-alt li { position: relative; padding: var(--s-3); padding-top: calc(var(--s-3) + 3px); border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
  .band--sand .dg-alt li { background: var(--bg); }
  .dg-alt li::before { content: ''; position: absolute; top: -1px; inset-inline: var(--s-3); height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
  .dg-alt li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dg-alt b { display: block; font-size: 0.95rem; line-height: 1.4; }
  .dg-alt span { display: block; margin-top: 2px; color: var(--text-soft); font-size: var(--step--1); line-height: 1.5; }
  .diagram[data-diagram='both-sides'] .dg-alt ul { grid-template-columns: 1fr; }
}

/* AUDIT-ALL-HATS-R1 fixes that are not already part of a component (A-07, A-13..A-15, A-51..A-56 live in their
   components: chrome, components, enhance). */
/* A-64: diagrams and motifs print and export complete; chrome stays off paper */
@media print {
  .dg-n, .ring__n, .hist li, [data-reveal], [data-reveal-group] > * { opacity: 1 !important; transform: none !important; }
  :is(.dg-l, .dg-spine, .ring__l, .hist__line) { stroke-dashoffset: 0 !important; transform: none !important; }
  .hdr, .drawer, .sticky-cta, .sticky-pad, .vid__btn, main::before, .sec::after { display: none !important; }
}
/* D2: the WG lockup is navy and red; give it a white tile in both themes */
img[src*='wg-venture-studio'] { background: #fff; padding: 0.75rem 1rem; border-radius: var(--r-m); max-width: 100%; height: auto; border: 1px solid var(--line); }
/* A-53: the CTA bar reads right in both directions */
.sticky-cta a span[aria-hidden] { opacity: 0.6; }
.sticky-cta__mail { font-weight: 500; opacity: 0.9; unicode-bidi: isolate; }
html[dir='rtl'] .btn [dir='ltr'] { margin-right: 0.45rem; }

/* dajin.ai v4 · the five motifs R1: relations ring (home hero), fact seal, opportunity card + «هدفي» goal card,
   one-history thread, safe strip, and the four engines with one quarter lit. */
:root { --q-operate: var(--deep-teal); --q-grow: var(--connected-teal); --q-trade: var(--champagne-gold); --q-enable: #a9cbc8; }

/* ── relations ring «دائرة وصل» (Hero A). SVG ≥600, a 2-column node list below ── */
.ring { position: relative; margin-inline: auto; width: min(100%, 580px); }
.ring__svg { display: block; width: 100%; height: auto; overflow: visible; }
.ring__arc { fill: none; stroke: var(--on-band); stroke-width: 1; stroke-dasharray: 2 7; stroke-linecap: round; opacity: 0.32; }
.ring__arc--o { opacity: 0.22; }
.ring__l { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; opacity: 0.9; }
.ring__l--dash { stroke-dasharray: 0.025 0.035; opacity: 0.6; }
.ring__seal { fill: var(--gold); }
.ring__core { fill: var(--tile); stroke: var(--gold); stroke-width: 2.5; }
.ring__n { color: var(--on-band); text-decoration: none; outline: none; }
.ring__c { fill: var(--band); stroke: var(--gold); stroke-width: 1.6; transition: fill var(--dur-2) var(--ease-out), stroke-width var(--dur-2) var(--ease-out); }
.ring__g { color: var(--on-band); }
.ring__t { fill: var(--on-band); }
.ring__s { fill: var(--on-band-soft); }
.ring__sg { fill: var(--gold); }
.ring__n:hover .ring__c, .ring__n:focus-visible .ring__c { fill: var(--gold); }
.ring__n:hover .ring__g, .ring__n:focus-visible .ring__g { color: var(--ink); }
.ring__n:hover .ring__t, .ring__n:focus-visible .ring__t { text-decoration: underline; text-decoration-color: var(--gold); }
.ring__n:focus-visible .ring__c { stroke: var(--on-band); stroke-width: 3; }
.ring__cap { margin-top: var(--s-3); text-align: center; font-size: var(--step--1); color: var(--on-band-soft); }
.ring__list { display: none; }
@media (max-width: 599px) {
  .ring__svg { display: none; }
  .ring__cap { text-align: start; margin-top: var(--s-4); }
  .ring__list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
  .ring__list li { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--s-2); row-gap: 4px; align-items: center; padding: var(--s-2) var(--s-3); border: 1px solid var(--band-line); border-radius: var(--r-m); min-height: 64px; background: rgb(245 245 243 / 0.04); }
  .ring__lg { grid-row: 1 / span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--on-band); }
  .ring__lg svg { width: 17px; height: 17px; }
  .ring__list a { font-weight: 700; font-size: 0.92rem; line-height: 1.3; text-decoration: none; color: var(--on-band); }
  .ring__list a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
  .ring__list li:has(a:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
  .ring__list a:focus-visible { outline: none; }
  .ring__list .chip { justify-self: start; min-height: 22px; font-size: 0.72rem; padding: 0 0.5rem; }
}

/* ── 1 · the fact seal: rows («مين وإمتى») and the seal diagram ── */
.rel { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); max-width: 36rem; }
.rel li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s-3); align-items: start; padding: var(--s-3); border-radius: var(--r-m); border: 1px solid transparent; transition: border-color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out); }
.rel li.is-on { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-1); }
.rel__seal { width: 36px; height: 36px; display: grid; place-items: center; }
.rel__seal i { width: 14px; height: 14px; background: var(--q, var(--gold)); outline: 2px solid var(--gold); outline-offset: 2px; transform: rotate(45deg); border-radius: 2px; display: block; opacity: 0.45; }
.rel li.is-on .rel__seal i { opacity: 1; }
.rel b { display: block; font-size: var(--step-0); }
.rel a { text-decoration: none; color: var(--text); display: inline-flex; min-height: 32px; align-items: center; }
.rel a:hover b { text-decoration: underline; text-decoration-color: var(--gold); }
.rel li > div > span { display: block; color: var(--text-soft); font-size: var(--step--1); }
.rel em { font-style: normal; font-weight: 700; color: var(--gold-ink); }
.diagram--seal { max-width: 36rem; }
.diagram--seal > .chip { margin-bottom: var(--s-4); }
.dg-node circle { fill: var(--surface); stroke: var(--accent-ui); stroke-width: 1.8; }
.band--sand .dg-node circle { fill: var(--bg); }
.dg-node .g { color: var(--accent); }
.dg-thread { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.dg-seal { fill: var(--gold); stroke: var(--halo, var(--bg)); stroke-width: 3; }
.dg-why { fill: var(--accent); }
.seal__facts { display: none; list-style: none; margin: 0; padding: 0; }
@media (max-width: 599px) {
  .diagram--seal svg { display: none; }
  .seal__facts { display: grid; gap: var(--s-2); position: relative; padding-inline-start: var(--s-6); }
  .seal__facts::before { content: ''; position: absolute; inset-block: 10px; inset-inline-start: 6px; width: 2px; background: var(--gold); }
  .seal__facts li { position: relative; }
  .seal__facts li::before { content: ''; position: absolute; inset-inline-start: calc(-1 * var(--s-6) + 2px); top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent-ui); }
  .seal__facts li.seal__on::before { border-radius: 2px; transform: rotate(45deg); background: var(--gold); border-color: var(--gold); }
  .seal__facts b { display: block; }
  .seal__facts span { display: block; color: var(--text-soft); font-size: var(--step--1); }
  .diagram--seal figcaption { text-align: start; }
}

/* ── 2 · the opportunity card: title, why-line, until-date, source; an expired one greys and strikes ── */
.opp { max-width: 32rem; }
.opp > .chip { margin-bottom: var(--s-4); }
.opp__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.card--op { padding: var(--s-5); gap: 0; }
.card--op > * + * { margin-top: var(--s-3); }
.card--op__t { display: flex; align-items: center; gap: var(--s-2); font-weight: 700; font-size: var(--step-1); }
.card--op__t svg { width: 22px; height: 22px; flex: none; color: var(--accent-ui); }
.card--op .why { padding-top: var(--s-3); border-top: 1px dashed var(--line-strong); line-height: 1.7; }
.card--op .why b { color: var(--gold-ink); }
.card--op__meta { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--step--1); color: var(--text-soft); }
.card--op__meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.card--op__meta svg { width: 15px; height: 15px; }
.card--expired { box-shadow: none; background: transparent; border-style: dashed; border-color: var(--line-strong); }
.card--expired .card--op__t svg { opacity: 0.6; }
.card--expired .card--op__t span { text-decoration: line-through; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

/* «هدفي»: the goal line folds into a steps card */
.goal { max-width: 30rem; margin-inline: auto; }
.goal > .chip { margin-bottom: var(--s-4); }
.goal__card { position: relative; padding: var(--s-5); border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.band--sand .goal__card { background: var(--surface); }
.goal__line { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s-3); align-items: center; padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.goal__line > svg { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--band); color: var(--gold); }
.goal__line b { display: block; font-size: var(--step-1); line-height: 1.4; }
.goal__line small { display: block; color: var(--text-soft); font-size: var(--step--1); margin-top: 2px; }
.goal__steps { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-3); position: relative; }
.goal__steps::before { content: ''; position: absolute; inset-block: 14px; inset-inline-start: 13px; width: 2px; background: var(--thread); }
.goal__steps li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s-3); align-items: start; }
.goal__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--gold); background: var(--surface); color: var(--ink); }
.goal__dot svg { width: 15px; height: 15px; stroke-width: 3; }
.goal__steps li[data-st='done'] .goal__dot { background: var(--gold); }
.goal__steps li[data-st='now'] .goal__dot::after { content: ''; width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); border-radius: 2px; }
.goal__steps li[data-st='next'] .goal__dot { border-style: dashed; }
.goal__steps li > div > b { display: block; line-height: 1.45; }
.goal__steps li > div > span { display: block; color: var(--text-soft); font-size: var(--step--1); }
.goal__foot { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--step--1); font-weight: 700; color: var(--gold-ink); }

/* ── 3 · one deal, one record: the history thread ── */
.hist-fig > .chip { margin-bottom: var(--s-4); }
.hist { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); }
.hist::before { content: ''; position: absolute; inset-block: 22px; inset-inline-start: 21px; width: 2px; background: var(--gold); border-radius: 2px; transform-origin: top; transition: transform var(--dur-5) var(--ease-draw) 120ms; }
.hist li { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s-3); align-items: start; }
.hist__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--band); color: var(--on-band); box-shadow: 0 0 0 5px var(--bg); }
.band--sand .hist__dot { box-shadow: 0 0 0 5px var(--bg-alt); }
.hist__dot svg { width: 19px; height: 19px; }
.hist__seal .hist__dot { background: var(--gold); color: var(--ink); }
.hist__seal .hist__dot::after { content: ''; position: absolute; top: -3px; inset-inline-end: -3px; width: 12px; height: 12px; background: var(--gold); border: 2px solid var(--bg); transform: rotate(45deg); border-radius: 2px; }
.band--sand .hist__seal .hist__dot::after { border-color: var(--bg-alt); }
.hist li > div > b { display: block; padding-top: 8px; line-height: 1.45; }
.hist li > div > span { display: block; color: var(--text-soft); font-size: var(--step--1); margin-top: 2px; }
.hist__foot { margin-top: var(--s-6); color: var(--text-soft); font-size: var(--step--1); max-width: 48rem; }
@media (min-width: 1000px) {
  .hist-fig:not(.hist-fig--v) .hist { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-3); }
  .hist-fig:not(.hist-fig--v) .hist::before { inset-block: auto; top: 21px; height: 2px; width: auto; inset-inline: 8%; transform-origin: right; }
  html[dir='ltr'] .hist-fig:not(.hist-fig--v) .hist::before { transform-origin: left; }
  .hist-fig:not(.hist-fig--v) .hist li { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: var(--s-2); }
  .hist-fig:not(.hist-fig--v) .hist li > div > b { padding-top: var(--s-2); }
}

/* ── 5 · the quiet band: four facts in a row, the calmest surface on the page ── */
.safe__h { font-size: var(--step-2); }
.safe { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6) var(--s-8); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.safe li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-3); align-items: start; padding-top: var(--s-4); border-top: 1px solid var(--line-strong); }
.safe__g { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--accent-ui) 14%, transparent); color: var(--accent); }
.safe__g svg { width: 20px; height: 20px; }
.safe li > div > b { display: block; line-height: 1.45; }
.safe li > div > span { display: block; color: var(--text-soft); font-size: var(--step--1); margin-top: 2px; line-height: 1.7; }
.split__col > .safe { grid-template-columns: 1fr; }

/* ── the four engines, one quarter lit ── */
.engines-lit { align-items: center; }
.diagram--eng { width: 100%; max-width: 27rem; }
.dg--eng { --halo: transparent; }
.eq__q { stroke: var(--bg); stroke-width: 4; stroke-linejoin: round; fill-opacity: 0.22; transition: fill-opacity var(--dur-3) var(--ease-out); }
.band--sand .eq__q { stroke: var(--bg-alt); }
.eq--on .eq__q { fill-opacity: 1; }
.eq--operate .eq__q { fill: var(--q-operate); } .eq--grow .eq__q { fill: var(--q-grow); } .eq--trade .eq__q { fill: var(--q-trade); } .eq--enable .eq__q { fill: var(--q-enable); }
.eq :is(.eq__t, .eq__e) { fill: var(--text); }
.eq--on :is(.eq__t, .eq__e) { fill: #f5f5f3; }
.eq--on:is(.eq--trade, .eq--enable) :is(.eq__t, .eq__e) { fill: var(--ink); }
:root[data-theme='dark'] .eq--operate .eq__q { fill: #2a7a82; }
:root[data-theme='dark'] .eq--enable .eq__q { fill: #9cc4c0; }
.eq__core { fill: var(--tile); stroke: var(--gold); stroke-width: 3; }
.eq--on .eq__q { filter: drop-shadow(0 10px 18px rgb(0 57 67 / 0.25)); }
/* engine hero swatch: the quarter colour as a diamond beside the eyebrow */
.phero[data-engine='operate'] { --q: var(--q-operate); } .phero[data-engine='grow'] { --q: var(--q-grow); } .phero[data-engine='trade'] { --q: var(--q-trade); } .phero[data-engine='enable'] { --q: var(--q-enable); }
.phero[data-engine='operate'] .sw { background: #0f5a66; }

/* engine pages: the planned-work cards carry the engine's quarter colour as a 4 px top rule (the mock's card--engine) */
main[data-engine='operate'] { --q: var(--q-operate); } main[data-engine='grow'] { --q: var(--q-grow); } main[data-engine='trade'] { --q: var(--q-trade); } main[data-engine='enable'] { --q: var(--q-enable); }
:root[data-theme='dark'] main[data-engine='operate'] { --q: #2a7a82; }
main[data-engine] .sec--cards .cards--grid .card:not(.card--door) { border-top: 4px solid var(--q); }
/* dark: the band teal sits too close to the ground, so dots and counters take a raised surface with a gold ring */
:root[data-theme='dark'] .goal__line > svg { background: var(--surface-raised); box-shadow: inset 0 0 0 1.5px var(--gold); }
:root[data-theme='dark'] .hist__dot { background: var(--surface-raised); color: var(--gold); box-shadow: 0 0 0 5px var(--bg), inset 0 0 0 1.5px var(--gold); }
:root[data-theme='dark'] .band--sand .hist__dot { box-shadow: 0 0 0 5px var(--bg-alt), inset 0 0 0 1.5px var(--gold); }
:root[data-theme='dark'] .hist__seal .hist__dot { background: var(--gold); color: var(--ink); }
:root[data-theme='dark'] .cards--steps > li::before { background: var(--surface-raised); color: var(--gold); box-shadow: 0 0 0 5px var(--bg), inset 0 0 0 1.5px var(--gold); }
:root[data-theme='dark'] .band--sand .cards--steps > li::before { box-shadow: 0 0 0 5px var(--bg-alt), inset 0 0 0 1.5px var(--gold); }

/* dajin.ai v4 · motion R1 (design/motion.css, ported). Transform + opacity only; one orchestrated moment per page
   (the hero lines arriving one at a time), then reveals that answer scrolling. Every hidden-before-reveal state is
   keyed on data-seen="false" (set by site.js), so a page without JS hides nothing; reduced motion gets the finished
   page (site.js marks every section seen at once, and 02-base collapses every duration). Nothing loops. */

/* ── 1. the hero sequence: mark settles → name → line → tagline → about → actions → the ring draws ── */
/* Grok R1 #30 (Website T4): the H1, lead and CTAs are readable from the first paint (no opacity:0 on any text in a
   hero). Only the status chips, the relations ring and the pattern arrive; the whole intro ends within 600 ms. */
:root[data-intro='play'] :is(.hhero__meta, .hhero__roles)[data-seq] { opacity: 0; transform: translateY(8px); animation: dj-rise 360ms var(--ease-out) forwards; animation-delay: calc(var(--n, 0) * 30ms + 40ms); }
:root[data-intro='play'] .phero .phero__meta[data-seq] { opacity: 0; animation: dj-rise 320ms var(--ease-out) forwards; animation-delay: 60ms; }
:root[data-intro='play'] :is(.hhero__art, .phero__art) { animation: dj-in 500ms var(--ease-out) both; }
@keyframes dj-in { from { opacity: 0; } }
:root[data-intro='play'] .hhero__roles[data-seq] { transform: scale(0.98); animation-name: dj-settle; }
@keyframes dj-rise { to { opacity: 1; transform: none; } }
@keyframes dj-settle { to { opacity: 1; transform: none; } }
/* the ring draws after the brand block: lines from the centre out, then the seals, then the nodes */
:root[data-intro='play'] .ring__l:not(.ring__l--dash) { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dj-draw 380ms var(--ease-draw) forwards; animation-delay: calc(120ms + var(--i, 0) * 30ms); }
:root[data-intro='play'] :is(.ring__l--dash, .ring__seal, .ring__n) { opacity: 0; animation: dj-fade 260ms var(--ease-out) forwards; animation-delay: calc(200ms + var(--i, 0) * 20ms); }
:root[data-intro='play'] .ring__seal { animation-delay: calc(260ms + var(--i, 0) * 20ms); }
@keyframes dj-draw { to { stroke-dashoffset: 0; } }
@keyframes dj-fade { to { opacity: 1; } }
/* the page thread grows down from its start once per load */
:root[data-intro='play'] main::before { animation: dj-grow 1400ms var(--ease-draw) both; }
@keyframes dj-grow { from { transform: scaleY(0); } to { transform: none; } }

/* ── 2. the logo join (Grok 07 rebuilt on the real paths, 1.6 s cut), once per session ── */
.logo-motion svg :is(.lm-teal, .lm-gold) { transform-box: fill-box; transform-origin: center; }
.logo-motion[data-play='true'] .lm-teal { animation: lm-teal 900ms var(--ease-out) both; }
.logo-motion[data-play='true'] .lm-gold { animation: lm-gold 900ms var(--ease-out) both; }
.logo-motion[data-play='true'] .lm-word { clip-path: inset(0 0 0 100%); animation: lm-word 700ms var(--ease-draw) 650ms forwards; }
html[dir='ltr'] .logo-motion[data-play='true'] .lm-word { clip-path: inset(0 100% 0 0); }
@keyframes lm-teal { from { transform: translate(-22%, -22%); opacity: 0; } 40% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes lm-gold { from { transform: translate(22%, 22%); clip-path: inset(0 0 0 100%); } to { transform: none; clip-path: inset(0); } }
@keyframes lm-word { to { clip-path: inset(0); } }

/* ── 3. scroll reveals: a section's heading block and its groups rise 12 px and fade, once, with a 70 ms stagger ── */
.sec > .wrap > :is(.h2, h2, .eyebrow, .lead, .answer, .sec__head), .split__col > :is(.h2, .lead, .eyebrow),
:is(.cards, .principles, .cols, .safe, .hist, .rel, .opp__list, .ring__list, .goal__steps, .tiles, .list--checks, .seal__facts) > *,
.vid, .diagram, .goal__card, .capture { transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); transition-delay: calc(var(--i, 0) * var(--stagger)); }
.js .sec[data-seen='false'] > .wrap > :is(.h2, h2, .eyebrow, .lead, .answer, .sec__head),
.js .sec[data-seen='false'] .split__col > :is(.h2, .lead, .eyebrow),
.js .sec[data-seen='false'] :is(.cards, .principles, .cols, .safe, .hist, .rel, .opp__list, .goal__steps, .tiles, .list--checks, .seal__facts) > * { opacity: 0; transform: translateY(12px); }
.js .sec[data-seen='false'] :is(.vid, .goal__card, .capture) { opacity: 0; transform: scale(0.975); }
.js .sec[data-seen='false'] .diagram { opacity: 0; }
.js .sec[data-seen='false'] .hist::before { transform: scaleY(0); }
@media (min-width: 1000px) { .js .sec[data-seen='false'] .hist-fig:not(.hist-fig--v) .hist::before { transform: scaleX(0); } }
.hist > li { transition-delay: calc(var(--i, 0) * 110ms + 200ms); }

/* ── 4. diagram line-draw: lines arrive (600 ms), nodes pop after their line ── */
:is(.dg-l, .dg-spine, .dg-thread)[pathLength] { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset var(--dur-4) var(--ease-draw); transition-delay: calc(var(--i, 0) * var(--stagger) * 2 + 150ms); }
.js .sec[data-seen='false'] :is(.dg-l, .dg-spine, .dg-thread)[pathLength] { stroke-dashoffset: 1; }
.dg-n { transform-box: fill-box; transform-origin: center; transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); transition-delay: calc(var(--d, var(--i, 0)) * 80ms + var(--dur-4) / 2); }
.js .sec[data-seen='false'] .dg-n { opacity: 0; transform: scale(0.94); }
.js .sec[data-seen='false'] .dg-seal-g { transform: scale(0.4) rotate(-45deg); }

/* ── 5. the gold underline on the section heading arrives with the section (a 48 px rule, transform only) ── */
.sec:not(.phero, .hhero, .sec--answer, .sec--strip) > .wrap > .h2::after { content: ''; display: block; width: 48px; height: 2px; margin-top: var(--s-3); background: var(--gold); transform-origin: right; transition: transform var(--dur-4) var(--ease-draw) 200ms; }
html[dir='ltr'] .sec > .wrap > .h2::after { transform-origin: left; }
.js .sec[data-seen='false'] > .wrap > .h2::after { transform: scaleX(0); }

/* ── 6. reduced motion: nothing hidden, nothing travels ── */
@media (prefers-reduced-motion: reduce) {
  :root :is(.hhero__art, .phero__art) { animation: none !important; }
  :root :is(.hhero, .phero) [data-seq], :root .ring__n, :root .ring__seal, :root .ring__l--dash { opacity: 1 !important; transform: none !important; animation: none !important; }
  :root .ring__l { stroke-dashoffset: 0 !important; animation: none !important; }
  .logo-motion .lm-word { clip-path: none !important; }
  main::before { animation: none !important; transform: none !important; }
}
:root[data-motion='reduced'] :is(.hhero__art, .phero__art) { animation: none; }
:root[data-motion='reduced'] :is(.hhero, .phero) [data-seq], :root[data-motion='reduced'] :is(.ring__n, .ring__seal, .ring__l--dash) { opacity: 1; transform: none; animation: none; }
:root[data-motion='reduced'] .ring__l { stroke-dashoffset: 0; animation: none; }
:root[data-motion='reduced'] main::before { animation: none; }

/* dajin.ai v4 · «المشربية» forward (Grok R1 #23, founder t920u 13 Nov). Decorative only: pseudo-elements or
   aria-hidden boxes, pointer-events none, never under body copy or a finance disclosure, logo untouched.
   Two tiles, both ≤ 30 KB (optimised from the 147 KB original, same geometry):
     teal  = deep-teal ground + connected-teal lattice + 2 gold stars (merges with the light-mode teal band)
     line  = transparent ground + light-teal #4FA7A2 lattice + 2 gold stars (any ground, and every dark-mode use)
   Motion: only the hero art fades in with the intro (09-motion.css); reduced motion shows it at once. */
:root {
  --mash-teal: url('/brand/dajin-pattern-mashrabiya-teal-960x960.svg');
  --mash-line: url('/brand/dajin-pattern-mashrabiya-line-960x960.svg');
  --mash-hero-o: 0.24;      /* home hero panel, on the teal band */
  --mash-div-o: 0.62;       /* section divider band, on pearl/sand */
  --mash-ftr-o: 0.42;       /* footer top band */
}

/* 1 · home hero / brand panel: the lattice sits behind the relations ring, in the column the brand text never uses */
.hhero__art { position: absolute; z-index: 0; inset-block: 0; inset-inline-end: 0; width: min(50%, 720px); pointer-events: none; overflow: hidden; }
.hhero__art::before { content: ''; position: absolute; inset: -6%; background: var(--mash-teal) center / 300px repeat; opacity: var(--mash-hero-o);
  -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent); mask-image: radial-gradient(closest-side, #000 45%, transparent); }
@media (max-width: 899px) {
  /* stacked hero: the text runs full width, so the panel moves into the ring's own box below it */
  .hhero__art { display: none; }
  .hhero__roles::before { content: ''; position: absolute; z-index: -1; inset: -8% -12%; background: var(--mash-teal) center / 240px repeat; opacity: var(--mash-hero-o); pointer-events: none;
    -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent); mask-image: radial-gradient(closest-side, #000 40%, transparent); }
  .hhero__roles { isolation: isolate; }
}

/* 2 · section dividers: one thin row of the lattice opens a major section (home, how it works, platform) and the footer */
.sec--mash::before, .ftr::after { content: ''; position: absolute; z-index: 1; inset-inline: 0; top: 0; height: 24px; pointer-events: none;
  background: var(--mash-line) 50% -12px / 192px repeat-x;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent); }
.sec--mash::before { opacity: var(--mash-div-o); }
.ftr::after { opacity: var(--mash-ftr-o); }
.sec--mash { padding-top: calc(var(--sec-y) + 12px); }
.sec--mash.sec--tight { padding-top: calc(var(--sec-y-tight) + 12px); }

/* 3 · brand dark: light-teal line tile on the dark grounds, opacity tuned so the lattice reads without glare */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { --mash-hero-o: 0.2; --mash-div-o: 0.34; --mash-ftr-o: 0.3; }
  :root:not([data-theme='light']) :is(.hhero__art, .phero__art)::before,
  :root:not([data-theme='light']) .hhero__roles::before { background-image: var(--mash-line); }
  :root:not([data-theme='light']) .ftr::before { background-image: var(--mash-line); opacity: 0.12; }
  :root:not([data-theme='light']) .phero__art::before { opacity: 0.16; }
}
:root[data-theme='dark'] { --mash-hero-o: 0.2; --mash-div-o: 0.34; --mash-ftr-o: 0.3; }
:root[data-theme='dark'] :is(.hhero__art, .phero__art)::before,
:root[data-theme='dark'] .hhero__roles::before { background-image: var(--mash-line); }
:root[data-theme='dark'] .ftr::before { background-image: var(--mash-line); opacity: 0.12; }
:root[data-theme='dark'] .phero__art::before { opacity: 0.16; }

/* print and forced colours: no decoration */
@media print { .hhero__art, .sec--mash::before, .ftr::after, .hhero__roles::before { display: none; } }
@media (forced-colors: active) { .hhero__art, .sec--mash::before, .ftr::after, .hhero__roles::before { display: none; } }
