:root {
  color-scheme: light;
  --canvas: #ffffff;
  --soft-canvas: #f5f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --secondary: #536176;
  --muted: #6d7b91;
  --border: #e2e7ef;
  --blue: #2455e6;
  --blue-hover: #1d46c4;
  --blue-soft: #eaf0ff;
  --focus: #173fc0;
  --ring: rgba(36, 85, 230, .16);
  --success: #16734a;
  --error: #ba2b39;
  --page-width: min(100% - 112px, 1360px);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #11151d;
  --soft-canvas: #131923;
  --panel: #171d29;
  --ink: #edf2fa;
  --secondary: #aebacd;
  --muted: #98a5b9;
  --border: #354158;
  --blue: #9bb5ff;
  --blue-hover: #b7c9ff;
  --blue-soft: #20345e;
  --focus: #b7c9ff;
  --ring: rgba(155, 181, 255, .22);
  --success: #78d6a8;
  --error: #ffb1b8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--canvas); }
body { min-width: 320px; margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; }
button, input, textarea { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.page-shell { width: var(--page-width); margin-inline: auto; }
.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; }
.skip-link { position: fixed; z-index: 100; top: -5rem; left: 1rem; padding: .75rem 1rem; background: var(--ink); color: var(--canvas); font-weight: 650; text-decoration: none; }
.skip-link:focus { top: 1rem; }

.site-header { position: relative; z-index: 10; min-height: 4.9rem; background: var(--canvas); border-bottom: 1px solid var(--border); }
.header-inner { width: var(--page-width); min-height: 4.9rem; margin-inline: auto; display: flex; align-items: center; }
.wordmark { flex: 0 0 auto; color: var(--ink); font-size: 1.82rem; font-weight: 700; letter-spacing: -.075em; line-height: 1; text-decoration: none; }
.desktop-nav { display: flex; align-items: center; gap: 2rem; margin-left: 4.2rem; }
.desktop-nav a { color: var(--secondary); font-size: .92rem; font-weight: 550; text-decoration: none; }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.theme-toggle { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: .55rem; color: var(--ink); background: transparent; }
.theme-toggle:hover, .menu-toggle:hover { background: var(--soft-canvas); }
.theme-toggle svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.moon-icon { display: none; }
html[data-theme="dark"] .sun-icon { display: none; }
html[data-theme="dark"] .moon-icon { display: block; }
.button { min-height: 3.05rem; display: inline-flex; align-items: center; justify-content: center; padding: .72rem 1.22rem; border: 1px solid transparent; border-radius: .55rem; font-size: .96rem; font-weight: 650; line-height: 1.2; text-decoration: none; transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--blue); color: #ffffff; }
.button-primary:hover { background: var(--blue-hover); }
html[data-theme="dark"] .button-primary { color: #11151d; }
.button-secondary { border-color: var(--border); background: var(--panel); color: var(--blue); }
.button-secondary:hover { border-color: var(--blue); background: var(--blue-soft); }
.header-cta { min-height: 2.95rem; padding-inline: 1.1rem; font-size: .9rem; }
.menu-toggle { display: none; }
.mobile-nav[hidden] { display: none; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
h1 { margin: 1.35rem 0 1.25rem; font-size: clamp(3.55rem, 4.8vw, 4.58rem); font-weight: 700; letter-spacing: -.068em; line-height: .99; }
h1 span { display: block; }
.eyebrow { margin: 0; color: #6b7f9e; font-size: .76rem; font-weight: 700; letter-spacing: .19em; line-height: 1.2; text-transform: uppercase; }
html[data-theme="dark"] .eyebrow { color: #aebacd; }
.lede, .hero-lede { margin: 0; color: var(--secondary); font-size: clamp(1.12rem, 1.75vw, 1.45rem); font-weight: 400; letter-spacing: -.033em; line-height: 1.42; }
.lede { max-width: 44rem; }
.text-link { display: inline-flex; align-items: center; gap: .62rem; color: var(--blue); font-size: .96rem; font-weight: 650; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: .28rem; }
.text-link span { font-size: 1.25rem; line-height: .8; }

.hero { min-height: 31rem; display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(30rem, .97fr); align-items: center; gap: clamp(2.75rem, 5vw, 6rem); padding: clamp(4.7rem, 8vw, 7.65rem) 0 clamp(4.8rem, 8vw, 7.4rem); }
.hero-copy { max-width: 43rem; }
.hero-lede { max-width: 34rem; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.75rem; margin-top: 2rem; }

.project-card { width: 100%; min-width: 0; min-height: 38.3rem; padding: 1.45rem; border: 1px solid var(--border); border-radius: .8rem; background: var(--panel); box-shadow: 0 14px 34px rgba(32, 52, 87, .035); transition: opacity .2s ease; }
.project-card.is-changing { opacity: .22; }
.project-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .05rem 0 .8rem; }
.project-heading h2 { margin: .35rem 0 0; font-size: clamp(1.32rem, 2vw, 1.65rem); font-weight: 700; letter-spacing: -.05em; line-height: 1.08; }
.project-brief { min-height: 3.25rem; margin: 0 0 1rem; color: var(--secondary); font-size: .92rem; line-height: 1.42; }
.candidate-list { display: grid; border-top: 1px solid var(--border); }
.candidate-row { width: 100%; min-height: 5.85rem; display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) .7rem; align-items: center; gap: .82rem; padding: .7rem .1rem; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--ink); text-align: left; }
.candidate-row:hover, .candidate-row:focus-visible, .candidate-row[aria-pressed="true"] { margin-inline: -.55rem; width: calc(100% + 1.1rem); padding-inline: .55rem; border-radius: .54rem; background: var(--blue-soft); outline: 0; }
.candidate-row:focus-visible { box-shadow: 0 0 0 3px var(--ring); }
.candidate-avatar { width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; background: var(--soft-canvas); }
.candidate-copy { min-width: 0; display: grid; gap: .08rem; }
.candidate-copy strong { overflow: hidden; color: var(--ink); font-size: .91rem; font-weight: 680; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.candidate-copy small { color: var(--secondary); font-size: .75rem; line-height: 1.3; }
.candidate-copy .candidate-organization { color: var(--muted); font-size: .68rem; font-weight: 560; }
.candidate-arrow { color: var(--secondary); font-size: 1.5rem; font-weight: 350; line-height: 1; }
.candidate-detail { min-height: 3rem; margin: 0; padding: .85rem .1rem 0; color: var(--secondary); font-size: .79rem; line-height: 1.4; }
.candidate-detail strong { color: var(--ink); }
.fictional-label { margin: 1rem 0 0; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.project-controls { display: flex; align-items: center; gap: .5rem; margin-top: 1.2rem; }
.project-selectors { display: flex; align-items: center; gap: .4rem; }
.project-selector { width: .68rem; height: .68rem; padding: 0; border: 0; border-radius: 99px; background: var(--border); }
.project-selector[aria-pressed="true"] { width: 1.5rem; background: var(--blue); }
.project-selector:focus-visible, .rotation-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.rotation-toggle { margin-left: auto; padding: .22rem .35rem; border: 0; border-radius: .35rem; background: transparent; color: var(--secondary); font-size: .74rem; font-weight: 650; }
.rotation-toggle:hover { color: var(--blue); background: var(--soft-canvas); }

.how-section { padding: clamp(3.2rem, 5vw, 4.5rem) 0 clamp(4.7rem, 8vw, 7.7rem); border-top: 1px solid var(--border); }
.how-section > h2 { margin: 0 0 2.1rem; font-size: clamp(2rem, 3.05vw, 2.55rem); font-weight: 700; letter-spacing: -.06em; line-height: 1; text-align: center; }
.three-steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; }
.three-steps li { min-height: 4.4rem; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 1rem; align-items: center; padding: 0 2.3rem; border-right: 1px solid var(--border); }
.three-steps li:first-child { padding-left: .35rem; }
.three-steps li:last-child { padding-right: .35rem; border-right: 0; }
.step-number { width: 2.05rem; height: 2.05rem; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--ink); font-size: .84rem; font-weight: 650; }
.three-steps h3 { margin: 0 0 .22rem; font-size: 1rem; font-weight: 680; letter-spacing: -.03em; line-height: 1.15; }
.three-steps p { margin: 0; color: var(--secondary); font-size: .8rem; line-height: 1.4; }

.closing-band { padding: 0; background: var(--blue-soft); }
.closing-inner { min-height: 8.8rem; display: flex; align-items: center; justify-content: center; gap: 2rem; }
.closing-inner h2 { margin: 0; font-size: clamp(1.8rem, 2.9vw, 2.3rem); font-weight: 700; letter-spacing: -.055em; line-height: 1; }
.site-footer { min-height: 6.7rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.site-footer .wordmark { font-size: 1.48rem; }
.site-footer nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 1.75rem; }
.site-footer nav a { color: var(--secondary); font-size: .75rem; font-weight: 550; text-decoration: none; }
.site-footer nav a:hover, .site-footer nav a[aria-current="page"] { color: var(--blue); }

.subpage-hero { padding: clamp(4.6rem, 8vw, 7.5rem) 0 clamp(3.8rem, 6.5vw, 6rem); border-bottom: 1px solid var(--border); }
.subpage-hero h1 { max-width: 14ch; }
.content-section { padding: clamp(4.5rem, 8vw, 7rem) 0; }
.content-section + .content-section { border-top: 1px solid var(--border); }
.content-grid { display: grid; grid-template-columns: minmax(13rem, .62fr) minmax(0, 1.38fr); gap: clamp(3rem, 9vw, 10rem); }
.content-grid h2 { margin: 0; font-size: clamp(2.1rem, 3.5vw, 3rem); font-weight: 700; letter-spacing: -.06em; line-height: 1.02; }
.content-copy { max-width: 46rem; color: var(--secondary); font-size: 1.03rem; line-height: 1.6; }
.content-copy p:last-child { margin-bottom: 0; }
.numbered-list, .plain-list { margin: 0; padding: 0; list-style: none; }
.numbered-list { border-top: 1px solid var(--border); }
.numbered-list li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1.25rem; padding: 1.4rem 0; border-bottom: 1px solid var(--border); }
.numbered-list span { color: var(--blue); font-size: .76rem; font-weight: 700; }
.numbered-list h3 { margin: 0 0 .35rem; color: var(--ink); font-size: 1.22rem; font-weight: 680; letter-spacing: -.035em; }
.numbered-list p { margin: 0; color: var(--secondary); font-size: .94rem; }
.notice-panel { margin-top: 2.5rem; padding: 1.3rem 1.45rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--soft-canvas); color: var(--secondary); font-size: .94rem; line-height: 1.5; }
.notice-panel strong { display: block; margin-bottom: .35rem; color: var(--ink); font-size: .98rem; }
.panel { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--border); border-radius: .75rem; background: var(--panel); }
.mini-project { max-width: 48rem; }
.mini-project h3 { margin-bottom: .5rem; font-size: 1.3rem; letter-spacing: -.04em; }
.mini-project > p { color: var(--secondary); }
.mini-project .candidate-row { pointer-events: none; }
.pill-list { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.pill-list li { padding: .48rem .75rem; border: 1px solid var(--border); border-radius: 999px; color: var(--secondary); font-size: .82rem; }
.check-list { display: grid; gap: .85rem; margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 1.55rem; color: var(--secondary); }
.check-list li::before { position: absolute; left: 0; color: var(--blue); content: "✓"; font-weight: 750; }

.form-page { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.form-layout { width: min(100%, 46rem); margin-inline: auto; }
.form-intro { margin-bottom: 2rem; text-align: center; }
.form-intro h1 { max-width: 12ch; margin-inline: auto; }
.form-intro .lede { max-width: 38rem; margin-inline: auto; }
.access-form { display: grid; gap: 1.15rem; padding: clamp(1.35rem, 4vw, 2.25rem); border: 1px solid var(--border); border-radius: .8rem; background: var(--panel); }
.form-field { display: grid; gap: .45rem; }
.form-field label { color: var(--ink); font-size: .9rem; font-weight: 680; }
.form-field .optional { color: var(--muted); font-weight: 500; }
.form-field input, .form-field textarea { width: 100%; padding: .8rem .9rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--canvas); color: var(--ink); line-height: 1.35; }
.form-field textarea { min-height: 7rem; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--blue); outline: 3px solid var(--ring); }
.form-field [aria-invalid="true"] { border-color: var(--error); }
.field-error { min-height: 1.15rem; color: var(--error); font-size: .8rem; }
.form-consent { margin: 0; color: var(--secondary); font-size: .8rem; line-height: 1.45; }
.form-consent a { color: var(--blue); }
.form-errors { padding: .85rem 1rem; border: 1px solid var(--error); border-radius: .5rem; color: var(--error); font-size: .88rem; }
.form-errors:empty, .form-success[hidden] { display: none; }
.form-errors ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.form-status { min-height: 1.2rem; margin: 0; color: var(--secondary); font-size: .86rem; }
.form-success { padding: 1.25rem; border: 1px solid var(--success); border-radius: .6rem; color: var(--success); background: var(--soft-canvas); }
.form-success strong { display: block; margin-bottom: .25rem; }
.access-form .button { width: 100%; margin-top: .25rem; }
.access-form .button[disabled] { cursor: wait; opacity: .7; transform: none; }
.access-note { margin: 1.3rem auto 0; color: var(--secondary); font-size: .82rem; line-height: 1.5; text-align: center; }

