/* Readthrough. Tokens → base → chrome (top, status) → home → panes → tour → note → code/diff → map → responsive.
   Colour only carries meaning: green/red for the diff and A/D, amber for M and warnings, blue for selection and links. */

:root {
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --bg-3: #eceef1;
  --line: #e1e4e8;
  --line-2: #cdd2d8;
  --fg: #1c2024;
  --fg-2: #535b65;
  --fg-3: #858d97;
  --blue: #0b7a72;
  --blue-bg: #e2f3f0;
  --brand: #18181a;
  --on-accent: #ffffff;
  --green: #1d7a35;
  --red: #c42b2b;
  --amber: #9a6200;
  --amber-bg: #fdf5dc;
  --add: #e6f6ea;
  --add-ln: #d3efda;
  --del: #fdecec;
  --del-ln: #f8dada;
  --flash: #fff3b8;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --display: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101214; --bg-2: #16191c; --bg-3: #1f2328; --line: #262b31; --line-2: #363c44;
    --fg: #e3e6ea; --fg-2: #a1a9b3; --fg-3: #6d7580; --blue: #5fcdbd; --blue-bg: #10302e; --brand: #ececec; --on-accent: #06201d;
    --green: #56c26f; --red: #f0716b; --amber: #d9a540; --amber-bg: #2b2412;
    --add: #142a1b; --add-ln: #183320; --del: #2e1617; --del-ln: #3a1a1b; --flash: #3b3418;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101214; --bg-2: #16191c; --bg-3: #1f2328; --line: #262b31; --line-2: #363c44;
  --fg: #e3e6ea; --fg-2: #a1a9b3; --fg-3: #6d7580; --blue: #5fcdbd; --blue-bg: #10302e; --brand: #ececec; --on-accent: #06201d;
  --green: #56c26f; --red: #f0716b; --amber: #d9a540; --amber-bg: #2b2412;
  --add: #142a1b; --add-ln: #183320; --del: #2e1617; --del-ln: #3a1a1b; --flash: #3b3418;
  color-scheme: dark;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; display: grid; grid-template-rows: 44px minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); background: var(--bg); color: var(--fg); font: 13px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
