/* Tracks design system: white, precise, technical. Hairlines and a visible grid; type does the work; colour is a signal, used sparingly. */
:root {
  --bg: #ffffff; --subtle: #fafafa; --muted-bg: #f5f5f5; --hover: #f5f5f5; --press: #efefef;
  --ink: #0a0a0a; --ink-2: #525252; --ink-3: #8f8f8f; --line: #e8e8e8; --line-2: #f0f0f0;
  --accent: #12a150; --accent-ink: #0b7a3b; --accent-soft: #e9f7ef; --warn: #e5890a; --warn-soft: #fdf3e2; --bad: #e5484d; --bad-soft: #fdecec; --info: #4f5bd5;
  --shadow-xs: 0 1px 2px rgba(10, 10, 10, .05); --shadow-sm: 0 1px 2px rgba(10, 10, 10, .04), 0 2px 6px rgba(10, 10, 10, .04);
  --shadow-md: 0 4px 16px rgba(10, 10, 10, .08), 0 1px 3px rgba(10, 10, 10, .06);
  --focus: 0 0 0 3px rgba(18, 161, 80, .18);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --r: 10px; --r-s: 6px; --ease: cubic-bezier(.2, .7, .2, 1);
  --dots: radial-gradient(circle at 1px 1px, rgba(10, 10, 10, .09) 1px, transparent 0);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0a0a; --subtle: #111111; --muted-bg: #161616; --hover: #161616; --press: #1f1f1f;
  --ink: #ededed; --ink-2: #a3a3a3; --ink-3: #6e6e6e; --line: #242424; --line-2: #1b1b1b;
  --accent: #3dd47e; --accent-ink: #3dd47e; --accent-soft: #10251a; --warn: #f2a93b; --warn-soft: #2a1f0c; --bad: #ff6369; --bad-soft: #2c1213; --info: #8b93ff;
  --shadow-xs: none; --shadow-sm: none; --shadow-md: 0 8px 30px rgba(0, 0, 0, .5);
  --dots: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .08) 1px, transparent 0);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 24px; line-height: 1.25; }
