/* NYP × Alibaba Cloud Hackathon
   Alibaba Cloud orange leads; Qwen violet and Qoder black/green appear where those products are the subject. */

:root {
  /* Brand */
  --orange: oklch(0.701 0.201 44.8);        /* Alibaba Cloud #FF6A00 */
  --orange-hi: oklch(0.76 0.18 50);
  --orange-ink: oklch(0.53 0.175 42);       /* orange as text on light, ≥4.5:1 */
  --qwen: oklch(0.564 0.211 278.7);         /* Qwen #615CED */
  --qwen-deep: oklch(0.36 0.16 279);
  --qwen-text: var(--qwen);                 /* Qwen violet as text, ≥4.5:1 on the page */
  --qoder: oklch(0.144 0.003 247.1);        /* Qoder #090A0B */
  --qoder-raise: oklch(0.2 0.006 247);
  --qoder-line: oklch(0.32 0.008 247);
  --qoder-green: oklch(0.781 0.218 147.3);  /* Qoder #2ADB5C */
  --qoder-text: oklch(0.93 0.004 247);
  --qoder-dim: oklch(0.74 0.006 247);

  /* Neutrals (true neutral, no warm cast) */
  --ink: oklch(0.17 0.004 45);
  --ink-2: oklch(0.36 0.004 45);
  --muted: oklch(0.47 0.004 45);
  --bg: oklch(0.99 0 0);
  --surface: oklch(0.955 0 0);
  --line: oklch(0.86 0 0);

  /* Fixed in both themes: ink on orange, the night band, pure light */
  --night: oklch(0.17 0.004 45);
  --white: oklch(0.99 0 0);

  /* Type */
  --font: "Archivo", "Arial Narrow", Arial, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.25rem;
  --fs-lg: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
  --fs-xl: clamp(1.9rem, 1.2rem + 2.6vw, 3.25rem);
  --fs-hero: clamp(2.5rem, 0.9rem + 8.4vw, 6rem);

  /* Space */
  --gutter: clamp(16px, 4vw, 48px);
  --sec: clamp(4.5rem, 3rem + 6vw, 9rem);
  --radius: 4px;

  /* Layers */
  --z-sticky: 20;
  --z-menu: 30;
  --z-skip: 50;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

/* Dark theme: explicit choice, or system preference when no choice is stored */
:root[data-theme="dark"] {
  --ink: oklch(0.95 0.003 45);
  --ink-2: oklch(0.81 0.004 45);
  --muted: oklch(0.72 0.004 45);
  --bg: oklch(0.165 0.004 45);
  --surface: oklch(0.205 0.004 45);
  --line: oklch(0.33 0.004 45);
  --orange-ink: oklch(0.77 0.165 52);
  --qwen-text: oklch(0.74 0.14 279);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: oklch(0.95 0.003 45);
    --ink-2: oklch(0.81 0.004 45);
    --muted: oklch(0.72 0.004 45);
    --bg: oklch(0.165 0.004 45);
    --surface: oklch(0.205 0.004 45);
    --line: oklch(0.33 0.004 45);
    --orange-ink: oklch(0.77 0.165 52);
  --qwen-text: oklch(0.74 0.14 279);
    color-scheme: dark;
  }
}