code { font: 12px/1 var(--mono); background: var(--bg-3); padding: 2px 4px; border-radius: 3px; }
kbd { font: 11px/1 var(--mono); color: var(--fg-3); border: 1px solid var(--line-2); border-radius: 3px; padding: 1px 4px; background: var(--bg); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
h1, h2, p { margin: 0; }
.muted { color: var(--fg-3); }
.warn { color: var(--amber); }
.bad { color: var(--red); }
.up { color: var(--green); font-variant-numeric: tabular-nums; }
.down { color: var(--red); font-variant-numeric: tabular-nums; }
.link { background: none; border: 0; padding: 0; color: var(--blue); }
.link:hover { text-decoration: underline; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--bg); font-weight: 500; }
.btn:hover { background: var(--bg-2); }
.btn kbd { margin-left: 2px; }
.btn.primary { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn.primary:hover { opacity: 0.9; }
.btn.primary kbd { background: transparent; color: inherit; opacity: 0.6; border-color: currentColor; }

/* ---------- top bar ---------- */

.top { display: flex; align-items: center; gap: 14px; padding: 0 12px 0 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); min-width: 0; }
.brand { display: flex; align-items: center; gap: 7px; color: var(--fg); font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; flex: none; }
.brand:hover { text-decoration: none; }
.brand svg { width: 16px; height: 16px; fill: var(--fg); }
.brand svg path { fill: none; stroke: var(--fg); stroke-width: 1.6; }
.crumb { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; padding-left: 14px; border-left: 1px solid var(--line-2); height: 20px; }
.crumb:empty { border: 0; }
.crumb .repo { color: var(--fg-2); white-space: nowrap; }
.crumb .num { color: var(--fg-3); }
.crumb .ttl { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state { flex: none; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 3px; line-height: 18px; color: #fff; }
.s-open { background: #1d7a35; }
.s-merged { background: #7342c4; }
.s-closed { background: #c42b2b; }
.s-draft { background: var(--fg-3); }
.go { position: relative; width: 280px; flex: none; margin-left: auto; }
.go input { width: 100%; height: 28px; padding: 0 28px 0 10px; font: 13px var(--sans); color: var(--fg); background: var(--bg); border: 1px solid var(--line-2); border-radius: 5px; }
.go input::placeholder { color: var(--fg-3); }
.go input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-bg); }
.go kbd { position: absolute; right: 7px; top: 6px; }
.go input:focus + kbd { display: none; }
body[data-view="home"] .top .go { visibility: hidden; }
.icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border: 1px solid var(--line-2); border-radius: 5px; background: var(--bg); }
.icon:hover { background: var(--bg-3); }
.icon svg { width: 14px; height: 14px; fill: none; stroke: var(--fg-2); stroke-width: 1.3; }
.icon .fill { fill: var(--fg-2); stroke: none; }

/* ---------- status bar ---------- */

.status { display: flex; align-items: center; gap: 16px; height: 26px; padding: 0 14px; border-top: 1px solid var(--line); background: var(--bg-2); font-size: 12px; color: var(--fg-2); white-space: nowrap; overflow: hidden; }
.status:empty { display: none; }
.status b { color: var(--fg); font-variant-numeric: tabular-nums; }
.segs { display: flex; gap: 2px; }
.segs i { width: 10px; height: 8px; border-radius: 1px; background: var(--line-2); }
.segs i.on { background: var(--green); }
.segs i.here { box-shadow: 0 0 0 1px var(--bg-2), 0 0 0 2px var(--fg-3); }
.status .keys { margin-left: auto; color: var(--fg-3); display: flex; gap: 3px; align-items: center; }
.status .keys kbd:nth-of-type(3), .status .keys kbd:nth-of-type(4) { margin-left: 8px; }

/* ---------- home ---------- */

#view { min-height: 0; overflow: auto; }
.home { max-width: 1160px; margin: 0 auto; padding: 40px 32px 72px; }
.home h2 { display: flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.home h2 .count { color: var(--fg-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.home section + section, .home .lists { margin-top: 36px; }
.start { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.go.big { width: auto; margin: 0; display: flex; gap: 8px; }
.go.big input { height: 40px; font-size: 14px; padding: 0 14px; }
.go.big .btn { height: 40px; padding: 0 18px; }
.hint { margin-top: 10px; color: var(--fg-2); font-size: 12.5px; }
.empty { padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--fg-2); }

/* reading now */
.reading { list-style: none; margin: 0 0 32px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.reading li + li { border-top: 1px solid var(--line); }
.reading a { display: grid; grid-template-columns: auto auto 1fr auto 44px; gap: 12px; align-items: center; padding: 10px 14px; color: var(--fg); position: relative; }
.reading a:hover { background: var(--bg-2); text-decoration: none; }
.reading a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--blue), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: sweep 1.6s ease-in-out infinite; }
@keyframes sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.reading .k { color: var(--fg-2); white-space: nowrap; }
.reading .title { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reading .elapsed { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg-2); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.num { color: var(--fg-3); }

/* tour cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; color: var(--fg); background: var(--bg); transition: border-color 0.12s, box-shadow 0.12s; }
.card:hover { text-decoration: none; border-color: var(--line-2); box-shadow: 0 2px 10px rgb(0 0 0 / 0.06); }
.thumb { height: 140px; padding: 12px 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.thumb svg { display: block; width: 100%; height: 100%; }
.thumb .edge text { display: none; }
.thumb .edge text, .thumb .edge path { stroke: var(--line-2); }
.thumb .node rect { fill: var(--bg); }
.card-body { padding: 12px 14px 6px; flex: 1; }
.card-k { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-2); margin-bottom: 4px; }
.card-k .state { margin-left: auto; }
.card h3 { font-size: 14px; line-height: 1.35; font-weight: 600; margin: 0 0 6px; }
.card-gist { color: var(--fg-2); font-size: 12.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-gist code { font-size: 11px; }
.card-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px; font-size: 12px; color: var(--fg-2); }
.card-foot .muted { margin-left: auto; white-space: nowrap; }
.pbar { flex: none; width: 56px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--green); }
.card-foot > span:nth-child(2) { white-space: nowrap; }

/* PR lists */
.lists { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.lists section + section { margin-top: 0; }
.prs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.prs li + li { border-top: 1px solid var(--line); }
.prs a { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 76px; gap: 12px; align-items: center; padding: 10px 14px; color: var(--fg); }
.prs a:hover { background: var(--bg-2); text-decoration: none; }
.av { width: 20px; height: 20px; border-radius: 50%; background: var(--bg-3); }
.prs .main { min-width: 0; display: grid; }
.prs .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prs .sub { font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv.ok { color: var(--green); }
.rv.bad { color: var(--red); }
.prs .side { display: grid; justify-items: end; font-size: 11.5px; }
.prs .files { color: var(--fg-3); }
.ds { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.blocks { display: inline-flex; gap: 1px; margin-left: 2px; }
.blocks i { width: 7px; height: 7px; border-radius: 1px; background: var(--line-2); }
.blocks i.g { background: var(--green); }
.blocks i.r { background: var(--red); }
.tt { justify-self: end; font-size: 11px; font-weight: 500; color: var(--fg-3); white-space: nowrap; }
.tt.ready { color: var(--green); }
.tt.busy { color: var(--blue); }
.skel span { display: block; height: 20px; margin: 10px 14px; border-radius: 4px; background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state { max-width: 560px; margin: 96px auto; padding: 0 24px; }
.empty-state h1 { font-size: 18px; margin-bottom: 8px; }
.empty-state p + p { margin-top: 8px; }
.bar-indef { height: 2px; background: var(--line); overflow: hidden; position: relative; border-radius: 1px; }
.bar-indef::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 30%; background: var(--fg-3); animation: indef 1.4s ease-in-out infinite; }
@keyframes indef { from { left: -30%; } to { left: 100%; } }

/* ---------- panes ---------- */

.app { display: grid; grid-template-columns: 232px minmax(320px, 420px) minmax(0, 1fr); height: 100%; }
.tour, .note, .code { min-height: 0; overflow: auto; }
.tour { border-right: 1px solid var(--line); background: var(--bg-2); padding: 8px 6px 24px; }
.note { border-right: 1px solid var(--line); padding: 22px 24px 48px; }
.code { padding: 16px 20px 64px; background: var(--bg); }

/* ---------- tour ---------- */

.tour .row { display: flex; align-items: flex-start; gap: 8px; padding: 5px 8px; border-radius: 4px; color: var(--fg-2); line-height: 1.4; }
.tour .row:hover { background: var(--bg-3); text-decoration: none; }
.tour .row.sel { background: var(--blue-bg); color: var(--fg); }
.tour .row .t { flex: 1; min-width: 0; }
.tour .row .n { display: none; }
.tour .row .c { margin-left: auto; padding-left: 8px; font-size: 11px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.tour .group { margin: 14px 8px 4px; font-size: 11px; font-weight: 600; color: var(--fg-3); }
.mark { flex: none; width: 12px; height: 12px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; }
.tour .row.sel .mark { border-color: var(--blue); }
.tour .row.done .mark { background: var(--green); border-color: var(--green); }
.tour .row.done .mark::after { content: ""; width: 5px; height: 3px; border: solid var(--bg); border-width: 0 0 1.5px 1.5px; transform: translateY(-0.5px) rotate(-45deg); }
.tour .row.done .t { color: var(--fg-3); }
.tour .row.done.sel .t { color: var(--fg); }
.tour-msg { margin: 14px 8px 8px; color: var(--fg-2); }
.tour-msg .elapsed { font-variant-numeric: tabular-nums; }
.tour .bar-indef { margin: 0 8px; }

/* ---------- note ---------- */

.note .kicker { font-size: 12px; color: var(--fg-3); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.note .title { font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 10px; text-wrap: balance; }
.note .byline { color: var(--fg-2); font-size: 12px; margin-bottom: 18px; line-height: 1.7; }
.note .byline code { font-size: 11px; }
.note h2 { font-size: 12px; font-weight: 600; margin: 22px 0 6px; color: var(--fg); }
.note p, .note li { font-size: 13.5px; line-height: 1.6; color: var(--fg); }
.note .lead { font-size: 14.5px; line-height: 1.55; }
.note > p + p { margin-top: 10px; }
.note code { font-size: 11.5px; }
.story p { text-wrap: pretty; }
.actions { display: flex; gap: 8px; margin-top: 22px; }
.btn .tick { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--line-2); display: grid; place-items: center; }
.btn.on { border-color: var(--green); }
.btn.on .tick { background: var(--green); border-color: var(--green); }
.btn.on .tick::after { content: ""; width: 5px; height: 3px; border: solid var(--bg); border-width: 0 0 1.5px 1.5px; transform: translateY(-0.5px) rotate(-45deg); }
.changes { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.changes th { text-align: left; font-weight: 500; color: var(--fg-3); padding: 0 8px 4px 0; }
.changes td { padding: 6px 12px 6px 0; border-top: 1px solid var(--line); vertical-align: top; width: 50%; line-height: 1.45; }
.changes td:first-child { color: var(--fg-2); }
.facts { margin: 0; border: 1px solid var(--line); border-radius: 6px; }
.facts div { display: grid; grid-template-columns: 140px 1fr; gap: 8px; padding: 6px 10px; }
.facts div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--fg-2); }
.facts dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facts dd code { font-size: 11px; }
.facts .warn dt { color: var(--amber); font-weight: 600; }
.facts .quiet dt { color: var(--fg-3); }
.desc { margin-top: 22px; }
.desc summary { cursor: pointer; font-size: 12px; font-weight: 600; width: max-content; }
.desc div { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); white-space: pre-wrap; font-size: 12.5px; color: var(--fg-2); max-height: 320px; overflow: auto; }
.checks { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: c; }
.checks li { counter-increment: c; position: relative; padding: 10px 0 10px 24px; border-top: 1px solid var(--line); }
.checks li:first-child { border-top: 0; }
.checks li::before { content: counter(c); position: absolute; left: 0; top: 10px; font-weight: 600; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.checks .loc { display: inline-block; margin-top: 4px; }
.questions, .plain { margin: 0; padding-left: 18px; }
.questions li + li { margin-top: 6px; }
.loc { font: 11.5px var(--mono); }
.notice { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--red); border-radius: 6px; display: grid; gap: 10px; }
.notice .row-end { margin: 0; }

/* ---------- code ---------- */

.block + .block { margin-top: 28px; }
.block-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.block-head h2 { font-size: 12px; font-weight: 600; }
.legend { margin-left: auto; font-size: 11.5px; color: var(--fg-3); display: flex; align-items: center; gap: 4px; }
.lg { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 8px; font: 600 10px/1 var(--mono); border-radius: 2px; }
.lg.a { color: var(--green); background: var(--add); }
.lg.m { color: var(--amber); background: var(--amber-bg); }
.lg.d { color: var(--red); background: var(--del); }
.lg.c { border: 1px dashed var(--fg-3); }
.code-empty { color: var(--fg-3); padding: 24px 0; }

.files { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.files td { padding: 5px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
.files tr:first-child td { border-top: 0; }
.files .p { font-family: var(--mono); font-size: 11.5px; width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.files .n, .files .w { text-align: right; }
.files .w a.warn { color: var(--amber); }
.pill { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin-left: 3px; border-radius: 3px; background: var(--bg-3); color: var(--fg-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.pill:hover { background: var(--blue-bg); color: var(--blue); text-decoration: none; }
.dir { color: var(--fg-3); }

.st { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; font: 600 10px/1 var(--mono); border-radius: 2px; color: var(--amber); background: var(--amber-bg); }
.st-A { color: var(--green); background: var(--add); }
.st-D { color: var(--red); background: var(--del); }
.files td.st { display: table-cell; width: 16px; text-align: center; padding: 5px 4px 5px 10px; background: none; }

.hunk { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 12px; scroll-margin-top: 12px; }
.hunk.stub { margin-bottom: 8px; }
.hunk.stub .hh { border-bottom: 0; }
.hh { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; background: var(--bg-2); border-bottom: 1px solid var(--line); font: 12px var(--mono); }
.hh .p { color: var(--fg); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; max-width: 60%; }
.hh .p .dir { font-weight: 400; }
.hh .at { color: var(--fg-3); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh .n { margin-left: auto; white-space: nowrap; font-size: 11.5px; }
.scroll { overflow-x: auto; }
.diff { border-collapse: collapse; width: 100%; font: 12px/20px var(--mono); tab-size: 4; }
.diff td { padding: 0; vertical-align: top; }
.diff .ln { width: 1%; min-width: 40px; padding: 0 8px; text-align: right; color: var(--fg-3); user-select: none; font-variant-numeric: tabular-nums; }
.diff .sg { width: 18px; text-align: center; color: var(--fg-3); user-select: none; }
.diff .tx { white-space: pre; padding-right: 16px; }
.diff tr.add { background: var(--add); }
.diff tr.add .ln { background: var(--add-ln); color: var(--green); }
.diff tr.add .sg { color: var(--green); }
.diff tr.del { background: var(--del); }
.diff tr.del .ln { background: var(--del-ln); color: var(--red); }
.diff tr.del .sg { color: var(--red); }
.diff tr.more { display: none; }
.hunk.open .diff tr.more { display: table-row; }
.expand { width: 100%; height: 28px; border: 0; border-top: 1px solid var(--line); background: var(--bg-2); font-size: 12px; color: var(--blue); }
.expand:hover { background: var(--blue-bg); }
.flash { animation: flash 1.4s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--flash); } to { box-shadow: 0 0 0 3px transparent; } }

/* ---------- map ---------- */

.map { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: var(--bg-2); }
.map svg { display: block; }
.node rect { fill: var(--bg); stroke: var(--line-2); stroke-width: 1; }
.node .nl { font: 600 12px var(--mono); fill: var(--fg); }
.node .nw { font: 10.5px var(--sans); fill: var(--fg-3); }
.node .ns { font: 10.5px var(--sans); fill: var(--blue); }
.node .nst { font: 700 11px var(--mono); }
.node.s-new rect { stroke: var(--green); }
.node.s-new .nst { fill: var(--green); }
.node.s-changed rect { stroke: var(--amber); }
.node.s-changed .nst { fill: var(--amber); }
.node.s-removed rect { stroke: var(--red); fill: var(--del); }
.node.s-removed .nst { fill: var(--red); }
.node.s-removed .nl { text-decoration: line-through; }
.node.s-context rect { stroke-dasharray: 3 3; fill: var(--bg-2); }
.node.s-context .nl { fill: var(--fg-2); font-weight: 500; }
.node.link { cursor: pointer; }
.node.link:hover rect, .node.link:focus-visible rect { stroke: var(--blue); stroke-width: 1.5; }
.node:focus { outline: none; }
.edge path { fill: none; stroke: var(--line-2); stroke-width: 1.2; }
.edge.back path { stroke-dasharray: 4 3; }
.edge text { font: 10.5px var(--sans); fill: var(--fg-3); paint-order: stroke; stroke: var(--bg-2); stroke-width: 4px; stroke-linejoin: round; }
.edge.crowded text { display: none; }
marker path { fill: var(--line-2); }
.map svg .node, .map svg .edge { transition: opacity 0.12s; }
.map svg.focus .node:not(.on) { opacity: 0.3; }
.map svg.focus .edge:not(.on) { opacity: 0.1; }
.map svg.focus .edge.on path { stroke: var(--blue); }
.map svg.focus .edge.on text { display: inline; fill: var(--fg); }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .app { grid-template-columns: 200px minmax(300px, 360px) minmax(0, 1fr); }
  .go { width: 200px; }
  .status .keys { display: none; }
}
@media (max-width: 980px) {
  .lists { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body { height: auto; min-height: 100%; }
  html, body { height: auto; }
  #view { overflow: visible; }
  .app { display: block; height: auto; }
  .tour { display: flex; gap: 4px; overflow-x: auto; padding: 6px 8px; border-right: 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
  .tour .group, .tour .row .t, .tour .row .c { display: none; }
  .tour .row { flex: none; white-space: nowrap; }
  .tour .row .n { display: inline; font-variant-numeric: tabular-nums; }
  .note { border-right: 0; padding: 20px 16px 8px; overflow: visible; }
  .code { padding: 16px; overflow: visible; }
  .crumb .repo { display: none; }
  .top .go { display: none; }
  .status { position: sticky; bottom: 0; }
  .facts div { grid-template-columns: 110px 1fr; }
}
@media (max-width: 560px) {
  .home { padding: 20px 16px 48px; }
  .start { padding: 14px; }
  .go.big { display: flex; flex-direction: column; }
  .prs a { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .prs .tt { display: none; }
  .reading a { grid-template-columns: auto 1fr 44px; }
  .reading .k, .reading .muted { display: none; }
  .status .muted { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- points: numbered steps pinned to rows ---------- */

.points { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 2px; }
.points li { display: grid; grid-template-columns: 20px 1fr; gap: 2px 10px; padding: 7px 8px; margin: 0 -8px; border-radius: 5px; font-size: 13.5px; line-height: 1.5; }
.points li[data-pt] { cursor: pointer; }
.points li[data-pt]:hover, .points li.hl { background: var(--blue-bg); }
.points li:focus-visible { outline-offset: -2px; }
.pn, .pb { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: 600 11px/1 var(--sans); font-variant-numeric: tabular-nums; }
.pn { margin-top: 1px; background: var(--bg-3); color: var(--fg-2); }
.points li.hl .pn { background: var(--blue); color: var(--on-accent); }
.pt-at { grid-column: 2; font: 11px var(--mono); color: var(--fg-3); }
.diff .pg { width: 26px; min-width: 26px; padding: 0 0 0 6px; user-select: none; }
.pb { width: 17px; height: 17px; margin-top: 1.5px; background: var(--blue); color: var(--on-accent); font-size: 10.5px; cursor: pointer; }
.diff tr.pt .pg { box-shadow: inset 2px 0 var(--blue); }
/* the point you're on: a highlighter over its rows and a bar in the gutter, easing in and out. It's painted as an inset
   shadow (which sits above the diff colours and below the text) so it can animate; a gradient wash can't. Light mode
   gets a clear yellow highlighter, dark mode a warm amber, so it reads on green, red and plain lines alike. */
:root { --hl: rgb(255 214 0 / 0.34); --hl-edge: #e0ac00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hl: rgb(217 165 64 / 0.26); --hl-edge: #d9a540; } }
:root[data-theme="dark"] { --hl: rgb(217 165 64 / 0.26); --hl-edge: #d9a540; }
.diff tr.pt td { transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1), color 0.28s ease; }
.diff tr.pt .pb { transition: background-color 0.28s ease, color 0.28s ease; }
.diff tr.pt.hl td { box-shadow: inset 0 0 0 999px var(--hl); }
.diff tr.pt.hl td.pg { box-shadow: inset 4px 0 var(--hl-edge), inset 0 0 0 999px var(--hl); }
.diff tr.pt.hl .tx, .diff tr.pt.hl .ln { color: var(--fg); }
.diff tr.hl .pb { background: var(--hl-edge); color: #1a1405; }
.hunk.marked .diff tr:not(.pt) .tx { opacity: 0.72; }

/* ---------- settings ---------- */

.sheet { width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--fg); box-shadow: 0 12px 40px rgb(0 0 0 / 0.18); }
.sheet::backdrop { background: rgb(0 0 0 / 0.35); }
.sheet form { padding: 18px 20px 16px; display: grid; gap: 12px; }
.sheet h2 { font-size: 15px; }
.sheet > form > .muted:first-of-type { margin-top: -6px; }
.providers { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 6px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--blue); background: var(--blue-bg); }
.opt.off { opacity: 0.55; cursor: not-allowed; }
.opt input { margin: 2px 0 0; accent-color: var(--blue); }
.opt b { display: block; font-weight: 600; }
.opt small { color: var(--fg-2); font-size: 12px; }
.fields { display: grid; gap: 10px; }
.fields[hidden] { display: none; }
.fields label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; }
.fields input, .fields select { height: 30px; padding: 0 8px; font: 13px var(--sans); color: var(--fg); background: var(--bg); border: 1px solid var(--line-2); border-radius: 5px; }
.fields input:focus, .fields select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-bg); }
.small { font-size: 12px; }
.err { color: var(--red); font-size: 12px; }
.err:empty { display: none; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.link.quiet { color: inherit; }

/* ---------- since last tour, intent check, effort ---------- */

.banner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: -4px 0 16px; padding: 9px 12px; border: 1px solid var(--blue); border-radius: 6px; background: var(--blue-bg); color: var(--fg); font-size: 13px; }
.banner:hover { text-decoration: none; }
.banner span { margin-left: auto; color: var(--blue); font-weight: 500; white-space: nowrap; }
.commits { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; }
.commits li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 6px 10px; font-size: 12.5px; }
.commits li + li { border-top: 1px solid var(--line); }
.commits code { font-size: 11px; color: var(--fg-2); }
.commits .muted { font-size: 11.5px; }


.eff { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--fg-2); }
.pips { display: inline-flex; gap: 1.5px; }
.pips i { width: 3px; height: 9px; border-radius: 1px; background: var(--line-2); }
.eff.e1 .pips i:nth-child(-n+1), .eff.e2 .pips i:nth-child(-n+2) { background: var(--green); }
.eff.e3 .pips i:nth-child(-n+3) { background: var(--amber); }
.eff.e4 .pips i:nth-child(-n+4), .eff.e5 .pips i:nth-child(-n+5) { background: var(--red); }
.lists-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: -16px; font-size: 12px; }
.seg-btns { display: inline-flex; border: 1px solid var(--line-2); border-radius: 5px; overflow: hidden; }
.seg-btns button { border: 0; background: var(--bg); padding: 3px 10px; font-size: 12px; color: var(--fg-2); }
.seg-btns button + button { border-left: 1px solid var(--line-2); }
.seg-btns button.on { background: var(--bg-3); color: var(--fg); font-weight: 600; }
.banner b { white-space: nowrap; }

/* ---------- flow player ---------- */

.flowblock .block-head .seg-btns { margin-left: 12px; }
.scn-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.scn-tabs button { border: 1px solid var(--line-2); background: var(--bg); border-radius: 5px; padding: 4px 10px; font-size: 12px; color: var(--fg-2); }
.scn-tabs button:hover { background: var(--bg-2); }
.scn-tabs button.on { border-color: var(--blue); background: var(--blue-bg); color: var(--fg); font-weight: 600; }
.map svg { overflow: visible; }
.map svg.playing .node { transition: opacity 0.2s; }
.map svg.playing .node.p-off { opacity: 0.22; }
.map svg.playing .edge { opacity: 0.3; }
.map svg.playing .node.p-seen rect { stroke: color-mix(in srgb, var(--blue) 45%, var(--line-2)); }
.map svg.playing .node.p-on rect { stroke: var(--blue); stroke-width: 2; fill: var(--blue-bg); stroke-dasharray: none; }
.hop { fill: none; stroke: var(--blue); stroke-width: 2.2; }
.pkt-dot { fill: var(--blue); stroke: var(--bg-2); stroke-width: 2; }
.hop-label { font: 600 11px var(--sans); fill: var(--blue); paint-order: stroke; stroke: var(--bg-2); stroke-width: 5px; stroke-linejoin: round; }
#arrow-hop path { fill: var(--blue); }
.nosc { margin-top: 8px; }

.player { margin-top: 12px; }
.pbar-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.icon-btn { width: 28px; height: 28px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--bg); font-size: 16px; line-height: 1; color: var(--fg); }
.icon-btn:hover:not(:disabled) { background: var(--bg-2); }
.icon-btn:disabled { opacity: 0.4; cursor: default; }
.pcount { font-size: 12px; color: var(--fg-2); font-variant-numeric: tabular-nums; min-width: 72px; text-align: center; }
.pcount b { color: var(--fg); }
.trigger { margin-left: auto; font-size: 12px; max-width: 55%; }
.hops { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.hops li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 8px 12px; cursor: pointer; }
.hops li + li { border-top: 1px solid var(--line); }
.hops li:hover { background: var(--bg-2); }
.hops li.on { background: var(--blue-bg); }
.hops li.on .pn { background: var(--blue); color: var(--on-accent); }
.hops li.seen .hop-w { color: var(--fg-2); }
.hop-ft { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; }
.hop-ft code { font-size: 11px; }
.arr { color: var(--fg-3); }
.kind { font-size: 10.5px; color: var(--fg-3); border: 1px solid var(--line-2); border-radius: 3px; padding: 0 4px; }
.pkt { font-size: 11px; color: var(--blue); background: var(--blue-bg); border-radius: 3px; padding: 0 5px; }
.hops li.on .pkt { background: var(--bg); }
.hop-w { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; }
.hop-code { margin-top: 12px; }

.seq .head rect { fill: var(--bg); stroke: var(--line-2); }
.seq .head text { font: 600 11.5px var(--mono); fill: var(--fg); }
.seq .head.s-new rect { stroke: var(--green); }
.seq .head.s-changed rect { stroke: var(--amber); }
.seq .head.s-removed rect { stroke: var(--red); }
.seq .head.s-context rect { stroke-dasharray: 3 3; fill: var(--bg-2); }
.seq .life { stroke: var(--line-2); stroke-dasharray: 2 4; }
.seq .msg { cursor: pointer; }
.seq .msg path { fill: none; stroke: var(--fg-3); stroke-width: 1.3; }
.seq .msg.k-return path { stroke-dasharray: 4 3; }
.seq .msg text { font: 11px var(--sans); fill: var(--fg-2); paint-order: stroke; stroke: var(--bg-2); stroke-width: 4px; stroke-linejoin: round; }
.seq .msg.seen path { stroke: var(--fg-2); }
.seq .msg.on path { stroke: var(--blue); stroke-width: 2.2; }
.seq .msg.on text { fill: var(--fg); font-weight: 600; }
.seq .msg:hover text { fill: var(--fg); }

/* ---------- account ---------- */

.account { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-2); flex: none; }
.account:empty { display: none; }
.account .av { width: 22px; height: 22px; }
.account .local { font-size: 11px; color: var(--fg-3); border: 1px solid var(--line-2); border-radius: 3px; padding: 0 5px; }
.account .signin { color: var(--fg); font-weight: 600; font-size: 13px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 6px; }
.account .signin:hover { text-decoration: none; border-color: var(--fg-3); }
body[data-auth="out"] #gear, body[data-auth="out"] .top .go { display: none; }
.notice-plain { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg-2); color: var(--fg-2); margin: 16px 0 0; }

/* ---------- landing: follows the chosen palette and mode ---------- */

@font-face { font-family: "Schibsted Grotesk"; src: url(/fonts/schibsted-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(/fonts/schibsted-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

body[data-view="landing"] { grid-template-rows: 64px minmax(0, 1fr) auto; }
body[data-view="landing"] .top { background: var(--bg); border-bottom: 1px solid var(--line); padding: 0 32px; }
body[data-view="landing"] .brand { font-size: 17px; }
body[data-view="landing"] #view { overflow: auto; }
body[data-view="landing"] .status { display: none; }
body[data-view="landing"] .icon { background: transparent; border-color: var(--line-2); }
body[data-view="landing"] .account .signin { border-color: var(--line-2); }

/* two soft light pools behind the content */
.landing { color: var(--fg); background:
  radial-gradient(900px 480px at 78% 160px, color-mix(in srgb, var(--blue) 7%, transparent), transparent 70%),
  radial-gradient(1000px 520px at 50% 760px, color-mix(in srgb, var(--blue) 8%, transparent), transparent 70%),
  var(--bg); }
.landing h1, .landing h2 { font-family: var(--display); }

/* hero: hairline rails frame the hero and the demo; the headline is set as a diff */
.l-frame { max-width: 1240px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.l-hero { padding: 104px 32px 56px; }
.l-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-top: 36px; }
.l-eyebrow { margin: 0 0 22px; font: 13px var(--mono); color: var(--fg-3); }
.l-diff { display: grid; margin: 0; font: 600 clamp(30px, 5.4vw, 76px)/1.14 var(--display); letter-spacing: -0.035em; white-space: nowrap; }
.l-diff span { display: flex; gap: 0.32em; padding: 0.02em 0.2em 0.08em 0.12em; margin-left: -0.12em; }
.l-diff i { flex: none; width: 0.55em; font: 400 0.8em/1.4 var(--mono); font-style: normal; text-align: center; }
.l-diff .del { background: color-mix(in srgb, var(--del) 70%, transparent); color: var(--fg-3); }
.l-diff .del i { color: var(--red); }
.l-diff .add { background: color-mix(in srgb, var(--add) 80%, transparent); }
.l-diff .add i { color: var(--green); }
.l-sub { margin: 0; max-width: 520px; font-size: 16.5px; line-height: 1.6; color: var(--fg-2); text-wrap: pretty; }
.l-cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: none; }
.l-btn { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px 0 16px; border: 1px solid transparent; border-radius: 8px; background: var(--fg); color: var(--bg); font: 600 14.5px var(--display); }
.l-btn:hover { filter: brightness(0.92); text-decoration: none; }
.l-btn svg { width: 17px; height: 17px; fill: currentColor; }
.l-btn kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: 5px; background: none; color: inherit; font: 11px var(--mono); opacity: 0.7; box-shadow: none; }
.l-btn.ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.l-btn.ghost:hover { background: var(--bg-2); filter: none; }
.l-note { color: var(--fg-2); max-width: 400px; }
.l-works { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 10px 34px; max-width: 1180px; margin: 0 auto; padding: 44px 32px 0; color: var(--fg-3); }
.l-works span { width: 100%; text-align: center; font-size: 12.5px; }
.l-works b { font: 650 19px var(--display); letter-spacing: -0.01em; color: var(--fg-2); opacity: 0.75; }

/* the numbered strip: each part of a tour, wired to the demo window below it */
.l-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 14px 14px 0 0; overflow: hidden; background: var(--bg-2); }
.l-steps button { position: relative; display: grid; gap: 2px; padding: 14px 18px 15px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--fg-2); text-align: left; font: inherit; cursor: pointer; }
.l-steps button:first-child { border-left: 0; }
.l-steps button:hover { color: var(--fg); background: color-mix(in srgb, var(--bg) 50%, var(--bg-2)); }
.l-steps button.on { background: var(--bg); color: var(--fg); }
.l-steps button.on::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--fg); }
.l-steps .n { font: 12px var(--mono); color: var(--fg-3); }
.l-steps .t { font: 600 14.5px var(--display); }
.l-steps .d { font-size: 12.5px; color: var(--fg-3); }
.l-steps + .l-window { border-top-left-radius: 0; border-top-right-radius: 0; }

/* the product, in a window */
.l-window-wrap { position: relative; padding: 0 32px 72px; scroll-margin-top: 24px; }
.l-window { position: relative; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: 0 40px 120px -24px rgb(0 0 0 / 0.45); }
.l-chrome { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg-3); font-size: 12px; color: var(--fg-2); }
.l-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fg-3); }
.l-url { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-url b { color: var(--fg); font-weight: 600; }
.l-url span { color: var(--fg-3); margin: 0 2px; }
.l-live { margin-left: auto; font-size: 11px; color: var(--fg-3); font-family: var(--mono); }
.l-app { height: 600px; }
.l-app .note { padding: 18px 20px 32px; }

/* features: a bento of real product pieces, all drawn from the demo tour */
.l-feat { max-width: 1240px; margin: 0 auto; padding: 128px 32px 0; scroll-margin-top: 24px; }
.l-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.l-head h2, .l-band h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 14px; text-wrap: balance; }
.l-head p { color: var(--fg-2); font-size: 17px; line-height: 1.55; margin: 0; }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.b-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); overflow: hidden; }
.b-card.s2 { grid-column: span 2; } .b-card.s3 { grid-column: span 3; } .b-card.s4 { grid-column: span 4; }
.b-card.s3 .b-vis { height: 196px; }
.b-vis { position: relative; height: 248px; padding: 22px 22px 0; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg); mask-image: linear-gradient(#000 78%, transparent); }
.b-txt { padding: 18px 22px 22px; }
.b-txt h3 { font: 700 17px/1.25 var(--display); letter-spacing: -0.01em; margin: 0 0 6px; }
.b-txt p { color: var(--fg-2); font-size: 14px; line-height: 1.55; margin: 0; }
.b-stops { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 22px; }
.b-stops ol { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.b-stops li { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; color: var(--fg-2); }
.b-stops li.on { background: var(--bg-3); color: var(--fg); }
.b-stops em { margin-left: auto; font: 11px var(--mono); font-style: normal; color: var(--fg-3); }
.b-n { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; border: 1.5px solid var(--line-2); border-radius: 50%; font-size: 10px; color: var(--fg-3); }
.b-stops li.on .b-n { border-color: var(--fg); color: var(--fg); }
.b-pts { font-size: 13px; line-height: 1.5; color: var(--fg-2); }
.b-pts .b-k { font: 600 12px var(--display); color: var(--fg-3); margin: 0 0 10px; }
.b-pts p { display: flex; gap: 9px; margin: 0 0 10px; }
.b-pts .pb { flex: none; }
.b-big b { display: block; font: 700 76px/1 var(--display); letter-spacing: -0.04em; }
.b-big b span { color: var(--fg-3); }
.b-bar { display: flex; gap: 4px; margin: 22px 0 12px; }
.b-bar i { flex: 1; height: 26px; border-radius: 4px; background: var(--bg-3); }
.b-bar i.on { background: var(--green); opacity: 0.75; }
.b-big p { color: var(--fg-3); font-size: 13px; margin: 0; }
.b-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.b-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.b-list li:first-child { border-top: 0; padding-top: 2px; }
.b-list span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-list em { font-style: normal; font-size: 12px; color: var(--fg-3); flex: none; }
.b-list .ic { flex: none; }
.b-dot { width: 8px; height: 8px; flex: none; border: 1.5px solid var(--fg-3); border-radius: 50%; }
.b-list em.b-new { padding: 1px 8px; border-radius: 999px; background: var(--blue); color: var(--on-accent); font-weight: 600; }
.b-seq svg { width: 100%; min-width: 560px; height: auto; }

/* security, the last call, the footer */
.l-band { max-width: 1240px; margin: 128px auto 0; padding: 0 32px; scroll-margin-top: 24px; }
.l-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; border-top: 1px solid var(--line); padding-top: 28px; }
.l-trust b { display: block; font-size: 15px; margin-bottom: 6px; }
.l-trust p { color: var(--fg-2); font-size: 14px; line-height: 1.55; margin: 0; }

/* footer: pitch, hairline link lists, the wordmark across the page */
.l-foot { margin-top: 128px; padding: 56px 32px 0; border-top: 1px solid var(--line); color: var(--fg-3); }
.f-top { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 3fr)); gap: 40px; }
.f-brand h2 { margin: 20px 0 14px; font: 700 clamp(28px, 2.6vw, 38px)/1.05 var(--display); letter-spacing: -0.03em; color: var(--fg); }
.f-brand p { margin: 0; max-width: 340px; font-size: 13.5px; line-height: 1.55; }
.l-foot h4 { margin: 0 0 8px; font: 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.f-top nav, .f-top > div:last-child { display: flex; flex-direction: column; }
.f-top nav a, .f-top > div:last-child span { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); font: 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
.f-top nav a::after { content: "+"; color: var(--fg-3); transition: transform 0.3s; }
.f-top nav a:hover { color: var(--fg); text-decoration: none; }
.f-top nav a:hover::after { transform: rotate(90deg); color: var(--fg); }
.f-mark { margin: 48px 0 -0.1em; font: 700 calc((100vw - 64px) * 0.137)/0.8 var(--display); letter-spacing: -0.06em; text-transform: uppercase; color: var(--fg); white-space: nowrap; overflow: hidden; }
.f-mark span { color: var(--blue); }
.f-bot { position: relative; background: var(--bg); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 -32px; padding: 14px 32px; border-top: 1px solid var(--line); font: 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.brand-sm { display: inline-flex; align-items: center; gap: 7px; color: var(--fg); font-weight: 700; font-family: var(--display); }
.brand-sm svg { width: 15px; height: 15px; fill: var(--fg); }
.brand-sm svg path { fill: none; stroke: var(--fg); stroke-width: 1.5; }

@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-card.s2, .b-card.s3, .b-card.s4 { grid-column: span 2; }
  .f-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .f-brand { grid-column: 1 / -1; }
  .l-trust { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 860px) {
  body[data-view="landing"] .top { padding: 0 16px; }
  .l-hero { padding: 56px 16px 40px; }
  .l-hero-row { flex-direction: column; align-items: flex-start; gap: 24px; margin-top: 24px; }
  .l-diff { white-space: normal; font-size: clamp(28px, 8vw, 44px); }
  .l-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l-steps button:nth-child(3) { border-left: 0; }
  .l-steps button:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .l-steps .d { display: none; }
  .l-frame { border: 0; }
  .l-window-wrap, .l-feat, .l-band, .l-foot, .l-works { padding-left: 16px; padding-right: 16px; }
  .l-feat { padding-top: 88px; }
  .b-stops { grid-template-columns: 1fr; }
  .b-pts { display: none; }
  .f-bot { margin: 0 -16px; padding: 14px 16px; }
  .f-mark { font-size: calc((100vw - 32px) * 0.137); }
  .f-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .l-works { gap: 8px 22px; }
  .l-works b { font-size: 16px; }
  .l-app { height: 560px; overflow: auto; }
  .l-live { display: none; }
}

/* ---------- syntax colours (GitHub's palette) ---------- */

:root { --sx-keyword: #cf222e; --sx-title: #8250df; --sx-string: #0a3069; --sx-number: #0550ae; --sx-comment: #6e7781; --sx-builtin: #953800; --sx-tag: #116329; --sx-meta: #0550ae; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --sx-keyword: #ff7b72; --sx-title: #d2a8ff; --sx-string: #a5d6ff; --sx-number: #79c0ff; --sx-comment: #8b949e; --sx-builtin: #ffa657; --sx-tag: #7ee787; --sx-meta: #79c0ff; }
}
:root[data-theme="dark"] { --sx-keyword: #ff7b72; --sx-title: #d2a8ff; --sx-string: #a5d6ff; --sx-number: #79c0ff; --sx-comment: #8b949e; --sx-builtin: #ffa657; --sx-tag: #7ee787; --sx-meta: #79c0ff; }
.tx .hljs-keyword, .tx .hljs-doctag, .tx .hljs-template-tag, .tx .hljs-template-variable, .tx .hljs-type.hljs-class, .tx .hljs-variable.language_ { color: var(--sx-keyword); }
.tx .hljs-title, .tx .hljs-title.class_, .tx .hljs-title.function_, .tx .hljs-title.class_.inherited__ { color: var(--sx-title); }
.tx .hljs-attr, .tx .hljs-attribute, .tx .hljs-literal, .tx .hljs-meta, .tx .hljs-number, .tx .hljs-operator, .tx .hljs-selector-attr, .tx .hljs-selector-class, .tx .hljs-selector-id, .tx .hljs-variable { color: var(--sx-number); }
.tx .hljs-meta .hljs-string, .tx .hljs-regexp, .tx .hljs-string { color: var(--sx-string); }
.tx .hljs-built_in, .tx .hljs-symbol, .tx .hljs-type { color: var(--sx-builtin); }
.tx .hljs-code, .tx .hljs-comment, .tx .hljs-formula { color: var(--sx-comment); }
.tx .hljs-name, .tx .hljs-quote, .tx .hljs-selector-pseudo, .tx .hljs-selector-tag { color: var(--sx-tag); }
.tx .hljs-subst { color: inherit; }
.tx .hljs-section { color: var(--sx-meta); font-weight: 600; }
.tx .hljs-bullet { color: var(--sx-builtin); }
.tx .hljs-emphasis { font-style: italic; }
.tx .hljs-strong { font-weight: 600; }
.tx .hljs-addition { color: var(--sx-tag); }
.tx .hljs-deletion { color: var(--sx-keyword); }
.link.strong { font-weight: 600; }

/* ---------- account menu ---------- */

.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 6px; border-radius: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { background: var(--bg-3); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 260px; padding: 6px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); box-shadow: 0 8px 28px rgb(0 0 0 / 0.18); display: grid; }
.menu-pop a, .menu-pop button { display: block; text-align: left; padding: 7px 10px; border: 0; border-radius: 5px; background: none; color: var(--fg); font-size: 13px; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg-3); text-decoration: none; }
.menu-who { padding: 6px 10px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--fg-2); }
.menu-who b { color: var(--fg); }
.menu-note { padding: 8px 10px 6px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-2); line-height: 1.5; }
.menu-note code, .menu-who code { font-size: 11px; }



