/* ============================================================
   BLUE MERIDIAN — course lab portal
   One deep blue, one light. Display type: Newsreader + Noto Serif SC.
   ============================================================ */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin.woff2?v=1") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-italic-latin.woff2?v=1") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2?v=1") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("/assets/fonts/spline-sans-mono-latin.woff2?v=1") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Chinese display fallback: Noto Serif SC subset, SIL OFL 1.1. */
@font-face {
  font-family: "SE Serif";
  src: url("/assets/fonts/se-serif-300.woff?v=1") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SE Serif";
  src: url("/assets/fonts/se-serif-400.woff?v=1") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07111f;
  --bg-deep: #040a12;
  --ink: #f3f7ff;
  --mist: #8ea4c2;
  --signal: #6fb6ff;
  --halo-white: #ffffff;
  --halo-blue: #bfe3ff;
  --line: rgba(158, 188, 222, 0.16);
  --line-strong: rgba(158, 188, 222, 0.32);
  --pass: #8fe3b8;
  --warn: #ffd08a;
  --fail: #ff9b9b;
  --panel: rgba(8, 19, 34, 0.86);
  --code: #040a12;

  --display: "Newsreader", "SE Serif", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --body: "Archivo", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Spline Sans Mono", "SFMono-Regular", Consolas, "PingFang SC", "Microsoft YaHei", monospace;

  --header-h: 64px;
  --nav-h: 72px;
  --gutter: clamp(22px, 4vw, 56px);
  --content: 1160px;
  --seam-left: max(20px, calc(50vw - 580px - 44px));
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(120% 90% at 28% 18%, #0b1e34 0%, #07111f 52%, #040a12 100%),
    var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin-top: 0; text-wrap: pretty; }
h1, h2, h3 { margin-top: 0; text-wrap: balance; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }

::selection { background: var(--halo-blue); color: var(--bg-deep); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

* { scrollbar-width: thin; scrollbar-color: rgba(111, 182, 255, .35) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(111, 182, 255, .28); border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(111, 182, 255, .5); }

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-180%);
  padding: .65rem .9rem;
  background: var(--ink);
  color: var(--bg-deep);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .1em;
  text-decoration: none;
  transition: transform .2s var(--ease);
}
.skip:focus { transform: none; }

/* ============================================================
   The meridian — the only light on the page
   ============================================================ */

.meridian {
  position: fixed;
  top: 9vh;
  left: var(--seam-left);
  z-index: 0;
  width: 1px;
  height: 82vh;
  pointer-events: none;
}
.meridian.is-hidden { opacity: 0; visibility: hidden; }

.meridian__halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(300px, 32vw, 560px);
  height: min(92vh, 980px);
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse 26% 34% at center, rgba(255,255,255,.58) 0%, rgba(234,244,255,.3) 38%, transparent 72%),
    radial-gradient(ellipse at center, rgba(255,255,255,.5) 0%, rgba(191,227,255,.38) 16%, rgba(111,182,255,.2) 38%, transparent 70%);
  filter: blur(42px);
}

.meridian__line {
  position: absolute;
  inset: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(191,227,255,.24) 0%,
    rgba(191,227,255,.34) 12%,
    rgba(222,240,255,.72) 34%,
    var(--halo-white) 46%,
    var(--halo-white) 54%,
    rgba(222,240,255,.7) 66%,
    rgba(191,227,255,.34) 88%,
    rgba(191,227,255,.22) 100%
  );
  transform-origin: top;
}

@keyframes seamGrow {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}
@keyframes haloIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes breathe {
  from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  to { transform: translate(-50%, -50%) scale(.975); opacity: .8; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .meridian__line { animation: seamGrow 1.45s var(--ease-out) both; }
  .meridian__halo { animation: haloIn 1.7s ease .16s both, breathe 11s ease-in-out 2s infinite alternate; }
  .meridian.is-fast .meridian__line { animation-duration: .95s; }
  .meridian.is-fast .meridian__halo { animation-duration: 1.1s, 11s; animation-delay: .12s, 2s; }
  .meridian.is-replaying .meridian__line,
  .meridian.is-replaying .meridian__halo { animation: none; }
  .topbar { animation: fadeIn .9s ease .08s both; }
}

/* ============================================================
   Topbar
   ============================================================ */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--header-h);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 2rem;
  background: rgba(6, 14, 26, .94);
  border-bottom: 1px solid var(--line);
  transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.topbar.is-scrolled { background: rgba(5, 12, 22, .96); border-bottom-color: var(--line-strong); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}
.brand__mark { width: 14px; height: 26px; flex: 0 0 auto; }
.brand__mark svg { display: block; width: 100%; height: 100%; }
.brand__name {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: -.005em;
  white-space: nowrap;
}
.brand__tail { margin-left: .12em; }

.topbar__links { display: flex; align-items: center; gap: 1.7rem; margin-left: auto; }
.topbar__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-block: .35rem;
  color: var(--mist);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-decoration: none;
  transition: color .25s var(--ease);
}
.topbar__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -.05rem;
  height: 1px;
  background: linear-gradient(90deg, var(--halo-white), var(--signal));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.topbar__links a:hover,
.topbar__links a[aria-current="page"] { color: var(--ink); }
.topbar__links a:hover::after,
.topbar__links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.identity { display: flex; align-items: center; gap: .7rem; margin-left: 1.4rem; font-size: .68rem; color: var(--mist); white-space: nowrap; }
.identity:empty { display: none; }
.identity-name { color: var(--ink); }
.identity-role {
  padding: .12rem .34rem .16rem;
  border: 1px solid var(--line-strong);
  color: var(--mist);
  font-family: var(--mono);
  font-size: .5rem;
  letter-spacing: .06em;
  line-height: 1.4;
}
.identity .quiet {
  border: 0;
  padding: 0;
  background: none;
  color: var(--mist);
  font-family: var(--mono);
  font-size: .56rem;
  letter-spacing: .08em;
  text-decoration: underline;
  text-underline-offset: .25em;
}
.identity .quiet:hover { color: var(--signal); background: none; }

