/* ==========================================================================
   CES-LINKS website, 2026 redesign
   Look: dark and cinematic (inspired by the "Craftex" layout), with Plum accents.
   Built to the CES-LINKS Brand Style Guide v1.0 and WCAG 2.2 AA.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/montserrat-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette: 500 is the official color; other steps generated in OKLab */
  --plum-50:#FDF3FC; --plum-100:#FAE5F9; --plum-200:#F5CBF2; --plum-300:#E6A9E2; --plum-400:#CB85C8; --plum-500:#6D256C; --plum-600:#5B195A; --plum-700:#490D48; --plum-800:#370337; --plum-900:#270027; --plum-950:#1F001F;
  --amber-50:#FEF5EA; --amber-100:#FBEAD3; --amber-200:#F7D5A6; --amber-300:#E9B76F; --amber-500:#E7A537; --amber-700:#895600; --amber-800:#5D3200;
  --azure-50:#EFF8FF; --azure-200:#BBDFFF; --azure-300:#90C5FF; --azure-500:#1D68B0; --azure-700:#003C74;
  --evergreen-50:#F1F9F4; --evergreen-200:#C4E4D1; --evergreen-300:#9ECEB2; --evergreen-500:#3F7F5E; --evergreen-700:#164C33;
  --crimson-50:#FFF1F2; --crimson-200:#FFC1C6; --crimson-300:#FF98A3; --crimson-500:#BD1F44; --crimson-700:#7C0020;
  --terracotta-50:#FFF4EF; --terracotta-200:#FFCDBA; --terracotta-300:#F8AB90; --terracotta-500:#CA6A47; --terracotta-700:#7D3316;
  --teal-50:#EEF9FA; --teal-200:#B5E6E6; --teal-300:#84D0D2; --teal-500:#259FA2; --teal-700:#005D5F;
  --midnight-50:#F5F7FA; --midnight-100:#EAEDF3; --midnight-200:#D6DBE7; --midnight-300:#B9C1D4; --midnight-400:#99A1B7; --midnight-500:#111729; --midnight-600:#0B1121; --midnight-700:#060B19;
  --white:#FFFFFF; --black:#000000;

  /* Semantic tokens (dark theme is the default look) */
  --header-bg: var(--midnight-700);
  --surface: var(--midnight-500);
  --surface-alt: var(--midnight-600);
  --card: #1A2138;
  --card-border: rgba(255,255,255,.12);
  --text: var(--white);
  --text-muted: var(--midnight-300);
  --accent: var(--plum-300);          /* accent text / lines on dark */
  --accent-strong: var(--plum-200);
  --link: var(--plum-200);
  --field-bg: var(--midnight-600);
  --field-border: var(--midnight-400);
  --btn-bg: var(--plum-500);
  --btn-bg-hover: #8A3589;
  --btn-text: var(--white);
  --focus: var(--plum-200);
  --error: var(--crimson-300);
  --success: var(--evergreen-300);

  /* Type (style guide scale) */
  --font: "Montserrat", "Nunito Sans", "Gill Sans", Arial, sans-serif;
  --fs-display: 4rem;     /* 64px */
  --fs-h1: 3rem;          /* 48px */
  --fs-h2: 2.3125rem;     /* 37px */
  --fs-h3: 1.8125rem;     /* 29px */
  --fs-h4: 1.5rem;        /* 24px */
  --fs-sub: 1.1875rem;    /* 19px */
  --fs-body-lg: 1.0625rem;/* 17px */
  --fs-body: 1rem;        /* 16px */
  --fs-small: .875rem;    /* 14px */
  --fs-caption: .75rem;   /* 12px */

  /* Spacing (4px system) */
  --s-1:.25rem; --s-2:.5rem; --s-3:.75rem; --s-4:1rem; --s-5:1.25rem; --s-6:1.5rem; --s-8:2rem; --s-10:2.5rem; --s-12:3rem; --s-16:4rem; --s-20:5rem; --s-24:6rem;

  --max: 1200px;
  --measure: 720px;
  --gutter: 96px;
  --radius: 8px;
  --shadow: 0 2px 4px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.25);

  --dur-fast: 100ms; --dur: 150ms; --dur-slow: 200ms;
  --ease-out: cubic-bezier(.2,0,0,1);
  --ease-in-out: cubic-bezier(.4,0,.2,1);
}
@media (max-width: 1023px) { :root { --gutter: 32px; } }
@media (max-width: 599px)  { :root { --gutter: 16px; --dur-fast:50ms; --dur:75ms; --dur-slow:100ms; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 104px; scroll-padding-bottom: 96px; }
body {
  margin: 0; background: var(--surface); color: var(--text);
  font-family: var(--font); font-size: var(--fs-body); font-weight: 400; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: var(--fs-h1); line-height: 1.15; letter-spacing: -.01em; }
h2 { font-size: var(--fs-h2); line-height: 1.2; }
h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 600; }
h4 { font-size: var(--fs-h4); line-height: 1.3; font-weight: 600; }
p { margin: 0 0 .75em; max-width: var(--measure); }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--plum-300); color: var(--midnight-500); }

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

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 1000;
  background: var(--btn-bg); color: var(--btn-text); padding: var(--s-3) var(--s-5);
  font-weight: 700; border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

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

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-block; margin: 0 0 var(--s-4);
  font-size: var(--fs-small); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.lead { font-size: var(--fs-body-lg); color: var(--text-muted); }