/* ---------- verdicts, review and "why": icons carry the colour, text stays plain ---------- */

.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; color: var(--fg-3); }
.ic .fill { fill: currentColor; stroke: none; }
.ic.ok { color: var(--green); }
.ic.bad { color: var(--red); }
.ic.warn { color: var(--amber); }
.ic.muted { color: var(--fg-3); }

.tour .row .c { display: inline-flex; align-items: center; gap: 4px; }
.tour .row .c .ic { width: 14px; height: 14px; }

.goal { margin: -4px 0 14px; font-size: 13.5px; color: var(--fg-2); }
.goal b { color: var(--fg); }
.need-line, .verify, .verdict-line { display: flex; gap: 8px; align-items: flex-start; }
.need-line .ic, .verify .ic, .verdict-line .ic { margin-top: 3px; }
.need-line { margin-top: 8px; font-size: 13px; color: var(--fg-2); }
.need-line b, .verify b { color: var(--fg); }
.verify { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.verdict-line { font-size: 14px; margin: -2px 0 8px; }
.asked { margin: -2px 0 6px; font-size: 13px; }
.asked a { display: inline-flex; gap: 6px; align-items: center; color: var(--fg); font-weight: 500; }
.pt-why { display: block; margin-top: 2px; font-size: 12.5px; color: var(--fg-2); }
.pt-why::before { content: "Why: "; font-weight: 600; color: var(--fg-3); }

/* the review reads like a GitHub review comment */
.review-box { margin: 6px 0 4px; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.rb-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--fg-2); }
.rb-head b { color: var(--fg); }
.rb-tally { margin-left: auto; font-size: 12px; color: var(--fg-3); white-space: nowrap; }
.rb-body { padding: 10px 12px 12px; }
.meter { display: inline-flex; gap: 2px; vertical-align: middle; }
.meter i { width: 5px; height: 11px; border-radius: 1px; background: var(--line); }
.meter i.on { background: var(--fg-2); }
.meter.bad i.on { background: var(--red); }
.meter.muted i { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.grade { font-size: 12px; font-weight: 500; margin-left: 8px; color: var(--fg); }
.grade.poor { color: var(--red); }
.grade.unclear { color: var(--fg-3); }
.scorecard { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.scorecard th { text-align: left; font-weight: 500; padding: 8px 12px 8px 0; white-space: nowrap; vertical-align: top; width: 1%; }
.scorecard td { padding: 8px 0; vertical-align: top; line-height: 1.45; }
.scorecard tr + tr th, .scorecard tr + tr td { border-top: 1px solid var(--line); }
.scorecard td.m { white-space: nowrap; padding-right: 14px; width: 1%; }
.scorecard td.sum { color: var(--fg-2); }
.findings .f-tags { display: flex; gap: 6px; align-items: baseline; margin-bottom: 2px; font-size: 12px; }
.sev { font-weight: 600; color: var(--fg); }
.sev.blocker { color: var(--red); }
.sev.minor, .sev.nit { font-weight: 500; color: var(--fg-2); }
.f-dim { color: var(--fg-3); }
.f-dim::before { content: "· "; }
.pt-fix { display: block; margin-top: 3px; font-size: 12.5px; color: var(--fg-2); }
.pt-fix::before { content: "Suggest: "; font-weight: 600; color: var(--fg-3); }
.unneeded { list-style: none; margin: 8px 0 0; padding: 0; }
.unneeded li { padding: 9px 0; border-top: 1px solid var(--line); }
.unneeded li:first-child { border-top: 0; }
.unneeded li > .ic { margin-right: 6px; }
.unneeded a { font-weight: 600; color: var(--fg); }
.need-w { margin-left: 6px; font-size: 12px; color: var(--fg-3); }
.unneeded p { margin: 3px 0 0 22px; font-size: 13px; color: var(--fg-2); }
.glance { display: block; margin: -2px 0 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--fg); }
.glance:hover { text-decoration: none; background: var(--bg-2); }
.glance-h { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.glance-go { margin-left: auto; color: var(--blue); font-size: 12px; }
.glance-dims { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; }
.gd { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--fg-2); }
.rec-mini { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--fg-2); white-space: nowrap; }
.rec-mini .ic { width: 14px; height: 14px; }

