/* Repo Maintainer — charcoal identity shared with repomaintainer.com/docs */

/* Type: Archivo (sans) and JetBrains Mono, self-hosted Latin subsets under the
   SIL Open Font License. Licenses ship beside the files in /fonts/. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/archivo.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Charcoal is the default; theme.js sets data-theme before first paint. */
:root {
  --bg: #151514;
  --raised: #1b1b1a;
  --hover: #222220;
  --sunken: #0f0f0e;
  --field: #0f0f0e;
  --rule: #2b2a28;
  --rule-strong: #3b3a37;
  --field-border: #4a4945;
  --fg: #efebe2;
  --text: #cdc8bd;
  --muted: #918c82;
  --faint: #918c82;
  --accent: #d9a24a;
  --accent-soft: #d9a24a73;
  --accent-wash: #d9a24a1f;
  --on-accent: #151514;
  --mark: #d9a24a;
  --ok: #a3b78f;
  --ok-soft: #a3b78f59;
  --bad: #dc8268;
  --bad-soft: #dc826866;
  --bad-text: #efb8a6;
  --selection: #d9a24a4d;
  color-scheme: dark;

  --sans: "Archivo", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --pad: clamp(20px, 4.5vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --quick: 140ms;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Light: drafting paper, graphite ink, the same amber deepened for text contrast. */
:root[data-theme="light"] {
  --bg: #f4f2ed;
  --raised: #ebe8e1;
  --hover: #e3e0d8;
  --sunken: #e9e6de;
  --field: #fbfaf7;
  --rule: #dcd8cf;
  --rule-strong: #c4bfb3;
  --field-border: #a39d90;
  --fg: #191816;
  --text: #36342f;
  --muted: #5f5b53;
  --faint: #6b665d;
  --accent: #8d5b0c;
  --accent-soft: #8d5b0c66;
  --accent-wash: #d9a24a2e;
  --on-accent: #fffaf0;
  --mark: #d9a24a;
  --ok: #46652b;
  --ok-soft: #46652b59;
  --bad: #a1401f;
  --bad-soft: #a1401f59;
  --bad-text: #8f3a1d;
  --selection: #d9a24a59;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--selection); color: var(--fg); }
code, pre { font-family: var(--mono); font-variant-ligatures: none; }
.hidden, [hidden] { display: none !important; }
[data-theme-switching] *, [data-theme-switching] *::before, [data-theme-switching] *::after { transition: none !important; }
@media (prefers-reduced-motion: no-preference) {
  [data-theme-switching] .theme-toggle svg { transition: opacity .2s, transform .35s var(--ease) !important; }
}

/* Frame */

.shell {
  max-width: 1280px;
  min-height: 100vh;
  margin: 0 auto;
  border-inline: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}

/* Navigation */

.nav {
  height: 64px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 16px/1 var(--sans);
  letter-spacing: -.015em;
  color: var(--fg);
  white-space: nowrap;
}
.mark { width: 18px; height: 18px; flex: none; }
.mark path { fill: var(--fg); }
.mark rect { fill: var(--mark); transition: transform .3s var(--ease); transform-origin: 18px 18px; }
.brand:hover .mark rect { transform: scale(.82); }
.brand-tag {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--rule-strong);
  font: 500 11px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.navlinks {
  display: flex;
  align-items: center;
  gap: 22px;
  font: 500 14px var(--sans);
  color: var(--muted);
}
.navlinks > a:not(.button):not(.repo-link) { transition: color var(--quick); }
.navlinks > a:not(.button):not(.repo-link):hover { color: var(--fg); }
.navlinks .button { height: 32px; padding: 0 14px; font-size: 13.5px; }

.repo-link {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  font: 12px var(--mono);
  color: var(--text);
  transition: border-color var(--quick), color var(--quick);
}
.repo-link:hover { border-color: var(--muted); color: var(--fg); }
.repo-link > * { display: inline-flex; align-items: center; }
.repo-link .gh { width: 14px; height: 14px; margin: auto 0 auto 10px; fill: currentColor; }
.repo-name { padding: 0 10px 0 8px; }
.stars { gap: 5px; padding: 0 10px; border-left: 1px solid var(--rule-strong); color: var(--fg); font-variant-numeric: tabular-nums; }
.stars [aria-hidden] { color: var(--accent); }
.stars:not([hidden]) { animation: fade-in .4s var(--ease) both; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  transition: border-color var(--quick), color var(--quick), background-color var(--quick);
}
.theme-toggle:hover { border-color: var(--muted); color: var(--fg); background: var(--raised); }
.theme-toggle svg {
  grid-area: 1 / 1;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity .2s, transform .35s var(--ease);
}
:root:not([data-theme]) .theme-toggle { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon,
[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }

/* Shared elements */

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--fg);
  font: 500 14px/1.2 var(--sans);
  white-space: nowrap;
  transition: background-color var(--quick), border-color var(--quick), color var(--quick), transform var(--quick);
}
.button:hover { border-color: var(--muted); background: var(--raised); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button.primary, .button.dark { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.button.primary:hover, .button.dark:hover { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.button [aria-hidden], .text-link [aria-hidden] { display: inline-block; transition: transform .2s var(--ease); }
.button:hover [aria-hidden], .text-link:hover [aria-hidden] { transform: translateX(2px); }
.text-link {
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  padding-bottom: 2px;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat, linear-gradient(var(--accent-soft), var(--accent-soft)) 0 100% / 100% 1px no-repeat;
  transition: color var(--quick), background-size .3s var(--ease);
}
.text-link:hover { color: var(--accent); background-size: 100% 1px, 100% 1px; }
.kicker, .eyebrow {
  margin: 0;
  font: 500 11.5px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.badge {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  font: 500 11px/1.2 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text);
}
.badge.completed { color: var(--ok); border-color: var(--ok-soft); }
.badge.running, .badge.queued, .badge.preview { color: var(--accent); border-color: var(--accent-soft); }
.badge.failed, .badge.cancelled { color: var(--bad); border-color: var(--bad-soft); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.repo-label { font: 12.5px var(--mono); color: var(--text); }
.muted { font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.code { font-family: var(--mono); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--text); }
.label { display: block; margin-bottom: 8px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }

/* Landing: hero */

main { flex: 1; }
.hero { padding: clamp(64px, 9vw, 120px) var(--pad) 0; }
.hero h1 {
  margin: 28px 0 0;
  font-weight: 600;
  font-size: clamp(40px, 6.6vw, 82px);
  line-height: 1;
  letter-spacing: -.042em;
  color: var(--fg);
}
.hero h1 span { display: block; }
.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 5fr);
  align-items: start;
  gap: 40px clamp(40px, 6vw, 96px);
  margin-top: clamp(40px, 5vw, 64px);
  padding: 28px 0 clamp(56px, 7vw, 88px);
  border-top: 1px solid var(--rule);
}
.lede { max-width: 600px; margin: 0 0 32px; font-size: 18px; line-height: 1.65; color: var(--text); }
.facts { margin: 0; border-top: 1px solid var(--rule-strong); }
.facts div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.facts dt { padding-top: 2px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--fg); }
.facts code { margin-right: 4px; font-size: 12.5px; color: var(--text); }

/* Landing: illustrative run record */

.record { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.record-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px var(--pad);
  border-bottom: 1px solid var(--rule);
  font: 12px var(--mono);
  color: var(--text);
}
.record-note { letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-size: 11px; }
.record-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.pipeline { margin: 0; padding: 0; list-style: none; border-right: 1px solid var(--rule); }
.pipeline li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 14px;
  padding: 20px var(--pad) 20px calc(var(--pad) + 28px);
  border-bottom: 1px solid var(--rule);
}
.pipeline li:last-child { border-bottom: 0; }
/* Timeline: one node per stage, joined to the next stage. */
.pipeline li::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 27px;
  left: calc(var(--pad) + 2px);
  width: 9px;
  height: 9px;
  border: 1px solid var(--muted);
  background: var(--bg);
}
.pipeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 36px;
  bottom: -27px;
  left: calc(var(--pad) + 6px);
  width: 1px;
  background: var(--rule-strong);
  transform-origin: top;
}
.pipeline li:nth-child(4)::before { border-color: var(--ok); background: var(--ok); }
.pipeline li:last-child::before { border-color: var(--mark); background: var(--mark); }
.pipeline strong, .steps strong { display: block; font-weight: 600; font-size: 16px; letter-spacing: -.01em; color: var(--fg); margin-bottom: 4px; }
.pipeline li > div > span, .steps li > span { display: block; font-size: 14px; line-height: 1.6; color: var(--muted); }
.pipeline code { font-size: 12px; color: var(--text); }
.state { font: 12px var(--mono); color: var(--text); white-space: nowrap; }
.state.ok, .checks .ok { color: var(--ok); }
.state.result { padding: 3px 7px; border: 1px solid var(--accent-soft); border-radius: 2px; color: var(--accent); }
.artifact { padding: 28px var(--pad) 32px; background: var(--sunken); min-width: 0; }
.task p { margin: 0 0 28px; font-size: 20px; font-weight: 500; line-height: 1.4; letter-spacing: -.012em; color: var(--fg); }
.file {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  font: 12px var(--mono);
  color: var(--text);
}
.file span + span { color: var(--faint); }
.diff {
  margin: 0 0 18px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}