.muted { color: var(--text-muted); }
.display { font-size: var(--fs-display); line-height: 1.1; letter-spacing: -.015em; }
@media (max-width: 1023px) { .display { font-size: var(--fs-h1); } }
@media (max-width: 599px)  { .display, h1 { font-size: var(--fs-h2); } h2 { font-size: var(--fs-h3); } h3 { font-size: var(--fs-h4); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; min-width: 120px; padding: var(--s-3) var(--s-6);
  font: 700 var(--fs-body)/1.2 var(--font); text-decoration: none; cursor: pointer;
  border-radius: var(--radius); border: 2px solid transparent;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.btn-primary { background: var(--btn-bg); color: var(--btn-text); border-color: rgba(255,255,255,.35); }
.btn-primary:hover { background: var(--btn-bg-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--midnight-200); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-sm { min-height: 44px; min-width: 120px; padding: var(--s-2) var(--s-4); font-size: var(--fs-small); }
.btn:active { transform: translateY(1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.text-link { font-weight: 600; color: var(--link); }
.text-link span[aria-hidden] { display: inline-block; margin-left: .35em; transition: transform var(--dur) var(--ease-out); }
.text-link:hover span[aria-hidden] { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--header-bg); border-bottom: 1px solid rgba(255,255,255,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); min-height: 88px; }
.brand { display: inline-flex; align-items: center; min-height: 48px; }
.brand img { width: 150px; height: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--s-2); }
.primary-nav a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s-3);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: var(--fs-small); position: relative;
}
.primary-nav a:not(.btn)::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 8px; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-slow) var(--ease-out);
}
.primary-nav a:not(.btn):hover::after, .primary-nav a[aria-current="page"]::after { transform: scaleX(1); }
.primary-nav a[aria-current="page"] { color: var(--accent); }
.primary-nav .nav-cta { margin-left: var(--s-3); }
.primary-nav .nav-cta .btn { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1199px) { .primary-nav a:not(.btn) { padding: 0 var(--s-2); } .primary-nav a:not(.btn)::after { left: var(--s-2); right: var(--s-2); } .brand img { width: 130px; } }
.menu-toggle {
  display: none; align-items: center; gap: var(--s-2); min-height: 48px; min-width: 48px; padding: 0 var(--s-3);
  background: transparent; color: var(--text); border: 2px solid var(--card-border); border-radius: var(--radius);
  font: 600 var(--fs-small) var(--font); cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1023px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--header-bg); border-bottom: 1px solid var(--card-border); padding: var(--s-4) var(--gutter) var(--s-6); max-height: calc(100vh - 88px); overflow-y: auto; }
  .primary-nav.is-open { display: block; }
  .no-js .primary-nav { display: block; position: static; padding: 0 0 var(--s-4); }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav a:not(.btn) { display: flex; font-size: var(--fs-body); border-bottom: 1px solid var(--card-border); padding: 0 var(--s-2); }
  .primary-nav a:not(.btn)::after { left: var(--s-2); right: auto; width: 32px; bottom: 6px; }
  .primary-nav .nav-cta { margin: var(--s-4) 0 0; }
  .primary-nav .nav-cta .btn { width: 100%; }
  .header-inner { flex-wrap: wrap; min-height: 72px; }
  .brand img { width: 120px; }
}

