/* ==========================================================================
   site.css — the public marketing websites (mathmind.institute, gjsdb.org).
   Vocabulary: docs/SITE_DESIGN.md. Live specimen: /dev/styleguide (local).

   THREE DISCIPLINES THIS FILE DOES NOT BEND:

   1. NO PHYSICAL DIRECTIONS — not one `left` or `margin-left` below. Kurdish
      is the institute's DEFAULT language, so RTL is primary here, not a
      translation of an LTR design.
   2. THEMING LIVES IN THE TOKEN LAYER, NEVER IN COMPONENTS. The admin dark
      theme once shipped at 1.05:1 because somebody patched the components
      that looked wrong instead of re-pointing the neutrals. A component
      needing other colours elsewhere gets them from that CONTEXT redeclaring
      the tokens (`.s-section--dark`), never from `[data-theme] .s-thing`.
   3. THE TWO SITES DIFFER IN SHAPE, NOT ONLY IN HUE — radius, shadow, heading
      scale, weight, tracking and rhythm are all tokens.

   Budget: 30 KB of CSS, 5 KB of JS. That is why the prose is terse and why
   nothing here is a modifier the design contract does not name.
   ========================================================================== */
/* 1. Tokens */

/* Two sites x two themes; every text/background pair is checked to WCAG AA in
   all four. The dark selectors are descendant-capable as well as compound, so
   a board block renders correctly INSIDE an institute page — how the local
   styleguide shows all four without a second copy of the palette. */

:root,
[data-site="institute"] {
  /* Warm teal: energetic, young, the colour of the abacus beads. */
  --s-accent: #0e7c6b; --s-accent-strong: #0a6153; --s-accent-ink: #ffffff;
  --s-accent-soft: #eaf5f2;
  /* --s-accent-2 is DECORATIVE; anything READ uses --s-accent-2-ink. */
  --s-accent-2: #c47f0f; --s-accent-2-ink: #8a5a0a;
  --s-bg: #ffffff; --s-bg-tint: #f3f8f7; --s-surface: #ffffff;
  --s-border: #dde6e4; --s-border-strong: #82918e;
  --s-ink: #12201d; --s-ink-soft: #45534f; --s-ink-faint: #5a6a66;
  /* The inverted CTA band: its own palette, because it is dark in BOTH
     themes and so cannot reuse the page neutrals, which flip. */
  --s-inv-bg: #0c2320; --s-inv-surface: #143430; --s-inv-border: #2a4a45;
  --s-inv-ink: #f2f8f6; --s-inv-ink-soft: #bdd0cc; --s-inv-ink-faint: #a0b5b1;
  --s-inv-accent: #4fd0b6; --s-inv-accent-strong: #6ddcc6;
  --s-inv-accent-ink: #04211c; --s-inv-accent-soft: #17403a;

  /* `--s-x` is the graphic; `--s-x-ink` survives being 13px text. */
  --s-ok: #16a34a; --s-ok-ink: #15803d; --s-warn: #d97706;
  --s-warn-ink: #8f5106; --s-bad: #dc2626; --s-bad-ink: #b91c1c;
  --s-radius: 18px; --s-radius-sm: 10px; --s-radius-lg: 26px; --s-radius-pill: 999px;
  --s-shadow: 0 1px 2px rgb(15 38 36 / .05), 0 10px 28px -14px rgb(15 38 36 / .28);
  --s-shadow-lift: 0 2px 6px rgb(15 38 36 / .07), 0 20px 44px -20px rgb(15 38 36 / .36);
  --s-step: clamp(3.5rem, 8vw, 6rem); --s-gutter: clamp(1rem, 4vw, 2rem); --s-measure: 68ch;
  --s-title-size: clamp(1.7rem, 3.6vw, 2.5rem); --s-title-weight: 700;
  --s-title-tracking: -.02em; --s-hero-size: clamp(2.1rem, 5.6vw, 3.5rem);
  --s-eyebrow-size: .8rem; --s-eyebrow-tracking: .08em; --s-btn-tracking: 0;
  --s-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --s-line: 1.65;
}

/* A prestigious international standards body: royal navy and metallic gold, modern
   subtle radius, compact elevation, refined typography and crisp authority. */
