/* skillsaw site: the marketing page and the guide. No framework.
   Each colour is a token on :root. `light-dark()` gives the value for the colour scheme, and
   the theme toggle pins the scheme with `data-theme` on <html>. */

:root {
  color-scheme: light dark;

  /* The Workbench slate. Skillsaw is steel, as a saw blade is (the gem spec in
     ember-workbench/_src/gems/build.mjs); --skillsaw on the Workbench page has the same values. */
  --bg: light-dark(#ffffff, #0b0b14);
  --bg-soft: light-dark(#f8fafc, #12121f);
  --surface: light-dark(#ffffff, #12121f);
  --line: light-dark(#e2e8f0, #262637);
  --line-strong: light-dark(#cbd5e1, #3a3a4f);
  --text: light-dark(#334155, #cbd5e1);
  --ink: light-dark(#0f172a, #f1f5f9);
  --muted: light-dark(#475569, #a3aec2);

  /* The steel of the gem. 7.6:1 on --bg in light, 7.9:1 in dark. */
  --accent: light-dark(#475569, #94a3b8);
  --accent-soft: color-mix(in oklab, var(--accent) 10%, var(--surface));
  --accent-line: color-mix(in oklab, var(--accent) 35%, var(--surface));
  --amber: light-dark(#b45309, #fbbf24);
  --ok: light-dark(#157347, #6fcf97);
  --ok-soft: light-dark(#e6f4ec, #16301f);

  /* The filled button is the same in the two schemes: white on #475569 is 7.6:1. */
  --button: #475569;
  --button-hover: #334155;

  /* The hero band and the code blocks are dark in the two schemes. */
  --band: #0b0b14;
  --band-ink: #f8fafc;
  --band-text: #cbd5e1;
  --band-accent: #94a3b8;
  --band-line: rgb(255 255 255 / 0.12);
  --code-bg: #14121b;

  --font-sans:
    Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 2rem);
  --section: clamp(4rem, 9vw, 7rem);
  --gap: 1.5rem;
  --radius: 0.75rem;
  --shadow: 0 1px 2px rgb(20 10 15 / 0.06), 0 12px 32px rgb(20 10 15 / 0.08);
}

:root[data-theme='light'] {
  color-scheme: light;
}

:root[data-theme='dark'] {
  color-scheme: dark;
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0 0 0.75rem;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

img {
  max-width: 100%;
  height: auto;
}

code,
pre {
  font-family: var(--font-mono);
}

code {
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  border-radius: 0.3rem;
  background: var(--line);
  color: var(--ink);
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.container {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  background: var(--button);
  color: #fff;
}

.skip:focus {
  top: 0.75rem;
}

.small {
  font-size: 0.875rem;
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-nav > .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav .brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.theme-toggle {
  font: 500 0.8rem/1 var(--font-sans);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

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

@media (max-width: 575px) {
  .wide-only {
    display: none;
  }
}

/* ---------- buttons, chips ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--button);
  border-radius: 0.6rem;
  background: var(--button);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--button-hover);
  border-color: var(--button-hover);
}

.button.ghost {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.button.ghost:hover {
  background: rgb(127 127 127 / 0.14);
}

.chip {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: 0.1em;
}

.badge {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: 0.12em;
}

.badge.rec {
  background: var(--line);
  color: var(--text);
}

.badge.chosen {
  background: var(--ok-soft);
  color: var(--ok);
}

/* ---------- hero ---------- */

.hero-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--band);
  color: var(--band-text);
}

/* A faint grid, and the steel light of the blade. */
.hero-band::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 75%);
}

.hero-band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(42rem 30rem at 78% 42%, rgb(148 163 184 / 0.22), transparent 70%);
}

.hero-band :focus-visible {
  outline-color: var(--band-accent);
}

/* The blade of the gem, large, behind the hero art. */
.blade {
  position: absolute;
  z-index: -1;
  right: -9rem;
  top: 50%;
  width: 46rem;
  height: 46rem;
  margin-top: -23rem;
  color: var(--band-accent);
  opacity: 0.13;
  animation: spin 90s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* The lower edge of the band is a row of saw teeth in the page colour. */
.teeth {
  position: absolute;
  inset: auto 0 -1px;
  height: 12px;
  background: conic-gradient(from -45deg at 50% 100%, var(--bg) 90deg, transparent 0) 50% 0 / 24px
    12px repeat-x;
}

.hero {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(4rem, 9vw, 6.5rem);
}

.hero > *,
.hero-copy > * {
  min-width: 0;
}

@media (min-width: 992px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--band-accent);
}

.hero h1 {
  margin-bottom: 1.25rem;
  color: var(--band-ink);
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(90deg, #cbd5e1, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 36rem;
  margin-bottom: 2rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  color: var(--band-ink);
}

.installs {
  display: grid;
  gap: 0.75rem;
  max-width: 36rem;
}

/* A command with a copy button. Dark in the two schemes, as an editor. */
.install {
  position: relative;
  min-width: 0;
  border: 1px solid var(--band-line);
  border-radius: 0.7rem;
  background: var(--code-bg);
  color: #e2e8f0;
}

.install-label {
  margin: 0;
  padding: 0.55rem 0.9rem 0;
  color: #a8b3c4;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.install pre {
  margin: 0;
  padding: 0.5rem 4.8rem 0.75rem 0.9rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.7;
}

.install code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  overflow-wrap: normal;
}

.copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--band-line);
  border-radius: 0.45rem;
  background: rgb(255 255 255 / 0.08);
  color: #f1f5f9;
  font: 600 0.75rem/1.2 var(--font-sans);
  cursor: pointer;
}

.copy:hover {
  background: rgb(255 255 255 / 0.18);
}

.copy:focus-visible {
  outline-color: var(--band-accent);
}

/* The hero art: the result of one real interview, as a card. */
.hero-card {
  border: 1px solid var(--band-line);
  border-radius: 1rem;
  background: rgb(20 18 27 / 0.82);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 1.25rem;
  color: var(--band-text);
  font-size: 0.92rem;
}

.hero-card > p:first-child {
  margin-bottom: 0.9rem;
  color: #a8b3c4;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.hero-card code {
  background: rgb(255 255 255 / 0.1);
  color: var(--band-ink);
}

.tally {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.tally li {
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--band-line);
  border-radius: 0.7rem;
  line-height: 1.3;
  font-size: 0.8rem;
}

.tally b {
  display: block;
  color: var(--band-ink);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tally li:last-child {
  border-color: rgb(251 191 36 / 0.55);
  background: rgb(251 191 36 / 0.1);
}

.hero-q {
  margin: 0;
  padding: 0.9rem;
  border-radius: 0.7rem;
  background: rgb(255 255 255 / 0.05);
}

.hero-q p {
  margin-bottom: 0.6rem;
  color: var(--band-ink);
}

.hero-q ul {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-q li {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--band-line);
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

.hero-q li.on {
  border-color: var(--band-accent);
  color: var(--band-ink);
}

.hero-q li::before {
  content: '';
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid #8a94a6;
  border-radius: 50%;
}

.hero-q li.on::before {
  border-color: var(--band-accent);
  background: var(--band-accent);
  box-shadow: inset 0 0 0 2px var(--code-bg);
}

.hero-q small {
  margin-left: auto;
  color: #a8b3c4;
  font-size: 0.72rem;
}

/* ---------- sections of the marketing page ---------- */

.section {
  padding-block: var(--section);
}

.section.soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-head p:last-child {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  min-width: 0;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h3 {
  font-size: 1.1rem;
}

.card > :last-child {
  margin-bottom: 0;
}

/* The why: what is slow or skipped, and what skillsaw does. */
.gaps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: var(--gap);
  margin: 0 0 3rem;
  padding: 0;
  list-style: none;
  counter-reset: gap;
}

.gaps li {
  position: relative;
  padding: 1.4rem 1.4rem 1.4rem 1.4rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.gaps li > :last-child,
.answers li > :last-child {
  margin-bottom: 0;
}

.gaps h3 {
  font-size: 1.1rem;
}

.gaps .was {
  color: var(--muted);
  font-size: 0.92rem;
}

.answers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: 1.75rem 3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.answers li {
  padding-left: 1.1rem;
  border-left: 3px solid var(--accent-line);
}

.answers h3 {
  font-size: 1.15rem;
}

/* The skills as a flow of four lanes. */
.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr));
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: lane;
}

.lane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: lane;
}

.lane h3 {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.25rem;
}

.lane h3::before {
  content: counter(lane);
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--button);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0;
}

.lane > p {
  color: var(--muted);
  font-size: 0.92rem;
}

.lane ol {
  display: grid;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lane ol li {
  position: relative;
}

.lane ol li + li::before {
  content: '↓';
  position: absolute;
  top: -1.55rem;
  left: 50%;
  translate: -50%;
  color: var(--accent);
  font-weight: 700;
}

.node {
  display: block;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.6rem;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.4;
  text-decoration: none;
}

.node b {
  display: block;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

a.node:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.split > * {
  min-width: 0;
}

@media (min-width: 992px) {
  .split {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin-bottom: 1.1rem;
  padding-left: 2.6rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

/* ---------- tabs ---------- */

[role='tablist'] {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-strong);
}

[role='tab'] {
  flex: none;
  margin-bottom: -1px;
  padding: 0.65rem 0.85rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: 600 0.9rem/1.2 var(--font-sans);
  cursor: pointer;
}

[role='tab']:hover {
  color: var(--ink);
}

[role='tab'][aria-selected='true'] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

[role='tab']:focus-visible {
  outline-offset: -2px;
}

[role='tabpanel'] {
  padding-top: 1.25rem;
}

.count {
  display: inline-block;
  min-width: 1.4rem;
  margin-left: 0.15rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--line);
  color: var(--text);
  font-size: 0.72rem;
  text-align: center;
}

/* ---------- the interview view ---------- */

.iv {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.iv-request {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem 0.9rem 0.9rem 0.2rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.iv-request p {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.iv-request .iv-who {
  margin-bottom: 0.15rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.iv-note,
.iv-lead {
  color: var(--muted);
  font-size: 0.9rem;
}

.facts,
.assume,
.opts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li,
.assume li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.facts p {
  margin: 0;
}

.f-q {
  color: var(--ink);
  font-weight: 600;
}

.f-src,
.f-why {
  margin-top: 0.3rem !important;
  color: var(--muted);
  font-size: 0.85rem;
}

.f-src span {
  margin-right: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.f-why::before {
  content: 'Skipped: ';
  font-weight: 600;
}

.assume li {
  padding-left: 1.4rem;
  position: relative;
}

.assume li::before {
  content: '≈';
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 700;
}

/* On the marketing page the view is a demo: the panel scrolls in its own box. */
.home .iv [role='tabpanel'] {
  max-height: 34rem;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* One question, as the question UI shows it. */
.q {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.8rem;
  background: var(--bg-soft);
}

.q:last-child {
  margin-bottom: 0;
}

.q-head {
  margin-bottom: 0.5rem;
}

.q-n {
  color: var(--muted);
  font-size: 0.8rem;
}

.q-text {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 600;
}

.opts {
  display: grid;
  gap: 0.5rem;
}

.opt {
  display: flex;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.6rem;
  background: var(--surface);
}

.opt p {
  margin: 0;
  font-size: 0.9rem;
}

.opt .opt-name {
  font-size: 0.95rem;
}

.opt.is-chosen {
  border-color: var(--ok);
  box-shadow: inset 3px 0 0 var(--ok);
}

.radio {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.3rem;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}

.is-chosen .radio {
  border-color: var(--ok);
  background: var(--ok);
  box-shadow: inset 0 0 0 2.5px var(--surface);
}

.typed {
  margin: 0.35rem 0 !important;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.45rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
}

.effect,
.q-note {
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--amber);
  border-radius: 0 0.4rem 0.4rem 0;
  background: var(--surface);
  font-size: 0.9rem;
}

.q-note {
  border-left-color: var(--line-strong);
}

/* ---------- livery ---------- */

.livery {
  display: grid;
  gap: var(--gap);
  align-items: start;
}

.livery > * {
  min-width: 0;
}

@media (min-width: 880px) {
  .livery {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

.livery-controls {
  display: grid;
  gap: 1.1rem;
}

.livery-controls > * {
  min-width: 0;
}

.livery-controls label,
.livery-controls legend {
  display: block;
  margin-bottom: 0.35rem;
  padding: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.livery-controls fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.livery-controls input[type='text'] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.swatch {
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
}

.swatch[aria-pressed='true'] {
  box-shadow: 0 0 0 2px var(--ink);
}

.swatches input[type='color'] {
  width: 3rem;
  height: 2.25rem;
  padding: 0.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: var(--surface);
  cursor: pointer;
}

/* A small artifact page. As in the real pages, each tint comes from --accent. */
.livery-preview {
  --pick: #be123c;
  --accent: var(--pick);
  --p-surface: light-dark(#ffffff, #1f1f23);
  --p-line: light-dark(#eceae6, #2a2a2f);
  --p-ink: light-dark(#181818, #ededee);
  --p-text: light-dark(#2e2e2e, #d4d4d8);
  --p-muted: light-dark(#5b5b5b, #a0a0a6);
  --accent-soft: color-mix(in oklab, var(--accent) 12%, var(--p-surface));
  --accent-line: color-mix(in oklab, var(--accent) 38%, var(--p-surface));
  --accent-strong: color-mix(in oklab, var(--accent) 86%, var(--p-ink));
  --accent-ink: color-mix(in oklab, var(--accent) 62%, var(--p-ink));
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid var(--line-strong);
  border-radius: 0.8rem;
  background: var(--p-surface);
  box-shadow: var(--shadow);
  color: var(--p-text);
  font-size: 0.92rem;
}

/* On a dark page the real pages make the accent lighter, with the same formula. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .livery-preview {
    --accent: color-mix(in oklab, var(--pick) 62%, #fff);
  }
}

:root[data-theme='dark'] .livery-preview {
  --accent: color-mix(in oklab, var(--pick) 62%, #fff);
}

.p-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--p-line);
}

.p-name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: var(--p-ink);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  background: var(--accent);
  color: var(--p-surface);
  font-weight: 800;
}

.p-pill {
  flex: none;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--p-line);
  border-radius: 999px;
  color: var(--p-muted);
  font-size: 0.75rem;
}

.p-over {
  margin: 0;
  color: var(--p-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.livery-preview h3 {
  margin: 0.2rem 0 0.5rem;
  color: var(--p-ink);
  font-size: 1.3rem;
}

.p-tag {
  display: inline-block;
  padding: 0.05rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 600;
}

.p-tabs {
  display: flex;
  gap: 0.25rem;
  margin: 1rem 0;
  border-bottom: 1px solid var(--p-line);
  color: var(--p-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.p-tabs span {
  margin-bottom: -1px;
  padding: 0.5rem 0.7rem;
  border-bottom: 2px solid transparent;
}

.p-tabs .on {
  border-bottom-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.p-callout {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--p-line);
  border-left: 4px solid var(--accent);
  border-radius: 0.5rem;
}

.p-id {
  margin-right: 0.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: 0.25rem;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font: 600 0.75rem/1.5 var(--font-mono);
}

.livery-preview p:last-child {
  margin-bottom: 0;
}

.p-link {
  color: var(--accent-strong);
  text-decoration: underline;
}

/* ---------- screenshots ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.shot {
  display: block;
  color: inherit;
  text-decoration: none;
}

.shot img {
  display: block;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0.7rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

a.shot:hover img {
  transform: translateY(-3px);
  border-color: var(--accent);
}

/* A video poster: a play mark on the picture. */
.shot .poster {
  position: relative;
  display: block;
}

.shot .poster::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 4.5rem;
  height: 4.5rem;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--button)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l10 6-10 6z' fill='%23fff'/%3E%3C/svg%3E")
    center / 55% no-repeat;
  box-shadow: var(--shadow);
}

.shot b {
  display: block;
  margin-top: 0.75rem;
  color: var(--ink);
}

.shot span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- tables, code ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.7rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.md td {
  min-width: 7rem;
}

.md td:nth-child(5),
.md td:nth-child(6) {
  min-width: 17rem;
}

.term {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border-radius: 0.7rem;
  background: var(--code-bg);
  color: #e2e8f0;
  font-size: 0.82rem;
  line-height: 1.75;
}

.term code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  overflow-wrap: normal;
}

.term .p {
  color: var(--band-accent);
  user-select: none;
}

.term .c {
  color: #a8b3c4;
}

/* ---------- footer ---------- */

/* ---------- the Workbench footer ----------
   The footer and its CSS (workbench-footer.css) come from the Workbench footer kit in
   scripts/workbench-footer/. Here the site gives only its accent and its width. */

.wb-footer {
  --wb-accent: var(--accent);
  --wb-max: 1200px;
}

/* ---------- the guide ---------- */

.guide-shell {
  display: grid;
  gap: 2rem 3rem;
  padding-block: 2rem 4rem;
}

.guide-shell > * {
  min-width: 0;
}

.guide-nav > ul,
.guide-nav ul ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-nav p {
  margin: 0 0 0.3rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guide-nav a {
  display: block;
  padding: 0.35rem 0.7rem;
  border-radius: 0.45rem;
  color: var(--text);
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
}

.guide-nav a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.guide-nav a[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* On a narrow screen the menu is one row that scrolls in its own box. */
@media (max-width: 899px) {
  .guide-nav {
    margin-inline: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 0.75rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
  }

  .guide-nav > ul,
  .guide-nav ul ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .guide-nav > ul {
    gap: 1rem;
  }

  .guide-nav > ul > li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .guide-nav p {
    margin: 0;
  }
}

@media (min-width: 900px) {
  .guide-shell {
    grid-template-columns: 12.5rem minmax(0, 1fr);
  }

  .guide-nav {
    position: sticky;
    top: 5rem;
    align-self: start;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
  }

  .guide-nav > ul > li {
    margin-bottom: 1.25rem;
  }
}

.doc > :is(p, ul, ol, h1, h2, h3, .callout, .lead) {
  max-width: 46rem;
}

.doc h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.doc h1 code {
  background: none;
  padding: 0;
  font-size: 0.92em;
}

.doc .lead {
  margin-bottom: 1.5rem;
  color: var(--text);
  font-size: 1.2rem;
}

.doc h2 {
  margin-top: 3.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 1.6rem;
  scroll-margin-top: 4.5rem;
}

.doc h3 {
  margin-top: 2rem;
  font-size: 1.15rem;
}

.doc h4 {
  margin-top: 1.5rem;
  font-size: 1rem;
}

.doc h5 {
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.doc li {
  margin-bottom: 0.35rem;
}

.doc .facts li,
.doc .assume li,
.doc .opts li {
  margin-bottom: 0;
}

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  max-width: none !important;
}

.jump a {
  display: block;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.85rem;
  text-decoration: none;
}

.jump a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.callout {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  border-radius: 0.6rem;
  background: var(--bg-soft);
}

.callout > :last-child {
  margin-bottom: 0;
}

.learned {
  padding: 0;
  list-style: none;
}

.learned li {
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 0.6rem;
  background: var(--bg-soft);
}

.learned li.fixed {
  border-left-color: var(--ok);
}

.learned b {
  display: block;
  color: var(--ink);
}

/* The live artifact, in a frame. */
.frame {
  margin: 0 0 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.8rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.frame figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 0.88rem;
}

.frame iframe {
  display: block;
  width: 100%;
  height: min(42rem, 80vh);
  border: 0;
  background: #fff;
}

.frame video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}

.shots {
  display: grid;
  grid-template-columns: 1fr 1fr 0.31fr;
  gap: 1rem;
  align-items: start;
  margin: 0 0 1.5rem;
}

.shots figure {
  margin: 0;
  min-width: 0;
}

.shots img {
  display: block;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
}

.shots figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .shots {
    grid-template-columns: 1fr;
  }

  .shots figure:last-child {
    max-width: 14rem;
  }
}

/* The score of each round. */
.scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.75rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.scores li {
  position: relative;
}

.scores li + li::before {
  content: '→';
  position: absolute;
  left: -2rem;
  top: 0.55rem;
  color: var(--accent);
  font-size: 1.4rem;
}

.score-n {
  display: block;
  color: var(--ink);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.scores li:last-child .score-n {
  color: var(--ok);
}

.score-l {
  color: var(--muted);
  font-size: 0.82rem;
}

.md ul {
  padding-left: 1.2rem;
}

.md .task {
  list-style: none;
  margin-left: -1.2rem;
}

.md .task::before {
  content: '☐ ';
}

.md .task.done::before {
  content: '☑ ';
  color: var(--ok);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.pager a {
  display: block;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.6rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.pager a:hover {
  border-color: var(--accent);
}

.pager span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}

.pager-next {
  text-align: right;
}

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

  .blade {
    animation: none;
  }

  .shot img {
    transition: none;
  }
}

/* On the marketing page the bar is dark in the two themes, so it is one piece with the hero. */
.home .site-nav {
  background: var(--band);
  border-bottom-color: var(--band-line);
}

.home .site-nav a {
  color: var(--band-text);
}

.home .site-nav a:hover,
.home .site-nav .brand-link {
  color: var(--band-ink);
}

.home .site-nav .theme-toggle {
  border-color: var(--band-line);
  background: rgb(255 255 255 / 0.08);
  color: var(--band-ink);
}

.home .site-nav :focus-visible {
  outline-color: var(--band-accent);
}

/* A key or a command in the first column stays on one line; the table scrolls in its box. */
td:first-child code {
  white-space: nowrap;
}

/* A wood grain under the hero, the same on each Workbench site. It is drawn by an SVG filter:
   long, thin noise, cut into bands. */
.hero-band > .wood {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'1600'%20height%3D'900'%20viewBox%3D'0%200%201600%20900'%20preserveAspectRatio%3D'none'%3E%3Cfilter%20id%3D'g'%20x%3D'0'%20y%3D'0'%20width%3D'100%25'%20height%3D'100%25'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.0006%200.009'%20numOctaves%3D'2'%20seed%3D'11'%2F%3E%3CfeColorMatrix%20type%3D'matrix'%20values%3D'0%200%200%200%201%20%200%200%200%200%200.83%20%200%200%200%200%200.64%20%201%200%200%200%200'%2F%3E%3CfeComponentTransfer%3E%3CfeFuncA%20type%3D'table'%20tableValues%3D'0%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200'%2F%3E%3C%2FfeComponentTransfer%3E%3C%2Ffilter%3E%3Crect%20width%3D'1600'%20height%3D'900'%20filter%3D'url(%23g)'%20opacity%3D'1'%2F%3E%3C%2Fsvg%3E")
    center / cover no-repeat;
  opacity: 0.12;
}
