/* Barlow (OFL, fonts/OFL.txt), served from this site: no requests to font CDNs. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }

/* Colours follow the CFS banner: neon cyan on near-black with a blue tint.
   Team colours stay red (Sith) and blue (Jedi). */
:root {
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --bg: #060a0e;
  --panel: #0c141b;
  --line: #182833;
  --line-strong: #27404e;
  --text: #eaf4f8;
  --muted: #9db2bd;
  --accent: #1ec8f0;
  --accent-deep: #0b5c74;
  --sith: #e5484d;
  --jedi: #3b82f6;
  --gold: #e8b33c;
  --silver: #c3cad6;
  --bronze: #cf8f5a;
  --chip-bg: #3a2f12;
  --hoodie: #7dd87d;
  --hoodie-bg: #1f2a1f;
  --radius: 3px;
  --gutter: 24px;
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.sith { color: var(--sith); }
.jedi { color: var(--jedi); }

/* One grid for header, content and footer */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Header */
.top {
  border-bottom: 2px solid var(--accent);
  background: linear-gradient(180deg, #0b1d26, var(--bg));
}
.top h1 .vs { color: var(--muted); font-weight: 600; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand .logo { flex: none; width: 56px; height: 56px; object-fit: contain;
               filter: drop-shadow(0 0 10px rgba(30, 200, 240, 0.35)); }
@media (max-width: 520px) { .brand .logo { width: 44px; height: 44px; } }
.top-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.top h1 {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 28px;
  line-height: 1.2;
}
.status {
  padding: 2px 10px;
  border-radius: 2px;
  background: var(--chip-bg);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}
.sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs a {
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}
.tabs a.active { background: var(--panel); color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.tabs a:hover { color: var(--text); }

main.wrap { padding-top: 24px; padding-bottom: 8px; }
.foot { padding-top: 8px; padding-bottom: 24px; color: var(--muted); font-size: 13px; text-align: center; }

.emblem { width: 1.1em; height: 1.1em; vertical-align: -0.15em; flex: none; }

/* Panels and tables */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.panel.team-sith { border-top: 3px solid var(--sith); }
.panel.team-jedi { border-top: 3px solid var(--jedi); }
.panel h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 19px;
}
.columns { display: grid; gap: 16px; grid-template-columns: 1fr; }
.columns > .panel { min-width: 0; }
.columns + .panel, .panel + .columns { margin-top: 16px; }
@media (min-width: 860px) { .columns { grid-template-columns: 1fr 1fr; } }

.note { margin: -4px 0 12px; color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); font-size: 15px; margin: 4px 0; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 13px; font-weight: 600; }
td.name { white-space: normal; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.pts { font-weight: 700; }
td.minor, .minor { color: var(--muted); }
td.rank { width: 2.2em; color: var(--muted); font-variant-numeric: tabular-nums; }
td.rank.r1 { color: var(--gold); font-weight: 700; }
td.rank.r2 { color: var(--silver); font-weight: 700; }
td.rank.r3 { color: var(--bronze); font-weight: 700; }
tr.top3 td.name { font-weight: 600; }
tr.tier-end td { border-bottom: 2px solid var(--line-strong); }

/* Scoreboard */
.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px 16px;
  margin-bottom: 20px;
}
.team { display: flex; flex-direction: column; gap: 2px; }
.team.jedi { align-items: flex-end; }
.team .name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.team .pts { color: var(--text); font-size: clamp(44px, 9vw, 76px); font-weight: 800; line-height: 1; }
.lead { display: flex; flex-direction: column; align-items: center; padding-bottom: 6px; text-align: center; }
.lead-label { color: var(--muted); font-size: 15px; font-weight: 600; }
.lead-value { font-size: clamp(26px, 4vw, 34px); font-weight: 800; line-height: 1.1; }
.bar {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  height: 12px;
  border-radius: 6px;
  background: var(--line);
}
.bar span:first-child { border-radius: 6px 0 0 6px; }
.bar span:last-of-type { border-radius: 0 6px 6px 0; }
.bar .sith { background: var(--sith); }
.bar .jedi { background: var(--jedi); }
.bar .mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text); }

/* Feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.feed time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.feed b { font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dot.sith { background: var(--sith); }
.dot.jedi { background: var(--jedi); }
@media (max-width: 520px) {
  .feed li { grid-template-columns: auto 1fr auto; }
  .feed time { grid-column: 1 / -1; }
}

/* Dashboard: compact score and highlights; the big slide is for #present */
.score-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 600;
}
.score-strip > span { display: flex; align-items: center; gap: 6px; }
.score-strip b { color: var(--text); font-size: 28px; }
.score-strip .lead-mini { color: var(--muted); font-size: 15px; }
.score-strip .lead-mini b { font-size: 18px; }

.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.fact {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.fact.sith { border-left-color: var(--sith); }
.fact.jedi { border-left-color: var(--jedi); }
.fact h3 { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.fact .value { margin: 4px 0 2px; color: var(--text); font-size: 24px; font-weight: 800; line-height: 1.2; }
.fact .detail { margin: 0; color: var(--muted); font-size: 14px; }

.present-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.present-row button {
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
code { font-size: 13px; }

.slide { display: none; }
body.presenting > :not(.slide):not(script) { display: none !important; }
body.presenting .slide {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5vh;
  padding: 6vh 6vw;
  text-align: center;
  background: radial-gradient(circle at 15% 20%, #2a1416, transparent 55%),
              radial-gradient(circle at 85% 80%, #0b2a3a, transparent 55%), var(--bg);
  border-top: 4px solid var(--accent);
}
.slide .slide-logo { position: absolute; top: 3vh; left: 3vw; width: min(8vw, 13vh);
                     filter: drop-shadow(0 0 14px rgba(30, 200, 240, 0.4)); }
.slide-score { display: flex; gap: 4vw; font-size: min(3.2vw, 5.5vh); font-weight: 700; }
.slide-score > span { display: flex; align-items: center; gap: 0.4em; }
.slide h3 { margin: 4vh 0 0; color: var(--muted); font-size: min(2.4vw, 4vh); letter-spacing: 0.08em; text-transform: uppercase; }
.slide .value { margin: 0; font-size: min(9vw, 16vh); font-weight: 800; line-height: 1.05; }
.slide .detail { margin: 0; color: var(--muted); font-size: min(3vw, 5vh); }
.slide .dots { display: flex; gap: 8px; margin-top: 4vh; }
.slide .dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.slide .dots span.on { background: var(--text); }
.slide .exit { position: absolute; top: 2vh; right: 2vw; margin: 0; color: var(--muted); font-size: 13px; opacity: 0.7; }

/* Draft */
.draft-head { margin-bottom: 16px; }
.draft-status { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.draft-head .note { margin: 0; }
.draft-list { margin: 0; padding-left: 1.6em; font-size: 16px; columns: 2; column-gap: 24px; }
.draft-list li { padding: 3px 0; break-inside: avoid; }
.draft-list li::marker { color: var(--muted); }
.draft-list .captain { font-weight: 700; }
@media (max-width: 520px) { .draft-list { columns: 1; } }

.pool-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.pool-head h2 { margin: 0; }
#pool-search {
  min-width: 0;
  width: 240px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.pool-head + .note { margin: 10px 0; min-height: 1em; }
.pool { display: flex; flex-wrap: wrap; gap: 8px; }
.pool-player {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
button.pool-player { border-color: var(--accent); cursor: pointer; }
button.pool-player:hover { background: var(--accent-deep); }
button.pool-player:disabled { opacity: 0.5; cursor: wait; }
.chip.sith { background: #3a1517; color: var(--sith); }
.chip.jedi { background: #12233f; color: var(--jedi); }

/* Bounty board */
.bounty-board { margin-top: 16px; border-top: 3px solid var(--gold); }
.bounty-board h2 .minor { font-size: 14px; font-weight: 500; }
.bounty-board h3 { margin: 0 0 6px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.bounty-board .columns { gap: 8px 24px; }
.bounty-list { margin: 0; padding: 0; list-style: none; }
.bounty-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 7px 0;
                  border-bottom: 1px solid var(--line); font-size: 15px; }
.bounty-list .target { color: var(--gold); }
.bounty-list .minor { font-size: 13px; margin-left: auto; }

/* Duels */
.duel-rules p { margin: 0; font-size: 15px; }
.duel-rules code, .present-row code { color: var(--accent); }
.duel-list { margin: 0; padding: 0; list-style: none; }
.duel-list li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.duel-list .minor { display: block; font-size: 13px; }
.duel-log li { grid-template-columns: auto 1fr; }
.panel + .panel, .columns + .panel { margin-top: 16px; }
.columns > .panel + .panel { margin-top: 0; }
.fates { border-top: 3px solid var(--accent); }
.fates h3 { margin: 4px 0 2px; font-size: 16px; }
.fates p.minor { margin: 0 0 10px; font-size: 14px; }
.lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lineups ol { margin: 0; padding-left: 1.4em; font-size: 15px; }
.lineups ol.sith li::marker { color: var(--sith); }
.lineups ol.jedi li::marker { color: var(--jedi); }
.lineups ol li { color: var(--text); }
table.pairs td { padding: 4px 8px; }

/* Info: the event at a glance (same content as the one-pager) */
#info .panel p, #info .panel li { font-size: 15px; }
#info .panel ul, #info .panel ol { margin: 0 0 10px; padding-left: 1.3em; }
#info .panel li { margin: 4px 0; }
#info .panel p { margin: 0 0 10px; }
#info a { color: var(--accent); }
#info code { color: var(--accent); }
.accent { color: var(--accent); }
.info-draft { border: 1px solid var(--accent); }
.info-when { font-size: 22px !important; }
.info-when b { font-size: 26px; margin-right: 8px; }
.info-join { padding: 10px 14px; border-radius: var(--radius); background: #0f2f3c; font-weight: 700; }
.info-captains { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 12px 0; text-align: center; }
.info-captains > div { padding: 10px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.info-captains .team-sith { border-color: var(--sith); }
.info-captains .team-jedi { border-color: var(--jedi); }
.info-captains b { display: block; font-size: 22px; }
.info-captains span { color: var(--muted); font-size: 13px; }
.columns + .columns { margin-top: 16px; }
.info-betrayal h2 { justify-content: center; }
.info-betrayal { text-align: center; background: linear-gradient(90deg, #3a1517, var(--panel) 50%, #12233f); }
.info-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.info-tiers div { padding: 10px; border-radius: var(--radius); background: var(--bg); text-align: center; }
.info-tiers span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.info-tiers b { color: var(--gold); font-size: 18px; }
.info-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.info-timeline b { display: block; font-size: 18px; }
.info-timeline span { color: var(--muted); font-size: 13px; }
@media (max-width: 520px) {
  .info-tiers, .info-timeline { grid-template-columns: 1fr; }
}

/* Winnings */
.hoodie-prize {
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0f2f3c, var(--panel));
  font-size: 16px;
}
.hoodie-prize b { color: var(--accent); font-size: 18px; text-transform: uppercase; }
.hoodie-prize img { width: 32px; height: 32px; vertical-align: -9px; margin-right: 4px; }
.prizes td { white-space: normal; }
.prizes td:first-child { width: 40%; color: var(--muted); }
td.prize { white-space: nowrap; }
.badge {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 9px;
  border-radius: 2px;
  background: var(--chip-bg);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}
.badge.hoodie { background: var(--hoodie-bg); color: var(--hoodie); }
.chip {
  padding: 2px 10px;
  border-radius: 2px;
  background: var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

/* ── Design layer: consulting-style restraint over gaming glow ────────────────
   Condensed uppercase display type, a short accent rule above every heading,
   underlined navigation, square rectangular buttons with an arrow, thin lines,
   no glows. Everything above keeps the layout; this decides the look. */

h1, h2, h3, .team .pts, .lead-value, .score-strip b, .fact .value, .slide .value,
.slide-score, .draft-status, .info-when b, .info-captains b, .info-tiers b, .info-timeline b {
  font-family: var(--display);
}
.top h1 { font-size: 32px; font-weight: 700; letter-spacing: 0.01em; text-transform: uppercase; }
.top { border-bottom: 1px solid var(--line-strong); background: var(--bg); box-shadow: inset 0 -2px 0 var(--accent); }
.brand .logo { filter: none; }
.sub { letter-spacing: 0.02em; }

/* Navigation: uppercase labels, underline for the current tab */
.tabs { gap: 0 26px; }
.tabs a {
  padding: 10px 0 8px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tabs a.active { background: none; box-shadow: none; color: var(--text); border-bottom-color: var(--accent); }
.tabs a:hover { color: var(--text); border-bottom-color: var(--line-strong); }

/* Headings: a short accent rule above, condensed uppercase type */
.panel h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.panel h2::before {
  content: "";
  flex-basis: 100%;
  width: 28px;
  max-width: 28px;
  height: 3px;
  margin-bottom: 8px;
  background: var(--accent);
}
.panel h2 .minor, .panel h2 .chip { font-family: "Barlow", sans-serif; text-transform: none; letter-spacing: 0; }
.panel.team-sith h2::before { background: var(--sith); }
.panel.team-jedi h2::before { background: var(--jedi); }
.bounty-board h2::before { background: var(--gold); }

/* Panels: thin frame, team colour as a hairline on top */
.panel { border-color: var(--line); }
.panel.team-sith { border-top: 2px solid var(--sith); }
.panel.team-jedi { border-top: 2px solid var(--jedi); }
.bounty-board, .fates { border-top-width: 2px; }
.fact { border-left-width: 2px; }
th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

/* Scores: big condensed numbers, a crisp square bar */
.team .pts { font-weight: 700; letter-spacing: -0.01em; }
.team .name { font-size: 13px; letter-spacing: 0.14em; }
.bar, .bar span:first-child, .bar span:last-of-type { border-radius: 0; }
.bar { height: 8px; }
.dot { border-radius: 0; width: 8px; height: 8px; }

/* Buttons: rectangular, filled, uppercase, with an arrow */
.present-row button, button.pool-player {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: #04131a;
  font-family: "Barlow", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.present-row button::after, button.pool-player::after { content: "→"; font-size: 15px; letter-spacing: 0; }
.present-row button:hover, button.pool-player:hover { background: transparent; color: var(--accent); }
span.pool-player { border-radius: 0; font-size: 14px; }
#pool-search { border-radius: 0; }

/* Labels and badges: square, small caps feel */
.badge, .chip, .status { border-radius: 0; letter-spacing: 0.04em; }
.status { text-transform: uppercase; font-size: 11px; padding: 3px 8px; }

/* Calmer accents */
.hoodie-prize, .info-join { background: #0d1f28; }
.info-betrayal { background: linear-gradient(90deg, #2a1214, var(--panel) 45%, var(--panel) 55%, #0f1d33); }
.slide { border-top-width: 3px; }
.slide .slide-logo { filter: none; }
body.presenting .slide { background: var(--bg); }

/* Footer only carries notices now */
.foot:empty { display: none; }
.bounty-table .target { color: var(--gold); font-weight: 600; }
.bounty-table tr.claimed td.name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
@media (max-width: 520px) { .bounty-table td { white-space: normal; } .bounty-table b { white-space: nowrap; } }
/* Pool players: outlined so a full pool stays calm; filled on hover */
button.pool-player { background: transparent; color: var(--text); padding: 7px 14px; letter-spacing: 0.04em; text-transform: none; font-size: 14px; }
button.pool-player::after { content: none; }
button.pool-player:hover { background: var(--accent); color: #04131a; }