[data-site="board"] {
  --s-accent: #0f355c; --s-accent-strong: #0a243e;
  --s-accent-soft: #eaf1f9; --s-accent-2: #c68e27; --s-accent-2-ink: #8f6412;
  --s-bg-tint: #f5f8fc; --s-border: #d6e0ec; --s-border-strong: #7d8e9f;
  --s-ink: #0d1926; --s-ink-soft: #3d4a58; --s-ink-faint: #5b6978;
  --s-inv-bg: #091728; --s-inv-surface: #0f2338; --s-inv-border: #1e3a58;
  --s-inv-ink: #f2f7fd; --s-inv-ink-soft: #c0d1e4; --s-inv-ink-faint: #9bb0c7;
  --s-inv-accent: #78aee6; --s-inv-accent-strong: #96c2f3;
  --s-inv-accent-ink: #051322; --s-inv-accent-soft: #142e47;
  --s-radius: 12px; --s-radius-sm: 8px; --s-radius-lg: 16px; --s-radius-pill: 999px;
  --s-shadow: 0 2px 10px -2px rgb(10 28 48 / .07), 0 1px 3px rgb(10 28 48 / .04);
  --s-shadow-lift: 0 12px 32px -4px rgb(10 28 48 / .14), 0 4px 12px -2px rgb(10 28 48 / .06);
  --s-step: clamp(2.25rem, 4.5vw, 3.5rem);
  --s-title-size: clamp(1.45rem, 2.7vw, 1.95rem); --s-title-weight: 700;
  --s-title-tracking: -.01em; --s-hero-size: clamp(1.85rem, 4.2vw, 2.75rem);
  --s-eyebrow-size: .78rem; --s-eyebrow-tracking: .14em; --s-btn-tracking: .01em;
}

/* Dark theme: the NEUTRALS are redeclared. That is the whole fix. */
[data-theme="dark"],
[data-theme="dark"] [data-site="institute"] {
  --s-accent: #3fc0a8; --s-accent-strong: #5bd0bb; --s-accent-ink: #04211c;
  --s-accent-soft: #15322c; --s-accent-2: #f0b755; --s-accent-2-ink: #f0b755;
  --s-bg: #0d1614; --s-bg-tint: #121e1b; --s-surface: #16211f;
  --s-border: #2a3835; --s-border-strong: #6c7e7a;
  --s-ink: #eef5f3; --s-ink-soft: #b5c3bf; --s-ink-faint: #93a29f;
  --s-inv-bg: #081210;
  --s-ok: #22c55e; --s-ok-ink: #4ade80; --s-warn: #f59e0b;
  --s-warn-ink: #fbbf24; --s-bad: #ef4444; --s-bad-ink: #f87171;
  --s-shadow: 0 1px 2px rgb(0 0 0 / .5), 0 10px 28px -14px rgb(0 0 0 / .8);
  --s-shadow-lift: 0 2px 6px rgb(0 0 0 / .55), 0 20px 44px -20px rgb(0 0 0 / .9);
}

[data-theme="dark"][data-site="board"],
[data-theme="dark"] [data-site="board"] {
  --s-accent: #7fb3e8; --s-accent-strong: #9cc6f2; --s-accent-ink: #06121f;
  --s-accent-soft: #16273a; --s-accent-2: #e0b45c; --s-accent-2-ink: #e0b45c;
  --s-bg: #0a1017; --s-bg-tint: #0f1720; --s-surface: #121b26;
  --s-border: #24303e; --s-border-strong: #6a7a8c;
  --s-ink: #eef3f9; --s-ink-soft: #b6c3d2; --s-ink-faint: #95a3b4;
  --s-inv-bg: #060d14;
}

/* In dark the band is just the page one shade deeper, so it aliases the page
   palette rather than repeating it per site. Declared last so it wins. */
[data-theme="dark"],
[data-theme="dark"] [data-site] {
  --s-inv-surface: var(--s-surface); --s-inv-border: var(--s-border);
  --s-inv-ink: var(--s-ink); --s-inv-ink-soft: var(--s-ink-soft);
  --s-inv-ink-faint: var(--s-ink-faint); --s-inv-accent: var(--s-accent);
  --s-inv-accent-strong: var(--s-accent-strong);
  --s-inv-accent-ink: var(--s-accent-ink); --s-inv-accent-soft: var(--s-accent-soft);
}

/* Arabic-script face and a taller line, matching app.css. Tracking is ZEROED:
   the script is cursive, so letter-spacing pulls apart glyphs meant to join
   and reads as a fault. `uppercase` is a no-op there too. */
[dir="rtl"] {
  --s-font: 'Noto Kufi Arabic', 'Inter', system-ui, sans-serif;
  --s-line: 1.9; --s-title-tracking: 0; --s-eyebrow-tracking: .01em; --s-btn-tracking: 0;
}

/* 2. Reset and global */

*, *::before, *::after { box-sizing: border-box; }
body.s-body {
  margin: 0; background: var(--s-bg); color: var(--s-ink); font-family: var(--s-font);
  line-height: var(--s-line); -webkit-text-size-adjust: 100%; text-underline-offset: .2em;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--s-accent); }
