/* Server-rendered pages (predictions, match, track record, how it works): same teal kit as the live page. */
:root {
  --bg: #2a8074; --surface: #ffffff; --surface-2: #eef6f4; --line: #23786d; --border: #dcebe8;
  --text: #0f2e2a; --muted: #5b7470; --brand: #134540; --on-bg: #ffffff;
  --home: #2fa392; --draw: #134540; --away: #a8ddd4; --home-ink: #1a8a7a;
  --on-home: #04302a; --on-draw: #ffffff; --on-away: #0b3a35;
  --right: #1e7a3c; --right-bg: #dff3e5; --wrong: #b3261e; --wrong-bg: #fbe3e1;
  --bar: #1b6157;
  --fabric: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23338b7e' stroke-width='2.6'%3E%3Cpath d='M0 40 40 0M40 160 160 40M0 120 120 0M80 160 160 80'/%3E%3C/g%3E%3C/svg%3E");
  --shadow: 0 1px 0 rgba(4, 48, 42, .06), 0 10px 26px -14px rgba(4, 48, 42, .55);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg) var(--fabric) fixed; color: var(--text);
  font: 15px/1.5 "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--home-ink); }
header { position: sticky; top: 0; z-index: 5; background: var(--bar); box-shadow: 0 4px 0 #ffffff; }
.bar { max-width: 960px; margin: 0 auto; padding: 0 16px; display: flex; align-items: stretch; gap: 22px; min-height: 64px; }
.brand { display: flex; align-items: flex-start; padding-top: 6px; flex: none; }
.brand img { height: 92px; width: auto; margin-bottom: -32px; filter: drop-shadow(0 6px 10px rgba(4, 40, 35, .35)); }
header nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
header nav a {
  position: relative; display: flex; align-items: center; padding: 0 12px; white-space: nowrap;
  color: rgba(255, 255, 255, .88); text-decoration: none; font-weight: 600;
}
header nav a:hover, header nav a[aria-current] { color: #ffffff; }
header nav a[aria-current]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 4px; border-radius: 4px 4px 0 0; background: #ffffff; }
main { max-width: 960px; margin: 0 auto; padding: 44px 16px 24px; }
h1, h2, h3 { font-family: "Barlow Condensed", "Barlow", sans-serif; line-height: 1.15; }
h1 { color: var(--on-bg); font-size: 34px; margin: 8px 0 6px; }
.sub { color: var(--on-bg); font-weight: 600; margin: 0 0 16px; }
.lede { color: var(--on-bg); max-width: 760px; margin: 0 0 16px; }
.note { color: var(--on-bg); font-size: 13px; margin: 0 0 10px; }
.crumbs { color: rgba(255, 255, 255, .85); font-size: 13px; }
.crumbs a { color: #ffffff; }
.muted { color: var(--muted); font-size: 13px; }

.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.pad { padding: 18px 20px; margin: 0 0 16px; }
.pad h2 { font-size: 22px; margin: 0 0 10px; }
.pad h3 { font-size: 18px; margin: 0 0 6px; }
.pad ul { padding-left: 20px; margin: 6px 0; }

.daynav { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; }
.daynav a, .btn {
  display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 10px; text-decoration: none;
  background: var(--surface); color: var(--text); font-weight: 600; border: 1.5px solid var(--line);
}
.daynav a.live, .btn { background: var(--brand); color: #ffffff; border-color: var(--brand); }
.cta { margin: 8px 0 20px; }

.scoreboard { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.box { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 16px; min-width: 150px; }
.box small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.box b { font-family: "Barlow Condensed", sans-serif; font-size: 28px; margin-right: 6px; }
.box span { color: var(--muted); font-weight: 600; }

.league h2 { color: var(--on-bg); font-size: 19px; text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 8px; }
.games { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.games li { border-top: 1px solid var(--border); }
.games li:first-child { border-top: 0; }
.g { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 120px; gap: 12px; align-items: center; padding: 11px 16px; color: var(--text); text-decoration: none; }
a.g:hover { background: var(--surface-2); }
.g .t { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }
.g .m { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g .m b { font-weight: 600; }
.g .c { display: flex; align-items: center; gap: 6px; }
.g .c small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.g .ft { font-family: "Barlow Condensed", sans-serif; font-size: 20px; font-weight: 700; text-align: right; }
.g .pr { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.g.skip .n { grid-column: 3 / 5; color: var(--muted); font-size: 13px; text-align: right; }

.pick { display: inline-block; min-width: 34px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: 13px; text-align: center; white-space: nowrap; }
.pick.right { background: var(--right-bg); color: var(--right); border-color: var(--right); }
.pick.wrong { background: var(--wrong-bg); color: var(--wrong); border-color: var(--wrong); }
.pick.none { color: var(--muted); }

.names { display: grid; grid-template-columns: 1fr auto 1fr; font-weight: 700; margin: 0 0 6px 120px; }
.names span:nth-child(2) { color: var(--muted); }
.names span:last-child { text-align: right; }
.side { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 8px; }
.lab { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; display: flex; gap: 6px; align-items: center; }
.stack { display: flex; height: 26px; gap: 2px; border-radius: 6px; overflow: hidden; }
.seg { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; min-width: 0; }
.seg.h { background: var(--home); color: var(--on-home); }
.seg.d { background: var(--draw); color: var(--on-draw); }
.seg.a { background: var(--away); color: var(--on-away); }
.seg.hit { box-shadow: inset 0 0 0 3px #f2c94c; }
.summary { margin: 14px 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.stats div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.stats small { display: block; color: var(--muted); font-size: 12px; }
.stats b { font-family: "Barlow Condensed", sans-serif; font-size: 22px; }

.final .fs small { display: block; color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
.final .fs b { font-family: "Barlow Condensed", sans-serif; font-size: 30px; display: block; }
.final .fs span { font-weight: 700; color: var(--home-ink); }
.verdict { list-style: none; padding: 0 !important; margin: 10px 0 0 !important; }
.verdict li { margin: 4px 0; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form { display: flex; gap: 4px; margin: 6px 0; }
.f { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #ffffff; }
.f.W { background: var(--right); } .f.D { background: #7a8a87; } .f.L { background: var(--wrong); }
.formlist { list-style: none; padding: 0 !important; font-size: 13px; }

.more h2 { color: var(--on-bg); font-size: 20px; }
.more ul { columns: 2; padding-left: 18px; color: var(--on-bg); }
.more a { color: #ffffff; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--border); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; border-top: 0; }

footer { background: var(--bar); color: rgba(255, 255, 255, .9); margin-top: 24px; }
.foot { max-width: 960px; margin: 0 auto; padding: 18px 16px 26px; font-size: 13px; }
.foot a { color: #ffffff; }

@media (max-width: 640px) {
  .bar { gap: 10px; min-height: 56px; }
  .brand img { height: 72px; margin-bottom: -26px; }
  header nav a { padding: 0 8px; font-size: 14px; }
  main { padding-top: 34px; }
  h1 { font-size: 27px; }
  .g { grid-template-columns: 42px minmax(0, 1fr) auto; row-gap: 4px; padding: 10px 12px; }
  .g .m { grid-column: 2 / 4; }
  .g .c { grid-column: 2; grid-row: 2; }
  .g .ft, .g .pr { grid-column: 3; grid-row: 2; }
  .g.skip .n { grid-column: 2 / 4; text-align: left; }
  .names { margin-left: 0; font-size: 14px; }
  .side { grid-template-columns: 1fr; gap: 4px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .more ul { columns: 1; }
  .box { min-width: 0; flex: 1; padding: 8px 12px; }
  .box small { font-size: 11px; }
  .box b { display: block; font-size: 24px; }
  header nav a.live-link { display: none; }  /* the crest links to the live page */
  .daynav a.live { order: -1; flex-basis: 100%; justify-content: center; }
}

/* Visitor stats (/admin/stats): one series, so one colour; exact numbers on hover and in the table. */
.vchart { display: flex; align-items: flex-end; gap: 2px; height: 180px; border-bottom: 1.5px solid var(--border); }
.vchart { position: relative; }
.vbar { flex: 1; height: 100%; display: flex; align-items: flex-end; outline: none; }
.vbar .fill { width: 100%; background: var(--home); border-radius: 4px 4px 0 0; }
.vbar:hover .fill, .vbar:focus .fill { background: var(--brand); }
/* The readout sits in the chart's top-left corner (the oldest, emptiest days), so it never leaves the card. */
.vbar .tip {
  display: none; position: absolute; top: 0; left: 0; z-index: 2; max-width: 100%;
  background: var(--text); color: #ffffff; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px;
}
.vbar:hover .tip, .vbar:focus .tip { display: block; }
.vticks { display: flex; gap: 2px; margin: 4px 0 10px; overflow: hidden; }
.vticks span { flex: 1; min-width: 0; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: visible; }
details summary { cursor: pointer; color: var(--home-ink); font-weight: 600; margin-top: 6px; }
.two > .card { margin-bottom: 16px; }
.vticks span:last-child { direction: rtl; }  /* today's label grows leftwards, inside the card */
