:root {
  --ink: #181c2a;
  --slate: #3c4257;
  --paper: #f4f2ec;
  --cream: #fffdf7;
  --gold: #f5b301;
  --orange: #f0662d;
  --red: #e23a3a;
  --purple: #7b4fd8;
  --green: #2fa36b;
  --disp: 'Bricolage Grotesque', sans-serif;
  --body: 'Atkinson Hyperlegible', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  background-image: radial-gradient(circle, rgba(24,28,42,0.09) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  overflow-x: hidden;
  line-height: 1.5;
}
.mono { font-family: var(--mono); }

/* ---- floating geometry ---- */
.geo-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.geo { position: absolute; opacity: 0.5; }
.geo.circle { border-radius: 50%; }
.geo.tri { width: 0; height: 0; opacity: 0.55; }
.g1 { width: 120px; height: 120px; background: var(--gold); top: 12%; left: 8%; animation: drift 22s ease-in-out infinite; }
.g2 { border-left: 55px solid transparent; border-right: 55px solid transparent; border-bottom: 95px solid var(--purple); top: 60%; left: 4%; animation: drift 28s ease-in-out infinite reverse; }
.g3 { width: 90px; height: 90px; background: var(--orange); border-radius: 14px; top: 25%; right: 6%; animation: drift 25s ease-in-out infinite; }
.g4 { width: 70px; height: 70px; background: var(--green); bottom: 14%; right: 12%; animation: drift 30s ease-in-out infinite reverse; }
.g5 { width: 60px; height: 60px; background: var(--red); border-radius: 12px; bottom: 30%; left: 14%; animation: drift 26s ease-in-out infinite; }
@keyframes drift {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  33% { transform: translate(40px,-30px) rotate(120deg); }
  66% { transform: translate(-25px,35px) rotate(240deg); }
}

/* ---- topbar ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 22px;
  background: var(--cream);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgba(24,28,42,0.12);
}
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--disp); font-weight: 800; }
.brand-berry { font-size: 1.4rem; }
.brand-name { font-size: 1.05rem; white-space: nowrap; }
.topbar-progress { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.tp-track { flex: 1; height: 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; overflow: hidden; min-width: 60px; }
.tp-fill { height: 100%; background: var(--gold); border-radius: 20px; transition: width 0.5s cubic-bezier(.2,.8,.2,1); }
.tp-label { font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.reset-btn { background: none; border: 2px solid var(--slate); color: var(--slate); border-radius: 8px; padding: 4px 10px; font-size: 0.7rem; cursor: pointer; font-weight: 600; }
.reset-btn:hover { border-color: var(--red); color: var(--red); }
.hamburger { display: none; background: var(--ink); color: var(--cream); border: none; width: 38px; height: 34px; border-radius: 8px; font-size: 1.1rem; cursor: pointer; }

/* ---- left rail ---- */
.left-rail {
  position: fixed; top: 62px; left: 0; width: 248px; height: calc(100vh - 62px);
  padding: 20px 14px; z-index: 40; overflow-y: auto;
  border-right: 2px dashed rgba(24,28,42,0.25);
}
.rail-title { font-size: 0.7rem; letter-spacing: 2px; color: var(--slate); margin-bottom: 14px; font-weight: 600; }
.rail-link {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 10px 10px; margin-bottom: 6px; border-radius: 10px; cursor: pointer;
  border-left: 4px solid transparent; transition: all 0.2s;
}
.rail-link:hover { background: var(--cream); }
.rail-link.active { background: var(--cream); border-left-color: var(--orange); box-shadow: 3px 3px 0 var(--ink); }
.rail-num { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; background: var(--ink); color: var(--cream); border-radius: 6px; font-size: 0.72rem; font-weight: 600; margin-right: 8px; }
.rail-text { font-family: var(--disp); font-weight: 700; font-size: 0.9rem; }
.rail-dots { display: flex; gap: 4px; margin: 6px 0 2px 30px; }
.rail-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(24,28,42,0.18); }
.rail-dot.on { background: var(--green); }
.rail-mini { display: block; margin-left: 30px; font-size: 0.65rem; color: var(--slate); }