h1, h2, h3, h4 { font-weight: var(--s-title-weight); letter-spacing: var(--s-title-tracking); }
:focus-visible { outline: 3px solid var(--s-accent); outline-offset: 2px; border-radius: 4px; }
.s-skip {
  position: absolute; inset-inline-start: -9999px; inset-block-start: 0; z-index: 100;
  background: var(--s-accent); color: var(--s-accent-ink); padding: .75rem 1.25rem;
}
.s-skip:focus { inset-inline-start: 0; }
.s-visually-hidden {
  position: absolute; inline-size: 1px; block-size: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
[hidden] { display: none !important; }

/* Not decoration: movement makes some visitors physically unwell. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .s-card:hover, .s-btn:hover, .s-gallery__item:hover img { transform: none !important; }
}

/* 3. Layout primitives */

.s-container { inline-size: min(1180px, 100%); margin-inline: auto; padding-inline: var(--s-gutter); }
.s-section { padding-block: var(--s-step); }
.s-section--tint { background: var(--s-bg-tint); }

/* Redeclares the token layer for its subtree, so every component inside it
   is correct with no `.s-section--dark .s-thing` override anywhere. */
.s-section--dark {
  background: var(--s-inv-bg); color: var(--s-ink);
  --s-bg: var(--s-inv-bg); --s-bg-tint: var(--s-inv-bg);
  --s-surface: var(--s-inv-surface); --s-border: var(--s-inv-border);
  --s-border-strong: var(--s-inv-border); --s-ink: var(--s-inv-ink);
  --s-ink-soft: var(--s-inv-ink-soft); --s-ink-faint: var(--s-inv-ink-faint);
  --s-accent: var(--s-inv-accent); --s-accent-strong: var(--s-inv-accent-strong);
  --s-accent-ink: var(--s-inv-accent-ink); --s-accent-soft: var(--s-inv-accent-soft);
}
.s-section--dark .s-title, .s-section--dark .s-hero__title { color: var(--s-ink); }

.s-grid, .s-stats {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--s-col, 260px), 100%), 1fr));
}
.s-grid--2 { --s-col: 320px; }
.s-grid--3 { --s-col: 280px; }
.s-grid--4 { --s-col: 210px; }
.s-stats { --s-col: 180px; }
.s-split { display: grid; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 900px) {
  .s-split { grid-template-columns: 1fr 1fr; }
  /* `order` is flow-relative, so this flips correctly in RTL by itself. */
  .s-split--reverse > :first-child { order: 2; }
}
.s-stack > * + * { margin-block-start: 1rem; }
.s-cluster { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.s-center { text-align: center; margin-inline: auto; }
.s-center .s-lead, .s-center .s-subtitle { margin-inline: auto; }
.s-mt-0 { margin-block-start: 0 !important; }

/* 4. Typography */

.s-eyebrow {
  text-transform: uppercase; letter-spacing: var(--s-eyebrow-tracking);
  font-size: var(--s-eyebrow-size); font-weight: 700; color: var(--s-accent); margin: 0 0 .6rem;
}
[dir="rtl"] .s-eyebrow { text-transform: none; }
/* The board's one ornament, and a typographic one: a rule, not a shape. */
[data-site="board"] .s-eyebrow::after {
  content: ""; display: block; inline-size: 2.25rem;
  border-block-start: 2px solid var(--s-accent-2); margin-block-start: .55rem;
}

.s-title, .s-hero__title {
  font-weight: var(--s-title-weight); letter-spacing: var(--s-title-tracking);
  color: var(--s-ink); text-wrap: balance;
}
.s-title { font-size: var(--s-title-size); line-height: 1.2; margin: 0 0 .75rem; }
.s-hero__title { font-size: var(--s-hero-size); line-height: 1.12; margin: 0 0 1rem; }
.s-subtitle { font-size: 1.05rem; color: var(--s-ink-soft); margin: 0 0 1rem; max-width: var(--s-measure); }
.s-lead, .s-hero__lead { color: var(--s-ink-soft); text-wrap: pretty; }
.s-lead { font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: var(--s-measure); margin: 0 0 1.5rem; }
.s-hero__lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 56ch; margin: 0 0 1.75rem; }

/* Owner-written HTML lands here, so every element it can contain is styled
   rather than left to the browser default. */
