/* Halfspace. Layout: dark header and status bar, then a 1200px column of cards and tables. */
:root {
  --ink: #0F1D18;
  --chalk: #F3F5F2;
  --paper: #FFFFFF;
  --text: #24312B;
  --body: #3A4842;
  --muted: #55635C;
  --line: #DCE2DD;
  --line-2: #E8ECE8;
  --field: #C9D2CC;
  --pitch: #0B6B4B;
  --pitch-dark: #084D36;
  --pitch-soft: #E1F0E8;
  --form: #3FCF8E;
  --amber: #8A4A08;
  --amber-mid: #C27A0E;
  --amber-soft: #FBEBD7;
  --red: #A11B12;
  --red-line: #B42318;
  --red-soft: #FDE7E4;
  --blue: #24427A;
  --blue-soft: #E3E9F6;
  --grey-soft: #EDEFEA;
  --bar: #B9CFC4;
  --fdr1: #0E6B47; --fdr2: #9ED8BB; --fdr3: #E4E8E4; --fdr4: #F4A47E; --fdr5: #B8341F;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --sans: Figtree, "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--chalk); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; font-variant-numeric: tabular-nums; }
img, svg { max-width: 100%; }
a { color: var(--pitch); }
a:hover { color: var(--pitch-dark); }
:focus-visible { outline: 3px solid var(--form); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; line-height: 0.95; margin: 0; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(2.6rem, 6vw, 4.75rem); }
h2 { font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-weight: 700; font-size: 1.6rem; }
p { margin: 0; }
.wrap { max-width: 1248px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
@media (min-width: 700px) { .wrap { padding-left: 24px; padding-right: 24px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.note { font-size: 14px; color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--body); max-width: 60ch; margin-top: 10px; }
.green, .green-text { color: var(--pitch); }
.big { font-family: var(--display); font-weight: 800; font-size: 2.75rem; line-height: 1; }

/* Header */
.site-header { background: var(--ink); color: var(--chalk); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 32px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--chalk); text-decoration: none; padding: 10px 0; }
.brand span { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: 0.01em; }
.brand:hover { color: var(--chalk); }
.nav { display: flex; gap: 4px 22px; font-weight: 600; font-size: 15px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.nav a { color: var(--chalk); text-decoration: none; padding: 12px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a.cta { color: var(--form); }
.nav a[aria-current="page"] { color: var(--form); border-bottom-color: var(--form); }
.status { background: var(--paper); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.status-row { display: flex; flex-wrap: wrap; gap: 6px 24px; padding-top: 10px; padding-bottom: 10px; }
.status-item { display: inline-flex; align-items: center; gap: 8px; }
.status strong { color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--pitch); }
.dot.amber { background: var(--amber-mid); }

/* Page */
.page { padding-top: 40px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 36px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; }
.page-head > div { min-width: 0; }
.page-head .pill { margin-top: 12px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 20px; min-width: 0; }
.block { display: flex; flex-direction: column; gap: 16px; }
.block-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 16px; }
.block-head a { font-weight: 700; text-decoration: none; padding: 8px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 6px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; }
.btn.primary { background: var(--pitch); color: #fff; }
.btn.primary:hover { background: var(--pitch-dark); color: #fff; }
.btn.outline { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn.form { background: var(--form); color: var(--ink); border-color: var(--form); }
.btn.ghost-light { background: transparent; color: var(--chalk); border-color: var(--chalk); }
.btn[disabled] { background: var(--bar); color: var(--ink); cursor: not-allowed; }
.linklike { background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 600; color: var(--pitch); cursor: pointer; text-decoration: underline; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pill.green { background: var(--pitch-soft); color: var(--pitch); border-color: transparent; }
.pill.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.tag.green { background: var(--pitch-soft); color: var(--pitch); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.grey { background: var(--grey-soft); color: var(--body); }

/* Forms */
label, legend { font-weight: 600; font-size: 14px; }
input, select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--field); border-radius: 6px; height: 44px; padding: 0 12px; }
.team-form { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.team-form-row { display: flex; flex-wrap: wrap; gap: 8px; }
.team-form input { flex: 1 1 240px; min-width: 0; height: 52px; border: 1.5px solid var(--ink); font-size: 16px; }
.team-form .btn { min-height: 52px; }
.hint { font-size: 13px; color: var(--muted); }
.form-error { color: var(--red); font-weight: 600; font-size: 14px; }

/* Home */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-copy .lede { margin-top: 0; }
.halfspace-card { flex: 1 1 360px; display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.fl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fl-name { display: block; font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.05; color: var(--ink); text-decoration: none; }
.fl-score { text-align: right; display: flex; flex-direction: column; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: end; border-bottom: 1.5px solid var(--ink); position: relative; padding-top: 8px; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; position: relative; }
.bar b { font-size: 13px; }
.bar span { display: block; width: 100%; max-width: 44px; background: var(--bar); border-radius: 3px 3px 0 0; }
.bar span.hi { background: var(--pitch); }
.bar small { position: absolute; bottom: -22px; font-size: 12px; color: var(--muted); }
.bars { margin-bottom: 22px; }
.bars.tall { min-height: 230px; }
.avg-line { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--muted); }
.avg-swatch { display: inline-block; width: 20px; border-top: 2px dashed var(--muted); vertical-align: middle; margin-right: 6px; }
.callout { font-size: 14px; border-radius: 6px; padding: 10px 12px; color: var(--body); }
.callout.amber { background: var(--amber-soft); }
.callout.green { background: var(--pitch-soft); }
.tiles { display: flex; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.tile { flex: 1 1 220px; padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); }
.tile .big { font-size: 36px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.list-card { display: flex; flex-direction: column; gap: 10px; }
.list-card ol { list-style: none; margin: 0; padding: 0; }
.list-card li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.who { display: flex; flex-direction: column; min-width: 0; }
.who a { color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who a:hover { text-decoration: underline; }
.who small { font-size: 12px; color: var(--muted); }
.val { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--pitch); }
.more { font-weight: 700; font-size: 14px; text-decoration: none; padding: 6px 0; }
.swing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.small-h { font-family: var(--sans); text-transform: none; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.swing-row { display: grid; grid-template-columns: 48px 40px minmax(0, 1fr); align-items: center; gap: 10px; padding: 4px 0; }
.swing-row .code { font-weight: 700; }
.swing-row .avg { font-family: var(--display); font-weight: 700; font-size: 20px; }
.swing-row .chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.steps { display: flex; flex-wrap: wrap; gap: 24px; border-top: 1.5px solid var(--ink); padding-top: 28px; }
.steps > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.steps span:not(.num) { color: var(--muted); font-size: 14px; }
.num { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--pitch); }

/* Fixture chips */
.fxcell { display: flex; flex-direction: column; gap: 2px; }
.fdr { display: block; text-align: center; font-size: 12px; font-weight: 700; padding: 5px 3px; border-radius: 4px; white-space: nowrap; font-style: normal; }
.fdr.f1 { background: var(--fdr1); color: #fff; }
.fdr.f2 { background: var(--fdr2); color: var(--ink); }
.fdr.f3 { background: var(--fdr3); color: var(--ink); }
.fdr.f4 { background: var(--fdr4); color: var(--ink); }
.fdr.f5 { background: var(--fdr5); color: #fff; }
.fdr.blank { background: transparent; color: var(--muted); border: 1px dashed var(--field); }

/* Tables */
.table-box { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.data thead th { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--ink); background: var(--paper); position: sticky; top: 0; }
table.data th button { all: unset; cursor: pointer; padding: 4px 0; }
table.data th button:focus-visible { outline: 3px solid var(--form); }
table.data th[aria-sort] button { color: var(--pitch); }
table.data th[aria-sort="descending"] button::after { content: " ▼"; font-size: 10px; }
table.data th[aria-sort="ascending"] button::after { content: " ▲"; font-size: 10px; }
table.data .l { text-align: left; }
#form-table { min-width: 1120px; }
td.player { position: sticky; left: 0; background: var(--paper); }
td.player a { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
td.player b { display: flex; align-items: center; gap: 6px; }
td.player span { font-size: 12px; color: var(--muted); }
td.player a:hover b { text-decoration: underline; }
td.hl { font-weight: 800; color: var(--pitch); font-size: 15px; }
td.up { color: #A3510A; font-weight: 700; }
td.down { color: var(--blue); font-weight: 700; }
td.fx { white-space: nowrap; }
td.fx .fxcell { display: inline-flex; width: 48px; vertical-align: top; margin-right: 3px; }
.spark rect { fill: var(--bar); }
.spark rect.hi { fill: var(--pitch); }
.flag { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 4px; cursor: help; }
.flag.d { background: var(--amber-soft); color: var(--amber); }
.flag.i { background: var(--red-soft); color: var(--red); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; padding: 16px; }
.filters fieldset { border: 0; margin: 0; padding: 0; }
.filters legend, .field label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; }
.field { display: flex; flex-direction: column; }
.field.grow { flex: 1 1 200px; min-width: 0; }
.count { font-size: 14px; color: var(--muted); padding-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 44px; min-width: 56px; padding: 0 14px; border-radius: 6px; font: inherit; font-weight: 700; cursor: pointer; background: var(--paper); color: var(--ink); border: 1px solid var(--field); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.key { display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 14px; color: var(--body); }
.key p { flex: 1 1 320px; }
.key strong { color: var(--ink); margin-right: 4px; }
table.fixtures { min-width: 760px; }
table.fixtures td { padding: 5px 3px; }
table.fixtures td .fxcell { min-width: 64px; }
table.fixtures .fdr { padding: 9px 4px; font-size: 13px; }
table.fixtures th.l small { font-weight: 500; color: var(--muted); font-size: 12px; }
table.fixtures td.avg { font-family: var(--display); font-weight: 700; font-size: 20px; padding-right: 12px; }
table.fixtures.n3 .g4, table.fixtures.n3 .g5, table.fixtures.n3 .g6, table.fixtures.n3 .g7, table.fixtures.n3 .g8,
table.fixtures.n5 .g6, table.fixtures.n5 .g7, table.fixtures.n5 .g8 { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 13px; color: var(--body); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .fdr { width: 18px; height: 14px; padding: 0; }
table.simple td, table.simple th { white-space: normal; }

.example-link { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: -12px; }
.show-more { display: flex; justify-content: center; }
table.fixtures th.team { position: sticky; left: 0; background: var(--paper); z-index: 1; }
@media (max-width: 600px) {
  table.fixtures th.team .tn { display: none; }
  table.fixtures th.team small { font-size: 14px; font-weight: 700; color: var(--ink); }
  table.fixtures { min-width: 0; }
  table.fixtures td .fxcell { min-width: 54px; }
}

/* Player page */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: -16px; }
.crumbs a { text-decoration: none; font-weight: 600; }
.player-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 40px; border-bottom: 1.5px solid var(--ink); padding-bottom: 24px; }
.player-head > div { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.player-name { font-size: clamp(3rem, 8vw, 5.5rem); line-height: 0.88; }
.key-stats { margin: 0; display: flex; flex-wrap: wrap; gap: 20px 36px; }
.key-stats div { display: flex; flex-direction: column-reverse; }
.key-stats dt { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.key-stats dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1; }
.key-stats div:first-child dd { color: var(--pitch); }
.two-col { display: flex; flex-wrap: wrap; gap: 20px; }
.two-col > :first-child { flex: 999 1 560px; }
.two-col > :last-child { flex: 1 1 320px; }
.two-col .card { display: flex; flex-direction: column; gap: 14px; }
.chart-card h2, .two-col h2 { font-size: 1.75rem; }
.verdict { background: var(--ink) !important; color: var(--chalk); border-color: var(--ink) !important; }
.verdict .label { color: #9FB5AA; }
.verdict h2 { font-size: 2.4rem; color: var(--form); }
.verdict.warn h2 { color: #F2B266; }
.verdict.bad h2 { color: #F59A92; }
.verdict ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.verdict li { position: relative; padding-left: 18px; }
.verdict li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: #9FB5AA; }
.verdict li.good::before { background: var(--form); }
.verdict li.warn::before { background: #F2B266; }
.verdict li.bad::before { background: #F59A92; }
.cmp { display: grid; grid-template-columns: 90px minmax(0, 1fr) 96px; align-items: center; gap: 14px; }
.cmp-label { font-weight: 700; }
.cmp-track { position: relative; height: 14px; background: var(--grey-soft); border-radius: 7px; }
.cmp-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: var(--bar); }
.cmp-bar.good { background: var(--pitch); }
.cmp-avg { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.cmp-val { text-align: right; font-size: 14px; color: var(--muted); }
.cmp-val strong { color: var(--ink); }
.fx-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 64px; align-items: center; gap: 12px; }
.fx-row .gw { font-size: 13px; font-weight: 700; color: var(--muted); }
.transfers { display: flex; justify-content: space-between; border-top: 1px solid var(--line-2); padding-top: 10px; font-size: 14px; color: var(--muted); }
.similar ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.similar li { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.similar li a { font-weight: 700; text-decoration: none; }
.similar small { color: var(--muted); }

/* Tips pages */
.tips { display: flex; flex-direction: column; gap: 12px; }
.tip { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.tip .rank { font-family: var(--display); font-weight: 800; font-size: 34px; color: var(--muted); }
.tip h3 { font-size: 1.7rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tip h3 a { color: var(--ink); text-decoration: none; }
.tip h3 a:hover { text-decoration: underline; }
.tip-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tip-main p:last-child { color: var(--body); }
.tip-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 96px; }
.tip-side .big { font-size: 36px; }
.related { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 560px) { .tip { grid-template-columns: 32px minmax(0, 1fr); } .tip-side { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; } }

/* Rater */
#rater-results { display: flex; flex-direction: column; gap: 24px; }
#rater-results:empty { display: none; }
.rate-top { display: flex; flex-wrap: wrap; gap: 20px; }
.score-card { flex: 1 1 340px; background: var(--ink); color: var(--chalk); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.score-card .label { color: #9FB5AA; }
.score-num { display: flex; align-items: baseline; gap: 6px; }
.score-num b { font-family: var(--display); font-weight: 800; font-size: 104px; line-height: 0.85; color: var(--form); }
.score-num span { font-family: var(--display); font-weight: 700; font-size: 32px; color: #9FB5AA; }
.score-rows { display: flex; flex-direction: column; gap: 10px; }
.score-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 32px; gap: 12px; align-items: center; font-size: 14px; }
.score-track { height: 8px; background: #26372F; border-radius: 4px; position: relative; overflow: hidden; }
.score-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.score-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; border-top: 1px solid #26372F; padding-top: 14px; font-size: 14px; color: #C7D4CD; }
.score-meta strong { color: var(--chalk); }
.score-meta a { color: var(--form); font-weight: 700; text-decoration: none; }
.pitch { flex: 999 1 560px; min-width: 0; background: #DDEFE4; border: 2px solid #B7D9C5; border-radius: 10px; padding: 22px 12px; display: flex; flex-direction: column; gap: 16px; }
.pitch-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pcard { position: relative; width: 118px; display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 8px; background: var(--paper); border: 1px solid var(--field); text-decoration: none; color: var(--ink); min-width: 0; }
.pcard b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard small { font-size: 12px; color: var(--muted); }
.pcard.warn { border: 2px solid var(--amber-mid); }
.pcard.bad { border: 2px solid var(--red-line); }
.pcard .ptag { align-self: flex-start; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: var(--grey-soft); color: var(--body); }
.pcard.good .ptag { background: var(--pitch-soft); color: var(--pitch); }
.pcard.warn .ptag { background: var(--amber-soft); color: var(--amber); }
.pcard.bad .ptag { background: var(--red-soft); color: var(--red); }
.armband { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.armband.v { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); }
.bench { border-top: 1.5px dashed #8DBCA2; padding-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fixes { display: flex; flex-direction: column; gap: 12px; }
.fix { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.fix .badge { flex: none; min-width: 96px; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 10px; border-radius: 4px; }
.badge.now { background: var(--red-soft); color: var(--red); }
.badge.watch { background: var(--amber-soft); color: var(--amber); }
.badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.good { background: var(--pitch-soft); color: var(--pitch); }
.fix-body { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fix-body h3 { font-family: var(--sans); text-transform: none; font-size: 17px; line-height: 1.3; }
.fix-body p { color: var(--body); }
.explainer { display: flex; flex-direction: column; gap: 10px; }
.explainer h2 { font-size: 1.75rem; }

/* Picker */
.back { font-size: 14px; font-weight: 600; text-decoration: none; margin-bottom: -16px; }
.budget { min-width: 260px; display: flex; flex-direction: column; gap: 6px; }
.budget-text { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.budget-track { height: 10px; background: var(--line); border-radius: 5px; position: relative; overflow: hidden; }
.budget-track span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--pitch); border-radius: 5px; }
.budget-track span.over { background: var(--red-line); }
.picker { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.squad { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.group { display: flex; flex-direction: column; gap: 10px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; }
.group-head h2 { font-size: 1.4rem; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { width: 150px; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; background: var(--chalk); border: 1px solid var(--field); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.slot small { font-size: 12px; color: var(--muted); }
.slot.empty { background: var(--paper); border: 1.5px dashed #8DBCA2; color: var(--pitch); }
.slot.active { outline: 3px solid var(--form); }
.slot .x { font-size: 12px; color: var(--red); font-weight: 700; }
.options { flex: 1 1 340px; display: flex; flex-direction: column; gap: 12px; }
.options ul { list-style: none; margin: 0; padding: 0; max-height: 640px; overflow-y: auto; }
.options li { display: grid; grid-template-columns: minmax(0, 1fr) 44px auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.options li.blocked { color: #7A857F; }
.opt-name { display: flex; flex-direction: column; min-width: 0; }
.opt-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt-name small { font-size: 12px; color: inherit; opacity: 0.85; }
.opt-l4 { text-align: right; font-weight: 800; }
.add { min-height: 40px; padding: 0 14px; border-radius: 6px; font: inherit; font-weight: 700; font-size: 13px; background: var(--pitch); color: #fff; border: 0; cursor: pointer; }
.add[disabled] { background: var(--grey-soft); color: var(--muted); border: 1px solid var(--line); cursor: not-allowed; }
.status-msg { font-size: 14px; background: var(--amber-soft); color: var(--amber); border-radius: 6px; padding: 10px 14px; font-weight: 600; }
.pick-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; border-top: 1.5px solid var(--ink); padding-top: 20px; width: 100%; }

/* Prose pages */
.how { display: flex; flex-wrap: wrap; gap: 40px 56px; }
.how-side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 16px; }
.toc { display: flex; flex-direction: column; border-left: 2px solid var(--ink); padding-left: 14px; font-weight: 600; }
.toc a { text-decoration: none; padding: 6px 0; }
.prose { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 36px; color: var(--text); font-size: 16px; line-height: 1.65; }
.prose.narrow { max-width: 760px; }
.prose section { display: flex; flex-direction: column; gap: 10px; max-width: 70ch; }
.prose h2 { color: var(--ink); }
.glossary { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.glossary div { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.glossary dt { flex: 0 0 140px; font-weight: 800; color: var(--ink); }
.glossary dd { flex: 1 1 300px; margin: 0; }
.weights { display: flex; flex-direction: column; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.weights div { display: grid; grid-template-columns: 120px minmax(0, 1fr) 48px; gap: 14px; align-items: center; }
.weights span { font-size: 14px; color: var(--body); }
.weights b { text-align: right; font-family: var(--display); font-size: 24px; color: var(--pitch); }

/* Ads: fixed heights so nothing jumps when an advert loads */
.ad { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ad-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ad-slot { width: 100%; max-width: 970px; height: 90px; border-radius: 6px; background: var(--grey-soft); }
@media (max-width: 700px) { .ad-slot { max-width: 320px; height: 100px; } }
body:not(.ads-on) .ad { display: none; }

/* Footer and consent */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 24px; padding-bottom: 24px; font-size: 13px; color: var(--muted); }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-weight: 600; }
.footer-row nav a { text-decoration: none; padding: 6px 0; }
.footer-row p { align-self: center; max-width: 60ch; }
.consent { position: sticky; bottom: 0; z-index: 20; background: var(--ink); color: var(--chalk); border-top: 3px solid var(--form); padding-bottom: env(safe-area-inset-bottom); }
.consent-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 16px; padding-bottom: 16px; }
.consent-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #C7D4CD; }
.consent-text strong { color: var(--chalk); font-size: 15px; }
.consent-text a { color: var(--form); font-weight: 700; }
.consent-choices { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 6px; color: var(--chalk); }
.consent-choices input { height: 18px; width: 18px; accent-color: var(--form); vertical-align: middle; }
.consent-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.consent .btn { min-height: 44px; }
[hidden] { display: none !important; }

@media (max-width: 600px) { .status-item:has(.status-long) { display: none; } .status-row { gap: 4px 16px; } }
@media (max-width: 440px) {
  .nav { gap: 4px 14px; font-size: 14px; }
  .brand span { font-size: 26px; }
}
@media (max-width: 700px) {
  .page { padding-top: 28px; gap: 28px; }
  .tile { border-right: 0; border-bottom: 1px solid var(--line); }
  .key-stats dd { font-size: 36px; }
  .cmp { grid-template-columns: 70px minmax(0, 1fr) 80px; }
  .score-num b { font-size: 80px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