/* ============================================================
   Page frame
   ============================================================ */

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding: calc(var(--header-h) + 2.6rem) var(--gutter) 5rem;
}
#workbench, #examples { scroll-margin-top: calc(var(--header-h) + 18px); }

/* ============================================================
   Type
   ============================================================ */

.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1.9rem;
  color: var(--signal);
  font-family: var(--mono);
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .18em;
  line-height: 1.4;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  flex: 0 0 auto;
  background: currentColor;
  opacity: .65;
}
.eyebrow span + span { color: var(--mist); }

.display {
  margin: 0;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 300;
  font-size: clamp(3rem, 5.1vw, 5.2rem);
  line-height: .98;
  letter-spacing: -.03em;
}
.display--sm { font-size: clamp(2.1rem, 3.5vw, 3.25rem); font-weight: 400; line-height: 1.05; letter-spacing: -.02em; }
h2 { font-family: var(--display); font-weight: 400; }
h3 { font-family: var(--display); font-weight: 400; }

.thesis {
  max-width: 27ch;
  margin: 1.5rem 0 0;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 300;
  font-size: clamp(1.05rem, 1.35vw, 1.28rem);
  line-height: 1.55;
  letter-spacing: -.005em;
  color: var(--ink);
}
.thesis em { font-style: normal; color: var(--halo-blue); }
.nobr { white-space: nowrap; }

.cover__motto {
  margin: 1rem 0 0;
  color: var(--halo-blue);
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.02rem;
  letter-spacing: .01em;
}

.meta-line {
  margin: 1.5rem 0 0;
  color: var(--mist);
  font-family: var(--mono);
  font-size: .58rem;
  line-height: 1.9;
  letter-spacing: .1em;
}

.text-links, .cover__links { display: flex; flex-wrap: wrap; align-items: center; gap: 1.7rem; margin-top: 2.1rem; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding-bottom: .22rem;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .1em;
  text-decoration: none;
  transition: color .25s var(--ease), border-color .25s var(--ease), text-shadow .3s var(--ease);
}
.text-link span { transition: transform .3s var(--ease); }
.text-link:hover { color: var(--signal); border-color: var(--signal); text-shadow: 0 0 24px rgba(255,255,255,.5); }
.text-link:hover span { transform: translate(3px, 2px); }

/* ============================================================
   Cover
   ============================================================ */

.cover {
  position: relative;
  min-height: calc(100svh - var(--header-h) - 7.6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(370px, .82fr);
  align-items: center;
  gap: clamp(3rem, 5.5vw, 6rem);
  padding: 2.5rem 0 4rem;
}

.cover__copy { max-width: 640px; min-width: 0; }
h1#workbench-title { margin: 0; }
h1#workbench-title span { display: block; }

.scroll-cue {
  position: absolute;
  left: 0;
  bottom: .2rem;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--mist);
  font-family: var(--mono);
  font-size: .48rem;
  letter-spacing: .2em;
  text-decoration: none;
  transition: color .25s var(--ease);
}
.scroll-cue__line {
  position: relative;
  display: block;
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, rgba(191,227,255,.1), var(--halo-blue), rgba(191,227,255,.1));
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  width: 1px;
  height: 8px;
  background: var(--halo-white);
  box-shadow: 0 0 10px 2px rgba(255,255,255,.7);
  animation: cue 2.6s ease-in-out infinite;
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 0; }
  25% { opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translateY(56px); opacity: 0; }
}
.scroll-cue:hover { color: var(--signal); }

/* ============================================================
   Auth sheet
   ============================================================ */

.auth-panel {
  position: relative;
  isolation: isolate;
  align-self: center;
  justify-self: end;
  width: 100%;
  max-width: 430px;
  min-width: 0;
  padding: clamp(1.5rem, 2.6vw, 2.3rem);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  box-shadow: 0 44px 110px -64px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
}
.auth-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: radial-gradient(380px circle at var(--mx, 72%) var(--my, 12%), rgba(111,182,255,.18), transparent 66%);
  opacity: .85;
  pointer-events: none;
}
.auth-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 2rem;
  right: 2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--halo-blue), transparent);
  opacity: .5;
}
.auth__kicker {
  margin: 0 0 1.2rem;
  color: var(--signal);
  font-family: var(--mono);
  font-size: .52rem;
  letter-spacing: .18em;
  line-height: 1.5;
}
.auth-form-header { margin-bottom: 1.5rem; }
.auth-form-header h2 {
  margin: 0 0 .45rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.55rem, 2.2vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -.015em;
}
.auth-form-header p { margin: 0; color: var(--mist); font-size: .8rem; line-height: 1.7; }

.auth-form label,
#upload label,
#weights label,
.example-settings label {
  display: grid;
  gap: .4rem;
  margin: 0 0 .9rem;
  color: var(--mist);
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 400;
  letter-spacing: .1em;
  line-height: 1.5;
}
.auth-form > input { margin-bottom: .9rem; }

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: .72rem .78rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(4, 10, 18, .5);
  color: var(--ink);
  font-family: var(--body);
  font-size: .86rem;
  line-height: 1.5;
  transition: border-color .2s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
}
input::placeholder, textarea::placeholder { color: rgba(142, 164, 194, .55); }
input:hover, select:hover, textarea:hover { border-color: rgba(191, 227, 255, .5); }
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--signal);
  background: rgba(6, 14, 26, .8);
  box-shadow: 0 0 0 3px rgba(111, 182, 255, .13), 0 0 30px rgba(111, 182, 255, .1);
}
select { appearance: auto; }
option { background: var(--bg-deep); color: var(--ink); }

.password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; margin-bottom: .9rem; }
.password-field input { border-right: 0; }
.pw-reveal {
  border: 1px solid var(--line-strong);
  border-left: 0;
  padding: 0 .7rem;
  background: rgba(4, 10, 18, .55);
  color: var(--mist);
  font-family: var(--mono);
  font-size: .56rem;
  letter-spacing: .08em;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.pw-reveal:hover { color: var(--ink); background: rgba(111, 182, 255, .08); }

.auth-submit { width: 100%; min-height: 43px; }
.auth-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem 1rem;
  margin-top: 1.15rem;
  padding-top: .95rem;
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-size: .68rem;
}
.text-button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .06em;
  text-decoration: underline;
  text-underline-offset: .25em;
}
.text-button:hover { color: var(--signal); }
.auth__note {
  margin: 1.2rem 0 0;
  color: rgba(142, 164, 194, .7);
  font-family: var(--mono);
  font-size: .5rem;
  letter-spacing: .05em;
  line-height: 1.7;
}
.password-guidance { margin: -.2rem 0 .9rem !important; }