/* Orange surfaces keep dark ink in both themes */
.hero,
.register,
.kit__item--ali,
.brief-hero--nontech,
.blk--nontech,
.podium__step--1 {
  --ink: var(--night);
  --ink-2: oklch(0.3 0.004 45);
  --bg: var(--white);
  --orange-ink: var(--night);
  color: var(--ink);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-stretch: 100%;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.h2 {
  font-size: var(--fs-xl);
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

.lede {
  max-width: 60ch;
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.8em 1.5em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  font-stretch: 112%;
  font-size: 1rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn--ink {
  background: var(--ink);
  color: var(--bg);
}

.btn--ink:hover {
  background: color-mix(in oklch, var(--ink) 80%, var(--bg));
}

.btn--line {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--line:hover {
  background: var(--ink);
  color: var(--orange);
}

.btn--sm {
  min-height: 40px;
  padding: 0.55em 1.1em;
  font-size: 0.9375rem;
}

.btn--lg {
  min-height: 60px;
  padding: 1em 1.8em;
  font-size: 1.125rem;
}

/* ---------- Brand marks (Alibaba Cloud, Qwen, Qoder) ----------
   Each logo sits on a dark tile so it reads on orange, violet, light and dark surfaces alike. */

.mark {
  display: inline-block;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 9px;
  background: var(--night);
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.1);
  object-fit: contain;
}

.mark--xs {
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 5px;
}

.mark--sm {
  width: 26px;
  height: 26px;
  padding: 4px;
  border-radius: 6px;
}

.mark--lg {
  width: 48px;
  height: 48px;
  padding: 8px;
  border-radius: 12px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-stretch: 115%;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.lockup img {
  width: 32px;
  height: 32px;
  padding: 3px;
  border-radius: 6px;
  background: var(--white);
  object-fit: contain;
}

.lockup__text {
  display: inline-flex;
  gap: 0.35em;
}

.lockup__ali {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lockup .mark {
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 5px;
  background: var(--night);
}

.lockup__x {
  color: var(--orange-ink);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 28px);
}

.nav__links a:not(.btn) {
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  padding-block: 6px;
  background: linear-gradient(var(--orange), var(--orange)) left bottom / 0 2px no-repeat;
  transition: background-size 0.25s var(--ease-out);
}

.nav__links a:not(.btn):hover,
.nav__links a[aria-current="true"] {
  background-size: 100% 2px;
}

.nav__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.nav__toggle-bars {
  position: relative;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.2s;
}

.nav__toggle-bars::before,
.nav__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out);
}

.nav__toggle-bars::before {
  transform: translateY(-6px);
}

.nav__toggle-bars::after {
  transform: translateY(6px);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bars {
  background: transparent;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bars::before {
  transform: rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bars::after {
  transform: rotate(-45deg);
}

@media (max-width: 920px) {
  .nav__toggle {
    display: inline-flex;
  }

  .nav__links {
    position: fixed;
    inset: 64px 0 auto 0;
    z-index: var(--z-menu);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px oklch(0.17 0.004 45 / 0.35);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s var(--ease-out), transform 0.3s var(--ease-out), visibility 0s 0.3s;
  }

  .nav__links.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s var(--ease-out), transform 0.3s var(--ease-out);
  }

  .nav__links a:not(.btn) {
    padding: 14px 0;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--line);
    background: none;
  }

  .nav__links .btn {
    margin-top: 16px;
    min-height: 52px;
  }
}

@media (max-width: 440px) {
  .lockup .mark {
    display: none;
  }

  /* Keep the label for screen readers; the icon carries it visually */
  .nav__toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .nav__toggle {
    width: 44px;
    justify-content: center;
  }

  .nav__end {
    gap: 6px;
  }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--orange);
  color: var(--ink);
  padding-block: clamp(3rem, 2rem + 4vw, 6rem) clamp(1.5rem, 1rem + 2vw, 2.5rem);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.75rem, 1rem + 2.5vw, 3rem) clamp(2rem, 1rem + 4vw, 5rem);
}

.hero__head {
  grid-column: 1 / -1;
}

.nowrap {
  white-space: nowrap;
}

.hero__meta {
  font-weight: 700;
  font-stretch: 110%;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.hero__title {
  display: flex;
  flex-direction: column;
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.9;
}

.hero__title-top {
  font-size: clamp(1.45rem, 0.9rem + 2.3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 0.3em;
}

.hero__title-main {
  font-size: var(--fs-hero);
  letter-spacing: -0.035em;
}

.hero__lead {
  max-width: 46ch;
  font-size: var(--fs-md);
  line-height: 1.5;
  font-weight: 500;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

.built {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid oklch(0.17 0.004 45 / 0.35);
}

.built__label {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.built__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.built__list li {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-stretch: 110%;
}

.glance {
  display: grid;
  gap: 1.5rem;
  align-self: end;
}

.glance__track {
  border-top: 2px solid var(--ink);
  padding-top: 0.85rem;
}

.glance__label {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.glance__list {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.glance__list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid oklch(0.17 0.004 45 / 0.35);
  font-size: var(--fs-md);
  font-weight: 800;
  font-stretch: 108%;
  line-height: 1.25;
  text-decoration: none;
}

.glance__list li:last-child a {
  border-bottom: 0;
}

.glance__list a span {
  flex: none;
  transition: transform 0.25s var(--ease-out);
}

.glance__list a:hover span {
  transform: translateX(4px);
}

.glance__note {
  max-width: 44ch;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.5;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) 0 0;
  border-top: 2px solid var(--ink);
}

.facts__item {
  padding: 1rem 1.25rem 0 0;
}

.facts__item + .facts__item {
  padding-left: 1.25rem;
  border-left: 1px solid oklch(0.17 0.004 45 / 0.35);
}

.facts dt {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.facts__tag {
  font-weight: 500;
  opacity: 0.85;
}

.facts dd {
  margin: 0.15rem 0 0;
  font-size: var(--fs-md);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.facts__item--status dd {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
}

.facts__item--status dd::before {
  content: "";
  flex: none;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--ink);
  transform: translateY(-0.05em);
}

.facts__item--status[data-state="open"] dd::before {
  animation: pulse 1.6s var(--ease-out) infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 oklch(0.17 0.004 45 / 0.6); }
  100% { box-shadow: 0 0 0 0.6em oklch(0.17 0.004 45 / 0); }
}

@media (max-width: 920px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts__item:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .facts__item {
    padding-bottom: 1rem;
  }

  .facts__item:nth-child(n + 3) {
    border-top: 1px solid oklch(0.17 0.004 45 / 0.35);
  }
}

/* ---------- Tracks ---------- */

.tracks {
  padding-top: var(--sec);
}

.tracks__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2rem 4rem;
  align-items: end;
  padding-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}

.track {
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
}

.track__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1.5rem 4rem;
  align-items: end;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.track__when {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.75rem;
}

.pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.track__title {
  font-size: clamp(2rem, 1.2rem + 2.8vw, 3.5rem);
  font-weight: 900;
  font-stretch: 122%;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.track__about {
  display: grid;
  gap: 0.75rem;
  max-width: 54ch;
  font-size: var(--fs-md);
  line-height: 1.5;
}

.track__fine {
  font-size: 1rem;
}

.track--tech {
  background: var(--qoder);
  color: var(--qoder-text);
}

.track--tech .pip {
  background: var(--qoder-green);
  box-shadow: 0 0 0 4px oklch(0.781 0.218 147.3 / 0.18);
}

.track--tech .track__when {
  color: var(--qoder-green);
}

.track--tech .track__fine {
  color: var(--qoder-dim);
}

.track--tech strong {
  color: var(--qoder-green);
  font-weight: 700;
}

.track--tech :focus-visible {
  outline-color: var(--qoder-green);
}

.track--nontech {
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.track--nontech .pip {
  background: var(--orange);
}

.track--nontech .track__about {
  color: var(--ink-2);
}

.track--nontech .track__fine {
  color: var(--muted);
}

.track--nontech strong {
  color: var(--ink);
}

.ps-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 0.5rem + 2vw, 2rem);
}

.ps {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.3s;
}

.ps__icon,
.brief-hero__icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid currentColor;
  border-radius: 10px;
}

.ps__icon svg,
.brief-hero__icon svg {
  width: 26px;
  height: 26px;
}

.ps__icon {
  margin-bottom: 0.5rem;
}

.ps--tech .ps__icon {
  color: var(--qoder-green);
}

.ps--nontech .ps__icon {
  color: var(--orange-ink);
}

.ps__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  position: relative;
}

.ps__tag {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.ps__title {
  font-size: var(--fs-lg);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.ps__hmw {
  max-width: 58ch;
  line-height: 1.55;
}

.ps__more {
  margin-top: auto;
  padding-top: 0.75rem;
  font-weight: 700;
  font-stretch: 110%;
}

.ps__more span {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}

.ps:hover .ps__more span {
  transform: translateX(5px);
}

.ps--tech {
  background: var(--qoder-raise);
  border: 1px solid var(--qoder-line);
}

.ps--tech:hover {
  border-color: var(--qoder-green);
}

.ps--tech .ps__tag,
.ps--tech .ps__more {
  color: var(--qoder-green);
}

.ps--tech .ps__hmw {
  color: var(--qoder-dim);
}

.ps--nontech {
  background: var(--bg);
  border: 1px solid var(--line);
}

.ps--nontech:hover {
  border-color: var(--ink);
  box-shadow: 8px 8px 0 var(--orange);
  transform: translate(-3px, -3px);
}

.ps--nontech .ps__tag,
.ps--nontech .ps__more {
  color: var(--orange-ink);
}

.ps--nontech .ps__hmw {
  color: var(--ink-2);
}

@media (max-width: 860px) {
  .tracks__intro,
  .track__head,
  .ps-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Toolkit ---------- */

.toolkit {
  padding-block: var(--sec);
  background: var(--surface);
}

.toolkit__head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.kit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
}

.kit__item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  border-radius: var(--radius);
}

.kit__item p:not(.kit__brand):not(.kit__ws) {
  max-width: 58ch;
}

.kit__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 900;
  font-stretch: 125%;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.kit__title {
  font-size: var(--fs-lg);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.015em;
}

.kit__ws {
  margin-top: auto;
  padding-top: 1rem;
  font-weight: 700;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.kit__item--ali {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 1rem + 4vw, 5rem);
  background: var(--orange);
  color: var(--ink);
}

.kit__main,
.kit__side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kit__side {
  justify-content: flex-end;
}

.kit__item--ali .kit__title {
  font-size: var(--fs-xl);
  font-weight: 900;
  font-stretch: 122%;
  letter-spacing: -0.03em;
  max-width: 12ch;
}

.kit__item--ali .kit__ws {
  border-top: 2px solid var(--ink);
}

.kit__list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid oklch(0.17 0.004 45 / 0.4);
}

.kit__list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid oklch(0.17 0.004 45 / 0.4);
}

.kit__list span {
  font-weight: 800;
  font-stretch: 110%;
}

.kit__item--qwen {
  background: var(--qwen);
  color: oklch(0.995 0 0);
}

.kit__item--qwen .kit__ws {
  border-top: 1px solid oklch(1 0 0 / 0.35);
}

.kit__item--qoder {
  background: var(--qoder);
  color: var(--qoder-text);
}

.kit__item--qoder .kit__brand {
  color: var(--qoder-green);
}

.kit__item--qoder p:not(.kit__brand) {
  color: var(--qoder-dim);
}

.kit__item--qoder .kit__ws {
  color: var(--qoder-green) !important;
}

@media (max-width: 860px) {
  .kit {
    grid-template-columns: minmax(0, 1fr);
  }

  .kit__item--ali {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Road ---------- */

.road {
  padding-block: var(--sec);
}

.road__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2.5rem clamp(2rem, 1rem + 5vw, 6rem);
  align-items: start;
}

.road__intro {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 1.25rem;
}

.road__list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: stop;
}

.stop {
  --dot: var(--ink);
  position: relative;
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.25rem 1.75rem;
  padding: 0 0 2.25rem 2.25rem;
  counter-increment: stop;
}

.stop::before {
  content: counter(stop);
  position: absolute;
  left: 0;
  top: 0.05rem;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--dot);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  z-index: 1;
}