.s-prose { max-width: var(--s-measure); color: var(--s-ink-soft); }
.s-prose > :first-child { margin-block-start: 0; }
.s-prose h2 { font-size: 1.4rem; color: var(--s-ink); margin-block: 2.25rem .6rem; }
.s-prose h3 { font-size: 1.15rem; color: var(--s-ink); margin-block: 1.75rem .5rem; }
.s-prose p { margin-block: 0 1.1rem; }
.s-prose ul, .s-prose ol { padding-inline-start: 1.35rem; margin-block: 0 1.1rem; }
.s-prose li { margin-block-end: .4rem; }
.s-prose a { color: var(--s-accent); text-decoration: underline; }
.s-prose strong { color: var(--s-ink); font-weight: 700; }
.s-prose blockquote {
  margin: 1.5rem 0; padding-inline-start: 1.25rem; font-size: 1.05rem;
  border-inline-start: 3px solid var(--s-accent); color: var(--s-ink);
}

/* 5. Buttons */

.s-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.35rem; border-radius: var(--s-radius-pill);
  border: 1px solid transparent; font: inherit; font-weight: 600;
  letter-spacing: var(--s-btn-tracking); line-height: 1.3; text-decoration: none;
  text-align: center; cursor: pointer; background: transparent; color: var(--s-ink);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease,
              border-color .15s ease, color .15s ease;
}
.s-btn svg { inline-size: 1.05em; block-size: 1.05em; flex: none; }
.s-btn--lg { padding: .9rem 1.85rem; font-size: 1.05rem; }
.s-btn--primary { background: var(--s-accent); color: var(--s-accent-ink); border-color: var(--s-accent); }
.s-btn--primary:hover { background: var(--s-accent-strong); border-color: var(--s-accent-strong); transform: translateY(-1px); box-shadow: var(--s-shadow); }
.s-btn--primary:active { background: var(--s-accent-strong); transform: translateY(0); box-shadow: none; }
.s-btn--ghost { border-color: var(--s-border-strong); }
.s-btn--ghost:hover { background: var(--s-accent-soft); color: var(--s-accent); border-color: var(--s-accent); }
/* An explicit surface, not `opacity`: opacity alone dissolves the control
   into a dark background. */
.s-btn:disabled, .s-btn[aria-disabled="true"] {
  background: var(--s-bg-tint); border-color: var(--s-border); color: var(--s-ink-faint);
  cursor: not-allowed; transform: none; box-shadow: none; pointer-events: none;
}

/* 6. Components */

/* One panel surface, three components: round and soft on the institute, flat
   and square on the board, from tokens alone. */
