/* Roastadium — Brutalism design system (TypeUI "Brutalism Design System").
 *
 * Tokens are bound from the design-system skill files (.agents/skills/
 * typeui-design-system): colors.md, typography.md, borders.md, shadows.md,
 * radius.md, layout.md, buttons.md, cards.md, inputs.md. This is a server-
 * rendered Jinja app, so the tokens live as CSS custom properties rather than
 * Tailwind classes.
 *
 * Ink (borders + hard-offset shadows + heading) is one source of truth: black
 * in light mode per the spec; it inverts to white for neutral chrome in dark
 * mode so the brutalist offsets stay visible. Vivid section blocks are always
 * light, so they pin ink back to black locally for correct contrast.
 */

@import url("https://fonts.googleapis.com/css2?family=Darker+Grotesque:wght@400;500;600;700;800;900&display=swap");

:root {
  /* Neutral surfaces */
  --bg: #FFFFFF;            /* neutral-primary-soft */
  --bg-warm: #F5F0E6;       /* neutral-secondary */
  --surface: #FFFFFF;       /* card background */
  --ink: #000000;           /* border-default + shadow + heading */
  --text: #1A1A1A;          /* body */
  --text-subtle: #3A3A3A;   /* body-subtle */

  /* Brand */
  --brand: #DAA346;
  --brand-strong: #B8862E;
  --brand-softer: #FEF5E5;

  /* Status */
  --danger: #DD644E;
  --danger-soft: #FFE4E6;
  --danger-strong: #C4503C;
  --success: #16A34A;
  --success-soft: #D1FAE5;
  --success-strong: #15803D;

  /* Vivid section palette (same both modes) */
  --section-cyan: #A6FAFF;
  --section-purple: #A388EE;
  --section-green: #7CDB8A;
  --section-pink: #FF99C8;
  --section-yellow: #FFD166;
  --section-brand: #DAA346;

  /* Disabled */
  --disabled: #E5E5E5;
  --fg-disabled: #9CA3AF;

  /* Geometry */
  --radius: 6px;
  --radius-sm: 4px;
  --radius-pill: 9999px;
  --bw: 2px;
  --bw-emph: 3px;

  /* Hard-offset shadows (no blur), keyed off ink */
  --shadow-xs: 2px 2px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-md: 4px 4px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);
  --shadow-xl: 8px 8px 0 var(--ink);

  /* Layout */
  --container: 1152px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0A0A;
    --bg-warm: #000000;
    --surface: #1A1A1A;
    --ink: #FFFFFF;
    --text: #E5E5E5;
    --text-subtle: #CCCCCC;
    --brand-strong: #E8BC6A;
    --brand-softer: #3A2B0F;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Darker Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* -- Typography (typography.md) ------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 16px;
}
h1 { font-size: 36px; letter-spacing: -1px; }
h2 { font-size: 30px; letter-spacing: -0.5px; }
h3 { font-size: 24px; }
h4 { font-size: 22px; }
h5 { font-size: 20px; }
h6 { font-size: 18px; }

@media (min-width: 768px) {
  h1 { font-size: 44px; } h2 { font-size: 36px; } h3 { font-size: 30px; }
  h4 { font-size: 26px; } h5 { font-size: 22px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 64px; line-height: 0.95; } h2 { font-size: 48px; }
  h3 { font-size: 36px; } h4 { font-size: 30px; } h5 { font-size: 24px; }
}

p { margin: 0 0 16px; max-width: 65ch; }
.lead { font-size: 22px; line-height: 1.6; max-width: 60ch; }
.small { font-size: 15px; line-height: 1.6; color: var(--text-subtle); }

a { color: var(--brand-strong); font-weight: 700; text-decoration: underline; }
a:hover { text-decoration: none; }

strong { font-weight: 800; }

/* -- Header / footer chrome ---------------------------------------------- */

