/* Pioneer Top 25, v2 mockups: shared foundation ("Saturday Studio", contemporary).
   Layout concept: a 12-column desktop grid with the ranking board as the anchor, a selected-team inspector beside it,
   team color confined to bounded panels and markers, and flag navy/red from the logo as the only house colors. */

:root {
  /* house colors (from the logo's flag) */
  --navy: #0b2a5b;
  --navy-ink: #071a3a;
  --red: #b3192d;
  --red-soft: #f7e3e6;

  /* neutrals, slightly cool toward the navy */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #101828;
  --ink-2: #344054;
  --meta: #5b6475;
  --rule: #dfe3ea;
  --rule-strong: #c4cad5;
  /* input boundary (WCAG 1.4.11: at least 3:1 against the surface and the page); decorative rules stay on --rule-strong */
  --field-edge: #7a8294;
  --focus: #1f5fd6;

  /* semantic (state, separate from house color) */
  --up: #12784a;
  --down: #b3192d;
  --toss: #8a5a00;
  --toss-bg: #fff4dc;

  /* the logo plate: the logo's black lettering needs a light ground in both themes */
  --plate: #ffffff;

  /* type */
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --ui: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* scale */
  --fs-xs: 0.75rem;
  --fs-s: 0.8125rem;
  --fs-m: 0.9375rem;
  --fs-l: 1.125rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3.25rem;

  --radius: 6px;
  --radius-s: 4px;
  --gap: 24px;
  --maxw: 1440px;
  --touch: 44px;
}

/* Light is the default (owner, 2026-11-04). Dark applies only when the page's Light/Dark button sets data-pnp-theme. */
:root[data-pnp-theme="dark"] {
  --navy: #8fb3ff;
  --navy-ink: #c9d8ff;
  --red: #ff7a88;
  --red-soft: #3a1820;
  --bg: #0b1120;
  --surface: #121a2c;
  --surface-2: #1a2337;
  --ink: #eef2f8;
  --ink-2: #c8d0de;
  --meta: #9aa5b8;
  --rule: #263048;
  --rule-strong: #34405c;
  --field-edge: #6f7b93;
  --focus: #8fb3ff;
  --up: #5fd39b;
  --down: #ff7a88;
  --toss: #ffcf6b;
  --toss-bg: #3a2c0c;
  --plate: #f4f6f9;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* the hidden attribute always hides, even on elements styled display:flex (e.g. a .btn) */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: var(--fs-m);
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--navy); }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
.num, .tabnum { font-variant-numeric: tabular-nums; }