/* ---- main ---- */
.main { position: relative; z-index: 1; margin-left: 248px; padding: 40px 42px 80px; max-width: 1100px; }

/* ---- hero ---- */
.hero { padding: 40px 0 50px; max-width: 760px; }
.kicker { font-size: 0.78rem; letter-spacing: 2px; color: var(--orange); font-weight: 600; margin-bottom: 18px; }
.headline { font-family: var(--disp); font-weight: 800; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -1.5px; }
.hl { position: relative; white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: 6px; height: 40%; background: var(--gold); z-index: -1; transform: rotate(-1deg); }
.subhead { font-size: 1.12rem; color: var(--slate); margin: 24px 0 26px; max-width: 620px; }
.hero-chips { margin-bottom: 30px; }
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta-btn {
  display: inline-block; background: var(--orange); color: var(--cream);
  font-family: var(--disp); font-weight: 800; font-size: 1.05rem;
  padding: 14px 26px; border-radius: 12px; text-decoration: none;
  border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
  transition: all 0.12s;
}
.cta-btn:hover { transform: translate(3px,3px); box-shadow: 3px 3px 0 var(--ink); }
.cta-btn:active { transform: translate(6px,6px); box-shadow: 0 0 0 var(--ink); }
.cta-btn.big { font-size: 1.3rem; padding: 18px 34px; background: var(--gold); color: var(--ink); }
.cta-note { font-size: 0.78rem; color: var(--slate); }

/* ---- chips ---- */
.chipwrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--cream); border: 2px solid var(--ink); border-radius: 20px; padding: 5px 12px; font-size: 0.78rem; font-weight: 500; box-shadow: 2px 2px 0 var(--ink); }
.chipdot { width: 9px; height: 9px; border-radius: 50%; }

/* section kicker */
.section-kicker { font-size: 0.75rem; letter-spacing: 2px; color: var(--purple); font-weight: 600; margin-bottom: 18px; }

/* ---- terminal + rules ---- */
.term-section { display: grid; grid-template-columns: 1fr 1.1fr; gap: 34px; margin: 20px 0 60px; align-items: start; }
.term-sticky { position: sticky; top: 90px; }
.terminal { background: var(--ink); border-radius: 14px; border: 3px solid var(--ink); box-shadow: 8px 8px 0 rgba(24,28,42,0.25); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #22273a; border-bottom: 1px solid rgba(255,255,255,0.08); }
.term-dot { width: 12px; height: 12px; border-radius: 50%; }
.term-title { margin-left: 10px; color: rgba(244,242,236,0.55); font-size: 0.72rem; }
.term-body { padding: 18px 16px; font-size: 0.82rem; line-height: 1.9; }
.term-cursor-line { display: flex; align-items: center; }
.cursor { display: inline-block; width: 9px; height: 15px; background: var(--gold); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

.rules-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.rule-card { background: var(--cream); border: 3px solid var(--ink); border-top-width: 8px; border-radius: 14px; padding: 20px; box-shadow: 5px 5px 0 var(--ink); transition: all 0.18s; }
.rule-card:hover { transform: translateY(-4px) rotate(0deg) !important; box-shadow: 8px 10px 0 var(--ink); }
.rule-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 1.4rem; border: 2px solid var(--ink); margin-bottom: 14px; }
.rule-title { font-family: var(--disp); font-weight: 800; font-size: 1.15rem; margin-bottom: 8px; }
.rule-body { font-size: 0.92rem; color: var(--slate); }

/* ---- rhythm ---- */
.rhythm-section { margin: 0 0 60px; }
.rhythm-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.rhythm-tile { border: 3px solid var(--ink); border-radius: 14px; padding: 26px 16px; box-shadow: 5px 5px 0 var(--ink); text-align: center; transition: transform 0.16s; }
.rhythm-tile:nth-child(odd) { transform: rotate(-1.5deg); }
.rhythm-tile:nth-child(even) { transform: rotate(1.5deg); }
.rhythm-tile:hover { transform: rotate(0deg) scale(1.04); }
.rhythm-label { font-family: var(--disp); font-weight: 800; font-size: 1.3rem; color: var(--ink); letter-spacing: 1px; }
.rhythm-sub { font-size: 0.72rem; color: rgba(24,28,42,0.7); margin-top: 4px; font-weight: 600; }

/* ---- trail ---- */
.trail-section { margin: 0 0 60px; }
.trail-wrap { display: flex; flex-wrap: wrap; gap: 8px; background: var(--cream); border: 3px solid var(--ink); border-radius: 16px; padding: 24px 20px; box-shadow: 6px 6px 0 var(--ink); }
.trail-seg { flex: 1; min-width: 120px; }
.trail-node { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--cream); display: flex; align-items: center; justify-content: center; font-family: var(--disp); font-weight: 800; margin-bottom: 8px; border: 2px solid var(--ink); }
.trail-node.complete { background: var(--green); }
.trail-bar { height: 8px; background: var(--paper); border-radius: 8px; overflow: hidden; border: 1px solid var(--ink); }
.trail-fill { height: 100%; background: var(--gold); transition: width 0.5s; }
.trail-lbl { font-size: 0.68rem; color: var(--slate); margin-top: 8px; font-weight: 600; }

