:root { color-scheme: light; --ink: #2a2140; --paper: #fff3e0; --card: #ffffff; --soft: #6a6178; --line: #e4d8c6; --you: #d9467a; --youL: #f8cdd6; --me: #2c6fca; --meL: #cfe0f6; --us: #d98e00; --usL: #fde9b8; --good: #2f7d46; --warn: #a3402f; --cost: #7c7389; }
* { box-sizing: border-box; }
html { scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
.px { image-rendering: pixelated; display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px 80px; }
.soft { color: var(--soft); }
header.top { display: flex; align-items: flex-end; gap: 18px; padding: 26px 0 14px; }
header.top .grow { flex: 1; min-width: 0; }
header.top p { margin: 8px 0 0; color: var(--soft); }

/* sticky bar: pages on the left, scenario on the right */
nav { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 3px solid var(--ink); display: flex; align-items: flex-end; gap: 12px; padding-top: 8px; }
.tabs { display: flex; gap: 6px; flex: 1; min-width: 0; }
.tabs button { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; color: var(--ink); background: transparent; border: 3px solid transparent; border-bottom: 0; padding: 8px 6px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--card); border-color: var(--ink); margin-bottom: -3px; padding-bottom: 11px; }
.scenbox { display: flex; align-items: center; gap: 8px; padding-bottom: 7px; }
.scen-cap { font-size: 13px; color: var(--soft); max-width: 190px; text-align: right; line-height: 1.2; }
.seg.scen button { min-width: 40px; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--me); outline-offset: 2px; }
section.tab { padding-top: 22px; }
section.tab[hidden] { display: none; }
h2 { margin: 34px 0 12px; font-size: 18px; }
h3 { margin: 18px 0 6px; font-size: 15px; }
section.tab > h2:first-child { margin-top: 0; }
.lead { margin: 0 0 14px; color: var(--soft); max-width: 75ch; }
.box { background: var(--card); border: 3px solid var(--ink); padding: 14px; }
.you { --c: var(--you); --l: var(--youL); } .me { --c: var(--me); --l: var(--meL); } .us { --c: var(--us); --l: var(--usL); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.side { position: sticky; top: 84px; max-height: calc(100vh - 96px); overflow: auto; }
.side .small { font-size: 13px; color: var(--soft); }
.note { font-size: 13px; color: var(--soft); margin: 6px 0 0; }
.note.warn, .chg.warn { color: var(--warn); font-weight: 700; }
.scroll { overflow-x: auto; }

/* comic strips: panels appear one after the other and stay (like the portfolio, in pixels) */
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; cursor: pointer; }
.strip .panel { margin: 0 auto; }
.panel, .road { position: relative; max-width: 100%; }
.panel .layer, .road .layer { width: 100%; height: auto; }
.panel .layer:not(.base), .road .layer:not(.base) { position: absolute; inset: 0; }
.road .walker { position: absolute; height: auto; }
.anim .panel { opacity: 0; }
.anim.play .panel { animation: pop .45s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--i) * var(--gap)); }
.anim.play .panel .props { animation: pop .4s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--i) * var(--gap) + 250ms); }
.anim.play .panel .fig { animation: hop .5s steps(1, end) 2; animation-delay: calc(var(--i) * var(--gap) + 450ms); }
.anim.play .panel .kids { animation: hop .45s steps(1, end) 2; animation-delay: calc(var(--i) * var(--gap) + 650ms); }
.hop { animation: hop .5s steps(1, end) 3; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
/* --px is one art pixel as a share of the canvas height, so jumps land on whole pixels */
.panel { --px: 1.515%; } .px:not(.layer) { --px: 3.846%; }
@keyframes hop { 0% { transform: none; } 25% { transform: translateY(calc(var(--px) * -1)); } 50% { transform: translateY(calc(var(--px) * -3)); } 75% { transform: translateY(calc(var(--px) * -1)); } 100% { transform: none; } }
.road .station { opacity: 0; transform: scale(.6); }
.road .station.on { opacity: 1; transform: none; }
.road.live .station.on { transition: opacity .35s ease .85s, transform .45s cubic-bezier(.34, 1.56, .64, 1) .85s; }
.road.live .walker { transition: left 1s steps(10, end); }
.road .walker.walking { animation: bob .2s steps(1, end) infinite; }
@keyframes bob { 0% { transform: none; } 50% { transform: translateY(-6.25%); } }
.top .hop-a { animation: hop .5s steps(1, end) .3s 3; } .top .hop-b { animation: hop .5s steps(1, end) .9s 3; }
.job.flash { animation: flash 1.2s steps(4, end); }
@keyframes flash { 0%, 50% { box-shadow: 0 0 0 4px var(--c); } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .anim .panel, .anim .panel .layer, .hop, .top .px, .job.flash { animation: none !important; opacity: 1 !important; } .road .station { opacity: 1; transform: none; } }
@media print { .anim .panel, .road .station { opacity: 1 !important; transform: none !important; animation: none !important; } nav { position: static; } .side { position: static; max-height: none; } }

/* START */
.goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.goal { display: flex; flex-direction: column; gap: 6px; } .goal b { font-size: 16px; } .goal span { color: var(--soft); font-size: 14px; }
.scens { display: grid; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); gap: 14px; }
.scen-card { display: flex; flex-direction: column; gap: 8px; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--card); border: 3px solid var(--ink); padding: 8px; }
.scen-card[aria-pressed="true"] { box-shadow: 6px 6px 0 var(--ink); background: #fffaf2; }
.scen-card .name { font-size: 17px; }
.scen-card .nums, .mix .nums { display: flex; gap: 14px; flex-wrap: wrap; font-weight: 700; }
.steps { display: flex; flex-wrap: wrap; gap: 10px; }
.step { display: flex; align-items: center; gap: 8px; font: inherit; color: var(--ink); border: 3px solid var(--ink); background: var(--card); padding: 8px 12px; cursor: pointer; }
.step b { font-size: 18px; }

/* person pages */
.who-head { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.who-head h2 { margin: 0; font-size: 24px; } .who-head .jp { font-weight: 400; color: var(--soft); }
.skills { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; color: var(--ink); border: 2px solid var(--ink); background: var(--card); padding: 3px 8px; cursor: pointer; }
.chip.grow, .chip.unk { border-style: dashed; }
.chip.used { background: var(--l); }
.chip[aria-pressed="true"] { box-shadow: 3px 3px 0 var(--c); outline: 2px solid var(--c); }
.chip i { font-style: normal; font-size: 11px; color: var(--soft); border: 1px dashed var(--soft); padding: 0 4px; }
.chip .n { font-weight: 700; min-width: 1.1em; text-align: right; }
.box .skills { margin-top: 10px; }

/* starting points */
.mixes { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.mix { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 3px solid var(--ink); padding: 8px; }
.mix .name { font-size: 16px; }
.chg { font-size: 13px; color: var(--soft); margin: 0; }
ul.why { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
ul.why li { display: flex; gap: 6px; align-items: center; }
ul.why .px { flex: none; width: 16px; }
ul.why li.here { font-weight: 700; color: var(--warn); }
ul.why li[hidden] { display: none; }
ul.plain { margin: 6px 0; padding-left: 18px; font-size: 13px; }

/* option cards */
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.job { background: var(--card); border: 3px solid var(--line); padding: 12px; }
.job.on { border-color: var(--ink); }
.job.out { background: #f4efe8; }
.job.out .head b { color: var(--soft); }
.job.dim { opacity: .35; } .job.hl { box-shadow: 5px 5px 0 var(--c); }
.job .head { display: flex; align-items: center; gap: 8px; }
.job .head b { flex: 1; min-width: 0; }
.job .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.job:not(.on) .body { display: none; }
.res { display: flex; flex-wrap: wrap; gap: 2px 12px; font-weight: 700; font-size: 14px; }
.res .soft { font-weight: 400; }
.badge { font-size: 12px; font-weight: 700; padding: 0 6px; border: 2px solid var(--ink); background: var(--card); }
.badge.if, .badge.part { background: var(--usL); }
.badge.no { color: var(--warn); border-color: var(--warn); }
.hearts { display: inline-flex; gap: 2px; }
.love { border: 0; background: none; padding: 0; cursor: pointer; line-height: 0; }
.toggle { font: inherit; font-weight: 700; border: 3px solid var(--ink); background: var(--card); color: var(--ink); padding: 2px 10px; cursor: pointer; white-space: nowrap; }
.toggle[aria-pressed="true"] { background: var(--c, var(--ink)); color: #fff; }
.us .toggle[aria-pressed="true"] { color: var(--ink); }
.toggle.st1 { background: var(--usL); } .toggle.st2 { background: var(--good); color: #fff; }
.sl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; margin-top: 8px; font-size: 14px; }
.sl.amt { font-weight: 700; }
.sl output { font-weight: 700; font-variant-numeric: tabular-nums; }
.sl input { grid-column: 1 / -1; width: 100%; margin: 4px 0 0; }
.tag { font-size: 11px; font-weight: 700; padding: 0 5px; border: 1px solid currentColor; color: var(--soft); margin-left: 6px; }
.tag.known { color: var(--good); } .tag.source { color: var(--me); }
input[type=range] { -webkit-appearance: none; appearance: none; height: 20px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; background: var(--line); border: 1px solid var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 20px; margin-top: -8px; background: var(--c, var(--ink)); border: 3px solid var(--ink); }
input[type=range]::-moz-range-track { height: 6px; background: var(--line); border: 1px solid var(--ink); }
input[type=range]::-moz-range-thumb { width: 9px; height: 14px; border-radius: 0; background: var(--c, var(--ink)); border: 3px solid var(--ink); }
details { margin-top: 8px; font-size: 14px; } summary { cursor: pointer; font-weight: 700; }
details a, .note a, ul.why a { color: var(--me); }

/* numbers */
.tile b { display: block; font-size: 30px; line-height: 1.15; } .tile span { color: var(--soft); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.bars { display: grid; gap: 8px; margin: 8px 0 4px; }
.bar { display: grid; grid-template-columns: minmax(80px, min(36%, 220px)) minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px; }
.bar .lab { overflow-wrap: anywhere; line-height: 1.2; }
.bar .track { display: flex; align-items: center; gap: 2px; min-height: 18px; }
.bar .fill { height: 14px; border-radius: 0 4px 4px 0; background: var(--c); min-width: 2px; }
.bar .fill.mid { border-radius: 0; }
.bar .val { padding-left: 5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar.cur .lab { font-weight: 700; }
.bar:hover .fill { filter: brightness(.9); }
.fill.grey, .legend .grey i { background: #cfc6bb; }
.fill.ref, .legend .ref i { background: var(--ink); }
.fill.cost, .legend .cost i { background: var(--cost); }
.fill.prod, .legend .prod i { background: repeating-linear-gradient(135deg, var(--c) 0 4px, var(--l) 4px 7px); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--soft); } .legend i { display: inline-block; width: 11px; height: 11px; margin-right: 5px; background: var(--c); vertical-align: -1px; }
.hm { position: relative; display: flex; height: 20px; border: 2px solid var(--ink); background: #fff; margin: 8px 0 4px; }
.hm .hseg { height: 100%; background: var(--c); flex: none; }
.hm .hseg + .hseg { border-left: 2px solid #fff; }
.hm .goal { position: absolute; top: -6px; bottom: -6px; width: 3px; background: var(--ink); }
.hm.over { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn); }
.seg { display: inline-flex; border: 3px solid var(--ink); } .seg button { font: inherit; font-weight: 700; border: 0; background: var(--card); color: var(--ink); padding: 5px 12px; cursor: pointer; } .seg button + button { border-left: 2px solid var(--line); } .seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* US */
.matrix { border-collapse: separate; border-spacing: 6px; width: 100%; table-layout: fixed; min-width: 640px; } .matrix th { font-size: 14px; padding: 4px; } .matrix th .px { margin: 0 auto 4px; }
.matrix td { background: var(--card); border: 3px solid var(--line); padding: 10px 8px; text-align: center; font-size: 14px; }
.matrix td.play { border-color: var(--ink); background: var(--usL); } .matrix td.idea { border-style: dashed; color: var(--soft); }
.matrix td button { font: inherit; font-weight: 700; background: none; border: 0; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.tests { display: grid; gap: 0; }
.test { display: grid; grid-template-columns: auto minmax(110px, 200px) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.test:last-child { border-bottom: 0; }
details.jj { margin-top: 0; } details.jj > summary { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.ladder { position: relative; height: 120px; margin: 20px 8px 8px; } .ladder .axis { position: absolute; left: 0; right: 0; top: 60px; height: 3px; background: var(--ink); } .ladder .pt { position: absolute; transform: translateX(-50%); text-align: center; font-size: 13px; line-height: 1.25; width: 118px; } .ladder .pt i { position: absolute; left: 50%; width: 12px; height: 12px; margin-left: -6px; border: 3px solid var(--ink); background: var(--c, #fff); } .ladder .up { bottom: 70px; } .ladder .up i { bottom: -15px; } .ladder .dn { top: 74px; } .ladder .dn i { top: -19px; }
.check { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .check label { display: flex; gap: 10px; align-items: center; cursor: pointer; } .check input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.ask { display: flex; gap: 20px; align-items: center; background: var(--l); border: 3px solid var(--c); padding: 18px; margin-top: 34px; } .ask b { font-size: 20px; display: block; }

/* COMPARE */
table.cmp { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 14px; }
.cmp th, .cmp td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
.cmp .rh { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; min-width: 170px; }
.cmp .rh span { grid-column: 2; font-weight: 400; color: var(--soft); font-size: 12px; }
.cmp td b { display: block; } .cmp td span { color: var(--soft); font-size: 12px; }
.cmp td.cur { background: #fff7e6; }
.cmp thead th span { display: block; font-weight: 400; font-size: 12px; color: var(--soft); }
.cmp thead button { font: inherit; font-weight: 700; font-size: 17px; border: 3px solid var(--ink); background: var(--card); color: var(--ink); padding: 0 10px; cursor: pointer; }
.cmp thead button[aria-pressed="true"] { background: var(--ink); color: #fff; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; } table.data th, table.data td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.data th:first-child, table.data td:first-child, table.data td:last-child, table.data th:last-child { text-align: left; }
table.data tr.out td { color: var(--soft); }
#tip { position: fixed; z-index: 20; pointer-events: none; background: var(--ink); color: #fff; padding: 6px 9px; font-size: 13px; max-width: 240px; display: none; }

@media (max-width: 1000px) { nav { flex-wrap: wrap; } .scenbox { width: 100%; justify-content: flex-end; order: -1; padding-bottom: 0; } }
@media (max-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr); } .side { position: static; max-height: none; } }
@media (max-width: 620px) {
  .strip .panel { width: 100% !important; } .tabs button span { display: none; } .mixes, .scens { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding: 0 14px 60px; } .ladder .pt { width: 84px; font-size: 12px; } .scen-cap { display: none; }
  .test { grid-template-columns: auto minmax(0, 1fr) auto; } .test > span { grid-column: 2 / -1; }
}

/* shared mode: sign-in screen and status line */
.sync { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 13px; color: var(--soft); margin: 4px 0 0 !important; }
.sync:empty { display: none; }
.sync .peers { color: var(--good); font-weight: 700; }
.sync .status.warn { color: var(--warn); font-weight: 700; }
.linkish { font: inherit; color: var(--me); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.top .px.online { filter: drop-shadow(0 3px 0 var(--good)); }
.login { position: fixed; inset: 0; z-index: 50; background: var(--paper); display: grid; place-items: center; padding: 16px; overflow: auto; }
.login-card { width: min(420px, 100%); background: var(--card); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 22px; display: grid; gap: 12px; justify-items: start; }
.login-figs { display: flex; gap: 10px; }
.login-step { display: grid; gap: 6px; width: 100%; }
.login-step[hidden] { display: none; }
.login-step label { font-weight: 700; font-size: 14px; }
.login-step input { font: inherit; font-size: 16px; padding: 8px 10px; border: 3px solid var(--ink); background: #fff; color: var(--ink); width: 100%; }
.login-step .toggle { justify-self: start; padding: 4px 14px; }
.login p { margin: 0; }
