/* The For You lab (2026-09-28): five recommenders and five progress bars, run
   on the real players. The page chrome follows the Falling Staff and Plan GUI
   labs; the shelves and rows inside it are drawn in Free Play's own colours,
   because they are the proposal. Its own file, per the rule. */
@font-face { font-family: "Barlow"; src: url("fonts/Barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/Barlow-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/BarlowCondensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #15171c; --bg2: #1d2027; --bg3: #262a33; --line: #343945;
  --ink: #ecebe4; --dim: #a7aab4; --soft: #c9c6bb; --muted: #898781;
  --gold: #e2b452; --gold2: #f0cf85; --red: #c9534a; --green: #63b47a;
  /* the two series, validated for this surface (dataviz validate_palette,
     dark, #1d2027: all checks pass) — practice and skill everywhere */
  --work: #1f98c8; --result: #b87d14;
  --work-wash: rgba(31, 152, 200, 0.12);
  /* Free Play's own (web/style.css) for the mock */
  --fp-bg: #0a0a14; --fp-cyan: #34d3ff; --fp-gold: #ffd75e; --fp-orange: #ffab2e;
  --grid: #2c2f37; --axis: #3a3e48;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.5 -apple-system, "Segoe UI", Inter, Roboto, sans-serif; }
a { color: var(--gold2); }
h1, h2, h3, h4 { font-family: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif; font-weight: 700; line-height: 1.15; margin: 0; }
p { margin: 0 0 .7em; }
code { color: var(--gold2); font-size: 13px; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1480px; margin: 0 auto; padding: 0 20px 80px; }
@media (max-width: 640px) { .wrap { padding: 0 16px 60px; } }

.mast { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; padding: 18px 0 8px; border-bottom: 1px solid var(--line); }
.mast h1 { font-size: 30px; color: var(--gold2); }
.mast .sub { color: var(--dim); }
.mast .links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; }
.mast .links a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.mast .links a:hover { border-color: var(--gold); }
@media (max-width: 640px) { .mast h1 { font-size: 24px; } .mast .links { margin-left: 0; } }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 6px; }
.tab { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 16px; cursor: pointer; font-weight: 700; }
.tab[aria-selected="true"] { border-color: var(--gold); background: #2a2616; color: var(--gold2); }
.tabs .keys { margin-left: auto; color: var(--muted); font-size: 12.5px; }
@media (max-width: 760px) { .tabs .keys { display: none; } }

.brief { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin: 14px 0; }
@media (max-width: 980px) { .brief { grid-template-columns: 1fr; } }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.card h2 { font-size: 21px; color: var(--gold2); margin-bottom: 8px; }
.card h3 { font-size: 16px; margin: 12px 0 6px; color: var(--soft); }
.quote { font-style: italic; color: var(--soft); border-left: 3px solid var(--gold); padding-left: 12px; }
.num { display: grid; gap: 10px; }
.num > div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: baseline; }
.num b { font-size: 26px; color: var(--gold2); font-weight: 700; text-align: right; }
.num span { color: var(--dim); font-size: 14px; }

