/* ==========================================================================
   MADRASA · design system
   A warm, paper-toned, typographically-led system. Brand red #980100 from the
   MAIR wordmark; Moroccan zellij geometry as the only decorative motif.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --brand: #990101;
  --brand-strong: #7a0100;
  --brand-soft: #f6e7e5;
  --brand-line: #e8cdca;
  --brand-contrast: #ffffff;

  /* Warm neutrals · "paper" */
  --paper: #fdfbf8;
  --paper-deep: #f6f1ea;
  --surface: #ffffff;
  --surface-2: #f8f4ee;
  --surface-3: #f1ebe2;
  --line: #e8e0d5;
  --line-strong: #d8cec0;

  /* Ink */
  --ink: #17110f;
  --ink-2: #4c423d;
  --ink-3: #675d56;
  --ink-4: #726860;

  /* Feedback */
  --ok: #1f6b45;
  --ok-soft: #e6f2ea;
  --warn: #8a5a00;
  --warn-soft: #f8efdd;

  /* Elevation · restrained, warm-tinted */
  --shadow-1: 0 1px 2px rgba(23, 17, 15, .04), 0 1px 1px rgba(23, 17, 15, .03);
  --shadow-2: 0 2px 4px rgba(23, 17, 15, .04), 0 8px 24px -12px rgba(23, 17, 15, .16);
  --shadow-3: 0 4px 8px rgba(23, 17, 15, .05), 0 24px 48px -20px rgba(23, 17, 15, .22);

  /* Radii */
  --r-xs: 0;
  --r-sm: 0;
  --r-md: 0;
  --r-lg: 0;
  --r-xl: 0;
  --r-pill: 0;

  /* Space scale (8px base, 4px half steps) */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 64px;
  --s-9: 96px;  --s-10: 128px;

  /* Type */
  --font-display: var(--font-sans);
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --font-arabic: "Amiri", "Noto Naskh Arabic", serif;

  /* Layout */
  --shell: 1200px;
  --shell-narrow: 760px;
  --header-h: 64px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-1: 140ms;
  --dur-2: 260ms;
  --dur-3: 480ms;

  color-scheme: light;
}


/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* Author display rules (e.g. `.check { display: flex }`) otherwise beat the UA
   `[hidden]` rule, leaving elements the app has hidden still on screen. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-5));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  word-break: break-word;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

/* Underlines are reserved for prose-style links; navigation, cards, chips and
   controls carry their affordance through layout instead. */
.prose a, .fact__v a, .state__text a, .entry__sub a,
.site-footer__bottom a, .noscript a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent);
  transition: text-decoration-color var(--dur-1) var(--ease);
}
.prose a:hover, .fact__v a:hover, .state__text a:hover, .entry__sub a:hover,
.site-footer__bottom a:hover, .noscript a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 0;
}

::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed;
  top: var(--s-3);
  left: var(--s-3);
  z-index: 200;
  transform: translateY(-200%);
  padding: var(--s-3) var(--s-4);
  background: var(--ink);
  color: var(--paper);
  border-radius: 0;
  font-weight: 600;
  transition: transform var(--dur-2) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* --------------------------------------------------------------------------
   3. Typography scale
   -------------------------------------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(2.6rem, 1.2rem + 5.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.35rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
}
.h3 {
  font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.lede {
  font-size: clamp(1.05rem, .98rem + .5vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tiny { font-size: .8125rem; }
.balance { text-wrap: balance; }
.mono { font-family: var(--font-mono); font-size: .875em; }
.arabic { font-family: var(--font-arabic); }

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
@media (min-width: 768px) { .shell { padding-inline: var(--s-6); } }
@media (max-width: 400px) { .shell { padding-inline: var(--s-4); } }

.shell--narrow { max-width: var(--shell-narrow); }

.section { padding-block: clamp(var(--s-7), 5vw, var(--s-8)); }
.section--tight { padding-block: clamp(var(--s-6), 3.5vw, var(--s-7)); }
.section--edge { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}
.section-head__text { max-width: 56ch; display: grid; gap: var(--s-2); }

.stack { display: grid; gap: var(--s-4); }
.stack--sm { gap: var(--s-2); }
.stack--lg { gap: var(--s-6); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }

.grid { display: grid; gap: var(--s-4); }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.site-header[data-stuck="true"] { border-bottom-color: var(--line); }

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.brand { display: inline-flex; align-items: center; gap: var(--s-3); flex: none; }
.brand__mark { color: var(--brand); display: grid; place-items: center; transition: transform var(--dur-3) var(--ease-out); }
.brand:hover .brand__mark { transform: none; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: .14em;
}

.site-nav { display: flex; align-items: center; gap: var(--s-2); margin-inline-end: auto; }
.site-nav a {
  padding: var(--s-2) var(--s-3);
  border-radius: 0;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.site-header__actions { display: flex; align-items: center; gap: var(--s-2); flex: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }


.site-header__actions .nav-toggle { display: none; }

@media (max-width: 900px) {
  .site-header__inner { gap: var(--s-3); }
  .site-header__actions .nav-toggle { display: grid; }
  .site-header__actions .header-cta { display: none; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: grid;
    gap: 0;
    padding: var(--s-3) var(--s-5) var(--s-5);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease-out);
  }
  .site-nav[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav a { padding: var(--s-3); font-size: 1.05rem; border-radius: 0; }
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 11px 20px;
  border: 1px solid var(--btn-bd);
  border-radius: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur-1) var(--ease), background var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease),
              box-shadow var(--dur-1) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: var(--brand);
  --btn-fg: var(--brand-contrast);
  --btn-bd: var(--brand);
  box-shadow: var(--shadow-1);
}
.btn--primary:hover { --btn-bg: var(--brand-strong); --btn-bd: var(--brand-strong); box-shadow: var(--shadow-2); }

.btn--solid { --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink); }
.btn--solid:hover { --btn-bg: var(--ink-2); --btn-bd: var(--ink-2); }

.btn--ghost { --btn-bd: transparent; --btn-fg: var(--ink-2); }
.btn--ghost:hover { --btn-bg: var(--surface-2); --btn-fg: var(--ink); }

.btn--sm { padding: 8px 15px; font-size: .875rem; }
/* For contextual buttons whose label carries a full institution name. */
.btn--wrap { white-space: normal; text-align: center; max-width: 100%; }
.btn--lg { padding: 14px 26px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* --------------------------------------------------------------------------
   7. Chips, tags, badges
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }
.chip[aria-pressed="true"], .chip--on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chip--static { cursor: default; }
.chip--static:hover { background: var(--surface); border-color: var(--line); color: var(--ink-2); }

.chip__count { color: var(--ink-4); font-variant-numeric: tabular-nums; font-size: .75rem; }
.chip[aria-pressed="true"] .chip__count { color: color-mix(in srgb, var(--paper) 65%, transparent); }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 0;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
}
.tag--brand { background: var(--brand-soft); color: var(--brand); }

