/* Scene Plans page. Builds on dashboard.css (tokens, icons, tags, blocks); phone width first, then tablet and desktop. */

:root { --now: oklch(0.55 0.016 var(--h)); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --now: oklch(0.66 0.014 var(--h)); } }
:root[data-theme="light"] { --now: oklch(0.66 0.014 var(--h)); }

html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- header ---------- */

.sc-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--line-soft);
}
.sc-top .brand { grid-area: auto; }
.sc-who { display: flex; align-items: center; gap: 10px; min-width: 0; margin-left: auto; }
.ico-who { --s: 34px; }
.who-text { display: grid; line-height: 1.25; }
.who-text .name { font-size: var(--f-label); }
.who-sub { font-size: var(--f-small); color: var(--text-3); }
.sc-link { color: var(--text-2); font-size: var(--f-label); }
.sc-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-soft); border-radius: 10px; text-decoration: none; font-weight: 550; }
.sc-link:hover { background: var(--surface); color: var(--text); }

main.sc-main { display: grid; gap: 36px; max-width: 1180px; padding-block: 22px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
main.sc-main > * { min-width: 0; }
.sc-main h3 { font-size: var(--f-label); font-weight: 650; color: var(--text-2); }
.sc-main h4 { margin: 0; font-size: var(--f-small); font-weight: 650; color: var(--text-2); }
.was { font-size: var(--f-micro); color: var(--text-3); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--f-small); color: var(--text-2); }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key-mark { width: 10px; height: 10px; border-radius: 3px; }
.key-line { width: 16px; height: 2px; border-radius: 1px; }
.is-plan.key-mark, .is-plan.key-line { background: var(--accent); }
.is-now.key-mark, .is-now.key-line { background: var(--now); }
.stars { display: inline-flex; align-items: center; gap: 2px; font-size: var(--f-micro); font-weight: 650; color: var(--text-2); }
.stars .glyph { width: 11px; height: 11px; fill: currentColor; stroke: none; }
.plan-chip { display: inline-grid; place-items: center; padding: 3px 9px 4px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: var(--f-small); font-weight: 700; white-space: nowrap; }
.plan-chip--big { padding: 5px 12px 6px; border-radius: 10px; font-size: var(--f-label); }

/* disclosures */
.more { min-width: 0; border-top: 1px solid var(--line-soft); }
.more-body { min-width: 0; }
.more > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-size: var(--f-label); font-weight: 600; color: var(--text-2); }
.more > summary::-webkit-details-marker { display: none; }
.more > summary .glyph { width: 15px; height: 15px; color: var(--text-3); transition: transform 0.15s var(--ease); }
.more[open] > summary .glyph { transform: rotate(90deg); }
.more > summary:hover { color: var(--text); }
.more-body { padding: 4px 0 16px; }
@media (prefers-reduced-motion: reduce) { .more > summary .glyph { transition: none; } }

/* ---------- 0. the one-line result ---------- */