/* "does it do what was asked": a plain list */
.reqs { list-style: none; margin: 14px 0 0; padding: 0; }
.reqs li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.reqs li:first-child { border-top: 0; }
.ri .ic { margin-top: 2px; }
.rq { font-weight: 500; }
.rs { font-size: 12px; font-weight: 400; margin-left: 6px; color: var(--fg-3); }
.re { color: var(--fg-2); font-size: 12.5px !important; margin-top: 2px; }
.reqs .loc { display: inline-block; margin-top: 4px; }

@media (max-width: 860px) { .account .who, .account .local { display: none; } }


/* ---------- appearance menu ---------- */

.appearance-pop { width: 248px; padding: 10px; gap: 4px; }
.menu-h { font-size: 11px; font-weight: 600; color: var(--fg-3); margin: 4px 2px 6px; }
.menu-h + .seg-btns { margin-bottom: 10px; }
.appearance-pop .seg-btns { display: flex; }
.appearance-pop .seg-btns button { flex: 1; padding: 5px 0; text-align: center; border-radius: 0; }
.palettes { display: grid; max-height: 330px; overflow: auto; }
.palettes button { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 5px; background: none; color: var(--fg); font-size: 13px; text-align: left; }
.palettes button:hover { background: var(--bg-3); }
.palettes button.on { background: var(--blue-bg); font-weight: 600; }
.pal-sw { display: inline-flex; align-items: center; justify-content: center; gap: 2px; width: 26px; height: 18px; border-radius: 4px; border: 1px solid; flex: none; }
.pal-sw i { width: 6px; height: 6px; border-radius: 50%; }
#appearance > summary { list-style: none; padding: 0; justify-content: center; border-radius: 5px; }
#appearance > summary::-webkit-details-marker { display: none; }


