/* Pyramid Index · "Night Match" brand. Tokens mirror lib/brand.rb */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/assets/Barlow-Regular-78b7dae9.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("/assets/Barlow-Medium-3493a19d.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("/assets/Barlow-SemiBold-6f8df62a.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("/assets/Barlow-Bold-09c28da4.ttf") format("truetype"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/assets/BarlowCondensed-SemiBold-b4ad243c.ttf") format("truetype"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/assets/BarlowCondensed-Bold-59da9883.ttf") format("truetype"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("/assets/BarlowCondensed-ExtraBold-b2464834.ttf") format("truetype"); }

:root {
  --ink: #0B1726; --ink2: #12233A; --ink3: #182C47; --line: #223650;
  --paper: #F5F3EE; --muted: #8A9BB0; --primary: #19B35C; --accent: #D4FF3A;
  --up: #3DDC84; --down: #FF6B5A;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 500 15px/1.45 var(--body); }
a { color: var(--paper); text-decoration-color: rgba(212,255,58,.45); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: .01em; line-height: 1.02; margin: 0 0 .4em; }
h1 { font-size: clamp(36px, 6vw, 60px); text-transform: uppercase; }
h2 { font-size: 26px; text-transform: uppercase; }
p { margin: 0 0 .8em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .strong { font-weight: 700; } .right { text-align: right; }
.accent { color: var(--accent); }
.kicker { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-size: 14px; margin-bottom: .4em; }
.lede { font-size: 18px; color: #C9D3DF; max-width: 62ch; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(11,23,38,.92); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.header-row { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.brand-word { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: .03em; }
.brand-word b { color: var(--accent); font-weight: 800; }
.brand-word.small { font-size: 18px; margin-bottom: 4px; }
.nav { flex: 1; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { text-decoration: none; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; padding: 6px 10px; border-radius: 6px; color: #C9D3DF; }
.nav-links a:hover, .nav-links a.on { color: var(--ink); background: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; color: var(--paper); font-size: 22px; }
.search input { width: 200px; }
input, select, textarea { background: var(--ink2); color: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: 500 14px var(--body); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
main.wrap { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }

/* buttons */
.btn { display: inline-block; background: var(--accent); color: var(--ink); border: 0; border-radius: 8px; padding: 10px 16px; font: 800 16px var(--display); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--ink); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.btn.danger { background: transparent; color: var(--down); box-shadow: inset 0 0 0 1.5px var(--down); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn-row, .cta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row form, form.inline { display: inline-flex; gap: 6px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 24px 0 36px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.hero h1 { font-size: clamp(48px, 8vw, 92px); }
.hero-card { background: var(--ink2); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.lsbar { display: grid; grid-template-columns: 110px 1fr 56px; gap: 10px; align-items: center; text-decoration: none; padding: 5px 0; }
.lsbar.pro .ls-name, .lsbar.pro .ls-val { color: var(--muted); }
.ls-name { font: 700 16px var(--display); text-transform: uppercase; letter-spacing: .04em; }
.ls-track { position: relative; height: 14px; background: var(--ink); border-radius: 4px; }
.ls-fill { position: absolute; top: 0; bottom: 0; background: var(--lc, var(--accent)); border-radius: 4px; }
.lsbar.pro .ls-fill { background: var(--line); }
.ls-val { font: 800 17px var(--display); text-align: right; }

/* layout */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-2.wide-left { grid-template-columns: 1.6fr 1fr; }
.grid-2.tight { gap: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 10px; flex-wrap: wrap; }
.section-head h2, .section-head h1 { margin: 0; }
.section-head a { font: 700 14px var(--display); text-transform: uppercase; letter-spacing: .08em; text-decoration: none; color: var(--accent); }
.page-head { margin-bottom: 18px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 18px; }
.stat-row > div { background: var(--ink2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; min-width: 120px; display: flex; flex-direction: column; }
.stat-row b { font: 800 30px var(--display); line-height: 1.1; }
.stat-card { background: var(--ink2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 16px 0; }
.stat-card .big { font: 800 56px var(--display); color: var(--accent); margin: 0; line-height: 1; }
.flash { background: var(--ink3); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 6px; margin: 12px 0; }
.flash.alert { border-left-color: var(--down); }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font: 700 12px var(--display); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 7px 8px; border-bottom: 1px solid rgba(34,54,80,.6); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--ink2); }
.tbl.compact td { padding: 5px 8px; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl td.rank { font: 800 18px var(--display); width: 36px; }
.tbl td.strong { font-weight: 700; }
.tbl .se { color: var(--muted); font-size: 11px; margin-left: 4px; }
.tbl .sub { color: var(--muted); font-size: 12px; }
.tbl tr.flagged { background: rgba(255,107,90,.08); }
.team-link { font-weight: 700; text-decoration: none; }
.team-link:hover { text-decoration: underline; }
.chgcol { width: 44px; }
.chg { font: 700 13px var(--display); } .chg.up { color: var(--up); } .chg.down { color: var(--down); } .chg.flat { color: var(--line); }
.pill { display: inline-block; font: 700 11px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--lc, var(--muted)); border: 1.5px solid var(--lc, var(--muted)); border-radius: 5px; padding: 1px 6px; text-decoration: none; white-space: nowrap; vertical-align: middle; }
a.pill:hover { background: var(--lc); color: var(--ink); }
.score { font: 800 17px var(--display); text-align: center; white-space: nowrap; }
.chip { display: inline-block; min-width: 22px; text-align: center; font: 800 12px var(--display); padding: 2px 6px; border-radius: 4px; background: var(--ink3); color: var(--paper); }
.chip-w { background: var(--primary); color: var(--ink); } .chip-l { background: var(--down); color: var(--ink); } .chip-d { background: var(--line); }
.pager { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 14px; }
.pager a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font: 700 14px var(--display); }
.pager a.on { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.show-sm { display: none; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.inline-filters { display: flex; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }

/* fixtures & predictions */
.fixtures { display: grid; gap: 8px; }
.fixture { background: var(--ink2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.fx-meta { display: flex; justify-content: space-between; color: var(--muted); font: 700 12px var(--display); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.fx-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.fx-away { text-align: right; }
.fx-xg { font: 800 15px var(--display); color: var(--muted); }
.fx-probs { display: flex; justify-content: space-between; font: 700 13px var(--display); margin-top: 4px; }
.probbar { display: flex; height: 8px; gap: 2px; border-radius: 4px; overflow: hidden; }
.probbar span { display: block; height: 100%; }
.probbar .ph { background: var(--accent); } .probbar .pd { background: var(--muted); } .probbar .pa { background: var(--primary); }
.predictor { display: grid; grid-template-columns: 1fr 180px 1fr auto; gap: 10px; align-items: end; margin-bottom: 20px; }
.predictor label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.prediction-card { background: var(--ink2); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.pc-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-bottom: 16px; }
.pc-teams h2 { font-size: 30px; margin: 4px 0; }
.pc-score { display: flex; align-items: center; gap: 14px; font: 800 56px var(--display); color: var(--accent); }
.pc-score small { font: 700 11px var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.pc-probs { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin: 10px 0; }
.pc-probs b { display: block; font: 800 34px var(--display); } .pc-probs span { color: var(--muted); font-size: 13px; }
.prediction-card .probbar { height: 14px; }

/* team page */
.team-head { display: flex; gap: 18px; align-items: center; }
.crest { width: 84px; height: 84px; flex: none; border-radius: 18px; background: var(--ink2); border: 2px solid var(--lc); display: grid; place-items: center; font: 800 30px var(--display); color: var(--lc); overflow: hidden; }
.crest img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.links a { margin-right: 12px; }
.chart { width: 100%; height: auto; background: var(--ink2); border-radius: var(--radius); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart .dot { fill: var(--accent); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font: 600 11px var(--body); }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.movers li { padding: 5px 0; border-bottom: 1px solid var(--line); }

/* prose + forms */
.prose { max-width: 760px; }
.prose p, .prose li { color: #D6DDE6; font-size: 16px; }
.prose h2 { margin-top: 1.4em; }
.stack { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.form label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.hp { position: absolute; left: -9999px; }
.narrow { width: 90px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 20px; }
.footer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; align-content: flex-start; }
.footer-row > p { grid-column: 1 / -1; }

/* admin */
body.admin .brand-word { color: var(--accent); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 14px 0; }
.post-card { background: var(--ink2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.post-card img, .slides img { width: 100%; border-radius: 8px; display: block; margin: 8px 0; }
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.post-card.status-approved { border-color: var(--primary); } .post-card.status-failed { border-color: var(--down); }
pre.caption, pre.log { white-space: pre-wrap; background: var(--ink2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font: 500 13px/1.5 var(--body); max-height: 520px; overflow: auto; }
pre.log { font-family: ui-monospace, monospace; font-size: 12px; }
.checklist li { margin: 6px 0; }

@media (max-width: 860px) {
  .hero, .grid-2, .grid-2.wide-left, .footer-row { grid-template-columns: 1fr; }
  .predictor { grid-template-columns: 1fr; }
  .pc-teams { grid-template-columns: 1fr; text-align: center; } .pc-teams .right { text-align: center; } .pc-score { justify-content: center; }
  .search { display: none; }
  .nav { display: flex; justify-content: flex-end; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--ink); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px; }
  .nav-links.open { display: flex; }
  .hide-sm { display: none; } .show-sm { display: inline; }
  .stat-row > div { min-width: calc(50% - 5px); flex: 1; }
}
