/* Speculative Decoding Championship: light, minimalist theme. No external resources: the
   JetBrains Mono font (SIL Open Font License, fonts/JetBrainsMono-OFL.txt) is bundled. */

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 100 500;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 600 900;
  font-display: swap;
}

:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --tint-rose: #fbeef2;
  --tint-mint: #e8f5ef;
  --tint-lilac: #f1ecfb;
  --tint-peach: #fbf1e6;
  --code-bg: #efe9df;
  --text: #1f2328;
  --muted: #5f6670;
  --line: #e8e1d6;
  --accent: #6741d9;
  --accent-soft: #efeafd;
  --ok: #2e9e5b;
  --bad: #d64545;
  --tbd-bg: #ffe58f;
  --ink: #1f2328;        /* outlines of badges and buttons */
  --rule: #c9c0b2;       /* neutral borders and connectors */
  --radius: 10px;
  --width: 960px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--sans);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* The geeky part: headings, navigation, labels and numbers use the monospace font */
h1, h2, h3, .nav, .eyebrow, .button, .spec, .phase-num, .idx, .steps strong,
.steps li::before, th, summary, .timeline .when, .linklist .kind, .tbd, .formula, footer {
  font-family: var(--mono);
}
h2::before { content: "# "; color: var(--accent); font-weight: 400; }

