/* ============================================================
   THE UNFOLLOWOLOGY INSTITUTE — site.css
   One stylesheet for every page. Edit the tokens below to retheme.
   ============================================================ */

/* Self-hosted fonts (SIL Open Font License) */
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url('../fonts/archivo-var.woff2') format('woff2-variations'), url('../fonts/archivo-var.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 400; src: url('../fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 500; src: url('../fonts/jetbrains-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 700; src: url('../fonts/jetbrains-mono-700.woff2') format('woff2'); }

:root {
  --navy: #0A1633;
  --navy-2: #11224A;
  --blue: #1E3FD8;
  --teal: #12B8AE;
  --teal-deep: #0E978F;   /* background where white headlines sit */
  --teal-ink: #0A7C76;    /* teal for small text on light backgrounds */
  --green: #C6F432;       /* "eerie green" */
  --lava: #FF4A2E;
  --cloud: #F1F4F6;
  --white: #FFFFFF;
  --ink: #0A1633;
  --ink-2: #2E3A55;
  --ink-3: #4A5672;
  --mist: #C9D3E8;        /* body text on navy */
  --line: rgba(10, 22, 51, 0.12);
  --line-dark: rgba(255, 255, 255, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-btn: 8px;
  --lift: 0 24px 60px -28px rgba(10, 22, 51, 0.35);
  --display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --gutter: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--cloud); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; }
img, svg, canvas { max-width: 100%; }
a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.on-dark :focus-visible, .section--navy :focus-visible, .section--blue :focus-visible, .section--teal :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--green); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { margin: 0; }
button { font: inherit; }
.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: 12px; top: -60px; background: var(--green); color: var(--navy); padding: 10px 14px; border-radius: var(--radius-btn); z-index: 100; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- layout ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap--narrow { max-width: 860px; }
.wrap--mid { max-width: 1080px; }
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.section--white { background: var(--white); }
.section--cloud { background: var(--cloud); }
.section--navy { background: var(--navy); color: var(--mist); }
.section--blue { background: var(--blue); color: #E3E9FF; }
.section--teal { background: var(--teal-deep); color: var(--navy); }
.section--green { background: var(--green); color: var(--navy); }
/* Headlines are always white on dark/teal grounds */
.section--navy :is(h1, h2, h3, .h-display, .h1, .h2, .h3),
.section--blue :is(h1, h2, h3, .h-display, .h1, .h2, .h3),
.section--teal :is(h1, h2, h3, .h-display, .h1, .h2, .h3),
.on-dark :is(h1, h2, h3, .h-display, .h1, .h2, .h3) { color: var(--white); }
.section--teal .card :is(h1, h2, h3, .h1, .h2, .h3), .section--blue .card :is(h1, h2, h3, .h1, .h2, .h3), .section--navy .card :is(h1, h2, h3, .h1, .h2, .h3) { color: var(--navy); }
.section--teal a:not(.btn) { color: var(--navy); }

.stack { display: flex; flex-direction: column; gap: 20px; }
.stack--sm { gap: 12px; }
.stack--lg { gap: 32px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(32px, 5vw, 56px); align-items: start; }
.split--center { align-items: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 22px; }
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--narrow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: clamp(28px, 4vw, 40px); }
.section-head > div { display: flex; flex-direction: column; gap: 14px; }

/* ---------- type ---------- */
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-ink); }
.section--navy .eyebrow, .section--blue .eyebrow, .on-dark .eyebrow { color: var(--green); }
.section--teal .eyebrow { color: var(--navy); }
.h-display { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(44px, 6.4vw, 92px); line-height: 0.92; letter-spacing: -0.03em; text-transform: uppercase; }
.h1 { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(38px, 5vw, 68px); line-height: 0.95; letter-spacing: -0.028em; text-transform: uppercase; }
.h2 { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(32px, 4.2vw, 56px); line-height: 0.96; letter-spacing: -0.025em; text-transform: uppercase; }
.h3 { font-family: var(--display); font-stretch: 112%; font-weight: 900; font-size: clamp(21px, 2vw, 25px); line-height: 1.08; letter-spacing: -0.012em; }
.h4 { font-weight: 800; font-size: 18px; line-height: 1.25; }
.hl { color: var(--green); }
.hl-blue { color: var(--blue); }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 36em; }
.section--navy .lede, .on-dark .lede { color: var(--mist); }
.section--blue .lede { color: #E3E9FF; }
.section--teal .lede { color: var(--navy); font-weight: 500; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.fine { font-size: 13px; color: var(--ink-3); }
.section--navy .fine, .on-dark .fine { color: var(--mist); }
.mono { font-family: var(--mono); }
.quote { font-weight: 800; font-size: clamp(19px, 2vw, 23px); line-height: 1.25; }
.prose { max-width: 42em; font-size: 17px; }
.prose h2 { font-family: var(--display); font-stretch: 112%; font-weight: 900; font-size: 24px; margin: 1.6em 0 0.5em; }
.prose h3 { font-weight: 800; font-size: 18px; margin: 1.4em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }

/* ---------- tags ---------- */
.tag { display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; padding: 5px 9px; border-radius: 6px; text-transform: uppercase; line-height: 1.3; }
.tag--teal { background: var(--teal); color: var(--navy); }
.tag--navy { background: var(--navy); color: var(--white); }
.tag--green { background: var(--green); color: var(--navy); }
.tag--lava { background: var(--lava); color: var(--navy); }
.tag--line { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 13px 22px; border: 0; border-radius: var(--radius-btn); font-family: var(--body); font-weight: 800; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease, color .15s ease; text-align: center; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--lava { background: var(--lava); color: var(--navy); }
.btn--lava:hover { background: #FF6346; color: var(--navy); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-2); color: var(--white); }
.btn--green { background: var(--green); color: var(--navy); }
.btn--green:hover { background: #D3FA55; color: var(--navy); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(10,22,51,0.25); }
.btn--ghost:hover { background: rgba(10,22,51,0.05); color: var(--ink); }
.on-dark .btn--ghost, .section--navy .btn--ghost, .section--blue .btn--ghost { color: var(--white); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4); }
.on-dark .btn--ghost:hover, .section--navy .btn--ghost:hover, .section--blue .btn--ghost:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.btn--big { min-height: 56px; padding: 16px 28px; font-size: 17px; text-transform: uppercase; letter-spacing: 0.02em; font-weight: 900; }
.btn--sm { min-height: 44px; padding: 10px 16px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.link-arrow { font-weight: 800; }
.section--navy .link-arrow, .section--blue .link-arrow, .on-dark .link-arrow { color: var(--white); text-decoration-color: var(--teal); }

/* ---------- cards ---------- */
.card { background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 30px); display: flex; flex-direction: column; gap: 14px; }
.card--cloud { background: var(--cloud); }
.card--lift { box-shadow: var(--lift); border-color: transparent; }
.card--green { background: var(--green); border-color: transparent; }
.card--navy { background: var(--navy); color: var(--mist); border-color: transparent; }
.card--navy :is(h2, h3, .h3) { color: var(--white); }
.card--plain { border: 0; }
a.card { text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--lift); color: var(--ink); }
.card .card-foot { margin-top: auto; font-weight: 800; }
.card-label { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal-ink); }
.card--navy .card-label { color: var(--teal); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.on-dark .divider, .section--navy .divider { background: var(--line-dark); }

/* ---------- header ---------- */
.status-strip { background: var(--green); color: var(--navy); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; }
.status-strip .wrap { padding-top: 8px; padding-bottom: 8px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; }
.site-header { background: var(--navy); color: var(--white); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.brand:hover { color: var(--white); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-stretch: 125%; font-weight: 900; font-size: 19px; letter-spacing: -0.01em; text-transform: uppercase; }
.brand-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--teal); margin-top: 4px; }
.site-nav { display: flex; align-items: center; gap: 6px 24px; font-size: 14px; font-weight: 600; }
.site-nav a { color: var(--white); text-decoration: none; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--green); }
.site-nav .btn { padding: 10px 16px; min-height: 44px; font-size: 14px; }
.nav-toggle { display: none; background: transparent; color: var(--white); border: 0; min-height: 44px; min-width: 44px; padding: 8px 10px; cursor: pointer; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; border-radius: var(--radius-btn); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3); }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; border-top: 1px solid var(--line-dark); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid var(--line-dark); font-size: 16px; }
  .site-nav .btn { margin-top: 14px; border-bottom: 0; }
}

