@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-1: #111113;
  --bg-2: #18181b;
  --bg-3: #1f1f23;
  --line: #232327;
  --line-2: #2f2f35;
  --fg: #ededef;
  --fg-2: #a3a3ab;
  --fg-3: #8a8a93;
  --amber: #e8a33d;
  --amber-ink: #f3c27a;
  --red: #f07272;
  --red-ink: #ffa3a3;
  --green: #4cc38a;
  --green-ink: #8be0b5;
  --low: #8f98a3;
  --del-bg: rgba(240, 114, 114, 0.11);
  --add-bg: rgba(76, 195, 138, 0.11);
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --r: 10px;
  --r-sm: 7px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 14px/1.5 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  padding-bottom: 112px;
}
::selection { background: rgba(232, 163, 61, 0.32); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3c3c44; background-clip: padding-box; border: 3px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
button, select { font: inherit; color: inherit; caret-color: var(--amber); }
a { color: var(--fg); text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: var(--fg-2); }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-feature-settings: "zero" 0; }
.ic { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------- top bar */
.top {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; }
.brand .sep { color: var(--line-2); font-weight: 400; }
.brand .product { color: var(--fg); }
.brand .org { color: var(--fg-2); }
.demo-chip {
  font-size: 12px; color: var(--fg-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; white-space: nowrap;
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.seg { display: inline-flex; background: var(--bg-1); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; color: var(--fg-2); padding: 5px 12px; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-weight: 500; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--bg-3); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }

.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg); cursor: pointer;
  font-size: 13px; font-weight: 500; white-space: nowrap; position: relative;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), opacity 0.2s;
}
.btn:hover { background: var(--bg-3); border-color: #3a3a42; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--fg); color: #0a0a0b; border-color: var(--fg); }
.btn.primary:hover { background: #fff; }
.btn.primary:disabled { background: var(--fg-2); border-color: var(--fg-2); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--bg-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.ok { background: var(--green); border-color: var(--green); color: #06140d; }
.btn.ok:hover { background: #5fd29b; }
.btn.is-pressing { transform: scale(0.96); box-shadow: 0 0 0 3px rgba(76, 195, 138, 0.28); }
.badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--amber); color: #1a1205; font: 600 11px/18px var(--sans); text-align: center;
}

/* ---------------------------------------------------------- intro */
.intro { padding: 30px 0 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.intro h1 {
  margin: 0; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; font-weight: 600; letter-spacing: -0.025em;
  max-width: 34ch; text-wrap: balance;
}
.intro p { margin: 10px 0 0; color: var(--fg-2); max-width: 64ch; font-size: 14.5px; text-wrap: pretty; }
.legend { display: flex; gap: 16px; color: var(--fg-2); font-size: 12.5px; flex-wrap: wrap; justify-content: flex-end; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--line-2); display: inline-block; }
.dot.high { background: var(--red); }
.dot.medium { background: var(--amber); }
.dot.low { background: var(--low); }
.dot.fixed { background: var(--green); }

/* ---------------------------------------------------------- status bar */
.status {
  display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 24px; align-items: center;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; margin-bottom: 12px;
}
.status-line { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.status-text { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); }
.status-text strong { color: var(--fg); font-weight: 500; }
.track { height: 3px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.track i { display: block; height: 100%; width: 0; background: var(--fg); border-radius: 3px; transition: width 0.5s var(--ease); }
.track.done i { background: var(--green); }
.stats { display: flex; gap: 28px; margin: 0; }
.stats div { display: flex; flex-direction: column; gap: 2px; }
.stats dt { font-size: 12px; color: var(--fg-3); }
.stats dd { margin: 0; font: 500 17px/1.2 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stats .risk dd { color: var(--red-ink); }
.stats .risk.clear dd { color: var(--green-ink); }

/* ---------------------------------------------------------- systems */
.sys-tabs { display: none; }
.systems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.panel { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.sys-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sys-head img { width: auto; height: 18px; }
.sys-head .title { font-weight: 600; }
.sys-head .like { color: var(--fg-3); font-size: 12.5px; }
.sys-head .count { margin-left: auto; color: var(--fg-2); font-size: 12.5px; }
.cols, .row {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) 84px 92px; gap: 10px; align-items: center; padding: 0 14px;
}
.cols { height: 30px; font-size: 12px; color: var(--fg-3); border-bottom: 1px solid var(--line); }
.cols span:last-child, .row .amt { text-align: right; }
.list { position: relative; height: 280px; overflow: auto; overscroll-behavior: contain; }
.row { height: 31px; font-size: 13px; border-bottom: 1px solid rgba(35, 35, 39, 0.6); transition: background 0.4s var(--ease); }
.row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .pl { color: var(--fg-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .amt { font-family: var(--mono); font-size: 12.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.row .dot { opacity: 0; transform: scale(0.4); transition: opacity 0.3s var(--ease), transform 0.4s var(--ease); }
.row.flag .dot { opacity: 1; transform: scale(1); }
.row.flag-high { background: rgba(240, 114, 114, 0.06); }
.row.flag-medium { background: rgba(232, 163, 61, 0.05); }
.row.is-sel { background: var(--bg-3); }
.row.is-sel .nm { color: #fff; }
.row.is-touched { background: rgba(232, 163, 61, 0.12); }
.row.in { animation: rowIn 0.5s var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sweep {
  position: absolute; left: 0; right: 0; top: 0; height: 64px; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, rgba(232, 163, 61, 0), rgba(232, 163, 61, 0.09));
  border-bottom: 1px solid rgba(232, 163, 61, 0.55);
}
.scanning .sweep { animation: sweep 2.4s cubic-bezier(0.45, 0, 0.2, 1) 2 both; }
@keyframes sweep {
  0% { opacity: 0; transform: translateY(-64px); }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translateY(280px); }
}
.empty-list { padding: 40px 18px; text-align: center; color: var(--fg-3); font-size: 13px; }

/* ---------------------------------------------------------- work area */
.work { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 12px; align-items: start; }
.feed-head, .ws-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); min-height: 53px; }
.feed-head h2, .ws-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.feed-head .seg { margin-left: auto; }
.feed-head .seg button { padding: 3px 9px; font-size: 12px; }
.feed { max-height: 760px; overflow: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.card {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 12px; align-items: start; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 8px; border: 0; background: transparent; cursor: pointer;
  transition: opacity 0.5s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.5s var(--ease), filter 0.6s var(--ease);
}
.card .dot { margin-top: 6px; }
.card:hover { background: var(--bg-2); }
.card.is-dim { opacity: 0.22; filter: blur(1.5px) saturate(0); transform: translateY(4px); }
.card.is-lit { opacity: 1; filter: none; transform: none; }
.card.is-sel { background: var(--bg-3); }
.card.is-done .acct { color: var(--fg-2); }
.card.is-done .risk { color: var(--fg-3); text-decoration: line-through; text-decoration-color: var(--fg-3); }
.card .acct { font-weight: 550; font-size: 13.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card .what { color: var(--fg-2); font-size: 12.5px; margin-top: 2px; }
.card .det { color: var(--fg-3); font-size: 12.5px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.card .risk { font: 500 13px var(--mono); font-variant-numeric: tabular-nums; color: var(--fg); }
.card .risk.zero { color: var(--fg-3); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px;
  font-weight: 500; border: 1px solid var(--line-2); color: var(--fg-2); white-space: nowrap;
}
.chip .ic { width: 12px; height: 12px; vertical-align: 0; }
.chip.auto { color: var(--green-ink); border-color: rgba(76, 195, 138, 0.35); }
.chip.money { color: var(--amber-ink); border-color: rgba(232, 163, 61, 0.38); }
.chip.review { color: var(--fg-2); }
.chip.fixed { color: var(--green-ink); border-color: rgba(76, 195, 138, 0.35); background: rgba(76, 195, 138, 0.08); }
.chip.rejected { color: var(--fg-3); }
.chip.yours { color: #1a1205; background: var(--amber); border-color: var(--amber); }
.chip.newc { color: var(--amber-ink); border-color: rgba(232, 163, 61, 0.38); }
.feed-empty { padding: 48px 20px; text-align: center; color: var(--fg-2); }
.feed-empty p { margin: 6px auto 0; max-width: 34ch; color: var(--fg-3); font-size: 13px; }

.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--fg-2); cursor: pointer;
  padding: 6px 10px; border-radius: 7px; font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.tab:hover { color: var(--fg); background: var(--bg-2); }
.tab[aria-selected="true"] { color: var(--fg); background: var(--bg-3); }
.tab .n { font: 500 11.5px var(--mono); color: var(--fg-3); }
.tab[aria-selected="true"] .n { color: var(--fg-2); }
.ws-body { padding: 18px; min-height: 560px; }

/* diff */
.diff-head { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.diff-head h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.diff-head .sub { color: var(--fg-2); font-size: 13px; margin-top: 4px; max-width: 70ch; }
.match-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-2); flex-wrap: wrap; }
.match-line img { height: 14px; width: auto; }
.code {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font: 12.5px/1.6 var(--mono); font-variant-numeric: tabular-nums;
  background: #0d0d0f;
}
.code .hunk { padding: 7px 14px; color: #9aa6c0; background: #121216; border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap; }
.code table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.code th { text-align: left; font: 500 11.5px var(--sans); color: var(--fg-3); padding: 7px 10px; border-bottom: 1px solid var(--line); }
.code th img { height: 13px; width: auto; vertical-align: -2px; margin-right: 6px; }
.code td { padding: 3px 10px; vertical-align: top; overflow-wrap: anywhere; }
.code .g { width: 26px; text-align: center; color: var(--fg-3); user-select: none; padding-left: 12px; }
.code col.fcol { width: 120px; }
.code .f { color: var(--fg-2); }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.linkish:hover { text-decoration: underline; text-decoration-color: var(--fg-3); text-underline-offset: 3px; }
.code tr.del td { background: var(--del-bg); }
.code tr.del .g, .code tr.del .hl { color: var(--red-ink); }
.code tr.add td { background: var(--add-bg); }
.code tr.add .g, .code tr.add .hl { color: var(--green-ink); }
.code td.mut { color: var(--fg-3); }
.code td.none { color: var(--fg-3); font-style: italic; }
.code.resolved .hunk { color: var(--green-ink); }

.fixbox { margin-top: 16px; border-top: 1px solid var(--line); padding: 16px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.fixbox .lbl { font-size: 12px; color: var(--fg-3); }
.fixbox .sum { font-weight: 500; margin-top: 2px; }
.fixbox .why { color: var(--fg-2); font-size: 12.5px; margin-top: 6px; }
.fixbox .acts { display: flex; gap: 8px; }
.resolved-note { display: flex; gap: 8px; align-items: center; color: var(--green-ink); font-size: 13px; }

/* fixes tab */
.section { margin-bottom: 26px; }
.section-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.section-head p { margin: 2px 0 0; color: var(--fg-2); font-size: 12.5px; }
.section-head .acts { display: flex; gap: 8px; }
.fx { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.fx-row {
  display: grid; grid-template-columns: 8px minmax(150px, 0.9fr) minmax(0, 1.6fr) 96px auto; gap: 14px; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; transition: background 0.4s var(--ease), opacity 0.4s;
}
.fx-row:last-child { border-bottom: 0; }
.fx-row .a { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-row .s { color: var(--fg-2); }
.fx-row .chg { font: 12px var(--mono); color: var(--fg-3); margin-top: 2px; overflow-wrap: anywhere; }
.fx-row .chg del { color: var(--red-ink); text-decoration-color: rgba(255, 163, 163, 0.5); }
.fx-row .chg ins { color: var(--green-ink); text-decoration: none; }
.fx-row .r { font: 500 13px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.fx-row .acts { display: flex; gap: 6px; justify-content: flex-end; }
.fx-row.done .a { color: var(--fg-2); }
.fx-row.flash { background: rgba(76, 195, 138, 0.09); }
.fx-row.preview { background: rgba(232, 163, 61, 0.05); }
.fx-empty { padding: 22px 14px; color: var(--fg-3); font-size: 13px; }

/* digest */
.slack { max-width: 680px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #141417; }
.slack-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.slack-top img { width: 18px; height: 18px; }
.slack-top .muted { color: var(--fg-3); font-weight: 400; font-size: 12.5px; margin-left: auto; }
.msg { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 16px 14px 18px; }
.avatar { width: 38px; height: 38px; border-radius: 8px; background: var(--bg-3); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--amber); }
.avatar .ic { width: 20px; height: 20px; }
.msg .who { display: flex; gap: 8px; align-items: baseline; }
.msg .who b { font-weight: 700; }
.msg .app { font-size: 11px; color: var(--fg-2); background: var(--bg-3); border-radius: 3px; padding: 1px 4px; font-weight: 600; }
.msg .time { color: var(--fg-3); font-size: 12px; }
.msg .hl { font-weight: 700; margin: 4px 0 8px; font-size: 15px; }
.msg ul { margin: 0 0 12px; padding-left: 18px; color: var(--fg); }
.msg li { margin: 5px 0; font-size: 13.5px; text-wrap: pretty; }
.msg li b { font-weight: 600; }
.msg li .num { color: var(--fg-2); }
.msg li::marker { color: var(--fg-3); }
.msg .counts { display: flex; gap: 14px; flex-wrap: wrap; color: var(--fg-2); font-size: 13px; margin-bottom: 12px; }
.msg .counts span { display: inline-flex; align-items: center; gap: 6px; }
.msg .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.note { color: var(--fg-3); font-size: 12.5px; margin-top: 12px; max-width: 680px; }

/* audit */
.audit { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.audit th { text-align: left; font-weight: 500; color: var(--fg-3); padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.audit td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.audit td.m { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--fg-2); white-space: nowrap; }
.audit .chg { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.audit .chg del { color: var(--red-ink); }
.audit .chg ins { color: var(--green-ink); text-decoration: none; }
.audit-scroll { overflow-x: auto; }
.empty { padding: 56px 20px; text-align: center; color: var(--fg-2); }
.empty p { color: var(--fg-3); max-width: 44ch; margin: 6px auto 0; font-size: 13px; }

/* yaml */
.yaml { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #0d0d0f; font: 12.5px/1.65 var(--mono); overflow: auto; max-height: 620px; color: var(--fg); tab-size: 2; }
.yaml .c { color: #7d828c; }
.yaml .k { color: #c9d1e0; }
.yaml .s { color: var(--green-ink); }
.yaml .n { color: var(--amber-ink); }
.yaml-intro { color: var(--fg-2); font-size: 13px; margin: 0 0 12px; max-width: 72ch; }

/* ---------------------------------------------------------- break popover */
.pop {
  position: fixed; z-index: 40; top: 64px; right: max(24px, calc((100vw - 1440px) / 2 + 24px)); width: 380px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); padding: 16px;
  transform-origin: top right; animation: popIn 0.32s var(--ease) both;
}
.pop[hidden] { display: none; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(0.98); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.pop h2 { margin: 0; font-size: 15px; font-weight: 600; }
.pop > p { margin: 4px 0 12px; color: var(--fg-2); font-size: 12.5px; }
.pop label.f { display: block; font-size: 12px; color: var(--fg-2); margin-bottom: 6px; }
.select {
  width: 100%; height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-1); padding: 0 10px;
  margin-bottom: 12px; cursor: pointer;
}
.opts { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.opt { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-size: 13px; }
.opt:hover { background: var(--bg-3); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt img { height: 15px; width: auto; justify-self: center; }
.opt small { display: block; color: var(--fg-3); font-size: 12px; }
.opt:has(input:checked) { border-color: var(--line-2); background: var(--bg-3); }
.opt:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 1px; }
.pop .acts { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------------------------------------------------------- story bar */
.story {
  position: fixed; z-index: 35; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(820px, calc(100vw - 24px));
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 14px 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.story.is-hidden { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; }
.bars { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bars button { height: 12px; border: 0; padding: 4px 0; background: transparent; cursor: pointer; display: block; }
.bars button i { display: block; height: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.bars button i b { display: block; height: 100%; width: 0; background: var(--fg); }
.caption { font-size: 15px; line-height: 1.45; text-wrap: pretty; min-height: 44px; display: flex; align-items: center; }
.caption .k { color: var(--fg-3); font: 500 12px var(--mono); margin-right: 10px; flex: none; }
.story .acts { display: flex; gap: 6px; }
.replay { position: fixed; z-index: 35; right: 18px; bottom: 18px; }
.replay[hidden] { display: none; }

.toast {
  position: fixed; z-index: 45; left: 18px; bottom: 18px; max-width: 380px; background: var(--fg); color: #0a0a0b;
  padding: 10px 14px; border-radius: 9px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.toast.on { opacity: 1; transform: none; }

/* ---------------------------------------------------------- footer */
.foot { margin-top: 40px; padding: 22px 0 10px; border-top: 1px solid var(--line); color: var(--fg-3); font-size: 12.5px; display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.foot p { margin: 0; max-width: 62ch; }
.foot strong { color: var(--fg-2); font-weight: 500; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .work { grid-template-columns: 360px minmax(0, 1fr); }
  .stats { gap: 18px; }
  .status { grid-template-columns: 1fr; }
  .intro { grid-template-columns: 1fr; }
  .legend { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .work { grid-template-columns: 1fr; }
  .feed { max-height: 460px; }
  .systems { grid-template-columns: 1fr; }
  .sys-tabs { display: flex; margin-bottom: 8px; }
  .sys-tabs.seg { display: inline-flex; }
  .systems .panel { display: none; }
  .systems .panel.is-active { display: block; }
  .fx-row { grid-template-columns: 8px minmax(0, 1fr) auto; }
  .fx-row .s { grid-column: 2 / -1; }
  .fx-row .acts { grid-column: 2 / -1; justify-content: flex-start; }
  .fx-row .r { grid-row: 1; grid-column: 3; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .top .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; gap: 10px; }
  .demo-chip { display: none; }
  .top-actions { width: 100%; margin-left: 0; }
  .top-actions .seg { margin-right: auto; }
  .btn .lbl-long { display: none; }
  .intro { padding: 26px 0 18px; }
  .intro p { font-size: 14px; }
  .status { padding: 12px 14px; }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
  .stats dd { font-size: 15px; }
  .cols, .row { grid-template-columns: 10px minmax(0, 1fr) 64px 84px; gap: 8px; padding: 0 12px; }
  .ws-body { padding: 14px; min-height: 0; }
  .ws-head { flex-wrap: wrap; }
  .code col.fcol { width: 76px; }
  .code td { padding: 3px 6px; }
  .code .g { width: 18px; padding-left: 6px; }
  .fixbox { grid-template-columns: 1fr; }
  .diff-head > div:last-child { text-align: left !important; }
  .diff-head > div:last-child > div { justify-content: flex-start !important; }
  .pop { left: 12px; right: 12px; width: auto; top: 112px; }
  .story { bottom: 8px; padding: 8px 10px 10px 12px; gap: 6px 10px; }
  .caption { font-size: 13px; line-height: 1.4; min-height: 0; }
  .caption .k { display: none; }
  .story .acts { align-self: end; }
  body { padding-bottom: 150px; }
  .toast { left: 12px; right: 12px; bottom: 132px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* full-bleed blocks inside the workspace: dividers, not nested cards */
.ws-body { --bleed: 18px; }
.code, .fx, .yaml, .slack { margin-left: calc(var(--bleed) * -1); margin-right: calc(var(--bleed) * -1); border-radius: 0; border-left: 0; border-right: 0; max-width: none; }
.code .hunk, .code th:first-child, .code td.g { padding-left: var(--bleed); }
.fx-row { padding-left: var(--bleed); padding-right: var(--bleed); }
.yaml { padding-left: var(--bleed); padding-right: var(--bleed); }
.slack-top, .msg { padding-left: var(--bleed); padding-right: var(--bleed); }
@media (max-width: 640px) { .ws-body { --bleed: 14px; } }