.s-card, .s-quote, .s-cert {
  background: var(--s-surface); border: 1px solid var(--s-border);
  border-radius: var(--s-radius); box-shadow: var(--s-shadow); overflow: hidden;
}
.s-card {
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.s-card__body { padding: 1.35rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.s-card__title { margin: 0; font-size: 1.1rem; color: var(--s-ink); line-height: 1.35; }
.s-card__text { margin: 0; color: var(--s-ink-soft); }
.s-card__meta { color: var(--s-ink-faint); font-size: .85rem; margin: 0; }
/* A real <img> when the owner uploaded one, an accent wash when not, and no
   placeholder file: this project has shipped 404ing images before. */
.s-card__media {
  aspect-ratio: 16 / 10; overflow: hidden;
  background: radial-gradient(120% 120% at 80% 0%, var(--s-accent-soft), transparent 70%),
              linear-gradient(160deg, var(--s-bg-tint), var(--s-accent-soft));
}
.s-card__media img, .s-hero__media img, .s-gallery__item img {
  inline-size: 100%; block-size: 100%; object-fit: cover;
}
/* Card hover effects */
.s-card:hover { transform: translateY(-3px); box-shadow: var(--s-shadow-lift); }
[data-site="board"] .s-card { position: relative; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
[data-site="board"] .s-card::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0;
  block-size: 3px; background: linear-gradient(90deg, var(--s-accent-2), var(--s-accent));
  opacity: 0; transition: opacity .2s ease; z-index: 2;
}
[data-site="board"] .s-card:hover { transform: translateY(-4px); border-color: var(--s-border-strong); box-shadow: var(--s-shadow-lift); }
[data-site="board"] .s-card:hover::before { opacity: 1; }

.s-stat { text-align: center; }
/* Latin digits in every locale; isolating them LTR stops "1,200+" from
   reordering inside an RTL page. */
.s-stat__value {
  font-size: clamp(1.8rem, 3.8vw, 2.5rem); font-weight: 700; margin: 0;
  letter-spacing: var(--s-title-tracking); color: var(--s-accent);
  line-height: 1.1; direction: ltr; unicode-bidi: isolate;
}
.s-stat__label { color: var(--s-ink-soft); margin: .35rem 0 0; font-size: .92rem; font-weight: 500; }
/* A table of record, not a scoreboard — but only once the figures are side
   by side; a rule above a stacked figure is noise. */
@media (min-width: 641px) {
  [data-site="board"] .s-stat + .s-stat { border-inline-start: 1px solid var(--s-border); }
}

.s-feature__icon {
  display: inline-flex; align-items: center; justify-content: center;
  inline-size: 3rem; block-size: 3rem; border-radius: var(--s-radius-pill);
  background: var(--s-accent-soft); color: var(--s-accent); margin-block-end: .9rem;
}
.s-feature__icon svg { inline-size: 1.5rem; block-size: 1.5rem; }
.s-feature__title { margin: 0 0 .35rem; font-size: 1.05rem; color: var(--s-ink); }
.s-feature__text { margin: 0; color: var(--s-ink-soft); }
/* Board: modern numbered emblem with gold circle badge */
[data-site="board"] .s-feature__icon {
  background: linear-gradient(135deg, var(--s-accent-soft), color-mix(in srgb, var(--s-accent-2) 15%, transparent));
  border-radius: var(--s-radius-sm); border: 1.5px solid var(--s-accent-2);
  inline-size: 2.75rem; block-size: 2.75rem; justify-content: center;
  color: var(--s-accent-2-ink); font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(198, 142, 39, 0.15);
}

.s-pill {
  display: inline-block; padding: .2rem .7rem; border-radius: var(--s-radius-pill);
  background: var(--s-accent-soft); color: var(--s-accent);
  font-size: .8rem; font-weight: 600; line-height: 1.6;
}

.s-quote { padding: 1.75rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .25rem; }
.s-quote::before {
  content: "\201D"; display: block; font-size: 2.75rem; line-height: .8;
  color: var(--s-accent-2); margin-block-end: .35rem;
}
.s-quote__text { margin: 0 0 1rem; font-size: 1.05rem; color: var(--s-ink); flex: 1; }
.s-quote__author { font-weight: 700; margin: 0; color: var(--s-ink); }
.s-quote__role { color: var(--s-ink-faint); font-size: .9rem; margin: 0; }
/* The board publishes statements from named officials, not pull-quotes. */
[data-site="board"] .s-quote { border-block-start: 3px solid var(--s-accent); }
[data-site="board"] .s-quote::before { display: none; }

/* FAQ: <details>/<summary>, so it opens with JavaScript off. */
.s-faq { border-block-start: 1px solid var(--s-border); }
.s-faq__item { border-block-end: 1px solid var(--s-border); }
.s-faq__q {
  padding: 1.1rem 0; font-weight: 600; color: var(--s-ink); cursor: pointer;
  list-style: none; display: flex; align-items: center; gap: 1rem;
}
.s-faq__q::-webkit-details-marker { display: none; }
/* A clipped triangle, not two rotated borders: a border pair mirrors with
   the direction and ends up pointing sideways in RTL. Still no icon file. */
.s-faq__q::after {
  content: ""; inline-size: .6rem; block-size: .38rem; flex: none;
  margin-inline-start: auto; background: var(--s-accent);
  clip-path: polygon(50% 100%, 0 0, 100% 0); transition: transform .2s ease;
}
.s-faq__item[open] .s-faq__q::after { transform: rotate(180deg); }
.s-faq__a { padding-block-end: 1.2rem; color: var(--s-ink-soft); margin: 0; max-width: var(--s-measure); }

/* The rail is a border on the LIST: it grows with the content and lands on
   the correct side in RTL for free. */
.s-timeline {
  list-style: none; margin: 0; padding: 0; padding-inline-start: 2rem;
  border-inline-start: 2px solid var(--s-border); display: grid; gap: 2rem;
}
.s-timeline__item { position: relative; }
.s-timeline__item::before {
  content: ""; position: absolute; inset-block-start: .35rem;
  inset-inline-start: calc(-2rem - 1px - .4rem); inline-size: .8rem; block-size: .8rem;
  border-radius: var(--s-radius-pill); background: var(--s-accent);
  box-shadow: 0 0 0 4px var(--s-bg);
}
.s-timeline__title { margin: 0 0 .3rem; font-size: 1.05rem; color: var(--s-ink); }
.s-timeline__meta { margin: 0 0 .4rem; color: var(--s-accent); font-size: .85rem; font-weight: 600; }
.s-timeline__text { margin: 0; color: var(--s-ink-soft); }
[data-site="board"] .s-timeline__item::before { border-radius: 0; background: var(--s-accent-2); }

/* Uniform tiles, one in six double-height, packed dense. Not real masonry,
   but it reads as one and needs no measuring pass. */
.s-gallery {
  display: grid; gap: .85rem; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  grid-auto-rows: 150px; grid-auto-flow: dense;
}
.s-gallery__item {
  grid-row: span 1; overflow: hidden; border-radius: var(--s-radius);
  background: linear-gradient(160deg, var(--s-accent-soft), var(--s-bg-tint));
}
.s-gallery__item img { transition: transform .3s ease; }
.s-gallery__item:hover img { transform: scale(1.05); }
@media (min-width: 700px) {
  .s-gallery { grid-auto-rows: 170px; }
  .s-gallery__item:nth-child(6n + 1) { grid-row: span 2; }
}

/* Text stays --s-ink on a 12% wash, so it reads in both themes. */
.s-note {
  border-radius: var(--s-radius-sm); padding: 1rem 1.25rem;
  border: 1px solid var(--s-border); border-inline-start-width: 4px;
  color: var(--s-ink); background: var(--s-bg-tint);
}
.s-note p { margin: 0; }
.s-note__title { font-weight: 700; margin: 0 0 .25rem; }
.s-note--ok { background: color-mix(in srgb, var(--s-ok) 12%, transparent); border-color: var(--s-ok); }
.s-note--warn { background: color-mix(in srgb, var(--s-warn) 12%, transparent); border-color: var(--s-warn); }
.s-note--bad { background: color-mix(in srgb, var(--s-bad) 12%, transparent); border-color: var(--s-bad); }
.s-note--ok .s-note__title { color: var(--s-ok-ink); }
.s-note--warn .s-note__title { color: var(--s-warn-ink); }
.s-note--bad .s-note__title { color: var(--s-bad-ink); }

/* The board site's real job: a stranger has scanned a QR code off a piece of
   paper and wants to know whether it is genuine. Key/value rows, because a
   record is what it is. */

.s-cert { max-width: 46rem; }
.s-cert__head {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1.25rem 1.5rem; background: var(--s-accent-soft);
  border-block-end: 1px solid var(--s-border);
}
.s-cert__head .s-title { margin: 0; }
.s-cert__row {
  display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: .25rem 1.5rem;
  padding: .95rem 1.5rem; border-block-start: 1px solid var(--s-border);
}
.s-cert__row:first-of-type { border-block-start: 0; }
.s-cert__key { color: var(--s-ink-faint); font-size: .9rem; }
.s-cert__value { font-weight: 600; color: var(--s-ink); }
.s-cert__value--code { letter-spacing: .06em; }
@media (max-width: 560px) { .s-cert__row { grid-template-columns: 1fr; gap: .1rem; } }
/* Not rotated: a tilted stamp would need mirroring in RTL to avoid looking
   like a mistake, and a standards body's mark sits straight. */
.s-cert__stamp {
  margin-inline-start: auto; display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  inline-size: 5.5rem; block-size: 5.5rem; padding: .4rem;
  border-radius: var(--s-radius-pill); border: 2px solid var(--s-accent-2);
  outline: 1px solid var(--s-accent-2); outline-offset: 3px;
  color: var(--s-accent-2-ink); font-size: .62rem; font-weight: 700;
  line-height: 1.3; text-transform: uppercase; letter-spacing: var(--s-eyebrow-tracking);
}
[dir="rtl"] .s-cert__stamp { text-transform: none; font-size: .68rem; }

/* --- Forms --- */
.s-form { display: grid; gap: 1.15rem; max-width: 640px; }
.s-field { display: grid; gap: .35rem; }
.s-label { font-weight: 600; font-size: .95rem; color: var(--s-ink); }
.s-input {
  font: inherit; color: var(--s-ink); background: var(--s-surface);
  border: 1px solid var(--s-border-strong); border-radius: var(--s-radius-sm);
  padding: .7rem .9rem; inline-size: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.s-input { min-block-size: 8rem; resize: vertical; }
.s-input::placeholder { color: var(--s-ink-faint); opacity: 1; }
.s-input:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 1px; border-color: var(--s-accent); }
.s-input:disabled { background: var(--s-bg-tint); color: var(--s-ink-faint); cursor: not-allowed; }
/* `:user-invalid`, NOT `:invalid`: `:invalid` matches an empty required field
   the moment the page loads, so an untouched form greets the visitor in red.
   `[aria-invalid]` covers server-side errors after a failed POST. */
.s-input:user-invalid, .s-input[aria-invalid="true"] {
  border-color: var(--s-bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s-bad) 18%, transparent);
}
.s-input:user-invalid:focus-visible,
.s-input[aria-invalid="true"]:focus-visible { outline-color: var(--s-bad); }
.s-help { color: var(--s-ink-faint); font-size: .85rem; margin: 0; }
.s-error { color: var(--s-bad-ink); font-size: .85rem; margin: 0; font-weight: 600; }
/* A serial and the box it is typed into: monospace, and LTR-isolated so a
   printed code keeps its order inside an RTL page. */
.s-cert__value--code, .s-input--code {
  font-family: ui-monospace, Consolas, monospace; direction: ltr; unicode-bidi: isolate;
}
.s-input--code { font-size: 1.25rem; letter-spacing: .18em; text-align: center; text-transform: uppercase; }

/* 7. Header and footer */

.s-header {
  border-block-end: 1px solid var(--s-border); background: var(--s-bg);
  position: sticky; inset-block-start: 0; z-index: 20;
}
.s-header__inner { display: flex; align-items: center; gap: 1rem; min-block-size: 68px; flex-wrap: wrap; }
.s-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; text-decoration: none; color: var(--s-ink); }
.s-brand__logo { inline-size: 40px; block-size: 40px; object-fit: contain; }
/* Tracked out on the board — and via the kicker token, so RTL zeroes it. */
[data-site="board"] .s-brand__name { letter-spacing: var(--s-eyebrow-tracking); font-weight: 600; }
.s-header__tools { display: flex; align-items: center; gap: .75rem; margin-inline-start: auto; }
.s-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.s-nav__link { text-decoration: none; color: var(--s-ink-soft); padding: .4rem 0; font-weight: 500; position: relative; }
.s-nav__link:hover { color: var(--s-accent); }
.s-nav__link.is-active { color: var(--s-accent); font-weight: 600; }
.s-nav__link.is-active::after {
  content: ""; position: absolute; inset-inline: 0; inset-block-end: 0;
  border-block-end: 2px solid currentColor;
}
[data-site="board"] .s-nav__link.is-active::after { border-block-end-color: var(--s-accent-2); }