/* ---------- page hero (inner pages) ---------- */
.page-hero { background: var(--navy); color: var(--mist); padding: clamp(48px, 7vw, 88px) 0 clamp(44px, 6vw, 72px); }
.page-hero .h1, .page-hero .h-display { color: var(--white); }
.page-hero .lede { color: var(--mist); }
.crumbs { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; color: var(--teal); margin-bottom: 18px; }
.crumbs a { color: var(--teal); text-decoration: none; }
.crumbs a:hover { color: var(--green); }

/* ---------- interactive pieces ---------- */
.panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--lift); padding: clamp(22px, 3.4vw, 36px); display: flex; flex-direction: column; gap: 18px; color: var(--ink); }
.panel-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-2); text-transform: uppercase; }
.progress { height: 8px; background: #E3E8EE; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--teal); border-radius: 99px; transition: width .35s ease; }
.prompt { font-weight: 800; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.22; letter-spacing: -0.01em; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; min-height: 48px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.choice:hover { border-color: rgba(10,22,51,0.35); background: #FAFBFC; }
.choice .key { font-family: var(--mono); font-weight: 700; font-size: 14px; padding-top: 1px; min-width: 1.2em; }
.choice[aria-pressed="true"], .choice.is-selected { background: var(--navy); color: var(--green); border-color: var(--navy); }
.choice.is-correct { background: #EAFBF9; border-color: var(--teal); color: var(--ink); }
.choice.is-wrong { background: #FFF1EE; border-color: var(--lava); color: var(--ink); }
.choice[disabled] { cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: rgba(10,22,51,0.35); }
.chip[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.note { background: var(--navy); color: var(--white); border-radius: var(--radius-sm); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.note-label { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--green); text-transform: uppercase; }
.note--soft { background: var(--cloud); color: var(--ink); }
.note--soft .note-label { color: var(--teal-ink); }

/* forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 14px; font-weight: 700; }
.field .hint { font-size: 13px; color: var(--ink-3); }
.input, .select, .textarea { font: inherit; font-size: 16px; width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid rgba(10,22,51,0.22); background: var(--white); color: var(--ink); }
.textarea { min-height: 110px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 3px solid rgba(30,63,216,0.35); outline-offset: 0; border-color: var(--blue); }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--teal-ink); min-height: 44px; }
.range-row output { font-family: var(--mono); font-weight: 700; min-width: 4.5em; text-align: right; }
.checks { display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--white); cursor: pointer; min-height: 48px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal-ink); flex-shrink: 0; }

/* results */
.result { display: flex; flex-direction: column; gap: 22px; }
.index-figure { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(72px, 12vw, 140px); line-height: 0.85; letter-spacing: -0.04em; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; border-radius: 99px; overflow: hidden; }
.scale > span { height: 14px; }
.scale-labels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.25; color: var(--ink-2); }
.findings { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.findings li { padding: 14px 16px; background: var(--cloud); border-radius: var(--radius-sm); }
.findings li .mono { font-size: 11px; font-weight: 700; color: var(--teal-ink); letter-spacing: 0.1em; display: block; margin-bottom: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.stat { background: var(--cloud); border-radius: var(--radius-sm); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.stat-k { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.stat-v { font-family: var(--display); font-stretch: 112%; font-weight: 900; font-size: 26px; line-height: 1.1; }
.canvas-preview { width: 100%; height: auto; display: block; border-radius: var(--radius-sm); background: var(--cloud); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 200; }
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
[hidden] { display: none !important; }

/* chat (simulator) */
.chat { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.45; }
.bubble-meta { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-3); margin-bottom: 4px; }
.bubble--them { align-self: flex-start; background: var(--cloud); border-bottom-left-radius: 6px; }
.bubble--you { align-self: flex-end; background: var(--blue); color: var(--white); border-bottom-right-radius: 6px; }
.bubble--you .bubble-meta { color: #C9D6FF; }
.bubble--system { align-self: center; max-width: 100%; background: transparent; font-family: var(--mono); font-size: 12px; color: var(--ink-3); text-align: center; }

/* documents: memos, statements, studies */
.doc { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); padding: clamp(24px, 4vw, 44px); font-family: var(--mono); font-size: 14px; line-height: 1.75; color: var(--ink); position: relative; }
.doc--lift { box-shadow: var(--lift); border-color: transparent; }
.doc-head { font-weight: 700; letter-spacing: 0.08em; }
.doc-meta { color: var(--ink-2); margin-top: 10px; }
.doc hr { border: 0; height: 1px; background: rgba(10,22,51,0.2); margin: 16px 0; }
.doc p { margin: 0 0 12px; }
.doc .doc-serif { font-family: var(--body); font-size: 17px; line-height: 1.6; }
.stamp { position: absolute; right: 22px; top: 22px; border: 2px solid var(--lava); color: var(--lava); padding: 4px 10px; font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.16em; transform: rotate(-7deg); border-radius: 4px; pointer-events: none; }
.stamp--teal { border-color: var(--teal-ink); color: var(--teal-ink); }

/* study (research) */
.study { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.study summary { list-style: none; cursor: pointer; padding: clamp(22px, 3vw, 30px); display: flex; flex-direction: column; gap: 10px; }
.study summary::-webkit-details-marker { display: none; }
.study summary:hover { background: #FAFBFC; }
.study-toggle { font-weight: 800; font-size: 14px; }
.study[open] .study-toggle::after { content: " (close)"; font-weight: 500; color: var(--ink-3); }
.study-body { padding: 0 clamp(22px, 3vw, 30px) clamp(22px, 3vw, 30px); display: grid; gap: 18px; }
.study-body dl { margin: 0; display: grid; gap: 14px; }
.study-body dt { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--teal-ink); text-transform: uppercase; }
.study-body dd { margin: 4px 0 0; color: var(--ink-2); }

/* faculty */
.monogram { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-stretch: 125%; font-weight: 900; font-size: 26px; flex-shrink: 0; }
.mono-teal { background: var(--teal); color: var(--navy); }
.mono-lava { background: var(--lava); color: var(--navy); }
.mono-blue { background: var(--blue); color: var(--white); }
.mono-green { background: var(--green); color: var(--navy); }

/* hero diagram */
.fig { margin: 0; background: var(--navy-2); border-radius: var(--radius); padding: 22px; border: 1px solid rgba(18,184,174,0.35); }
.fig-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--teal); margin-bottom: 10px; }
.fig figcaption { margin-top: 14px; font-size: 13px; color: var(--mist); border-top: 1px solid rgba(18,184,174,0.3); padding-top: 12px; }
@keyframes unfDrift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(8px, 10px); } }
.unf-lone { animation: unfDrift 6s ease-in-out infinite; transform-box: fill-box; cursor: pointer; }

/* disclosure band + footer */
.band { background: var(--teal-deep); color: var(--navy); }
.band .wrap { padding-top: 36px; padding-bottom: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.band-title { font-stretch: 125%; font-weight: 900; font-size: clamp(22px, 2.6vw, 30px); line-height: 1; text-transform: uppercase; color: var(--white); }
.band p { margin: 8px 0 0; font-weight: 500; max-width: 42em; }
.site-footer { background: var(--navy); color: var(--mist); }
.site-footer .wrap { padding-top: 56px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 36px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand { display: flex; gap: 16px; align-items: center; }
.footer-name { font-stretch: 125%; font-weight: 900; font-size: 22px; color: var(--white); text-transform: uppercase; }
.footer-motto { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--green); }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 40px; font-size: 14px; font-weight: 600; }
@media (min-width: 900px) { .footer-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.footer-nav a { color: var(--white); text-decoration: none; padding: 4px 0; }
.footer-nav a:hover { color: var(--green); }
.footer-legal { margin: 0; font-size: 14px; max-width: 52em; border-top: 1px solid rgba(201,211,232,0.25); padding-top: 24px; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; }
.footer-meta button { background: none; border: 0; color: var(--mist); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* newsletter form */
.signup { background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: var(--lift); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 16px; }
.signup-title { font-stretch: 125%; font-weight: 900; font-size: 30px; line-height: 1; text-transform: uppercase; }
.signup-fine { font-family: var(--mono); font-size: 12px; line-height: 1.8; color: var(--ink-2); }
.signup-msg { border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 600; font-size: 15px; }
.signup-msg--ok { background: #EAFBF9; color: var(--ink); }
.signup-msg--err { background: #FFF1EE; color: var(--ink); }

/* utility */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.center { text-align: center; }
.max-36 { max-width: 36em; }
.nowrap { white-space: nowrap; }

@media print {
  .site-header, .status-strip, .band, .site-footer, .no-print, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .doc { border: 0; box-shadow: none; }
  .page-hero { background: #fff; color: #000; padding: 0 0 20px; }
  .page-hero .h1, .page-hero .lede { color: #000; }
}

/* faculty portraits */
.portrait { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); display: block; background: var(--cloud); }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--cloud); }
.avatar--lg { width: 72px; height: 72px; }
.byline { display: flex; align-items: center; gap: 12px; }
.byline-name { font-weight: 800; line-height: 1.2; }
.byline-role { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-ink); }
.section--navy .byline-role, .on-dark .byline-role, .note .byline-role { color: var(--teal); }

@media (max-width: 640px) {
  .status-strip .wrap span:last-child { display: none; }
  .status-strip { font-size: 11px; }
  .brand-sub { display: none; }
  .brand svg { width: 38px; height: 38px; }
}

/* Long words in the wide face need a narrower width on phones */
.h-display, .h1, .h2, .h3, .index-figure, .signup-title, .band-title, .footer-name, .brand-name { overflow-wrap: break-word; }
@media (max-width: 560px) {
  .h-display { font-size: clamp(34px, 10.5vw, 46px); font-stretch: 110%; }
  .h1 { font-size: clamp(30px, 9vw, 40px); font-stretch: 108%; }
  .h2 { font-size: clamp(27px, 8vw, 36px); font-stretch: 108%; }
  .h3 { font-stretch: 100%; }
  .signup-title { font-size: 26px; font-stretch: 110%; }
  .footer-name { font-size: 18px; }
}
@media (max-width: 440px) { .scale-labels { font-size: 10px; gap: 3px; } .scale-labels > div { overflow-wrap: anywhere; } }

/* ============================================================
   v2 — sizing, depth, motion, illustrations, brand marks
   ============================================================ */
:root { --navy-deep: #060E24; }

/* Headline sizing: sized to the column they sit in, never to the window */
.split > .stack, .split > div, .hero-copy, .fit { container-type: inline-size; min-width: 0; }
.h-display { font-size: clamp(34px, 5vw, 72px); font-stretch: 118%; line-height: 0.94; text-wrap: balance; }
.h1 { font-size: clamp(30px, 3.9vw, 54px); font-stretch: 115%; text-wrap: balance; }
.h2 { font-size: clamp(28px, 3.3vw, 46px); font-stretch: 115%; text-wrap: balance; }
@supports (font-size: 1cqi) {
  .split > .stack .h-display, .split > div .h-display, .hero-copy .h-display, .fit .h-display { font-size: clamp(34px, 10.4cqi, 72px); }
  .split > .stack .h1, .split > div .h1, .fit .h1 { font-size: clamp(30px, 8.6cqi, 54px); }
  .split > .stack .h2, .split > div .h2, .fit .h2 { font-size: clamp(27px, 7.6cqi, 46px); }
}
.h-display, .h1, .h2 { overflow-wrap: normal; hyphens: manual; }

/* Darker hero ground so it separates from the navigation bar */
.hero-dark, .page-hero { background: var(--navy-deep); position: relative; overflow: hidden; isolation: isolate; }
.site-header { box-shadow: 0 1px 0 rgba(255,255,255,0.06); }

/* Ambient drifting dots behind dark heroes */
.ambient { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient span { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.07); animation: ambDrift 18s ease-in-out infinite; }
.ambient span:nth-child(3n) { background: rgba(18,184,174,0.22); }
.ambient span:nth-child(7) { background: var(--green); opacity: 0.6; width: 12px; height: 12px; }
@keyframes ambDrift { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(18px, -14px); } 66% { transform: translate(-12px, 10px); } }

/* Buttons: tactile, a bit of fun */
.btn { position: relative; overflow: hidden; transition: transform .18s cubic-bezier(.3,1.6,.5,1), background-color .15s ease, color .15s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(10,22,51,0.45); }
.btn:active { transform: translateY(1px) scale(0.98); box-shadow: none; }
.btn--lava::after, .btn--green::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent); transform: skewX(-18deg); transition: left .55s ease; }
.btn--lava:hover::after, .btn--green:hover::after { left: 120%; }
.btn .btn-arrow { display: inline-block; transition: transform .2s ease; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* Choice buttons in quizzes: colored letter keys, springy press, check pop */
.choice { position: relative; align-items: center; transition: transform .16s cubic-bezier(.3,1.6,.5,1), background-color .15s ease, border-color .15s ease, box-shadow .2s ease; }
.choice:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -16px rgba(10,22,51,0.5); border-color: rgba(10,22,51,0.2); }
.choice:active { transform: scale(0.985); }
.choice .key { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 34px; height: 34px; min-width: 34px; border-radius: 10px; padding: 0; background: var(--cloud); color: var(--navy); transition: transform .2s cubic-bezier(.3,1.6,.5,1), background-color .15s ease; }
.choices > :nth-child(4n+1) .key, .choices .choice:nth-of-type(4n+1) .key { background: #CFF3EF; }
.choices > :nth-child(4n+2) .key, .choices .choice:nth-of-type(4n+2) .key { background: #DCE4FF; }
.choices > :nth-child(4n+3) .key, .choices .choice:nth-of-type(4n+3) .key { background: #ECFBC4; }
.choices > :nth-child(4n+4) .key, .choices .choice:nth-of-type(4n+4) .key { background: #FFE0D9; }
.choice:hover .key { transform: rotate(-8deg) scale(1.08); }
.choice[aria-pressed="true"] .key, .choice.is-selected .key { background: var(--green); color: var(--navy); animation: keyPop .35s cubic-bezier(.3,1.8,.5,1); }
@keyframes keyPop { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }
.choice[aria-pressed="true"], .choice.is-selected { box-shadow: 0 14px 30px -18px rgba(10,22,51,0.7); }

/* Progress bar with a slow moving sheen */
.progress > span { background-image: linear-gradient(90deg, var(--teal), #4FD8CF, var(--teal)); background-size: 200% 100%; animation: sheen 3s linear infinite; }
@keyframes sheen { from { background-position: 0 0; } to { background-position: -200% 0; } }

/* View transitions inside panels */
.enter { animation: enterUp .38s cubic-bezier(.2,.8,.2,1) both; }
@keyframes enterUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pop-in { animation: popIn .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* Illustrations */
.illo { width: 100%; height: auto; display: block; }
.illo-frame { border-radius: var(--radius); background: var(--cloud); padding: 8px; }
.illo-sm { width: 120px; max-width: 34%; flex-shrink: 0; }
.illo-md { width: 200px; max-width: 100%; }
.il-wiggle, .il-bob, .il-rise, .il-flicker, .il-shake, .il-tick, .il-blink, .il-swing, .il-sway, .il-unroll, .il-glow, .il-twinkle, .il-grow, .il-type, .il-drop, .il-look, .il-ring, .il-pop, .il-march, .il-arrow, .il-wander, .il-steam, .il-stamp, .il-wave { transform-box: fill-box; transform-origin: center; }
.il-wiggle { animation: ilWiggle 2.6s ease-in-out infinite; }
.il-bob { animation: ilBob 3.2s ease-in-out infinite; }
.il-rise { animation: ilRise 3.4s ease-in infinite; }
.il-flicker { animation: ilFlicker 1.2s ease-in-out infinite; transform-origin: bottom center; }
.il-shake { animation: ilShake 2.4s ease-in-out infinite; }
.il-tick { animation: ilTick 4s steps(8) infinite; transform-box: view-box; }
.il-blink { animation: ilBlink 1.4s steps(2) infinite; }
.il-swing { animation: ilSwing 3s ease-in-out infinite; transform-box: view-box; }
.il-sway { animation: ilSway 3.6s ease-in-out infinite; transform-box: view-box; }
.il-unroll { animation: ilUnroll 4s ease-in-out infinite; transform-origin: top center; }
.il-glow { animation: ilGlow 3s ease-in-out infinite; }
.il-twinkle { animation: ilTwinkle 2.2s ease-in-out infinite; }
.il-grow { animation: ilGrow 3.6s ease-in-out infinite; transform-box: view-box; }
.il-type { animation: ilType 1.2s ease-in-out infinite; }
.il-drop { animation: ilDrop 2.4s ease-in infinite; }
.il-look { animation: ilLook 3s ease-in-out infinite; }
.il-ring { animation: ilRing 2.2s ease-in-out infinite; transform-box: view-box; }
.il-pop { animation: ilPop 2.2s ease-in-out infinite; }
.il-march { animation: ilBob 1.1s ease-in-out infinite; }
.il-arrow { animation: ilNudge 1.6s ease-in-out infinite; }
.il-wander { animation: ilWander 9s ease-in-out infinite; }
.il-steam { animation: ilBlink 1.6s ease-in-out infinite; }
.il-stamp { animation: ilStamp 4s cubic-bezier(.3,1.6,.5,1) infinite; }
.il-wave { animation: ilWave 1.5s ease-out infinite; opacity: 0; }
.il-d1 { animation-delay: .0s; } .il-d2 { animation-delay: .3s; } .il-d3 { animation-delay: .6s; }
@keyframes ilWiggle { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes ilBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes ilRise { 0% { transform: translateY(14px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-30px); opacity: 0; } }
@keyframes ilFlicker { 0%,100% { transform: scale(1, 1); } 50% { transform: scale(0.94, 1.08); } }
@keyframes ilShake { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(-6deg); } 78% { transform: rotate(6deg); } 82% { transform: rotate(-4deg); } 86% { transform: rotate(3deg); } }
@keyframes ilTick { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes ilBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.15; } }
@keyframes ilSwing { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-4deg); } }
@keyframes ilSway { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes ilUnroll { 0%,100% { transform: scaleY(0.96); } 50% { transform: scaleY(1.03); } }
@keyframes ilGlow { 0%,100% { opacity: 0.25; } 50% { opacity: 0.5; } }
@keyframes ilTwinkle { 0%,100% { transform: scale(0.7) rotate(0); opacity: .6; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }
@keyframes ilGrow { 0%,100% { transform: scaleY(0.94); } 50% { transform: scaleY(1.04); } }
@keyframes ilType { 0%,100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-6px); opacity: 1; } }
@keyframes ilDrop { 0% { transform: translateY(-10px); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(36px); opacity: 0; } }
@keyframes ilLook { 0%,100% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
@keyframes ilRing { 0%, 60%, 100% { transform: rotate(0); } 65% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } 85% { transform: rotate(-6deg); } }
@keyframes ilPop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@keyframes ilNudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes ilWander { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-46px, -4px); } }
@keyframes ilStamp { 0%, 40% { transform: translateY(-24px) scale(1.25); opacity: 0; } 55% { transform: translateY(0) scale(1); opacity: 1; } 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ilWave { 0% { opacity: 0; transform: translateX(-6px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(6px); } }

/* Card spot illustrations */
.card-illo { margin: -6px -6px 4px; border-radius: 12px; background: var(--cloud); overflow: hidden; }
.card-illo .illo { max-height: 150px; }
.card--green .card-illo { background: rgba(255,255,255,0.45); }
a.card:hover .card-illo .illo { transform: scale(1.03); }
.card-illo .illo { transition: transform .35s ease; }

/* The gold seal */
.seal-img { width: 100%; max-width: 220px; height: auto; display: block; filter: drop-shadow(0 14px 22px rgba(10,22,51,0.28)); }
.seal-spin { animation: sealFloat 6s ease-in-out infinite; }
@keyframes sealFloat { 0%,100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-6px); } }

/* The Detention Slip logo */
.ds-logo { display: inline-block; line-height: 0; text-decoration: none; transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.ds-logo:hover { transform: rotate(-2deg) scale(1.03); }
.ds-logo img { width: 100%; height: auto; display: block; }
.ds-logo--card { width: min(260px, 80%); }
.ds-logo--band { width: 170px; }
.ds-logo--footer { width: 150px; }
.ds-logo--hero { width: min(320px, 80%); }
.ds-link { font-weight: 800; text-decoration-color: #B90505; text-decoration-thickness: 2px; }

/* Footer animated emblem */
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px 48px; align-items: center; }
.footer-left { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.footer-orbit { justify-self: center; width: min(340px, 100%); }
.footer-orbit svg { width: 100%; height: auto; display: block; overflow: visible; }
.orb-ring-outer { animation: orbSpin 40s linear infinite; transform-origin: 160px 160px; }
.orb-ring-inner { animation: orbSpin 22s linear infinite reverse; transform-origin: 160px 160px; }
.orb-dot { animation: ilBob 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.orb-escape { animation: orbEscape 7s ease-in-out infinite; transform-origin: 160px 160px; }
.orb-trail { stroke-dasharray: 5 6; animation: orbDash 1.2s linear infinite; }
@keyframes orbSpin { to { transform: rotate(360deg); } }
@keyframes orbEscape { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(28deg); } }
@keyframes orbDash { to { stroke-dashoffset: -22; } }
@media (max-width: 700px) { .footer-orbit { width: 220px; } }

/* Respect reduced motion for all of the above */
@media (prefers-reduced-motion: reduce) {
  .ambient span, [class*="il-"], .seal-spin, .orb-ring-outer, .orb-ring-inner, .orb-dot, .orb-escape, .orb-trail, .progress > span { animation: none !important; }
  .il-rise, .il-drop, .il-stamp, .il-wave { opacity: 1 !important; }
}

/* Illustration floating in inner-page heroes (desktop) */
.hero-illo { display: none; }
@media (min-width: 980px) {
  .page-hero.has-illo .hero-illo { display: block; position: absolute; z-index: 0; top: 50%; transform: translateY(-50%); right: max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter))); width: clamp(240px, 24vw, 330px); }
  .page-hero.has-illo .hero-illo .illo { filter: drop-shadow(0 20px 30px rgba(0,0,0,0.35)); }
  .page-hero.has-illo > .wrap { position: relative; z-index: 1; }
  .page-hero.has-illo > .wrap > .stack, .page-hero.has-illo > .wrap > div:not(.crumbs) { max-width: min(700px, 60%); }
}