.pill-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pill-kind::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 0;
  background: var(--ink-3);
  transform: rotate(45deg);
}
.pill-kind--program { color: var(--brand); }
.pill-kind--program::before { background: var(--brand); }

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--ink-3);
}
.status-dot::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 0;
  background: var(--ok);
}
.status-dot[data-status="nonactive"]::before,
.status-dot[data-status="inactive"]::before { background: var(--ink-4); }
.status-dot[data-status="unknown"]::before,
.status-dot[data-status="likely_active"]::before { background: var(--warn); }

/* Official institution logo. Kept on a light plaque in both themes, because the
   marks are published as dark ink and would disappear on the dark surface. */
.brand-logo {
  flex: none;
  display: grid;
  /* minmax(0, 1fr) both makes the track definite (so the image's percentage
     height resolves) and removes the automatic min-content floor that would
     otherwise let a tall mark stretch the plaque. */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: stretch;
  padding: 6px 8px;
  background: #fbf9f6;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}

/* Fill the plaque and let object-fit letterbox: a percentage max-height would
   not resolve against the auto-sized grid row, leaving tall marks clipped. */
.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.brand-logo--sm { width: 108px; height: 58px; }
.brand-logo--lg { width: 168px; height: 88px; padding: 10px 14px; border-radius: 0; }

@media (max-width: 560px) {
  .brand-logo--lg { width: 128px; height: 68px; }
}

/* Institution monogram */
.monogram {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink-2);
  text-align: center;
}
.monogram--lg { width: 68px; height: 68px; font-size: 1rem; border-radius: 0; }

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--button-radius, 8px);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease),
              border-color var(--dur-2) var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px -12px rgb(23 17 15 / 22%); border-color: var(--brand-line); }
.card:focus-within { outline: 2px solid var(--brand); outline-offset: 3px; }

.card__head { display: flex; align-items: flex-start; gap: 16px; }
.card__head-text { min-width: 0; display: grid; gap: 6px; }
.card__title { font-family: var(--font-ecosystem); font-size: 1.125rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.025em; }
.card__title a { display: inline; }
/* Stretched link makes the whole card clickable while keeping one real anchor */
.card__title a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.card__inst { font-size: .8125rem; line-height: 1.5; color: var(--ink-3); }
.card__meta { display: grid; gap: 8px; font-size: .8125rem; color: var(--ink-3); }
.card__meta-item { display: inline-flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.card__meta-item .icon { flex: none; margin-top: 3px; }
.card .brand-logo { border-radius: 8px; background: var(--paper); }
.card .tag { border-radius: 4px; padding: 4px 8px; font-size: .75rem; line-height: 1.4; }
.card .pill-kind { font-size: .625rem; letter-spacing: .1em; }
.card__tags { display: flex; flex-wrap: wrap; align-content: start; gap: 6px; }
.card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: .75rem;
  color: var(--ink-4);
}
.card__foot { flex-wrap: wrap; }
@media (max-width: 480px) {
  .card { padding: 18px; gap: 16px; }
  .card__head { gap: 12px; }
  .card__title { font-size: 1rem; }
}

/* Card variant used for institution/domain collections */
.tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.tile__text { min-width: 0; display: grid; gap: 2px; }
.tile__name { font-weight: 600; font-size: .9375rem; letter-spacing: -0.01em; }
/* Stretch the link itself, so clicks anywhere on the tile navigate. */
.tile__name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tile:focus-within { outline: 2px solid var(--brand); outline-offset: 3px; }
.tile__meta { font-size: .8125rem; color: var(--ink-3); }
.tile__n { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-3); font-size: .9375rem; }