/* A <details>: works with JavaScript off, announced as a disclosure. On
   desktop it must not claim its own row, so `flex-basis: 100%` is scoped. */
.s-nav-toggle { flex: 1 1 auto; }
.s-nav-toggle__button { list-style: none; cursor: pointer; display: none; }
.s-nav-toggle__button::-webkit-details-marker { display: none; }
/* Three drawn bars — element plus two pseudo-elements — no icon file. */
.s-nav-toggle__bars, .s-nav-toggle__bars::before, .s-nav-toggle__bars::after {
  display: block; inline-size: 22px; block-size: 2px; background: currentColor;
  border-radius: 2px; transition: transform .2s ease, background-color .2s ease;
}
.s-nav-toggle__bars { position: relative; }
.s-nav-toggle__bars::before, .s-nav-toggle__bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.s-nav-toggle__bars::before { inset-block-start: -7px; }
.s-nav-toggle__bars::after { inset-block-start: 7px; }
@media (max-width: 820px) {
  .s-nav-toggle { order: 3; flex: 0 0 100%; }
  .s-nav-toggle__button { display: block; padding: .6rem 0; color: var(--s-ink); }
  .s-nav-toggle:not([open]) .s-nav { display: none; }
  .s-nav { flex-direction: column; gap: 0; padding-block-end: 1rem; border-block-start: 1px solid var(--s-border); }
  .s-nav__link { padding: .7rem 0; border-block-end: 1px solid var(--s-border); }
  .s-nav__link.is-active::after { display: none; }
}

