/* Valus public site: soft Gen X club, high-class restraint.
   One live centrepiece, hairline structure, transit-signage labels, frosted materials. */

.landing { --wrap: min(1320px, calc(100% - 64px)); position: relative; overflow-x: clip; }
.landing > section { width: var(--wrap); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; z-index: 40; inset: 0 0 auto 0; height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid transparent;
  transition: background-color .5s var(--ease), border-color .5s var(--ease), -webkit-backdrop-filter .5s, backdrop-filter .5s;
}
.site-header.scrolled, .in-workspace .site-header {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
}
.site-nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 36px; }
.site-nav a { position: relative; font-size: 14px; color: var(--ink-2); padding: 6px 0; transition: color .3s; }
.site-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after, .site-nav a.current::after { transform: scaleX(1); transform-origin: left; }
.site-nav a.current { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.login-link { font-size: 14px; color: var(--ink-2); transition: color .3s; }
.login-link:hover { color: var(--red); }
.button.login { min-height: 38px; padding: 0 18px; font-size: 11px; }
.theme-toggle { width: 36px; height: 36px; }

/* ---------- Shared pieces ---------- */
.section-label { display: flex; align-items: center; gap: 20px; margin-bottom: 56px; }
.section-label .micro { white-space: nowrap; color: var(--ink-2); }
.rule { flex: 1; height: 1px; background: var(--line-strong); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease); }
.rule.in { transform: none; }
.split .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.split .ln > span { display: inline-block; transform: translateY(108%); transition: transform 1.2s var(--ease); }
.split .ln:nth-child(2) > span { transition-delay: .09s; }
.split .ln:nth-child(3) > span { transition-delay: .18s; }
.split.in .ln > span, .hero.in .split .ln > span { transform: none; }
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }
.spec-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.spec-list li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }

/* ---------- Hero ---------- */
.landing > .hero { width: 100%; position: relative; height: max(100svh, 720px); isolation: isolate; overflow: hidden; }
.sculpture { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: 0; transition: opacity 1.6s var(--ease); background: var(--bg); }
.sculpture.ready { opacity: 1; }
.hero-fallback { display: none; }
.hero.no-webgl .sculpture { display: none; }
.hero.no-webgl .hero-fallback {
  display: block; position: absolute; inset: 12% 0 40% 0; z-index: -2; filter: blur(2px);
  background:
    radial-gradient(circle at 18% 40%, #e2425c 0 34px, transparent 36px), radial-gradient(circle at 34% 30%, #c81d3a 0 26px, transparent 28px),
    radial-gradient(circle at 52% 52%, #e2425c 0 40px, transparent 42px), radial-gradient(circle at 70% 36%, #b3122f 0 30px, transparent 32px),
    radial-gradient(circle at 86% 58%, #e2425c 0 36px, transparent 38px);
  opacity: .55;
}
.hero::after { /* hand the hero over to the page colour */
  content: ''; position: absolute; inset: auto 0 0 0; height: 160px; z-index: -1; pointer-events: none;
  background: linear-gradient(transparent, var(--bg));
}
.hero-guides { position: absolute; inset: 0; z-index: -1; pointer-events: none; display: grid; grid-template-columns: repeat(4, 1fr); width: var(--wrap); margin: 0 auto; }
.hero-guides i { border-right: 1px solid var(--line); -webkit-mask: linear-gradient(transparent, #000 20%, #000 70%, transparent); mask: linear-gradient(transparent, #000 20%, #000 70%, transparent); }
.hero-meta { position: absolute; top: 96px; left: 0; right: 0; width: var(--wrap); margin: 0 auto; display: flex; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hero-meta .micro { color: var(--ink-2); }
.hero-copy { position: absolute; left: 0; right: 0; bottom: 190px; width: var(--wrap); margin: 0 auto; display: grid; gap: 40px; pointer-events: none; }
.hero-copy > * { pointer-events: auto; }
.hero h1 { font-size: clamp(56px, 9.4vw, 156px); font-weight: 500; letter-spacing: -.058em; line-height: .9; max-width: 9ch; }
.hero-side { position: absolute; left: 0; right: 0; bottom: 76px; width: var(--wrap); margin: 0 auto; display: flex; justify-content: space-between; align-items: end; gap: 32px; }
.hero-side p { max-width: 380px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.hero-cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero-foot { position: absolute; left: 0; right: 0; bottom: 0; width: var(--wrap); margin: 0 auto; height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-top: 1px solid var(--line); }
.hero-foot .fig { color: var(--muted); }
.scroll-hint { display: inline-flex; align-items: center; gap: 12px; color: var(--ink-2); }
.scroll-hint i { position: relative; width: 1px; height: 22px; background: var(--line-strong); overflow: hidden; }
.scroll-hint i::after { content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--red); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

/* ---------- Principles ---------- */
.principles { padding: 150px 0 120px; }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.principle-grid article { display: grid; align-content: start; gap: 18px; padding: 4px 40px 0 28px; border-left: 1px solid var(--line-strong); }
.principle-grid h3 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 500; letter-spacing: -.04em; }
.principle-grid p { color: var(--muted); max-width: 32ch; font-size: 15.5px; }
.principle-grid .micro { color: var(--red-ink); }

/* ---------- Preview ---------- */
.preview { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; padding: 60px 0 140px; align-items: start; }
.preview-copy { position: sticky; top: 120px; display: grid; gap: 30px; }
.preview-copy .section-label { margin-bottom: 8px; }
.preview h2, .board-head h2, .statement h2 { font-size: clamp(44px, 6vw, 92px); font-weight: 500; letter-spacing: -.055em; line-height: .95; }
.preview-copy > p { color: var(--ink-2); font-size: 17px; max-width: 42ch; }
.preview-window {
  position: relative; isolation: isolate; border-radius: 22px; margin-top: 56px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 50px 90px -50px rgba(140, 16, 40, .35), 0 20px 40px -30px rgba(17, 18, 20, .3);
}
.preview-window::before { /* soft bloom of red resin behind the frosted window */
  content: ''; position: absolute; z-index: -1; inset: 40% -10% -16% 45%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--red) 22%, transparent), transparent);
  filter: blur(50px);
}
.pw-bar { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pw-dots { display: flex; gap: 6px; }
.pw-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line); }
.pw-tag { margin-left: auto; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 99px; }
.pw-tabs { position: relative; display: flex; gap: 28px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.pw-tabs button { padding: 16px 0 14px; font-size: 14px; color: var(--muted); transition: color .3s; }
.pw-tabs button.on, .pw-tabs button:hover { color: var(--ink); }
.tab-ink { position: absolute; bottom: -1px; left: 0; height: 2px; background: var(--red); transition: transform .6s var(--ease), width .6s var(--ease); }
.pw-stage { display: grid; padding: 28px 24px 26px; min-height: 330px; }
.pw-pane { grid-area: 1 / 1; display: grid; align-content: start; gap: 22px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .5s var(--ease), transform .5s var(--ease), visibility .5s; }
.pw-pane.on { opacity: 1; visibility: visible; transform: none; }
.pw-head { display: grid; gap: 8px; }
.pw-head h4 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -.035em; }
.pw-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pw-list li { position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; padding: 15px 0 15px 14px; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.pw-list li small { font: 400 11px/1 var(--font-mono); color: var(--muted); }
.pw-list li span { font: 400 11px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pw-list li.on { color: var(--ink); }
.pw-list li.on::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; background: var(--red); }
.pw-list li.on span { color: var(--red-ink); }
.pw-foot { display: grid; gap: 10px; }
.pw-meter { height: 3px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--red); transition: width 1.6s var(--ease) .3s; }
.preview-window.in .pw-meter span { width: var(--v); }
.pw-bars { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding-top: 10px; border-bottom: 1px solid var(--line); }
.pw-bars span { flex: 1; height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 8px; text-align: center; }
.pw-bars i { align-self: end; height: var(--h); background: linear-gradient(var(--red), color-mix(in srgb, var(--red) 40%, transparent)); border-radius: 3px 3px 0 0; }
.pw-bars span:last-child i { background: var(--red); }
.pw-bars small { font: 400 10px/1 var(--font-mono); color: var(--muted); padding-bottom: 8px; }
.pw-post { display: flex; gap: 14px; padding: 18px 0; border-block: 1px solid var(--line); }
.pw-post strong { display: flex; gap: 10px; align-items: baseline; font-weight: 500; }
.pw-post p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }

/* ---------- Departures board ---------- */
.board-section { padding: 40px 0 140px; }
.board-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 48px; flex-wrap: wrap; }
.board { border-bottom: 1px solid var(--line-strong); }
.board-row {
  position: relative; display: grid; grid-template-columns: 96px 1.25fr .9fr 2fr 44px; align-items: center; gap: 24px;
  padding: 28px 8px 28px 20px; border-top: 1px solid var(--line-strong);
  transition: background-color .5s var(--ease);
}
.board-row::before { content: ''; position: absolute; left: 0; top: -1px; bottom: 0; width: 2px; background: var(--red); transform: scaleY(0); transform-origin: top; transition: transform .6s var(--ease); }
.board-row:not(.board-labels):hover, .board-row.open { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.board-row:hover::before, .board-row.open::before { transform: none; }
.board-labels { padding-block: 0 14px; border-top: 0; }
.board-row .code { font: 400 12px/1 var(--font-mono); letter-spacing: .08em; color: var(--red-ink); }
.board-row strong { font-size: clamp(20px, 1.9vw, 27px); font-weight: 500; letter-spacing: -.03em; }
.board-row .prep { font: 400 11px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.board-row .examples { font-size: 14.5px; color: var(--muted); }
.board-row .go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); transition: background-color .4s var(--ease), color .4s, border-color .4s; }
.board-row .go .icon { width: 15px; height: 15px; transition: transform .5s var(--ease); }
.board-row:hover .go, .board-row.open .go { background: var(--red); border-color: var(--red); color: #fff; }
.board-row:hover .go .icon { transform: rotate(-45deg); }
.board-row .detail { grid-column: 2 / 5; margin: 0; max-height: 0; opacity: 0; overflow: hidden; color: var(--ink-2); font-size: 15px; transition: max-height .6s var(--ease), opacity .5s var(--ease), margin .6s var(--ease); }
.board-row:hover .detail, .board-row:focus-visible .detail, .board-row.open .detail { max-height: 60px; opacity: 1; margin-top: -8px; }

/* ---------- Chapter ---------- */
.chapter-section { padding: 20px 0 140px; }
.chapter-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; }
.photo-panel { position: relative; overflow: hidden; isolation: isolate; min-height: 580px; border-radius: 22px; }
.photo { position: absolute; inset: -2%; z-index: -2; background: url('assets/atrium.png') 70% 45% / cover; filter: saturate(.7) contrast(1.04) blur(1.2px); transition: transform 2.4s var(--ease); }
:root[data-theme="dark"] .photo { filter: saturate(.75) brightness(.55) contrast(1.15) blur(1.2px); }
.photo-panel::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(200deg, rgba(196, 208, 220, .28), transparent 45%), linear-gradient(transparent 50%, rgba(10, 12, 16, .25)); }
.photo-panel:hover .photo { transform: scale(1.04); }
.frost {
  position: absolute; left: 24px; bottom: 24px; width: min(440px, calc(100% - 48px));
  display: grid; gap: 14px; padding: 30px;
  border-radius: 16px; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 66%, transparent);
  -webkit-backdrop-filter: blur(26px) saturate(1.5); backdrop-filter: blur(26px) saturate(1.5);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.frost h3, .teacher-panel h3 { font-size: clamp(30px, 3vw, 44px); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.frost p { color: var(--ink-2); }
.frost .editorial-link { justify-self: start; margin-top: 6px; }
.teacher-panel { display: flex; flex-direction: column; gap: 22px; padding: 40px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.teacher-panel p { color: var(--ink-2); }
.teacher-panel .spec-list { margin-top: auto; }
.teacher-panel .button { align-self: flex-start; }

/* ---------- Statement ---------- */
.statement { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: end; padding: 60px 0 160px; }
.statement .section-label.wide { grid-column: 1 / -1; margin-bottom: 0; }
.statement h2 { font-size: clamp(52px, 7.6vw, 124px); }
.statement-side { display: grid; gap: 24px; padding-bottom: 12px; }
.statement-side p { font-size: 17px; color: var(--ink-2); max-width: 40ch; }
.statement-side .editorial-link { justify-self: start; }

/* ---------- Weight contrast ----------
   Headlines lead in a whisper-light cut and land on a heavier one. */
.split.duo { font-weight: 250; }
.split.duo b { font-weight: 600; letter-spacing: -.05em; }
.hero h1.duo { font-weight: 200; }
.hero h1.duo b { font-weight: 600; }

/* ---------- Manifesto ---------- */
.manifesto { padding: 150px 0 40px; }
.manifesto .section-label { margin-bottom: 44px; }
.manifesto-tags { display: flex; gap: 22px; color: var(--ink-2); }
.manifesto-tags span { display: inline-flex; align-items: center; gap: 10px; }
.manifesto-tags span::before { content: ''; width: 14px; height: 1px; background: var(--red); }
.manifesto-copy {
  max-width: 21ch; font-size: clamp(34px, 4.9vw, 78px); font-weight: 250;
  line-height: 1.04; letter-spacing: -.045em; color: var(--muted);
}
.manifesto-copy b { font-weight: 600; color: var(--ink); letter-spacing: -.05em; }
.manifesto + .principles { padding-top: 110px; }

/* ---------- Ghost numerals ---------- */
.ghost-num {
  display: block; margin: -6px 0 26px -3px;
  font: 200 clamp(72px, 7.4vw, 118px)/.8 var(--font-display); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px var(--line-strong);
  font-variant-numeric: tabular-nums;
  transition: -webkit-text-stroke-color .6s var(--ease), color .6s var(--ease);
}
.principle-grid article:hover .ghost-num { -webkit-text-stroke-color: var(--red); }
@supports not (-webkit-text-stroke: 1px black) { .ghost-num { color: var(--line-strong); } }

/* ---------- Split CTA block ---------- */
.cta-block {
  justify-self: start; display: inline-grid; grid-template-columns: minmax(200px, auto) 64px;
  min-height: 64px; border: 1px solid var(--line-strong); background: var(--surface);
  transition: border-color .4s var(--ease);
}
.cta-block span { display: flex; align-items: center; padding: 0 26px; font-size: 17px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.cta-block i { display: grid; place-items: center; background: var(--red); color: var(--on-red); overflow: hidden; transition: background-color .3s var(--ease); }
.cta-block .icon { width: 18px; height: 18px; transform: rotate(-45deg); }
.cta-block:hover { border-color: var(--red); }
.cta-block:hover i { background: var(--red-hover); }
.cta-block:hover .icon { animation: arrow-lift .55s var(--ease); }
@keyframes arrow-lift { 0% { transform: rotate(-45deg); } 49% { transform: rotate(-45deg) translateX(160%); } 50% { transform: rotate(-45deg) translateX(-160%); } 100% { transform: rotate(-45deg); } }

/* ---------- Registration ticks ----------
   Drafting-sheet corner marks just outside the preview window. */
.preview-window::after {
  content: ''; position: absolute; inset: -10px; pointer-events: none; z-index: -1;
  --t: var(--line-strong);
  background:
    linear-gradient(var(--t), var(--t)) 0 0 / 14px 1px, linear-gradient(var(--t), var(--t)) 0 0 / 1px 14px,
    linear-gradient(var(--t), var(--t)) 100% 0 / 14px 1px, linear-gradient(var(--t), var(--t)) 100% 0 / 1px 14px,
    linear-gradient(var(--t), var(--t)) 0 100% / 14px 1px, linear-gradient(var(--t), var(--t)) 0 100% / 1px 14px,
    linear-gradient(var(--t), var(--t)) 100% 100% / 14px 1px, linear-gradient(var(--t), var(--t)) 100% 100% / 1px 14px;
  background-repeat: no-repeat;
}

/* ---------- Footer ---------- */
.footer { width: min(1320px, calc(100% - 64px)); margin: 0 auto; border-top: 1px solid var(--line-strong); }
.foot-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; padding: 0; }
.foot-top > * { padding: 44px 32px 64px; border-left: 1px solid var(--line); }
.foot-top > :first-child { padding-left: 0; border-left: 0; }
.foot-brand { display: grid; gap: 18px; align-content: start; }
.foot-brand p { color: var(--muted); font-size: 14px; max-width: 34ch; }
.foot-col { display: grid; align-content: start; gap: 14px; font-size: 14px; color: var(--ink-2); }
.foot-col .micro { margin-bottom: 10px; }
.foot-col a, .foot-col .text-button {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start;
  font: 500 11px/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-2); transition: color .3s;
}
.foot-arrow { font-size: 12px; color: var(--muted); transition: transform .4s var(--ease), color .3s; }
.foot-col a:hover, .foot-col .text-button:hover { color: var(--red); }
.foot-col a:hover .foot-arrow { color: var(--red); transform: translate(2px, -2px); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 0 28px; border-top: 1px solid var(--line); }

/* ---------- Inner public pages ---------- */
.page-hero { position: relative; padding: 180px 0 120px; display: grid; gap: 56px; }
.page-hero .hero-meta { top: 96px; width: 100%; }
.page-hero h1 { font-size: clamp(52px, 8.6vw, 140px); font-weight: 500; letter-spacing: -.058em; line-height: .92; }
.page-hero.compact { padding-bottom: 72px; }
.page-hero-side { display: flex; justify-content: space-between; align-items: end; gap: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.page-hero-side p { max-width: 520px; font-size: 18px; color: var(--ink-2); }
.page .statement { padding-top: 20px; }
.fine-print { width: var(--wrap); margin: 0 auto 48px; display: block; color: var(--muted); line-height: 1.7; }
.ranks-body { width: var(--wrap); margin: 0 auto 120px; }
.public-ranks .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.public-ranks .rank-explainer { background: var(--surface-2); color: var(--ink); }
.public-ranks .rank-explainer p { color: var(--ink-2); }
.public-ranks .ranking-layout { gap: 16px; }
.public-ranks .full-width { margin-top: 16px; }

/* Start page and catalog under the new header */
.start-page, .catalog { padding-top: 140px !important; }
.start-page h1 { font-weight: 500; letter-spacing: -.055em; }
.role-cards a { border: 1px solid var(--line); box-shadow: none; transition: border-color .4s var(--ease), transform .4s var(--ease); }
.role-cards a:hover { border-color: var(--red); box-shadow: none; transform: translateY(-3px); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .preview, .chapter-grid, .statement { grid-template-columns: 1fr; }
  .preview-copy { position: static; }
  .preview-window { margin-top: 0; }
  .board-row { grid-template-columns: 80px 1fr 44px; }
  .board-row .prep, .board-row .examples { display: none; }
  .board-labels { display: none; }
  .board-row .detail { grid-column: 2 / 3; }
  .foot-top { grid-template-columns: 1fr 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; border-bottom: 1px solid var(--line); padding-bottom: 40px; }
  .foot-top > :nth-child(2) { padding-left: 0; border-left: 0; }
  .manifesto-tags { display: none; }
}
@media (max-width: 860px) {
  .site-header { height: auto; flex-wrap: wrap; padding: 12px 20px; row-gap: 6px; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom-color: var(--line); }
  .site-nav { position: static; transform: none; order: 3; width: 100%; justify-content: space-between; gap: 12px; }
  .site-nav a { font-size: 13px; }
  .hero-meta { top: 118px; }
  .hero-meta .micro:nth-child(2) { display: none; }
  .principle-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-guides { grid-template-columns: repeat(2, 1fr); }
  .page-hero { padding-top: 190px; }
}
@media (max-width: 600px) {
  .landing { --wrap: calc(100% - 40px); }
  .footer { width: calc(100% - 40px); }
  .header-actions { gap: 10px; }
  .login-link { font-size: 13px; }
  .button.login { padding: 0 12px; font-size: 10px; letter-spacing: .06em; }
  .theme-toggle { width: 32px; height: 32px; }
  .hero h1 { font-size: clamp(48px, 15vw, 72px); }
  .hero-copy { bottom: 316px; }
  .hero-side { flex-direction: column; align-items: start; bottom: 76px; gap: 20px; }
  .hero-side p { font-size: 15.5px; }
  .hero-foot { grid-template-columns: 1fr auto; }
  .hero-foot .fig { display: none; }
  .principles { padding: 100px 0 80px; }
  .principle-grid article { padding: 0 0 0 20px; }
  .preview { padding-bottom: 90px; gap: 40px; }
  .pw-tabs { gap: 18px; padding: 0 16px; overflow-x: auto; }
  .pw-stage { padding: 22px 16px; }
  .spec-list li { grid-template-columns: 96px 1fr; }
  .board-row { grid-template-columns: 64px 1fr 40px; gap: 14px; padding-left: 14px; }
  .photo-panel { min-height: 520px; }
  .teacher-panel { padding: 28px; }
  .statement { padding-bottom: 100px; gap: 32px; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-top > * { padding: 32px 0 40px 20px; }
  .foot-top > :nth-child(4) { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .ghost-num { font-size: 64px; margin-bottom: 16px; }
  .manifesto { padding-top: 100px; }
  .manifesto + .principles { padding-top: 80px; }
  .cta-block { grid-template-columns: 1fr 58px; min-height: 58px; width: 100%; }
  .preview-window::after { display: none; }
  .page-hero-side { flex-direction: column; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  .split .ln > span, [data-reveal], .rule { transform: none !important; opacity: 1 !important; transition: none !important; }
  .scroll-hint i::after { animation: none; }
}
@media (max-width: 600px) {
  .login-word { display: none; }
  .site-header .wordmark { width: 70px; }
  .site-header { padding: 10px 20px 4px; }
}

/* ---------- Login ---------- */
.auth-page {
  width: min(1080px, calc(100% - 48px)); margin: 0 auto; min-height: 100vh;
  display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: 64px; align-items: center;
  padding: 140px 0 80px;
}
.auth-intro { display: grid; gap: 20px; align-content: center; }
.auth-intro h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -.05em; line-height: .98; }
.auth-intro p { color: var(--ink-2); max-width: 400px; }
.auth-intro .editorial-link { justify-self: start; }
.auth-card {
  display: grid; gap: 16px; padding: 36px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
}
.auth-card h2 { font-size: 1.7rem; letter-spacing: -.03em; line-height: 1.15; }
.auth-card > p, .auth-pane > p { color: var(--ink-2); font-size: 15px; }
.auth-step { color: var(--red-ink); }
.auth-fields { display: grid; gap: 14px; }
.auth-fields .field { display: grid; gap: 8px; font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.auth-fields .button { width: 100%; margin-top: 6px; }
.auth-school { display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--surface-3); }
.auth-school .micro { color: var(--muted); }
.button.google { --b-bg: var(--ink); --b-ink: var(--bg); --b-hover: var(--ink-2); width: 100%; gap: 12px; }
.g-mark { width: 18px; height: 18px; flex: none; background: #fff; border-radius: 50%; padding: 2px; box-sizing: content-box; }
.auth-note { color: var(--muted); font-size: 13.5px; }
.auth-who { color: var(--muted); font-size: 13.5px; padding-top: 14px; border-top: 1px solid var(--line); }
.auth-who strong { color: var(--ink); font-weight: 500; }
.auth-who .text-button { font-size: 13.5px; text-decoration: underline; }
.auth-error { padding: 12px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red-ink); font-size: 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--surface-3); }
.auth-tabs button { min-height: 38px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); transition: background .2s, color .2s; }
.auth-tabs button:hover { color: var(--ink); }
.auth-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 var(--line-strong), 0 0 0 1px var(--line); }
.auth-fields .auth-step { margin-top: 6px; }
.auth-fields .auth-step:first-child { margin-top: 0; }
.auth-hint { margin-top: -6px; color: var(--muted); font-size: 13px; }
.auth-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* Inputs have a browser minimum width; without these the side-by-side name fields push every control past the card. */
.auth-card, .auth-fields { grid-template-columns: minmax(0, 1fr); }
.auth-card .field input, .auth-card .field select { width: 100%; min-width: 0; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font: 400 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-forgot { justify-self: end; margin-top: -6px; font-size: 13px; text-decoration: underline; }
.auth-fields .button.google { margin-top: 0; }
@media (max-width: 420px) { .auth-pair { grid-template-columns: 1fr; } }
.auth-wait, .loading-panel { display: grid; justify-items: center; gap: 14px; padding: 40px 0; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.button:disabled { opacity: .55; cursor: default; }
.auth-student, .auth-teacher { display: block; width: min(1160px, calc(100% - 64px)); padding: 114px 0 70px; }
body:has(.auth-student, .auth-teacher) .hal-companion { display: none; }
.auth-student { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 430px); gap: 0 7%; align-items: start; }
.auth-student-top { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line-strong); color: var(--muted); }
.auth-student .auth-intro { padding: 66px 0 24px; gap: 23px; }
.auth-student .auth-intro h1 { font-size: clamp(3.8rem, 6.8vw, 6.8rem); font-weight: 500; }
.auth-student .auth-intro > p { font-size: 18px; line-height: 1.5; }
.auth-student-index { margin-top: 25px; max-width: 450px; }
.auth-student-index > .micro { color: var(--red-ink); }
.auth-student-index ul { margin: 12px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.auth-student-index li { display: flex; align-items: center; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.auth-student-index li span { font: 11px var(--font-mono); color: var(--red-ink); }
.auth-switch { display: inline-flex; align-items: center; gap: 12px; width: fit-content; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
.auth-switch .icon { width: 15px; height: 15px; }
.auth-student .auth-card { margin-top: 48px; box-shadow: 10px 12px 0 var(--bg-deep); border: 1px solid var(--line-strong); border-radius: 4px; }
.auth-help { grid-column: 2; padding: 19px 0 0 3px; font-size: 13px; color: var(--muted); }
.auth-teacher { width: min(1200px, calc(100% - 64px)); }
.auth-teacher-banner { position: relative; min-height: 330px; padding: 24px clamp(28px, 5vw, 64px) 42px; background: #242c31; color: #f4f1eb; overflow: hidden; }
.auth-teacher-banner::after { content: ''; position: absolute; width: 340px; height: 340px; right: -60px; bottom: -210px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 120px rgba(255,255,255,.025); pointer-events: none; }
.auth-teacher-kicker { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.28); color: #d3d0c8; }
.auth-teacher-banner h1 { margin-top: 46px; font-size: clamp(3.4rem, 6vw, 6rem); font-weight: 500; letter-spacing: -.055em; line-height: .98; }
.auth-teacher-banner h1 em { color: #e9a3a8; }
.auth-teacher-banner p { max-width: 520px; margin-top: 20px; color: #deded9; }
.auth-teacher-body { display: grid; grid-template-columns: minmax(340px, 470px) minmax(0, 1fr); gap: clamp(40px, 9vw, 120px); align-items: start; padding: 42px clamp(28px, 5vw, 64px) 20px; }
.auth-teacher .auth-card { border-radius: 4px; box-shadow: var(--shadow); }
.auth-teacher-aside { padding-top: 12px; }
.auth-teacher-aside h2 { max-width: 460px; margin: 22px 0 28px; font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 500; line-height: 1.1; letter-spacing: -.04em; }
.auth-teacher-aside ul { list-style: none; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--line-strong); }
.auth-teacher-aside li { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.auth-teacher-aside li strong { font-weight: 500; }
.auth-teacher-aside li span, .auth-teacher-aside p { color: var(--ink-2); }
.auth-teacher-aside p { font-size: 13px; margin-bottom: 24px; }
@media (max-width: 860px) {
  .auth-student, .auth-teacher { width: calc(100% - 32px); padding-top: 100px; }
  .auth-student { grid-template-columns: 1fr; }
  .auth-student .auth-intro { padding-top: 38px; }
  .auth-student .auth-intro h1 { font-size: clamp(3.6rem, 11vw, 5.5rem); }
  .auth-student .auth-card { margin-top: 32px; }
  .auth-help { grid-column: 1; }
  .auth-teacher-body { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 540px) {
  .auth-student-top, .auth-teacher-kicker { font-size: 10px; }
  .auth-teacher-kicker span:last-child, .auth-student-top span:last-child { display: none; }
  .auth-teacher-banner { min-height: 290px; padding: 20px 24px 32px; }
  .auth-teacher-banner h1 { font-size: clamp(3.1rem, 12vw, 4rem); }
  .auth-teacher-body { padding: 24px 0; }
  .auth-teacher .auth-card { padding: 24px; }
}
@media (max-width: 860px) {
  .auth-page:not(.auth-student):not(.auth-teacher) { grid-template-columns: 1fr; gap: 32px; padding: 110px 0 60px; width: calc(100% - 32px); }
  .auth-card { padding: 24px; }
}

/* ---------- Workspace additions ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .text-button + .text-button { margin-left: 14px; }
.student-name small { display: block; font-size: 12px; }
.post-delete { margin-left: auto; width: 32px; height: 32px; }
.post-delete .icon { width: 16px; height: 16px; }
.submission { display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.submission p { white-space: pre-wrap; }
.modal-actions { gap: 10px; flex-wrap: wrap; }