/* --------------------------------------------------------------------------
   9. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  padding-block: clamp(var(--s-7), 7vw, var(--s-10)) clamp(var(--s-7), 5vw, var(--s-8));
  isolation: isolate;
}
/* Clips the pattern and watermark without trapping the search panel. */
.hero__decor {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: clip;
  pointer-events: none;
}
.hero__pattern {
  position: absolute;
  inset: -12% auto auto -6%;
  width: min(52%, 640px);
  height: 120%;
  color: var(--ink);
  opacity: .05;
  -webkit-mask-image: radial-gradient(85% 75% at 0% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(85% 75% at 0% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}

/* The word "madrasa" in Arabic, set large and clipped by the viewport edge. */
.hero__watermark {
  position: absolute;
  top: 50%;
  right: max(var(--s-6), calc(50vw - var(--shell) / 2 + var(--s-6)));
  transform: translateY(-58%);
  font-family: var(--font-arabic);
  font-size: clamp(5rem, 9vw, 9.5rem);
  line-height: 1;
  direction: rtl;
  color: var(--ink);
  opacity: .06;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 1080px) { .hero__watermark { display: none; } }

.hero__eyebrow {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero__eyebrow .arabic {
  font-size: 1.5rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand);
  line-height: 1;
}

.hero__inner { display: grid; gap: var(--s-6); }
.hero__inner > * { min-width: 0; }
.hero__title { max-width: 19ch; font-size: clamp(2.5rem, 2rem + 2.8vw, 4.75rem); line-height: 1.08; letter-spacing: -.045em; }
.hero__title em {
  font-style: normal;
  color: var(--brand);
  position: relative;
}
.hero__lede { max-width: 46ch; font-size: 1.0625rem; line-height: 1.7; }
.hero { padding-block: clamp(32px, 5vw, 64px) 48px; }
.hero__topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line-strong); }
.hero__eyebrow { color: var(--brand); font-size: .6875rem; letter-spacing: .12em; font-weight: 600; }
.hero__edition { color: var(--ink-3); font-size: .75rem; }
.hero__composition { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding-block: 8px 20px; }
.hero__intro { display: grid; gap: 22px; min-width: 0; }
.hero__source-note { display: flex; align-items: flex-start; gap: 8px; font-size: .75rem; color: var(--ink-3); line-height: 1.6; }
.hero__source-note .icon { flex: none; margin-top: 2px; color: var(--brand); }
.hero__directory { border-left: 1px solid var(--line-strong); padding-left: clamp(24px, 3vw, 40px); }
.hero__directory-label { font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.hero__directory-link { display: grid; grid-template-columns: 52px minmax(0, 1fr) 18px; gap: 12px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: .875rem; font-weight: 500; }
.hero__count { font-family: var(--font-display); font-size: 2.125rem; line-height: 1; font-weight: 500; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hero__directory-link .icon { color: var(--brand); transition: transform 180ms var(--ease-out); }
.hero__directory-link:hover { color: var(--brand); }
.hero__directory-link:hover .icon { transform: translateX(3px); }
.hero__coverage { margin-top: 16px; font-size: .75rem; color: var(--ink-3); }
.hero__discovery { position: relative; z-index: 1; padding: 26px 32px; background: var(--surface-2); border-top: 2px solid var(--brand); display: grid; gap: 14px; min-width: 0; }
.hero__search-label { font-size: .875rem; font-weight: 600; }
.hero__discovery .searchfield { max-width: none; }
.hero__discovery .searchbar { box-shadow: none; padding: 8px 8px 8px 18px; min-height: 60px; }
.hero__discovery .searchbar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.hero__discovery .searchbar .btn { padding-inline: 26px; }
.hero__discovery .hero__suggest { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; }
.hero__discovery .hero__suggest a { font-size: .75rem; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.hero__discovery .hero__suggest a:hover { color: var(--brand); text-decoration-color: currentColor; }
@media (max-width: 760px) {
  .hero__composition { display: contents; }
  .hero__intro { order: 1; }
  .hero__discovery { order: 2; }
  .hero__directory { order: 3; }
  .hero__edition { display: none; }
  .hero__directory { border-left: 0; padding-left: 0; }
  .hero__directory-link { padding-block: 14px; }
  .hero__discovery { padding: 20px 16px; }
  .hero__discovery .searchbar { padding-left: 10px; gap: 8px; }
  .hero__discovery .searchbar .btn { padding-inline: 12px; }
  .hero__discovery .searchbar input { font-size: .875rem; }
  .hero__inner { gap: 24px; }
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5) var(--s-7);
  margin-top: var(--s-3);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}
.stat { display: grid; gap: 2px; }
.stat__n {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: .8125rem; color: var(--ink-3); letter-spacing: .01em; }

/* Hero search */
.searchbar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  padding: 6px 6px 6px var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  box-shadow: var(--shadow-2);
  transition: box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.searchbar:focus-within { border-color: var(--ink-3); box-shadow: var(--shadow-3); }
.searchbar__icon { flex: none; color: var(--ink-4); }
.searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  padding-block: 10px;
}
.searchbar input:focus { outline: none; }
.searchbar input::placeholder { color: var(--ink-4); }

/* Live search panel · anchored to the field, not the pill, so it clears the
   search field's edge. */
.searchfield { position: relative; width: 100%; max-width: 560px; }

.typeahead {
  position: absolute;
  top: calc(100% + var(--s-2));
  left: 0;
  right: 0;
  z-index: 80;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow-3);
  text-align: left;
  animation: typeahead-in var(--dur-2) var(--ease-out) both;
}
@keyframes typeahead-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.typeahead__group {
  padding: var(--s-3) var(--s-3) var(--s-2);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.typeahead__group:first-child { padding-top: var(--s-2); }

.typeahead__row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: 0;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
}
.typeahead__row[aria-selected="true"] { background: var(--surface-2); }

.typeahead__mono {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: .625rem;
  font-weight: 700;
  color: var(--ink-3);
}
.typeahead__mono--glyph { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; }
.typeahead__row[aria-selected="true"] .typeahead__mono { background: var(--surface); }