h2 { font-size: 14px; letter-spacing: -0.01em; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--muted-bg); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
::selection { background: rgba(18, 161, 80, .16); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-s); }
.muted { color: var(--ink-3); } .soft { color: var(--ink-2); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.label, .section-title { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* controls */
button, .btn { font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); padding: 6px 12px; height: 32px; cursor: pointer; box-shadow: var(--shadow-xs); transition: background .12s var(--ease), border-color .12s, box-shadow .12s, transform .06s; display: inline-flex; align-items: center; gap: 6px; line-height: 1; white-space: nowrap; }
button:hover, .btn:hover { background: var(--subtle); border-color: color-mix(in srgb, var(--ink) 18%, var(--line)); }
button:active, .btn:active { transform: translateY(.5px); }
button:disabled { opacity: .45; cursor: default; transform: none; }
.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), var(--shadow-xs); }
.primary:hover { background: color-mix(in srgb, var(--ink) 84%, var(--bg)); border-color: color-mix(in srgb, var(--ink) 84%, var(--bg)); }
.quiet { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); }
.quiet:hover { background: var(--hover); border-color: transparent; color: var(--ink); }
.danger { color: var(--bad); }
.icon-btn { padding: 0; width: 30px; height: 30px; justify-content: center; border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-3); }
.icon-btn:hover { color: var(--ink); background: var(--hover); border-color: transparent; }
.icon-btn svg { width: 17px; height: 17px; display: block; }
input, textarea, select { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 11px; width: 100%; box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s; }
select { height: 34px; padding: 0 10px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
textarea { min-height: 80px; resize: vertical; line-height: 1.55; }
label { display: block; font-size: 13px; color: var(--ink-2); margin: 14px 0 6px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
kbd { font-family: var(--mono); font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--bg); }

/* app shell */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--subtle); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 12px 10px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 650; font-size: 15px; padding: 6px 8px 16px; letter-spacing: -0.02em; }
.brand img { width: 22px; height: 22px; }
.demo-flag { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); border-radius: 4px; padding: 1px 5px; }
.nav a { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 8px; border-radius: var(--r-s); color: var(--ink-2); font-size: 13.5px; font-weight: 500; border: 1px solid transparent; transition: background .1s, color .1s; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.on { background: var(--bg); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-xs); }
.nav svg { width: 16px; height: 16px; flex: none; }
.nav .count { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 600; color: #fff; background: var(--accent); border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; }
.side-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 22px 8px 6px; }
.tracklist a { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: var(--r-s); font-size: 13.5px; color: var(--ink-2); overflow: hidden; white-space: nowrap; }
.tracklist a::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--line); flex: none; }
.tracklist a:hover { background: var(--hover); color: var(--ink); }
.tracklist a.on { color: var(--ink); background: var(--hover); }
.tracklist a.on::before { background: var(--accent); }
.side-foot { margin-top: auto; padding: 10px 6px 2px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #d9f99d, #34d399); color: #064e3b; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.side-foot .who { min-width: 0; flex: 1; font-size: 13px; font-weight: 500; }
.side-foot .who div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who .tiny { font-weight: 400; }
.main { min-width: 0; }
.page { max-width: 820px; margin: 0 auto; padding: 44px 36px 96px; animation: enter .2s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.head { margin-bottom: 26px; }
.head p { color: var(--ink-2); margin-top: 4px; font-size: 14px; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.crumb:hover { color: var(--ink); }

/* lists: one bordered surface, hairline rows */
.section-title { margin: 32px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.head + .section-title, .section-title:first-child { margin-top: 0; }
.list { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); box-shadow: var(--shadow-sm); overflow: hidden; }
.entry { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line-2); transition: background .1s; position: relative; cursor: pointer; }
.list .entry:last-child { border-bottom: 0; }
.entry:hover { background: var(--subtle); }
.entry .text { font-size: 14.5px; line-height: 1.5; color: var(--ink); font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-right: 8px; }
.entry .meta { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.entry .meta > span + span::before { content: "·"; margin-right: 6px; color: var(--line); }
.entry .quick { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; gap: 6px; opacity: 0; pointer-events: none; transition: opacity .12s; padding-left: 28px; background: linear-gradient(90deg, transparent, var(--subtle) 28px); }
.entry:hover .quick, .entry:focus-within .quick { opacity: 1; pointer-events: auto; }
.entry.reading .text { font-weight: 450; font-size: 14.5px; line-height: 1.6; -webkit-line-clamp: unset; display: block; }

/* status: small pill with a dot */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 1px 8px 1px 7px; line-height: 18px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.status.pending { color: color-mix(in srgb, var(--warn) 75%, var(--ink)); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); background: var(--warn-soft); }
.status.pending::before { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.status.approved { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); background: var(--accent-soft); }
.status.approved::before { background: var(--accent); }
.status.dismissed, .status.retracted { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, var(--line)); background: var(--bad-soft); }
.status.dismissed::before, .status.retracted::before { background: var(--bad); }
.entry .meta .status { font-size: 11.5px; }

/* finding: a focused document on a card */
.doc { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); box-shadow: var(--shadow-sm); padding: 26px 28px 22px; }
.doc-meta { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.doc-meta > * + *:not(.status)::before { content: "·"; margin-right: 8px; color: var(--line); }
.doc-meta > .status + *::before { content: none; }
.statement { font-family: var(--display); font-size: 21px; font-weight: 500; line-height: 1.45; letter-spacing: -0.015em; margin: 16px 0 0; color: var(--ink); white-space: pre-wrap; }
.statement[contenteditable="true"] { outline: none; background: var(--subtle); border: 1px solid var(--accent); border-radius: var(--r); padding: 12px 14px; margin: 14px -15px 0; box-shadow: var(--focus); }
.note-line { font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line-2); }
.actions .spacer { flex: 1; }
.panel { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--subtle); animation: enter .16s var(--ease); }
.panel h3 { font-size: 14px; margin-bottom: 2px; }
.panel .row { margin-top: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.chip { font-size: 13px; height: 30px; border-radius: 999px; padding: 0 12px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.block { margin-top: 30px; }
.block > h2 { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.block > h2::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.quote { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: var(--ink); background: var(--subtle); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; white-space: pre-wrap; word-break: break-word; }
.source { font-size: 12px; color: var(--ink-3); margin: 12px 0 6px; }
details summary { cursor: pointer; color: var(--ink-3); font-size: 12.5px; list-style: none; padding: 4px 0; font-weight: 500; }
details summary:hover { color: var(--ink); }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "›"; display: inline-block; width: 14px; transition: transform .15s; }
details[open] summary::before { transform: rotate(90deg); }
details.block > summary { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 260px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 5px; box-shadow: var(--shadow-md); z-index: 10; animation: enter .12s var(--ease); }
.menu-pop button { width: 100%; height: auto; border: 0; box-shadow: none; border-radius: var(--r-s); justify-content: flex-start; padding: 8px 10px; text-align: left; white-space: normal; line-height: 1.35; }
.menu-pop button:hover { background: var(--hover); }
.menu-pop .hint { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); margin-top: 2px; }

/* conversation */
.convo-wrap { border: 1px solid var(--line); border-radius: var(--r); padding: 4px 18px; box-shadow: var(--shadow-sm); }
.msg { padding: 14px 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; }
.msg:last-child { border-bottom: 0; }
.msg::before { content: attr(data-initial); grid-row: span 3; width: 26px; height: 26px; border-radius: 50%; background: var(--muted-bg); border: 1px solid var(--line); color: var(--ink-2); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.msg.agentmsg::before { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 7px; }
.msg.event { padding: 10px 0; }
.msg.event::before { width: 26px; height: 18px; border: 0; background: transparent; content: "•"; color: var(--ink-3); }
.msg .by { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.msg .by b { color: var(--ink); font-weight: 600; }
.msg .by .agent { color: var(--accent-ink); font-weight: 600; }
.msg .body { margin-top: 3px; line-height: 1.6; font-size: 14px; }
.msg.event .by { display: block; }
.msg.event .by > * { margin-right: 4px; }
.msg .by button { opacity: 0; transition: opacity .15s; height: 22px; }
.msg:hover .by button, .msg .by button:focus-visible { opacity: 1; }
.msg .claim { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.msg > * { grid-column: 2; min-width: 0; }
.outcome { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-radius: 4px; padding: 2px 6px; margin-right: 6px; }
.outcome.confirmed { color: var(--accent-ink); background: var(--accent-soft); } .outcome.contradicted { color: var(--bad); background: var(--bad-soft); } .outcome.inconclusive, .outcome.not_attempted { color: var(--warn); background: var(--warn-soft); }
.composer { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); padding: 6px 6px 6px 12px; display: flex; align-items: flex-end; gap: 6px; box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s; }
.composer:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.composer textarea { border: 0; box-shadow: none; padding: 7px 0; min-height: 36px; max-height: 240px; background: transparent; resize: none; }
.composer textarea:focus { box-shadow: none; }
.composer input { border: 0; box-shadow: none; background: transparent; }

/* empty and notices */
.empty { text-align: center; padding: 64px 24px; color: var(--ink-2); border: 1px dashed var(--line); border-radius: 14px; background-image: var(--dots); background-size: 16px 16px; }
.empty .mark { width: 40px; height: 40px; margin: 0 auto 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: grid; place-items: center; color: var(--accent); }
.empty .mark svg { width: 20px; height: 20px; }
.empty b { display: block; color: var(--ink); font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.empty .row { justify-content: center; margin-top: 16px; }
.empty.inline { padding: 22px 18px; text-align: left; background: var(--subtle); border-style: solid; }
.empty.inline b { font-size: 14px; }
.notice { font-size: 13.5px; color: var(--ink-2); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line)); border-radius: var(--r); padding: 10px 14px; margin-bottom: 20px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 500; padding: 7px 7px 7px 14px; border-radius: var(--r); box-shadow: var(--shadow-md); z-index: 50; animation: toast .22s var(--ease); display: flex; gap: 12px; align-items: center; min-height: 40px; }
.toast:not(:has(button)) { padding-right: 14px; }
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.toast.bad::before { background: var(--bad); }
.toast button { color: inherit; background: transparent; border-color: color-mix(in srgb, currentColor 25%, transparent); box-shadow: none; height: 26px; padding: 0 10px; font-size: 12.5px; }
.toast button:hover { background: color-mix(in srgb, currentColor 12%, transparent); border-color: color-mix(in srgb, currentColor 25%, transparent); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0); } }

