/* Brakets EPL - Stats & Predictions Pool - shared design system.
   Applies the Brakets EPL brand kit: bright chalk/white light theme, ink text,
   lime primary action, cyan info, coral live/critical, plum editorial accent.
   Type: Barlow Condensed (display) / Manrope (UI) / IBM Plex Mono (data).
   Independent fan project - no league/club marks used. */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@500;600;700&display=swap');
:root {
  /* Brakets EPL palette */
  --chalk: #F8F7F2;        /* default page frame */
  --white: #FFFFFF;        /* dense tables + elevated panels */
  --panel: #F1F3F5;        /* quiet editorial surface */
  --pale-blue: #DCE8EF;    /* cool editorial surface */
  --ink: #111624;          /* primary text + headings */
  --ink-2: #515B70;        /* secondary text */
  --muted: #6E788C;        /* muted labels */
  --line: rgba(17,22,36,.14);
  --line-2: #E6E4DC;       /* solid hairline where needed */
  --lime: #A7D821;         /* accessible light-theme lime (primary / selected) */
  --lime-press: #93c015;
  --lime-ink: #26310A;     /* text on lime */
  --green-ink: #37670A;    /* positive + "EPL" accent text on light */
  --cyan: #45D9FF;         /* focus + accent on dark */
  --cyan-ink: #008DB3;     /* links / info text on light */
  --coral: #FF5664;        /* live / critical accent */
  --coral-ink: #D92E42;    /* danger / negative text on light */
  --plum: #452467;         /* editorial accent, used sparingly */
  --ink-950: #080B14;      /* dark surface (optional) */
  --shadow: 0 1px 2px rgba(8,11,20,.05), 0 12px 34px rgba(8,11,20,.07);
  /* legacy aliases so existing rules + page classes keep working */
  --paper: var(--chalk); --paper-2: var(--panel); --card: var(--white);
  --graphite: var(--ink); --gray: var(--ink-2);
  --good: var(--green-ink); --up: var(--green-ink);
  --bad: var(--coral-ink); --down: var(--coral-ink);
  --red: var(--coral-ink); --red-dark: #b3243a;
  --gold: var(--lime); --black: var(--ink); --hero-tint: var(--plum);
  --head: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Manrope", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--chalk);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .h { font-family: var(--display); font-weight: 700; letter-spacing: 0; line-height: 1.08; margin: 0 0 .4em; color: var(--ink); }
h1 { font-size: 34px; font-weight: 800; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
a { color: var(--cyan-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .small { font-size: 13px; }

/* eyebrow / kicker */
.kicker, .eyebrow { font-family: var(--body); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--plum); }

/* masthead - light, product mark + wordmark, lime underline on active nav */
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 16px; max-width: 1200px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; font-family: var(--display); font-weight: 800; font-size: 26px; color: var(--ink); text-decoration: none; letter-spacing: -.5px; line-height: 1; }
.brand:hover { text-decoration: none; }
.brand .wm { border-bottom: 3px solid var(--lime); padding-bottom: 2px; }
.brand .wm b { font-weight: 800; color: var(--ink); }
.brand .wm i { font-style: normal; color: var(--green-ink); }
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); padding: 8px 10px; font-family: var(--body); font-weight: 700; font-size: 14px; border-bottom: 3px solid transparent; }
.nav a .navi { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--ink); border-bottom-color: var(--lime); }

.container { max-width: 1040px; margin: 0 auto; padding: 22px 16px 72px; }

/* home hero: contained band, page art + chalk scrim, copy on the left */
.hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 18px; margin: 0 0 20px; min-height: clamp(300px, 42vh, 440px); display: flex; align-items: center; background: var(--chalk); border: 1px solid var(--line); }
.hero__art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 66% center; }
.hero__scrim { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #F8F7F2 0%, rgba(248,247,242,.92) 27%, rgba(248,247,242,.5) 55%, rgba(248,247,242,.08) 80%), linear-gradient(0deg, rgba(248,247,242,.72) 0%, transparent 30%); }
.hero__content { padding: 30px 26px; max-width: 56%; }
.hero__content .eyebrow { color: var(--plum); }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 5.2vw, 52px); line-height: 1.0; margin: 8px 0 0; color: var(--ink); }
.hero p { color: var(--ink-2); max-width: 34em; margin-top: 12px; font-size: 16px; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: url("pressure-lines.svg") center / cover no-repeat; opacity: .08; pointer-events: none; }
.hero--season { min-height: clamp(210px, 28vh, 300px); }
.hero--season .hero__art { object-position: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 18px; margin: 0 0 18px; }
.card.accent { border-left: 4px solid var(--lime); }
.card h2 { margin-top: 0; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.col { flex: 1 1 280px; }
.muted { color: var(--muted); }
.hint { color: var(--ink-2); font-size: 15px; }
.center { text-align: center; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--body); font-weight: 800; font-size: 15px; color: var(--lime-ink); background: var(--lime); border: 1px solid var(--lime); border-radius: 8px; padding: 10px 16px; cursor: pointer; letter-spacing: .01em; }
.btn:hover { background: var(--lime-press); border-color: var(--lime-press); }
.btn.ghost { background: var(--white); color: var(--ink); border: 1px solid var(--line); font-weight: 700; }
.btn.ghost:hover { background: var(--panel); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 7px 12px; font-size: 14px; }
input, select { font-family: var(--body); font-size: 16px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; width: 100%; }
input:focus, select:focus { outline: 3px solid var(--cyan); outline-offset: 2px; border-color: var(--cyan-ink); }
label { display: block; font-weight: 700; font-size: 14px; margin: 0 0 5px; color: var(--ink); }
.field { margin: 0 0 12px; }