/* ---------- split diff: old on the left, new on the right ---------- */

.code-bar { position: sticky; top: -16px; z-index: 3; display: flex; justify-content: flex-end; margin: -16px -20px 12px; padding: 8px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
.code-bar .seg-btns button { padding: 3px 12px; }
.diff.split { table-layout: fixed; }
.diff.split col.c-pg { width: 26px; }
.diff.split col.c-ln { width: 46px; }
.diff.split col.c-sg { width: 16px; }
.diff.split .ln { width: auto; min-width: 0; }
.diff.split .tx { white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 10px; }
.diff.split .tx + .ln { border-left: 1px solid var(--line); }
.diff.split td.add { background: var(--add); }
.diff.split td.ln.add { background: var(--add-ln); color: var(--green); }
.diff.split td.sg.add { color: var(--green); }
.diff.split td.del { background: var(--del); }
.diff.split td.ln.del { background: var(--del-ln); color: var(--red); }
.diff.split td.sg.del { color: var(--red); }
.diff.split td.empty { background: var(--bg-2); }
@media (max-width: 860px) { .code-bar { display: none; } }

/* ---------- home: resume a tour, what needs you, the rest of your tours ---------- */

.home2 { max-width: 1240px; margin: 0 auto; padding: 36px 32px 120px; }
.home2 h2 { display: flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.home2 h2 .count, .home2 .count { color: var(--fg-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.h-head { display: flex; align-items: center; gap: 24px; margin-bottom: 32px; }
.h-head h1 { margin: 0; font: 700 28px/1 var(--display); letter-spacing: -0.02em; white-space: nowrap; }
.h-head .go { flex: 1; max-width: 560px; margin-left: auto; display: flex; gap: 8px; }
.h-head .go input { flex: 1; min-width: 0; }
.h-sec + .h-sec { margin-top: 32px; }
.home2 .empty { color: var(--fg-3); font-size: 13px; margin: 0; padding: 14px; border: 1px dashed var(--line-2); border-radius: 8px; }
.nothumb { display: block; width: 100%; height: 100%; }
.t-thumb { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); padding: 6px 8px; }
.t-thumb svg { display: block; width: 100%; height: 100%; }
.t-thumb .edge text { display: none; }
.t-thumb .edge path { stroke: var(--line-2); }
.t-thumb .node rect { fill: var(--bg); }
.gist { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--fg-2); font-size: 12.5px; line-height: 1.5; }
.gist code { font-size: 11px; }
.t-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--fg-2); white-space: nowrap; }
.t-meta .pbar { width: 64px; }