/* ---- page frame ---- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 900px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; }

/* ---- parent-paper strip and masthead ---- */
.paper-strip {
  background: var(--navy-ink);
  color: #fff;
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
}
.paper-strip .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 32px; }
.paper-strip a { color: #fff; text-decoration: none; opacity: 0.85; position: relative; }
/* the strip stays slim; the link's hit area is at least 24 px tall (WCAG 2.5.8) without changing how it looks */
.paper-strip a::after { content: ""; position: absolute; inset: -4px -6px; }
.paper-strip a:hover { opacity: 1; color: #fff; }
/* the production bar, written by the build: the site's front page, then this poll, the other polls and the news as tabs.
   Owner, 2026-11-10: the first version (11 px links in the slim strip) went unseen, so this is a real navigation bar.
   Every rule is on a .ps- class: a strip without them (the mockup's, the Judge's own) keeps the slim look above. */
.paper-strip .ps-home, .paper-strip .ps-links a, .paper-strip .ps-links strong {
  display: inline-block; line-height: 42px; font-size: 0.875rem; letter-spacing: 0.01em; white-space: nowrap;
}
.paper-strip .ps-home { font-weight: 800; opacity: 1; padding-right: 8px; }
.paper-strip .ps-links {
  display: flex; min-width: 0; margin-right: auto; padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.24); overflow-x: auto; scrollbar-width: none;
}
.paper-strip .ps-links::-webkit-scrollbar { display: none; }
.paper-strip .ps-links a, .paper-strip .ps-links strong { flex: none; padding-inline: 14px; font-weight: 600; }
.paper-strip .ps-links a { opacity: 0.84; }
.paper-strip .ps-links a::after { inset: 0; }
.paper-strip .ps-links a:hover { opacity: 1; background: rgba(255, 255, 255, 0.09); }
/* the bar is navy in both themes, so the marker and the focus ring are fixed colors that read on navy */
.paper-strip .ps-links strong { font-weight: 700; box-shadow: inset 0 -3px 0 #e8384d; }
.paper-strip .ps-home:focus-visible, .paper-strip .ps-links a:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
:root[data-pnp-theme="dark"] .paper-strip, .paper-strip { background: #071a3a; }

.masthead { background: var(--surface); border-bottom: 1px solid var(--rule); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; flex-wrap: wrap; }
.logo-plate {
  display: inline-flex; align-items: center;
  background: var(--plate);
  border-radius: var(--radius);
  padding: 4px 10px;
}
.logo-plate img { display: block; height: 56px; width: auto; }
@media (max-width: 600px) { .logo-plate img { height: 40px; } }

.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a {
  display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 14px;
  font-weight: 600; font-size: var(--fs-s); letter-spacing: 0.02em; text-decoration: none; color: var(--ink-2);
  border-radius: var(--radius-s);
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--navy); box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
/* seven tabs: keep them to two rows on small phones (touch height stays 44px) */
@media (max-width: 420px) { .masthead .nav { gap: 0; } .masthead .nav a { padding: 0 8px; } }
.search {
  display: flex; align-items: center; gap: 8px; min-height: var(--touch); padding: 0 12px;
  border: 1px solid var(--field-edge); border-radius: var(--radius); background: var(--surface); color: var(--meta);
  min-width: 0;
}
.search input { border: 0; background: transparent; color: var(--ink); font: inherit; min-width: 0; width: 14ch; min-height: calc(var(--touch) - 2px); }
.search input:focus { outline: none; }
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }

/* ---- section headings ---- */
.eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--meta); }
.display { font-family: var(--display); font-weight: 700; letter-spacing: 0.01em; line-height: 1; }
.h1 { font-family: var(--display); font-weight: 700; font-size: var(--fs-3xl); line-height: 1; text-transform: uppercase; letter-spacing: 0.01em; }
.h2 { font-family: var(--display); font-weight: 700; font-size: var(--fs-xl); text-transform: uppercase; letter-spacing: 0.02em; }
.h3 { font-weight: 700; font-size: var(--fs-l); }
.dek { color: var(--ink-2); font-size: var(--fs-l); max-width: 60ch; }
.meta { color: var(--meta); font-size: var(--fs-s); }

/* ---- panels ---- */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.panel-body { padding: 16px; }

/* ---- team marks: color comes from the data pack per team (set --tc and --tc-on inline via JS-set custom properties) ---- */
.tmark {
  --tc: #888; --tc-on: #fff; --tc-edge: transparent;
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: var(--radius-s);
  background: var(--tc); color: var(--tc-on);
  box-shadow: inset 0 0 0 1px var(--tc-edge);
  font-family: var(--display); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
}
.tmark.s { width: 28px; height: 28px; font-size: 0.8rem; }
.tmark.l { width: 64px; height: 64px; font-size: 1.5rem; border-radius: var(--radius); }
.tbar { --tc: #888; display: inline-block; width: 4px; align-self: stretch; border-radius: 2px; background: var(--tc); flex: none; }

/* ---- chips and badges (state in words, never color alone) ---- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; border: 1px solid var(--rule-strong); color: var(--ink-2); white-space: nowrap; }
.chip.up { color: var(--up); border-color: currentColor; }
.chip.down { color: var(--down); border-color: currentColor; }
.chip.toss { color: var(--toss); background: var(--toss-bg); border-color: transparent; }
.chip.sim { color: var(--navy); border-color: currentColor; }
.chip.lock { background: var(--surface-2); }  /* a dated or closed state: an archived projection, a played game */

/* ---- buttons, segmented tabs ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--touch); padding: 0 16px;
  border-radius: var(--radius); border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; font-size: var(--fs-s); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: var(--surface); }
.btn.primary:hover { filter: brightness(1.1); color: var(--surface); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius); background: var(--surface-2); flex-wrap: wrap; }
.seg button, .seg a {
  min-height: var(--touch); padding: 0 14px; border: 0; border-radius: var(--radius-s); background: transparent; color: var(--ink-2);
  font: inherit; font-size: var(--fs-s); font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
}
.seg [aria-selected="true"], .seg [aria-pressed="true"], .seg [aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }

/* ---- data tables ---- */
.scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
table.data th { text-align: left; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--meta); padding: 8px 10px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.data td { padding: 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.data .r { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--rule); margin-top: 48px; padding-block: 24px 40px; color: var(--meta); font-size: var(--fs-xs); }
.foot .wrap { display: grid; gap: 8px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* footer links to the secondary pages (How it works, About) */
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--fs-s); }
.foot-links a { display: inline-flex; align-items: center; min-height: var(--touch); font-weight: 600; }
/* creator byline on every page (named for search; links to the newspaper's author page) */
.foot .byline a { font-weight: 600; }

