/* Tokens: light by default, dark under prefers-color-scheme. Seeded from docs/mockups/mockup.css. */
:root {
  --bg: #f6f7f9; --surface: #fff; --surface-2: #f1f3f6; --ink: #161b26; --muted: #5b6475; --line: #e2e5eb;
  --accent: #2f5bea; --accent-ink: #fff; --accent-soft: #e8eefe;
  --ok: #1a7f37; --ok-soft: #dafbe1; --bad: #b42318; --bad-soft: #fee4e2;
  --warn: #8a5a00; --warn-soft: #fff4c2; --info: #2f5bea; --info-soft: #e8eefe; --neutral-soft: #eceff3;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 6px; --sidebar: 248px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116; --surface: #161b22; --surface-2: #1c222b; --ink: #e6e8ec; --muted: #9aa3b2; --line: #2a313c;
    --accent: #6d8cff; --accent-ink: #0e1116; --accent-soft: rgba(109, 140, 255, .16);
    --ok: #3fb950; --ok-soft: rgba(46, 160, 67, .16); --bad: #f85149; --bad-soft: rgba(248, 81, 73, .16);
    --warn: #d29922; --warn-soft: rgba(187, 128, 9, .18); --info: #8aa2ff; --info-soft: rgba(109, 140, 255, .16); --neutral-soft: #222934;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, pre { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
h1 { font-size: 20px; line-height: 1.3; margin: 0 0 var(--s2); }
h2 { font-size: 15px; margin: var(--s5) 0 var(--s2); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.error { color: var(--bad); }

/* Shell: sidebar beside main */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.brand { font-weight: 650; color: var(--ink); }
.menu-button { display: none; }
.sidebar-body { display: flex; flex-direction: column; flex: 1; }
.sidebar nav { padding: var(--s3) var(--s2); display: grid; gap: var(--s4); flex: 1; align-content: start; }
.nav-label { margin: 0; padding: 0 var(--s2); font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.nav-list { list-style: none; margin: var(--s1) 0 0; padding: 0; }
.nav-list a { display: flex; align-items: center; gap: var(--s2); padding: 5px var(--s2); border-radius: var(--radius); color: var(--ink); overflow-wrap: anywhere; }
.nav-list a.muted { color: var(--muted); }
.nav-list a:hover { background: var(--surface-2); text-decoration: none; }
.nav-list a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }
.switcher { margin: 0 var(--s2); }
.switcher summary { list-style: none; display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s2); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-weight: 600; }
.switcher summary::-webkit-details-marker { display: none; }
.switcher summary::after { content: "▾"; color: var(--muted); }
.switcher ul { list-style: none; margin: var(--s1) 0 0; padding: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); }
.switcher li { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s1) var(--s2); }
.switcher form, .actions form { margin: 0; }
.sidebar-foot { border-top: 1px solid var(--line); padding: var(--s3) var(--s4); display: grid; gap: var(--s2); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

main { padding: var(--s5) var(--s6); max-width: 1280px; width: 100%; min-width: 0; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s5); background: var(--surface); border-bottom: 1px solid var(--line); }
main.bare { max-width: 960px; margin: 0 auto; }
.narrow { max-width: 420px; margin: 48px auto; }

/* Buttons */
button, .button { display: inline-flex; align-items: center; gap: var(--s1); padding: 6px 12px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 550; cursor: pointer; }
.button:hover { text-decoration: none; }
button.secondary, .button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
button.small { padding: 3px 8px; font-size: 12.5px; }
form button { margin-top: var(--s3); }
.actions button, .switcher button { margin-top: 0; }

/* Forms */
label { display: block; margin: var(--s3) 0 var(--s1); font-weight: 550; }
input, select, textarea { width: 100%; max-width: 40rem; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; }
textarea { max-width: none; font-family: var(--mono); font-size: 12.5px; }
input[type="checkbox"], input[type="radio"] { width: auto; }
input[type="checkbox"] + label, .choices label { display: inline; font-weight: 400; margin: 0; }
fieldset.choices { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s2) var(--s3); }
summary { cursor: pointer; }
summary h2 { display: inline-block; }
.run-settings { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 var(--s3); margin-bottom: var(--s3); }