.lead-in { display: grid; gap: 18px; }
.lead-in h1 { max-width: 24ch; font-size: 1.5rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
.lead-second { color: var(--accent); }
.lead-pets { display: grid; gap: 14px; }
.lead-common { display: grid; gap: 6px; }
.lead-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.lead-pet { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.lead-pet .name { font-size: var(--f-label); }
.ico-leadpet { --s: 44px; }
.lead-plans { display: grid; gap: 8px; }
.lead-plan { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 4px 12px; padding: 8px 12px 8px 8px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; transition: border-color 0.15s, background-color 0.15s; }
.lead-plan:hover { border-color: var(--line); background: var(--raised); }
.lead-title { grid-column: 3; grid-row: 1; justify-self: end; font-size: var(--f-small); color: var(--text-3); text-align: right; text-wrap: balance; }
.lead-swaps { display: grid; gap: 8px; }
.lead-swaps ul { display: grid; gap: 8px; }
.swap { display: grid; grid-template-columns: 3.75rem auto auto auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.ico-swap { --s: 34px; }
.ico-swap.is-old { opacity: 0.45; }
.swap-arrow { width: 15px; height: 15px; color: var(--text-3); }
.swap-text { display: grid; line-height: 1.25; min-width: 0; }
.swap-text .name { font-size: var(--f-label); }
.swap-worth { font-size: var(--f-label); font-weight: 700; }

/* ---------- 1. plan map ---------- */

.pm-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 6px; }
.pm-col { display: grid; align-content: start; gap: 6px; min-width: 0; }
.pm-tab { display: grid; place-items: center; min-height: 36px; border-radius: 10px 10px 4px 4px; background: var(--accent); color: var(--accent-ink); font-size: var(--f-label); font-weight: 700; text-decoration: none; white-space: nowrap; }
a.pm-tab:hover { filter: brightness(1.06); }
.pm-col.is-spare .pm-tab { background: var(--raised); color: var(--text-3); }
.pm-scenes { display: grid; gap: 6px; }
.pm-scene { display: grid; gap: 2px; align-content: center; min-height: 52px; padding: 7px 8px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); color: var(--text); font-size: var(--f-small); font-weight: 600; line-height: 1.2; text-decoration: none; transition: border-color 0.15s, background-color 0.15s; }
.pm-scene:hover { border-color: var(--line); background: var(--raised); }
.pm-scene.is-locked { border-style: dashed; background: none; color: var(--text-3); font-weight: 500; }
.pm-lock { display: inline-flex; align-items: center; gap: 4px; font-size: var(--f-micro); font-weight: 500; color: var(--text-3); white-space: nowrap; }
.pm-lock .glyph { width: 11px; height: 11px; }
.pm-spare { display: grid; place-items: center; min-height: 52px; border: 1px dashed var(--line-soft); border-radius: 10px; font-size: var(--f-small); color: var(--text-3); }

/* ---------- 2. plan cards ---------- */

.plan-cards { display: grid; gap: 20px; }
.plan-card { display: grid; gap: 16px; min-width: 0; padding: 16px 14px 4px; border: 1px solid var(--line-soft); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); scroll-margin-top: 12px; }
.pc-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 12px; }
.pc-head h2 { font-size: var(--f-name); font-weight: 650; line-height: 1.25; text-wrap: balance; }
.pc-changes { grid-column: 1 / -1; justify-self: start; font-size: var(--f-small); color: var(--text-3); }
.pc-changes.is-edit { color: var(--accent); font-weight: 650; }
.pc-scenes { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-scene { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line-soft); border-radius: 999px; background: var(--bg); font-size: var(--f-small); }
.pc-scene .name { font-weight: 600; }
.pc-scene.is-locked { border-style: dashed; background: none; color: var(--text-3); }
.pc-scene.is-locked .name { font-weight: 500; }
.pc-gain { font-weight: 700; }

