:root {
  --bio-ink: #141414; --bio-surface: #1f1f1d; --bio-paper: #fbfbfb; --bio-muted: #a3a3a0;
  --bio-orange: #e65f2b; --bio-yellow: #f5d556; --bio-green: #469b5b;
  --bio-blue: #5889f7; --bio-purple: #904cf6; --bio-pink: #e7a0ea;
  --bio-radius-card: 28px; --bio-radius-panel: 36px; --bio-radius-pill: 999px;
  --bio-gutter: 32px; --bio-gap: 28px;
  --bio-font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bio-ink); color: var(--bio-paper); font: 400 19px/1.35 var(--bio-font); letter-spacing: -.01em; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.05; font-weight: 600; text-wrap: balance; }
a { color: inherit; }
i { font-style: normal; }
button, input, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--bio-yellow); outline-offset: 3px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--bio-paper); color: var(--bio-ink); padding: 10px 18px; border-radius: var(--bio-radius-pill); z-index: 5; }
.skip:focus { left: 16px; }
.muted { color: var(--bio-muted); }

.site-header { display: flex; justify-content: space-between; align-items: center; padding: 24px var(--bio-gutter); }
#app { padding: 0 var(--bio-gutter) 100px; max-width: 1460px; margin: 0 auto; }

/* Wordmark */
.word { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.word i { display: grid; place-items: center; color: var(--bio-ink); font-weight: 800; width: var(--tile); height: var(--tile); border-radius: var(--tile-radius); font-size: calc(var(--tile) * .62); line-height: 1; }
.wordmark { display: block; text-decoration: none; }
.wordmark-small { --tile: 44px; --tile-radius: 13px; border-radius: 13px; }
.wordmark-hero { --tile: clamp(44px, 6.3vw, 92px); --tile-radius: clamp(13px, 1.8vw, 26px); }
.wordmark-hero .word i:nth-child(odd) { transform: translateY(-4px); animation: bob 3.4s ease-in-out infinite; }
.wordmark-hero .word i:nth-child(even) { transform: translateY(4px); animation: bob 3.4s ease-in-out infinite reverse; }
.word-break { flex-basis: 100%; height: 0; }
.t-orange { background: var(--bio-orange); } .t-yellow { background: var(--bio-yellow); } .t-green { background: var(--bio-green); }
.t-blue { background: var(--bio-blue); } .t-purple { background: var(--bio-purple); } .t-pink { background: var(--bio-pink); }
.t-o { position: relative; }
.t-o::after { content: ""; width: 62%; height: 62%; border-radius: 50%; background: var(--bio-ink); }
@keyframes bob { 50% { translate: 0 -5px; } }

/* Controls */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 26px; border: 0; border-radius: var(--bio-radius-pill); background: var(--bio-paper); color: var(--bio-ink); font-size: 16px; font-weight: 500; letter-spacing: 0; cursor: pointer; text-decoration: none; transition: translate .25s var(--spring); }
.button:hover:not(:disabled) { translate: 0 -3px; }
.button:disabled { opacity: .55; cursor: progress; }
.button-quiet { background: var(--bio-surface); color: var(--bio-paper); }
.button-ink { background: var(--bio-ink); color: var(--bio-paper); }
.link-button { background: none; border: 0; padding: 12px 0; min-height: 44px; color: var(--bio-muted); font-size: 16px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--bio-paper); }
textarea, input[type=text], input[type=password] { width: 100%; background: var(--bio-ink); border: 0; border-radius: 20px; padding: 16px 20px; color: var(--bio-paper); }
textarea { min-height: 128px; resize: vertical; line-height: 1.35; }
::placeholder { color: var(--bio-muted); opacity: 1; }

