:root {
  color-scheme: light;
  --bg: oklch(98.5% 0.008 286);
  --surface: oklch(99.2% 0.006 286);
  --surface-2: oklch(94.5% 0.02 286);
  --surface-hover: oklch(92% 0.03 294);
  --ink: oklch(23% 0.035 286);
  --muted: oklch(47% 0.025 286);
  --faint: oklch(65% 0.02 286);
  --line: oklch(84% 0.025 286);
  --accent: oklch(55% 0.17 294);
  --accent-hover: oklch(49% 0.18 294);
  --accent-soft: oklch(93% 0.035 294);
  --success: oklch(48% 0.12 150);
  --success-soft: oklch(93% 0.035 150);
  --warning: oklch(51% 0.12 80);
  --warning-soft: oklch(94% 0.045 85);
  --shadow: 0 18px 50px oklch(23% 0.035 286 / 0.09), 0 2px 8px oklch(23% 0.035 286 / 0.05);
  --radius: 10px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  font-family: "Avenir Next", Avenir, "Segoe UI Variable", "Segoe UI", sans-serif;
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(19% 0.018 286);
  --surface: oklch(23% 0.02 286);
  --surface-2: oklch(27% 0.025 286);
  --surface-hover: oklch(31% 0.035 294);
  --ink: oklch(92% 0.012 294);
  --muted: oklch(70% 0.02 286);
  --faint: oklch(55% 0.018 286);
  --line: oklch(35% 0.03 286);
  --accent: oklch(72% 0.14 294);
  --accent-hover: oklch(78% 0.12 294);
  --accent-soft: oklch(31% 0.07 294);
  --success: oklch(70% 0.12 150);
  --success-soft: oklch(29% 0.04 150);
  --warning: oklch(76% 0.12 80);
  --warning-soft: oklch(31% 0.045 80);
  --shadow: 0 18px 50px oklch(8% 0.02 286 / 0.26);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid color-mix(in oklch, var(--accent) 45%, transparent); outline-offset: 2px; }
.view [tabindex="-1"]:focus { outline: 0; }
[hidden] { display: none !important; }
.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: 8px; left: 8px; transform: translateY(-150%); padding: 8px 12px; border-radius: 7px; color: var(--surface); background: var(--ink); transition: transform 160ms var(--ease); }
.skip-link:focus { transform: translateY(0); }

.topbar { position: sticky; z-index: 20; top: 0; height: 58px; display: grid; grid-template-columns: 220px 1fr auto; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--line); background: color-mix(in oklch, var(--surface) 96%, transparent); }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 720; letter-spacing: -0.02em; }
.brand-mark { position: relative; width: 21px; height: 21px; display: block; }
.brand-mark i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.brand-mark i:nth-child(1) { left: 0; top: 7px; }
.brand-mark i:nth-child(2) { right: 0; top: 0; }
.brand-mark i:nth-child(3) { right: 0; bottom: 0; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; left: 5px; width: 10px; height: 1.5px; background: var(--accent); transform-origin: left; }
.brand-mark::before { top: 9px; transform: rotate(-35deg); }
.brand-mark::after { top: 11px; transform: rotate(35deg); }
.workspace-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.workspace-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.environment { padding-left: 8px; border-left: 1px solid var(--line); color: var(--faint); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--surface); background: var(--ink); font-size: 11px; font-weight: 750; text-decoration: none; }

.app-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 58px); }
.rail { position: sticky; top: 58px; height: calc(100vh - 58px); display: flex; flex-direction: column; gap: 5px; padding: 20px 12px 16px; border-right: 1px solid var(--line); background: var(--surface); }
.rail-link, .folder { border: 0; background: transparent; }
.rail-link { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 6px; min-height: 40px; padding: 0 11px; border-radius: 8px; color: var(--muted); text-align: left; text-decoration: none; transition: background 160ms var(--ease), color 160ms var(--ease); }
.rail-link:hover { color: var(--ink); background: var(--surface-2); }
.rail-link.is-active { color: var(--ink); background: var(--accent-soft); font-weight: 670; }
.rail-link > span:first-child { color: var(--faint); font-size: 18px; }
.rail-link.is-active > span:first-child { color: var(--accent); }
.rail-link b { min-width: 20px; color: var(--faint); font-size: 11px; font-weight: 650; text-align: right; }
.rail-spacer { flex: 1; }