.s-langs { display: flex; gap: .5rem; align-items: center; }
.s-langs__link { text-decoration: none; color: var(--s-ink-soft); font-size: .9rem; }
.s-langs__link.is-active { color: var(--s-accent); font-weight: 700; }
.s-theme-toggle {
  background: none; border: 1px solid var(--s-border); border-radius: var(--s-radius-pill);
  padding: .45rem; cursor: pointer; color: var(--s-ink-soft); display: inline-flex;
}
.s-theme-toggle svg { inline-size: 18px; block-size: 18px; }
[data-theme="dark"] .s-icon-sun, :root:not([data-theme="dark"]) .s-icon-moon { display: none; }

.s-footer {
  background: var(--s-bg-tint); border-block-start: 1px solid var(--s-border);
  padding-block: var(--s-step) 1.5rem; margin-block-start: var(--s-step);
}
.s-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.s-footer__title { font-weight: 700; margin: 0 0 .75rem; color: var(--s-ink); }
.s-footer__about { color: var(--s-ink-soft); margin: 0 0 1rem; }
.s-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; color: var(--s-ink-soft); }
.s-footer__links a, .s-socials__link { color: var(--s-ink-soft); text-decoration: none; }
.s-footer__links a:hover, .s-socials__link:hover { color: var(--s-accent); text-decoration: underline; }
.s-socials { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .9rem; }
.s-footer__bottom {
  border-block-start: 1px solid var(--s-border); margin-block-start: 2rem;
  padding-block-start: 1.5rem; color: var(--s-ink-faint); font-size: .9rem;
}