/* tour rows, shared by several layouts */
.t-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.t-list li + li { border-top: 1px solid var(--line); }
.t-row { display: grid; grid-template-columns: 168px minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px 16px; padding: 14px 16px; color: var(--fg); }
.t-row:hover { background: var(--bg-2); text-decoration: none; }
.t-row .t-thumb { grid-row: 1 / 3; height: 76px; }
.t-row .main { display: grid; gap: 3px; min-width: 0; }
.t-row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-row .sub { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-2); }
.t-row .t-meta { grid-column: 2; }
.t-row .t-meta .muted { margin-left: auto; }
.t-list.compact .t-row { grid-template-columns: 112px minmax(0, 1fr); }
.t-list.compact .t-thumb { height: 60px; }
.t-list.compact .gist { display: none; }

.resume { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: center; padding: 28px; margin-bottom: 40px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); color: var(--fg); }
.resume:hover { text-decoration: none; border-color: var(--line-2); }
.resume .sub { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 12.5px; color: var(--fg-2); }
.resume h2 { display: block; margin: 0 0 10px; font: 700 26px/1.15 var(--display); letter-spacing: -0.02em; }
.resume .gist { -webkit-line-clamp: 3; font-size: 14px; }
.resume-foot { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 13px; color: var(--fg-2); }
.resume-foot .pbar { width: 120px; }
.resume-foot .btn { margin-left: auto; }
.resume-map { height: 220px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.resume-map svg { width: 100%; height: 100%; }
.resume-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }

@media (max-width: 960px) {
  .resume, .resume-cols { grid-template-columns: minmax(0, 1fr); }
  .resume { padding: 18px; gap: 18px; }
  .resume-foot { flex-wrap: wrap; }
  .resume-map { height: 160px; }
  .h-head { flex-wrap: wrap; }
  .h-head .go { max-width: none; width: 100%; }
}
.resume-foot > span, .resume-foot .btn { white-space: nowrap; }
.h-search input { height: 36px; font-size: 14px; padding-right: 34px; }
.h-search kbd { top: 9px; right: 10px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--fg-2); }
.pager span { margin-right: auto; font-variant-numeric: tabular-nums; }
.pager .btn[disabled] { opacity: 0.4; cursor: default; }
@media (max-width: 960px) { .h-head .go { flex-basis: 100%; max-width: none; } }

/* pull requests in, one read, stops out (landing) */
.l-chaos { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); gap: 56px; align-items: center; max-width: 1240px; margin: 0 auto; padding: 128px 32px 0; }
.l-chaos[hidden] { display: none; }
.l-chaos-copy h2 { margin: 0 0 16px; font: 700 clamp(28px, 3.2vw, 40px)/1.1 var(--display); letter-spacing: -0.025em; text-wrap: balance; }
.l-chaos-copy p { margin: 0; max-width: 440px; font-size: 16.5px; line-height: 1.6; color: var(--fg-2); }
.chaos { display: block; width: 100%; height: auto; overflow: visible; }
.chaos .chip rect { fill: var(--bg-2); stroke: var(--line-2); }
.chaos .chip text { font: 10px var(--mono); fill: var(--fg-3); }
.chaos .chip .a { fill: var(--green); } .chaos .chip .d { fill: var(--red); }
.chaos .chip { animation: chip 3.4s ease-in-out infinite; animation-delay: calc(var(--d) * -0.43s); }
.chaos .strand { fill: none; stroke-width: 1.3; opacity: 0.28; }
.chaos .strand.g { stroke: var(--green); } .chaos .strand.r { stroke: var(--red); }
.chaos .pk { opacity: 0.95; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 22 300; stroke-dashoffset: 322; animation: run 2.8s linear infinite; animation-delay: calc(var(--d) * -0.37s); }
.chaos .lane { fill: none; stroke: var(--line-2); stroke-width: 1.2; }
.chaos .lane.pk { stroke: var(--fg); stroke-width: 1.6; stroke-dasharray: 60 300; stroke-dashoffset: 360; animation-duration: 1.6s; animation-delay: calc(var(--d) * 0.28s); }
.chaos .read-line { stroke: var(--fg); stroke-width: 2; stroke-linecap: round; }
.chaos .stop-n circle { fill: var(--bg); stroke: var(--fg-2); stroke-width: 1.2; }
.chaos .stop-n text { font: 600 11px var(--sans); fill: var(--fg); }
.chaos .stop-n .t { font: 500 14px var(--sans); fill: var(--fg); }
@keyframes run { to { stroke-dashoffset: 0; } }
.chaos .lane.pk { animation-name: lane; }
@keyframes lane { to { stroke-dashoffset: 0; } }
@keyframes chip { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .chaos .pk { display: none; } .chaos .chip { animation: none; } }
@media (max-width: 960px) { .l-chaos { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 88px 16px 0; } }