main { width: 100%; min-width: 0; }
.demo-intro { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: center; gap: 18px; max-width: 1280px; margin: 0 auto; padding: 18px 44px; border-bottom: 1px solid var(--line); }
.demo-intro-label { display: inline-flex; align-items: center; gap: 7px; color: var(--success); font-size: 10px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.demo-intro-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.demo-intro-copy { max-width: 72ch; margin: 0; color: var(--muted); font-size: 12px; }
.demo-intro-copy strong { color: var(--ink); }
.demo-intro-action { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font-size: 12px; font-weight: 680; white-space: nowrap; transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease); }
.demo-intro-action:hover { border-color: color-mix(in oklch, var(--accent) 45%, var(--line)); color: var(--accent); background: var(--accent-soft); }
.demo-intro-action:active { transform: translateY(1px); }
.view { max-width: 1280px; margin: 0 auto; padding: 40px 44px 72px; }
.view-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -0.035em; }
h2 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -0.025em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.primary-button, .secondary-button, .icon-button, .status-select { min-height: 36px; border-radius: 8px; transition: background 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease); }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border: 1px solid var(--accent); color: oklch(98% 0.006 294); background: var(--accent); font-size: 13px; font-weight: 680; box-shadow: 0 1px 2px oklch(23% 0.06 294 / .15); }
.primary-button:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.primary-button:active { transform: translateY(1px); }
.secondary-button { padding: 0 13px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 620; }
.secondary-button:hover { background: var(--surface-2); }
.icon-button { display: inline-grid; width: 34px; min-height: 34px; place-items: center; padding: 0; border: 1px solid var(--line); background: var(--surface); }
.icon-button:hover { background: var(--surface-2); }
.search-field { display: flex; width: 220px; height: 36px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--faint); transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 14%, transparent); }
.search-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; font-size: 13px; }
.search-field input::placeholder { color: var(--faint); }

.catalogue-lede { max-width: 70ch; margin: -8px 0 34px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.app-directory { border-top: 1px solid var(--line); }
.app-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 18px; min-height: 96px; padding: 18px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background 160ms var(--ease), color 160ms var(--ease); }
.app-entry:hover { color: var(--accent); background: color-mix(in oklch, var(--accent-soft) 35%, transparent); }
.app-entry strong, .app-entry small { display: block; }
.app-entry strong { font-size: 18px; letter-spacing: -.02em; }
.app-entry small { max-width: 68ch; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.app-entry-state { padding: 5px 8px; border-radius: 6px; color: var(--accent); background: var(--accent-soft); font-size: 9px; font-weight: 720; letter-spacing: .06em; text-transform: uppercase; }
.app-directory-group { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: baseline; gap: 18px; padding: 32px 4px 14px; border-bottom: 1px solid var(--line); }
.app-directory-group p { margin: 0; }
.app-directory-group > p:last-child { max-width: 68ch; color: var(--muted); font-size: 12px; line-height: 1.5; }
.rdfhtml-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 90px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.rdfhtml-entry-copy strong, .rdfhtml-entry-copy small { display: block; }
.rdfhtml-entry-copy strong { font-size: 16px; letter-spacing: -.02em; }
.rdfhtml-entry-copy small { max-width: 66ch; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.rdfhtml-entry-actions { display: flex; align-items: center; gap: 7px; }
.rdfhtml-action { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 680; text-decoration: none; white-space: nowrap; transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease); }
.rdfhtml-action:hover { border-color: color-mix(in oklch, var(--accent) 35%, var(--line)); color: var(--ink); background: var(--surface-2); }
.rdfhtml-action:active { transform: translateY(1px); }
.rdfhtml-action-render { border-color: color-mix(in oklch, var(--accent) 25%, var(--line)); color: var(--accent); background: var(--accent-soft); }
.rdfhtml-action-render:hover { border-color: var(--accent); color: var(--accent-hover); background: color-mix(in oklch, var(--accent-soft) 78%, var(--surface)); }
.federation-note { max-width: 760px; margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); }
.federation-note h2 { font-size: 23px; }
.federation-note > p:last-child { max-width: 66ch; margin: 10px 0 0; color: var(--muted); line-height: 1.65; }