.sec { font-size: 23px; margin: 28px 0 10px; color: var(--ink); }
.sec .hint { font: 13.5px/1.4 -apple-system, "Segoe UI", sans-serif; color: var(--muted); margin-left: 10px; font-weight: 400; }
.lede { color: var(--soft); font-size: 14.5px; }
.foot { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* ------------------------------------------------------------ scoreboards */
.tablewrap { overflow-x: auto; }
table.score { border-collapse: collapse; width: 100%; min-width: 860px; font-size: 13.5px; }
table.score th { text-align: left; font-weight: 600; color: var(--dim); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
table.score td { padding: 7px 8px; border-bottom: 1px solid #262930; vertical-align: middle; font-variant-numeric: tabular-nums; }
table.score tr.base td { color: var(--dim); }
table.score tr.base td:first-child { font-style: italic; }
table.score td.name { white-space: nowrap; font-weight: 700; }
table.score td.name small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; white-space: normal; max-width: 220px; }
table.score tr.sel td { background: rgba(226, 180, 82, 0.07); }
table.score tr { cursor: pointer; }
table.score tr.head { cursor: default; }
.mbar { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: center; min-width: 120px; }
.mbar .v { text-align: right; }
.mbar .t { height: 8px; background: #262a33; border-radius: 4px; position: relative; overflow: hidden; }
.mbar .f { position: absolute; left: 0; top: 0; bottom: 0; background: var(--work); border-radius: 0 4px 4px 0; }
.best { color: var(--gold2); font-weight: 700; }
.best .f { background: var(--gold); }
.hist { display: inline-flex; gap: 2px; align-items: flex-end; height: 26px; vertical-align: middle; }
.hist i { display: block; width: 9px; background: var(--work); border-radius: 2px 2px 0 0; min-height: 1px; }

/* ------------------------------------------------------------ picker */
.player-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
@media (max-width: 980px) { .player-grid { grid-template-columns: 1fr; } }
.picker { position: sticky; top: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 20px); }
@media (max-width: 980px) { .picker { position: static; max-height: none; } }
.picker input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; color: var(--ink); font: inherit; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--bg3); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.chip.on { border-color: var(--gold); color: var(--gold2); background: #2a2616; }
.chip .n { color: var(--muted); margin-left: 4px; }
.plist { overflow-y: auto; min-height: 120px; display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 980px) { .plist { max-height: 300px; } }
.prow { text-align: left; background: transparent; border: 1px solid transparent; border-radius: 9px; padding: 6px 8px; cursor: pointer; display: block; width: 100%; }
.prow:hover { background: var(--bg3); }
.prow.on { border-color: var(--gold); background: #2a2616; }
.prow .l1 { display: flex; gap: 6px; align-items: baseline; font-size: 13.5px; }
.prow .l1 .lvr { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; padding-left: 6px; }
.prow .l1 b { color: var(--gold2); }
.prow .l2 { color: var(--muted); font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .lab { color: var(--soft); font-size: 12.5px; }

/* ------------------------------------------------------------ who */
.who { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 760px) { .who { grid-template-columns: 1fr; } }
.who h2 { font-size: 22px; }
.who .lvl { display: flex; gap: 12px; align-items: center; margin: 6px 0 10px; }
.lvbig { font: 700 30px/1 "Barlow Condensed", "Avenir Next", sans-serif; color: var(--fp-bg); background: var(--fp-gold); border-radius: 10px; padding: 6px 10px 5px; white-space: nowrap; }
.lvbig.guess { background: var(--bg3); color: var(--soft); }
.who .lvl p { margin: 0; color: var(--soft); font-size: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--dim); font-size: 13px; margin-bottom: 8px; }
.facts b { color: var(--ink); }
.likes { display: grid; gap: 4px; }
.like { display: grid; grid-template-columns: minmax(0, 1fr) 60px 118px; gap: 8px; align-items: center; font-size: 13px; }
.like .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.like .t .ok { color: var(--green); font-weight: 700; }
.like .h { height: 6px; background: #262a33; border-radius: 3px; overflow: hidden; }
.like .h i { display: block; height: 100%; background: #d0708a; border-radius: 0 3px 3px 0; }
.like .r { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
.taste { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.taste span { background: var(--bg3); border-radius: 999px; padding: 2px 9px; font-size: 12px; color: var(--soft); }
.taste span b { color: var(--ink); }
.sub-h { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 10px 0 5px; }

/* ------------------------------------------------------------ shelves (Free Play's colours) */
.shelf { background: var(--fp-bg); border: 1px solid #252a3a; border-radius: 16px; padding: 12px 14px 14px; margin-top: 14px; }
.shelf.focus { border-color: var(--fp-gold); box-shadow: 0 0 0 1px rgba(255, 215, 94, .25); }
.shelf-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 10px; cursor: pointer; }
.shelf-h .k { font: 700 13px/1 "Barlow Condensed", sans-serif; color: var(--fp-bg); background: var(--fp-gold); border-radius: 6px; padding: 4px 7px 3px; }
.shelf.base .shelf-h .k { background: #6b6f7a; }
.shelf-h h3 { font: 800 17px/1.2 "Avenir Next", "Segoe UI", system-ui, sans-serif; color: #fff; letter-spacing: .02em; }
.shelf-h .d { color: #9aa0b4; font-size: 13px; }
.shelf-h .m { margin-left: auto; color: #9aa0b4; font-size: 12.5px; white-space: nowrap; }
.cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(172px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
@media (max-width: 640px) { .cards { grid-auto-columns: 158px; } }
.pc { scroll-snap-align: start; position: relative; background: rgba(255, 255, 255, .06); border: 2px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 9px 10px 10px; color: #eee; font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif; min-height: 150px; display: flex; flex-direction: column; gap: 5px; transition: border-color .12s, background .12s; }
.pc.hl { border-color: var(--fp-cyan); background: rgba(52, 211, 255, .12); }
.pc.played { border-style: dashed; }
.pc .slot { font: 700 10.5px/1 "Barlow Condensed", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--fp-gold); }
.pc .top { display: flex; gap: 8px; align-items: flex-start; }
.av { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 11px/1 "Avenir Next", sans-serif; color: #111; }
.pc .ti { font-weight: 800; font-size: 13.5px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc .co { font-size: 11.5px; color: #9aa0b4; }
.pill { display: inline-block; padding: 1px 6px; border-radius: 7px; background: rgba(0, 0, 0, .6); color: #fff; font: 700 10.5px/1.35 "Avenir Next", sans-serif; box-shadow: 0 0 0 1px rgba(255, 215, 94, .45); white-space: nowrap; }
.pill.guess { box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); color: #cfd3e0; }
.pc .why { font-size: 11.8px; color: var(--fp-cyan); font-weight: 600; line-height: 1.3; flex: 1; }
.pc .ft { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11px; color: #9aa0b4; }
.pc .ft .fin { color: #5ee27a; font-weight: 700; }
.pc .ft .ov { color: #c79bff; }
.pc .hitmark { position: absolute; top: -7px; right: -7px; background: var(--fp-gold); color: #111; font: 800 10px/1 sans-serif; border-radius: 999px; padding: 3px 6px; }

/* ------------------------------------------------------------ algorithm cards */
.algo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.algo-cards .card h3 { margin-top: 0; color: var(--gold2); font-size: 17px; }
.algo-cards .card p { font-size: 14px; color: var(--soft); }
.algo-cards .card ul { margin: 6px 0 0; padding-left: 0; list-style: none; font-size: 13.5px; color: var(--dim); }
.algo-cards .card li { margin: 3px 0; }
.algo-cards .pick { border-color: var(--gold); }
.algo-cards .pick h3::after { content: "  ★ picked"; color: var(--gold); font: 700 12px/1 sans-serif; }

/* ------------------------------------------------------------ progress tab */
.tplbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { background: var(--bg2); border: 0; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.seg button.on { background: #2a2616; color: var(--gold2); }
.tpl-explain { margin-bottom: 12px; font-size: 14px; }
.tpl-explain .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .tpl-explain .grid2 { grid-template-columns: 1fr; } }
.tpl-explain b.w { color: var(--work); } .tpl-explain b.r { color: var(--result); }
.tpl-explain p { margin: 0 0 4px; color: var(--soft); }

.fp { background: var(--fp-bg); border: 1px solid #252a3a; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif; }
.fp .fp-h { color: #9aa0b4; font-size: 12.5px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fp .fp-h b { color: #fff; font-weight: 800; letter-spacing: .06em; }
.row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: center; background: rgba(255, 255, 255, .06); border: 2px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 14px; color: #eee; cursor: pointer; text-align: left; width: 100%; }
.row:hover { background: rgba(255, 255, 255, .1); }
.row.on { border-color: var(--fp-cyan); background: rgba(52, 211, 255, .1); }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; gap: 8px; } }
.row .ti { font-weight: 800; font-size: 15.5px; line-height: 1.25; }
.row .su { font-size: 12px; color: #9aa0b4; margin-top: 2px; }
.row .su .pl { color: #c79bff; }
.row .su .ok { color: #5ee27a; font-weight: 700; }
.bars { display: grid; gap: 5px; }
.bar2 { display: grid; grid-template-columns: 58px minmax(40px, 1fr) max-content; gap: 8px; align-items: center; font-size: 11.5px; }
.bar2 .lab { color: #9aa0b4; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 10.5px; }
.bar2 .val { text-align: right; color: #cfd3e0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trk { position: relative; height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.trk .f { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 5px 5px 0; }
.trk.w .f { background: var(--fp-cyan); }
.trk.r .f { background: var(--fp-gold); }
.trk .tick { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fp-bg); }
.trk .bank { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(52, 211, 255, .55) 0 4px, rgba(52, 211, 255, .12) 4px 8px); }
.trk .cap { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--fp-gold); }
.trk.one { height: 12px; }
.nextline { font-size: 11.5px; color: var(--fp-cyan); font-weight: 600; }
.medal { font-size: 15px; margin-right: 4px; }
.strip { display: flex; gap: 2px; height: 16px; align-items: stretch; }
.strip i { flex: 1; border-radius: 3px; background: rgba(255, 255, 255, .08); position: relative; overflow: hidden; }
.strip i b { position: absolute; left: 0; right: 0; bottom: 0; background: var(--fp-cyan); opacity: .85; }
.strip i.lit b { background: var(--fp-gold); opacity: 1; }
.all5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .all5 { grid-template-columns: 1fr; } }
.all5 .cell { display: grid; gap: 3px; }
.all5 .cell .nm { font-size: 10.5px; color: #9aa0b4; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.all5 .trk { height: 6px; }
.row.all { grid-template-columns: minmax(0, 0.8fr) minmax(0, 2.2fr); }
@media (max-width: 760px) { .row.all { grid-template-columns: 1fr; } }

/* timeline small multiples */
#timeline h2, #sim h2 { font-size: 19px; }
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 8px; }
.tl { min-width: 0; }
.tl .tl-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 2px; }
.tl .tl-h b { color: var(--ink); }
.tl .tl-h span { color: var(--muted); font-size: 12px; }
.tl svg { display: block; width: 100%; height: auto; overflow: visible; }
.tl svg text { fill: var(--muted); font: 10px -apple-system, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--dim); margin: 4px 0 0; }
.legend i { display: inline-block; width: 16px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 1px; }
.legend i.wash { height: 9px; background: var(--work-wash); border: 1px solid rgba(31, 152, 200, .35); }
.runstrip { display: flex; gap: 1px; margin-top: 3px; height: 5px; }
.runstrip i { flex: 1; border-radius: 1px; background: #3a3e48; }
.runstrip i.fin { background: var(--green); }
.runstrip i.part { background: #6c7080; }

/* simulator */
.simgrid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .simgrid { grid-template-columns: 1fr; } }
.ctl { display: grid; gap: 10px; font-size: 13.5px; }
.ctl label { display: grid; gap: 3px; color: var(--soft); }
.ctl input[type=range] { width: 100%; accent-color: var(--gold); }
.ctl .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ctl .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { background: var(--gold); color: #1a1406; border: 0; border-radius: 9px; padding: 8px 14px; font-weight: 800; cursor: pointer; }
.btn.ghost { background: var(--bg3); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.simres { display: grid; gap: 10px; }
.simrow { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; font-size: 13px; }
@media (max-width: 640px) { .simrow { grid-template-columns: 1fr; } }
.simrow .nm { font-weight: 700; }
.simrow .nm small { display: block; color: var(--muted); font-weight: 400; }
.delta { color: var(--green); font-weight: 700; }
.delta.zero { color: var(--muted); font-weight: 400; }
.synth { color: var(--gold2); font-size: 12.5px; }

.tip { position: fixed; z-index: 50; pointer-events: none; background: #0d0e12; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 12.5px; color: var(--soft); max-width: 280px; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
.tip b { color: var(--ink); font-size: 13.5px; }
.tip .k { display: inline-block; width: 12px; height: 2px; vertical-align: middle; margin-right: 6px; }

.colophon { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.av { position: relative; overflow: hidden; }
.av.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-main, .tabpane, .shelf { min-width: 0; }
.shelf.ships { border-color: #5ee27a; box-shadow: 0 0 0 1px rgba(94, 226, 122, .3); }
.shelf.ships .shelf-h .k { background: #5ee27a; }