.typeahead__text { min-width: 0; display: grid; gap: 1px; }
.typeahead__row > .brand-logo { width: 88px; height: 52px; padding: 6px; background: #fff; border-radius: 6px; }
@media (max-width: 480px) {
  .typeahead__row > .brand-logo { width: 64px; height: 44px; padding: 4px; }
}
.typeahead__name {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.typeahead__name mark {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  color: inherit;
  border-radius: 0;
  padding: 0 1px;
}
.typeahead__meta {
  font-size: .8125rem;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.typeahead__all {
  display: block;
  margin-top: var(--s-2);
  padding: var(--s-3);
  border-top: 1px solid var(--line);
  border-radius: 0;
  font-size: .875rem;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
}
.typeahead__all[aria-selected="true"] { background: var(--surface-2); }

.typeahead__empty { padding: var(--s-4) var(--s-3); font-size: .875rem; color: var(--ink-3); }

.hero__suggest { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.hero__suggest .tiny { color: var(--ink-4); }

/* --------------------------------------------------------------------------
   10. Forms & inputs
   -------------------------------------------------------------------------- */
.field { display: grid; gap: 6px; }
.field > label { font-size: .8125rem; font-weight: 600; color: var(--ink-2); }

.input, .select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .9375rem;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--ink-3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent);
}
.select {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.search-input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b6f68' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") no-repeat 14px 50% / 18px 18px;
  color: var(--ink);
  font: inherit;
  font-size: .9375rem;
}
.search-input:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent); }

/* --------------------------------------------------------------------------
   10b. react-select island
   The control is rendered with react-select's `unstyled` prop, so every visual
   decision below comes from the same tokens as the native controls above and
   the light/dark themes apply with no JS.
   -------------------------------------------------------------------------- */
.select-island { position: relative; min-width: 0; }

.rs { position: relative; font-size: .9375rem; }

.rs__control {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 42px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.rs__control:hover { border-color: var(--ink-4); }
.rs__control--is-focused {
  border-color: var(--ink-3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent);
}

.rs__value-container { display: flex; flex: 1; min-width: 0; align-items: center; gap: 2px; }
.rs__single-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.rs__placeholder { color: var(--ink-4); white-space: nowrap; }
.rs__input-container { display: flex; min-width: 2px; color: var(--ink); }

.rs__indicators { display: flex; align-items: center; flex: none; }
.rs__indicator-separator { display: none; }
.rs__dropdown-indicator { display: grid; place-items: center; color: var(--ink-3); }
.rs__dropdown-indicator svg { width: 16px; height: 16px; fill: currentColor; transition: transform var(--dur-2) var(--ease); }
.rs__control--menu-is-open .rs__dropdown-indicator svg { transform: rotate(180deg); }

.rs__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 90;
  min-width: 180px;
  padding: var(--s-1);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow-3);
  animation: rs-in var(--dur-2) var(--ease-out) both;
}
.rs__menu--top { top: auto; bottom: calc(100% + 6px); }
@keyframes rs-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.rs__menu-list { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; }

.rs__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 9px 11px;
  border-radius: 0;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
}
.rs__option--is-focused { background: var(--surface-2); color: var(--ink); }
.rs__option--is-selected {
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
}
.rs__option--is-selected.rs__option--is-focused { background: var(--ink-2); color: var(--paper); }

.rs__no-options-message { padding: 10px 11px; color: var(--ink-3); }

/* Matches the width the native select had in the results toolbar. */
.results__bar .select-island { width: 200px; max-width: 100%; }

/* --------------------------------------------------------------------------
   11. Explore layout
   -------------------------------------------------------------------------- */
.explore { padding-block: var(--s-6) var(--s-9); }

.explore__head { display: grid; gap: var(--s-4); margin-bottom: var(--s-5); }