.stop::after {
  content: "";
  position: absolute;
  left: calc(0.75rem - 1px);
  top: 1.6rem;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.stop:last-child::after {
  display: none;
}

.stop__date {
  font-weight: 800;
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stop__body h3 {
  font-size: var(--fs-md);
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.stop__marks {
  display: inline-flex;
  gap: 4px;
  margin-left: 0.35em;
  vertical-align: -0.35em;
}

.stop__body p {
  color: var(--ink-2);
  max-width: 56ch;
}

.stop--qwen {
  --dot: var(--qwen);
}

.stop--qwen .stop__date {
  color: var(--qwen-text);
}

.stop--ali {
  --dot: var(--orange-ink);
}

.stop--ali .stop__date {
  color: var(--orange-ink);
}

.stop--final::before {
  color: var(--night);
  background: var(--orange);
  border-color: var(--ink);
}

.stop--final h3 {
  font-size: var(--fs-lg);
}

.stop.is-past::before {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.stop.is-past::after {
  background: var(--ink);
}

.stop.is-now .stop__body h3::after {
  content: "Now";
  display: inline-block;
  margin-left: 0.6em;
  padding: 0.2em 0.55em;
  border-radius: 2px;
  background: var(--orange);
  color: var(--night);
  font-size: 0.75rem;
  font-weight: 800;
  vertical-align: 0.2em;
}

@media (max-width: 860px) {
  .road__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .road__intro {
    position: static;
  }
}

@media (max-width: 560px) {
  .stop {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Day ---------- */

.day {
  padding-block: var(--sec);
  background: var(--night);
  color: oklch(0.96 0 0);
}

.day .lede {
  color: oklch(0.8 0.004 45);
}

.day__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 4rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}

.sched {
  --hours: 9.5;              /* 9:00 to 6:30 */
  --label: 11rem;
  --gap: 1.25rem;
  --lane-x: calc(var(--label) + var(--gap));
  --rule: oklch(1 0 0 / 0.1);
  display: grid;
  gap: 0.75rem;
}

.sched__axis {
  position: relative;
  height: 1.25rem;
  margin-left: var(--lane-x);
  font-size: 0.8125rem;
  font-weight: 600;
  color: oklch(0.72 0.004 45);
  font-variant-numeric: tabular-nums;
}

.sched__axis span {
  position: absolute;
  left: calc(100% * var(--at) / var(--hours));
  transform: translateX(-50%);
}

.sched__axis span:first-child {
  transform: none;
}

.sched__body {
  position: relative;
  display: grid;
  gap: 10px;
}

/* One set of hour lines running through every row */
.sched__body::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  bottom: 0;
  left: var(--lane-x);
  right: 0;
  border-right: 1px solid var(--rule);
  background: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px calc(100% / var(--hours)));
  pointer-events: none;
}

.sched__row {
  display: grid;
  grid-template-columns: var(--label) minmax(0, 1fr);
  gap: var(--gap);
  align-items: center;
}

.sched__venue strong {
  display: block;
  font-size: var(--fs-md);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.15;
}

.sched__venue small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: oklch(0.72 0.004 45);
}

.sched__lane {
  position: relative;
  height: 4.5rem;
}

.blk {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% * var(--s) / var(--hours));
  width: calc(100% * (var(--e) - var(--s)) / var(--hours));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 0.9rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
}

.blk small {
  font-weight: 500;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.blk--tech {
  background: var(--qoder);
  border: 1px solid var(--qoder-green);
  color: var(--qoder-text);
}

.blk--tech small {
  color: var(--qoder-green);
}

.blk--nontech {
  background: var(--orange);
  color: var(--ink);
}

/* Break and prizes span both venues, so they sit on the body, not a lane */
.sched__break,
.sched__body > .blk--prize {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--lane-x) + (100% - var(--lane-x)) * var(--s) / var(--hours));
  width: calc((100% - var(--lane-x)) * (var(--e) - var(--s)) / var(--hours));
}

