/* Taskmaster's public site. The app's own tokens: graphite and ink in dark, with colour
   only for status; paper and ink with verdigris in light. No gradients, no glow. */

:root {
  --bg: #09090a;
  --bg-elev: #131315;
  --bg-sunken: #0b0b0c;
  --ink: #ededf0;
  --ink-2: #c4c4cb;
  --muted: #9a9aa4;
  --line: #ffffff14;
  --line-strong: #ffffff26;
  --accent: #ededf0;
  --accent-ink: #09090a;
  --good: #86cf78;
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px #c4c4cb;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wide: 1120px;
  color-scheme: dark;
}

:root.light {
  --bg: #f6f3ec;
  --bg-elev: #fffdf8;
  --bg-sunken: #ece8de;
  --ink: #1c1b18;
  --ink-2: #3d3a34;
  --muted: #605b51;
  --line: #2a200e1a;
  --line-strong: #2a200e30;
  --accent: #0b6b62;
  --accent-ink: #ffffff;
  --good: #1e6c34;
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px #0b6b62;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--bg-elev); padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 10; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; text-decoration: none; letter-spacing: -0.02em; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top nav a { text-decoration: none; color: var(--ink-2); padding: 6px 10px; border-radius: 6px; font-size: 15px; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); background: var(--bg-elev); }
.theme {
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); border-radius: 6px;
  height: 32px; padding: 0 10px; font: inherit; font-size: 14px; cursor: pointer; margin-left: 6px;
}
.theme:hover { color: var(--ink); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 8px;
  font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--line-strong); color: var(--ink);
}
.button:hover { background: var(--bg-elev); }
.button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button.primary:hover { filter: brightness(0.92); }
.button small { font-weight: 500; opacity: 0.8; }

/* Hero */
.hero { padding: 88px 0 48px; }
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: 0.02em; margin: 0 0 18px; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.035em; margin: 0; max-width: 15ch; font-weight: 700; }
.hero h1 span { color: var(--muted); }
.lede { font-size: clamp(17px, 2.1vw, 20px); color: var(--ink-2); max-width: 60ch; margin: 24px 0 32px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hint { color: var(--muted); font-size: 14px; }

/* The run picture */
.shot { margin: 40px 0 0; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--bg-elev); }
.shot figcaption { padding: 10px 16px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
:root.light .dark-only, :root:not(.light) .light-only { display: none; }

/* Sections */
section.band { padding: 72px 0; border-top: 1px solid var(--line); }
section.band h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 12px; }
section.band > .wrap > p.lead { color: var(--ink-2); max-width: 62ch; margin: 0 0 36px; font-size: 18px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.steps li { padding: 22px 20px 24px; border-left: 1px solid var(--line); background: var(--bg-elev); }
.steps li:first-child { border-left: 0; }
.steps .n { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.steps h3 { margin: 6px 0 8px; font-size: 18px; letter-spacing: -0.015em; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; }

.numbers { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.numbers caption { text-align: left; color: var(--muted); font-size: 14px; padding-bottom: 12px; }
.numbers th, .numbers td { padding: 10px 12px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
.numbers th:first-child, .numbers td:first-child { text-align: left; white-space: normal; }
.numbers thead th { color: var(--muted); font-weight: 500; border-top: 0; }
.numbers tbody th { font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 12px; padding: 8px 8px 0; background: var(--bg-elev); }
.note { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 70ch; }

.providers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.providers li { border: 1px solid var(--line-strong); border-radius: 10px; padding: 16px; background: var(--bg-elev); }
.providers strong { display: block; font-size: 16px; }
.providers span { color: var(--muted); font-size: 14px; }

.closing { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; }

/* Releases */
.releases-head { padding: 56px 0 24px; }
.releases-head h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.03em; margin: 0 0 8px; }
.latest { border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg-elev); padding: 24px; margin-bottom: 40px; }
.latest-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.latest-title h2 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.downloads a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; text-decoration: none; }
.downloads a:hover { background: var(--bg); }
.downloads a.mine { border-color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ink-2); }
:root.light .downloads a.mine { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.downloads .what { font-weight: 600; }
.downloads .file { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.downloads .yours { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.notes { color: var(--ink-2); max-width: 75ch; }
.notes h3, .notes h4 { color: var(--ink); margin: 18px 0 6px; font-size: 17px; }
.notes ul { padding-left: 22px; }
.sums { margin-top: 12px; }
.sums summary { cursor: pointer; color: var(--ink-2); }
.sums pre { font-family: var(--mono); font-size: 12px; overflow-x: auto; background: var(--bg-sunken); border: 1px solid var(--line); border-radius: 8px; padding: 12px; color: var(--ink-2); }
.older { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.older > li { border-bottom: 1px solid var(--line); }
.older details > summary { display: flex; gap: 14px; align-items: baseline; padding: 14px 4px; cursor: pointer; }
.older .v { font-weight: 650; }
.older .date { color: var(--muted); font-size: 14px; }
.older .body { padding: 0 4px 20px; }
.empty { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 28px; color: var(--ink-2); }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { border-left: 0; }
  .steps li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .providers { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .top nav a.hide-narrow { display: none; }
  .hero { padding: 56px 0 32px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { border-left: 0; border-top: 1px solid var(--line); }
  .steps li:first-child { border-top: 0; }
  .providers { grid-template-columns: 1fr; }
  .button { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .top nav a, .downloads a { transition: background 120ms ease, filter 120ms ease; }
}