/* ---------- Hero (cinematic, photo + dark gradient, text to one side) ---------- */
.hero { position: relative; isolation: isolate; background: var(--midnight-700); overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.95) brightness(.92); }

/* Cinematic motion (slow pan / push-in). Pausable, and off for reduced motion. */
@keyframes hero-pan  { from { transform: scale(1.14) translateX(4%); } to { transform: scale(1.14) translateX(-4%); } }
@keyframes hero-push { from { transform: scale(1); } to { transform: scale(1.18); } }
.hero-media--pan img  { animation: hero-pan 28s cubic-bezier(.4,0,.2,1) infinite alternate; will-change: transform; }
.hero-media--push img { animation: hero-push 26s cubic-bezier(.4,0,.2,1) infinite alternate; transform-origin: 30% 52%; will-change: transform; }
.hero.is-paused .hero-media img { animation-play-state: paused; }
.hero-media video { opacity: 0; transition: opacity 600ms ease; }
.hero-media.has-video video { opacity: 1; }
.hero-media.has-video img { opacity: 0; }
@media (min-width: 1024px) { .hero-media video { width: 72%; right: auto; } }

.motion-toggle {
  position: absolute; left: var(--gutter); bottom: var(--s-6); z-index: 2;
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4);
  background: rgba(6,11,25,.72); color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 999px;
  font: 600 var(--fs-small) var(--font); cursor: pointer;
}
.motion-toggle:hover { background: rgba(6,11,25,.9); }
.motion-toggle svg { width: 18px; height: 18px; }
.motion-toggle .i-play, .motion-toggle[aria-pressed="true"] .i-pause { display: none; }
.motion-toggle[aria-pressed="true"] .i-play { display: block; }
@media (max-width: 1023px) { .motion-toggle { top: var(--s-4); bottom: auto; left: auto; right: var(--s-4); } }

/* "We look forward to helping ___ succeed." */
.succeed { text-align: center; padding: var(--s-20) 0; }
.succeed-line { font-size: var(--fs-h1); line-height: 1.25; margin: 0 auto; max-width: none; }
.roller { display: inline-block; position: relative; vertical-align: bottom; height: 1.25em; overflow: hidden; transition: width 450ms cubic-bezier(.2,0,0,1); }
.roller-track { display: flex; flex-direction: column; align-items: flex-start; transition: transform 600ms cubic-bezier(.2,0,0,1); }
.roll-word { display: inline-block; height: 1.25em; white-space: nowrap; color: var(--accent); text-align: left;
  background-image: linear-gradient(var(--ic), var(--ic)); background-size: 100% 6px; background-position: 0 92%; background-repeat: no-repeat; }