/* Login */
.login { display: grid; justify-items: center; gap: 28px; width: min(100%, 560px); margin: 0 auto; padding: 72px 16px; text-align: center; }
.login .lead { color: var(--bio-muted); font-size: 22px; }
.login .wordmark-hero { --tile: clamp(44px, 12vw, 76px); --tile-radius: clamp(13px, 3.4vw, 22px); }
.login-form { display: grid; gap: 10px; width: 100%; text-align: left; padding: 28px; }
.login-form label { font-size: 16px; font-weight: 500; margin-top: 8px; }
.login-form .button { margin-top: 16px; }
.form-error { background: var(--bio-orange); color: var(--bio-ink); padding: 12px 18px; border-radius: 16px; font-size: 16px; font-weight: 500; }

/* Surfaces */
.panel { background: var(--bio-surface); border-radius: var(--bio-radius-panel); }
.card { background: var(--bio-surface); border-radius: var(--bio-radius-card); padding: 21px; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--bio-gap); padding: clamp(24px, 4vw, 56px); align-items: center; }
.hero .lead { font-size: 22px; margin: 28px 0 24px; max-width: 34em; }
.hero-art svg { display: block; width: 100%; max-width: 460px; margin: 0 auto; height: auto; }
.planet { transform-origin: center; animation: drift 9s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateY(-10px) rotate(-2deg); } }
.composer { display: grid; gap: 14px; }
.composer-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { border: 0; border-radius: var(--bio-radius-pill); background: var(--bio-ink); color: var(--bio-paper); font-size: 16px; min-height: 44px; padding: 0 18px; cursor: pointer; text-align: left; transition: translate .25s var(--spring); }
.chip:hover { translate: 0 -2px; }
.section { margin-top: 100px; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: var(--bio-gap); margin-bottom: 44px; align-items: end; }
.section-head h2 { font-size: 52px; letter-spacing: -.04em; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--bio-gap); }
.course-card { display: flex; flex-direction: column; min-height: 300px; text-decoration: none; transition: translate .25s var(--spring); }
.course-card:hover { translate: 0 -4px; }
.course-card .art { flex: 1; min-height: 120px; }
.course-card .art svg { width: 104px; height: 104px; display: block; }
.course-card h3 { font-size: 25px; letter-spacing: -.03em; margin-bottom: 8px; overflow-wrap: anywhere; }
.course-card p { font-size: 16px; color: var(--bio-muted); }
.pips { display: flex; gap: 5px; margin-bottom: 14px; }
.pip { width: 22px; height: 10px; border-radius: 5px; background: var(--bio-ink); }
.pip.on { background: var(--bio-green); }
.empty { padding: 44px; text-align: center; color: var(--bio-muted); }

/* Course */
.course-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; margin: 20px 0 40px; align-items: end; }
.course-head h1 { font-size: clamp(36px, 5vw, 52px); letter-spacing: -.04em; overflow-wrap: anywhere; }
.course-head .link-button { justify-self: start; }
.course-head p { margin-top: 14px; color: var(--bio-muted); max-width: 42em; }
.course-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: var(--bio-gap); align-items: start; }
.side { display: grid; gap: var(--bio-gap); }
.side h2 { font-size: 25px; letter-spacing: -.03em; margin-bottom: 16px; }
.stage { padding: clamp(22px, 3.5vw, 44px); min-height: 480px; }
.eyebrow { font-size: 16px; color: var(--bio-muted); margin-bottom: 18px; }
.why { background: var(--bio-ink); border-radius: 20px; padding: 14px 18px; font-size: 16px; margin-bottom: 22px; }
.question { font-size: clamp(25px, 3vw, 35px); letter-spacing: -.03em; line-height: 1.1; margin-bottom: 28px; font-weight: 600; overflow-wrap: anywhere; }
.question:focus { outline: none; }
.options { display: grid; gap: 12px; border: 0; padding: 0; margin: 0 0 24px; }
.option { display: flex; gap: 14px; align-items: flex-start; background: var(--bio-ink); padding: 16px 20px; border-radius: 20px; cursor: pointer; transition: translate .25s var(--spring); overflow-wrap: anywhere; }
.option:hover { translate: 3px 0; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option .mark { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--bio-surface); color: var(--bio-paper); font-size: 15px; font-weight: 600; }
.option:has(input:checked) { background: var(--bio-blue); color: var(--bio-ink); }
.option:has(input:checked) .mark { background: var(--bio-ink); color: var(--bio-paper); }
.option:has(input:focus-visible) { outline: 3px solid var(--bio-yellow); outline-offset: 3px; }
.option.is-correct, .option.is-correct:has(input:checked) { background: var(--bio-green); color: var(--bio-ink); }
.option.is-wrong, .option.is-wrong:has(input:checked) { background: var(--bio-orange); color: var(--bio-ink); }
.option.is-correct .mark, .option.is-wrong .mark { background: var(--bio-ink); color: var(--bio-paper); }
.option.locked { cursor: default; translate: none; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 24px; }
.error-text { background: var(--bio-orange); color: var(--bio-ink); border-radius: 16px; padding: 12px 18px; font-size: 16px; font-weight: 500; margin-top: 16px; }