.sched__break {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed oklch(1 0 0 / 0.2);
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, oklch(1 0 0 / 0.05) 0 6px, transparent 6px 12px);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.3;
  color: oklch(0.8 0.004 45);
  text-align: center;
}

.sched__break small {
  font-weight: 500;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: oklch(0.72 0.004 45);
}

.blk--prize {
  align-items: center;
  padding: 0.75rem 0;
  background: var(--white);
  color: var(--night);
}

/* Half an hour is narrow: read the prize block bottom to top */
.blk--prize span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

@media (max-width: 1000px) {
  .sched {
    --label: 8.5rem;
  }
}

.day__notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 4rem;
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid oklch(1 0 0 / 0.2);
  color: oklch(0.85 0.004 45);
}

.day__notes p {
  max-width: 56ch;
}

.day__notes strong {
  color: var(--orange-hi);
}

@media (max-width: 860px) {
  .day__head,
  .day__notes {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  /* Stack the timetable: drop the proportional axis, list blocks per venue */
  .sched__axis,
  .sched__body::before,
  .sched__break {
    display: none;
  }

  .sched__body {
    gap: 1.25rem;
  }

  .sched__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
  }

  .sched__venue strong,
  .sched__venue small {
    display: inline;
  }

  .sched__venue small {
    margin-left: 0.5rem;
  }

  .sched__lane {
    height: auto;
    display: grid;
    gap: 6px;
  }

  .blk,
  .sched__body > .blk--prize {
    position: static;
    width: auto;
    padding: 0.75rem 0.9rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    white-space: normal;
  }

  .blk--prize span {
    flex: 1;
    flex-direction: row;
    justify-content: space-between;
    writing-mode: horizontal-tb;
    transform: none;
  }
}

