/* Upskill — quirky (Gumroad-like) style.
   Pink, yellow, teal and orange on warm paper, black ink, 2px borders, pop-out hover.
   Loud colour lives in the home hero and small accents; long stage pages stay on paper so they read easily. */

:root {
  --paper: #f4f4f0; --card: #ffffff; --ink: #000000; --muted: #4a4a46;
  --pink: #ff90e8; --yellow: #ffc900; --teal: #1d8a7f; --orange: #ff7051;
  --line: #000000; --soft: rgba(0, 0, 0, .08);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-text: "Bricolage Grotesque", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, Menlo, monospace;
  --r: 12px; --r-lg: 20px; --pill: 999px;
  --wrap: 1200px; --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .8, .2, 1); --ease-enter: cubic-bezier(.22, 1, .36, 1);
  --m-in: 150ms; --m-out: 120ms; --m-press: 90ms;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b0b0b; --card: #171717; --ink: #f4f4f0; --muted: #b9b9b2; --line: #f4f4f0; --soft: rgba(255, 255, 255, .12);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b0b0b; --card: #171717; --ink: #f4f4f0; --muted: #b9b9b2; --line: #f4f4f0; --soft: rgba(255, 255, 255, .12);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--font-text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; line-height: .98; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
code { font-family: var(--font-mono); font-size: .88em; background: var(--soft); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: .01em; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r); text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* ---------- links and buttons ---------- */
.link { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: text-decoration-color var(--m-out) var(--ease); }
.link:hover { text-decoration-color: currentColor; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border: 2px solid #000; border-radius: var(--pill); background: var(--pink); color: #000;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease);
}
.btn--white, .btn--ghost { background: #fff; }
.btn--yellow { background: var(--yellow); }
.btn--small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn .arr { transition: transform var(--m-out) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 #000; transition-duration: var(--m-in); }
  .btn:hover .arr { transform: translateX(3px); }
}
.btn:active { transform: translate(0, 0); box-shadow: 0 0 0 #000; transition-duration: var(--m-press); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: var(--paper); color: var(--ink); border-bottom: 2px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 26px; height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.04em; }
.mark__glyph { width: 28px; height: 28px; }
.nav { display: flex; gap: 8px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; padding: 6px 14px; border-radius: var(--pill); border: 2px solid transparent; transition: border-color var(--m-out) var(--ease); }
.nav a:hover { border-color: var(--line); }
.nav a[aria-current="page"] { background: var(--pink); color: #000; border-color: var(--pink); }
.top__tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.meter { display: flex; align-items: center; gap: 10px; color: #000; background: var(--pink); border: 2px solid #000; border-radius: var(--pill); padding: 4px 12px; font-weight: 500; }
.meter__bar { width: 72px; height: 8px; background: rgba(0, 0, 0, .18); border-radius: 4px; overflow: hidden; }
.meter__bar i { display: block; height: 100%; background: #000; transform-origin: left; transition: transform .6s var(--ease-enter); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--line); background: transparent; color: var(--ink); border-radius: 50%; cursor: pointer; transition: background-color var(--m-out) var(--ease), color var(--m-out) var(--ease); }
.icon-btn:hover { background: var(--ink); color: var(--paper); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- type and shell ---------- */
main { min-height: calc(100vh - 64px); }
.page { padding: clamp(40px, 6vw, 80px) 0 120px; }
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: .02em; }
.h-xl { font-size: clamp(48px, 7.2vw, 100px); letter-spacing: -.045em; line-height: .92; }
.h-l { font-size: clamp(40px, 5.4vw, 76px); letter-spacing: -.04em; line-height: .95; }
.h-m { font-size: clamp(34px, 4vw, 54px); letter-spacing: -.04em; }
.h-s { font-size: 22px; letter-spacing: -.02em; line-height: 1.15; font-weight: 700; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; max-width: 52ch; }
h2 em, h1 em { font-style: normal; background: var(--yellow); color: #000; padding: 0 .14em; border-radius: .18em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.rule { border: 0; border-top: 2px solid var(--line); margin: 0; }
.section { padding: clamp(72px, 9vw, 120px) 0 clamp(40px, 5vw, 64px); }
.section__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 56px; margin-bottom: 40px; align-items: end; }
.section__head .lead { color: var(--muted); }

/* ---------- home hero ---------- */
.hero { background: var(--pink); color: #000; border-bottom: 2px solid #000; padding: clamp(48px, 6vw, 88px) 0; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__copy > * + * { margin-top: 24px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.hero__facts span { border: 2px solid #000; border-radius: var(--pill); padding: 3px 12px; background: rgba(255, 255, 255, .55); }

[data-enter] .en { opacity: 0; transform: translateY(16px); animation: en .9s var(--ease-enter) forwards; }
[data-enter] .en:nth-child(2) { animation-delay: .08s; } [data-enter] .en:nth-child(3) { animation-delay: .16s; }
[data-enter] .en:nth-child(4) { animation-delay: .24s; } [data-enter] .en:nth-child(5) { animation-delay: .32s; }
[data-enter] .en--late { animation-delay: .3s; }
@keyframes en { to { opacity: 1; transform: none; } }

/* the stage trail: numbered stops zig-zagging down, joined by a dashed line */
.trail { position: relative; display: grid; grid-template-columns: 1fr 1fr; row-gap: 14px; padding: 8px 0; }
.trail__wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.trail__wires path { fill: none; stroke: #000; stroke-width: 2; stroke-dasharray: 5 6; opacity: .5; }
.trail__wires path.on { stroke-dasharray: none; opacity: 1; }
.stop {
  position: relative; z-index: 1; grid-column: 1; grid-row: var(--row); justify-self: start;
  display: inline-flex; align-items: baseline; gap: 10px; padding: 11px 18px; max-width: 100%;
  border: 2px dashed #000; border-radius: var(--r-lg); background: #f4f4f0; color: #000; text-decoration: none;
  transition: transform var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease);
}
.stop--r { grid-column: 2; justify-self: end; }
.stop__n { font-size: 12px; }
.stop__t { font-weight: 700; font-size: 17px; letter-spacing: -.01em; line-height: 1.2; }
.stop.is-started { border-style: solid; background: #fff; }
.stop.is-done { border-style: solid; background: var(--yellow); }
.stop.is-active { border-style: solid; background: var(--teal); color: #fff; transform: rotate(-3deg); box-shadow: 4px 4px 0 #000; }
.stop__badge { position: absolute; top: -13px; right: -8px; font-family: var(--font-mono); font-size: 11px; line-height: 1; padding: 5px 9px; border: 2px solid #000; border-radius: var(--pill); background: var(--yellow); color: #000; transform: rotate(6deg); white-space: nowrap; }
.stop__badge--done { background: #fff; }
@media (hover: hover) and (pointer: fine) {
  .stop:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 #000; }
  .stop.is-active:hover { transform: rotate(-3deg) translate(-3px, -3px); box-shadow: 6px 6px 0 #000; }
}

/* next up */
.next-wrap { padding: clamp(40px, 5vw, 64px) 0 0; }
.next { display: flex; justify-content: space-between; align-items: center; gap: 20px 32px; flex-wrap: wrap; padding: 24px 28px; border: 2px solid #000; border-radius: var(--r-lg); background: var(--yellow); color: #000; }
.next__t { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.03em; line-height: 1.05; margin-top: 8px; }
.next .btn { background: #fff; }

/* black band */
.band { margin-top: clamp(64px, 8vw, 104px); background: #000; color: #f4f4f0; overflow: hidden; }
.band__in { display: flex; align-items: center; gap: 22px; padding: 20px 0; white-space: nowrap; font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4vw, 52px); letter-spacing: -.035em; }
.band__in i { font-style: normal; color: var(--pink); }

/* five parts */
.parts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.part { border: 2px solid #000; border-radius: var(--r-lg); padding: 22px 20px 24px; color: #000; }
.part--pink { background: var(--pink); } .part--yellow { background: var(--yellow); } .part--teal { background: var(--teal); color: #fff; }
.part--orange { background: var(--orange); } .part--white { background: #fff; }
.part__k { font-size: 12px; }
.part h3 { margin: 26px 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.part p { font-size: 15.5px; line-height: 1.45; }

/* statement moment */
.statement { padding: clamp(72px, 11vw, 150px) 0; overflow-x: clip; }
.statement__type { font-size: clamp(56px, 11vw, 168px); letter-spacing: -.05em; line-height: .9; max-width: 12ch; }
.statement__sub { margin-top: 28px; color: var(--muted); }
.statement .w { display: inline-block; white-space: nowrap; }
.statement .c { display: inline-block; will-change: transform, opacity; }

/* ---------- path ---------- */
.stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.stage-row a {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 150px 170px 24px; gap: 20px; align-items: center;
  padding: 20px 24px; border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--card); text-decoration: none;
  transition: transform var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease);
}
.stage-row__n { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -.04em; }
.stage-row__t { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.3vw, 30px); letter-spacing: -.03em; line-height: 1.05; }
.stage-row__s { color: var(--muted); font-size: 15.5px; margin-top: 4px; }
.stage-row .arr { transition: transform var(--m-out) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .stage-row a:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--line); }
  .stage-row a:hover .arr { transform: translateX(3px); }
}
.stage-row.is-done a { background: var(--yellow); color: #000; border-color: #000; }
.stage-row.is-done .stage-row__s, .stage-row.is-done .muted { color: #000; }
.tag { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 12px; padding: 3px 10px; border: 2px solid var(--line); border-radius: var(--pill); white-space: nowrap; background: var(--card); color: var(--ink); }
.tag--go { background: #c9f0ea; color: #000; border-color: #000; }
.tag--py { background: #ffe9a8; color: #000; border-color: #000; }
.tag--ok { background: var(--teal); color: #fff; border-color: #000; }
.prog { display: flex; align-items: center; gap: 10px; }
.prog__bar { flex: 1; height: 10px; border: 2px solid var(--line); border-radius: var(--pill); overflow: hidden; min-width: 48px; background: var(--card); }
.prog__bar i { display: block; height: 100%; background: var(--pink); }
.is-done .prog__bar i { background: var(--teal); }

.optional { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.opt { padding: 20px 22px; border: 2px dashed var(--line); border-radius: var(--r-lg); }
.opt h3 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.opt p { color: var(--muted); font-size: 15.5px; }

/* ---------- stage page ---------- */
.crumb { display: flex; gap: 10px; align-items: center; color: var(--muted); margin-bottom: 24px; }
.crumb a { text-decoration: none; }
.stage-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px 56px; align-items: end; padding-bottom: 32px; }
.stage-head h1 { font-size: clamp(52px, 7.4vw, 104px); letter-spacing: -.05em; line-height: .92; }
.stage-head .lead { color: var(--muted); }
.stage-head__meta { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card); }
.stat { padding: 14px 18px; border-bottom: 2px solid var(--line); }
.stat:nth-child(odd):not(.stat--full) { border-right: 2px solid var(--line); }
.stat--full { grid-column: 1 / -1; border-bottom: 0; background: var(--teal); color: #fff; }
.stat__k { display: block; font-size: 12px; margin-bottom: 4px; opacity: .85; }
.stat__v { font-size: 18px; font-weight: 700; }

.stage-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 56px; padding-top: 40px; }
.toc { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 6px; }
.toc a { text-decoration: none; padding: 7px 14px; border: 2px solid transparent; border-radius: var(--pill); font-weight: 600; font-size: 15px; transition: border-color var(--m-out) var(--ease); }
.toc a:hover { border-color: var(--line); }

.block { padding-bottom: 64px; }
.block__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.block__project { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; margin-bottom: 6px; }
.block__intro { color: var(--muted); max-width: 64ch; margin-bottom: 22px; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 18px 20px;
  border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--card);
  transition: transform var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease), background-color .2s;
}
@media (hover: hover) and (pointer: fine) { .check:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--line); } }
.check__box { appearance: none; -webkit-appearance: none; width: 28px; height: 28px; margin: 0; border: 2px solid var(--line); border-radius: 50%; background: var(--card); cursor: pointer; display: grid; place-items: center; transition: background-color var(--m-out) var(--ease), transform var(--m-press) var(--ease); }
.check__box:hover { background: color-mix(in srgb, var(--pink) 35%, var(--card)); }
.check__box:active { transform: scale(.88); }
.check__box:checked { background: var(--pink); }
.check__box:checked::after { content: ""; width: 10px; height: 5px; border: 2.5px solid #000; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.check__t { font-weight: 700; font-size: 19px; line-height: 1.3; letter-spacing: -.01em; }
.check__t a { text-decoration: none; }
.check__t a:hover { text-decoration: underline; text-underline-offset: 3px; }
.check__d { color: var(--muted); font-size: 16px; margin-top: 4px; max-width: 70ch; }
.check__e { margin-top: 10px; font-size: 15px; max-width: 70ch; }
.check__e b { display: inline-block; font-family: var(--font-mono); font-weight: 500; font-size: 11px; background: var(--teal); color: #fff; border-radius: var(--pill); padding: 2px 10px; margin-right: 8px; vertical-align: 1px; }
.check__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.check__side .mono { border: 2px solid var(--line); border-radius: var(--pill); padding: 1px 9px; font-size: 12px; white-space: nowrap; }
.check.is-done { background: color-mix(in srgb, var(--pink) 22%, var(--card)); }
.check.is-done .check__t { text-decoration: line-through; text-decoration-thickness: 2px; }
.subhead { margin: 28px 0 12px; display: flex; gap: 10px; align-items: center; }
.subhead .mono { border: 2px solid var(--line); border-radius: var(--pill); padding: 1px 9px; font-weight: 400; }
details.more > summary { cursor: pointer; list-style: none; display: inline-flex; gap: 8px; align-items: center; margin-top: 14px; padding: 8px 16px; border: 2px dashed var(--line); border-radius: var(--pill); font-weight: 600; font-size: 15px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; font-family: var(--font-mono); }
details.more[open] > summary::before { content: "–"; }
details.more[open] > .checks { margin-top: 12px; }

/* study guide inside a milestone */
details.guide { margin-top: 12px; }
details.guide > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border: 2px solid #000; border-radius: var(--pill); background: var(--yellow); color: #000; font-weight: 600; font-size: 14px; }
details.guide > summary::-webkit-details-marker { display: none; }
details.guide > summary::after { content: "↓"; font-family: var(--font-mono); }
details.guide[open] > summary::after { content: "↑"; }
.guide__in { margin-top: 14px; display: grid; gap: 16px; font-size: 15.5px; max-width: 72ch; }
.guide__steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.guide__steps li::marker { font-family: var(--font-mono); font-weight: 500; }
.guide__k { display: block; font-family: var(--font-mono); font-size: 12px; margin-bottom: 6px; color: var(--muted); }
.guide__traps ul, .guide__read ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.guide__traps { border-left: 4px solid var(--orange); padding-left: 14px; }
.guide__prompt { border: 2px dashed var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 10px; justify-items: start; }
.guide__prompt p { font-family: var(--font-mono); font-size: 13.5px; line-height: 1.55; }

.why { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.why > div { border: 2px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; background: var(--card); }
.why__k { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.why ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.why .full { grid-column: 1 / -1; background: var(--orange); color: #000; border-color: #000; }
.why .full .why__k { color: #000; }
.why .full p { font-family: var(--font-display); font-weight: 700; font-size: clamp(21px, 2.1vw, 28px); letter-spacing: -.025em; line-height: 1.2; max-width: 42ch; }

.res { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.res a { display: grid; grid-template-columns: 116px minmax(0, 1fr) 20px; gap: 14px; align-items: start; padding: 14px 18px; border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--card); text-decoration: none; transition: transform var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease); }
.res a > .mono { border: 2px solid var(--line); border-radius: var(--pill); padding: 1px 9px; text-align: center; font-size: 11.5px; justify-self: start; white-space: nowrap; line-height: 1.5; }
.res__t { font-weight: 700; font-size: 17px; }
.res__n { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
@media (hover: hover) and (pointer: fine) { .res a:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--line); } }

.grad { margin-top: 20px; padding: 22px 24px; border: 2px dashed var(--line); border-radius: var(--r-lg); display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.grad.is-done { border: 2px solid #000; background: var(--teal); color: #fff; }
.stage-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 24px; }
.stage-nav a { text-decoration: none; max-width: 48%; padding: 16px 20px; border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--card); transition: transform var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease); }
.stage-nav a:last-child { text-align: right; margin-left: auto; }
.stage-nav span { display: block; }
.stage-nav .h-s { margin-top: 4px; }
@media (hover: hover) and (pointer: fine) { .stage-nav a:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--line); } }
.empty { padding: 4px 0 8px; color: var(--muted); }

/* ---------- dialog, toast, footer ---------- */
dialog { border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--paper); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
.dlg { padding: 26px; display: grid; gap: 18px; }
.dlg__head { display: flex; justify-content: space-between; align-items: center; }
.dlg__row { display: flex; gap: 12px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: #000; color: #f4f4f0; border: 2px solid #f4f4f0; padding: 10px 18px; border-radius: var(--pill); font-size: 14px; transition: opacity .2s var(--ease), transform .2s var(--ease); z-index: 90; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.foot { background: var(--paper); color: var(--ink); border-top: 2px solid var(--line); padding: 22px 0 28px; }
.foot__in { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px 24px; align-items: center; }
.foot__l { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mark--sm { font-size: 20px; }
.foot__l .mono { color: var(--muted); }
.foot__stages { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.fpill { display: grid; place-items: center; min-width: 40px; height: 32px; padding: 0 8px; border: 2px dashed var(--line); border-radius: var(--pill); font-family: var(--font-mono); font-size: 12px; text-decoration: none; transition: transform var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease); }
.fpill.is-done { border-style: solid; background: var(--yellow); color: #000; border-color: #000; }
.fpill.is-active { border-style: solid; background: var(--teal); color: #fff; border-color: #000; }
@media (hover: hover) and (pointer: fine) { .fpill:hover { transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--line); } }
.foot__r { display: flex; gap: 18px; justify-content: flex-end; flex-wrap: wrap; }
.foot button { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; min-height: 44px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.foot button:hover { text-decoration-color: currentColor; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .foot__in { grid-template-columns: 1fr auto; }
  .foot__stages { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .hero__grid { grid-template-columns: 1fr; }
  .trail { max-width: 600px; }
  .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .part--white { grid-column: 1 / -1; }
  .stage-row a { grid-template-columns: 52px minmax(0, 1fr) 150px 24px; }
  .stage-row__lang { display: none; }
  .stage-body { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; padding-bottom: 20px; }
  .toc a { border-color: var(--line); }
  .optional { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .nav { display: none; }
  .nav--phone { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60; background: var(--paper); border: 2px solid var(--line); box-shadow: 3px 3px 0 var(--line); border-radius: var(--pill); justify-content: space-around; padding: 5px; }
  .nav--phone a { flex: 1; text-align: center; padding: 10px 6px; min-height: 44px; }
  .meter__bar { display: none; }
  .section__head, .stage-head, .why { grid-template-columns: 1fr; }
  .hero__actions .btn, .next .btn { width: 100%; }
  .stop { padding: 10px 14px; }
  .stop__t { font-size: 15.5px; }
  .band__in { font-size: 30px; padding: 14px 0; }
  .parts, .optional { grid-template-columns: 1fr; }
  .stage-row a { grid-template-columns: 42px minmax(0, 1fr) 20px; gap: 12px; padding: 16px 18px; }
  .stage-row__n { font-size: 26px; }
  .stage-row__prog { display: none; }
  .check { grid-template-columns: 30px minmax(0, 1fr); padding: 16px; }
  .check__side { grid-column: 2; flex-direction: row; align-items: center; }
  .res a { grid-template-columns: 1fr 20px; }
  .res a > .mono { grid-column: 1 / -1; }
  .stage-nav { flex-direction: column; }
  .foot__in { grid-template-columns: 1fr; }
  .foot__stages { justify-content: flex-start; gap: 5px; }
  .fpill { min-width: 0; width: 38px; padding: 0; height: 30px; font-size: 11px; }
  .foot__r { justify-content: flex-start; }
  .stage-nav a { max-width: none; }
}
@media (min-width: 761px) { .nav--phone { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  [data-enter] .en { opacity: 1; transform: none; }
  .statement .c { transform: none !important; opacity: 1 !important; }
}

/* ---------- tags, levels, stickers, next list ---------- */
.kind { font-family: var(--font-mono); font-size: 11.5px; padding: 1px 9px; border: 2px solid #000; border-radius: var(--pill); color: #000; white-space: nowrap; }
.kind--backend { background: #c9f0ea; }
.kind--security { background: var(--orange); }
.res a > .lvl { border: 2px solid #000; color: #000; text-transform: capitalize; }
.lvl--beginner { background: #c9f0ea; } .lvl--intermediate { background: var(--yellow); } .lvl--advanced { background: var(--orange); }
.sticker { display: inline-block; font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0; line-height: 1; padding: 7px 12px; border: 2px solid #000; border-radius: var(--pill); background: var(--yellow); color: #000; transform: rotate(-4deg); box-shadow: 3px 3px 0 #000; vertical-align: middle; }
.sticker--sm { font-size: 11px; padding: 4px 9px; box-shadow: 2px 2px 0 #000; margin-left: 6px; }
.stage-head__title { position: relative; }
.stage-head__title > .sticker { position: absolute; right: 0; top: -6px; transform: rotate(6deg); }
.next__more { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; font-size: 15.5px; }
.next__more li { display: flex; gap: 10px; align-items: baseline; }
.next__more .mono { font-size: 11px; border: 1.5px solid #000; border-radius: var(--pill); padding: 0 7px; min-width: 52px; text-align: center; }

/* self-check, cost, apply marker, video credit */
.selfcheck { margin-top: 18px; padding: 16px 20px; border: 2px dashed var(--line); border-radius: var(--r-lg); }
.selfcheck ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 16px; }
.stat--plain { background: var(--card); color: var(--ink); border-bottom: 2px solid var(--line); }
.stat__v--sm { font-size: 15px; font-weight: 500; line-height: 1.4; display: block; }
a.stat__v { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; display: block; }
.apply { list-style: none; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 4px; }
.apply p { color: var(--muted); font-size: 15.5px; max-width: 62ch; }
.hero__src { font-size: 15px; }
.hero__src .link { font-weight: 600; }

.kind--ship { background: var(--pink); }
.track + .track { margin-top: 36px; }

.follow__list { margin: 0; padding: 0; list-style: none; counter-reset: f; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.follow__list li { counter-increment: f; position: relative; padding: 20px 22px 20px 64px; border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--card); font-size: 16px; line-height: 1.5; }
.follow__list li::before { content: counter(f, decimal-leading-zero); position: absolute; left: 20px; top: 20px; font-family: var(--font-mono); font-size: 13px; padding: 2px 7px; border: 2px solid #000; border-radius: var(--pill); background: var(--yellow); color: #000; }
.follow__list b { font-weight: 700; }
@media (max-width: 760px) { .follow__list { grid-template-columns: 1fr; } }

/* learn levels inside check rows */
.check__side .lvl { border: 2px solid #000; color: #000; text-transform: capitalize; }
/* pace cards on home */
.pace { padding: clamp(40px, 5vw, 64px) 0 0; }
.pace__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pace__card { display: flex; flex-direction: column; gap: 10px; padding: 26px 28px; border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--card); text-decoration: none; transition: transform var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease); }
.pace__card--fast { background: var(--teal); color: #fff; border-color: #000; }
.pace__card p { font-size: 16px; line-height: 1.5; max-width: 52ch; opacity: .92; }
.pace__go { margin-top: auto; padding-top: 8px; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }
@media (hover: hover) and (pointer: fine) { .pace__card:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--line); } }
/* fast track page */
.fast-head { padding-bottom: 32px; }
.fast-body { display: grid; gap: 28px; }
.sprint { padding: 26px 28px; border: 2px solid var(--line); border-radius: var(--r-lg); }
.sprint.is-active { border-width: 3px; box-shadow: 5px 5px 0 var(--teal); }
.sprint.is-done { background: color-mix(in srgb, var(--yellow) 18%, var(--paper)); }
.sprint__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: start; }
.sprint__head .lead { color: var(--muted); margin-top: 10px; font-size: 17px; }
.sprint__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sprint__meta .mono { font-size: 15px; border: 2px solid var(--line); border-radius: var(--pill); padding: 2px 12px; }
.sprint__meta .tag { text-decoration: none; }
.apply--fast { padding: 4px; }
.after { margin-top: 48px; padding: 28px; border: 2px dashed var(--line); border-radius: var(--r-lg); display: grid; gap: 14px; justify-items: start; }
@media (max-width: 760px) {
  .pace__grid { grid-template-columns: 1fr; }
  .sprint { padding: 20px 18px; }
  .sprint__head { grid-template-columns: 1fr; }
  .sprint__meta { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
}

.sticker--now { background: var(--teal); color: #fff; }
.sprint-body { padding-top: 40px; max-width: 920px; }
.done-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 17px; }
.skip-list { display: grid; gap: 14px; margin-top: 14px; }
.skip-row__stage { font-weight: 700; text-decoration: none; }
.skip-row__stage:hover { text-decoration: underline; }
.skip-row ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15.5px; }
.stage-row__lang.mono { font-size: 12.5px; }

/* system design notes */
details.sd { border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--card); margin-bottom: 12px; }
details.sd > summary { cursor: pointer; list-style: none; padding: 18px 22px; display: flex; align-items: center; gap: 10px; }
details.sd > summary::-webkit-details-marker { display: none; }
details.sd > summary::before { content: "+"; font-family: var(--font-mono); width: 26px; height: 26px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; flex: none; }
details.sd[open] > summary::before { content: "–"; background: var(--yellow); color: #000; border-color: #000; }
.sd__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.sd__in { padding: 0 22px 22px; display: grid; gap: 18px; font-size: 15.5px; }
.sd__problem { font-size: 17px; }
.sd__diagram { margin: 0; padding: 14px 16px; overflow-x: auto; background: var(--soft); border-radius: var(--r); font-family: var(--font-mono); font-size: 12.5px; line-height: 1.45; }
.sd__part ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.sd__trades { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sd__trade { border: 2px dashed var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 6px; }
.sd__dec { font-weight: 700; }
.sd__opts { display: flex; flex-wrap: wrap; gap: 6px; }
details.sd__q { border-bottom: 1px solid var(--soft); padding: 8px 0; }
details.sd__q > summary { cursor: pointer; font-weight: 600; }
details.sd__q > p { margin-top: 6px; color: var(--muted); padding-left: 16px; border-left: 3px solid var(--teal); }
@media (max-width: 760px) { .sd__trades { grid-template-columns: 1fr; } .sd__in, details.sd > summary { padding-left: 16px; padding-right: 16px; } }

.pace__pick { font-size: 17px; max-width: 72ch; margin-bottom: 16px; }

.week + .week { margin-top: 8px; }
.rounds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.round { border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--card); padding: 18px 20px; display: grid; gap: 8px; align-content: start; }
.round p { font-size: 15.5px; }
.round__where { border-top: 2px dashed var(--soft); padding-top: 8px; }
.sd-index { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
@media (max-width: 760px) { .rounds { grid-template-columns: 1fr; } .nav--phone a { font-size: 14px; padding: 10px 4px; } }

.testout { margin: 0 0 14px; font-size: 15.5px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.setup { margin: 0 0 8px; }
.setup__list { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 10px; font-size: 15.5px; }
.setup__check { display: block; color: var(--muted); margin-top: 2px; font-size: 12.5px; }
.gloss { margin: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px 20px; font-size: 15.5px; }
.gloss dt { font-weight: 700; }
.gloss dd { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .gloss { grid-template-columns: 1fr; gap: 2px; } .gloss dd { margin-bottom: 10px; } }