.no-js .roller { height: auto; } .no-js .roll-word:not(:first-child) { display: none; }
.motion-toggle--inline { position: static; left: auto; margin-top: var(--s-6); background: transparent; color: var(--text); border-color: var(--field-border); }
.motion-toggle--inline:hover { background: rgba(255,255,255,.08); }
@media (max-width: 1023px) { .motion-toggle--inline { top: auto; } }
@media (max-width: 599px) { .succeed-line { font-size: var(--fs-h3); } }
@media (prefers-reduced-motion: reduce) { .hero-media img { animation: none !important; } }

.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; filter: saturate(.85) brightness(.8); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(6,11,25,.15) 0%, rgba(6,11,25,.55) 38%, rgba(6,11,25,.93) 58%, rgba(6,11,25,.98) 100%);
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; min-height: min(78vh, 760px); align-items: end; }
.hero-content { grid-column: 2; padding: var(--s-24) 0 var(--s-20); }
.hero-content .lead { color: var(--midnight-200); max-width: 34rem; }
.hero-content .btn-row { margin-top: var(--s-8); }
.hero--page .hero-inner { min-height: min(58vh, 560px); }
.hero--page .hero-content { padding: var(--s-20) 0 var(--s-16); }

@media (max-width: 1023px) {
  .hero::before { display: none; }
  .hero-media { bottom: auto; height: 58vh; }
  .hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,11,25,0) 35%, rgba(6,11,25,.88) 78%, var(--midnight-700) 100%); }
  .hero-media img { filter: saturate(.9) brightness(.85); }
  .hero-content { text-shadow: 0 1px 3px rgba(0,0,0,.6); }
  .hero-content .btn { text-shadow: none; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-content { grid-column: 1; padding: calc(58vh - 88px) 0 var(--s-12); }
  .hero--page .hero-content { padding: calc(58vh - 88px) 0 var(--s-10); }
  .hero--page .hero-media { height: 46vh; }
  .hero--page .hero-content { padding-top: calc(46vh - 72px); }
}

/* ---------- Sections ---------- */
.section { padding: var(--s-24) 0; }
.section--alt { background: var(--surface-alt); }
.section--band { background: var(--plum-500); }
.section--band .btn-primary { --btn-bg: #FFFFFF; --btn-bg-hover: var(--plum-50); --btn-text: var(--plum-500); border-color: #fff; }
.section--band .btn-ghost { border-color: #fff; }
.section--band .eyebrow { color: var(--plum-200); }
.section--band .lead, .section--band .muted { color: var(--plum-100); }
.section-head { max-width: var(--measure); margin-bottom: var(--s-12); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }
@media (max-width: 599px) { .section { padding: var(--s-16) 0; } .section-head { margin-bottom: var(--s-8); } }

.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1023px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 599px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-16); align-items: center; }
.split--wide-text { grid-template-columns: 1.1fr .9fr; }
@media (max-width: 1023px) { .split, .split--wide-text { grid-template-columns: 1fr; gap: var(--s-10); } }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: var(--s-8); box-shadow: var(--shadow); height: 100%;
}
.card h3 { font-size: var(--fs-h4); }
.card p:last-child { margin-bottom: 0; }
.card .num { display: block; font-size: var(--fs-small); font-weight: 700; letter-spacing: .08em; color: var(--accent); margin-bottom: var(--s-4); }
.card--accent { border-top: 6px solid var(--ic, var(--plum-500)); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s-6); margin: 0; padding: 0; }
.stat { border-left: 4px solid var(--plum-500); padding: var(--s-2) 0 var(--s-2) var(--s-6); }
.stat dt { font-size: var(--fs-small); color: var(--text-muted); order: 2; }
.stat dd { margin: 0 0 var(--s-1); font-size: var(--fs-h2); font-weight: 700; line-height: 1.1; }
.stat { display: flex; flex-direction: column; }
@media (max-width: 599px) { .stats { grid-template-columns: 1fr; } }

/* Media figure with photo */
.photo { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.photo::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); border-radius: inherit; }