/* ============================================================
   Buttons, hints, notices
   ============================================================ */

.primary, .quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .68rem .95rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .06em;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .3s var(--ease);
}
.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg-deep);
  font-weight: 500;
}
.primary:hover {
  background: var(--halo-blue);
  border-color: var(--halo-blue);
  box-shadow: 0 0 26px rgba(191, 227, 255, .3), 0 0 60px rgba(111, 182, 255, .14);
}
.primary:active { transform: translateY(1px); }
.quiet:hover { border-color: var(--signal); color: var(--signal); box-shadow: 0 0 22px rgba(111, 182, 255, .12); }

.hint { margin: .4rem 0 .9rem; color: var(--mist); font-size: .7rem; line-height: 1.7; }
.hint:empty { display: none; }
code { font-family: var(--mono); font-size: .92em; color: var(--halo-blue); }

.notice {
  position: relative;
  z-index: 2;
  margin: 0 0 1.4rem;
  padding: .75rem .9rem;
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--signal);
  background: rgba(8, 19, 34, .8);
  color: var(--ink);
  font-size: .74rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.notice.error { border-left-color: var(--fail); color: var(--fail); background: rgba(45, 12, 18, .4); }
.auth-panel .notice { margin-bottom: 1rem; }

/* ============================================================
   Flow
   ============================================================ */

.flow {
  position: relative;
  padding: clamp(4rem, 8vw, 7.5rem) 0 3rem;
  border-top: 1px solid var(--line);
}
.section-heading { max-width: 640px; margin-bottom: clamp(2.4rem, 4vw, 3.6rem); }
.section-copy { max-width: 36em; margin: 1.1rem 0 0; color: var(--mist); font-size: .88rem; line-height: 1.75; }

.flow__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .82fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }

.process-rail { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.process-rail li {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  transition: border-color .35s var(--ease), background-color .35s var(--ease);
}
.process-rail li:hover { border-color: var(--line-strong); background: rgba(255,255,255,.02); }
.process-id { color: var(--signal); font-family: var(--mono); font-size: .6rem; letter-spacing: .06em; line-height: 1.8; }
.process-rail h3 { margin: 0 0 .25rem; font-size: clamp(1.25rem, 1.8vw, 1.55rem); line-height: 1.15; letter-spacing: -.01em; transition: text-shadow .35s var(--ease); }
.process-rail li:hover h3 { text-shadow: 0 0 24px rgba(255,255,255,.26); }
.process-rail p { max-width: 34em; margin: 0; color: var(--mist); font-size: .82rem; line-height: 1.65; }

.specimen {
  position: relative;
  isolation: isolate;
  margin: 0;
  padding: 1.35rem 1.45rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-top: 1px solid rgba(191, 227, 255, .5);
  border-radius: 2px;
  box-shadow: 0 40px 100px -64px rgba(0,0,0,.95);
  transition: border-color .35s var(--ease), transform .35s var(--ease), box-shadow .45s var(--ease);
}
.specimen::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 82%) var(--my, 6%), rgba(111,182,255,.18), transparent 66%);
  opacity: .8;
  pointer-events: none;
}
.specimen:hover { border-color: rgba(191, 227, 255, .55); transform: translateY(-3px); box-shadow: 0 48px 110px -60px rgba(0,0,0,1), 0 0 44px rgba(111,182,255,.08); }