@media (max-width: 359px) {  /* the narrowest phones: the short name and tighter tabs, so nothing hides behind a scroll */
  .paper-strip .ps-hx { display: none; }
  .paper-strip nav.ps-links a, .paper-strip nav.ps-links strong { padding-inline: 6px; }  /* nav.: outranks the phone rule below */
}

/* ---- compact phone header (B3): menu.js adds .has-menu, the label, the Menu button and the drawer ---- */
.has-menu .mast-cur, .has-menu .menu-btn { display: none; }
.masthead.has-menu .mast-drawer { display: contents; }
@media (max-width: 759px) {
  .paper-strip.has-menu .wrap { min-height: 22px; }
  /* the bar on a phone: full touch height, the front page on the left and the tabs on the right, with the short
     labels ("Football", "News"). With four or more tabs (.ps-tight, set by the build) the paper's name shortens too. */
  .paper-strip .ps-home, .paper-strip .ps-links a, .paper-strip .ps-links strong { line-height: var(--touch); font-size: 0.8125rem; }
  .paper-strip .ps-links { margin-right: 0; padding-left: 0; border-left: 0; }
  .paper-strip .ps-links a, .paper-strip .ps-links strong { padding-inline: 8px; }
  .paper-strip .ps-x, .paper-strip .ps-tight .ps-hx { display: none; }
  .paper-strip .ps-cap { text-transform: capitalize; }
  .paper-strip.has-menu { font-size: 11px; }
  .masthead.has-menu .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding-block: 6px; }
  .masthead.has-menu .logo-plate { padding: 2px 8px; }
  .masthead.has-menu .logo-plate img { height: 34px; }
  .has-menu .mast-cur {
    display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 1.15rem; letter-spacing: 0.02em; line-height: 1.2;
    border-left: 2px solid var(--red); padding-left: 10px; color: var(--ink);
  }
  .has-menu .menu-btn {
    display: inline-flex; align-items: center; gap: 6px; min-width: var(--touch); min-height: var(--touch); padding: 0 12px;
    border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
    font: inherit; font-weight: 700; font-size: var(--fs-s); cursor: pointer;
  }
  .has-menu .menu-btn:hover { background: var(--surface-2); }
  .has-menu .menu-btn svg { width: 16px; height: 16px; flex: none; }
  .masthead.has-menu .mast-drawer { display: none; grid-column: 1 / -1; gap: 8px; padding: 8px 0 12px; border-top: 1px solid var(--rule); }
  .masthead.has-menu .mast-drawer.open { display: grid; }
  .masthead.has-menu .nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; order: 0; width: auto; max-width: none; }
  .masthead.has-menu .nav a { min-height: var(--touch); padding: 0; white-space: normal; border-radius: 0; box-shadow: none; }
  .masthead.has-menu .nav a[aria-current="page"] { color: var(--navy); box-shadow: inset 3px 0 0 var(--red); padding-left: 8px; }
  .masthead.has-menu .mast-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
  .masthead.has-menu .mast-tools .search-wrap { flex: 1; min-width: 0; }
  .masthead.has-menu .mast-tools .search { display: flex; flex: 1; width: 100%; }
  .masthead.has-menu .mast-tools .search input { flex: 1; width: 100%; }
  .masthead.has-menu .mast-tools .btn { flex: none; }
  .masthead.has-menu .search-out { left: 0; right: auto; width: min(340px, calc(100vw - 32px)); }
}