/* ---------- Prizes ---------- */

.prizes {
  padding-block: var(--sec);
}

.prizes__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem clamp(2rem, 1rem + 5vw, 6rem);
  align-items: end;
}

.prizes .lede {
  margin-top: 1.25rem;
}

.podium {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
  padding-right: clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
  border-bottom: 3px solid var(--ink);
}

.podium__step {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.9rem 0.9rem 0.75rem;
  border-radius: var(--radius) var(--radius) 0 0;
  transform-origin: bottom;
  container-type: inline-size;
}

.podium__amt {
  /* Sized from the bar itself (cqi), so the amount always fits inside it */
  font-size: clamp(1rem, 30cqi, 2.5rem);
  font-weight: 900;
  font-stretch: 112%;
  white-space: nowrap;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.podium__cur {
  margin-right: 0.08em;
  font-size: 0.5em;
  font-weight: 800;
  vertical-align: 0.75em;
  letter-spacing: 0;
}

.podium__place {
  font-weight: 700;
  font-size: var(--fs-sm);
}

.podium__step--1 {
  height: 15rem;
  background: var(--orange);
}

.podium__step--2 {
  height: 10.5rem;
  background: var(--ink);
  color: var(--bg);
}

.podium__step--3 {
  height: 7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
}

.podium__times {
  position: absolute;
  right: 0;
  bottom: 0.4rem;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 900;
  font-stretch: 110%;
  line-height: 1;
  white-space: nowrap;
  color: var(--orange-ink);
}

@media (max-width: 860px) {
  .prizes__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .podium__step--1 { height: 12rem; }
  .podium__step--2 { height: 8.5rem; }
  .podium__step--3 { height: 6rem; }
}

.perks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem clamp(2rem, 1rem + 5vw, 6rem);
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.perks__title {
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ink);
  font-size: var(--fs-md);
  font-weight: 800;
  font-stretch: 112%;
}