code {
  font: 0.88em var(--mono);
  color: var(--text);
  background: rgba(31, 35, 40, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.wrap { max-width: var(--width); margin: 0 auto; padding: 0 24px; }

/* ---- Top navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 248, 243, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 56px; max-width: 1120px; }
.nav .brand { font-weight: 650; color: var(--text); white-space: nowrap; }
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0 0 0 auto; padding: 0; overflow-x: auto; scrollbar-width: none; }
.nav li a { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.nav li a:hover { color: var(--text); text-decoration: none; }

/* ---- Hero ---- */
.hero {
  padding: 72px 0 40px;
  text-align: center;
  background:
    radial-gradient(600px 300px at 15% 10%, rgba(103, 65, 217, 0.12), transparent 70%),
    radial-gradient(500px 280px at 85% 20%, rgba(46, 158, 91, 0.10), transparent 70%),
    radial-gradient(700px 300px at 50% 100%, rgba(140, 110, 220, 0.10), transparent 70%),
    linear-gradient(180deg, #f1ebfb 0%, var(--bg) 100%);
}
.hero .eyebrow { color: var(--muted); font-size: 1rem; margin: 0; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.15; margin: 12px 0 16px; font-weight: 700; letter-spacing: -0.02em; }
.hero .tagline { color: var(--muted); font-size: 1.2rem; max-width: 640px; margin: 0 auto 28px; }
.hero-figure { max-width: 820px; margin: 40px auto 0; }

.buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button {
  display: inline-block;
  padding: 10px 22px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  font-weight: 650;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.1s, box-shadow 0.1s;
}
.button.primary { background: var(--accent); color: #fff; }
.button .gh { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -0.2em; margin-right: 9px; }
.button:hover { text-decoration: none; transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

/* ---- Sections: colour bands instead of dividers ---- */
section { padding: 60px 0; }
#phases { background: var(--tint-mint); }
#scoring { background: var(--tint-lilac); }
#dates { background: var(--tint-peach); }
#faq { background: var(--tint-rose); }
section h2 { font-size: 1.7rem; margin: 0 0 20px; letter-spacing: -0.01em; }
section h3 { font-size: 1.1rem; margin: 28px 0 10px; }
section p { margin: 0 0 14px; }
.lead { font-size: 1.12rem; color: var(--muted); }

figure { margin: 28px 0; }
figure img { display: block; width: 100%; height: auto; }
figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 10px; text-align: center; }

/* Overview: key facts in a YAML-like panel */
.spec { margin: 28px 0 0; background: var(--code-bg); border-radius: var(--radius); overflow: hidden; font-size: 0.92rem; }
.spec dl { margin: 0; padding: 14px 18px 16px; }
.spec dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 3px 0; }
.spec dt { color: var(--accent); }
.spec dt::after { content: ":"; color: var(--muted); }
.spec dd { margin: 0; color: var(--text); }
.spec .cmt { color: #8a93a3; }

/* Two phases: big numbers, no boxes */
.phases { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.phase { border-top: 3px solid var(--accent); padding-top: 14px; }
.phase.two { border-top-color: var(--ok); }
.phase-num { font-size: 3.2rem; font-weight: 700; line-height: 1; color: rgba(103, 65, 217, 0.25); }
.phase.two .phase-num { color: rgba(46, 158, 91, 0.3); }
.phase h3 { margin: 10px 0 8px; font-size: 1.35rem; }

/* Lists: square bullets (violet for phase 1, green for phase 2) and red cross markers */
/* Phase 1 winners: a card with the button's offset shadow, three columns of rewards */
.awards { margin-top: 44px; background: var(--surface); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 5px 5px 0 var(--accent); padding: 4px 24px 20px; }
.awards h3 { margin: 16px 0 14px; }
.awards ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.awards li { border-left: 3px solid var(--rule); padding-left: 14px; }
.awards .award-kind { display: block; font-family: var(--mono); font-size: 0.78rem; color: var(--accent); }
.awards .award-kind::after { content: ":"; }
.awards strong { display: block; margin: 2px 0 4px; }
.awards li > span:last-child { color: var(--muted); font-size: 0.95rem; }

ul.bullets, ul.crosses { list-style: none; padding: 0; margin: 0; }
ul.bullets li, ul.crosses li { position: relative; padding-left: 28px; margin: 7px 0; }
ul.crosses li::before {
  content: ""; position: absolute; left: 0; top: 0.25em; width: 18px; height: 18px;
}
ul.bullets li::before {
  content: ""; position: absolute; left: 5px; top: 0.6em; width: 8px; height: 8px;
  background: var(--accent); border-radius: 1px;
}
ul.bullets.two li::before { background: var(--ok); }
ul.crosses li::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='9' fill='%23d64545'/%3E%3Cpath d='M6 6l6 6M12 6l-6 6' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* Path through the competition: a horizontal stepper */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps li { counter-increment: step; position: relative; padding-top: 46px; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  width: 36px; height: 32px; border-radius: 3px;
  display: grid; place-items: center;
  border: 2px solid var(--accent); color: var(--ink); font-weight: 700; font-size: 0.85rem;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 15px; left: 48px; right: -12px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--rule) 0 6px, transparent 6px 11px);
}
.steps strong { display: block; margin-bottom: 4px; }
.steps li > span { color: var(--muted); font-size: 0.95rem; }

/* Scoring: a minimal data table with weight bars */
table.data { width: 100%; border-collapse: collapse; margin: 18px 0; }
table.data th, table.data td { text-align: left; padding: 11px 12px; border-bottom: 1px solid rgba(80, 70, 140, 0.15); vertical-align: middle; }
table.data th { font-size: 0.78rem; color: var(--muted); font-weight: 600; text-transform: lowercase; border-bottom: 2px solid rgba(80, 70, 140, 0.3); }
table.data td:nth-child(2) { white-space: nowrap; font-family: var(--mono); font-size: 0.9rem; }
.bar { display: inline-block; width: 80px; height: 8px; margin-right: 10px; border-radius: 4px; vertical-align: middle;
       background: linear-gradient(90deg, var(--accent) var(--w), rgba(103, 65, 217, 0.15) var(--w)); }

.formula {
  background: rgba(255, 255, 255, 0.55);
  border-left: 4px solid #8c6edc;
  border-radius: 6px;
  padding: 16px 20px;
  font-size: 0.95rem;
  text-align: center;
  margin: 20px 0;
  overflow-x: auto;
}

/* Rules */
.rule-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; }
.rule-cols h3 { margin-top: 8px; }
.idx { display: inline-block; border: 2px solid var(--accent); color: var(--ink); font-size: 0.75rem; font-weight: 700; padding: 1px 7px; border-radius: 3px; margin-right: 8px; vertical-align: 2px; }
.idx.two { border-color: var(--ok); }
.callout { margin-top: 32px; padding: 6px 24px 18px; background: #fdf0f0; border-left: 4px solid var(--bad); border-radius: 0 var(--radius) var(--radius) 0; }
.callout h3 { color: var(--ink); margin-top: 16px; }

/* Important dates: a vertical timeline */
ol.timeline { list-style: none; margin: 8px 0 18px; padding: 0 0 0 6px; position: relative; }
ol.timeline::before { content: ""; position: absolute; left: 12px; top: 10px; bottom: 10px; width: 2px; background: #e6c9a6; }
ol.timeline li { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; padding: 10px 0 10px 32px; }
ol.timeline li::before { content: ""; position: absolute; left: 1px; width: 13px; height: 13px; border-radius: 2px; transform: rotate(45deg); background: var(--tint-peach); border: 3px solid #d98a3a; }
ol.timeline li.finale::before { background: #d98a3a; box-shadow: 0 0 0 5px rgba(217, 138, 58, 0.2); }
ol.timeline li.finale .what { font-weight: 650; }

/* Important links: a plain list */
ul.linklist { list-style: none; padding: 0; margin: 0; }
ul.linklist li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
ul.linklist .kind { color: var(--muted); font-size: 0.85rem; padding-top: 2px; }
.ext { font-size: 0.85em; }

/* FAQ: borderless accordion */
details { border-bottom: 1px solid rgba(103, 65, 217, 0.2); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; line-height: 1; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; color: var(--muted); }

/* Placeholders */
.tbd {
  display: inline-block;
  background: var(--tbd-bg);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0 6px;
  border-radius: 2px;
  vertical-align: 1px;
}
a.placeholder { color: var(--muted); border-bottom: 1px dashed #b9bdc3; }
a.placeholder:hover { text-decoration: none; }
.note { color: var(--muted); font-size: 0.92rem; }

/* Footer */
footer { background: #f1ebf9; padding: 32px 0 48px; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Phones */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav ul { display: none; }
  .phases, .rule-cols { grid-template-columns: 1fr; gap: 32px; }
  .awards ul { grid-template-columns: 1fr; gap: 16px; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .steps li { padding: 4px 0 0 48px; }
  .steps li:not(:last-child)::after { display: none; }
  ol.timeline li, ul.linklist li { grid-template-columns: 1fr; gap: 2px; }
  /* Wide diagrams stay readable: scroll sideways instead of shrinking */
  figure:not(.hero-figure) { overflow-x: auto; }
  figure:not(.hero-figure) img { width: 680px; max-width: none; }
  .hero { padding-top: 48px; }
  section { padding: 40px 0; }
  table.data th, table.data td { padding: 9px 6px; }
  .bar { width: 40px; }
}