/* tabs, tables, settings */
.tabs { display: flex; gap: 0; margin: 20px 0 16px; border-bottom: 1px solid var(--line); }
.tabs a { font-size: 13.5px; font-weight: 500; color: var(--ink-3); padding: 8px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; transition: color .1s; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--subtle); }
td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.settings { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.setting { padding: 22px 24px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.setting:last-child { border-bottom: 0; }
.setting .desc { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.cmd { font-family: var(--mono); font-size: 12.5px; line-height: 1.75; background: #0a0a0a; color: #e5e5e5; border-radius: var(--r-s); padding: 12px 14px; white-space: pre-wrap; word-break: break-word; border: 1px solid #0a0a0a; }
.cmd::before { content: "$ "; color: #3dd47e; }
.cmd.link::before { content: none; }
:root[data-theme="dark"] .cmd { background: #111; border-color: var(--line); }
.checks { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.checks li { padding: 5px 0 5px 26px; color: var(--ink-2); position: relative; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 14px; height: 14px; border-radius: 4px; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%2312a150' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat; }
.checks li.later { color: var(--ink-3); }
.checks li.later::before { background: var(--muted-bg); }
.seg { display: inline-flex; background: var(--muted-bg); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { border: 0; box-shadow: none; background: transparent; height: 28px; padding: 0 12px; font-size: 13px; color: var(--ink-2); border-radius: 6px; }
.seg button.on { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; margin-top: 10px; }
.bars i { flex: 1; background: var(--accent); opacity: .55; border-radius: 2px 2px 0 0; min-height: 2px; }
.stat { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); margin: 12px 0 6px; overflow: hidden; }
.stats > div { padding: 14px 16px; border-right: 1px solid var(--line); } .stats > div:last-child { border-right: 0; }
.stats .k { font-size: 12px; color: var(--ink-3); }
.signin { min-height: 100vh; display: grid; place-items: center; padding: 20px; background-image: var(--dots); background-size: 18px 18px; }
.signin .box { width: min(380px, 100%); text-align: center; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; box-shadow: var(--shadow-md); }
.signin .box img { width: 34px; height: 34px; margin-bottom: 16px; }
.signin .box input { margin-top: 22px; }
.signin .box p { color: var(--ink-2); margin-top: 8px; font-size: 13.5px; }
.signin .box .primary { width: 100%; justify-content: center; margin-top: 10px; height: 36px; }

/* landing: a framed grid with rails */
.lp { background: var(--bg); }
.lp .frame { max-width: 1160px; margin: 0 auto; }
.lp header.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.lp header.top .frame { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 60px; }
.lp header .brand { padding: 0; }
.lp header nav { display: flex; gap: 26px; align-items: center; font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.lp header nav a:hover { color: var(--ink); }
.lp section { border-bottom: 1px solid var(--line); }
.lp .pad { padding: 72px 48px; }
.eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow::before { content: "[ "; } .eyebrow::after { content: " ]"; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 560px; }
.hero .copy { padding: 76px 48px 60px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.hero h1 { font-size: clamp(38px, 4.6vw, 58px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 650; margin-top: 18px; }
.hero h1 span { color: var(--ink-3); }
.hero p.lead { font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 470px; margin: 20px 0 30px; }
.hero .btn { height: 38px; padding: 0 16px; font-size: 14px; }
.hero .facts { margin-top: 44px; border-top: 1px solid var(--line); }
.hero .facts div { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); }
.hero .facts div::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero .stage { background-color: var(--subtle); background-image: var(--dots); background-size: 16px 16px; display: grid; place-items: center; padding: 40px 32px; position: relative; overflow: hidden; }
.mock { width: min(440px, 100%); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px rgba(10, 10, 10, .10), 0 2px 6px rgba(10, 10, 10, .05); overflow: hidden; animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.mock .bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.mock .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.mock .bar span { margin-left: 8px; }
.mock .item { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.mock .item:last-child { border-bottom: 0; }
.mock .item .t { font-size: 13.5px; font-weight: 500; line-height: 1.45; }
.mock .item .m { font-size: 12px; color: var(--ink-3); margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.mock .item .acts { display: flex; gap: 6px; margin-top: 10px; }
.mock .item .acts span { font-size: 12px; font-weight: 500; border: 1px solid var(--line); border-radius: 5px; padding: 4px 9px; }
.mock .item .acts span.go { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mock .agent-line { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); background: var(--subtle); padding: 10px 14px; border-top: 1px solid var(--line); }
.mock .agent-line b { color: var(--accent-ink); font-weight: 600; }
.lp h2.title { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 650; margin-top: 14px; max-width: 720px; }
.lp p.sub { font-size: 16px; color: var(--ink-2); max-width: 620px; margin-top: 14px; line-height: 1.6; }
.center { text-align: center; } .center h2.title, .center p.sub { margin-left: auto; margin-right: auto; }
.dark-band { background: #0a0a0a; color: #ededed; background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .07) 1px, transparent 0); background-size: 16px 16px; }
.dark-band .eyebrow { color: #8f8f8f; } .dark-band p.sub, .dark-band .cell p { color: #a3a3a3; }
.cells { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.dark-band .cells { border-color: #242424; }
.cell { padding: 32px 32px 36px; border-right: 1px solid var(--line); }
.cell:last-child { border-right: 0; }
.dark-band .cell { border-color: #242424; }
.cell h3 { font-size: 16px; margin: 18px 0 8px; letter-spacing: -0.015em; }
.cell p { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.cell .state { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 14px; }
.chip-icon { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.c1 { background: #12a150; } .c2 { background: #ff6b4a; } .c3 { background: #4f5bd5; } .c4 { background: #e5890a; } .c5 { background: #0ea5e9; } .c6 { background: #a855f7; }
.cells.six { grid-template-columns: repeat(3, 1fr); }
.cells.six .cell:nth-child(n+4) { border-top: 1px solid var(--line); }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); position: relative; }
.flow .stepc { padding: 30px 24px 34px; border-right: 1px solid var(--line); position: relative; }
.flow .stepc:last-child { border-right: 0; }
.flow .num { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .08em; }
.flow h3 { font-size: 15.5px; margin: 14px 0 6px; }
.flow p { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.flow .stepc.gate { background: var(--subtle); }
.flow .stepc.gate .num { color: var(--accent-ink); }
.flow .stepc.gate::after { content: "owner approves"; position: absolute; top: 28px; right: 20px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); border-radius: 4px; padding: 2px 6px; }
.flow::after { content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: 20%; background: var(--accent); animation: sweep 6s var(--ease) infinite; }
@keyframes sweep { 0% { left: 0; } 100% { left: 80%; } }
.shots { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.shot { padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--subtle); }
.shot:nth-child(2n) { border-right: 0; }
.shot:nth-last-child(-n+2) { border-bottom: 0; }
.shot img { width: 100%; display: block; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.shot figcaption { font-size: 13px; color: var(--ink-2); margin-top: 14px; }
figure { margin: 0; }
.results { margin-top: 14px; }
.results td:last-child, .results th:last-child { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; }
.hl { font-weight: 700; color: var(--accent-ink); }
.split2 { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.split2 > div { padding: 32px; border-right: 1px solid var(--line); }
.split2 > div:last-child { border-right: 0; }
.cta { text-align: center; padding: 88px 48px; background-image: var(--dots); background-size: 16px 16px; }
.cta h2.title { margin: 14px auto 0; }
.cta .row { justify-content: center; margin-top: 28px; }
.lp footer .frame { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 24px 40px; color: var(--ink-3); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .flow::after, .mock, .page, .panel, .toast, .menu-pop { animation: none; } }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px 10px; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand { padding: 6px 8px; }
  .nav { display: flex; gap: 2px; }
  .nav a .nl { display: none; }
  .side-label, .tracklist, .side-foot .who { display: none; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .page { padding: 28px 16px 80px; }
  .doc { padding: 20px 18px; }
  .setting { grid-template-columns: 1fr; gap: 10px; padding: 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .entry .quick { display: none; }
  .hero { grid-template-columns: 1fr; } .hero .copy { border-right: 0; padding: 48px 20px; } .hero .stage { padding: 32px 16px; }
  .lp .pad { padding: 52px 20px; }
  .cells, .cells.six, .flow, .shots, .split2 { grid-template-columns: 1fr; }
  .cell, .flow .stepc, .shot, .split2 > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .lp header nav a:not(.btn) { display: none; }
}

/* sign-in */
.stack-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.stack-btns button { width: 100%; justify-content: center; height: 40px; font-size: 14px; }
button.oauth { position: relative; background: var(--bg); }
button.oauth svg { position: absolute; left: 14px; }
.signin-msg { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line)); border-radius: var(--r-s); padding: 8px 10px; font-size: 13px; color: var(--ink) !important; }
details.fallback { margin-top: 18px; text-align: left; }
details.fallback summary { text-align: center; }
details.fallback input { margin-top: 10px !important; }

/* ---- knowledge graph */
.graph-wrap { position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); overflow: hidden; }
.graph-wrap canvas { display: block; width: 100%; cursor: grab; touch-action: none; }
.graph-tip { position: absolute; max-width: 340px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 10px 30px rgba(0,0,0,.12); font-size: 13px; line-height: 1.45; pointer-events: none; z-index: 2; }
.graph-tip .tip-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 12px; color: var(--ink-3); }
.graph-tip .tip-meta .warnt { color: var(--warn); }
.graph-tip .tip-text { color: var(--ink); }
.graph-tip .tip-reason { margin-top: 6px; color: var(--bad); font-size: 12px; }
.graph-tip .tip-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.graph-tip .tip-topics span { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--c); color: var(--ink-2, var(--ink)); }
.graph-tip .tip-links { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: 12px; color: var(--ink-3); }
.graph-tip .tip-links b { color: var(--ink); font-weight: 500; }
.graph-tip .tip-hint { margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.graph-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.graph-legend .grow { flex: 1; }
.graph-legend .sep { width: 1px; height: 14px; background: var(--line); }
.graph-legend label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.graph-legend input { width: auto; margin: 0; }
.graph-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1.5px solid transparent; }
.graph-legend .dot.approved { background: var(--accent); }
.graph-legend .dot.replaced { border-color: var(--ink-3); }
.graph-legend .dot.withdrawn { border-color: var(--bad); }
.graph-legend .dot.pending { border: 1.5px dashed var(--warn); }
.graph-legend .line { display: inline-block; width: 18px; height: 0; margin-right: 6px; vertical-align: 3px; border-top: 1.5px solid var(--ink); }
.graph-legend .line.dashed { border-top-style: dashed; }
.graph-legend .line.faint { border-top: 1px solid var(--ink-3); opacity: .5; }