/* play: diagram, the current hop, then its code, all on one screen */
.scrub { display: inline-flex; gap: 3px; }
.scrub button { min-width: 24px; height: 24px; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--fg-3); font: 11px var(--mono); cursor: pointer; }
.scrub button.seen { color: var(--fg-2); border-color: var(--line-2); }
.scrub button.on { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.hop-now { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); }
.hop-now .pn { background: var(--blue); color: var(--on-accent); }
.hop-now .hop-w { font-size: 14px; color: var(--fg); }
.hops-all { margin-top: 14px; }
.hops-all summary { cursor: pointer; font-size: 12.5px; color: var(--fg-2); }
.hops-all .hops { margin-top: 8px; }
.player .hop-code { max-height: max(240px, calc(100vh - 520px)); overflow: auto; border-radius: 8px; }

/* depth: Glance, Review, Deep */
.depth { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin: 0 0 10px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg-2); }
.depth button { height: 26px; border: 0; border-radius: 5px; background: none; color: var(--fg-2); font: 500 12px var(--sans); cursor: pointer; }
.depth button:hover { color: var(--fg); }
.depth button.on { background: var(--bg); color: var(--fg); box-shadow: 0 0 0 1px var(--line-2); }
.tour .row.fold { color: var(--fg-2); }
.tour .row.fold .c { color: var(--fg-3); }
.risks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.risks li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 13.5px; line-height: 1.5; }
.more-depth { margin: 10px 0 0; font-size: 13px; }
body:not([data-depth="deep"]) .pt-why { display: none; }
body[data-depth="glance"] .flowblock + .block { display: none; }

/* the review as a narrative: story, chapters with their own findings, the pre-mortem */
.story { font-size: 15px; line-height: 1.65; }
.chap { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.chap > p { margin: 8px 0 0; color: var(--fg-2); font-size: 13.5px; line-height: 1.55; }
.chap .findings { margin-top: 12px; }
.chap-h { display: flex; align-items: center; gap: 10px; }
.chap-h b { font: 600 14.5px var(--display); }
.chap-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--bg-3); color: var(--fg-2); font: 600 11px var(--sans); }
.chap-v { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--fg-2); }
.chap-go { margin-left: auto; font-size: 12.5px; color: var(--fg-2); cursor: pointer; }
.premortem .pm-t { display: block; margin: 2px 0 4px; font-weight: 600; }
.pm-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 1.5; color: var(--fg-2); }
.pm-row > span:first-child { color: var(--fg-3); }
.unknowns { margin: 10px 0 0; font-size: 13px; line-height: 1.55; color: var(--fg-2); }
.unknowns b { color: var(--fg); font-weight: 600; }
.tour .group.chap-g { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--fg-2); }

/* map lanes and the card that explains a box */
.lane-band rect { fill: var(--bg-2); stroke: var(--line); }
.lane-band text { font: 600 11px var(--sans); fill: var(--fg-3); }
.map-wrap { position: relative; }
.node-card { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); box-shadow: 0 8px 24px rgb(0 0 0 / 0.25); font-size: 13px; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity 0.12s, transform 0.12s; }
.node-card.on { opacity: 1; transform: none; }
.nc-go { flex-basis: 100%; font-size: 12px; color: var(--fg-3); }
.node-card b { font-weight: 600; }
.node-card code { font-size: 11.5px; color: var(--fg-3); }
.nc-st { font-size: 12px; color: var(--fg-2); }
.node-card p { flex-basis: 100%; margin: 2px 0 0; color: var(--fg-2); line-height: 1.5; }

/* review comments, under the line they were left on */
.diff tr.cmt td { padding: 0; background: var(--bg); }
.thread { position: sticky; left: 4px; max-width: min(720px, 55vw); margin: 8px 12px 10px 4px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); font: 13px/1.5 var(--sans); white-space: normal; }
.th-c { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
.th-c + .th-c { border-top: 1px solid var(--line); }
.th-c .av { border-radius: 50%; }
.th-h { margin: 0 0 2px; font-size: 12.5px; }
.th-b { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg); }
.th-b pre { margin: 6px 0; padding: 8px 10px; border-radius: 6px; background: var(--bg); font: 12px/1.5 var(--mono); white-space: pre-wrap; }
.th-go { display: block; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-2); }
.cm-n { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; margin-right: 8px; font-size: 12px; color: var(--fg-2); }
.th-where { margin: 12px 0 4px; font-size: 12px; }

/* waitlist on the landing */
.l-wait { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: min(440px, 100%); }
.l-wait input { height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--fg); font: 15px var(--sans); }
.l-wait input:focus { outline: none; border-color: var(--fg-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 12%, transparent); }
.l-wait .l-btn { padding: 0 16px; cursor: pointer; }
.l-wait .l-btn:disabled { opacity: 0.6; cursor: default; }
.l-wait-msg { grid-column: 1 / -1; margin: 0; min-height: 0; font-size: 13px; color: var(--fg-2); }
.l-wait-msg:empty { display: none; }
.l-wait-msg.bad { color: var(--red); }
.l-wait-note { grid-column: 1 / -1; margin: 2px 0 0; font-size: 12.5px; color: var(--fg-3); }
.l-wait-note a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 2px; }
.l-wait-done { display: flex; gap: 10px; align-items: flex-start; max-width: 440px; margin: 0; font-size: 15px; line-height: 1.5; color: var(--fg); }
@media (max-width: 520px) { .l-wait { grid-template-columns: minmax(0, 1fr); } }