.perks__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.perks__list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.perks__note {
  margin-top: 1rem;
  max-width: 60ch;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.award {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 1.5rem clamp(2rem, 1rem + 5vw, 6rem);
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
  scroll-margin-top: 96px;
}

.award__title {
  font-size: var(--fs-lg);
  font-weight: 900;
  font-stretch: 118%;
  letter-spacing: -0.02em;
}

.award__one {
  margin-top: 0.75rem;
  font-weight: 700;
  color: var(--orange-ink);
}

.award__body {
  display: grid;
  gap: 1rem;
  max-width: 62ch;
  color: var(--ink-2);
}

.award__body strong {
  color: var(--ink);
}

@media (max-width: 860px) {
  .award,
  .perks {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Judging ---------- */

.judging {
  padding-block: var(--sec);
  background: var(--surface);
}

.judging__head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}

.draft {
  justify-self: start;
  padding: 0.35em 0.75em;
  border: 1.5px dashed var(--ink-2);
  border-radius: 2px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-2);
}

.rubrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 0.5rem + 2vw, 2rem);
}

.rubric {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
}

.rubric--tech {
  background: var(--qoder);
  border-color: var(--qoder);
  color: var(--qoder-text);
}

.rubric__title {
  font-size: var(--fs-lg);
  font-weight: 900;
  font-stretch: 122%;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.rubric__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rubric__list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.rubric--tech .rubric__list li {
  border-top-color: var(--qoder-line);
}

.rubric__name {
  font-weight: 800;
  font-stretch: 108%;
}

.rubric__pts {
  font-weight: 900;
  font-stretch: 115%;
  font-variant-numeric: tabular-nums;
}

.rubric__bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bar) calc(var(--w) * 4%), var(--track) 0);
  transform-origin: left;
}

.rubric--tech {
  --bar: var(--qoder-green);
  --track: var(--qoder-line);
}

.rubric--nontech {
  --bar: var(--orange);
  --track: var(--surface);
}

.rubric__list p {
  grid-column: 1 / -1;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.rubric--tech .rubric__list p {
  color: var(--qoder-dim);
}

.rubric__bonus {
  margin-top: 0.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--qoder-raise);
  border: 1px dashed var(--qoder-green);
  font-size: 0.9375rem;
}

.rubric__bonus strong {
  color: var(--qoder-green);
}

.judging__notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 4rem;
  margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}

.judging__notes p {
  max-width: 56ch;
}

.judging__notes strong {
  color: var(--ink);
}