.specimen__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.specimen__label { margin: 0; color: var(--mist); font-family: var(--mono); font-size: .5rem; letter-spacing: .14em; }
.specimen__id { margin: 0; color: var(--signal); font-family: var(--mono); font-size: .5rem; letter-spacing: .06em; }
.specimen__project { margin: 1.1rem 0 .2rem; font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 2.3vw, 1.95rem); line-height: 1.15; letter-spacing: -.015em; }
.specimen__meta { margin: 0; color: var(--mist); font-family: var(--mono); font-size: .5rem; line-height: 1.7; letter-spacing: .03em; }
.specimen__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1rem 0 0; padding: .7rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specimen__facts div { min-width: 0; padding-right: .7rem; border-right: 1px solid var(--line); }
.specimen__facts div:last-child { border-right: 0; padding-right: 0; }
.specimen__facts dt { margin-bottom: .25rem; color: var(--mist); font-family: var(--mono); font-size: .5rem; line-height: 1.4; letter-spacing: .06em; }
.specimen__facts dd { margin: 0; color: var(--ink); font-family: var(--mono); font-size: .62rem; line-height: 1.5; white-space: nowrap; }
.specimen__facts dd.is-ok { color: var(--pass); }
.specimen__total { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: .8rem; }
.specimen__score { display: flex; align-items: baseline; gap: .4rem; margin: 0; font-family: var(--display); font-weight: 300; font-size: clamp(2.5rem, 3.8vw, 3.4rem); line-height: .9; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.specimen__score span { color: var(--mist); font-family: var(--mono); font-size: .5rem; font-weight: 400; letter-spacing: .02em; }
.specimen__verdict { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .2rem; color: var(--pass); font-family: var(--mono); font-size: .6rem; letter-spacing: .08em; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px 2px currentColor; }
.specimen figcaption { margin-top: .8rem; padding-top: .65rem; border-top: 1px solid var(--line); color: rgba(142,164,194,.75); font-family: var(--mono); font-size: .48rem; line-height: 1.7; letter-spacing: .04em; }

/* ============================================================
   Lab 05 — API / Docker
   ============================================================ */

.lab-five { position: relative; padding: clamp(4rem, 8vw, 7rem) 0; border-top: 1px solid var(--line); }
.lab-five__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(330px, .82fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
.lab-five__copy { min-width: 0; }
.lab-five h2 { margin: 0; font-size: clamp(1.9rem, 3.2vw, 2.8rem); line-height: 1.05; letter-spacing: -.02em; }
.lab-five .section-copy { max-width: 38em; margin-top: 1rem; color: var(--mist); font-size: .86rem; line-height: 1.75; }
.lab-five .meta-line { margin-top: 1rem; }

.project-line { margin: .9rem 0 0; color: var(--mist); font-family: var(--mono); font-size: .5rem; line-height: 1.8; letter-spacing: .03em; }

.endpoint-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.15rem; margin: 1rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.endpoint-list li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .4rem; align-items: baseline; padding: .36rem 0; border-bottom: 1px solid var(--line); color: var(--mist); font-family: var(--mono); font-size: .52rem; }
.endpoint-list__wide { grid-column: 1 / -1; }
.endpoint-list code { color: var(--ink); font: inherit; font-size: .52rem; overflow-wrap: anywhere; }
.endpoint-list .http-method { color: var(--signal); font-size: .48rem; }
.endpoint-status { color: var(--pass); font-size: .46rem; }

.lab-list { margin: 1rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.lab-list li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .8rem; padding: .65rem 0; border-bottom: 1px solid var(--line); transition: border-color .3s var(--ease), background-color .3s var(--ease); }
.lab-list li:hover { border-color: var(--line-strong); background: rgba(255,255,255,.02); }
.lab-list__id { color: var(--signal); font-family: var(--mono); font-size: .55rem; line-height: 1.8; }
.lab-list h3 { margin: 0 0 .1rem; font-size: 1.05rem; line-height: 1.25; font-weight: 400; }
.lab-list p { max-width: 44em; margin: 0; color: var(--mist); font-size: .72rem; line-height: 1.6; }
.lab-list code { color: var(--halo-blue); font-size: .95em; }

.lab-five__deliver { margin: .8rem 0 0; color: rgba(142,164,194,.78); font-family: var(--mono); font-size: .5rem; line-height: 1.7; letter-spacing: .04em; }
.lab-five__links { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1rem; }

.build-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 450px;
  justify-self: end;
  margin: 0;
  padding: 1.05rem 1.15rem .9rem;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-top: 1px solid rgba(191, 227, 255, .52);
  border-radius: 2px;
  box-shadow: 0 40px 100px -64px rgba(0,0,0,.95);
  transition: border-color .35s var(--ease), transform .35s var(--ease), box-shadow .45s var(--ease);
}
.build-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 82%) var(--my, 6%), rgba(111,182,255,.18), transparent 66%);
  opacity: .8;
  pointer-events: none;
}
.build-card:hover { border-color: rgba(191,227,255,.55); transform: translateY(-3px); box-shadow: 0 48px 110px -60px rgba(0,0,0,1), 0 0 44px rgba(111,182,255,.08); }
.build-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .55rem; border-bottom: 1px dashed var(--line-strong); color: var(--mist); font-family: var(--mono); font-size: .48rem; letter-spacing: .09em; }
.build-card__top p { margin: 0; }
.build-card__top p:last-child { color: var(--signal); letter-spacing: .03em; }
.build-card__status { display: flex; align-items: center; gap: .9rem; padding: .5rem 0; border-bottom: 1px solid var(--line); color: var(--mist); font-family: var(--mono); font-size: .48rem; }
.build-card__status span { display: inline-flex; align-items: center; gap: .3rem; }
.build-card__status .dot { width: 4px; height: 4px; color: var(--pass); }

.build-card__code { margin: .6rem 0 0; padding: .6rem .7rem; border: 1px solid var(--line); background: var(--code); color: #dbe8f8; font: .55rem/1.62 var(--mono); overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.build-card__code code { color: inherit; font: inherit; }
.build-card__run { margin: .5rem 0 0; color: var(--mist); font-family: var(--mono); font-size: .5rem; line-height: 1.7; }
.build-card__run p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.build-card__run .prompt { color: var(--signal); }
.build-card__run .continuation { color: rgba(142,164,194,.7); }
.build-card__ready { margin: .35rem 0 0; padding: .45rem .55rem; border: 1px solid rgba(143,227,184,.2); background: rgba(143,227,184,.05); color: var(--pass); font-family: var(--mono); font-size: .5rem; line-height: 1.65; overflow-wrap: anywhere; }
.build-card__ready code { display: block; color: var(--ink); font: inherit; }
.build-card__foot { display: flex; justify-content: space-between; gap: .8rem; margin-top: .55rem; padding-top: .5rem; border-top: 1px dashed var(--line-strong); color: var(--mist); font-family: var(--mono); font-size: .44rem; }
.build-card figcaption { margin-top: .45rem; color: rgba(142,164,194,.65); font-family: var(--mono); font-size: .42rem; letter-spacing: .03em; }

/* ============================================================
   Session state
   ============================================================ */

#workbench.has-session .cover {
  display: block;
  min-height: 0;
  padding: 0 0 1.35rem;
  border-bottom: 1px solid var(--line);
}
#workbench.has-session .cover__copy { max-width: none; }
#workbench.has-session .thesis,
#workbench.has-session .cover__motto,
#workbench.has-session .meta-line,
#workbench.has-session .cover__links,
#workbench.has-session .scroll-cue,
#workbench.has-session #auth,
#workbench.has-session .flow,
#workbench.has-session .lab-five { display: none; }
#workbench.has-session .eyebrow { display: flex; margin-bottom: .8rem; font-size: .55rem; }
#workbench.has-session .eyebrow span:first-child { display: none; }
#workbench.has-session h1#workbench-title { font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.1; letter-spacing: -.02em; }
#workbench.has-session h1#workbench-title span:first-child { display: none; }
#workspace { margin-top: 1.4rem; }

#navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}
#navigation:empty { display: none; }
#navigation .quiet {
  position: relative;
  border: 0;
  padding: .45rem 0 .8rem;
  background: none;
  color: var(--mist);
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .1em;
}
#navigation .quiet:hover { color: var(--ink); background: none; box-shadow: none; }
#navigation .quiet.selected { color: var(--ink); }
#navigation .quiet.selected::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--halo-white), var(--signal));
  box-shadow: 0 0 14px rgba(111,182,255,.6);
}