/* Quote */
.quote { margin: var(--s-8) 0 0; padding: var(--s-6) var(--s-8); border-left: 6px solid var(--plum-500); background: rgba(255,255,255,.03); border-radius: 0 var(--radius) var(--radius) 0; }
.quote p { font-size: var(--fs-h4); font-weight: 600; line-height: 1.4; margin: 0; }
.quote footer { margin-top: var(--s-3); color: var(--text-muted); font-size: var(--fs-small); }

/* Check lists / compare */
.list-check, .list-x { list-style: none; margin: 0; padding: 0; }
.list-check li, .list-x li { position: relative; padding: var(--s-3) 0 var(--s-3) var(--s-10); border-bottom: 1px solid var(--card-border); }
.list-check li:last-child, .list-x li:last-child { border-bottom: 0; }
.list-check li::before, .list-x li::before { position: absolute; left: 0; top: var(--s-3); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-small); }
.list-check li::before { content: "✓"; background: var(--plum-500); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.list-x li::before { content: "✕"; background: rgba(255,255,255,.1); color: var(--midnight-200); }
.card--highlight { border: 2px solid var(--plum-500); box-shadow: 0 0 0 1px rgba(255,255,255,.2), var(--shadow); }

/* Chips */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-3); margin: 0; padding: 0; }
.chips li { padding: var(--s-2) var(--s-4); border: 1px solid var(--field-border); border-radius: 999px; font-size: var(--fs-small); font-weight: 600; color: var(--midnight-100); }

/* Values */
.values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-4); counter-reset: v; }
.values li { counter-increment: v; display: flex; align-items: center; gap: var(--s-4); padding: var(--s-5) var(--s-6); background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); font-weight: 600; }
.values li::before { content: counter(v, decimal-leading-zero); color: var(--accent); font-weight: 700; font-size: var(--fs-small); letter-spacing: .08em; }

