/* Adult and exam pages: a build-instruction booklet for grown-ups.
   Sky-blue page, one 2px ink keyline, grey = known, red = the new idea, yellow = explained, blue = the action. */
@font-face { font-family: "Archivo"; src: url("/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --sky: #AEE1FF;
  --sky-deep: #8FD3FB;
  --sky-pale: #D2EEFF;
  --ink: #111111;
  --ink-soft: #1D3A50;   /* secondary text, tinted from the sky */
  --red: #E53935;
  --red-deep: #B82B27;
  --yellow: #FFCD00;
  --blue: #1170C2;
  --blue-deep: #0D5A9E;
  --paper: #FFFFFF;
  --grey: #D9D9D9;
  --line: 2px;
  --r: 10px;
  --gut: 16px;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Figtree", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background-color: var(--sky);
  background-image: radial-gradient(circle, rgba(17, 17, 17, .11) 1.3px, transparent 1.5px);
  background-size: 22px 22px; background-position: 11px 11px;
  font: 400 17px/1.5 var(--text);
  text-rendering: optimizeLegibility;
}
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; border: var(--line) solid var(--ink); border-radius: 8px; z-index: 9; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; margin: 0; }
h1 { font-weight: 800; font-size: clamp(2.35rem, 9.6vw, 4.4rem); line-height: .98; letter-spacing: -.03em; }
h2 { font-weight: 800; font-size: clamp(1.75rem, 6.6vw, 2.75rem); line-height: 1.02; letter-spacing: -.025em; }
h3 { font-weight: 750; font-size: 1.25rem; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }

main, .top, .foot { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }

/* brand */
.top { padding-top: 14px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 800 1.2rem/1 var(--display); letter-spacing: -.02em; }
.brand-icon { width: 30px; height: auto; }
.brand-icon polygon, .brand-icon path, .brand-icon ellipse { stroke: var(--ink); stroke-width: 2px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* isometric drawing: one keyline weight */
.iso { display: block; width: 100%; height: auto; overflow: visible; }
.iso polygon, .iso path, .iso ellipse { stroke: var(--ink); stroke-width: var(--line); stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.iso .seat { stroke: var(--ink); stroke-dasharray: 5 4; fill: rgba(255, 255, 255, .35); }
.iso .guide line, .iso .guide .head, .iso .leader { stroke: var(--ink); stroke-width: var(--line); fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.iso .guide line { stroke-dasharray: 6 5; }

/* hero */
.hero { padding-top: 18px; padding-bottom: 36px; display: grid; gap: 18px; }
.hero-fig { position: relative; margin: 0; }
.hero-fig figcaption { position: absolute; inset: 0; pointer-events: none; }
.tag { position: absolute; transform: translateY(-50%); font: 700 .82rem/1.3 var(--text); padding: 5px 9px; border: var(--line) solid var(--ink); border-radius: 8px; background: var(--paper); max-width: 34%; }
.tag-new { background: #C62828; color: #fff; }
.tag-known { transform: translate(0, -50%); max-width: 30%; }
.callout { position: absolute; padding: 6px 6px 5px; min-width: 54px; border: var(--line) solid var(--ink); border-radius: 2px; background: var(--sky-pale); text-align: center; }
.callout svg { width: 80%; height: auto; margin: 2px auto 0; display: block; }
.callout svg polygon, .callout svg path, .callout svg ellipse { stroke: var(--ink); stroke-width: var(--line); stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.callout b { font: 800 clamp(.9rem, 1.4vw, 1.15rem)/1 var(--display); display: block; margin-top: 2px; }
.sub { font-size: 1.08rem; line-height: 1.5; color: var(--ink-soft); max-width: 36rem; }

/* form */
.signup label, .answer label { display: block; font: 700 .92rem/1.35 var(--text); margin-bottom: 7px; }
.signup .row { display: grid; gap: 10px; }
input[type=email], textarea {
  width: 100%; min-height: 56px; padding: 14px 15px; font: 600 1.06rem/1.3 var(--text); color: var(--ink);
  background: var(--paper); border: var(--line) solid var(--ink); border-radius: var(--r); caret-color: var(--red);
  -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: #5B6B78; opacity: 1; }
input:focus, textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--blue); }
input[aria-invalid=true] { border-color: var(--red-deep); box-shadow: 0 0 0 3px rgba(229, 57, 53, .25); }
.signup button, .answer button[type=submit] {
  min-height: 58px; padding: 0 22px; font: 800 1.12rem/1 var(--display); letter-spacing: -.01em; color: #fff;
  background: var(--blue); border: var(--line) solid var(--ink); border-radius: var(--r); cursor: pointer;
  box-shadow: 0 2px 6px rgba(17, 17, 17, .18); transition: transform .12s ease-out, background-color .12s ease-out;
}
.signup button:hover, .answer button[type=submit]:hover { background: var(--blue-deep); }
.signup button:active, .answer button[type=submit]:active { transform: translateY(2px); box-shadow: 0 1px 2px rgba(17, 17, 17, .2); }
.signup button[disabled] { opacity: .7; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.err { color: #8E1B17; font-weight: 700; font-size: .95rem; min-height: 0; margin-top: 6px; }
.err:empty { display: none; }
.free { margin-top: 10px; font-size: .95rem; line-height: 1.4; color: var(--ink-soft); }

/* thank-you state */
.thanks { padding: 16px; background: var(--paper); border: var(--line) solid var(--ink); border-radius: var(--r); }
.thanks:focus { outline: none; }
.done-line { font: 800 1.5rem/1.1 var(--display); letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.done-line::before { content: ""; width: 30px; height: 30px; flex: none; border: var(--line) solid var(--ink); border-radius: 50%; background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; }
.answer .opt { font-weight: 500; color: var(--ink-soft); }
.answer textarea { min-height: 84px; resize: vertical; }
.answer .row { display: flex; gap: 10px; margin-top: 10px; }
.answer .row button { flex: 1; }
.skip-answer { min-height: 58px; font: 700 1rem/1 var(--text); background: transparent; border: var(--line) solid var(--ink); border-radius: var(--r); color: var(--ink); cursor: pointer; }
.after { font-weight: 600; }

/* sections */
section { padding-top: 44px; padding-bottom: 44px; }
section + section { border-top: var(--line) solid var(--ink); }
section > h2 { margin-bottom: 10px; }

/* demo: the lesson assembles */
.demo-topic { font: 700 1.05rem/1.35 var(--text); color: var(--ink-soft); margin-bottom: 14px; }
.demo-grid { display: grid; gap: 4px; }
.asm-stick { position: sticky; top: 0; z-index: 2; padding: 6px 0 8px; margin: 0 calc(var(--gut) * -1) 6px; padding-left: var(--gut); padding-right: var(--gut); background: var(--sky); border-bottom: var(--line) dashed rgba(17, 17, 17, .45); }
.asm-stick .iso { max-width: 320px; margin: 0 auto; }
.chat { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.chat li { position: relative; border: var(--line) solid var(--ink); border-radius: var(--r); padding: 11px 14px 12px; max-width: 92%; }
.chat .who { display: block; font: 800 .78rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.chat .t { background: var(--sky-pale); padding-left: 52px; }
.chat .t::before { counter-increment: step; content: counter(step); position: absolute; left: 12px; top: 9px; font: 900 1.9rem/1 var(--display); letter-spacing: -.04em; }
.chat .u { background: var(--paper); justify-self: end; }
.chat .ok { background: var(--yellow); display: flex; gap: 10px; align-items: flex-start; font-weight: 700; max-width: 100%; }
.chat .ok .tick { flex: none; width: 26px; height: 26px; margin-top: -1px; }
.tick path { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.note { margin-top: 14px; font-size: .9rem; color: var(--ink-soft); }

/* the model's states (JS turns assembling on; without JS the finished model shows) */
.asm .step .f-t { fill: #E6E6E6; }
.asm .step .f-l { fill: #D9D9D9; }
.asm .step .f-r { fill: #B9B9B9; }
.asm .step.is-new .f-t { fill: #F26B66; }
.asm .step.is-new .f-l { fill: var(--red); }
.asm .step.is-new .f-r { fill: var(--red-deep); }
.asm .step.is-done .f-t { fill: #FFE066; }
.asm .step.is-done .f-l { fill: var(--yellow); }
.asm .step.is-done .f-r { fill: #D9AE00; }
.assembling .asm .step { opacity: 0; transform: translateY(-26px); transition: transform .55s cubic-bezier(.16, 1, .3, 1), opacity .2s ease-out; }
.assembling .asm .step.is-in { opacity: 1; transform: none; }

/* steps: framed instruction-book panels */
.steps ol { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 16px; }
.steps li {
  display: grid; grid-template-rows: auto auto auto 1fr; gap: 8px; padding: 14px 16px 18px;
  border: var(--line) solid var(--ink); border-radius: 2px; background-color: rgba(255, 255, 255, .22);
  background-image: radial-gradient(circle, rgba(17, 17, 17, .16) 1.2px, transparent 1.4px);
  background-size: 11px 11px; background-position: 5px 5px;
}
.panel-top { display: flex; justify-content: space-between; align-items: flex-start; }
.steps .num { font: 900 4.6rem/.8 var(--display); letter-spacing: -.05em; }
.part { width: 64px; padding: 6px 6px 4px; border: var(--line) solid var(--ink); border-radius: 2px; background: var(--sky-pale); text-align: center; }
.part svg { width: 44px; height: auto; display: block; margin: 2px auto 0; }
.part svg polygon { stroke: var(--ink); stroke-width: var(--line); stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.part b { font: 800 .95rem/1 var(--display); display: block; margin-top: 2px; }
.steps .step-fig { width: 100%; max-width: 200px; margin: 0 auto; }
.steps h3 { margin-top: 4px; }
.steps li > p { color: var(--ink-soft); max-width: 34rem; }
.time { margin-top: 22px; font: 700 1.05rem/1.35 var(--text); display: inline-block; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 2px; padding: 9px 13px; }

/* lesson model: printed part numbers and the drop arrow */
.asm .pnum rect { fill: #fff; stroke: var(--ink); stroke-width: var(--line); vector-effect: non-scaling-stroke; }
.asm .pnum text { font: 900 11px/1 var(--display); text-anchor: middle; fill: var(--ink); }

/* doubts */
.doubts dl { margin: 16px 0 0; display: grid; gap: 0; }
.doubts dl > div { padding: 16px 0; border-bottom: var(--line) solid var(--ink); }
.doubts dl > div:first-child { border-top: var(--line) solid var(--ink); }
.doubts dl > div:last-child { border-bottom: 0; }
.doubts dt { font: 800 1.15rem/1.3 var(--display); letter-spacing: -.01em; margin-bottom: 6px; }
.doubts dd { margin: 0; color: var(--ink-soft); max-width: 38rem; }

/* terms */
.terms ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.terms li { display: flex; gap: 10px; align-items: flex-start; }
.terms .tick { flex: none; width: 26px; height: 26px; background: var(--yellow); border: var(--line) solid var(--ink); border-radius: 50%; padding: 3px; margin-top: -1px; }
.terms .tick path { stroke-width: 3.4; }

/* close */
.close { padding-bottom: 56px; }
.because { color: var(--ink-soft); margin-bottom: 18px; max-width: 34rem; }

.foot { padding-top: 22px; padding-bottom: 40px; border-top: var(--line) solid var(--ink); font-size: .9rem; color: var(--ink-soft); display: grid; gap: 6px; }

@media (min-width: 760px) {
  :root { --gut: 32px; }
  .signup .row { grid-template-columns: 1fr auto; }
  .chat li { max-width: 80%; }
}
@media (min-width: 980px) {
  .hero h1 { font-size: clamp(2.8rem, 4.1vw, 3.7rem); }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); grid-template-areas: "h fig" "sub fig" "form fig"; column-gap: 48px; align-items: start; padding-top: 40px; padding-bottom: 64px; }
  .hero h1 { grid-area: h; }
  .hero .hero-fig { grid-area: fig; align-self: center; }
  .hero .sub { grid-area: sub; }
  .hero .signup { grid-area: form; }
  section { padding-top: 64px; padding-bottom: 64px; }
  .demo-grid { grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
  .asm-stick { top: 24px; background: none; border-bottom: 0; margin: 0; padding: 0; }
  .asm-stick .iso { max-width: 420px; }
  .steps ol { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto auto auto; gap: 0 24px; }
  .steps li { grid-row: span 4; grid-template-rows: subgrid; row-gap: 8px; }
  .doubts dl { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .doubts dl > div:nth-child(2) { border-top: var(--line) solid var(--ink); }
  .close { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; align-items: end; }
  .close .signup { grid-column: 2; grid-row: 1 / span 2; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .assembling .asm .step { transition: none; }
}

/* index and privacy */
.simple main { max-width: 760px; }
.doors { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.doors a { display: block; padding: 14px 16px; background: var(--paper); border: var(--line) solid var(--ink); border-radius: var(--r); font-weight: 700; text-decoration: none; }
.doors li:last-child { padding: 6px 2px; font-weight: 700; }
.doors li:last-child a { display: inline; padding: 0; border: 0; background: none; text-decoration: underline; }
.prose { display: grid; gap: 14px; margin-top: 16px; max-width: 40rem; }