@media (max-width: 860px) {
  .rubrics,
  .judging__notes {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- FAQ ---------- */

.faq {
  padding-block: var(--sec);
}

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: 2rem clamp(2rem, 1rem + 5vw, 6rem);
  align-items: start;
}

.faq__list {
  border-top: 2px solid var(--ink);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  display: block;
  padding: 1.15rem 3rem 1.15rem 0;
  font-weight: 700;
  font-stretch: 106%;
  font-size: var(--fs-md);
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out);
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::after {
  transform: rotate(0deg);
}

.faq summary:hover {
  color: var(--orange-ink);
}

.faq details p {
  max-width: 62ch;
  padding: 0 3rem 1.4rem 0;
  color: var(--ink-2);
}

@media (max-width: 860px) {
  .faq__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Register ---------- */

.register {
  padding-block: clamp(4rem, 3rem + 5vw, 8rem);
  background: var(--orange);
}

.register__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem 4rem;
  align-items: end;
}

.register__title {
  font-size: clamp(2.5rem, 1rem + 6vw, 5.5rem);
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.register__lead {
  max-width: 44ch;
  margin-top: 1.5rem;
  font-size: var(--fs-md);
  font-weight: 500;
}

.register__act {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.register__help {
  font-weight: 500;
}

.register__help a {
  font-weight: 700;
  text-underline-offset: 3px;
}

@media (max-width: 860px) {
  .register__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Footer ---------- */

.foot {
  padding-block: 3.5rem;
  background: var(--night);
  color: oklch(0.82 0.004 45);
  font-size: 0.9375rem;
}

.foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem 4rem;
}

.foot__brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.foot__brand img {
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: contain;
  border-radius: 6px;
  background: oklch(0.99 0 0);
  padding: 4px;
}

.foot__brand p {
  max-width: 52ch;
}

.foot__brand strong {
  color: oklch(0.99 0 0);
  font-stretch: 110%;
}

.foot__nav {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.foot__head {
  color: oklch(0.99 0 0);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.foot__marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  /* Divider aligned to the content edge, not the gutter */
  background: linear-gradient(oklch(1 0 0 / 0.12), oklch(1 0 0 / 0.12)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}

.foot__marks .foot__head {
  margin: 0;
}

.foot__marks ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot__marks li {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: oklch(0.99 0 0);
  font-weight: 600;
}

.foot__marks .mark {
  width: 32px;
  height: 32px;
  padding: 5px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.16);
}

.foot__nav a {
  text-decoration: none;
  justify-self: start;
}

.foot__nav a:hover {
  color: var(--orange-hi);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot :focus-visible {
  outline-color: var(--orange-hi);
}

@media (max-width: 720px) {
  .foot__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* =========================================================
   Problem statement pages
   ========================================================= */

.brief-hero {
  padding-block: clamp(2.5rem, 2rem + 3vw, 5rem) 0;
}

.brief-hero--tech {
  background: var(--qoder);
  color: var(--qoder-text);
}

.brief-hero--nontech {
  background: var(--orange);
  color: var(--ink);
}

.brief-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 1rem + 4vw, 5rem);
  align-items: end;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 2rem;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}

.crumb:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.brief-hero--tech .crumb,
.brief-hero--tech .brief-hero__meta {
  color: var(--qoder-green);
}

.brief-hero--tech :focus-visible {
  outline-color: var(--qoder-green);
}

.brief-hero__meta {
  font-weight: 700;
  margin-bottom: 1rem;
}

.brief-hero__title {
  font-size: clamp(2.1rem, 1rem + 4.2vw, 4.5rem);
  font-weight: 900;
  font-stretch: 120%;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.brief-hero__copy {
  padding-bottom: clamp(2.25rem, 1.5rem + 2.5vw, 4rem);
}

.brief-hero__icon {
  display: grid;
  margin-bottom: 1.25rem;
}

.brief-hero--tech .brief-hero__icon {
  color: var(--qoder-green);
}

.brief-hmw {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}

.brief-hmw p {
  max-width: 34ch;
  font-size: clamp(1.4rem, 1rem + 1.8vw, 2.3rem);
  font-weight: 700;
  font-stretch: 106%;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.brief-hmw .brief-hmw__label {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--orange-ink);
}

.brief {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 1rem + 5vw, 6rem);
  padding-block: clamp(3rem, 2rem + 3vw, 5rem) var(--sec);
}

.brief__toc {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 0.15rem;
  font-size: 0.9375rem;
}

.brief__toc a {
  padding: 0.4rem 0 0.4rem 0.9rem;
  border-left: 2px solid var(--line);
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
}

.brief__toc a:hover,
.brief__toc a[aria-current="true"] {
  border-left-color: var(--orange);
  color: var(--ink);
}

.brief__body {
  display: grid;
  gap: clamp(2.5rem, 2rem + 2vw, 4rem);
  max-width: 72ch;
}

.brief__body section {
  scroll-margin-top: 96px;
}

.brief__body h2 {
  font-size: var(--fs-lg);
  font-weight: 800;
  font-stretch: 114%;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.brief__body p + p {
  margin-top: 1rem;
}

.brief__body p,
.brief__body li {
  color: var(--ink-2);
}

.brief__body strong {
  color: var(--ink);
}

.brief__body ul,
.brief__body ol {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.6rem;
}

.brief__body li::marker {
  color: var(--orange-ink);
  font-weight: 800;
}

.brief-quote {
  margin: 0;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
}

.brief-quote p {
  color: var(--ink) !important;
  font-size: var(--fs-md);
  line-height: 1.55;
}

.brief-quote footer {
  margin-top: 0.75rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--muted);
}

.deliver {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  margin-top: 1.25rem;
  border-top: 2px solid var(--ink);
}

.deliver div {
  padding: 1rem 1.25rem 1rem 0;
  border-bottom: 1px solid var(--line);
}

.deliver dt {
  font-weight: 800;
  font-stretch: 108%;
  color: var(--ink);
}

.deliver dd {
  margin: 0.25rem 0 0;
  color: var(--ink-2);
}

/* Brief page scoring breakdown */
.brief__body .score {
  display: block;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.score li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.score__name {
  font-weight: 800;
  font-stretch: 108%;
  color: var(--ink);
}

.score__pts {
  font-weight: 900;
  font-stretch: 115%;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.score__pts small {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
}

.score__bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--orange) calc(var(--w) * 4%), var(--surface) 0);
}

.score li p {
  grid-column: 1 / -1;
  font-size: 0.9375rem;
}

.brief__body .score__bonus {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--orange-ink);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.score__bonus strong {
  color: var(--orange-ink);
}

.brief__body .score__draft {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
}

.score__draft a {
  margin-left: 0.25rem;
  color: var(--ink);
  font-weight: 700;
}

.brief-next {
  background: var(--surface);
  padding-block: clamp(2.5rem, 2rem + 3vw, 4rem);
}

.brief-next__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.brief-next a {
  display: grid;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.brief-next a:hover {
  border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--orange);
  transform: translate(-2px, -2px);
}

.brief-next small {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
}

.brief-next strong {
  font-size: var(--fs-md);
  font-stretch: 110%;
  line-height: 1.25;
}

@media (max-width: 860px) {
  .brief-hero__grid,
  .brief {
    grid-template-columns: minmax(0, 1fr);
  }

  .brief__toc {
    display: none;
  }
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.theme-toggle:hover {
  border-color: var(--ink);
}

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  transition: transform 0.45s var(--ease-out), opacity 0.25s var(--ease-out);
}

.theme-toggle__sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.nav__end {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 28px);
}

:root[data-theme="dark"] .theme-toggle__sun {
  opacity: 1;
  transform: none;
}

:root[data-theme="dark"] .theme-toggle__moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun {
    opacity: 1;
    transform: none;
  }

  :root:not([data-theme="light"]) .theme-toggle__moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
  }
}