.verdict { border-radius: var(--bio-radius-card); padding: 26px; color: var(--bio-ink); margin-top: 8px; animation: pop .45s var(--spring); }
.verdict h3 { font-size: 35px; letter-spacing: -.03em; margin-bottom: 10px; }
.verdict .button { margin-top: 18px; }
.verdict-correct { background: var(--bio-green); } .verdict-partial { background: var(--bio-yellow); } .verdict-incorrect { background: var(--bio-orange); }
.verdict .small { font-size: 16px; margin-top: 10px; }
.reference { background: var(--bio-ink); color: var(--bio-paper); border-radius: 18px; padding: 14px 18px; margin-top: 14px; font-size: 16px; }
.your-answer { background: var(--bio-ink); padding: 16px 20px; border-radius: 20px; margin-bottom: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }

.working { display: grid; justify-items: center; align-content: center; gap: 24px; min-height: 400px; text-align: center; }
.working h2 { font-size: 35px; letter-spacing: -.03em; }
.working-tiles { display: flex; gap: 8px; }
.working-tiles i { width: 40px; height: 40px; border-radius: 12px; animation: hop 1.2s var(--spring) infinite; }
.working-tiles i:nth-child(2) { animation-delay: .12s; border-radius: 50%; } .working-tiles i:nth-child(3) { animation-delay: .24s; } .working-tiles i:nth-child(4) { animation-delay: .36s; border-radius: 50%; }
@keyframes hop { 40% { transform: translateY(-14px); } 80% { transform: translateY(0); } }

.done { background: var(--bio-pink); color: var(--bio-ink); border-radius: var(--bio-radius-panel); padding: clamp(26px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 24px; align-items: center; }
.done h2 { font-size: 52px; letter-spacing: -.04em; margin-bottom: 14px; }
.done svg { width: 100%; height: auto; background: var(--bio-ink); border-radius: var(--bio-radius-card); }

.module { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 10px 0; font-size: 16px; }
.module .dot { width: 28px; height: 28px; border-radius: 9px; background: var(--bio-ink); }
.module.active .dot { background: var(--bio-yellow); }
.module.passed .dot { background: var(--bio-green); border-radius: 50%; }
.module strong { font-weight: 500; display: block; overflow-wrap: anywhere; }
.module span { color: var(--bio-muted); }
.meter { margin-bottom: 14px; font-size: 16px; }
.meter-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.meter-label span:first-child { overflow-wrap: anywhere; }
.meter-track { height: 12px; border-radius: 6px; background: var(--bio-ink); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 6px; transition: width .5s var(--spring); }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 16px; color: var(--bio-muted); }
.log li:first-child { color: var(--bio-paper); }

@media (max-width: 1000px) {
  .course-layout, .hero { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-art { display: none; }
}
@media (max-width: 680px) {
  :root { --bio-gutter: 16px; --bio-gap: 16px; }
  .grid, .section-head, .course-head, .done { grid-template-columns: minmax(0, 1fr); }
  .section { margin-top: 64px; }
  .section-head h2, .done h2 { font-size: 40px; }
  .done svg { max-width: 160px; }
  .composer .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