/* ---------- 7-interfaces orbit (home) ---------- */
.orbit-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-16); align-items: center; }
.orbit { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin: 0 auto; }
.orbit-ring { position: absolute; inset: 12%; border-radius: 50%; border: 1px dashed rgba(255,255,255,.3); }
.orbit-core { position: absolute; inset: 34%; border-radius: 50%; display: grid; place-items: center; text-align: center; background: var(--plum-500); color: #fff; border: 2px solid rgba(255,255,255,.35); box-shadow: 0 0 0 8px rgba(109,37,108,.25), var(--shadow); padding: var(--s-2); }
.orbit-core strong { display: block; font-size: var(--fs-h4); line-height: 1.1; }
.orbit-core span { display: block; font-size: var(--fs-caption); color: var(--plum-100); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.orbit ul { list-style: none; margin: 0; padding: 0; }
.orbit li { position: absolute; left: calc(50% + 38% * var(--x)); top: calc(50% + 38% * var(--y)); transform: translate(-50%, -50%); }
.orbit-node {
  display: grid; place-items: center; gap: 2px; width: 104px; min-height: 64px; padding: var(--s-2);
  background: var(--ic); color: var(--ic-on); border: 2px solid var(--ic); border-radius: var(--radius);
  font: 600 var(--fs-caption)/1.25 var(--font); text-align: center; cursor: pointer;
  transition: background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.orbit-node i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: 0; display: block; }
.orbit-node:hover { transform: scale(1.05); }
.orbit-node[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--text); transform: scale(1.08); }
.orbit-node[aria-pressed="true"] i { opacity: 1; }
.orbit-caption { min-height: 220px; }

@media (max-width: 1023px) { .orbit-wrap { grid-template-columns: 1fr; gap: var(--s-10); } }
@media (max-width: 479px) { .orbit-node { width: 84px; font-size: 11px; min-height: 56px; } }

/* Interface color assignments */
/* Official interface colors (exact hex). --ic-on is the text color that passes AA on that fill. */
[data-ic="students"]    { --ic: #6D256C; --ic-on: #FFFFFF; }
[data-ic="instructors"] { --ic: #1D68B0; --ic-on: #FFFFFF; }
[data-ic="parents"]     { --ic: #E7A537; --ic-on: #111729; }
[data-ic="admin"]       { --ic: #3F7F5E; --ic-on: #FFFFFF; }
[data-ic="staff"]       { --ic: #BD1F44; --ic-on: #FFFFFF; }
[data-ic="network"]     { --ic: #CA6A47; --ic-on: #111729; }
[data-ic="community"]   { --ic: #259FA2; --ic-on: #111729; }
.ic-pill, .ic-card .ic-who, .tabpanel .ic-who, .orbit-caption .ic-label {
  display: inline-block; width: auto; padding: 3px var(--s-3); border-radius: 6px; line-height: 1.35;
  background: var(--ic); color: var(--ic-on) !important; font-size: var(--fs-caption); font-weight: 700; letter-spacing: .04em;
}

/* Interface cards (home) */
.ic-card { display: flex; flex-direction: column; }
.ic-card .ic-who { margin-bottom: var(--s-3); justify-self: start; align-self: flex-start; }
.ic-card h3 { display: flex; align-items: center; gap: var(--s-3); }
.ic-card h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ic); flex: none; }

/* ---------- Interfaces explorer (tabs) ---------- */
.tabs { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: var(--s-10); align-items: start; }
.tablist { display: flex; flex-direction: column; gap: var(--s-2); position: sticky; top: 112px; }
.tab {
  display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: var(--s-3) var(--s-4);
  background: transparent; color: var(--text); border: 1px solid var(--card-border); border-left: 6px solid var(--ic); border-radius: var(--radius);
  font: 600 var(--fs-body) var(--font); text-align: left; cursor: pointer; transition: background-color var(--dur) var(--ease-out);
}
.tab small { display: block; font-weight: 400; font-size: var(--fs-caption); color: var(--text-muted); }
.tab:hover { background: rgba(255,255,255,.05); }
.tab[aria-selected="true"] { background: var(--card); border-color: var(--text); border-left-color: var(--ic); border-left-width: 6px; }
.tabpanel { background: var(--card); border: 1px solid var(--card-border); border-top: 6px solid var(--ic); border-radius: var(--radius); padding: var(--s-10); box-shadow: var(--shadow); }
.tabpanel .ic-who { text-transform: uppercase; }
.tabpanel h2 { margin-top: var(--s-2); }
.tabpanel h3 { font-size: var(--fs-h4); color: var(--text); }
.no-js .tabpanel[hidden] { display: block; margin-bottom: var(--s-6); }
@media (max-width: 1023px) {
  .tabs { grid-template-columns: 1fr; }
  .tablist { position: static; flex-direction: row; overflow-x: auto; padding-bottom: var(--s-2); }
  .tab { min-width: 180px; }
  .tabpanel { padding: var(--s-6); }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s-6); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
@media (max-width: 599px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: var(--s-2); }
.field label, .field legend { font-weight: 600; font-size: var(--fs-small); }
.req { color: var(--accent); }
.hint { font-size: var(--fs-small); color: var(--text-muted); margin: 0; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea, input[type="file"] {
  width: 100%; min-height: 48px; padding: var(--s-3) var(--s-4);
  font: 400 var(--fs-body) var(--font); color: var(--text); background: var(--field-bg);
  border: 1px solid var(--field-border); border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
textarea { min-height: 140px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: var(--s-10); }
select option { background: var(--midnight-600); color: var(--white); }
input:hover, select:hover, textarea:hover { border-color: var(--midnight-200); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset legend { padding: 0; margin-bottom: var(--s-3); }
.choices { display: grid; gap: var(--s-2); }
.choice { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; }
.choice input { width: 22px; height: 22px; accent-color: var(--plum-300); flex: none; margin: 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); border-width: 2px; }
.error-msg { color: var(--error); font-size: var(--fs-small); font-weight: 600; margin: 0; display: flex; gap: var(--s-2); }
.error-msg::before { content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--error); color: var(--midnight-500); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.error-summary { border: 2px solid var(--error); border-radius: var(--radius); padding: var(--s-5) var(--s-6); background: rgba(255,152,163,.08); }
.error-summary h2 { font-size: var(--fs-h4); margin-bottom: var(--s-2); }
.error-summary ul { margin: 0; padding-left: var(--s-5); }
.error-summary a { color: var(--error); font-weight: 600; }
.form-success { border: 2px solid var(--success); border-radius: var(--radius); padding: var(--s-5) var(--s-6); background: rgba(158,206,178,.08); }
.form-success h2 { font-size: var(--fs-h4); color: var(--success); margin-bottom: var(--s-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: var(--s-10); box-shadow: var(--shadow); }
@media (max-width: 599px) { .form-card { padding: var(--s-6); } }

/* ---------- Prose (policy pages) ---------- */
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--fs-h3); margin-top: var(--s-12); }
.prose h3 { font-size: var(--fs-h4); margin-top: var(--s-8); }
.prose ul { padding-left: var(--s-6); }
.prose li { margin-bottom: var(--s-2); }
.notice { border: 1px solid var(--amber-300); background: rgba(233,183,111,.08); border-radius: var(--radius); padding: var(--s-5) var(--s-6); margin-bottom: var(--s-8); }
.notice strong { color: var(--amber-300); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 20ch; margin: 0 auto var(--s-4); }
.cta-band p { margin: 0 auto var(--s-8); }
.cta-band .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--header-bg); border-top: 1px solid rgba(255,255,255,.06); padding: var(--s-16) 0 var(--s-8); font-size: var(--fs-small); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--s-10); }
.footer-grid h2 { font-size: var(--fs-small); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s-4); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 44px; color: var(--midnight-100); text-decoration: none; }
.footer-grid li a:hover { color: var(--white); text-decoration: underline; }
.footer-brand img { width: 150px; margin-bottom: var(--s-4); }
.footer-brand p { color: var(--text-muted); max-width: 30ch; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1px solid var(--card-border); color: var(--text-muted); }
.footer-bottom a { color: var(--midnight-100); }
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-6); margin: 0; padding: 0; }
@media (max-width: 1023px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .footer-grid { grid-template-columns: 1fr; gap: var(--s-8); } }

/* ---------- Reveal-on-scroll (subtle, opt-in) ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------- Windows High Contrast / forced colors ---------- */
@media (forced-colors: active) {
  .btn, .tab, .orbit-node, .card, .tabpanel, .a11y-fab, .a11y-panel { border: 2px solid CanvasText; }
  .hero::before { background: Canvas; opacity: .85; }
  .orbit-node[aria-pressed="true"], .tab[aria-selected="true"] { outline: 3px solid Highlight; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .a11y-fab, .a11y-panel, .hero-media, .skip-link, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .hero::before { display: none; }
  .hero-content { padding: 0; }
  a { color: #000; }
  .card, .tabpanel, .form-card { box-shadow: none; border: 1px solid #999; background: #fff; }
  * { color: #000 !important; }
}

/* ---------- Interlocking rings logo (home) ---------- */
.rings { position: relative; --rings-bg: #FFFFFF; }
.rings-panel { background: var(--rings-bg); border-radius: 24px; padding: var(--s-10) var(--s-6) var(--s-6); box-shadow: var(--shadow); }
.rings-stage { position: relative; width: min(100%, 600px); margin: 0 auto; }
.rings-svg { display: block; width: 100%; height: auto; }
.rings-svg .dim { fill: var(--rings-bg); opacity: .78; display: none; pointer-events: none; }
.rings-svg .dim.is-on { display: inline; }
.rings-svg .ring-hit { fill: transparent; stroke: none; pointer-events: fill; cursor: pointer; }
.rings-svg .ring-label { font-family: var(--font); font-weight: 600; letter-spacing: 1px; fill: var(--midnight-500); pointer-events: none; transition: opacity var(--dur-slow) var(--ease-out); }
.rings-svg .ring-label--center { font-size: 58px; font-weight: 700; letter-spacing: 1px; }
.rings[data-active] .rings-svg .ring-label:not(.is-on) { opacity: .25; }
.rings-spots { list-style: none; margin: 0; padding: 0; }
.ring-spot { position: absolute; transform: translate(-50%, -50%); aspect-ratio: 1; border-radius: 50%; display: block; }
.ring-spot:focus-visible { outline: 3px solid var(--plum-600); outline-offset: 4px; }
.rings-hint { text-align: center; margin: var(--s-4) auto 0; color: #4A5068; font-size: var(--fs-small); }
.ring-pop {
  position: absolute; z-index: 5; width: 300px; padding: var(--s-6);
  background: var(--midnight-600); color: #FFFFFF; border: 1px solid rgba(255,255,255,.14); border-top: 6px solid var(--ic, var(--plum-500));
  border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.45);
}
.ring-pop[hidden] { display: none; }
.ring-pop p { margin: 0 0 var(--s-2); }
.ring-pop-name { font-size: var(--fs-h4); font-weight: 700; line-height: 1.25; }
.ring-pop-desc { color: var(--midnight-200); font-size: var(--fs-small); }
.ring-pop-link { color: var(--plum-200); font-size: var(--fs-small); }
@media (max-width: 899px) {
  .ring-pop { position: static; width: auto; margin-top: var(--s-4); }
  .rings-panel { padding: var(--s-6) var(--s-3) var(--s-4); }
}
@media (forced-colors: active) { .rings-svg .ring-label { fill: CanvasText; } }
.hint-touch { display: none; }
@media (hover: none) { .hint-hover { display: none; } .hint-touch { display: inline; } }

/* ---------- Social links ---------- */
.social { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-3); }
.social a {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-width: 44px; min-height: 44px; border-radius: 999px; border: 1px solid var(--field-border);
  color: var(--text); text-decoration: none; transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.social a:hover { background: var(--plum-500); border-color: var(--plum-500); color: #fff; }
.social svg { width: 20px; height: 20px; flex: none; }
.social--footer .social-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.social--footer a { width: 44px; padding: 0; }
.social--labeled a { padding: 0 var(--s-4) 0 var(--s-3); font-weight: 600; font-size: var(--fs-small); }
.footer-grid .social li a { min-height: 44px; }

/* ---------- Resources page ---------- */
.media-frame { margin: 0; width: 100%; max-width: 560px; justify-self: center; }
.media-frame video { display: block; width: 100%; height: auto; aspect-ratio: 1; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.media-frame figcaption { margin-top: var(--s-3); color: var(--text-muted); font-size: var(--fs-small); text-align: center; }
.resource-card { display: flex; flex-direction: column; gap: var(--s-2); }
.resource-card h3 { margin-bottom: 0; }
.resource-card .btn-row { margin-top: auto; padding-top: var(--s-4); }
.resource-art { width: 100%; height: 200px; border-radius: var(--radius); margin-bottom: var(--s-4); }
.resource-art--video { display: grid; place-items: center; align-content: center; gap: var(--s-2); background: linear-gradient(135deg, var(--plum-600), var(--plum-800)); color: #fff; font-weight: 700; }
.resource-art--video svg { width: 64px; height: 64px; padding: 14px; border-radius: 50%; background: rgba(255,255,255,.18); }
.resource-art--doc { object-fit: cover; object-position: top; background: #fff; border: 1px solid var(--card-border); }
.form-status { margin: 0; padding: var(--s-4) var(--s-5); border: 2px solid var(--error); border-radius: var(--radius); color: var(--text); font-weight: 600; background: rgba(255,152,163,.08); }