/* pills, badges, chips */
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--panel); color: var(--ink-2); }
.pill.red { background: #FDE7EA; color: var(--coral-ink); }
.pill.good { background: #EEF7D3; color: var(--green-ink); }
/* team crest placeholder - a logo glyph (real crests arrive from the feed) */
.crest { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 12px; color: #fff; flex: 0 0 auto; }
/* real club crest image (from the feed); falls back to the letter badge on error */
.crest-img { position: relative; overflow: hidden; }
.crest-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; opacity: 0; }
.crest-img img.ok { opacity: 1; }
.team { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }

/* tables */
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid th { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border-bottom: 2px solid var(--line); }
table.grid td.l, table.grid th.l { text-align: left; }
table.grid tr:last-child td { border-bottom: 0; }
.tablewrap { overflow-x: auto; }
.rankcell { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* movement */
.move { font-family: var(--mono); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.move.up { color: var(--green-ink); }
.move.down { color: var(--coral-ink); }
.move.flat { color: var(--muted); }

/* score stepper (weekly picks) */
.fixture { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fixture:last-child { border-bottom: 0; }
.fixture .side { display: flex; align-items: center; gap: 8px; }
.fixture .side.away { justify-content: flex-end; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--panel); }
.stepper .val { min-width: 26px; text-align: center; font-family: var(--mono); font-weight: 700; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.scoreline { display: flex; align-items: center; gap: 10px; justify-content: center; }
.scoreline .sep { color: var(--muted); font-weight: 800; }
.locked { opacity: .62; }
.outcome-tag { font-size: 13px; font-weight: 800; padding: 3px 9px; border-radius: 6px; background: var(--panel); color: var(--ink-2); }
.outcome-tag.H { background: #E1F4FB; color: var(--cyan-ink); }
.outcome-tag.A { background: #FDE7EA; color: var(--coral-ink); }
.outcome-tag.D { background: var(--panel); color: var(--ink-2); }

/* ranking list (table prediction) */
.ranklist { list-style: none; margin: 0; padding: 0; }
.ranklist li { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 6px; background: var(--white); }
.ranklist li .pos { font-family: var(--mono); font-weight: 700; font-size: 15px; width: 26px; text-align: center; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ranklist li .grow { flex: 1; }
.ranklist .arrows { display: flex; flex-direction: column; gap: 2px; }
.ranklist .arrows button { width: 30px; height: 22px; padding: 0; border: 1px solid var(--line); background: var(--white); border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ranklist .arrows button:hover { background: var(--panel); }
.ranklist .arrows svg { width: 12px; height: 12px; }

/* banners */
.banner { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-size: 14px; }
.banner.info { background: var(--pale-blue); color: #0f5b72; border: 1px solid #c3dae6; }
.banner.warn { background: #FDF3D6; color: #7a5a06; border: 1px solid #f0e2b0; }
.banner.ok { background: #EEF7D3; color: var(--green-ink); border: 1px solid #d8eab0; }

/* stat tiles - key numbers in mono ink, plain label */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.tile .n { font-family: var(--mono); font-weight: 700; font-size: 32px; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.tile .k { font-size: 14px; color: var(--ink-2); margin-top: 6px; }

.footer { max-width: 1040px; margin: 0 auto; padding: 24px 16px 40px; color: var(--muted); font-size: 13px; }
.footer a { color: var(--ink-2); }
.split-halves { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) {
  h1 { font-size: 28px; }
  .split-halves { grid-template-columns: 1fr; }
  .hero__content { max-width: 100%; }
  .hero__art { object-position: 72% center; }
  .hero__scrim { background: linear-gradient(0deg, #F8F7F2 12%, rgba(248,247,242,.82) 48%, rgba(248,247,242,.08) 84%); }
}