.inline-form { margin: -10px 0 28px; padding: 22px; border: 1px solid color-mix(in oklch, var(--accent) 35%, var(--line)); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.form-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 650; }
.field-wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: var(--bg); font-size: 14px; font-weight: 450; }
.field input, .field select { height: 39px; padding: 0 11px; }
.field textarea { min-height: 100px; padding: 10px 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 14%, transparent); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.filters { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 9px; background: var(--surface-2); }
.filter { min-height: 31px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 620; }
.filter:hover { color: var(--ink); }
.filter.is-selected { color: var(--ink); background: var(--surface); box-shadow: 0 1px 3px oklch(23% 0.035 286 / .09); }
.filter span { margin-left: 3px; color: var(--faint); font-size: 10px; }
.shortcut-hint { margin: 0; color: var(--faint); font-size: 11px; }
kbd { padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); font: 10px ui-monospace, monospace; box-shadow: 0 1px 0 var(--line); }

.issue-table { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.table-head, .issue-row { display: grid; grid-template-columns: minmax(280px, 1.65fr) 145px minmax(130px, .8fr) 86px; align-items: center; column-gap: 18px; }
.table-head { min-height: 39px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--faint); background: var(--surface-2); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.issue-row { position: relative; min-height: 72px; padding: 10px 18px; border-bottom: 1px solid var(--line); transition: background 160ms var(--ease), opacity 160ms var(--ease); }
.issue-row:last-child { border-bottom: 0; }
.issue-row:hover { background: color-mix(in oklch, var(--surface-2) 52%, transparent); }
.issue-summary { min-width: 0; }
.issue-title { display: block; overflow: hidden; color: var(--ink); font-weight: 660; text-overflow: ellipsis; white-space: nowrap; }
.issue-meta { display: flex; gap: 8px; margin-top: 4px; color: var(--faint); font-size: 11px; }
.issue-id { font-family: ui-monospace, "SFMono-Regular", monospace; }
.issue-kind { padding-left: 8px; border-left: 1px solid var(--line); }
.status-carrier { display: block; }
.status-select { width: 126px; min-height: 31px; padding: 0 26px 0 9px; border: 1px solid transparent; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 650; }
.status-select[data-state="in-progress"] { color: var(--warning); background: var(--warning-soft); }
.status-select[data-state="done"] { color: var(--success); background: var(--success-soft); }
.assignee { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 12px; }
.assignee-avatar { display: grid; flex: 0 0 auto; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: var(--ink); background: var(--surface-2); font-size: 9px; font-weight: 750; }
.assignee span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignee a { min-width: 0; color: inherit; text-decoration: none; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; opacity: .2; transition: opacity 160ms var(--ease); }
.issue-row:hover .row-actions, .issue-row:focus-within .row-actions { opacity: 1; }
.row-action { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 15px; }
.row-action:hover { color: var(--ink); background: var(--surface-hover); }
.row-action.delete:hover { color: var(--accent); background: var(--accent-soft); }
.edit-panel { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, .45fr) auto; gap: 9px; padding: 9px 0 3px; }
.edit-panel input { min-width: 0; height: 35px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); outline: 0; }
.edit-panel input:focus { border-color: var(--accent); }