.segmented {
  display: flex;
  align-self: start;
  max-width: 100%;
  padding: 3px;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 0;
  /* Scroll rather than wrap when the labels outgrow a narrow viewport. */
  overflow-x: auto;
  scrollbar-width: none;
}
.kind-options { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kind-option { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-family: var(--font-ecosystem); font-size: .875rem; font-weight: 500; }
.kind-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.kind-option input:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  flex: none;
  white-space: nowrap;
  padding: 7px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.explore__body {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: var(--s-6);
  align-items: start;
}

.filters {
  position: sticky;
  top: calc(var(--header-h) + var(--s-4));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0;
  max-height: calc(100vh - var(--header-h) - var(--s-6));
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Reserve the scrollbar permanently: without this it sits on top of the
     option counts and the disclosure chevrons. */
  scrollbar-gutter: stable;
  padding-right: var(--s-3);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
/* Grid items default to a min-content floor; a long facet label would otherwise
   stretch the column past the panel and slide the counts under the scrollbar. */
.filters > * { min-width: 0; }

.filters::-webkit-scrollbar { width: 11px; }
.filters::-webkit-scrollbar-track { background: transparent; }
.filters::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  background-clip: padding-box;
  border: 3px solid transparent;
  border-radius: 0;
}
.filters::-webkit-scrollbar-thumb:hover { background: var(--ink-4); background-clip: padding-box; }

/* Stays put while the facets scroll, so "Clear all" is always one click away. */
.filters__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: 2px var(--s-3);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.filters__title {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.filters__badge {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 0;
  background: var(--brand);
  color: var(--brand-contrast);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.filters__badge[hidden] { display: none; }

.facet { border-top: 1px solid var(--line); padding-block: var(--s-3); }
.facet:first-of-type { border-top: 0; padding-top: var(--s-3); }
.facet > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  cursor: pointer;
  list-style: none;
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink);
  padding-block: 2px;
}
.facet > summary::-webkit-details-marker { display: none; }
.facet > summary::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.6px solid var(--ink-3);
  border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur-2) var(--ease);
}
.facet[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.facet__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; margin-top: var(--s-3); }
.facet__more {
  margin-top: 6px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: .8125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.facet__more:hover { text-decoration: underline; }

.check {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: var(--s-3);
  padding: 6px 8px;
  margin-inline: -8px;
  border-radius: 0;
  cursor: pointer;
  font-size: .875rem;
  color: var(--ink-2);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.check:hover { background: var(--surface-2); color: var(--ink); }
.check input {
  flex: none;
  appearance: none;
  width: 16px; height: 16px;
  margin: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.check input:checked {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E") no-repeat 50% / 12px;
  border-color: var(--ink);
}
.check__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check__n {
  flex: none;
  min-width: 2ch;
  text-align: right;
  font-size: .75rem;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.check:has(input:checked) { color: var(--ink); font-weight: 500; }

.results__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.results__count { font-size: .9375rem; color: var(--ink-2); }
/* The sort control sits beside the filter button rather than claiming a row. */
.results__bar .select { width: auto; min-width: 0; max-width: 190px; }
.results__count strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.active-filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.active-filters:empty { display: none; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  font-size: .8125rem;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.filter-pill:hover { border-color: var(--ink-3); color: var(--ink); }
.filter-pill__x { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 0; background: var(--surface-3); font-size: 11px; line-height: 1; }
.filter-pill__k { color: var(--ink-4); }

.results__bar .filters-toggle { display: none; }

@media (max-width: 940px) {
  .explore__body { grid-template-columns: 1fr; }
  .results__bar .filters-toggle { display: inline-flex; }
  .filters {
    position: fixed;
    inset: 0;
    z-index: 150;
    max-height: none;
    margin: 0;
    /* Top padding lives on the sticky header instead, so scrolled content is
       covered rather than showing in the gap above it. */
    padding: 0 var(--s-5) 96px;
    background: var(--paper);
    overflow-y: auto;
    transform: translateY(100%);
    /* `visibility` keeps the closed drawer out of the tab order and the
       accessibility tree, not merely out of sight. */
    visibility: hidden;
    transition: transform var(--dur-3) var(--ease-out), visibility var(--dur-3);
  }
  .filters[data-open="true"] { transform: none; visibility: visible; }
  .filters__head { padding-top: var(--s-5); }
  .filters__done {
    position: fixed;
    inset: auto var(--s-5) var(--s-5) var(--s-5);
    z-index: 151;
    display: none;
  }
  .filters[data-open="true"] .filters__done { display: flex; }
}

/* --------------------------------------------------------------------------
   12. Entry detail
   -------------------------------------------------------------------------- */
.entry { padding-block: var(--s-5) var(--s-9); }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: .8125rem; color: var(--ink-3); margin-bottom: var(--s-5); }
.breadcrumbs a { color: var(--ink-3); transition: color var(--dur-1) var(--ease); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs span[aria-hidden] { color: var(--ink-4); }

.entry__head { display: grid; gap: var(--s-4); padding-bottom: var(--s-6); border-bottom: 1px solid var(--line); }
.entry__title-row { display: flex; align-items: flex-start; gap: var(--s-4); }
.entry__title { max-width: 22ch; }
.entry__sub { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); color: var(--ink-2); }

.entry__body > * { min-width: 0; }
.entry__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--s-7);
  align-items: start;
  padding-top: var(--s-6);
}
@media (max-width: 900px) { .entry__body { grid-template-columns: 1fr; gap: var(--s-6); } }

.factsheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: var(--s-4) var(--s-5);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
}
.fact { display: grid; gap: 3px; align-content: start; }
.fact__k { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.fact__v { font-size: .9375rem; color: var(--ink); }
.fact__v ul { display: grid; gap: 2px; list-style: none; }

.aside-card {
  position: sticky;
  top: calc(var(--header-h) + var(--s-4));
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow-1);
}
@media (max-width: 900px) { .aside-card { position: static; } }

.link-list { display: grid; gap: var(--s-2); list-style: none; }
.link-list a {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: .875rem;
  color: var(--ink-2);
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.link-list a:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
.link-list .host { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-list svg { flex: none; color: var(--ink-4); }

.note {
  padding: var(--s-4) var(--s-5);
  border-left: 2px solid var(--brand-line);
  background: var(--surface-2);
  border-radius: 0;
  color: var(--ink-2);
  font-size: .9375rem;
}

.prose { display: grid; gap: var(--s-4); max-width: 68ch; color: var(--ink-2); }
.prose h2 { color: var(--ink); margin-top: var(--s-5); }
.prose h3 { color: var(--ink); margin-top: var(--s-3); }
.prose ul, .prose ol { padding-left: 1.25em; display: grid; gap: var(--s-2); }
.prose li::marker { color: var(--ink-4); }
.prose code {
  font-family: var(--font-mono);
  font-size: .875em;
  padding: 2px 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 0;
}
.prose pre {
  margin: 0;
  padding: var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--ink);
}
.prose pre code { padding: 0; background: none; border: 0; }

/* --------------------------------------------------------------------------
   13. Data displays
   -------------------------------------------------------------------------- */
.bar-list { display: grid; gap: var(--s-3); list-style: none; }
.bar-row { position: relative; display: grid; gap: 6px; }
.bar-row__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); font-size: .875rem; }
.bar-row__name { font-weight: 500; }
.bar-row__n { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: .8125rem; }
.bar-row__track { height: 6px; border-radius: 0; background: var(--surface-3); overflow: hidden; }
.bar-row__fill {
  height: 100%;
  border-radius: 0;
  background: var(--brand);
  transform-origin: left;
  animation: bar-grow var(--dur-3) var(--ease-out) both;
}
.bar-row a::after { content: ""; position: absolute; inset: -4px; border-radius: 0; }
.bar-row:hover .bar-row__fill { background: var(--brand-strong); }

@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.cloud { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.cloud a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink-2);
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.cloud a:hover { border-color: var(--ink-3); color: var(--ink); transform: translateY(-1px); }
.cloud a sup { font-size: .6875rem; color: var(--ink-4); }
.cloud a[data-weight="3"] { font-size: 1.0625rem; font-weight: 600; }
.cloud a[data-weight="2"] { font-size: .9375rem; font-weight: 500; }
.cloud a[data-weight="1"] { font-size: .875rem; }