/* Dark theme: the night band, footer and Qoder panels sit close to the page,
   so they get a hairline to stay distinct; the nav CTA turns brand orange. */
:root[data-theme="dark"] .day,
:root[data-theme="dark"] .foot,
:root[data-theme="dark"] .track--tech {
  border-block: 1px solid var(--line);
}

:root[data-theme="dark"] .kit__item--qoder,
:root[data-theme="dark"] .rubric--tech {
  border: 1px solid var(--qoder-line);
}

:root[data-theme="dark"] .nav .btn--ink {
  background: var(--orange);
  color: var(--night);
}

:root[data-theme="dark"] .nav .btn--ink:hover {
  background: var(--orange-hi);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .day,
  :root:not([data-theme="light"]) .foot,
  :root:not([data-theme="light"]) .track--tech {
    border-block: 1px solid var(--line);
  }

  :root:not([data-theme="light"]) .kit__item--qoder,
  :root:not([data-theme="light"]) .rubric--tech {
    border: 1px solid var(--qoder-line);
  }

  :root:not([data-theme="light"]) .nav .btn--ink {
    background: var(--orange);
    color: var(--night);
  }

  :root:not([data-theme="light"]) .nav .btn--ink:hover {
    background: var(--orange-hi);
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ps:hover,
  .brief-next a:hover {
    transform: none;
  }
}