.mail-layout { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; }
.mail-folders { display: flex; flex-direction: column; gap: 3px; }
.folder { display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding: 0 10px; border-radius: 7px; color: var(--muted); text-align: left; font-size: 12px; }
.folder:hover { color: var(--ink); background: var(--surface-2); }
.folder.is-selected { color: var(--ink); background: var(--accent-soft); font-weight: 680; }
.folder b { color: var(--faint); font-size: 10px; }
.mail-content { min-width: 0; }
.mail-list { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.mail-row { display: grid; grid-template-columns: 32px minmax(120px, .6fr) minmax(260px, 1.5fr) auto 68px 32px; align-items: center; gap: 12px; min-height: 66px; padding: 8px 14px; border-bottom: 1px solid var(--line); transition: background 160ms var(--ease); }
.mail-action-carrier { display: block; width: 30px; height: 30px; }
.mail-row:last-child { border-bottom: 0; }
.mail-row:hover { background: var(--surface-2); }
.mail-row.is-unread { background: color-mix(in oklch, var(--accent-soft) 42%, var(--surface)); }
.mail-row.is-unread .mail-from, .mail-row.is-unread .mail-subject { font-weight: 720; }
.star-button, .archive-button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; color: var(--faint); background: transparent; }
.star-button:hover, .archive-button:hover { color: var(--ink); background: var(--surface-hover); }
.star-button.is-starred { color: var(--warning); }
.mail-open { display: contents; cursor: pointer; }
.mail-from, .mail-preview { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-from { color: var(--ink); font-size: 12px; }
.mail-preview { color: var(--muted); font-size: 12px; }
.mail-subject { color: var(--ink); }
.mail-snippet::before { content: " · "; color: var(--faint); }
.mail-state { justify-self: end; color: var(--faint); font-size: 10px; }
.mail-time { justify-self: end; color: var(--faint); font-size: 10px; }
.message-reader { padding: 26px 28px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.reader-toolbar { display: flex; justify-content: space-between; margin-bottom: 24px; }
.reader-back { border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.reader-back:hover { color: var(--ink); }
.reader-subject { margin: 0 0 10px; font-size: 23px; letter-spacing: -.03em; }
.reader-byline { display: flex; align-items: center; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.reader-body { max-width: 70ch; margin: 24px 0 0; color: var(--ink); white-space: pre-wrap; }

.briefing-header { margin-bottom: 20px; }
.release-status { display: inline-flex; min-height: 32px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid color-mix(in oklch, var(--success) 28%, var(--line)); border-radius: 999px; color: var(--success); background: var(--success-soft); font-size: 11px; font-weight: 720; }
.release-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.briefing-lede { max-width: 72ch; margin: 0 0 30px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.briefing-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .8fr); gap: 22px; align-items: start; }
.decision-panel, .briefing-side, .semantic-layers { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.decision-panel { padding: 26px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.panel-heading.compact { margin-bottom: 16px; }
.panel-kicker { margin: 0 0 5px; color: var(--accent); font-size: 10px; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.semantic-badge, .contract-state { flex: 0 0 auto; padding: 5px 8px; border-radius: 6px; color: var(--accent); background: var(--accent-soft); font-size: 9px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.decision-options { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.decision-options legend { margin-bottom: 9px; color: var(--faint); font-size: 10px; font-weight: 720; letter-spacing: .07em; text-transform: uppercase; }
.decision-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; text-align: left; transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease); }
.decision-option:hover { color: var(--ink); background: var(--surface-2); }
.decision-option.is-selected { border-color: color-mix(in oklch, var(--accent) 38%, var(--line)); color: var(--ink); background: var(--accent-soft); }
.option-marker { width: 12px; height: 12px; margin-top: 2px; border: 1px solid var(--faint); border-radius: 50%; box-shadow: inset 0 0 0 3px transparent; }
.decision-option.is-selected .option-marker { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent-soft); }
.decision-option strong, .decision-option small { display: block; }
.decision-option strong { font-size: 12px; font-weight: 680; }
.decision-option small { margin-top: 3px; color: var(--faint); font-size: 10px; line-height: 1.4; }
.selected-decision { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: baseline; margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.selected-decision span { color: var(--faint); font-size: 9px; font-weight: 740; letter-spacing: .08em; text-transform: uppercase; }
.selected-decision a { color: var(--accent); font-size: 12px; font-weight: 700; text-decoration: none; }
.selected-decision a:hover { text-decoration: underline; text-underline-offset: 3px; }
.decision-rationale { margin: 18px 0 0; padding: 15px; border-radius: 9px; color: var(--muted); background: color-mix(in oklch, var(--accent-soft) 46%, var(--surface)); font-size: 12px; line-height: 1.6; }
.decision-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 17px; color: var(--faint); font-size: 10px; }
.decision-meta strong { color: var(--muted); }
.briefing-side { overflow: hidden; }
.evidence-panel, .contract-panel { padding: 22px; }
.contract-panel { border-top: 1px solid var(--line); }
.evidence-list { border-top: 1px solid var(--line); }
.evidence-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.evidence-row:last-child { border-bottom: 0; }
.evidence-row:hover strong { color: var(--accent); }
.evidence-kind { color: var(--faint); font-size: 9px; font-weight: 720; letter-spacing: .06em; text-transform: uppercase; }
.evidence-row strong, .evidence-row small { display: block; }
.evidence-row strong { font-size: 11px; }
.evidence-row small { margin-top: 2px; overflow: hidden; color: var(--faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-row > span:last-child { color: var(--faint); font-size: 11px; }
.contract-copy { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.contract-rules { display: grid; gap: 9px; margin: 16px 0 0; padding: 0; list-style: none; }
.contract-rules li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; color: var(--muted); font-size: 10px; line-height: 1.45; }
.contract-rules li > span:first-child { display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; color: var(--success); background: var(--success-soft); font-size: 9px; font-weight: 800; }
.semantic-layers { display: grid; grid-template-columns: 1fr 1fr; margin-top: 22px; overflow: hidden; }
.claim-panel, .provenance-panel { min-width: 0; padding: 22px 24px; }
.claim-panel { background: color-mix(in oklch, var(--accent-soft) 48%, var(--surface)); }
.provenance-panel { border-left: 1px solid var(--line); }
.claim-panel h2, .provenance-panel h2 { font-size: 15px; }
.claim-panel > p:last-child, .provenance-panel > p { max-width: 62ch; margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.provenance-panel a { color: var(--accent); text-underline-offset: 2px; }
.provenance-panel time { display: block; margin-top: 12px; color: var(--faint); font-size: 9px; }
.issue-row.is-emphasized, .issue-row:target, .mail-row:target { outline: 3px solid color-mix(in oklch, var(--accent) 30%, transparent); outline-offset: -3px; background: var(--accent-soft); }

.vendor-header { margin-bottom: 20px; }
.review-posture { display: inline-flex; min-height: 32px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid color-mix(in oklch, var(--warning) 32%, var(--line)); border-radius: 999px; color: var(--warning); background: var(--warning-soft); font-size: 11px; font-weight: 720; }
.review-posture i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.review-posture.is-approved { border-color: color-mix(in oklch, var(--success) 32%, var(--line)); color: var(--success); background: var(--success-soft); }
.review-posture:not(.is-conditional):not(.is-approved) { border-color: var(--line); color: var(--muted); background: var(--surface-2); }
.review-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 8px 0 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.review-summary > span { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 2px 9px; align-content: center; min-height: 76px; padding: 13px 18px; border-right: 1px solid var(--line); }
.review-summary > span:last-child { border-right: 0; }
.review-summary strong, .review-summary small { grid-column: 2; }
.review-summary strong { font-size: 13px; }
.review-summary small { color: var(--faint); font-size: 10px; }
.summary-signal { grid-row: 1 / 3; align-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.summary-signal.is-pass { background: var(--success); }
.summary-signal.is-gap { background: var(--warning); }
.review-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr); gap: 22px; align-items: start; }
.requirements-panel, .evidence-register, .approval-panel, .assurance-contract { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.requirements-panel, .approval-panel { padding: 24px; }
.evidence-register, .assurance-contract { padding: 22px; }
.requirement-list { border-top: 1px solid var(--line); }
.requirement-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 76px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.requirement-row:last-child { border-bottom: 0; }
.requirement-family { color: var(--faint); font-size: 9px; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.requirement-row strong, .requirement-row small { display: block; }
.requirement-row strong { font-size: 12px; }
.requirement-row small { margin-top: 3px; color: var(--faint); font-size: 10px; }
.requirement-state { min-width: 78px; padding: 5px 8px; border-radius: 6px; text-align: center; font-size: 9px; font-weight: 740; }
.requirement-state.is-pass { color: var(--success); background: var(--success-soft); }
.requirement-state.is-gap { color: var(--warning); background: var(--warning-soft); }
.assurance-lower { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 22px; align-items: start; margin-top: 22px; }
.approval-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.approval-options button { min-height: 66px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: transparent; text-align: left; transition: border-color 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease); }
.approval-options button:hover { color: var(--ink); background: var(--surface-2); }
.approval-options button.is-selected { border-color: color-mix(in oklch, var(--accent) 38%, var(--line)); color: var(--ink); background: var(--accent-soft); }
.approval-options span, .approval-options small { display: block; }
.approval-options span { font-size: 11px; font-weight: 700; }
.approval-options small { margin-top: 3px; color: var(--faint); font-size: 9px; line-height: 1.35; }
.assurance-contract { overflow: hidden; }

.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-state > span { display: grid; width: 42px; height: 42px; place-items: center; margin: 0 auto 13px; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: 21px; }
.empty-state h2 { color: var(--ink); font-size: 16px; }
.empty-state p { margin: 5px 0 0; font-size: 12px; }
.toast { position: fixed; z-index: 60; right: 22px; bottom: 22px; max-width: 340px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 180ms var(--ease), transform 180ms var(--ease); }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .topbar { grid-template-columns: 170px 1fr auto; }
  .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .rail { align-items: stretch; }
  .rail-link { grid-template-columns: 1fr; justify-items: center; padding: 7px 4px; }
  .rail-link > span:nth-child(2), .rail-link b { display: none; }
  .demo-intro { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 16px 28px; }
  .demo-intro-label { grid-column: 1 / -1; }
  .view { padding: 34px 28px 60px; }
  .table-head, .issue-row { grid-template-columns: minmax(220px, 1.5fr) 130px 72px; }
  .table-head span:nth-child(3), .assignee { display: none; }
  .mail-layout { grid-template-columns: 1fr; }
  .mail-folders { flex-direction: row; overflow-x: auto; }
  .folder { flex: 0 0 auto; gap: 8px; }
  .briefing-layout { grid-template-columns: 1fr; }
  .review-layout, .assurance-lower { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  ia2-rdf-navigator { --ia2-rdf-launcher-bottom: 68px; }
  .topbar { height: 54px; grid-template-columns: 1fr auto; padding: 0 14px; }
  .workspace-label { display: none; }
  .app-shell { display: block; min-height: calc(100vh - 108px); }
  .rail { position: fixed; z-index: 30; top: auto; right: 0; bottom: 0; left: 0; height: 54px; flex-direction: row; justify-content: center; padding: 5px 10px; border-top: 1px solid var(--line); border-right: 0; }
  .rail-link { flex: 1 1 0; grid-template-columns: 1fr; justify-items: center; width: auto; max-width: 92px; min-width: 42px; min-height: 42px; }
  .rail-link > span:nth-child(2) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .rail-link b { display: none; }
  .rail-spacer { display: none; }
  .demo-intro { grid-template-columns: 1fr; gap: 8px; padding: 14px 16px; }
  .demo-intro-label { grid-column: auto; }
  .demo-intro-action { justify-self: start; }
  .view { padding: 25px 16px 85px; }
  .view-header { align-items: flex-start; margin-bottom: 22px; }
  h1 { font-size: 26px; }
  .header-actions { flex-direction: column-reverse; align-items: stretch; }
  .search-field { width: 164px; }
  .primary-button { min-height: 38px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .view-toolbar { align-items: flex-start; }
  .filters { width: 100%; overflow-x: auto; }
  .filter { flex: 0 0 auto; }
  .shortcut-hint { display: none; }
  .issue-table { border-radius: 9px; }
  .table-head { display: none; }
  .issue-row { grid-template-columns: minmax(0, 1fr) 38px; gap: 8px; padding: 14px; }
  .status-select { width: max-content; margin-top: 9px; grid-column: 1; grid-row: 2; }
  .row-actions { grid-column: 2; grid-row: 1 / 3; flex-direction: column; opacity: .8; }
  .edit-panel { grid-template-columns: 1fr; }
  .mail-row { grid-template-columns: 28px minmax(0, 1fr) 34px; gap: 8px; padding: 10px; }
  .mail-from { grid-column: 2; }
  .mail-preview { grid-column: 2; grid-row: 2; }
  .mail-state, .mail-time { display: none; }
  .mail-row > .mail-action-carrier:last-child { grid-column: 3; grid-row: 1 / 3; }
  .message-reader { padding: 20px; }
  .briefing-header { align-items: flex-start; }
  .decision-panel { padding: 20px; }
  .panel-heading { align-items: flex-start; }
  .semantic-badge { display: none; }
  .decision-meta { flex-direction: column; gap: 4px; }
  .semantic-layers { grid-template-columns: 1fr; }
  .provenance-panel { border-top: 1px solid var(--line); border-left: 0; }
  .app-entry { grid-template-columns: minmax(0, 1fr) 16px; gap: 10px; }
  .app-entry-state { display: none; }
  .app-directory-group { grid-template-columns: 1fr; gap: 5px; padding-top: 28px; }
  .rdfhtml-entry { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 16px 4px; }
  .rdfhtml-entry-actions { grid-column: 1; margin-top: 5px; }
  .rdfhtml-action { min-height: 38px; }
  .review-summary { grid-template-columns: 1fr; }
  .review-summary > span { min-height: 62px; border-right: 0; border-bottom: 1px solid var(--line); }
  .review-summary > span:last-child { border-bottom: 0; }
  .requirement-row { grid-template-columns: 1fr auto; gap: 7px 12px; }
  .requirement-family { grid-column: 1 / -1; }
  .approval-options { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .rail-link { grid-template-columns: 1fr; justify-items: center; gap: 0; padding: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