.figure-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 0;
}

/* --------------------------------------------------------------------------
   14. States
   -------------------------------------------------------------------------- */
.state {
  display: grid;
  justify-items: center;
  gap: var(--s-4);
  padding: clamp(var(--s-7), 8vw, var(--s-9)) var(--s-5);
  text-align: center;
}
.state__mark { color: var(--ink-4); opacity: .5; }
.state__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.state__text { max-width: 46ch; color: var(--ink-3); }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 0;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.skeleton-card {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}
.skeleton-card .skeleton:nth-child(1) { height: 44px; width: 44px; border-radius: 0; }
.skeleton-card .skeleton:nth-child(2) { height: 18px; width: 75%; }
.skeleton-card .skeleton:nth-child(3) { height: 13px; width: 50%; }
.skeleton-card .skeleton:nth-child(4) { height: 13px; width: 90%; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   15. Callouts / CTA
   -------------------------------------------------------------------------- */
.cta-panel {
  position: relative;
  overflow: clip;
  display: grid;
  gap: var(--s-5);
  padding: clamp(var(--s-6), 5vw, var(--s-8));
  background: var(--ink);
  color: var(--paper);
  border-radius: 0;
  isolation: isolate;
}
.cta-panel__pattern { position: absolute; inset: 0; color: var(--paper); opacity: .06; z-index: -1; pointer-events: none; }
.cta-panel .h2 { max-width: 20ch; }
.cta-panel p { max-width: 54ch; color: color-mix(in srgb, var(--paper) 72%, transparent); }
.cta-panel .btn--solid { --btn-bg: var(--paper); --btn-fg: var(--ink); --btn-bd: var(--paper); }
.cta-panel .btn--ghost { --btn-fg: var(--paper); --btn-bd: color-mix(in srgb, var(--paper) 30%, transparent); }
.cta-panel .btn--ghost:hover { --btn-bg: color-mix(in srgb, var(--paper) 12%, transparent); }

.steps { counter-reset: step; display: grid; gap: var(--s-5); list-style: none; }
.step { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: var(--s-4); align-items: start; }
.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9375rem;
  color: var(--brand);
}
.step__body { display: grid; gap: var(--s-2); padding-top: 7px; }

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: var(--s-8);
  padding-block: var(--s-7) var(--s-6);
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  color: var(--ink-2);
}
.site-footer__top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: var(--s-7); }
@media (max-width: 780px) { .site-footer__top { grid-template-columns: 1fr; gap: var(--s-6); } }

.footer-logo { height: 26px; width: auto; }
.footer-blurb { margin-top: var(--s-4); max-width: 40ch; font-size: .875rem; color: var(--ink-3); }

.site-footer__nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: var(--s-5); }
.site-footer__nav h3 { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); margin-bottom: var(--s-3); }
.site-footer__nav div { display: grid; gap: var(--s-2); align-content: start; }
.site-footer__nav a { font-size: .875rem; color: var(--ink-2); transition: color var(--dur-1) var(--ease); }
.site-footer__nav a:hover { color: var(--brand); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  font-size: .8125rem;
  color: var(--ink-4);
}
.site-footer__bottom p { max-width: 62ch; }

.noscript { padding-block: var(--s-8); display: grid; gap: var(--s-4); }
.noscript ul { padding-left: 1.2em; }

/* --------------------------------------------------------------------------
   17. Motion
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal="in"] { opacity: 1; transform: none; }

/* GSAP owns opacity and transform once the motion bundle is live; leaving the
   transition on would have CSS and the tween fighting frame by frame. */
.has-motion [data-reveal] { transition: none; }

/* Lenis smooth scroll. It drives the real scroll position, so `position: sticky`
   and the sticky facet rail keep working; these rules only stop the browser's
   own smooth scrolling from competing with it. */
html.lenis,
html.lenis body { height: auto; }
/* `lenis-smooth` is only present mid-scroll, so the override is anchored on the
   persistent class as well · the browser's own smooth scrolling must be off for
   as long as Lenis is driving. */
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* SplitText line masks. Display type is set at line-height 1.02–1.08, so the
   mask would clip descenders; the padding gives them room and the negative
   margin gives the space back, leaving layout identical to the unsplit text. */
.has-motion .splitline-mask {
  padding-bottom: .18em;
  margin-bottom: -.18em;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   18. Utilities
   -------------------------------------------------------------------------- */
.hide { display: none !important; }
.center { text-align: center; }
.mt-6 { margin-top: var(--s-6); }
.mt-5 { margin-top: var(--s-5); }
.mt-4 { margin-top: var(--s-4); }
.wrap-gap { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Institution pages retained from the current version, using classic tokens. */
.rec-page { display: grid; gap: var(--s-6); }

.rec-head { display: grid; gap: var(--s-4); padding-bottom: var(--s-6); border-bottom: 1px solid var(--line-strong); }
.rec-head__top { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.rec-head__title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); max-width: 22ch; }
.rec-head__org { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: .9375rem; color: var(--ink-2); }
.rec-head__org > span { display: inline-flex; align-items: center; gap: var(--s-2); }

/* Two columns of substance, no boxes: facts left, provenance right. */
.rec-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-7);
  align-items: start;
}
@media (min-width: 900px) {
  .rec-body { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-8); }
}