.trust-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.trust-list article { padding: 1.35rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--panel); }
.trust-list h3 { margin: 0 0 .5rem; font-size: 1.05rem; letter-spacing: -.03em; }
.trust-list p { margin: 0; color: var(--secondary); font-size: .9rem; line-height: 1.5; }
.not-found { min-height: calc(100vh - 11.6rem); display: grid; place-items: center; padding: 4rem 0; }
.not-found-card { width: min(100%, 46rem); text-align: center; }
.not-found-card h1 { max-width: 12ch; margin-inline: auto; }
.not-found-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

@media (max-width: 1120px) {
  :root { --page-width: min(100% - 72px, 1360px); }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(27rem, .92fr); gap: 3rem; }
  .desktop-nav { margin-left: 2.7rem; gap: 1.35rem; }
  .three-steps li { padding-inline: 1.25rem; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 3rem; }
  .hero-copy { max-width: 48rem; }
  .project-card { max-width: 42rem; }
}

@media (max-width: 767px) {
  :root { --page-width: min(100% - 40px, 1360px); }
  .site-header, .header-inner { min-height: 4.65rem; }
  .desktop-nav, .header-cta { display: none; }
  .header-actions { gap: .22rem; }
  .theme-toggle, .menu-toggle { width: 2.75rem; height: 2.75rem; }
  .menu-toggle { display: grid; place-content: center; gap: .3rem; padding: .7rem; border: 0; border-radius: .55rem; background: transparent; color: var(--ink); }
  .menu-toggle > span:not(.sr-only) { width: 1.3rem; height: 1.5px; display: block; background: currentColor; }
  .mobile-nav { width: var(--page-width); margin: 0 auto .8rem; padding: .7rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--panel); box-shadow: 0 1rem 2.25rem rgba(21, 36, 64, .08); }
  .mobile-nav a:not(.button) { display: block; padding: .83rem .8rem; color: var(--secondary); font-weight: 600; text-decoration: none; }
  .mobile-nav a[aria-current="page"] { color: var(--blue); }
  .mobile-nav .button { width: 100%; margin-top: .4rem; }
  .hero { min-height: auto; gap: 3rem; padding: 3.7rem 0 4.25rem; }
  h1 { margin-top: 1.12rem; font-size: clamp(2.6rem, 10.5vw, 3.25rem); letter-spacing: -.073em; }
  .hero-lede { max-width: 27rem; font-size: 1.2rem; line-height: 1.45; }
  .hero-actions { display: grid; gap: 1rem; margin-top: 1.85rem; }
  .hero-actions .button { width: 100%; }
  .hero-actions .text-link { justify-content: center; }
  .project-card { min-height: 0; padding: 1.15rem .95rem 1rem; border-radius: .72rem; }
  .project-heading { padding-inline: .1rem; }
  .project-heading h2 { font-size: 1.34rem; }
  .project-brief { min-height: 0; font-size: .88rem; }
  .candidate-row { min-height: 5.9rem; grid-template-columns: 2.55rem minmax(0, 1fr) .6rem; gap: .65rem; }
  .candidate-row:hover, .candidate-row:focus-visible, .candidate-row[aria-pressed="true"] { margin-inline: -.35rem; width: calc(100% + .7rem); padding-inline: .35rem; }
  .candidate-avatar { width: 2.55rem; height: 2.55rem; }
  .candidate-copy strong { font-size: .88rem; }
  .candidate-copy small { font-size: .73rem; }
  .candidate-detail { min-height: 3.4rem; font-size: .77rem; }
  .how-section { padding: 3.6rem 0 4.1rem; }
  .how-section > h2 { margin-bottom: 2.2rem; text-align: left; font-size: 2.2rem; }
  .three-steps { gap: 1.95rem; grid-template-columns: 1fr; }
  .three-steps li, .three-steps li:first-child, .three-steps li:last-child { min-height: auto; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 1rem; padding: 0; border: 0; }
  .step-number { width: 2.55rem; height: 2.55rem; font-size: .98rem; }
  .three-steps h3 { margin-top: .1rem; font-size: 1.18rem; }
  .three-steps p { font-size: .94rem; }
  .closing-band { width: var(--page-width); margin: 0 auto 2.3rem; border-radius: .78rem; }
  .closing-inner { min-height: auto; display: grid; gap: 1.55rem; padding: 2.3rem 1.35rem 1.45rem; text-align: center; }
  .closing-inner h2 { font-size: 2rem; }
  .closing-inner .button { width: 100%; }
  .site-footer { min-height: auto; display: grid; justify-items: center; gap: 1.55rem; padding: .85rem 0 2.3rem; }
  .site-footer .wordmark { display: none; }
  .site-footer nav { justify-content: center; gap: .55rem 1.25rem; }
  .site-footer nav a { font-size: .83rem; }
  .subpage-hero { padding: 3.75rem 0 3.2rem; }
  .subpage-hero h1 { font-size: clamp(2.65rem, 11vw, 3.5rem); }
  .subpage-hero .lede { font-size: 1.12rem; }
  .content-section { padding: 4rem 0; }
  .content-grid { grid-template-columns: 1fr; gap: 1.3rem; }
  .content-copy { font-size: 1rem; }
  .trust-list { grid-template-columns: 1fr; }
  .form-page { padding-top: 3.4rem; }
  .form-intro { text-align: left; }
  .form-intro h1, .form-intro .lede { margin-inline: 0; }
  .not-found { min-height: auto; padding: 5rem 0; }
}

@media (max-width: 390px) {
  :root { --page-width: min(100% - 32px, 1360px); }
  .candidate-row { grid-template-columns: 2.45rem minmax(0, 1fr); }
  .candidate-arrow { display: none; }
  .project-controls { gap: .35rem; }
  .rotation-toggle { font-size: .7rem; }
}