.diff .hunk, .diff .more { color: var(--faint); }
.diff .add { color: var(--ok); }
.diff .del { color: var(--bad); }
.checks { border-top: 1px solid var(--rule); }
.checks div {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font: 12px var(--mono);
}
.checks code { color: var(--text); }
.output { margin-top: 22px; }
.output code { font-size: 12.5px; color: var(--fg); word-break: break-all; }

/* Landing: sections */

.section { padding: clamp(64px, 8vw, 112px) var(--pad); border-bottom: 1px solid var(--rule); }
.section-head { display: grid; align-content: start; gap: 16px; margin-bottom: clamp(36px, 4.5vw, 56px); }
.section h2 {
  margin: 0;
  max-width: 20ch;
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -.03em;
  color: var(--fg);
}
.section.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px clamp(40px, 5vw, 80px); }
.section.split .section-head { margin-bottom: 0; }
.section.split h2 { font-size: clamp(28px, 2.8vw, 36px); max-width: 14ch; }
.section-body { min-width: 0; }

.outcomes { border-top: 1px solid var(--rule-strong); }
.outcomes-head, .outcomes article {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.outcomes-head { padding: 10px 0; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.outcome { display: inline-flex; align-items: center; align-self: start; gap: 10px; padding-top: 3px; font-size: 13px; color: var(--fg); }
.outcome::before { content: ""; width: 8px; height: 8px; background: var(--muted); }
.outcome.changed::before { background: var(--ok); }
.outcome.blocked::before { background: var(--bad); }
.outcomes p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--fg); }
.outcomes span { font-size: 14px; line-height: 1.6; color: var(--muted); }
.outcomes span code, .spec code, .footnote code, .next-links code { font-size: .88em; color: var(--text); }
.footnote { max-width: 640px; margin: 24px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--muted); }