header.site {
  border-bottom: var(--bw) solid var(--ink);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
header.site .bar {
  max-width: var(--container); margin: 0 auto;
  padding: 16px 24px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}
.brand {
  font-weight: 900; font-size: 26px; letter-spacing: -0.5px;
  color: var(--ink); text-decoration: none; text-transform: uppercase;
}
.brand .spark { color: var(--brand-strong); }
.brand:hover { text-decoration: none; }
nav.site-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

footer.site {
  border-top: var(--bw) solid var(--ink);
  background: var(--bg-warm);
}
footer.site .bar {
  max-width: var(--container); margin: 0 auto; padding: 32px 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
footer.site .small { color: var(--text-subtle); margin: 0; }

/* -- Layout primitives (layout.md) --------------------------------------- */

.section { padding: 64px 0; border-bottom: var(--bw) solid var(--ink); }
@media (min-width: 768px) { .section { padding: 96px 0; } }
.section:last-of-type { border-bottom: 0; }
.section--white { background: var(--bg); }
.section--warm  { background: var(--bg-warm); }
/* Vivid sections are always light → pin ink black AND keep nested surfaces
 * white with dark text in both modes, so cards stay high-contrast on color
 * (layout.md: cards in colored sections keep white backgrounds). */
.section--cyan, .section--purple, .section--green, .section--pink, .section--yellow, .section--brand {
  --ink: #000000; --surface: #FFFFFF; --text: #1A1A1A; --text-subtle: #3A3A3A;
  --bg-warm: #FFFFFF; color: #1A1A1A;
}
.section--cyan   { background: var(--section-cyan); }
.section--purple { background: var(--section-purple); }
.section--green  { background: var(--section-green); }
.section--pink   { background: var(--section-pink); }
.section--yellow { background: var(--section-yellow); }
.section--brand  { background: var(--section-brand); }
.section--cyan h1, .section--cyan h2, .section--cyan h3,
.section--purple h1, .section--purple h2, .section--purple h3,
.section--green h1, .section--green h2, .section--green h3,
.section--pink h1, .section--pink h2, .section--pink h3,
.section--yellow h1, .section--yellow h2, .section--yellow h3,
.section--brand h1, .section--brand h2, .section--brand h3 { color: #000; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.section-head { margin-bottom: 48px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 16px;
  background: var(--ink); color: var(--bg); padding: 4px 10px;
  border: var(--bw) solid var(--ink); border-radius: var(--radius-sm);
}
.stack > * + * { margin-top: 16px; }
.center { text-align: center; }
.center p, .center .lead { margin-left: auto; margin-right: auto; }

/* Grids */
.grid { display: grid; gap: 24px; }
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* -- Cards (cards.md) ----------------------------------------------------- */

.card {
  display: block; background: var(--surface); color: var(--text);
  border: var(--bw) solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 24px;
}
a.card { text-decoration: none; transition: box-shadow .15s linear, transform .15s linear; }
a.card:hover { box-shadow: var(--shadow-xl); transform: translate(-2px, -2px); text-decoration: none; }
.card h3, .card h4 { margin-top: 0; }
.card .wk { font-weight: 800; color: var(--brand-strong); }
.card .teaser { color: var(--text-subtle); font-size: 16px; margin: 8px 0 0; }
.card .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; font-weight: 900; font-size: 20px;
  background: var(--brand); color: #000; border: var(--bw) solid #000;
  border-radius: var(--radius); box-shadow: var(--shadow-xs); margin-bottom: 16px;
}

/* -- Buttons (buttons.md) ------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 16px;
  padding: 12px 20px; border: var(--bw) solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
  text-decoration: none; box-sizing: border-box;
  transition: background-color .15s linear, box-shadow .15s linear, transform .15s linear;
}
.btn:hover { box-shadow: var(--shadow-sm); transform: translate(-1px, -1px); text-decoration: none; }
.btn:active { box-shadow: var(--shadow-xs); transform: translate(0, 0); }
.btn-lg { font-size: 18px; padding: 14px 24px; }
.btn-brand { background: var(--brand); color: #000; }
.btn-brand:hover { background: var(--brand-strong); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn-ghost:hover { background: var(--bg-warm); box-shadow: none; transform: none; }
.btn:focus-visible { outline: 4px solid var(--brand); outline-offset: 2px; }
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; }
.center .btn-row { justify-content: center; }

/* -- Forms (inputs.md) ---------------------------------------------------- */

.field { margin: 0 0 20px; }
.field label { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.field input, .field select {
  display: block; width: 100%; font-family: inherit; font-size: 17px;
  color: var(--ink); background: var(--surface);
  border: var(--bw) solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); padding: 12px 14px;
  transition: box-shadow .2s, border-width .1s;
}
.field input:hover, .field select:hover { box-shadow: var(--shadow-sm); }
.field input:focus, .field select:focus {
  outline: none; border-width: var(--bw-emph); box-shadow: var(--shadow-sm);
}
.field .hint { color: var(--text-subtle); font-size: 14px; margin-top: 8px; }
.divider-or {
  display: flex; align-items: center; gap: 12px; color: var(--text-subtle);
  font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: 1px;
  margin: 24px 0;
}
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: var(--bw); background: var(--ink); }