/* 8. Hero */

/* Institute (the default): a warm wash bleeding out of the corner. */
.s-hero {
  padding-block: clamp(3rem, 8vw, 6rem); position: relative;
  background: radial-gradient(70% 90% at 85% -10%, color-mix(in srgb, var(--s-accent-2) 22%, transparent), transparent 60%),
              linear-gradient(165deg, var(--s-accent-soft), transparent 62%);
}
.s-hero__inner { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 900px) { .s-hero__inner--split { grid-template-columns: 1.05fr .95fr; } }
.s-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
/* Holds a photograph; deliberate-looking while empty; names no file. */
.s-hero__media {
  border-radius: var(--s-radius-lg); overflow: hidden; aspect-ratio: 16 / 10;
  box-shadow: var(--s-shadow-lift); position: relative;
  background: radial-gradient(90% 90% at 15% 10%, var(--s-accent-soft), transparent 70%),
              linear-gradient(150deg, var(--s-bg-tint) 20%, var(--s-accent-soft));
  border: 1px solid var(--s-border);
}
.s-hero__media img {
  inline-size: 100%; block-size: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.s-hero__media:hover img {
  transform: scale(1.02);
}

.s-hero__media-wrapper {
  position: relative;
}

.s-hero__badge {
  position: absolute; display: inline-flex; align-items: center; gap: .6rem;
  padding: .6rem 1.1rem; border-radius: var(--s-radius-pill);
  background: var(--s-surface); color: var(--s-ink); font-weight: 600;
  font-size: .88rem; box-shadow: var(--s-shadow-lift); border: 1px solid var(--s-border);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}
.s-hero__badge--top { inset-block-start: -12px; inset-inline-end: 16px; }
.s-hero__badge--bottom { inset-block-end: -14px; inset-inline-start: 16px; }
.s-hero__badge-icon {
  display: inline-flex; align-items: center; justify-content: center;
  inline-size: 28px; block-size: 28px; border-radius: 50%;
  background: var(--s-accent-soft); color: var(--s-accent); font-size: 1rem;
}

.s-feature-showcase {
  margin-block: 2.5rem 1rem; border-radius: var(--s-radius-lg);
  overflow: hidden; box-shadow: var(--s-shadow-lift); border: 1px solid var(--s-border);
  max-height: 420px;
}
.s-feature-showcase img {
  inline-size: 100%; block-size: 100%; object-fit: cover;
}

/* Board: modern prestigious hero & seal */
[data-site="board"] .s-hero {
  background: radial-gradient(70% 90% at 85% 15%, rgba(198, 142, 39, 0.12), transparent 70%),
              radial-gradient(80% 90% at 15% 10%, rgba(15, 53, 92, 0.08), transparent 65%),
              var(--s-bg-tint);
  border-block-end: 1px solid var(--s-border);
  border-block-start: 3px solid var(--s-accent-2);
  padding-block: clamp(2.5rem, 5.5vw, 4.25rem);
}
[data-site="board"] .s-hero__media {
  border-radius: var(--s-radius-lg); border: 2px solid var(--s-accent-2);
  box-shadow: 0 12px 36px rgba(15, 53, 92, 0.22); aspect-ratio: 16 / 10;
  background: linear-gradient(160deg, var(--s-surface), var(--s-accent-soft));
}
[data-site="board"] .s-hero__badge {
  background: var(--s-surface);
  border: 1px solid var(--s-accent-2);
  box-shadow: 0 4px 16px rgba(10, 28, 48, 0.12);
}
[data-site="board"] .s-hero__badge-icon {
  background: var(--s-accent-soft);
  color: var(--s-accent-2-ink);
}

.s-verify-banner {
  display: grid; gap: 2rem; align-items: center;
  background: linear-gradient(145deg, var(--s-surface), var(--s-bg-tint));
  border: 1.5px solid var(--s-accent-2); border-radius: var(--s-radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.25rem); box-shadow: var(--s-shadow-lift);
  margin-block-start: 1rem;
}
@media (min-width: 768px) {
  .s-verify-banner { grid-template-columns: 140px 1fr; gap: 2.25rem; }
}
.s-verify-banner__seal {
  display: flex; justify-content: center; align-items: center;
}
.s-verify-banner__seal img {
  inline-size: 130px; block-size: 130px; object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(198, 142, 39, 0.35));
}


/* `.is-active` / `.is-open` are not styled generically: they mean different
   things per component, so each component states its own. */