.pr-list { display: grid; }
.pr { display: grid; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.pr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.pr-head h3 { font-size: var(--f-body); color: var(--text); }
.pr-state { padding: 2px 8px 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: var(--f-micro); font-weight: 500; color: var(--text-3); white-space: nowrap; }
.pr-state.is-edit { background: var(--accent); box-shadow: none; color: var(--accent-ink); font-weight: 700; }
.pr-note { margin-left: auto; font-size: var(--f-small); color: var(--text-3); }
.pr:not(.is-edit) .pr-body { opacity: 0.82; }

.glove { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ico-glove { --s: 48px; border-radius: 12px; }
.glove.is-changed .ico-glove { outline: 2px solid var(--accent); outline-offset: 2px; }
.glove-text { display: grid; line-height: 1.3; }
.glove-boost { display: inline-flex; align-items: center; gap: 8px; font-size: var(--f-label); color: var(--text-2); }
.glove-boost .gear-link { flex: 0 0 26px; margin: 0 8px 0 0; }
.glove-boost b { font-weight: 600; color: var(--text); }
.ico-boost { --s: 32px; }

.pick-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pick-row--pets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pick { display: grid; justify-items: center; align-content: start; gap: 4px; min-width: 0; text-align: center; }
.pick .name { font-size: var(--f-small); line-height: 1.2; text-wrap: balance; }
.ico-pick { --s: 56px; margin: 3px 0; }
.pick.is-changed .ico-pick { outline: 2.5px solid var(--accent); outline-offset: 3px; }
.pick-art { position: relative; display: grid; justify-items: center; gap: 2px; }
.ico-pet2 { --s: 66px; }
.pick.is-changed .pick-art { border-radius: 14px; box-shadow: 0 0 0 2.5px var(--accent); padding: 4px 6px 3px; background: var(--accent-soft); }
.pick .tag { margin-top: 1px; }

.nodes { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.node { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.ico-node { --s: 44px; }
.ico-node--small { --s: 32px; }
.node-text { display: grid; line-height: 1.25; min-width: 0; }
.node-text .name { font-size: var(--f-small); }
.node-rank { font-size: var(--f-micro); color: var(--text-3); }
.next-point { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-top: 10px; border-top: 1px dashed var(--line-soft); }

.fights { display: grid; gap: 12px; padding: 14px 0 6px; border-top: 1px solid var(--line-soft); }
.fights-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.fight-list { display: grid; gap: 14px; }
.fight { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; }
.fight-label { font-size: var(--f-label); color: var(--text-2); }
.fight-gain { font-size: var(--f-name); font-weight: 700; }
.fight-gain.is-down { color: var(--over); }
.fight-bars { grid-column: 1 / -1; display: grid; gap: 2px; padding-right: 3.5rem; }
.fight-bar { position: relative; display: flex; align-items: center; height: 12px; }
.bar-fill { display: block; width: var(--w); min-width: 3px; height: 100%; border-radius: 0 4px 4px 0; }
.bar-fill.is-plan { background: var(--accent); }
.bar-fill.is-now { background: var(--now); }
.bar-value { margin-left: 6px; margin-right: -3.5rem; font-size: var(--f-micro); color: var(--text-2); white-space: nowrap; }
.fight-note { grid-column: 1 / -1; font-size: var(--f-small); color: var(--text-3); }

.loss-grid { display: grid; gap: 18px; }
.loss-group { display: grid; gap: 8px; min-width: 0; }
.loss-group ul { display: grid; gap: 7px; }
.loss-row { display: grid; grid-template-columns: minmax(0, 11.5rem) minmax(1.5rem, 1fr) 3rem; align-items: center; gap: 10px; font-size: var(--f-small); color: var(--text-2); }
.loss-label { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; min-width: 0; }
.loss-label .name { color: var(--text); font-weight: 550; }
.loss-sub { color: var(--text-3); font-size: var(--f-micro); }
.loss-node { display: inline-flex; align-items: center; gap: 2px; font-size: var(--f-micro); color: var(--text-3); }
.ico-opt { --s: 24px; }
.loss-track { height: 8px; border-radius: 0 4px 4px 0; background: var(--raised); }
.loss-fill { display: block; width: var(--w); min-width: 2px; height: 100%; border-radius: 0 4px 4px 0; background: var(--over); }
.loss-fill.is-share { background: var(--accent); }
.loss-value { text-align: right; font-weight: 600; color: var(--text-2); }
.loss-row.is-best .loss-value { color: var(--text-3); font-weight: 500; }

.scene-notes { display: grid; gap: 8px; padding: 10px 0; }
.scene-notes + .scene-notes { border-top: 1px dashed var(--line-soft); }
.scene-notes h4 { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; font-size: var(--f-label); color: var(--text); }
.facts, .marked { display: grid; gap: 7px; font-size: var(--f-label); color: var(--text-2); }
.facts li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); align-items: start; gap: 10px; }
.strength { justify-self: start; margin-top: 1px; }
.strength--data { color: var(--text-2); box-shadow: inset 0 0 0 1px var(--text-3); }
.marked li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; }
.marked .glyph { width: 15px; height: 15px; margin-top: 2px; color: var(--text-3); }
.tips .glyph { color: var(--accent); }

/* ---------- 3. Secret Realm ---------- */

.sr { display: grid; gap: 24px; min-width: 0; padding: 18px 14px 20px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1.5px oklch(from var(--accent) l c h / 0.55), var(--shadow); scroll-margin-top: 12px; }
.sr-head { display: grid; gap: 12px; }
.sr-head h2 { font-size: var(--f-title); font-weight: 700; letter-spacing: -0.01em; }
.sr-shape { margin-top: 2px; font-size: var(--f-label); color: var(--text-3); }
.sr-gain { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.sr-gain > .num { font-size: 2.75rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.sr-gain-label { max-width: 22ch; font-size: var(--f-label); color: var(--text-2); }
.sr-gain-label a { color: var(--text); font-weight: 600; text-underline-offset: 3px; }
.sr-part { display: grid; gap: 12px; min-width: 0; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.sr-part > h3 { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.sr-note { max-width: 75ch; font-size: var(--f-small); line-height: 1.45; color: var(--text-3); }

.lever-list { display: grid; gap: 14px; }
.lever { display: grid; grid-template-columns: 1rem auto minmax(0, 1fr) 3.25rem; align-items: start; gap: 6px 9px; }
.lever-rank { padding-top: 1px; font-size: var(--f-small); color: var(--text-3); text-align: center; }
.lever-kind { display: grid; color: var(--text-3); }
.lever-kind .glyph { width: 17px; height: 17px; }
.lever-text { display: grid; gap: 1px; min-width: 0; }
.lever-text .name { font-size: var(--f-label); }
.lever-how { font-size: var(--f-small); line-height: 1.35; color: var(--text-3); }
.lever-track { display: block; height: 12px; border-radius: 0 4px 4px 0; background: var(--raised); }
.lever > .lever-track { grid-column: 3; grid-row: 2; }
.lever-fill { display: block; width: var(--w); min-width: 3px; height: 100%; border-radius: 0 4px 4px 0; background: var(--accent); }
.lever-fill.is-stat { background: var(--now); }
.lever-fill.is-cost { background: var(--over); }
.lever-value { grid-column: 4; grid-row: 1 / span 2; align-self: center; font-size: var(--f-name); font-weight: 700; text-align: right; }
.lever-value.is-flat { font-weight: 500; color: var(--text-3); }
.stat100 { display: grid; gap: 8px; }
.stat100 li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3.25rem; align-items: center; gap: 10px; font-size: var(--f-label); }
.stat100 .lever-track { height: 8px; }
.stat100 .lever-value { grid-column: auto; grid-row: auto; font-size: var(--f-label); }

.wall-plot { min-height: 230px; }
.wall-svg { display: block; touch-action: pan-y; }
.wall-grid { stroke: var(--line-soft); stroke-width: 1; }
.wall-grid.is-one { stroke: var(--line); }
.wall-axis { stroke: var(--line); stroke-width: 1; }
.wall-tick { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.wall-note { fill: var(--text-2); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wall-cliff { stroke: var(--text-3); stroke-width: 1; }
.wall-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wall-line.is-plan { stroke: var(--accent); }
.wall-line.is-now { stroke: var(--now); }
.wall-cross { stroke: var(--text-2); stroke-width: 1; }
.wall-dot { stroke: var(--surface); stroke-width: 2; }
.wall-dot.is-plan { fill: var(--accent); }
.wall-dot.is-now { fill: var(--now); }
.wall-hit { fill: transparent; cursor: crosshair; }
.wall-readout { min-height: 2.9em; font-size: var(--f-small); line-height: 1.45; color: var(--text-2); }
.wall-readout b { color: var(--text); font-weight: 650; }
.table-wrap { max-height: 22rem; overflow: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
.wall-table { width: 100%; border-collapse: collapse; font-size: var(--f-small); }
.wall-table th, .wall-table td { padding: 5px 8px; text-align: right; font-weight: 400; white-space: nowrap; color: var(--text-2); }
.wall-table th:first-child { text-align: left; color: var(--text); font-weight: 600; }
.wall-table thead th { position: sticky; top: 0; background: var(--raised); font-size: var(--f-micro); color: var(--text-3); }
.wall-table tbody tr { border-top: 1px solid var(--line-soft); }
.wall-table tr.is-cliff td, .wall-table tr.is-cliff th { background: var(--accent-soft); }

.safety { display: grid; gap: 14px; }
.safe { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 14px; }
.safe .pick-art { grid-row: span 2; }
.safe .ico-pet2 { --s: 56px; }
.safe-text { display: grid; line-height: 1.3; }
.safe-what { margin-top: 2px; font-size: var(--f-small); color: var(--text-2); }
.safe-cost { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: var(--f-small); font-weight: 650; color: var(--text-2); }
.safe-cost .lever-track { height: 8px; }
.sr-notes { display: grid; gap: 0 32px; }
.sr-notes .sr-part { margin-top: 16px; }
.sr-notes .sr-part:first-child { margin-top: 0; }
.sr-ask { padding: 14px; border: 0; border-radius: 12px; background: var(--bg); }

/* ---------- 4. steps and footer ---------- */

.steps { display: grid; gap: 12px; max-width: 75ch; font-size: var(--f-body); color: var(--text-2); }
.steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
.step-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--raised); font-size: var(--f-small); font-weight: 700; color: var(--text); }
.foot { display: grid; gap: 10px; }
.foot-line { font-size: var(--f-small); line-height: 1.5; color: var(--text-3); }

/* ---------- tablet and desktop ---------- */

@media (min-width: 720px) {
  .sc-top { padding: 12px max(32px, env(safe-area-inset-right, 0px)) 12px max(32px, env(safe-area-inset-left, 0px)); }
  main.sc-main { gap: 44px; padding-block: 32px 80px; padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
  .lead-in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: 24px 40px; }
  .lead-in h1 { font-size: 2rem; }
  .lead-swaps { grid-column: 1; }
  .lead-pets { grid-column: 2; grid-row: 1 / span 2; }
  .pm-grid { gap: 10px; }
  .pm-scene { padding: 9px 12px; font-size: var(--f-label); }
  .plan-card, .sr { padding: 22px 24px 8px; }
  .sr { padding-bottom: 26px; }
  .sr-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .sr-gain > .num { font-size: 3.5rem; }
  .ico-pick { --s: 64px; }
  .ico-pet2 { --s: 76px; }
  .pick .name { font-size: var(--f-label); }
  .loss-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 36px; }
  .fight-list { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 16px 32px; }
  .safety { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .sr-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sr-notes .sr-part { margin-top: 0; }
  .sr-notes .sr-part:nth-child(n + 3) { margin-top: 20px; }
  .lever { grid-template-columns: 1rem auto minmax(0, 22rem) minmax(4rem, 1fr) 3.5rem; align-items: center; }
  .lever > .lever-track { grid-column: 4; grid-row: 1; }
  .lever-value { grid-column: 5; grid-row: 1; }
}

@media (min-width: 1100px) {
  .plan-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .plan-card { padding: 20px 20px 6px; }
  .plan-card .loss-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-card .fight-list { grid-template-columns: minmax(0, 1fr); }
  .ico-pick { --s: 56px; }
  .ico-pet2 { --s: 66px; }
  .pick .name { font-size: var(--f-small); }
}

/* ---------- bracket chips, full equipment list (bracket mode) ---------- */
.brackets { display: grid; gap: 8px; margin: 0 0 22px; }
.bracket-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.bracket { flex: 0 0 auto; display: grid; justify-items: center; gap: 1px; min-width: 76px; min-height: 44px; padding: 6px 12px; border: 0; border-radius: 12px;
  background: var(--raised); color: var(--text-2); font: inherit; font-size: var(--f-label); font-weight: 600; cursor: pointer; scroll-snap-align: start;
  box-shadow: inset 0 0 0 1px var(--line-soft); }
.bracket:hover { color: var(--text); }
.bracket.is-on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.bracket:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bracket-you { font-size: var(--f-micro); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }
.kit-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.kit { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; }
.ico-kit { --s: 40px; border-radius: 10px; }
.kit.is-plain { grid-template-columns: minmax(0, 1fr); padding-left: 52px; }
.kit-text { display: grid; line-height: 1.3; min-width: 0; }
.kit-text .name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.kit-sub { font-size: var(--f-small); color: var(--text-3); }

/* ---------- features open at this bracket, spend order ---------- */
.features { display: grid; gap: 8px; margin: 0 0 26px; }
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 14px; margin: 0; padding: 0; list-style: none; }
.feature { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; color: var(--text-3); }
.feature .glyph { width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature.is-on { color: var(--text); }
.feature.is-on .glyph { color: var(--accent); }
.feature-text { display: grid; line-height: 1.3; }
.feature-text .name { font-weight: 600; font-size: var(--f-body); }
.spend-order { align-items: start; }
.spend-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.spend-list li { display: grid; grid-template-columns: 44px 28px minmax(0, 1fr); align-items: center; gap: 8px; font-size: var(--f-label); }
.spend-n { color: var(--text-3); font-size: var(--f-small); }
.carry { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--raised); font-size: var(--f-small); color: var(--text-2); line-height: 1.4; }
.carry.is-warn { box-shadow: inset 3px 0 0 var(--warn); color: var(--text); }
.class-table td.is-ahead { color: var(--over); font-weight: 650; }
.class-table td.is-best { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.classes .sr-note { margin-top: 10px; font-size: var(--f-small); color: var(--text-3); }
.status-note { margin: 0 0 22px; font-size: var(--f-label); }