/* ============================================================
   Workspace panels
   ============================================================ */

.board { display: grid; grid-template-columns: minmax(270px, 360px) minmax(0, 1fr); gap: clamp(1.4rem, 2.6vw, 2.2rem); align-items: start; }
.board:has(.intake[hidden]) { grid-template-columns: minmax(0, 1fr); }

.panel {
  position: relative;
  min-width: 0;
  padding: clamp(1.1rem, 2vw, 1.55rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color .35s var(--ease), box-shadow .45s var(--ease);
}
.panel:hover { border-color: var(--line-strong); }
.intake, .receipts, .scoring { border-top-color: rgba(191,227,255,.34); }

.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}
.panel__head h2 { margin: .15rem 0 0; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.2; letter-spacing: -.01em; }
.panel__head .eyebrow { margin-bottom: .35rem; }
.panel__tag {
  flex: 0 0 auto;
  padding: .16rem .34rem .2rem;
  border: 1px solid var(--line-strong);
  color: var(--signal);
  font-family: var(--mono);
  font-size: .48rem;
  letter-spacing: .12em;
  line-height: 1.4;
}

#upload label, #weights label { margin-bottom: .8rem; }
#upload select, #weights select, #weights textarea { font-size: .8rem; }
input[type="file"] {
  padding: .75rem;
  border: 1px dashed var(--line-strong);
  background: rgba(4, 10, 18, .35);
  color: var(--mist);
  font-size: .68rem;
}
input[type="file"]::file-selector-button {
  margin-right: .7rem;
  border: 1px solid var(--line-strong);
  padding: .4rem .6rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .5rem;
  letter-spacing: .08em;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--signal); color: var(--signal); }
input[type="file"]:focus-within { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(111,182,255,.1); }
.upload-submit { width: 100%; min-height: 42px; }
#upload-status { margin-bottom: 0; }
#more { display: block; margin: 1rem auto 0; }
.panel__head .quiet { padding: .32rem .6rem; font-size: .6rem; }
.panel__head a.quiet { padding: .32rem .6rem; font-size: .55rem; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead th {
  padding: .6rem .5rem;
  border-bottom: 1px solid var(--line-strong);
  color: var(--mist);
  font-family: var(--mono);
  font-size: .54rem;
  font-weight: 400;
  letter-spacing: .1em;
  white-space: nowrap;
}
tbody td { padding: .9rem .5rem; border-bottom: 1px solid var(--line); font-size: .8rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .3s var(--ease); }
tbody tr:hover { background-color: rgba(255,255,255,.025); }
.receipt-project { font-family: var(--display); font-size: 1.02rem; font-weight: 400; line-height: 1.3; letter-spacing: -.005em; }
.row-detail { display: block; margin-top: .2rem; color: var(--mist); font-family: var(--mono); font-size: .54rem; font-weight: 400; line-height: 1.5; letter-spacing: .03em; overflow-wrap: anywhere; }
.receipt-time { color: var(--mist); font-family: var(--mono); font-size: .56rem; line-height: 1.5; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); font-family: var(--mono); font-size: .6rem; line-height: 1.4; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px 1px currentColor; opacity: .9; }
.status.good { color: var(--pass); }
.status.bad { color: var(--fail); }
.status.wait { color: var(--warn); }

td .quiet {
  border: 0;
  padding: 0;
  background: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .05em;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: .25em;
}
td .quiet:hover { color: var(--signal); text-decoration-color: var(--signal); box-shadow: none; text-shadow: 0 0 18px rgba(111,182,255,.5); }
td .hint { margin: .25rem 0; }

/* ============================================================
   Scoring
   ============================================================ */

.scoring { max-width: 940px; margin-top: 1.4rem; }
.scoring .panel__head { padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.weight-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 .8rem; }
#weights select { max-width: 24rem; }
#weights textarea { min-height: 62px; resize: vertical; }
#preview { margin-top: .9rem; }
#preview h3 { margin: 1rem 0 .35rem; font-family: var(--display); font-size: 1.05rem; font-weight: 400; }
#preview ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--mist); font-size: .74rem; line-height: 1.8; }
#weight-history ul { padding-left: 1.1rem; color: var(--mist); font-size: .7rem; line-height: 1.8; }

details { margin-top: .85rem; padding-top: .65rem; border-top: 1px solid var(--line); }
summary { color: var(--ink); font-size: .72rem; font-weight: 400; list-style: none; }
summary::-webkit-details-marker { display: none; }
#weight-history > summary,
.example-setup-requests > summary,
#report-content > details > summary,
.report-case > summary { display: flex; align-items: center; gap: .5rem; }
#weight-history > summary::after,
.example-setup-requests > summary::after,
#report-content > details > summary::after,
.report-case > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--signal);
  font-family: var(--mono);
  font-size: .65rem;
}
#weight-history[open] > summary::after,
.example-setup-requests[open] > summary::after,
#report-content > details[open] > summary::after,
.report-case[open] > summary::after { content: "\2212"; }

/* ============================================================
   Report dialog
   ============================================================ */