.spec { margin: 0; border-bottom: 1px solid var(--rule); }
.spec div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 3fr);
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.spec div:first-child { border-top-color: var(--rule-strong); }
.spec dt { padding-top: 4px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.spec dd { margin: 0; max-width: 680px; font-size: 16px; line-height: 1.6; color: var(--text); }

.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule-strong); }
.choice article { display: flex; flex-direction: column; min-width: 0; padding: 32px 0 0; }
.choice article:first-child { padding-right: clamp(28px, 4vw, 56px); border-right: 1px solid var(--rule); }
.choice article.hosted { padding-left: clamp(28px, 4vw, 56px); }
.choice-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.choice-kind { font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.choice h3 { margin: 28px 0 12px; font-weight: 600; font-size: 24px; letter-spacing: -.02em; color: var(--fg); }
.choice p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--muted); }
.choice .actions { margin-top: auto; padding-top: 28px; }
.terminal {
  margin: 28px 0 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: var(--sunken);
  border: 1px solid var(--rule);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--fg);
}
.prompt { color: var(--faint); user-select: none; }
.steps { margin: 24px 0 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--rule); }
.steps strong { font-size: 15px; margin: 0; }
.choice .subnote { margin-top: 18px; font-size: 13px; color: var(--faint); }

.next-links { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule-strong); }
.next-links li { border-bottom: 1px solid var(--rule); }
.next-links a {
  display: grid;
  grid-template-columns: minmax(150px, 2fr) minmax(0, 5fr) 16px;
  gap: 24px;
  align-items: baseline;
  padding: 18px 12px;
  margin: 0 -12px;
  transition: background-color var(--quick);
}
.next-links a::after { content: "→"; content: "→" / ""; color: var(--faint); transition: transform .2s var(--ease), color var(--quick); }
.next-links a:hover { background: var(--raised); }
.next-links a:hover::after { color: var(--accent); transform: translateX(3px); }
.next-links strong { font-weight: 600; font-size: 16px; color: var(--fg); transition: color var(--quick); }
.next-links a:hover strong { color: var(--accent); }
.next-links span { font-size: 14.5px; line-height: 1.6; color: var(--muted); }

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 24px var(--pad) 28px;
  border-top: 1px solid var(--rule);
  font: 12px var(--mono);
  color: var(--muted);
}
.footer a { color: var(--text); transition: color var(--quick); }
.footer a:hover { color: var(--fg); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .mark { width: 14px; height: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-note { color: var(--faint); }

/* Workspace */

.app-layout { flex: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; gap: 2px; padding: 32px 16px; border-right: 1px solid var(--rule); }
.sidebar small { margin: 28px 12px 8px; font: 500 10.5px var(--mono); letter-spacing: .08em; color: var(--faint); }
.sidebar small:first-child { margin-top: 0; }
.side-item {
  padding: 9px 12px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
  transition: color var(--quick), background-color var(--quick), box-shadow .2s var(--ease);
}
.side-item:hover { color: var(--fg); background: var(--raised); }
.side-item.active { color: var(--fg); background: var(--raised); box-shadow: inset 2px 0 0 var(--accent); }
.main { padding: 40px var(--pad) 72px; min-width: 0; }
.main h1, .login h1 { margin: 0 0 8px; font-weight: 600; font-size: 30px; letter-spacing: -.03em; line-height: 1.15; color: var(--fg); }
.page-head { align-items: flex-end; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 32px 0; background: var(--rule); border: 1px solid var(--rule); }
.stat { padding: 16px 20px 18px; background: var(--bg); }
.stat span { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.stat strong { display: block; margin-top: 16px; font: 500 30px/1 var(--mono); color: var(--fg); font-variant-numeric: tabular-nums; }

.panel { margin: 22px 0; border: 1px solid var(--rule); background: var(--bg); overflow: hidden; }
.panel-head { padding: 12px 20px; border-bottom: 1px solid var(--rule); font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.panel-head .side-item { padding: 4px 8px; font: inherit; letter-spacing: inherit; }
.empty { padding: 56px 30px; text-align: center; font-size: 14.5px; line-height: 1.8; color: var(--muted); }
.job { padding: 22px 20px; border-bottom: 1px solid var(--rule); }
.job:last-child { border-bottom: 0; }
.job h3 { margin: 12px 0 6px; font-weight: 500; font-size: 17px; line-height: 1.4; letter-spacing: -.01em; color: var(--fg); }
.job p { margin: 10px 0 0; font-size: 14px; line-height: 1.65; color: var(--muted); }
.job .meta { font: 11.5px var(--mono); color: var(--faint); }
.job-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 14px; }
.job-actions:empty { display: none; }

.notice {
  margin-bottom: 24px;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  background: var(--raised);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.notice.error { border-left-color: var(--bad); color: var(--bad-text); }

.form { display: grid; gap: 20px; padding: 24px 20px; }
.field { display: grid; gap: 8px; font-size: 14px; font-weight: 500; color: var(--fg); }
.field small { font-size: 12.5px; font-weight: 400; line-height: 1.6; color: var(--muted); }
input, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--field-border);
  border-radius: 2px;
  background: var(--field);
  color: var(--fg);
  font-size: 14.5px;
  font-weight: 400;
  transition: border-color var(--quick), box-shadow var(--quick);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, textarea:hover { border-color: var(--muted); }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); outline: none; }
input:focus-visible, textarea:focus-visible { outline: none; }
textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
textarea.code { font-size: 12.5px; color: var(--fg); }
details summary { cursor: pointer; }
details[open] summary { margin-bottom: 12px; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.6; color: var(--text); }
.consent input { width: auto; margin-top: 4px; accent-color: var(--accent); box-shadow: none; }
.consent input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.connection { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 20px; }
.connection h3 { margin: 0 0 4px; font-weight: 600; font-size: 16px; color: var(--fg); }
.connection p { margin: 0; font-size: 14px; color: var(--muted); }
.connection + .form { border-top: 1px solid var(--rule); }
.login { width: min(560px, 100% - 2 * var(--pad)); margin: clamp(64px, 12vh, 128px) auto; }
.login .kicker { margin-bottom: 20px; }
.login h1 { font-size: clamp(30px, 4.4vw, 40px); margin-bottom: 16px; }
.login .button { margin: 12px 0 8px; }
.login .notice { margin: 20px 0 8px; }

/* Motion. Everything below only adds movement; content never depends on it. */

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes step-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes draw-down { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes node-in { from { transform: scale(0); } to { transform: none; } }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  /* Page entrance: pure CSS, so it also runs when scripts do not. */
  .hero > .kicker { animation: fade-in .5s var(--ease) both; }
  .hero h1 span { animation: rise .7s var(--ease) both; }
  .hero h1 span:nth-child(1) { animation-delay: 60ms; }
  .hero h1 span:nth-child(2) { animation-delay: 140ms; }
  .hero-foot { animation: fade-in .7s var(--ease) 260ms both; }
  .hero .facts div { animation: rise .5s var(--ease) both; }
  .hero .facts div:nth-child(1) { animation-delay: 320ms; }
  .hero .facts div:nth-child(2) { animation-delay: 360ms; }
  .hero .facts div:nth-child(3) { animation-delay: 400ms; }
  .hero .facts div:nth-child(4) { animation-delay: 440ms; }
  .hero .facts div:nth-child(5) { animation-delay: 480ms; }
  .hero .facts div:nth-child(6) { animation-delay: 520ms; }

  /* Scroll reveal, only once motion.js has opted the page in. */
  .reveal [data-reveal]:not(.record) { transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .reveal [data-reveal]:not(.record):not(.is-visible) { opacity: 0; transform: translateY(18px); }

  /* The run record plays its stages in order. */
  .reveal .record:not(.is-visible) .pipeline li,
  .reveal .record:not(.is-visible) .artifact > * { opacity: 0; }
  .reveal .record.is-visible .pipeline li { animation: step-in .45s var(--ease) both; }
  .reveal .record.is-visible .pipeline li::before { animation: node-in .3s var(--ease) both; animation-delay: inherit; }
  .reveal .record.is-visible .pipeline li::after { animation: draw-down .35s var(--ease) both; }
  .reveal .record.is-visible .pipeline li:nth-child(1) { animation-delay: 0ms; }
  .reveal .record.is-visible .pipeline li:nth-child(2) { animation-delay: 160ms; }
  .reveal .record.is-visible .pipeline li:nth-child(3) { animation-delay: 320ms; }
  .reveal .record.is-visible .pipeline li:nth-child(4) { animation-delay: 480ms; }
  .reveal .record.is-visible .pipeline li:nth-child(5) { animation-delay: 640ms; }
  .reveal .record.is-visible .pipeline li:nth-child(1)::after { animation-delay: 120ms; }
  .reveal .record.is-visible .pipeline li:nth-child(2)::after { animation-delay: 280ms; }
  .reveal .record.is-visible .pipeline li:nth-child(3)::after { animation-delay: 440ms; }
  .reveal .record.is-visible .pipeline li:nth-child(4)::after { animation-delay: 600ms; }
  .reveal .record.is-visible .artifact > * { animation: fade-in .5s var(--ease) both; }
  .reveal .record.is-visible .artifact > :nth-child(1) { animation-delay: 80ms; }
  .reveal .record.is-visible .artifact > :nth-child(2),
  .reveal .record.is-visible .artifact > :nth-child(3) { animation-delay: 260ms; }
  .reveal .record.is-visible .artifact > :nth-child(4),
  .reveal .record.is-visible .artifact > :nth-child(5) { animation-delay: 420ms; }
  .reveal .record.is-visible .artifact > :nth-child(6) { animation-delay: 560ms; }
  .reveal .record.is-visible .artifact > :nth-child(7) { animation-delay: 720ms; }

  /* Workspace: views and panels ease in each time they are shown. */
  .login:not(.hidden), .main > section:not(.hidden) { animation: rise .4s var(--ease) both; }
  #new-panel:not(.hidden), .notice:not(.hidden) { animation: open .28s var(--ease) both; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0s !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

@media print {
  [data-reveal], .record li, .artifact > * { opacity: 1 !important; transform: none !important; }
  .theme-toggle { display: none; }
}

/* Responsive */

@media (max-width: 1024px) {
  .record-body { grid-template-columns: minmax(0, 1fr); }
  .pipeline { border-right: 0; border-bottom: 1px solid var(--rule); }
  .choice { grid-template-columns: minmax(0, 1fr); }
  .choice article:first-child { padding: 32px 0 40px; border-right: 0; }
  .choice article.hosted { padding-left: 0; border-top: 1px solid var(--rule); }
  .section.split { grid-template-columns: minmax(0, 1fr); }
  .section.split h2 { max-width: 20ch; }
}

@media (max-width: 860px) {
  .navlinks { gap: 16px; }
  .navlinks .secondary { display: none; }
  .hero-foot { grid-template-columns: minmax(0, 1fr); }
  .outcomes-head { display: none; }
  .outcomes article { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .next-links a { grid-template-columns: minmax(0, 1fr) 16px; gap: 4px 16px; }
  .next-links span { grid-column: 1; }
  .next-links a::after { grid-column: 2; grid-row: 1; }
  .app-layout { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .site .nav { height: auto; flex-wrap: wrap; row-gap: 12px; padding-block: 14px; }
  .site .navlinks { display: contents; }
  .site .nav .theme-toggle { order: 1; margin-left: auto; }
  .site .nav .button { order: 1; }
  .site .nav::after { content: ""; order: 1; flex-basis: 100%; }
  .site .navlinks > a:not(.button) { order: 2; }
  .site .navlinks > a:first-child { margin-right: auto; }
}

@media (max-width: 640px) {
  .shell { border-inline: 0; }
  .brand-tag { display: none; }
  .hero h1 { margin-top: 20px; letter-spacing: -.035em; }
  .lede { font-size: 16.5px; }
  .pipeline li { grid-template-columns: minmax(0, 1fr); }
  .pipeline .state { justify-self: start; }
  .record-head { flex-direction: column; gap: 4px; }
  .spec div, .facts div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .steps li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .app-layout { display: block; }
  .sidebar { flex-direction: row; gap: 6px; padding: 10px var(--pad); border-right: 0; border-bottom: 1px solid var(--rule); }
  .sidebar small, .sidebar .sidebar-foot { display: none; }
  .main { padding-top: 28px; }
  .main h1 { font-size: 26px; }
  .stat { padding: 14px; }
  .stat span { font-size: 10px; }
  .stat strong { font-size: 24px; }
  .row { flex-wrap: wrap; }
  .connection { flex-direction: column; align-items: flex-start; }
}

/* Keep navigation easy to tap without a third header row on narrow screens. */
.navlinks > a { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 640px) {
  .site .nav .button { order: 2; margin-left: 0; }
  .site .nav .repo-name { display: none; }
}