/* A ruled definition list reads as a record; a bordered card reads as a widget. */
.dl { display: grid; }
.dl__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px var(--s-5);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
}
.dl__row:first-child { border-top: 1px solid var(--line); }
@media (min-width: 560px) {
  .dl__row { grid-template-columns: 160px minmax(0, 1fr); align-items: baseline; }
}
.dl__k {
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.dl__v { min-width: 0; color: var(--ink); font-size: .9375rem; }
.dl__v ul { display: grid; gap: 2px; }


.page-head { display: grid; gap: var(--s-4); }
.institutions-list { display: grid; gap: var(--s-3); padding: 0; list-style: none; }
.institutions-list > li { list-style: none; }
.rec-page .grid--cards { grid-template-columns: minmax(0, 1fr); }
.rec-head__top > .stack { min-width: 0; flex: 1 1 260px; }
.rec-head__title { overflow-wrap: anywhere; }
.card--directory { gap: 14px; }
.card__logo-row { display: flex; align-items: center; height: 76px; min-width: 0; }
.card__logo-row .brand-logo { width: min(208px, 100%); height: 76px; padding: 4px 0; border: 0; background: transparent; border-radius: 0; }
.card__logo-row .brand-logo img { object-fit: contain; object-position: left center; }
.card--directory .card__head { display: block; }
.card--directory .card__head-text { gap: 5px; }
.card--directory .card__title { font-size: 1.125rem; line-height: 1.35; }
.card--directory .pill-kind { color: var(--ink-3); }
.card--directory .pill-kind::before { display: none; }
.card--directory .card__inst { font-size: .8125rem; line-height: 1.45; }
.card--directory .card__meta { gap: 5px; align-content: start; }
.card--directory .card__tags { margin: 0; }
.card--directory .card__foot { margin-top: auto; padding-top: 12px; }
.card--directory .tag.muted { background: transparent; color: var(--ink-3); }
/* Share content rows across adjacent cards without a large flexible middle. */
@supports (grid-template-rows: subgrid) {
  .grid--cards > .card--directory { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 14px; }
  .card--directory .card__foot { align-self: end; margin-top: 0; }
}
@media (max-width: 480px) {
  .card__logo-row, .card__logo-row .brand-logo { height: 68px; }
  .card__logo-row .brand-logo { width: min(188px, 100%); }
  .card--directory .card__title { font-size: 1.0625rem; }
}

/* Square search and select surfaces. */
input, select, textarea, .searchbar, .search-input, .rs__control, .rs__menu, .typeahead { border-radius: 0; }
.explore .search-input,
.explore .input,
.explore .select,
.explore .rs__control,
.explore .rs__menu,
.explore .rs__menu-list { border-radius: var(--button-radius, 8px); }

.institutions-list { gap: 0; }
.institutions-list .tile { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; padding: var(--s-3) var(--s-3) var(--s-3) 0; }
.institutions-list .tile:hover { background: var(--surface-2); transform: none; box-shadow: none; }
.institutions-list .tile__name { font-family: var(--font-display); font-size: .9375rem; font-weight: 600; letter-spacing: -.015em; }
.institutions-list .tile__meta { font-size: .75rem; }
.institution-records { list-style: none; padding: 0; margin: 0; }
.rec {
  position: relative;
  display: grid;
  gap: var(--s-1) var(--s-4);
  padding: var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur-1) var(--ease);
}
.rec:hover { background: var(--surface-2); }
.rec:first-child { border-top: 1px solid var(--line); }
.index__cols + .rec { border-top: 0; }

/* One real anchor per record; the stretched hit area keeps the row clickable
   without nesting controls inside a link. */