dialog {
  width: min(880px, calc(100vw - 2rem));
  max-height: 88dvh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-top: 1px solid rgba(191,227,255,.55);
  border-radius: 2px;
  background: rgba(6, 14, 26, .97);
  color: var(--ink);
  box-shadow: 0 60px 150px -60px rgba(0,0,0,1), 0 0 80px rgba(111,182,255,.06);
}
dialog::backdrop { background: rgba(2, 6, 12, .78); }
dialog[open] { animation: sheet-in .3s var(--ease-out) both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
.report__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.45rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.report__head h2 { margin: .15rem 0 0; font-size: 1.45rem; line-height: 1.2; }
.report__head .eyebrow { margin-bottom: .3rem; }
#close-report { padding: .3rem .6rem; font-size: .55rem; }
#report-content { max-height: calc(88dvh - 4.6rem); overflow: auto; padding: 1.25rem 1.4rem 1.5rem; font-size: .8rem; }
.report-summary { display: flex; align-items: flex-end; gap: 1.1rem; margin: 0 0 1rem; }
.report-summary .status { margin-bottom: .35rem; }
.report-score { display: flex; align-items: baseline; margin: 0; font-family: var(--display); font-weight: 300; line-height: 1; }
.report-score-value { font-size: 2.4rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.report-score-unit { margin-left: .3rem; color: var(--mist); font-family: var(--mono); font-size: .5rem; }
#report-content dl { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: .5rem 1.25rem; margin: 0 0 1rem; }
#report-content dt { color: var(--mist); font-family: var(--mono); font-size: .52rem; line-height: 1.7; letter-spacing: .04em; }
#report-content dd { margin: 0; color: var(--ink); font-size: .76rem; line-height: 1.65; overflow-wrap: anywhere; }
.report-case { margin: .35rem 0; padding-top: .6rem; }
.report-case summary { flex-wrap: wrap; }
.report-case ol { margin: .5rem 0 .2rem; padding-left: 1.2rem; color: var(--mist); font-size: .72rem; line-height: 1.8; }
.report-case .status { margin-right: .2rem; }
#report-content h3.report-section { margin: 1.1rem 0 .5rem; padding-top: .9rem; border-top: 1px solid var(--line); font-family: var(--display); font-size: 1.05rem; font-weight: 400; }
.diagnostic { margin: .2rem 0 .8rem; padding: .65rem .8rem; border-left: 2px solid var(--signal); background: rgba(111,182,255,.06); color: var(--halo-blue); font-family: var(--mono); font-size: .62rem; line-height: 1.7; overflow-wrap: anywhere; }

/* ============================================================
   Public examples
   ============================================================ */

.examples-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 0 2.2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.examples-hero .thesis { max-width: 36em; margin-top: 1rem; font-size: 1.08rem; }
.examples-hero .text-link { flex: 0 0 auto; }
.examples-hero h1 { margin: 0; font-size: clamp(2.8rem, 5vw, 4.5rem); }

.examples-layout { display: grid; grid-template-columns: minmax(230px, 286px) minmax(0, 1fr); gap: clamp(1.4rem, 2.8vw, 2.4rem); align-items: start; }

.example-sidebar { position: sticky; top: 88px; padding: 0 0 .7rem; }
.example-settings { padding: 1rem 1.05rem .85rem; border-bottom: 1px solid var(--line); }
.example-settings select { font-size: .78rem; }
.example-roles { margin: .5rem 0 0; color: var(--mist); font-family: var(--mono); font-size: .54rem; line-height: 1.8; letter-spacing: .02em; }
.example-roles code, .example-note code { color: var(--halo-blue); font: inherit; }
.example-sidebar__label { margin: 1rem 1.05rem .35rem; }
.example-sidebar h2 { margin: 0 1.05rem .5rem; font-size: 1.05rem; line-height: 1.3; letter-spacing: -.01em; }

.suite-list { margin: 0; padding: 0 .45rem; list-style: none; }
.suite-list li + li { border-top: 1px solid var(--line); }
.suite-choice {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: .62rem .55rem;
  border: 0;
  background: none;
  color: var(--mist);
  font-size: .76rem;
  line-height: 1.45;
  text-align: left;
  transition: color .25s var(--ease), background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.suite-choice:hover { color: var(--ink); background: rgba(255,255,255,.025); }
.suite-choice[aria-pressed="true"] {
  color: var(--ink);
  background: linear-gradient(90deg, rgba(111,182,255,.13), transparent 72%);
  box-shadow: inset 2px 0 0 var(--signal);
}
.case-id { flex: 0 0 auto; color: var(--signal); font-family: var(--mono); font-size: .5rem; letter-spacing: .06em; }

.example-content { min-width: 0; }
.example-setup { margin-bottom: 1.15rem; padding: 0; }
.example-setup-intro { padding: 1.15rem 1.25rem 0; }
.example-setup-intro h2 { margin: 0 0 .35rem; font-size: 1.35rem; line-height: 1.2; }
.example-setup-intro p { margin: 0 0 .6rem; color: var(--mist); font-size: .82rem; line-height: 1.75; }
.example-setup-requests { margin: 0; padding: 0; border-top: 1px solid var(--line); }
.example-setup-requests > summary { padding: .65rem 1.25rem; color: var(--signal); font-family: var(--mono); font-size: .56rem; letter-spacing: .04em; }
.example-setup-requests > summary:hover { color: var(--halo-white); }

.example-detail { padding: 0; border-top-color: rgba(191,227,255,.34); }
.example-case-header { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .5rem .7rem; padding: 1.15rem 1.25rem 0; }
.example-case-header h2 { margin: 0; font-family: var(--display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 400; line-height: 1.25; letter-spacing: -.01em; }
.example-case-header p { grid-column: 1 / -1; margin: .2rem 0 .9rem; color: var(--mist); font-size: .82rem; line-height: 1.75; }
.example-case-header .case-id { align-self: start; padding-top: .35rem; }

.sample-steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.sample-steps li + li { border-top: 1px solid var(--line); }
details.sample-step { margin: 0; padding: 0; border: 0; }
.sample-step > summary {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto 16px;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1.25rem;
  list-style: none;
  transition: background-color .25s var(--ease);
}
.sample-step > summary::-webkit-details-marker { display: none; }
.sample-step > summary::after { content: "+"; color: var(--signal); font-family: var(--mono); font-size: .7rem; text-align: center; }
.sample-step[open] > summary::after { content: "\2212"; }
.sample-step > summary:hover, .sample-step[open] > summary { background: rgba(111,182,255,.055); }
.step-number { color: var(--signal); font-family: var(--mono); font-size: .52rem; }
.step-title { color: var(--ink); font-size: .76rem; font-weight: 400; overflow-wrap: anywhere; }
.step-endpoint { display: flex; align-items: baseline; gap: .35rem; min-width: 0; color: var(--mist); font-family: var(--mono); font-size: .54rem; }
.step-endpoint code { color: var(--mist); overflow-wrap: anywhere; }
.http-method { color: var(--ink); font-size: .54rem; }
.http-status {
  min-width: 2.1rem;
  padding: .1rem .22rem;
  border: 1px solid currentColor;
  color: var(--pass);
  font-family: var(--mono);
  font-size: .54rem;
  line-height: 1.5;
  text-align: center;
}
.http-status.expected-rejection { color: var(--warn); }
.http-exchange { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; padding: .2rem 1.25rem 1.1rem; border-top: 1px solid var(--line); background: rgba(4,10,18,.3); }
.http-pane { min-width: 0; }
.http-pane h3 { margin: .65rem 0 .35rem; color: var(--mist); font-family: var(--mono); font-size: .54rem; font-weight: 400; letter-spacing: .1em; }
.http-pane pre { margin: 0; padding: .75rem .8rem; overflow: auto; border: 1px solid var(--line); background: var(--code); color: #dbe8f8; font: .64rem/1.7 var(--mono); tab-size: 2; }
.http-pane code { font: inherit; color: inherit; }
.http-pane .hint { margin: .35rem 0 0; font-size: .6rem; }
.example-note { margin: 0; padding: .7rem 1.25rem; border-top: 1px solid var(--line); color: var(--mist); font-size: .66rem; line-height: 1.75; }
.case-pager { display: flex; justify-content: space-between; gap: .7rem; padding: .65rem 1.25rem .8rem; border-top: 1px solid var(--line); }
.case-pager .quiet { padding: .32rem .65rem; font-size: .6rem; }
.case-pager .quiet + .quiet { margin-left: auto; }

/* ============================================================
   Reveals + pointer glow
   ============================================================ */

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 1.05s var(--ease-out),
    transform 1.05s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

[data-glow] { --mx: 72%; --my: 10%; }
[data-i="0"] { --i: 0; }
[data-i="1"] { --i: 1; }
[data-i="2"] { --i: 2; }
[data-i="3"] { --i: 3; }
[data-i="4"] { --i: 4; }
[data-i="5"] { --i: 5; }
[data-i="6"] { --i: 6; }
[data-i="7"] { --i: 7; }
[data-i="8"] { --i: 8; }
[data-i="9"] { --i: 9; }
[data-i="10"] { --i: 10; }
[data-i="11"] { --i: 11; }
[data-i="12"] { --i: 12; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1180px) {
  :root { --seam-left: 22px; }
  .cover { grid-template-columns: minmax(0, 1fr) minmax(340px, .78fr); gap: 3rem; }
  .display { font-size: clamp(2.9rem, 5.6vw, 4.6rem); }
  .meridian { opacity: .75; }
}

@media (max-width: 980px) {
  :root { --header-h: 58px; }
  .meridian { display: none; }
  .cover { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; min-height: auto; padding: 2rem 0 4rem; }
  .auth-panel { justify-self: start; max-width: 560px; }
  .scroll-cue { display: none; }
  .display { font-size: clamp(2.9rem, 8vw, 4.2rem); }
  .flow__grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .examples-layout { grid-template-columns: minmax(0, 1fr); }
  .example-sidebar { position: static; }
  .topbar__links { gap: 1.1rem; }
}

@media (max-width: 700px) {
  :root { --gutter: 20px; }
  .topbar { gap: 1rem; }
  .brand__tail { display: none; }
  .brand__name { font-size: .94rem; }
  .topbar__links { gap: 1rem; }
  .topbar__links a { font-size: .56rem; letter-spacing: .06em; }
  .identity { margin-left: .5rem; gap: .4rem; }
  .identity-name { display: none; }
  .identity-role { font-size: .46rem; }
  .page { padding-top: calc(var(--header-h) + 1.8rem); padding-bottom: 3.5rem; }
  .cover { padding-top: 1rem; }
  .display { font-size: clamp(2.5rem, 10vw, 3.2rem); }
  .thesis { font-size: 1.05rem; }
  .cover__motto { font-size: .92rem; }
  .meta-line { font-size: .52rem; }
  .auth-panel { max-width: none; padding: 1.35rem; }
  .flow { padding: 3.2rem 0 2rem; }
  .section-heading { margin-bottom: 1.8rem; }
  .display--sm { font-size: 2rem; }
  .process-rail li { grid-template-columns: 2rem minmax(0, 1fr); gap: .8rem; padding: 1.05rem 0; }
  .process-rail h3 { font-size: 1.15rem; }
  .specimen { padding: 1rem; }
  .specimen__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 0; }
  .specimen__facts div { padding: .3rem .6rem .3rem 0; }
  .specimen__facts div:nth-child(2n) { border-right: 0; }
  .specimen__facts div:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: .55rem; }
  .specimen__score { font-size: 2.6rem; }
  .examples-hero { flex-direction: column; align-items: flex-start; gap: 1rem; padding-top: 0; }
  .examples-hero h1 { font-size: 2.7rem; }
  .example-case-header, .example-note, .case-pager { padding-inline: 1rem; }
  .example-setup-intro { padding-inline: 1rem; }
  .example-setup-requests > summary { padding-inline: 1rem; }
  .sample-step > summary { grid-template-columns: 18px minmax(0, 1fr) auto 16px; gap: .35rem .55rem; padding: .6rem 1rem; }
  .step-endpoint { grid-column: 2; grid-row: 2; }
  .http-status { grid-column: 3; grid-row: 1 / 3; }
  .sample-step > summary::after { grid-column: 4; grid-row: 1 / 3; }
  .http-exchange { grid-template-columns: minmax(0, 1fr); padding-inline: 1rem; }
  .http-pane pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .weight-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report__head { padding: .9rem 1rem; }
  #report-content { padding: 1rem; }
  #report-content dl { grid-template-columns: minmax(0, 1fr); gap: .15rem 0; }
  #report-content dt { margin-top: .45rem; }
  input, select, textarea { font-size: 16px; }
}

@media (max-width: 720px) {
  .receipts .table-wrap { overflow: visible; }
  .receipts table { min-width: 0; }
  .receipts thead { display: none; }
  .receipts tbody { display: block; }
  .receipts tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .3rem .8rem;
    padding: .9rem 0;
    border-bottom: 1px solid var(--line);
  }
  .receipts tbody tr:last-child { border-bottom: 0; }
  .receipts tbody tr:hover { background: transparent; }
  .receipts tbody td { display: block; padding: 0; border: 0; }
  .receipts .receipt-project { grid-column: 1; grid-row: 1; }
  .receipts .receipt-time { grid-column: 2; grid-row: 1; align-self: start; font-size: .5rem; text-align: right; }
  .receipts .receipt-status { grid-column: 1; grid-row: 2; }
  .receipts .receipt-action { grid-column: 2; grid-row: 2; align-self: center; justify-self: end; }
  .receipts .receipt-empty { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .display { font-size: 2.35rem; }
  .display--sm { font-size: 1.85rem; }
  .topbar__links a { font-size: .52rem; }
  .brand__name { font-size: .88rem; }
  .auth-form-header h2 { font-size: 1.42rem; }
  .specimen__score { font-size: 2.3rem; }
  .weight-inputs { grid-template-columns: minmax(0, 1fr); }
  #navigation { gap: 1.1rem; }
  .suite-list { padding-inline: .3rem; }
  .example-sidebar h2, .example-sidebar__label, .example-settings { padding-inline: .85rem; }
  .example-sidebar h2, .example-sidebar__label { margin-inline: .85rem; }
}

@media (max-height: 720px) and (min-width: 981px) {
  .cover { padding-top: 1rem; padding-bottom: 2rem; }
  .display { font-size: clamp(2.7rem, 4.3vw, 4rem); }
  .thesis { margin-top: 1.1rem; font-size: 1.08rem; }
  .cover__motto { margin-top: .7rem; }
  .meta-line { margin-top: 1rem; }
  .cover__links { margin-top: 1.4rem; }
}

/* ============================================================
   Deck navigation — logged-out home only
   ============================================================ */

.deck-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 36;
  height: var(--nav-h);
  transform: translateX(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
html.deck-mode .deck-nav { display: flex; }
.deck-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 28px;
  pointer-events: auto;
}
.deck-nav a::before {
  content: "";
  display: block;
  width: 4px;
  height: 2px;
  background: var(--mist);
  opacity: .45;
  transition: width .35s var(--ease), opacity .35s var(--ease), background-color .35s var(--ease), box-shadow .35s var(--ease);
}
.deck-nav a::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + .4rem);
  transform: translate(-50%, 4px);
  padding: .3rem .45rem;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .5rem;
  letter-spacing: .1em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.deck-nav a:hover::before,
.deck-nav a:focus-visible::before { width: 14px; background: var(--halo-blue); opacity: 1; box-shadow: 0 0 10px rgba(191,227,255,.5); }
.deck-nav a:hover::after,
.deck-nav a:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.deck-nav a.is-active::before {
  width: 24px;
  background: var(--halo-white);
  opacity: 1;
  box-shadow: 0 0 12px 2px rgba(214,236,255,.72), 0 0 34px 8px rgba(111,182,255,.36);
}

/* ============================================================
   Deck mode — desktop home, three full-height panels
   ============================================================ */

@media (min-width: 981px) {
  html.deck-mode { scroll-snap-type: y mandatory; scrollbar-width: none; }
  html.deck-mode::-webkit-scrollbar { display: none; }
  html.deck-mode .page { padding-top: 0; padding-bottom: 0; }
  html.deck-mode .home-panel { min-height: 100svh; scroll-snap-align: start; scroll-snap-stop: always; }
  html.deck-mode .cover {
    min-height: 100svh;
    padding-top: calc(var(--header-h) + 2.2rem);
    padding-bottom: calc(var(--nav-h) + 1.6rem);
  }
  html.deck-mode .lab-five {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: calc(var(--header-h) + 2rem);
    padding-bottom: calc(var(--nav-h) + 1.6rem);
    border-top: 0;
  }
  html.deck-mode .flow {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: calc(var(--header-h) + 2rem);
    padding-bottom: calc(var(--nav-h) + 1.5rem);
    border-top: 0;
  }
  html.deck-mode .scroll-cue { bottom: calc(var(--nav-h) + .4rem); }
}

@media (max-width: 980px) {
  .lab-five__grid { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
  .build-card { justify-self: start; max-width: 560px; }
}

@media (max-width: 700px) {
  .lab-five { padding: 3.2rem 0; }
  .lab-five h2 { font-size: 2rem; }
  .lab-five .section-copy { font-size: .84rem; }
  .lab-list li { grid-template-columns: 1.6rem minmax(0,1fr); gap: .6rem; padding: .65rem 0; }
  .lab-list h3 { font-size: .96rem; }
  .lab-list p { font-size: .7rem; }
  .endpoint-list { grid-template-columns: minmax(0, 1fr); }
  .build-card { padding: 1rem; }
  .build-card__code { font-size: .5rem; }
  .build-card__foot { font-size: .44rem; }
}

@media (max-height: 800px) and (min-width: 981px) {
  html.deck-mode .cover,
  html.deck-mode .home-panel { padding-top: calc(var(--header-h) + 1rem); padding-bottom: calc(var(--nav-h) + .8rem); }
  html.deck-mode .display { font-size: clamp(2.6rem, 4.4vw, 4.2rem); }
  html.deck-mode .cover .thesis { margin-top: 1rem; font-size: 1.1rem; }
  html.deck-mode .cover__motto { margin-top: .6rem; }
  html.deck-mode .cover__links { margin-top: 1.2rem; }
  html.deck-mode .lab-five h2 { font-size: 2.25rem; }
  html.deck-mode .lab-list li { padding: .55rem 0; }
  html.deck-mode .lab-list p { font-size: .7rem; }
  html.deck-mode .build-card { padding: 1rem; }
  html.deck-mode .build-card__code { font-size: .48rem; }
  html.deck-mode .flow .section-heading { margin-bottom: 1.35rem; }
  html.deck-mode .process-rail li { padding: .85rem 0; }
  html.deck-mode .specimen { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.deck-mode { scroll-snap-type: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .meridian__halo { opacity: 1; }
  .scroll-cue__line::after { display: none; }
}