/* Page content */
ul.workspaces { padding-left: 20px; }
.member form { display: inline-block; margin-right: var(--s2); }
pre.markdown { white-space: pre-wrap; padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
dl.result dt { font-weight: 600; margin-top: var(--s2); }
dl.result dd { margin: 0; }
ol.feed { list-style: none; padding-left: 0; }
.banner { padding: var(--s3) var(--s4); margin: 0 0 var(--s4); border: 1px solid var(--bad); border-radius: var(--radius); background: var(--bad-soft); color: var(--bad); }
.banner p { margin: var(--s1) 0; }

/* Page heads, tables and empty states */
.page-head { margin-bottom: var(--s4); }
.page-head p { margin: var(--s1) 0 0; color: var(--muted); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s3); margin: var(--s5) 0 var(--s2); }
.section-head h2 { margin: 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap table { min-width: 720px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: var(--s2) var(--s3); text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td.nowrap { white-space: nowrap; overflow-wrap: normal; }
td.mono { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.empty { padding: var(--s5); text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.pager { display: flex; justify-content: space-between; margin-top: var(--s3); }

/* Tabs */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin-bottom: var(--s4); overflow-x: auto; overflow-y: hidden; }
.tabs a { padding: var(--s2) var(--s3); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tabs .count { margin-left: var(--s1); font-size: 12px; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s3); }
.toolbar label { margin: 0; color: var(--muted); font-weight: 400; }
.toolbar select { width: auto; }
.toolbar button { margin-top: 0; }
.run-options { margin: var(--s3) 0 0; }
summary.button { list-style: none; }
summary.button::-webkit-details-marker { display: none; }
.page-head.split { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
h1.mono { font-family: var(--mono); font-size: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Status labels */
.label { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-soft); color: var(--muted); }
.label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.label.ok { background: var(--ok-soft); color: var(--ok); }
.label.bad { background: var(--bad-soft); color: var(--bad); }
.label.warn { background: var(--warn-soft); color: var(--warn); }
.label.info { background: var(--info-soft); color: var(--info); }
.button-row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

/* Signed out: the Splash at /sign-in and the Marketing page at / */
.site-main { max-width: none; padding: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--s6); }
.site-nav { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-nav .wrap { display: flex; align-items: center; gap: var(--s5); min-height: 60px; }
.site-nav .links { display: flex; gap: var(--s5); }
.site-nav .links a { color: var(--muted); }
.site-nav .button-row { margin-left: auto; }
.eyebrow { font: 600 12px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.display { font-size: 44px; font-weight: 650; line-height: 1.12; letter-spacing: -.02em; margin: var(--s3) 0 var(--s4); max-width: 20ch; }
.lead { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 62ch; margin: 0; }
.button.large { padding: 10px 18px; font-size: 15px; }
.hero { padding: 72px 0 56px; }
.hero .button-row { margin-top: var(--s5); }
.band { margin: 0; padding: 72px 0; border-top: 1px solid var(--line); }
.band.first { margin-top: 72px; }
.band.alt { background: var(--surface); }
.band.alt .card { background: var(--bg); }
.band-head { margin-bottom: var(--s6); }
.band-head h2, .two-col h2 { font-size: 28px; line-height: 1.2; letter-spacing: -.01em; margin: var(--s2) 0; }
.band-head p, .two-col p { color: var(--muted); max-width: 62ch; margin: 0 0 var(--s3); font-size: 15px; }
.frame { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; box-shadow: 0 24px 60px -30px rgba(10, 12, 16, .35); }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.frame-bar code { margin-left: var(--s2); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-goal > header { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; }
.frame .split { grid-template-columns: minmax(0, 1fr) 360px; }
.split > * { padding: var(--s4); min-width: 0; }
.panel { border-left: 1px solid var(--line); background: var(--surface-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s3); align-items: start; padding: var(--s2); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step.final { border-color: var(--accent); }
.step-num { font: 600 12px var(--mono); color: var(--muted); padding-top: 2px; }
.step-body { display: grid; gap: 2px; min-width: 0; }
.kind { display: inline-block; font: 600 11.5px var(--mono); padding: 0 6px; border-radius: 4px; background: var(--neutral-soft); margin-right: var(--s1); }
.verify { display: grid; gap: var(--s3); }
.criterion { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); background: var(--surface); }
.criterion-head { font-weight: 600; margin-bottom: var(--s2); }
.criterion-head .n { color: var(--muted); font-weight: 500; }
.criterion .note { margin: var(--s2) 0 0; font-size: 13px; color: var(--muted); }
.engine { font-size: 12px; color: var(--muted); margin-left: var(--s2); }

/* Run page: each Goal's steps beside its Result, Completion hint and one Verification form */
.run-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.run-head .meta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: center; margin-top: var(--s1); color: var(--muted); }
.button-row form, .button-row button { margin: 0; }
.goal-jump { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s4) 0; }
.goal-jump a { display: inline-flex; gap: var(--s2); align-items: center; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); }
main > .run-goal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: var(--s4) 0; scroll-margin-top: var(--s4); }
.run-goal > header h2 { margin: 0; }
.run-goal > header .hash { margin-left: auto; }
.run-goal h3 { font-size: 14px; margin: 0 0 var(--s2); }
.panel-inner { position: sticky; top: var(--s4); display: grid; gap: var(--s4); }
.steps { counter-reset: step; }
.step-num:empty::before { counter-increment: step; content: counter(step); }
.step:has(> .shot, > .no-shot) { grid-template-columns: 28px minmax(0, 1fr) 132px; }
.step-body code { overflow-wrap: anywhere; }
.shot { display: block; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); cursor: zoom-in; overflow: hidden; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.no-shot { aspect-ratio: 16 / 10; display: grid; place-items: center; padding: var(--s1); text-align: center; font-size: 11.5px; color: var(--muted); border: 1px dashed var(--line); border-radius: 4px; }
#shot-dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; background: var(--surface); color: var(--ink); width: min(960px, 94vw); }
#shot-dialog::backdrop { background: rgba(10, 12, 16, .6); }
#shot-dialog header { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
#shot-dialog form { margin: 0; }
#shot-dialog img { display: block; width: 100%; height: auto; }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s1) var(--s3); margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; min-width: 0; }
.hint { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s2) var(--s3); background: var(--surface); font-size: 13px; }
.hint p, .verify p { margin: 0; }
.hint ul, .errors, .history { margin: var(--s1) 0 0; padding-left: 18px; font-size: 12.5px; }
.history { color: var(--muted); }
fieldset.criterion { margin: 0; min-width: 0; }
.criterion legend { padding: 0; font-weight: 600; }
.choice { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0 0; }
.choice label { display: inline-flex; align-items: center; gap: var(--s1); margin: 0; padding: 2px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 550; cursor: pointer; }
.choice label.pass:has(:checked) { background: var(--ok-soft); color: var(--ok); }
.choice label.fail:has(:checked) { background: var(--bad-soft); color: var(--bad); }
.choice label:has(:disabled) { color: var(--muted); cursor: not-allowed; text-decoration: line-through; }
.criterion .note-label { font-size: 12px; font-weight: 400; color: var(--muted); margin: var(--s2) 0 2px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s4); }
.cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: var(--s5); }
.card h3, .plan h3 { font-size: 15px; margin: var(--s2) 0; }
.card p, .plan p { margin: 0; color: var(--muted); }
.step-n { font: 600 12px var(--mono); color: var(--accent); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.gherkin { margin: 0; padding: var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font: 13px/1.75 var(--mono); overflow-x: auto; white-space: pre; overflow-wrap: normal; min-width: 0; }
.gherkin b { color: var(--accent); font-weight: 600; }
.gherkin .crit { background: var(--ok-soft); border-radius: 3px; }
.criteria-list { margin: 0 0 var(--s3); padding: 0; list-style: none; display: grid; gap: var(--s2); counter-reset: crit; }
.criteria-list li { counter-increment: crit; display: flex; gap: var(--s2); padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.criteria-list li::before { content: counter(crit); font: 600 12px/20px var(--mono); color: var(--ok); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.plan { display: flex; flex-direction: column; gap: var(--s4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: var(--s5); }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan h3 { font-size: 16px; margin: 0; }
.price { font-size: 30px; font-weight: 650; letter-spacing: -.01em; }
.plan dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s1) var(--s3); margin: 0; font-size: 13.5px; }
.plan dl.facts dt { color: var(--muted); }
.plan dl.facts dd { margin: 0; }
.plan .button { justify-content: center; margin-top: auto; }
.cta-band { text-align: center; }
.cta-band .lead { margin: 0 auto; }
.cta-title { margin: 0 auto var(--s3); font-size: 32px; }
.cta-band .button-row { justify-content: center; margin-top: var(--s5); }
.site-foot { border-top: 1px solid var(--line); padding: var(--s5) 0; color: var(--muted); font-size: 13px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between; }
.site-foot a { color: var(--muted); }
.splash { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.splash-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.signin-title { font-size: 15px; margin: var(--s5) 0 0; }
.signin { display: grid; gap: var(--s2); max-width: 340px; margin-top: var(--s3); }
.signin .button { justify-content: center; }
.flow { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s5) 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.flow li + li::before { content: "→"; margin-right: var(--s2); }
.sample { display: grid; gap: var(--s3); padding: var(--s4); }
.sample .gherkin { border: 0; padding: 0; background: none; }

/* Phone width: the sidebar folds behind Menu, which needs JavaScript */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .js .menu-button { display: inline-flex; }
  .js .sidebar:not(.open) .sidebar-body { display: none; }
  main { padding: var(--s4); }
  .top { padding: var(--s3) var(--s4); }
  .run-settings { grid-template-columns: 1fr; }
  .wrap { padding: 0 var(--s4); }
  .site-nav .links { display: none; }
  .site-nav .wrap { gap: var(--s3); }
  .display { font-size: 30px; }
  .hero { padding: 40px 0; }
  .band { padding: 48px 0; }
  .band.first { margin-top: 48px; }
  .band-head h2, .two-col h2 { font-size: 22px; }
  .two-col, .plans, .splash-body, .cards.cols-3, .split { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .split, .frame .split { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .panel-inner { position: static; }
  .run-goal > header .hash { margin-left: 0; }
  .frame .step:not(:first-child):not(.final) { display: none; }
  .step:has(> .shot, > .no-shot) { grid-template-columns: 24px minmax(0, 1fr); }
  .step .shot, .step .no-shot { grid-column: 2; max-width: 240px; }
  .splash-body { padding-top: 32px; padding-bottom: 32px; }
  .signin { max-width: none; }
}
