@charset "UTF-8";
:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --paper-light: #faf8f1;
  --paper-deep: #e9e4d8;
  --ink: #20201e;
  --muted: #6f6b63;
  --line: #302e29;
  --line-soft: #c7c1b4;
  --rust: #b64d31;
  --rust-pale: #f0ddd3;
  --olive: #66724d;
  --olive-pale: #e4e7d9;
  --sans: "Segoe UI", "Aptos", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Songti SC", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", "Cascadia Mono", monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, tr:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
::selection { color: var(--paper-light); background: var(--rust); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: -60px; left: 12px; padding: 9px 12px; color: var(--paper-light); background: var(--ink); }
.skip-link:focus { top: 12px; }
.mono, code, pre { font-family: var(--mono); }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; width: 88px; flex-direction: column; align-items: stretch; border-right: 1px solid var(--line); background: var(--paper); }
.brand-mark { min-height: 72px; display: flex; align-items: center; justify-content: center; gap: 8px; border-bottom: 1px solid var(--line); text-decoration: none; }
.brand-mark__icon { display: grid; width: 31px; height: 31px; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%; font-family: var(--serif); font-size: 16px; line-height: 1; }
.brand-mark__icon span { color: var(--rust); }
.brand-mark__word { font: 700 12px/1.15 var(--mono); letter-spacing: -.06em; }
.side-nav { display: grid; align-content: start; padding-top: 18px; }
.side-nav__item { position: relative; min-height: 93px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 10px 3px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--ink); text-align: center; }
.side-nav__item::before { position: absolute; inset: 15px auto 15px 0; width: 3px; content: ""; background: transparent; }
.side-nav__item:hover { background: rgba(32, 32, 30, .04); }
.side-nav__item.is-active::before { background: var(--rust); }
.side-nav__number { font: 21px/.95 var(--serif); }
.side-nav__label { font-size: 12px; line-height: 1.25; }
.side-nav__label small { color: var(--muted); font: 12px/1.2 var(--mono); letter-spacing: .025em; }
.sidebar__foot { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: auto; padding: 16px 3px; border-top: 1px solid var(--line-soft); color: var(--muted); font: 12px/1.35 var(--mono); }
.status-dot { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--olive); }
.status-dot--rust { background: var(--rust); }
.workspace { min-height: 100vh; margin-left: 88px; }
.topbar { position: sticky; z-index: 20; top: 0; display: grid; min-height: 72px; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(244, 241, 232, .96); backdrop-filter: blur(12px); }
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 12px; }
.topbar__section { font: 13px/1 var(--mono); white-space: nowrap; }
.topbar__title { font: 600 19px/1.2 var(--sans); text-align: center; text-decoration: none; white-space: nowrap; }
.topbar__right { justify-content: flex-end; }
.topbar__version { color: var(--muted); font: 12px/1 var(--mono); white-space: nowrap; }
.topbar__repo { font: 12px/1 var(--mono); white-space: nowrap; }
.demo-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--rust); border-radius: 2px; color: #7b321f; background: #f8ebe3; font-size: 12px; white-space: nowrap; }
.demo-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rust); }
.menu-toggle { display: none; width: 36px; height: 36px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line-soft); background: transparent; }
.menu-toggle span { display: block; width: 17px; height: 1.5px; background: var(--ink); }
.nav-scrim { display: none; }
.main-content { width: min(100%, 1760px); margin-inline: auto; padding: 18px 28px 28px; }
.demo-notice { display: flex; align-items: center; gap: 12px; min-height: 38px; margin-bottom: 20px; padding: 7px 10px; border: 1px solid var(--line-soft); background: var(--paper-light); }
.demo-notice__mark { flex: 0 0 auto; padding: 4px 6px; color: var(--paper-light); background: var(--rust); font: 12px/1 var(--mono); }
.demo-notice p { flex: 1; margin: 0; color: #514d46; font-size: 12px; }
.demo-notice p strong { color: var(--ink); }
.demo-notice__scope { color: var(--muted); font: 12px/1.3 var(--mono); white-space: nowrap; }
.connection-strip { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; margin: -10px 0 19px; padding: 9px 11px; border: 1px solid var(--line-soft); background: #efede4; }
.connection-strip__indicator { width: 8px; height: 8px; border-radius: 50%; background: #8c867a; }
.connection-strip[data-state="connecting"] .connection-strip__indicator { background: #a98948; }
.connection-strip[data-state="connected"] .connection-strip__indicator { background: var(--olive); }
.connection-strip[data-state="error"] .connection-strip__indicator { background: var(--rust); }
.connection-strip__copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 12px; min-width: 0; }
.connection-strip__copy strong { font-size: 12px; }
.connection-strip__copy span { color: var(--muted); font-size: 12px; }
.connection-strip__mode { color: var(--muted); font: 12px var(--mono); white-space: nowrap; }
.connection-strip__link { padding: 6px 8px; border: 1px solid var(--line); font-size: 12px; text-decoration: none; white-space: nowrap; }
.connection-strip__link:hover { color: var(--paper-light); background: var(--ink); }
.backend-metrics { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); gap: 0; margin: -19px 0 19px; border: 1px solid var(--line); border-top: 0; background: var(--paper-light); }
.backend-metrics > div { display: grid; gap: 3px; padding: 9px 11px; border-right: 1px solid var(--line-soft); }
.backend-metrics > div span { color: var(--muted); font-size: 12px; }
.backend-metrics > div strong { font: 600 12px var(--mono); }
.backend-metrics > p { grid-column: 1 / -1; margin: 0; padding: 6px 11px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.policy-backend-state { margin: -4px 0 10px; padding: 7px 9px; border-left: 2px solid var(--olive); background: var(--olive-pale); color: #354226; font-size: 12px; }
.policy-backend-state strong { font-family: var(--mono); font-size: 12px; }
.audit-source-note { margin: 7px 0; color: var(--muted); font-size: 12px; }
.view { display: none; }
.view.is-visible { display: block; animation: view-in .18s ease-out; }
@keyframes view-in { from { opacity: .72; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin: 7px 0 21px; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font: 12px/1.2 var(--mono); letter-spacing: .025em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font: 600 clamp(29px, 3vw, 43px)/1.08 var(--sans); letter-spacing: -.055em; }
.page-heading__note { max-width: 420px; margin: 0 0 2px; color: var(--muted); font-size: 12px; text-align: right; }
.panel { border: 1px solid var(--line); background: var(--paper-light); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, .86fr); gap: 0; align-items: stretch; border: 1px solid var(--line); background: var(--paper-light); }
.overview-main { min-width: 0; border-right: 1px solid var(--line); }
.posture-panel, .timeline-panel, .flow-panel { padding: 18px 22px; border: 0; background: transparent; }
.posture-panel { border-bottom: 1px solid var(--line); }
.panel-kicker, .section-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-kicker { padding-bottom: 9px; border-bottom: 1px solid var(--line-soft); color: #45423c; font-size: 12px; font-weight: 700; }
.panel-kicker .mono { color: var(--muted); font-size: 12px; font-weight: 400; }
.posture-panel__headline { display: flex; min-height: 150px; align-items: center; justify-content: space-between; gap: 22px; padding: 12px 0; }
.posture-panel h2 { margin: 0; font: 500 clamp(34px, 4vw, 56px)/.92 var(--serif); letter-spacing: -.045em; }
.posture-value { display: flex; align-items: center; gap: 13px; }
.posture-value > span { font: 100 clamp(72px, 12vw, 132px)/.8 var(--sans); letter-spacing: -.08em; }
.posture-value small { max-width: 105px; padding-left: 10px; border-left: 2px solid var(--rust); color: var(--rust); font: 12px/1.4 var(--mono); }
.posture-panel__foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font: 12px/1.2 var(--mono); }
.posture-panel__foot strong { color: var(--ink); font: 600 12px/1.2 var(--sans); }
.timeline-panel { border-bottom: 1px solid var(--line); }
.section-bar { min-height: 25px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.section-bar h2 { margin: 0; font-size: 13px; font-weight: 700; }
.section-bar__meta { color: var(--muted); font: 12px/1.4 var(--mono); text-align: right; }
.chart-wrap { display: grid; grid-template-columns: 38px minmax(0, 1fr); height: 250px; margin-top: 12px; }
.chart-y-labels { display: flex; flex-direction: column; justify-content: space-around; padding: 4px 5px 21px 0; color: var(--muted); font: 12px/1.3 var(--mono); text-align: right; }
.signal-chart { width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { fill: none; stroke: #c9c4b9; stroke-width: 1; }
.chart-grid-line--horizontal { stroke: #d8d2c7; stroke-dasharray: 1 3; }
.chart-line { fill: none; vector-effect: non-scaling-stroke; }
.chart-line--primary { stroke: #302e29; stroke-width: 1.5; }
.chart-line--secondary { stroke: #a49b8d; stroke-width: 1.1; }
.chart-events { fill: var(--rust); stroke: var(--rust); stroke-width: 1.4; }
.chart-events path { fill: none; stroke-dasharray: 2 4; }
.chart-axis-label { fill: #706c64; font: 12px var(--mono); }
.chart-caption { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0 0 38px; color: var(--muted); font-size: 12px; }
.chart-caption .mono { font-size: 12px; }
.flow-panel { padding-bottom: 17px; }
.flow-strip { display: grid; grid-template-columns: 1fr 24px 1.2fr 24px 1fr; align-items: center; gap: 8px; padding: 13px 0 5px; }
.flow-node { display: grid; min-height: 62px; grid-template-columns: 24px 1fr; align-content: center; align-items: center; column-gap: 7px; padding: 7px 9px; border: 1px solid var(--line-soft); }
.flow-node__index { grid-row: span 2; color: var(--rust); font: 12px var(--mono); }
.flow-node strong { font-size: 12px; }
.flow-node small { color: var(--muted); font: 12px var(--mono); }
.flow-arrow { color: var(--rust); font-size: 18px; text-align: center; }
.flow-note { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.backend-demo-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px; border: 1px solid var(--line-soft); background: #efede4; }
.backend-demo-controls > div { display: grid; gap: 2px; }
.backend-demo-controls strong { font-size: 12px; }
.backend-demo-controls span { color: var(--muted); font-size: 12px; }
.backend-demo-result { max-height: 150px; margin: 8px 0 0; padding: 9px; overflow: auto; border: 1px solid var(--line-soft); background: #efede4; font: 12px/1.4 var(--mono); white-space: pre-wrap; }
.priority-panel { display: flex; flex-direction: column; min-width: 0; padding: 18px 17px 12px; border: 0; background: transparent; }
.priority-panel__header { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.priority-panel__header .eyebrow { margin-bottom: 5px; }
.priority-panel__header h2 { margin: 0; font: 600 18px/1.15 var(--serif); }
.priority-count { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line); font: 12px var(--mono); }
.priority-panel__note { margin: 8px 0 2px; color: var(--muted); font-size: 12px; }
.event-list { display: grid; flex: 1; align-content: start; margin: 0; padding: 0; list-style: none; }
.event-row { display: grid; min-height: 48px; grid-template-columns: 44px minmax(80px, 1fr) auto 52px; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.event-severity { width: fit-content; padding: 4px 5px; color: #71301d; background: var(--rust-pale); font: 12px/1 var(--mono); }
.event-severity--recorded { color: #354226; background: var(--olive-pale); }
.event-row__text { min-width: 0; }
.event-row__text strong, .event-row__text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-row__text strong { font-size: 12px; font-weight: 600; }
.event-row__text small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.event-row code { color: var(--muted); font-size: 12px; }
.text-action { padding: 5px 7px; border: 1px solid var(--line-soft); background: transparent; font-size: 12px; white-space: nowrap; }
.text-action:hover { border-color: var(--rust); color: var(--rust); }
.priority-panel__footer { display: flex; align-items: center; gap: 7px; padding-top: 12px; color: var(--muted); font-size: 12px; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 12px 0 2px; border-top: 1px solid var(--line); color: var(--muted); font: 12px/1.4 var(--mono); }
.page-footer strong { color: var(--ink); }
.page-footer a { color: var(--ink); }

/* Shared tables, filters, and dossier panels */
.asset-layout, .audit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.table-panel, .audit-stream { min-width: 0; padding: 15px; }
.table-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.table-panel__head h2 { margin: 0; font: 600 19px/1.15 var(--serif); }
.table-panel__head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.search-box { display: flex; width: min(260px, 38%); min-height: 34px; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid var(--line-soft); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12px; }
.search-box input::placeholder { color: #88837a; }
.search-box > span:last-child { font-size: 18px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 13px 0 9px; }
.filter-chip { min-height: 26px; padding: 5px 9px; border: 1px solid var(--line); background: transparent; font: 12px/1 var(--mono); }
.filter-chip:hover, .filter-chip.is-selected { color: var(--paper-light); background: var(--ink); }
.filter-chip--rust { border-color: var(--rust); color: #7b321f; background: var(--rust-pale); }
.table-scroll, .audit-table-wrap { max-width: 100%; overflow: auto; padding-top: 4px; border-top: 1px solid var(--line); }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.data-table th { padding: 9px 8px; border-bottom: 1px solid var(--line); background: var(--paper-deep); font-size: 12px; font-weight: 700; white-space: nowrap; }
.data-table td { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tbody tr { cursor: pointer; transition: background .12s ease; }
.data-table tbody tr:hover, .data-table tbody tr.is-selected { background: #eee9dc; }
.data-table td code { font-size: 12px; }
.data-table td strong, .data-table td small { display: block; }
.data-table td strong { font-size: 12px; font-weight: 600; }
.data-table td small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.tag { display: inline-flex; width: fit-content; align-items: center; padding: 4px 6px; border-radius: 10px; font: 12px/1 var(--mono); white-space: nowrap; }
.tag--rust { color: #79351f; background: var(--rust-pale); }
.tag--olive { color: #3e4b2a; background: var(--olive-pale); }
.tag--muted { color: #4c4943; background: #e5e1d8; }
.table-footnote { display: flex; gap: 9px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.table-footnote .mono { color: var(--ink); }
.inspector, .audit-dossier { padding: 15px; }
.inspector__top { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.inspector__top .eyebrow { margin: 0; }
.inspector__id { font: 12px var(--mono); }
.inspector h2, .audit-dossier h2 { margin: 12px 0 8px; font: 600 22px/1.1 var(--serif); }
.dossier-list { margin: 14px 0; border-top: 1px solid var(--line-soft); }
.dossier-list > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 8px 7px; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.dossier-list dt { color: var(--muted); }
.dossier-list dd { margin: 0; overflow-wrap: anywhere; }
.hash-note { display: grid; gap: 5px; padding: 9px; background: var(--paper-deep); }
.hash-note span { color: var(--muted); font: 12px var(--mono); }
.hash-note code { font-size: 12px; }
.inspector__disclaimer, .audit-dossier__note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }

/* Policy studio */
.policy-layout { display: grid; grid-template-columns: 205px minmax(350px, 1.2fr) minmax(255px, .84fr); gap: 12px; align-items: stretch; }
.policy-index { display: flex; min-height: 100%; flex-direction: column; padding: 9px 0; }
.policy-index__item { display: flex; min-height: 54px; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; font-size: 12px; }
.policy-index__item span { color: var(--muted); font: 12px var(--mono); }
.policy-index__item:hover, .policy-index__item.is-selected { background: var(--rust-pale); }
.policy-index__item.is-selected span { color: var(--rust); }
.policy-index__foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 14px 12px 4px; color: var(--muted); font: 12px/1.3 var(--mono); }
.policy-index__foot small { font-size: 12px; }
.policy-editor { min-width: 0; padding: 16px; }
.policy-editor h2 { margin: 14px 0 4px; font: 600 23px/1.1 var(--serif); }
.policy-copy { min-height: 34px; margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.toggle-list { padding-top: 4px; border-top: 1px solid var(--line); }
.toggle-row { position: relative; display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.toggle-row > span:first-child strong, .toggle-row > span:first-child small { display: block; }
.toggle-row > span:first-child strong { font-size: 12px; }
.toggle-row > span:first-child small { margin-top: 2px; color: var(--muted); font: 12px var(--mono); }
.toggle-row input { position: absolute; right: 0; width: 39px; height: 22px; opacity: 0; cursor: pointer; }
.toggle-ui { position: relative; flex: 0 0 37px; width: 37px; height: 19px; border: 1px solid var(--line); border-radius: 12px; background: #dbd6cb; transition: background .15s ease; }
.toggle-ui::after { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--paper-light); box-shadow: 0 0 0 1px var(--line); content: ""; transition: transform .15s ease; }
.toggle-row input:checked + .toggle-ui { background: var(--ink); }
.toggle-row input:checked + .toggle-ui::after { transform: translateX(17px); }
.toggle-row input:focus-visible + .toggle-ui { outline: 2px solid var(--rust); outline-offset: 3px; }
.threshold-table { margin: 14px 0; border-top: 1px solid var(--line); }
.threshold-table > div { display: grid; grid-template-columns: 1.05fr 1fr .9fr; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.threshold-table > div > *:last-child { color: var(--muted); }
.threshold-table__head { color: var(--muted); background: var(--paper-deep); font: 12px var(--mono); }
.code-card { border: 1px solid var(--line-soft); }
.code-card__head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font: 12px var(--mono); }
.window-dots { display: inline-flex; gap: 3px; }
.window-dots i { width: 6px; height: 6px; border-radius: 50%; background: #9a958b; }
.window-dots i:first-child { background: var(--rust); }
.code-card pre { min-height: 112px; margin: 0; padding: 10px; overflow: auto; background: #f0ede4; font-size: 12px; line-height: 1.5; }
.local-state { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.policy-diagrams { display: grid; align-content: start; gap: 12px; }
.diagram-card { padding: 13px; }
.diagram-card--secondary { background: #f6f2e7; }
.diagram-card .section-bar h2 { font-size: 12px; }
.diagram-flow { display: flex; min-height: 89px; align-items: center; justify-content: space-around; gap: 7px; padding: 10px 0; }
.diagram-flow span { display: grid; min-height: 41px; min-width: 66px; place-items: center; padding: 6px; border: 1px solid var(--line); background: var(--paper); font-size: 12px; text-align: center; }
.diagram-flow b { color: var(--rust); font-size: 16px; font-weight: 400; }
.diagram-flow--vertical { flex-direction: column; gap: 3px; }
.diagram-flow--vertical span { min-width: 145px; min-height: 30px; }
.diagram-flow--vertical b { line-height: .9; }
.diagram-flow .diagram-flow__outcome { border-color: var(--olive); color: #354226; background: var(--olive-pale); }
.diagram-card > p { margin: 0; color: var(--muted); font-size: 12px; }

/* Audit and evidence view */
.incident-banner { display: grid; grid-template-columns: 210px minmax(0, 1fr) 120px; align-items: center; gap: 14px; margin-bottom: 12px; padding: 14px; }
.incident-banner__id { display: grid; justify-items: start; gap: 6px; }
.incident-banner__id strong { font: 600 13px var(--mono); }
.incident-banner__id small { color: var(--muted); font: 12px var(--mono); }
.incident-banner__title { min-width: 0; padding: 10px 0 10px 18px; border-left: 1px solid var(--line-soft); }
.incident-banner__title h2 { margin: 0; font: 500 clamp(20px, 2.6vw, 31px)/1.05 var(--serif); }
.incident-banner__title p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.incident-banner__state { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12px; }
.incident-banner__state small { color: var(--muted); font: 12px var(--mono); }
.audit-layout { grid-template-columns: minmax(0, 1fr) 300px; }
.audit-stream { padding: 14px; }
.select-wrap select { min-height: 29px; padding: 4px 23px 4px 8px; border: 1px solid var(--line-soft); border-radius: 0; background: var(--paper-light); font-size: 12px; }
.audit-table { min-width: 650px; }
.audit-table td:first-child code { white-space: nowrap; font-size: 12px; }
.audit-actions { display: flex; align-items: center; gap: 12px; margin-top: 11px; }
.audit-actions > span { color: var(--muted); font-size: 12px; }
.audit-dossier .panel-kicker { font-size: 12px; }
.audit-dossier .dossier-list > div { grid-template-columns: 92px minmax(0, 1fr); padding: 7px 5px; font-size: 12px; }
.button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 7px 12px; border: 1px solid var(--line); font-size: 12px; }
.button--dark { color: var(--paper-light); background: var(--ink); }
.button--dark:hover { color: var(--paper-light); background: var(--rust); border-color: var(--rust); }
.button--outline { background: transparent; }
.button--outline:hover { color: var(--rust); border-color: var(--rust); }
.button--full { width: 100%; }

/* Local redaction preview */
.redaction-toolbar { display: flex; justify-content: space-between; gap: 14px; margin: 0 0 10px; padding: 7px 10px; border: 1px solid var(--line); background: var(--paper-deep); font: 12px var(--mono); }
.redaction-toolbar__status { display: inline-flex; align-items: center; gap: 6px; color: var(--olive); }
.redaction-toolbar__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--olive); }
.redaction-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 13px; align-items: stretch; }
.redaction-workspace { min-width: 0; padding: 15px; }
.algorithm-line { display: flex; justify-content: space-between; gap: 10px; margin: 11px 0 14px; padding: 7px 9px; border-top: 2px solid var(--rust); background: var(--paper-deep); font-size: 12px; }
.algorithm-line code, .algorithm-line > span:last-child { font: 12px var(--mono); }
.algorithm-line > span:last-child { color: var(--rust); }
.editor-label { display: flex; justify-content: space-between; margin: 0 0 5px; font-size: 12px; font-weight: 700; }
.editor-label small { color: var(--muted); font-size: 12px; font-weight: 400; }
#redaction-input { display: block; width: 100%; min-height: 92px; resize: vertical; padding: 10px; border: 1px solid var(--line-soft); border-radius: 0; background: #f1eee5; font: 12px/1.55 var(--mono); }
.redaction-buttons { display: flex; gap: 7px; margin: 8px 0 14px; }
.diff-heading { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-bottom: 0; background: var(--paper-deep); }
.diff-heading span { padding: 7px 8px; font-size: 12px; font-weight: 700; }
.diff-heading span + span { border-left: 1px solid var(--line); }
.diff-output { display: grid; grid-template-columns: 1fr 1fr; min-height: 105px; border: 1px solid var(--line); }
.diff-output pre { margin: 0; padding: 10px; overflow-wrap: anywhere; white-space: pre-wrap; font: 12px/1.55 var(--mono); }
.diff-output pre:first-child { color: #6a3f32; background: #f2e0d8; }
.diff-output pre + pre { border-left: 1px solid var(--line); color: #31432a; background: #e8ebdf; }
.redaction-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.redaction-note strong { color: var(--ink); }
.certificate-preview { display: flex; flex-direction: column; padding: 12px; background: var(--paper-deep); }
.certificate-preview__head { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); font: 12px var(--mono); }
.certificate-paper { position: relative; display: flex; flex: 1; flex-direction: column; margin: 10px auto 0; padding: clamp(19px, 3vw, 29px); width: min(100%, 390px); min-height: 390px; border: 1px solid #d8d2c6; box-shadow: 0 2px 9px rgba(39, 35, 25, .08); background: var(--paper-light); }
.certificate-paper .eyebrow { font-size: 12px; }
.certificate-paper h2 { margin: 12px 0 7px; font: 600 clamp(24px, 3vw, 34px)/.95 var(--serif); letter-spacing: -.035em; }
.certificate-paper__sub { margin: 0; font-size: 12px; }
.certificate-rule { height: 2px; margin: 16px 0 8px; background: var(--line); }
.rule-results { margin: 0; padding: 0; list-style: none; }
.rule-results li { display: grid; min-height: 39px; grid-template-columns: 18px 1fr auto; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.rule-results li code { color: var(--muted); font-size: 12px; }
.check-mark { color: var(--olive); font-size: 13px; }
.check-mark--muted { color: var(--muted); }
.certificate-seal { display: flex; align-items: center; gap: 9px; width: fit-content; margin: auto 0 16px; padding: 7px 9px; border: 1px solid var(--rust); color: var(--rust); }
.certificate-seal > span { font: 700 13px var(--serif); }
.certificate-seal small { font: 12px/1.3 var(--mono); }
.certificate-foot { display: flex; justify-content: space-between; padding-top: 7px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.certificate-disclaimer { margin: 8px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.noscript-note { position: fixed; z-index: 101; inset: auto 12px 12px; padding: 10px; border: 1px solid var(--rust); background: var(--paper-light); }

@media (min-width: 1500px) {
  .main-content { padding-inline: 38px; }
  .overview-grid { grid-template-columns: minmax(0, 2fr) minmax(340px, .82fr); }
  .posture-panel, .timeline-panel, .flow-panel { padding-inline: 27px; }
  .priority-panel { padding-inline: 22px; }
}
@media (max-width: 1150px) {
  .topbar { padding-inline: 17px; gap: 12px; }
  .topbar__title { font-size: 16px; }
  .topbar__version { display: none; }
  .main-content { padding-inline: 18px; }
  .overview-grid { grid-template-columns: minmax(0, 1.5fr) minmax(280px, .9fr); }
  .posture-panel, .timeline-panel, .flow-panel { padding-inline: 16px; }
  .posture-panel h2 { font-size: 43px; }
  .posture-value > span { font-size: 104px; }
  .event-row { grid-template-columns: 42px minmax(72px, 1fr) auto 52px; gap: 6px; }
  .policy-layout { grid-template-columns: 170px minmax(310px, 1.2fr) minmax(220px, .8fr); gap: 8px; }
  .policy-index__item { padding-inline: 9px; }
}
@media (max-width: 900px) {
  .sidebar { width: 72px; }
  .workspace { margin-left: 72px; }
  .brand-mark { flex-direction: column; gap: 4px; }
  .brand-mark__word { font-size: 12px; text-align: center; }
  .side-nav__item { min-height: 83px; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 64px; }
  .topbar__section { font-size: 12px; }
  .topbar__title { font-size: 14px; }
  .topbar__repo { display: none; }
  .overview-grid { grid-template-columns: minmax(0, 1.35fr) minmax(260px, .9fr); }
  .posture-panel__headline { min-height: 132px; }
  .posture-panel h2 { font-size: 36px; }
  .posture-value > span { font-size: 86px; }
  .posture-value small { font-size: 12px; }
  .chart-wrap { height: 218px; }
  .priority-panel { padding-inline: 12px; }
  .event-row { grid-template-columns: 40px minmax(60px, 1fr) 35px; }
  .event-row code { display: none; }
  .policy-layout { grid-template-columns: 155px minmax(0, 1fr); }
  .policy-diagrams { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .asset-layout, .audit-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .redaction-layout { grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); }
}
@media (max-width: 700px) {
  body { font-size: 13px; }
  .sidebar { z-index: 41; width: min(285px, 82vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(32, 32, 30, .08); }
  body.nav-open .sidebar { transform: translateX(0); }
  .brand-mark { min-height: 62px; flex-direction: row; justify-content: flex-start; padding: 0 18px; }
  .brand-mark__word { font-size: 12px; text-align: left; }
  .side-nav { padding-top: 8px; }
  .side-nav__item { min-height: 64px; flex-direction: row; justify-content: flex-start; gap: 14px; padding-inline: 18px; text-align: left; }
  .side-nav__item::before { inset: 10px auto 10px 0; }
  .side-nav__number { width: 31px; font-size: 22px; text-align: right; }
  .side-nav__label { font-size: 12px; }
  .side-nav__label small { font-size: 12px; }
  .sidebar__foot { justify-content: flex-start; padding: 13px 18px; }
  .workspace { margin-left: 0; }
  .topbar { position: sticky; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 9px; min-height: 58px; padding: 0 12px; }
  .menu-toggle { display: flex; }
  .topbar__left { gap: 0; }
  .topbar__section { display: none; }
  .topbar__title { overflow: hidden; font-size: 13px; text-align: left; text-overflow: ellipsis; }
  .topbar__right { gap: 0; }
  .demo-badge { max-width: 139px; overflow: hidden; padding: 6px; font-size: 12px; text-overflow: ellipsis; }
  .demo-badge__dot { flex: 0 0 6px; }
  .nav-scrim { position: fixed; z-index: 40; inset: 0; display: block; background: rgba(27, 26, 23, .35); }
  .nav-scrim[hidden] { display: none; }
  .main-content { padding: 10px 12px 20px; }
  .demo-notice { align-items: flex-start; gap: 8px; margin-bottom: 14px; padding: 8px; }
  .demo-notice p { font-size: 12px; }
  .demo-notice__scope { display: none; }
  .connection-strip { grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; margin: -7px 0 14px; }
  .connection-strip__copy { display: grid; gap: 2px; }
  .connection-strip__mode { grid-row: 2; grid-column: 2; }
  .connection-strip__link { grid-row: 1 / span 2; grid-column: 3; justify-self: start; align-self: center; }
  .backend-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -14px; }
  .backend-metrics > div:nth-child(2) { border-right: 0; }
  .backend-metrics > div:nth-child(3), .backend-metrics > div:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .backend-metrics > div:nth-child(4) { border-right: 0; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 8px; margin: 5px 0 14px; }
  .page-heading h1 { font-size: clamp(26px, 8vw, 34px); }
  .page-heading__note { max-width: 100%; font-size: 12px; text-align: left; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-main { border-right: 0; }
  .posture-panel, .timeline-panel, .flow-panel { padding: 13px; }
  .posture-panel__headline { min-height: 112px; gap: 10px; }
  .posture-panel h2 { font-size: clamp(32px, 9vw, 43px); }
  .posture-value { gap: 8px; }
  .posture-value > span { font-size: clamp(74px, 20vw, 105px); }
  .posture-value small { max-width: 70px; padding-left: 7px; font-size: 12px; }
  .posture-panel__foot { font-size: 12px; }
  .posture-panel__foot strong { font-size: 12px; }
  .section-bar__meta { max-width: 48%; font-size: 12px; }
  .chart-wrap { height: 200px; grid-template-columns: 29px minmax(0, 1fr); }
  .chart-y-labels { font-size: 12px; }
  .chart-caption { padding-left: 29px; font-size: 12px; }
  .chart-caption .mono { font-size: 12px; text-align: right; }
  .flow-strip { grid-template-columns: 1fr 17px 1fr 17px 1fr; gap: 3px; }
  .flow-node { min-height: 58px; grid-template-columns: 17px 1fr; gap: 4px; padding: 5px; }
  .flow-node__index { font-size: 12px; }
  .flow-node strong { font-size: 12px; }
  .flow-node small { font-size: 12px; }
  .flow-arrow { font-size: 13px; }
  .flow-note { font-size: 12px; }
  .backend-demo-controls { align-items: flex-start; flex-direction: column; }
  .priority-panel { padding: 13px; border-top: 1px solid var(--line); }
  .event-row { min-height: 47px; grid-template-columns: 48px minmax(0, 1fr) auto 52px; gap: 8px; }
  .event-row code { display: block; }
  .page-footer { flex-direction: column; gap: 6px; font-size: 12px; }
  .asset-layout, .audit-layout, .redaction-layout { grid-template-columns: minmax(0, 1fr); }
  .table-panel, .audit-stream, .inspector, .audit-dossier, .redaction-workspace { padding: 11px; }
  .table-panel__head { align-items: flex-start; flex-direction: column; }
  .search-box { width: 100%; }
  .data-table { min-width: 650px; }
  .inspector, .audit-dossier { margin-top: 0; }
  .policy-layout { grid-template-columns: minmax(0, 1fr); }
  .policy-index { display: grid; grid-template-columns: 1fr; padding: 0; }
  .policy-index__item { min-height: 43px; }
  .policy-index__foot { margin-top: 0; }
  .policy-editor { padding: 13px; }
  .policy-diagrams { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .incident-banner { grid-template-columns: 1fr auto; gap: 9px; padding: 11px; }
  .incident-banner__id { grid-column: 1; }
  .incident-banner__title { grid-row: 2; grid-column: 1 / -1; padding: 12px 8px 8px; border-top: 1px solid var(--line-soft); border-left: 0; }
  .incident-banner__state { grid-row: 1; grid-column: 2; }
  .incident-banner__title h2 { font-size: 23px; }
  .audit-stream .section-bar { align-items: flex-start; }
  .audit-actions { align-items: flex-start; flex-direction: column; gap: 6px; }
  .redaction-toolbar { align-items: flex-start; flex-direction: column; font-size: 12px; }
  .algorithm-line { flex-wrap: wrap; font-size: 12px; }
  .algorithm-line code { font-size: 12px; }
  .diff-output pre { padding: 7px; font-size: 12px; }
  .diff-heading span { font-size: 12px; }
  .certificate-paper { min-height: 360px; }
  .page-footer { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