/* Radio picker (league selection) */
.pick { display: grid; gap: 12px; margin: 0 0 24px; }
.pick label {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: var(--surface); border: var(--bw) solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-xs); padding: 16px;
  transition: box-shadow .15s linear, transform .15s linear;
}
.pick label:hover { box-shadow: var(--shadow-sm); transform: translate(-1px,-1px); }
.pick input[type="radio"] { width: 20px; height: 20px; accent-color: var(--brand); }
.pick .meta { color: var(--text-subtle); font-size: 14px; }

/* -- Alerts (alerts.md) --------------------------------------------------- */

.alert {
  padding: 16px; border: var(--bw) solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); margin-bottom: 24px; font-size: 16px;
}
.alert-danger { background: var(--danger-soft); color: var(--danger-strong); }
.alert-brand { background: var(--brand-softer); color: var(--brand-strong); }

/* -- Badges (badges.md) --------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700;
  padding: 3px 8px; border: var(--bw) solid var(--ink); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}

/* -- Reused content classes (league/recap pages) ------------------------- */

.crumbs { color: var(--text-subtle); font-size: 14px; margin-bottom: 16px; }
.sub { color: var(--text-subtle); }
.eyebrow + h1 { margin-top: 0; }

table { width: 100%; border-collapse: collapse; font-size: 16px;
  border: var(--bw) solid var(--ink); box-shadow: var(--shadow-sm); background: var(--surface); }
th, td { text-align: left; padding: 10px 12px; border-bottom: var(--bw) solid var(--ink); }
tr:last-child td { border-bottom: 0; }
th { background: var(--bg-warm); color: var(--ink); font-weight: 800; font-size: 13px;
  text-transform: uppercase; letter-spacing: .5px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { color: var(--text-subtle); width: 1px; }

.matchup { display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: var(--bw) solid var(--ink); }
.matchup:last-child { border-bottom: 0; }
.matchup .side { display: flex; gap: 10px; }
.matchup .score { font-variant-numeric: tabular-nums; color: var(--text-subtle); }
.matchup .win { color: var(--success-strong); font-weight: 800; }

.recap p { margin: 0 0 18px; max-width: 68ch; }

.broadcast { background: var(--brand-softer); border: var(--bw) solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 20px; margin: 24px 0; }
.broadcast .kicker { font-weight: 800; color: var(--brand-strong); font-size: 13px;
  text-transform: uppercase; letter-spacing: 1px; }
.broadcast audio { width: 100%; margin-top: 12px; }
.broadcast details { margin-top: 12px; }
.broadcast summary { cursor: pointer; color: var(--text-subtle); font-weight: 700; }
.broadcast .script p { margin: 10px 0 0; }
.broadcast .note { color: var(--text-subtle); font-size: 14px; margin-top: 10px; }

.fact { font-size: 15px; color: var(--text-subtle); padding: 8px 0;
  border-bottom: var(--bw) solid var(--ink); }
.fact:last-child { border-bottom: 0; }
.fact .sal { color: var(--brand-strong); font-weight: 800; font-variant-numeric: tabular-nums; }

.pager { display: flex; justify-content: space-between; margin-top: 36px;
  color: var(--text-subtle); font-size: 16px; }
.meta { color: var(--text-subtle); font-size: 13px; margin-top: 28px;
  border-top: var(--bw) solid var(--ink); padding-top: 12px; }
.empty { color: var(--text-subtle); }

code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em;
  background: var(--bg-warm); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm);
  padding: 1px 6px; }

/* Hero */
.hero { padding: 72px 0; }
@media (min-width: 768px) { .hero { padding: 112px 0; } }
.hero h1 { max-width: 16ch; }
.hero .lead { margin-top: 24px; }
.hero .btn-row { margin-top: 32px; }