.rec__name { font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.28; }
.rec__name a::after { content: ""; position: absolute; inset: 0; }
.rec:hover .rec__name a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.rec__main { min-width: 0; display: grid; gap: 2px; align-content: start; }
.rec__org { font-size: .75rem; color: var(--ink-3); }
.rec__kind {
  font-family: var(--font-mono);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.rec__kind--program { color: var(--brand); }

.rec__where, .rec__domains {
  min-width: 0;
  font-size: .8125rem;
  color: var(--ink-3);
  line-height: 1.4;
}
/* City then region as one run, the region set smaller so the pair reads as a
   single place rather than as two facts of equal weight. */
.rec__region { font-size: .6875rem; color: var(--ink-3); }
.rec__region::before { content: " · "; }

/* Two lines maximum, so one long tag list cannot set the row height for the
   whole column. The record page carries the full list. */
.rec__domains {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.rec__seen {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  white-space: nowrap;
}
.rec__go { color: var(--ink-3); opacity: 0; transition: opacity var(--dur-1) var(--ease); justify-self: end; }
.rec:hover .rec__go { opacity: 1; }

/* Mobile: the record is a two-line entry, not a squeezed table row. */
.rec { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "mark main" ". meta"; }
.rec__mark { grid-area: mark; }
.rec__main { grid-area: main; }
.rec__meta {
  grid-area: meta;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--s-3);
  align-items: baseline;
  margin-top: 3px;
}
.rec__where { min-width: 0; grid-column: 1; grid-row: 1; }
.rec__domains { grid-column: 1 / -1; grid-row: 2; -webkit-line-clamp: 1; line-clamp: 1; }
.rec__seen { grid-column: 2; grid-row: 1; justify-self: end; }
.rec__go { display: none; }

@media (min-width: 900px) {
  .index__cols {
    display: grid;
    grid-template-columns: 76px minmax(0, 1.85fr) minmax(0, .85fr) minmax(0, 1fr) 116px 18px;
  }
  .rec {
    grid-template-columns: 76px minmax(0, 1.85fr) minmax(0, .85fr) minmax(0, 1fr) 116px 18px;
    grid-template-areas: none;
    align-items: start;
    gap: var(--s-4);
    padding-block: var(--s-3);
  }
  .rec__mark, .rec__main, .rec__where, .rec__domains, .rec__seen, .rec__go {
    grid-area: auto;
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
  }
  .index--compact .rec { grid-template-columns: 76px minmax(0, 2fr) minmax(0, .9fr) 116px 18px; }
  .index--compact .rec__domains { display: none; }
  .rec__meta { display: contents; }
  .rec__go { display: block; }
}


.brand-logo--row { width: 76px; height: 40px; }
.institution-records .rec { grid-template-columns: 76px minmax(0,1fr); grid-template-areas: "mark main" ". meta"; }
.institution-records .rec__mark { grid-area: mark; }
.institution-records .rec__main { grid-area: main; }
.institution-records .rec__meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.institution-records .rec__go, .institution-records .rec__domains { display: none; }
@media (max-width: 480px) { .institution-records .rec { grid-template-columns: 60px minmax(0,1fr); } .brand-logo--row { width: 60px; height: 32px; padding: 4px; } }

/* MAIR ecosystem identity and controls, measured against Mosaic. */
:root { --font-ecosystem: "Space Grotesk", var(--font-sans); --button-radius: 8px; }
.brand { gap: 10px; }
.brand__ecosystem { width: 80px; height: auto; object-fit: contain; }
.brand__divider { width: 1px; height: 30px; background: var(--line-strong); margin-inline: 2px; }
.brand__identity { display: grid; gap: 3px; }
.brand__word { font-family: var(--font-ecosystem); font-size: 18px; line-height: 1; font-weight: 700; letter-spacing: -.45px; color: #1a1c1e; }
.brand__descriptor { font-family: var(--font-ecosystem); font-size: 11px; line-height: 1.3; color: #4b5563; }
.ecosystem-credit { display: block; width: fit-content; margin-top: 12px; font-family: var(--font-ecosystem); font-size: 12px; color: var(--brand); text-underline-offset: 3px; }
.ecosystem-credit:hover { text-decoration: underline; }
.site-nav { margin-inline-start: auto; margin-inline-end: 0; }
.site-header__actions { margin-left: 0; }
.site-nav__socials { display: flex; align-items: center; gap: 4px; border-left: 1px solid var(--line); padding-left: 12px; margin-left: 8px; }
.site-nav a.social-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: #374151; }
.site-nav a.social-btn:hover { color: var(--brand); background: var(--brand-soft); }
@media (min-width: 901px) { .site-header__actions { display: none; } }
@media (max-width: 900px) {
  .site-header__actions { margin-left: auto; }
  .site-nav { margin: 0; visibility: hidden; }
  .site-nav[data-open="true"] { visibility: visible; }
  .site-nav__socials { border-left: 0; border-top: 1px solid var(--line); margin: 12px 0 0; padding: 12px 0 0; }
  .site-nav a.social-btn { width: 44px; height: 44px; }
}
.btn { font-family: var(--font-ecosystem); font-size: 16px; font-weight: 600; line-height: 24px; padding: 12px 24px; min-height: 50px; gap: 8px; border-radius: var(--button-radius); transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease; }
.btn, .btn--lg { padding-block: 11px; }
.btn--sm { font-size: 14px; line-height: 20px; padding: 8px 16px; min-height: 38px; }
.btn:hover, .btn:active { transform: none; }
.btn--primary { box-shadow: 0 1px 2px rgb(0 0 0 / 5%); }
.btn--primary:hover { box-shadow: 0 1px 2px rgb(0 0 0 / 5%); }
.icon-btn { width: 40px; height: 40px; border-radius: var(--button-radius); }
.site-nav a { font-family: var(--font-ecosystem); font-size: 14px; line-height: 20px; padding: 8px 16px; border-radius: var(--button-radius); transition: color 200ms ease, background 200ms ease; }
.site-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.segmented button, .filter-pill { border-radius: var(--button-radius); font-family: var(--font-ecosystem); }
.hero__discovery .searchbar .btn { padding-inline: 24px; border-radius: var(--button-radius); }
.btn:focus-visible, .icon-btn:focus-visible, .site-nav a:focus-visible, .brand:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; box-shadow: 0 0 0 2px var(--paper); }
@media (max-width: 600px) {
  .brand__ecosystem { width: 60px; }
  .brand__word { font-size: 16px; }
  .brand__descriptor { display: none; }
  .brand--footer .brand__descriptor { display: block; }
  .brand { gap: 8px; }
  .btn, .icon-btn, .segmented button, .site-nav a { min-height: 44px; }
  .icon-btn { width: 44px; }
  .hero__discovery .searchbar .btn { padding-inline: 14px; }
}
/* Catalog submissions use the same controls and quiet borders as discovery. */
.submit-page { max-width: 860px; }
.submission-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-block: 36px; }
.submission-form > p, .submission-form > fieldset, .submission-form > button,
.submission-form > .submission-field:has(textarea) { grid-column: 1 / -1; }
.submission-field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.submission-field label { font-size: 14px; font-weight: 600; }
.submission-form .input, .submission-form .select { width: 100%; min-width: 0; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px; background-color: #fff; color: var(--ink); font: inherit; }
.submission-form .select { padding-inline-end: 36px; }
.submission-form textarea { resize: vertical; }
.submission-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; min-inline-size: 0; padding: 24px 0 0; margin: 0; border: 0; border-top: 1px solid var(--line); }
.submission-group legend { padding: 0 12px 0 0; }
.submission-form > button { justify-self: start; }
.submission-form button:disabled { opacity: .65; cursor: wait; }
.submission-form [role="status"]:empty { display: none; }
.submission-success { display: grid; gap: 20px; margin-block: 36px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; }
.submission-success .btn { justify-self: start; }
.submit-page aside { padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 599px) {
  .submission-form, .submission-group { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .submission-form > button { width: 100%; }
}