/* ---- phases ---- */
.phases { display: flex; flex-direction: column; gap: 34px; }
.phase { position: relative; background: var(--cream); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); }
.belt-badge {
  position: absolute; top: -18px; left: -14px; z-index: 5;
  width: 52px; height: 52px; background: var(--purple); color: var(--cream);
  border: 3px solid var(--ink); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 800; font-size: 1.5rem;
  transform: rotate(-8deg) scale(0.4); opacity: 0;
  box-shadow: 3px 3px 0 var(--ink);
}
.belt-badge.stampin { animation: stampin 0.5s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes stampin {
  0% { transform: rotate(-40deg) scale(1.8); opacity: 0; }
  60% { transform: rotate(-8deg) scale(0.9); opacity: 1; }
  100% { transform: rotate(-8deg) scale(1); opacity: 1; }
}
.phase-head { width: 100%; text-align: left; background: none; border: none; cursor: pointer; display: flex; align-items: flex-start; gap: 16px; padding: 26px 26px; }
.phase-head-main { flex: 1; padding-left: 26px; }
.phase-kicker { font-size: 0.7rem; letter-spacing: 2px; color: var(--orange); font-weight: 600; }
.phase-title { font-family: var(--disp); font-weight: 800; font-size: 1.7rem; letter-spacing: -0.5px; margin: 4px 0 6px; }
.phase-summary { font-size: 0.95rem; color: var(--slate); }
.phase-head-side { display: flex; align-items: center; gap: 12px; }
.phase-count { font-size: 0.8rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; padding: 4px 8px; font-weight: 600; }
.chevron { font-size: 1.3rem; transition: transform 0.3s; }
.phase.open .chevron { transform: rotate(180deg); }
.phase-body-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
.phase.open .phase-body-wrap { grid-template-rows: 1fr; }
.phase-body { overflow: hidden; }
.phase-body > * { padding: 0 26px; }
.phase-body .panel-grid { padding: 0 26px 26px; }

/* ---- panel grid ---- */
.panel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.panel { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 16px; box-shadow: 3px 3px 0 rgba(24,28,42,0.5); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-title { font-family: var(--disp); font-weight: 800; font-size: 1rem; }

/* checklist */
.chlist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.chlist li { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.chdot { width: 8px; height: 8px; border-radius: 50%; background: var(--slate); flex-shrink: 0; }
.chtext { flex: 1; }
.tagpill { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1px; color: var(--cream); padding: 2px 7px; border-radius: 6px; font-weight: 600; flex-shrink: 0; }

/* mlist */
.mlist { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mitem { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; padding: 4px; border-radius: 8px; transition: background 0.15s; }
.mitem:hover { background: rgba(24,28,42,0.05); }
.mbox { width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 6px; display: flex; align-items: center; justify-content: center; background: var(--cream); flex-shrink: 0; font-weight: 800; color: var(--cream); transition: all 0.15s; }
.mitem.done .mbox { background: var(--green); }
.mitem.done .mtext { text-decoration: line-through; color: var(--slate); opacity: 0.7; }

/* cmd */
.cmd-panel { background: var(--ink); border-color: var(--ink); }
.cmd-panel .panel-title { color: var(--gold); }
.copy-btn { background: var(--gold); color: var(--ink); border: 2px solid var(--gold); border-radius: 7px; padding: 3px 12px; font-family: var(--mono); font-size: 0.72rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.copy-btn:hover { background: var(--cream); border-color: var(--cream); }
.cmd-body { font-family: var(--mono); font-size: 0.8rem; display: flex; flex-direction: column; gap: 6px; }
.cmd-line { display: flex; gap: 8px; color: var(--paper); word-break: break-all; }
.cmd-prompt { color: var(--green); flex-shrink: 0; }

/* reslist */
.reslist { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.reslink { font-family: var(--disp); font-weight: 700; color: var(--ink); text-decoration: none; font-size: 0.95rem; border-bottom: 2px solid transparent; transition: border-color 0.15s; }
.reslink:hover { border-bottom-color: var(--orange); }
.arr { color: var(--orange); margin-left: 4px; }
.resdesc { font-size: 0.82rem; color: var(--slate); margin-top: 2px; }

/* mentor */
.mentor-panel { background: var(--ink); border-color: var(--ink); grid-column: 1 / -1; }
.mentor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mentor-tag { font-size: 0.68rem; letter-spacing: 2px; color: var(--gold); font-weight: 600; }
.mentor-who { color: var(--paper); font-family: var(--disp); font-weight: 700; font-size: 0.9rem; }
.mentor-body { color: var(--paper); font-size: 1rem; font-style: italic; line-height: 1.6; }

/* pass */
.pass { margin: 0 26px 26px; background: var(--gold); border: 3px solid var(--ink); border-radius: 12px; padding: 18px; box-shadow: 4px 4px 0 var(--ink); }
.pass-title { font-family: var(--disp); font-weight: 800; font-size: 1.1rem; margin-bottom: 12px; }
.pass-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 10px; }
.pass-item { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.88rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; padding: 8px 10px; transition: background 0.15s; }
.pass-item:hover { background: #fff; }
.pass-box { width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 5px; display: flex; align-items: center; justify-content: center; background: var(--cream); flex-shrink: 0; font-weight: 800; color: var(--cream); }
.pass-item.done .pass-box { background: var(--green); }
.pass-item.done { text-decoration: line-through; color: var(--slate); }

/* footer */
.footer { margin-top: 70px; background: var(--ink); border: 3px solid var(--ink); border-radius: 18px; padding: 50px 40px; text-align: center; box-shadow: 8px 8px 0 rgba(24,28,42,0.3); }
.footer-head { font-family: var(--disp); font-weight: 800; font-size: clamp(1.6rem,4vw,2.6rem); color: var(--cream); letter-spacing: -0.5px; }
.footer-sub { color: rgba(244,242,236,0.7); margin: 14px 0 26px; font-size: 1rem; }
.footer-links { margin-top: 30px; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; color: rgba(244,242,236,0.55); font-size: 0.75rem; }
.footer-links a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold); }

/* ---- responsive ---- */
@media (max-width: 1000px) {
  .term-section { grid-template-columns: 1fr; }
  .term-sticky { position: static; }
  .rhythm-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 780px) {
  .hamburger { display: block; }
  .left-rail { transform: translateX(-100%); background: var(--cream); border-right: 3px solid var(--ink); width: 260px; transition: transform 0.28s; box-shadow: 8px 0 0 rgba(24,28,42,0.15); }
  .left-rail.show { transform: translateX(0); }
  .main { margin-left: 0; padding: 28px 20px 60px; }
  .panel-grid { grid-template-columns: 1fr; }
  .topbar-progress { display: none; }
  .geo { display: none; }
  .phase-head { flex-wrap: wrap; }
  .phase-head-main { padding-left: 26px; }
  .phase-title { font-size: 1.35rem; }
}
@media (max-width: 480px) {
  .rhythm-grid { grid-template-columns: 1fr 1fr; }
  .headline { font-size: 2.1rem; }
}
</parameter>
</invoke>