@charset "UTF-8";

:root {
  color-scheme: light;
  --canvas: #f3f5f7;
  --paper: #ffffff;
  --ink: #192d3e;
  --muted: #5c6977;
  --line: #dce2e7;
  --line-soft: #e9edf0;
  --control-line: #aebac4;
  --accent: #192d3e;
  --accent-dark: #102331;
  --accent-wash: #edf5f2;
  --mint: #91cdb7;
  --mint-ink: #285f4e;
  --focus: #28715b;
  --amber: #795019;
  --amber-wash: #fbf6ec;
  --red: #a0363d;
  --red-wash: #fcf1f2;
  --radius: 6px;
  font-family: "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Malgun Gothic", system-ui, sans-serif;
  font-synthesis: none;
  font-size: 14px;
  line-height: 1.65;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: #d4eade; color: var(--ink); }
a { color: var(--mint-ink); text-decoration-thickness: 1px; text-underline-offset: 4px; }
p, h1, h2, h3, h4, dl, dd, ol, ul { margin: 0; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.4; letter-spacing: -.025em; }
h1 { font-size: 28px; }
h2 { font-size: 23px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
p, dd, dt, h1, h2, h3, h4, td, th, a, button, code, summary, span { overflow-wrap: anywhere; }
button, input, select, textarea, fieldset, details, section, article, aside, main, form { min-width: 0; }
svg { display: block; max-width: 100%; }
.icon { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--control-line);
  border-radius: 4px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
}
input:hover:not(:disabled), textarea:hover:not(:disabled), select:hover:not(:disabled) { border-color: #748896; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:disabled, textarea:disabled, select:disabled { background: var(--canvas); color: var(--muted); opacity: 1; }
textarea { display: block; resize: vertical; min-height: 96px; line-height: 1.85; }
textarea[readonly] { background: #f7f9fa; }
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
fieldset { margin: 0; padding: 0; border: 0; }
summary { cursor: pointer; }
summary::marker { color: var(--muted); font-size: 12px; }

.app-frame { max-width: 1600px; margin: 0 auto; padding: 0 32px; }
.masthead {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.brand-line, .workspace-breadcrumb, .utility-nav, .button-row, .request-meta, .connection-line {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.wordmark { display: inline-flex; align-items: baseline; gap: 4px; color: var(--ink); font-size: 23px; font-weight: 750; letter-spacing: -1px; line-height: 1.2; white-space: nowrap; }
.brand-dot { display: inline-block; width: 5px; height: 5px; background: var(--mint); border-radius: 50%; }
.brand-divider { width: 1px; height: 20px; background: var(--line); }
.workspace-breadcrumb { gap: 8px; font-size: 12px; }
.workspace-product { color: var(--ink); font-weight: 600; }
.breadcrumb-divider, .workspace-label { color: var(--muted); }
.utility-nav { flex: 0 0 auto; font-size: 13px; }
.utility-nav a { color: var(--muted); padding: 12px 0; }
.utility-nav a:hover { color: var(--ink); }
.utility-nav .text-button { padding-inline: 8px; }

.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; }
.page-heading > div { min-width: 0; }
.page-heading > .button { flex-shrink: 0; }
.page-subtitle { margin-top: 4px; color: var(--muted); font-size: 14px; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: .025em; }
.page-heading .eyebrow { margin-bottom: 8px; }
.metrics-strip { display: grid; grid-template-columns: 272px minmax(0, 1fr); align-items: center; gap: 24px; padding: 16px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.metrics-heading h2 { margin-bottom: 2px; font-size: 13px; letter-spacing: 0; }
.metrics-heading .helper { font-size: 12px; }
.metrics-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; padding: 0 24px; border-left: 1px solid var(--line-soft); }
.metric dt { color: var(--muted); font-size: 13px; }
.metric dd { color: var(--ink); font-size: 26px; font-weight: 650; line-height: 1.3; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.button-primary { border-color: var(--ink); border-bottom: 2px solid var(--mint); background: var(--ink); color: var(--paper); }
.button-primary .icon { color: var(--mint); }
.button-primary:hover:not(:disabled) { background: #294354; border-color: #294354; border-bottom-color: var(--mint); }
.button-primary:active:not(:disabled) { background: var(--accent-dark); }
.button-secondary { border-color: var(--control-line); background: var(--paper); color: var(--ink); }
.button-secondary:hover:not(:disabled) { border-color: #748896; background: #f3f6f7; }
.button-small { min-height: 44px; padding: 8px 12px; font-size: 12px; }
.button:disabled { border-color: #ccd5dc; background: #e9edf0; color: #596574; }
.text-button { display: inline-flex; align-items: center; max-width: 100%; min-height: 44px; padding: 8px 2px; border: 0; border-radius: 3px; background: transparent; color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.65; text-align: left; }
.text-button:hover:not(:disabled) { color: var(--mint-ink); text-decoration: underline; text-underline-offset: 4px; }
.text-button:disabled { color: var(--muted); }
.badge { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; border: 1px solid transparent; border-radius: 3px; padding: 2px 7px; font-size: 12px; font-weight: 500; line-height: 1.5; letter-spacing: 0; }
.badge-neutral { border-color: #e1e6ea; background: #f1f4f6; color: #566371; }
.badge-blue { border-color: #d2e4dc; background: var(--accent-wash); color: var(--mint-ink); }
.badge-amber { border-color: #e9dcc4; background: var(--amber-wash); color: var(--amber); }
.badge-red { border-color: #edcfd2; background: var(--red-wash); color: var(--red); }

.execution-strip { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 24px; min-height: 48px; padding: 0 2px; border-bottom: 1px solid var(--line); }
.execution-guidance { display: flex; min-width: 0; align-items: baseline; gap: 8px; color: var(--muted); font-size: 12px; }
.execution-guidance p { padding-block: 8px; }
.status-marker { width: 6px; height: 6px; flex: 0 0 6px; border: 1px solid var(--muted); border-radius: 50%; }
.connection-line { gap: 12px; color: var(--muted); font-size: 12px; }
#live-status[data-tone="warning"] { color: var(--amber); }
#live-status[data-tone="error"] { color: var(--red); }
#live-status[data-tone="observed"] { color: var(--mint-ink); }
.notice { border: 1px solid var(--line); border-left-width: 3px; border-radius: 4px; padding: 12px 16px; font-size: 12px; line-height: 1.85; overflow-wrap: anywhere; }
.notice-error { border-color: #edcfd2; background: var(--red-wash); color: var(--red); }
.notice-neutral { background: #f5f7f8; color: #526170; }
.notice-warning { border-color: #e9dcc4; background: var(--amber-wash); color: var(--amber); }
.notice .text-button { color: inherit; }
#global-error, #session-change-notice { margin-top: 16px; }
.action-status { padding: 12px 0 0; color: var(--mint-ink); font-size: 13px; }
.help-panel { margin-top: 16px; padding: 8px 24px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.help-panel:not([open]) { display: none; }
.help-panel summary { min-height: 44px; padding-block: 12px; font-size: 13px; font-weight: 600; }
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 16px 0; }
.help-grid strong { font-size: 14px; }
.help-grid p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.help-panel > .helper { padding-top: 16px; border-top: 1px solid var(--line-soft); }
.helper { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.85; }
.mono { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }

.workbench-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 24px; min-height: 520px; margin-top: 24px; }
.task-sidebar, .main-workspace, .document-column, .workspace-columns > *, .metrics-strip > * { min-width: 0; }
.task-sidebar { padding-top: 4px; }
.section-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.section-heading > div { min-width: 0; }
.section-heading h2 { font-size: 15px; }
.count { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.list-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.list-filters button { min-height: 44px; padding: 8px 4px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; }
.list-filters button:hover { color: var(--ink); background: #eaf0f1; }
.list-filters button[aria-pressed="true"] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 700; }
.request-search { margin-bottom: 16px; }
.search-field { position: relative; min-width: 0; }
.search-field .icon { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.request-search input { padding: 10px 8px 10px 36px; font-size: 13px; background: var(--paper); }
.request-list { max-height: min(64vh, 720px); overflow-y: auto; overscroll-behavior-y: contain; padding: 4px; scrollbar-width: thin; }
.list-group-label { margin: 16px 8px 8px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .02em; }
.list-group-label:first-child { margin-top: 0; }
.request-item { position: relative; display: block; width: 100%; margin-bottom: 8px; padding: 16px 12px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--ink); text-align: left; }
.request-item:hover { border-color: var(--line); background: #f9fbfc; }
.request-item[aria-current="true"] { border-color: var(--mint); background: var(--paper); }
.request-item[aria-current="true"]::before { position: absolute; top: 12px; bottom: 12px; left: -1px; width: 3px; border-radius: 0 2px 2px 0; background: var(--ink); content: ""; }
.request-item strong { display: block; margin: 8px 0; font-size: 14px; font-weight: 600; line-height: 1.7; }
.request-item .item-date { display: block; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.item-access { margin-left: 6px; color: var(--muted); font-size: 12px; }
.list-empty { padding: 16px 8px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.sidebar-note { margin-top: 24px; padding: 16px 8px 0; border-top: 1px solid var(--line); }
.sidebar-note strong { color: #435666; font-size: 12px; font-weight: 600; }
.sidebar-note > p { margin: 4px 0 12px; color: var(--muted); font-size: 12px; }
#session-label { display: block; }
#write-limits { margin-top: 8px; }
.access-note { margin-top: 8px; }
.access-note summary { min-height: 44px; padding: 10px 0; font-size: 12px; color: var(--muted); }
.access-note[open] { padding-bottom: 12px; }

.workspace-empty { min-height: 440px; padding: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.empty-index { color: var(--mint-ink); font-size: 12px; font-weight: 600; }
.workspace-empty h2 { margin-top: 12px; font-size: 24px; }
.workspace-empty > p { max-width: 68ch; margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.workspace-empty > p.helper { font-size: 12px; }
.workspace-empty > .button { margin-top: 24px; }
.empty-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 32px 0 24px; padding: 24px 0 0; border-top: 1px solid var(--line); list-style: none; }
.empty-steps li > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.empty-steps strong { font-size: 13px; font-weight: 600; }
.empty-steps p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.request-intro { margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.request-heading { padding: 24px; }
.request-meta { gap: 8px; margin-bottom: 12px; }
.request-meta > .eyebrow { margin-right: auto; }
.request-heading h2 { max-width: 44em; font-size: 24px; line-height: 1.5; }
.request-heading-footer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.request-heading > p { margin-top: 8px; }
.request-facts { display: flex; flex-wrap: wrap; gap: 16px 24px; padding: 16px 24px; border-top: 1px solid var(--line-soft); }
.request-facts > * { min-width: 0; flex: 1 1 120px; }
.request-facts > dl { display: flex; flex-wrap: wrap; gap: 16px 24px; }
.request-facts > dl > div { flex: 1 1 120px; min-width: 0; }
.request-facts dt, .request-facts .fact-label, .request-facts small { display: block; color: var(--muted); font-size: 12px; }
.request-facts dd, .request-facts strong, .request-facts .fact-value { display: block; margin-top: 4px; color: var(--ink); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.request-facts > span { color: var(--muted); font-size: 13px; }
#readonly-notice, #request-error { margin-bottom: 16px; }
#readonly-notice { border-left-width: 1px; padding: 8px 16px; background: transparent; }

.command-panel { margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.command-panel summary { min-height: 52px; padding: 14px 20px; font-size: 13px; font-weight: 600; }
.step-tag { margin-right: 12px; color: var(--mint-ink); font-size: 12px; font-weight: 600; }
.summary-hint { margin-left: 16px; color: var(--muted); font-size: 12px; font-weight: 400; }
.command-body { padding: 16px 20px 20px; border-top: 1px solid var(--line-soft); }
.handoff-flow { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.handoff-flow strong { color: var(--mint-ink); font-weight: 600; }
#command-context { margin-bottom: 12px; }
.command-text { min-height: 88px; font-size: 14px; line-height: 1.85; }
.command-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 16px; }
.command-actions > .helper { flex: 1 1 280px; }
.command-actions .button-row { gap: 8px; }
#command-status:not(:empty), #command-error:not([hidden]) { margin-top: 12px; }

.workspace-columns { display: grid; grid-template-columns: minmax(0, 1fr) 272px; align-items: start; gap: 24px; }
.document-column { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.document-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; padding: 4px 24px 0; border-bottom: 1px solid var(--line); }
.tabs { display: flex; min-width: 0; gap: 24px; }
.tabs button { min-width: 44px; min-height: 52px; padding: 12px 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 14px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 700; }
.tabs button:focus-visible { outline-offset: -4px; }
.version-control { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 4px 0 8px; }
.version-control label { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.version-control select { width: auto; max-width: 160px; min-height: 44px; padding: 8px; font-size: 12px; }
.version-note { padding: 12px 24px 0; color: var(--muted); font-size: 12px; line-height: 1.85; }
.version-note:empty { display: none; }
.tab-panel { padding: 24px; }
.tab-panel:focus-visible { outline-offset: -4px; }
.content-section { margin-bottom: 24px; }
.tab-panel > .content-section:last-child { margin-bottom: 0; }
.content-section > h3, .proposal-section > h3 { margin-bottom: 12px; }
.body-copy { max-width: 76ch; color: #314655; font-size: 14px; line-height: 1.85; white-space: pre-wrap; }
.brief-box { padding: 16px 20px; border: 1px solid var(--line-soft); border-radius: 4px; background: #f8fafb; }
.metadata-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 24px 0; }
.metadata-grid dt, .overview-facts dt { margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.metadata-grid dd { color: var(--ink); font-size: 14px; }
#overview-content > .helper { max-width: 76ch; margin-bottom: 24px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.overview-summary { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.summary-kicker { margin-bottom: 8px; color: var(--mint-ink); font-size: 12px; font-weight: 600; }
.overview-summary h3 { margin-bottom: 10px; font-size: 18px; }
.summary-copy { max-width: 64ch; color: #314655; font-size: 15px; font-weight: 400; line-height: 1.85; white-space: pre-wrap; }
.overview-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin-top: 24px; }
.overview-facts > div { min-width: 0; padding-left: 12px; border-left: 2px solid var(--mint); }
.overview-facts dd { color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.7; }
.request-brief-details { margin: 24px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.request-brief-details summary { min-height: 44px; padding: 12px 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.request-brief-details[open] { padding-bottom: 16px; }
.request-brief-details .brief-box { margin-top: 8px; padding: 0; border: 0; background: transparent; }
.request-brief-details .content-section { margin: 8px 0 0; }

.timeline { margin-top: 16px; padding: 0; list-style: none; }
.timeline li { position: relative; margin-left: 4px; padding: 0 0 24px 24px; border-left: 1px solid var(--line); }
.timeline li::before { position: absolute; top: 8px; left: -4px; width: 7px; height: 7px; border: 1px solid #697d89; border-radius: 50%; background: var(--paper); content: ""; }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li:last-child::before { border-color: var(--ink); background: var(--ink); }
.timeline strong { color: var(--ink); font-size: 14px; font-weight: 600; }
.timeline time { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.timeline p { max-width: 76ch; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.85; white-space: pre-wrap; }
.timeline .timeline-empty { margin: 0; padding: 0; border: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.timeline .timeline-empty::before { display: none; }
#observed-duration { margin-top: 16px; }
.inline-empty { margin-bottom: 24px; padding: 24px; border: 1px solid var(--line-soft); border-radius: 4px; background: #f8fafb; }
.inline-empty h3 { margin-bottom: 8px; font-size: 15px; }
.inline-empty p { max-width: 68ch; color: var(--muted); font-size: 14px; line-height: 1.85; }
.proposal-document { min-width: 0; background: var(--paper); }
.proposal-document > h3 { margin: 12px 0 16px; font-size: 22px; }
.proposal-summary { max-width: 76ch; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); color: #314655; font-size: 15px; line-height: 1.85; white-space: pre-wrap; }
.proposal-section { padding-bottom: 24px; }
.proposal-section:last-child { padding-bottom: 0; }
.proposal-section h3 { font-size: 16px; }
.proposal-section h4 { margin-bottom: 8px; }
.assumption-list { padding-left: 20px; color: #435666; font-size: 14px; line-height: 1.85; }
.assumption-list li + li { margin-top: 8px; }
.evidence-refs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.evidence-ref { min-height: 44px; padding: 8px 12px; border: 1px solid #d2e4dc; border-radius: 4px; background: var(--paper); color: var(--mint-ink); font-size: 12px; }
.evidence-ref:hover { background: var(--accent-wash); border-color: var(--mint); }
#evidence-content { margin-top: 24px; }
.source-item { margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.source-item:first-child { margin-top: 0; }
.source-item h4 { margin: 8px 0 12px; font-size: 16px; line-height: 1.6; }
.source-item blockquote { max-width: 76ch; margin: 16px 0 8px; padding: 0 0 0 16px; border-left: 2px solid var(--mint); color: #435666; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.source-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.source-meta > span:first-child { color: var(--ink); font-weight: 600; }
.source-item > a { color: var(--mint-ink); }
.hash-details { margin-top: 8px; color: var(--muted); font-size: 12px; }
.hash-details summary { min-height: 44px; padding-block: 12px; }
.hash-details code { display: block; margin-top: 8px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.table-scroll { max-width: 100%; margin: 16px 0; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.7; }
caption { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; text-align: left; }
th, td { min-width: 80px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; text-align: left; }
th { background: #f3f6f7; color: #435666; font-size: 12px; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.calculation-table { min-width: 560px; font-variant-numeric: tabular-nums; }
.calculation-table td:not(:first-child), .calculation-table th:not(:first-child) { text-align: right; }
.row-warning { background: var(--red-wash); color: var(--red); }
.version-entry { margin-bottom: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.version-entry:last-child { margin-bottom: 0; }
.version-entry > .section-heading { flex-wrap: wrap; margin-bottom: 8px; }
.version-entry p { margin-top: 8px; }

.revision-section { margin-top: 0; padding: 24px; border-top: 1px solid var(--line); background: #f8fafb; border-radius: 0 0 var(--radius) var(--radius); }
.revision-section .section-heading { align-items: flex-start; flex-wrap: wrap; gap: 8px 16px; }
.revision-section .eyebrow, .review-column .eyebrow { margin-bottom: 4px; font-size: 12px; }
.revision-section > p { margin-bottom: 16px; }
#revision-context, #review-context { margin: 8px 0; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.retry-section { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; border-top: 1px solid var(--line); }
.retry-section > div { flex: 1 1 240px; }
.retry-section strong { font-size: 14px; }
.retry-section > p { flex-basis: 100%; }

.review-column { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.review-column > .section-heading { align-items: flex-start; gap: 8px; margin-bottom: 8px; }
#department-version { margin-bottom: 16px; }
.department-path-label { padding: 8px 12px; border-left: 2px solid var(--mint); background: #f5f8f7; color: var(--mint-ink); font-size: 12px; font-weight: 600; }
.department-row { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.department-row header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.department-row header > h4 { flex: 1 1 auto; }
.department-row header > .badge { margin-left: auto; }
.department-row h4 { font-size: 14px; }
.department-title { display: flex; min-width: 0; align-items: center; gap: 8px; }
.department-index { display: inline-grid; flex: 0 0 24px; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 4px; background: var(--canvas); color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.department-row p { margin-top: 8px; color: #435666; font-size: 14px; line-height: 1.85; }
.department-row .department-estimate { color: var(--muted); font-size: 12px; }
.department-row .sync-pending { color: var(--amber); }
.department-details { margin-top: 4px; }
.department-details summary { min-height: 44px; padding: 10px 0; color: var(--muted); font-size: 12px; line-height: 1.85; }
.department-details[open] summary { color: var(--ink); }
.department-details p:first-of-type { margin-top: 0; }
.review-boundary { margin-top: 16px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 4px; background: #f7f9fa; color: var(--muted); font-size: 12px; line-height: 1.85; }
.review-form { margin-top: 24px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.review-form h4 { margin-bottom: 16px; }
.field { margin-bottom: 16px; }
.field-hint { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.review-form input, .review-form select, .review-form textarea { font-size: 14px; }
.review-form > .button { width: 100%; margin-top: 8px; }
.recent-reviews { padding-top: 24px; }
.recent-reviews > h4 { margin-bottom: 12px; }
.review-record { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.review-record > p { margin-top: 8px; font-size: 14px; line-height: 1.85; white-space: pre-wrap; }
.review-record .helper { font-size: 12px; }
.review-record header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.page-footer { display: flex; justify-content: space-between; gap: 24px; margin-top: 40px; padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.85; }
.page-footer > span { min-width: 0; }
.page-footer strong { color: #435666; font-weight: 600; }
.page-footer > span:last-child { text-align: right; }

.request-dialog {
  width: min(640px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 16px 48px #10233124;
}
.request-dialog[open] { display: flex; flex-direction: column; }
.request-dialog::backdrop { background: #14263580; }
.dialog-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px; border-bottom: 1px solid var(--line); }
.dialog-header > div { min-width: 0; }
.dialog-header .eyebrow { margin-bottom: 4px; color: var(--mint-ink); }
.dialog-header h2 { font-size: 23px; }
.dialog-header .text-button { flex: 0 0 auto; padding-inline: 8px; }
#new-request-form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden; }
.dialog-body { flex: 1 1 auto; min-height: 0; padding: 24px; overflow-y: auto; overscroll-behavior-y: contain; scroll-padding-block: 16px; }
.dialog-intro { margin-bottom: 24px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.dialog-footer { position: sticky; bottom: 0; z-index: 2; display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--paper); }
#session-change-warning { margin-bottom: 24px; }
#session-change-warning .button { margin: 12px 0; }
#request-submit-note { margin-top: 12px; }
#request-form-error, #review-error, #revision-error { margin: 12px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 50; padding: 12px 16px; border-radius: 4px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 12px; }
.noscript-message { padding: 24px; background: var(--red-wash); color: var(--red); }

@media (min-width: 1500px) {
  .app-frame { padding-inline: 40px; }
  .workbench-layout { grid-template-columns: 248px minmax(0, 1fr); gap: 32px; }
  .workspace-columns { grid-template-columns: minmax(0, 1fr) 288px; }
}

@media (max-width: 1280px) {
  .app-frame { padding-inline: 24px; }
  .metrics-strip { grid-template-columns: 248px minmax(0, 1fr); gap: 16px; padding-inline: 20px; }
  .metric { padding-inline: 16px; }
  .workbench-layout { grid-template-columns: 232px minmax(0, 1fr); gap: 24px; }
  .workspace-columns { grid-template-columns: minmax(0, 1fr) 256px; gap: 16px; }
  .document-toolbar { padding-inline: 20px; }
  .tabs { gap: 16px; }
  .tab-panel, .revision-section, .retry-section { padding: 20px; }
  .version-note { padding-inline: 20px; }
  .review-column { padding: 16px; }
  .empty-steps { gap: 16px; }
}

@media (max-width: 1120px) {
  .metrics-strip { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .metrics-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
  .metric:first-child { border-left: 0; padding-left: 0; }
  .metric:last-child { padding-right: 0; }
  .workspace-columns { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .review-column { padding: 24px; }
  .department-matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .review-form { max-width: 640px; }
  .empty-steps { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .empty-steps li { display: flex; align-items: baseline; gap: 16px; }
  .empty-steps li > span { margin: 0; }
  .workspace-empty { padding: 32px; }
  .summary-hint { display: block; margin: 4px 0 0 16px; }
  .help-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

@media (max-width: 768px) {
  .app-frame { padding-inline: 20px; }
  .masthead { gap: 16px; }
  .brand-line { gap: 8px 12px; }
  .workspace-breadcrumb { gap: 4px 8px; }
  .workspace-product, .breadcrumb-divider { display: none; }
  .page-heading { gap: 16px; }
  .page-heading h1 { font-size: 26px; }
  .metric { padding-inline: 16px; }
  .metric dd { font-size: 24px; }
  .execution-strip { padding-block: 4px; }
  .workbench-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 24px; }
  .task-sidebar { padding: 0 0 16px; border-bottom: 1px solid var(--line); }
  .task-sidebar > .section-heading { margin-bottom: 8px; }
  .list-filters { margin-bottom: 12px; }
  .request-search { margin-bottom: 12px; }
  .request-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 288px; }
  .list-group-label, .list-empty { grid-column: 1 / -1; }
  .list-group-label { margin: 8px 4px 0; }
  .request-item { margin-bottom: 0; }
  .sidebar-note { margin-top: 12px; padding: 12px 4px 0; border-top: 0; }
  .sidebar-note > strong, .sidebar-note > p:not(#write-limits) { display: none; }
  #write-limits { margin-bottom: 0; }
  .workspace-empty { min-height: 0; padding: 24px; }
  .request-heading { padding: 24px; }
  .request-heading h2 { font-size: 23px; }
  .request-facts { padding-inline: 24px; }
  .command-actions > .button-row { width: 100%; justify-content: flex-end; }
  .document-toolbar { padding-inline: 24px; }
  .tabs { gap: 24px; }
  .tab-panel, .revision-section, .retry-section { padding: 24px; }
  .version-note { padding-inline: 24px; }
  .page-footer { flex-direction: column; gap: 12px; margin-top: 32px; }
  .page-footer > span:last-child { text-align: left; }
  input, textarea, select, .review-form input, .review-form select, .review-form textarea, .request-search input, .command-text, .version-control select { font-size: 16px; }
}

@media (max-width: 600px) {
  .app-frame { padding-inline: 16px; }
  .masthead { min-height: 64px; gap: 8px; }
  .brand-line { gap: 4px 12px; }
  .wordmark { font-size: 22px; }
  .brand-divider { display: none; }
  .workspace-breadcrumb { flex-basis: 100%; }
  .workspace-label { font-size: 12px; }
  .utility-nav .text-button { padding-inline: 4px; }
  .page-heading { align-items: flex-start; gap: 12px; padding-block: 24px; }
  .page-heading h1 { font-size: 24px; }
  .page-heading .button { padding-inline: 12px; }
  .page-subtitle { margin-top: 8px; font-size: 13px; line-height: 1.85; }
  .metrics-strip { padding: 16px; gap: 12px; }
  .metrics-heading { display: block; }
  .metrics-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .metric { padding: 0 16px; }
  .metric:nth-child(odd) { padding-left: 0; border-left: 0; }
  .metric:nth-child(even) { padding-right: 0; }
  .metric dt { font-size: 12px; }
  .execution-guidance { font-size: 12px; }
  .connection-line { width: 100%; justify-content: space-between; }
  .request-list { grid-template-columns: minmax(0, 1fr); max-height: 264px; }
  .request-item { padding: 12px; }
  .request-heading { padding: 20px; }
  .request-heading h2 { font-size: 22px; }
  .request-meta { gap: 8px; }
  .request-heading-footer { display: block; margin-top: 12px; }
  .request-heading-footer > p { margin-top: 4px; }
  .request-facts { gap: 16px; padding: 16px 20px; }
  .request-facts > *, .request-facts > dl > div { flex-basis: calc(50% - 8px); }
  .command-panel summary { padding: 12px 16px; }
  .step-tag { margin-right: 8px; }
  .command-body { padding: 16px; }
  .handoff-flow { gap: 4px 8px; }
  .command-actions .button-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .command-actions .button { padding-inline: 8px; }
  .document-toolbar { padding: 4px 16px 0; gap: 4px; }
  .tabs { flex: 1 0 100%; justify-content: space-between; gap: 8px; }
  .tabs button { flex: 1 1 auto; min-height: 48px; font-size: 13px; }
  .version-control { width: 100%; justify-content: flex-end; padding-block: 4px 8px; }
  .version-control select { max-width: 180px; }
  .tab-panel, .revision-section, .retry-section { padding: 20px 16px; }
  .version-note { padding-inline: 16px; }
  .brief-box { padding: 16px; }
  .summary-copy { font-size: 16px; }
  .metadata-grid, .overview-facts { column-gap: 16px; }
  .proposal-document > h3 { font-size: 20px; }
  .source-item, .version-entry, .inline-empty { padding: 16px; }
  .form-footer { justify-content: flex-end; }
  .form-footer > .helper { flex-basis: 100%; }
  .review-column { padding: 20px 16px; }
  .department-matrix { grid-template-columns: minmax(0, 1fr); }
  .review-column .field-hint { margin-left: 8px; }
  .help-panel { padding-inline: 16px; }
  .request-dialog { width: calc(100% - 24px); max-width: calc(100% - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .dialog-header { padding: 16px; }
  .dialog-header h2 { font-size: 22px; }
  .dialog-body { padding: 16px; }
  .dialog-intro { margin-bottom: 20px; }
  .dialog-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; padding: 12px 16px; }
  .dialog-footer .button { min-height: 48px; padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media print {
  :root { background: #fff; color: #172634; }
  body { background: #fff; }
  .task-sidebar, .masthead, .page-heading > button, .command-panel, .revision-section, .review-form, .retry-section, .utility-nav, .execution-strip, .help-panel, dialog, .skip-link, .tabs { display: none !important; }
  .app-frame { max-width: none; padding: 0; }
  .page-heading { padding: 0 0 16px; }
  .metrics-strip { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .metrics-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric { padding-inline: 12px; }
  .workbench-layout, .workspace-columns { display: block; min-height: 0; }
  .request-heading, .request-facts { padding: 16px; }
  .document-column, .review-column { border-color: #b8c1c8; }
  .review-column { margin-top: 24px; padding: 16px; }
  .document-toolbar { justify-content: flex-start; padding-inline: 16px; }
  .version-control { justify-content: flex-start; }
  .tab-panel { padding: 16px; }
  .body-copy, .summary-copy, .proposal-summary { max-width: none; }
  .proposal-document { border: 0; }
  .table-scroll { max-width: none; overflow: visible; }
  .calculation-table { min-width: 0; }
  th, td { min-width: 0; padding: 8px; }
  thead { display: table-header-group; }
  tr, .request-intro, .department-row, .review-record { break-inside: avoid; }
  h2, h3, h4, caption { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  .department-matrix { display: block; }
  .request-brief-details:not([open]) > :not(summary), .department-details:not([open]) > :not(summary), .hash-details:not([open]) > :not(summary) { display: block; }
  details::details-content { content-visibility: visible; display: block; }
  .source-item > a[href]::after { content: " (" attr(href) ")"; font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
  .source-item > a { display: block; }
  .page-footer { display: block; margin-top: 24px; }
  .page-footer > span { display: block; text-align: left; }
  .page-footer > span:last-child { margin-top: 8px; }
}

/* Candidate presentation: retain the original workflow selectors and print rules. */
@media screen {
  :root {
    --canvas: #f6f8f7;
    --ink: #172b2c;
    --muted: #5f716c;
    --line: #dce6df;
    --line-soft: #eaf0ec;
    --control-line: #7d9989;
    --accent: #087f70;
    --accent-dark: #076b5f;
    --accent-wash: #e7f3ed;
    --mint: #b5d9c7;
    --mint-ink: #086b5f;
    --focus: #087565;
    --radius: 12px;
    --paper-inset: 36px;
    --paper-shadow: 0 6px 30px #203e2e05, 0 1px 2px #203e2e04;
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  }
  div, nav { min-width: 0; }
  h1, h2, h3, h4 { font-weight: 650; letter-spacing: -.035em; }
  input, select, textarea { max-width: 100%; border-radius: 9px; }
  input:hover:not(:disabled), textarea:hover:not(:disabled), select:hover:not(:disabled) { border-color: #698e7d; }
  textarea[readonly] { background: #fbfdfc; }
  .button { min-height: 46px; padding: 11px 18px; border-radius: 10px; }
  .button-primary { border: 1px solid var(--accent); background: var(--accent); box-shadow: 0 3px 8px #087f7010; }
  .button-primary .icon { color: currentColor; }
  .button-primary:hover:not(:disabled) { border-color: var(--accent-dark); background: var(--accent-dark); }
  .button-primary:active:not(:disabled) { background: #055b50; }
  .button-secondary:hover:not(:disabled) { border-color: #8dac9c; background: #f0f6f2; }
  .button-small { min-height: 44px; padding: 8px 13px; }
  .button:disabled { border-color: #d8e2db; background: #edf2ee; color: #61736a; box-shadow: none; }
  .text-button { border-radius: 8px; color: var(--mint-ink); }
  .text-button:hover:not(:disabled) { color: #07574c; }
  .badge { border-radius: 6px; padding: 3px 8px; }
  .badge-neutral { border-color: #dfe7e2; background: #f0f4f1; color: #53665c; }
  .badge-blue { border-color: #cce3d6; }
  .notice { border-radius: 9px; }
  .notice-neutral { background: #f3f7f4; color: #4e675a; }

  /* A quiet navigation rail, separate from the working document. */
  .app-frame { display: grid; grid-template-columns: 176px minmax(0, 1fr); max-width: none; min-height: 100vh; margin: 0; padding: 0; }
  .masthead { position: sticky; top: 0; align-self: start; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 24px; height: 100vh; height: 100dvh; min-height: 0; padding: 32px 16px 24px; border: 0; border-right: 1px solid var(--line); background: #f0f5f2; }
  .brand-line { flex-direction: column; align-items: flex-start; gap: 34px; }
  .wordmark { display: block; width: 140px; max-width: 100%; line-height: 1; }
  .official-wordmark { display: block; width: 100%; height: auto; object-fit: contain; }
  .brand-divider, .breadcrumb-divider { display: none; }
  .workspace-breadcrumb { flex-direction: column; align-items: flex-start; gap: 5px; padding-inline: 10px; }
  .workspace-product { font-size: 12px; font-weight: 600; }
  .workspace-label { font-size: 12px; }
  .utility-nav { flex: 1 1 auto; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 7px; }
  .utility-nav .text-button, .workspace-current { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 46px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 550; text-decoration: none; }
  .utility-nav a:hover { background: #e6eee8; color: var(--ink); }
  .utility-nav .icon { width: 18px; height: 18px; flex-basis: 18px; }
  .workspace-current { background: #deeee4; color: var(--mint-ink); font-weight: 650; }
  .utility-nav a[href="/manual"] { margin-top: auto; }
  #help-toggle { min-height: 44px; padding-left: 12px; border: 1px solid var(--line); background: #f8fbf9; font-size: 12px; }
  #help-toggle[aria-expanded="true"] { border-color: var(--mint); background: var(--accent-wash); color: var(--mint-ink); }
  .workspace-shell { width: 100%; max-width: 1580px; margin: 0 auto; padding: 36px 36px 0; }
  .help-panel { margin: 0 0 24px; box-shadow: var(--paper-shadow); }
  .page-heading { gap: 24px; padding: 0 0 28px; }
  .page-heading h1 { font-size: 34px; line-height: 1.4; }
  .page-subtitle { margin-top: 9px; color: var(--muted); line-height: 1.85; }
  .page-heading > .button { padding-inline: 20px; }
  .metrics-strip { grid-template-columns: 192px minmax(0, 1fr); gap: 20px; padding: 18px 22px; background: #fbfdfb; }
  .metrics-heading .helper { margin-top: 4px; }
  .metric { padding-inline: 20px; }
  .metric dt { font-size: 12px; }
  .metric dd { font-size: 26px; font-weight: 600; }
  .metric:last-child { padding-right: 0; }
  .execution-strip { align-items: center; gap: 0 20px; min-height: 64px; padding: 8px 0; border-bottom-color: var(--line); }
  .execution-guidance { flex: 1 1 470px; font-size: 12px; line-height: 1.85; }
  .execution-guidance p { padding-block: 4px; }
  .connection-line { flex: 0 1 auto; gap: 10px; }
  #live-status { flex: 1 1 160px; }
  #refresh-state { flex: 0 0 auto; padding-inline: 6px; }

  /* A roomy task list and one continuous paper surface for the selected work. */
  .workbench-layout { grid-template-columns: 264px minmax(0, 1fr); gap: 28px; margin-top: 30px; }
  .task-sidebar { padding-top: 4px; }
  .task-sidebar > .section-heading { margin-bottom: 18px; }
  .section-heading h2 { font-size: 16px; }
  .list-filters { gap: 5px; padding: 3px; margin: 0 0 16px; border: 1px solid var(--line-soft); border-radius: 11px; background: #edf3ef; }
  .list-filters button { min-height: 44px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; }
  .list-filters button:hover { background: #e4eee7; }
  .list-filters button[aria-pressed="true"] { border-color: #c9dfd2; background: var(--paper); color: var(--mint-ink); font-weight: 650; box-shadow: 0 1px 3px #203e2e06; }
  .request-search { margin-bottom: 22px; }
  .request-search input { min-height: 46px; border-color: var(--control-line); padding-left: 38px; }
  .request-list { max-height: min(50vh, 560px); padding: 6px; margin: -6px; scrollbar-color: #bfd0c5 transparent; }
  .list-group-label { margin: 22px 10px 10px; font-weight: 550; }
  .list-group-label:first-child { margin-top: 0; }
  .request-item { padding: 20px 17px 18px; margin-bottom: 8px; border-bottom-color: var(--line); border-radius: 12px; }
  .request-item:hover { border-color: #d5e3da; background: #edf4ef; }
  .request-item[aria-current="true"] { border-color: #b9d9c8; background: var(--paper); box-shadow: 0 4px 16px #203e2e06; }
  .request-item[aria-current="true"]::before { top: 22px; bottom: 22px; background: var(--accent); }
  .request-item strong { margin: 12px 0 14px; font-size: 15px; font-weight: 650; letter-spacing: -.02em; line-height: 1.7; }
  .request-item .item-date { font-size: 12px; }
  .item-access { margin-left: 5px; }
  .sidebar-note { margin-top: 28px; padding: 18px 4px 0; }
  .sidebar-note strong, .sidebar-note > p:not(#write-limits) { display: block; }
  .sidebar-note strong { color: #466156; }
  .sidebar-note > p { margin-bottom: 4px; }
  .access-note { margin-top: 4px; }
  .main-workspace { scroll-margin-top: 24px; }
  #selected-workspace, .workspace-empty { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--paper-shadow); }
  #selected-workspace { padding-bottom: 1px; }
  .request-intro { margin: 0; border: 0; border-radius: 16px 16px 0 0; background: transparent; }
  .request-heading { padding: 32px var(--paper-inset) 22px; }
  .request-meta { gap: 8px; margin-bottom: 18px; }
  .request-meta > .eyebrow { font-size: 12px; }
  .request-heading h2 { font-size: clamp(24px, 2.1vw, 31px); line-height: 1.5; }
  .request-heading-footer { gap: 4px 16px; margin-top: 16px; padding-top: 0; border: 0; }
  #selected-id { font-size: 12px; font-weight: 400; }
  .request-facts { gap: 16px 22px; margin: 0 var(--paper-inset); padding: 18px 0 22px; border-top: 1px solid var(--line-soft); }
  .request-facts > * { flex: 1 1 110px; }
  .request-facts .fact-value { margin-top: 6px; font-size: 16px; font-weight: 600; }
  #readonly-notice, #request-error { margin: 0 var(--paper-inset) 22px; }
  #readonly-notice { padding: 10px 14px; border-color: #d7e6dc; background: #f2f8f4; color: #426453; }
  .workspace-empty { min-height: 570px; padding: 44px var(--paper-inset); }
  .paper-symbol { width: 60px; height: 68px; margin-bottom: 28px; padding: 8px; border: 1px solid #d9e7de; border-radius: 14px; background: #f0f7f3; }
  .paper-symbol svg { width: 100%; height: 100%; fill: none; stroke: #628d77; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .workspace-empty h2 { font-size: 27px; line-height: 1.55; }
  .workspace-empty > p { line-height: 1.95; }
  .empty-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 32px 0 24px; padding-top: 24px; }
  .empty-steps li { display: block; }
  .empty-steps li > span { margin-bottom: 8px; color: var(--mint-ink); }

  /* Keep the manual handoff open, readable and connected to the actual controls. */
  .command-panel { margin: 0 var(--paper-inset) 24px; border-color: #cee2d5; border-radius: 11px; background: #f6faf7; }
  .command-panel summary { min-height: 48px; padding: 12px 16px; line-height: 1.85; }
  .step-tag { margin-right: 8px; }
  .summary-hint { display: inline; margin-left: 12px; color: #576e61; }
  .command-body { padding: 12px 16px 16px; border-top-color: #e0ebe3; }
  .handoff-overview { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin-bottom: 10px; }
  .handoff-flow { gap: 4px 8px; margin-bottom: 0; }
  #command-context { margin-bottom: 0; font-size: 12px; }
  .command-body label { margin-bottom: 6px; }
  .command-text { min-height: 88px; padding: 10px 12px; font-size: 14px; line-height: 1.75; }
  .command-actions { gap: 8px 16px; margin-top: 10px; }
  .command-actions > .helper { flex: 1 1 250px; }
  .command-actions > .button-row { width: auto; gap: 8px; }
  #command-status:not(:empty), #command-error:not([hidden]) { margin-top: 8px; }
  #command-status { color: #476756; }

  /* The detail and review read as a document, not three competing dashboards. */
  .workspace-columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .document-column { border: 0; border-radius: 0; background: transparent; }
  .document-toolbar { gap: 0 24px; padding: 0 var(--paper-inset); border-block: 1px solid var(--line-soft); }
  .tabs { flex: 1 1 320px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .tabs button { min-width: 0; min-height: 56px; font-size: 13px; }
  .tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--mint-ink); font-weight: 650; }
  .version-control { flex: 0 1 auto; gap: 10px; padding: 8px 0; }
  .version-control select { border-color: var(--control-line); border-radius: 8px; min-height: 44px; }
  .version-note { padding: 16px var(--paper-inset) 0; }
  .tab-panel { padding: 30px var(--paper-inset) 36px; }
  .content-section { margin-bottom: 30px; }
  #panel-overview > .content-section { padding-top: 26px; border-top: 1px solid var(--line-soft); }
  .body-copy, .summary-copy, .proposal-summary { color: #3c5550; line-height: 1.95; }
  .brief-box { padding: 20px; border-radius: 10px; background: #f8fbf9; }
  .metadata-grid { gap: 22px 28px; margin-block: 26px; }
  .metadata-grid > div { min-width: 0; }
  .metadata-grid dt { margin-bottom: 6px; }
  .overview-summary { margin-bottom: 26px; padding-bottom: 26px; border-bottom-color: var(--line-soft); }
  .overview-summary h3 { font-size: 22px; line-height: 1.55; }
  .summary-kicker { margin-bottom: 12px; }
  .request-brief-details { margin-block: 26px; }
  .timeline { margin-top: 22px; }
  .timeline li { padding: 0 0 26px 24px; border-left-color: #d3e3d9; }
  .timeline li::before { border-color: #84ab95; background: #e5f2e9; }
  .timeline li:last-child::before { border-color: var(--accent); background: var(--accent); }
  .timeline .timeline-empty { padding: 0; }
  .inline-empty { padding: 28px 24px; border-style: dashed; border-color: #cadfd2; border-radius: 11px; background: #fafcfb; }
  .inline-empty h3 { font-size: 18px; }
  .proposal-document > h3 { font-size: 26px; line-height: 1.55; }
  .proposal-summary { margin-bottom: 30px; padding-bottom: 26px; }
  .proposal-section { padding-bottom: 30px; }
  .proposal-section > h3 { font-size: 18px; }
  .source-item, .version-entry { padding: 24px; border-color: var(--line-soft); border-radius: 11px; }
  .source-item h4 { font-size: 17px; }
  .source-item blockquote { color: #435f52; line-height: 1.95; }
  .evidence-ref, .table-scroll { border-radius: 8px; }
  th { background: #f0f6f2; color: #466156; }
  .revision-section { padding: 28px var(--paper-inset); border-top-color: var(--line-soft); border-radius: 0; background: #f9fcfa; }
  .revision-section h3 { font-size: 19px; }
  .retry-section { padding: 24px var(--paper-inset); }
  .review-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; padding: 32px var(--paper-inset); border: 0; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; background: #fbfdfb; }
  .review-context > .section-heading { align-items: flex-start; gap: 8px; margin-bottom: 10px; }
  .review-context h3 { font-size: 19px; }
  .department-path-label { padding: 9px 12px; border-radius: 0 7px 7px 0; background: #edf5ef; }
  .department-matrix { display: block; }
  .department-row { padding: 17px 0; }
  .department-row p { color: #435f52; }
  .department-details summary { min-height: 44px; }
  .review-boundary { border-radius: 8px; background: #f1f6f2; }
  .review-writing { padding-left: 28px; border-left: 1px solid var(--line-soft); }
  .review-form { max-width: none; margin-top: 0; padding-top: 0; border-top: 0; }
  .review-form h4, .recent-reviews > h4 { font-size: 16px; }
  .review-form .field-hint { display: block; margin: 4px 0 0; }
  .field { margin-bottom: 20px; }
  .page-footer { gap: 24px; margin-top: 36px; padding: 24px 0; }
  .page-footer strong { color: #466156; }

  .request-dialog { border-color: #bacfc1; border-radius: 16px; box-shadow: 0 20px 90px #28473726; }
  .request-dialog::backdrop { background: #dfe9e4cc; backdrop-filter: blur(3px); }
  .dialog-header { padding: 24px 28px; }
  .dialog-header h2 { font-size: 26px; }
  .dialog-body { padding: 24px 28px; scroll-padding-block: 20px; }
  .dialog-footer { position: sticky; bottom: 0; flex: 0 0 auto; padding: 16px 28px; border-top-color: var(--line); background: var(--paper); box-shadow: 0 -4px 16px #203e2e04; }
  body:has(.request-dialog[open]) { overflow: hidden; }
}

@media screen and (min-width: 1101px) and (min-height: 800px) {
  .task-sidebar { position: sticky; top: 24px; }
}
@media screen and (min-width: 1600px) {
  :root { --paper-inset: 44px; }
  .workspace-shell { padding: 44px 44px 0; }
  .workbench-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 36px; }
}
@media screen and (max-width: 1280px) {
  :root { --paper-inset: 28px; }
  .app-frame { grid-template-columns: 164px minmax(0, 1fr); }
  .masthead { padding-inline: 12px; }
  .workspace-shell { padding: 30px 26px 0; }
  .metrics-strip { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .metrics-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
  .metrics-heading .helper { margin-top: 0; }
  .metric:first-child { border-left: 0; padding-left: 0; }
  .workbench-layout { grid-template-columns: 244px minmax(0, 1fr); gap: 24px; }
  .review-column { gap: 24px; }
  .review-writing { padding-left: 22px; }
  .summary-hint { display: block; margin: 4px 0 0 16px; }
}
@media screen and (max-width: 1100px) {
  .app-frame { display: block; }
  .masthead { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding: 16px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-line { flex-direction: row; gap: 0; }
  .workspace-breadcrumb { display: none; }
  .utility-nav { flex: 0 1 auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 5px; margin-left: auto; }
  .utility-nav .text-button, .workspace-current { gap: 7px; padding-inline: 10px; font-size: 12px; }
  .utility-nav a[href="/manual"] { margin-top: 0; }
  #help-toggle { padding-inline: 10px; }
  .workspace-shell { padding: 28px 24px 0; }
  .task-sidebar { position: static; }
  .workbench-layout { grid-template-columns: 236px minmax(0, 1fr); gap: 24px; }
  .review-column { grid-template-columns: minmax(0, 1fr); }
  .review-writing { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .empty-steps { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .empty-steps li { display: flex; align-items: baseline; gap: 16px; }
  .empty-steps li > span { margin: 0; }
  .document-toolbar { gap: 0; }
  .tabs { flex-basis: 100%; }
  .version-control { width: 100%; justify-content: flex-end; border-top: 1px solid var(--line-soft); }
  .command-actions > .button-row { width: 100%; justify-content: flex-end; }
}
@media screen and (max-width: 768px) {
  :root { --paper-inset: 28px; }
  .masthead { padding-inline: 20px; gap: 12px; }
  .utility-nav { gap: 3px; }
  .utility-nav .icon { display: none; }
  .page-heading h1 { font-size: 32px; }
  .workbench-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 26px; }
  .task-sidebar { padding: 0 0 20px; border-bottom: 1px solid var(--line); }
  .task-sidebar > .section-heading { margin-bottom: 14px; }
  .list-filters { margin-bottom: 14px; }
  .request-search { margin-bottom: 18px; }
  .request-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 304px; gap: 10px; }
  .list-group-label { margin: 8px 8px 0; }
  .request-item { margin: 0; padding: 18px 16px; }
  .sidebar-note { margin-top: 18px; padding-top: 12px; border-top: 0; }
  .request-heading { padding-top: 28px; }
  .workspace-empty { min-height: 0; padding-block: 32px; }
  .workspace-empty h2 { font-size: 25px; }
  .review-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-writing { padding: 0 0 0 22px; border-top: 0; border-left: 1px solid var(--line-soft); }
  input, textarea, select, .review-form input, .review-form select, .review-form textarea, .request-search input, .command-text, .version-control select { font-size: 16px; }
}
@media screen and (max-width: 600px) {
  :root { --paper-inset: 20px; }
  .masthead { padding: 18px 16px 12px; }
  .wordmark { width: 134px; }
  .utility-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); flex-basis: 100%; width: 100%; gap: 3px; margin: 0; }
  .utility-nav .text-button, .workspace-current, #help-toggle { justify-content: center; min-height: 44px; padding: 8px 4px; text-align: center; font-size: 12px; word-break: keep-all; }
  .workspace-shell { padding: 26px 16px 0; }
  .page-heading { flex-direction: column; align-items: stretch; gap: 20px; padding-bottom: 24px; }
  .page-heading h1 { font-size: 30px; }
  .page-heading > .button { width: 100%; min-height: 48px; }
  .page-subtitle { font-size: 14px; }
  .metrics-strip { gap: 16px; padding: 16px; }
  .metrics-heading { display: block; }
  .metrics-heading .helper { margin-top: 4px; }
  .metrics-list { row-gap: 20px; }
  .metric { padding-inline: 16px; }
  .metric:nth-child(odd) { padding-left: 0; }
  .metric:nth-child(even) { padding-right: 0; }
  .metric dd { font-size: 26px; }
  .execution-strip { gap: 4px; padding-block: 12px 4px; }
  .connection-line { width: 100%; justify-content: space-between; }
  .request-list { grid-template-columns: minmax(0, 1fr); max-height: 304px; }
  .request-heading { padding: 26px var(--paper-inset) 20px; }
  .request-meta > .eyebrow { flex-basis: 100%; }
  .request-heading h2 { font-size: 24px; }
  .request-heading-footer { display: flex; margin-top: 14px; }
  .request-heading-footer > p { margin-top: 0; }
  .request-facts { gap: 18px 14px; padding-block: 18px 22px; }
  .request-facts > * { flex: 1 1 calc(50% - 7px); }
  .command-panel { margin-inline: 14px; }
  .command-panel summary { padding: 12px; }
  .command-body { padding: 12px; }
  .command-actions .button-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .command-actions .button { padding-inline: 6px; }
  .document-toolbar { padding-inline: 16px; }
  .tabs { gap: 4px; }
  .tabs button { min-height: 52px; font-size: 13px; }
  .tab-panel { padding-block: 26px 30px; }
  .metadata-grid { column-gap: 18px; }
  .overview-summary h3 { font-size: 21px; }
  .proposal-document > h3 { font-size: 23px; }
  .source-item, .version-entry, .inline-empty { padding: 18px 16px; }
  .revision-section { padding-block: 26px; }
  .review-column { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-block: 28px; }
  .review-writing { padding: 26px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .review-form .field-hint { display: inline; margin-left: 6px; }
  .page-footer { gap: 14px; margin-top: 28px; }
  .request-dialog { border-radius: 14px; }
  .dialog-header { padding: 18px 20px; }
  .dialog-header h2 { font-size: 23px; }
  .dialog-body { padding: 20px; }
  .dialog-footer { padding: 12px 16px; gap: 8px; }
  .dialog-footer .button { min-height: 48px; padding: 8px; font-size: 12px; }
}
@media screen and (max-height: 700px) and (min-width: 1101px) {
  .masthead { position: static; height: auto; min-height: 100vh; padding-block: 24px; }
  .utility-nav { flex: 0 0 auto; }
  .utility-nav a[href="/manual"] { margin-top: 24px; }
}
@media screen and (max-height: 520px) {
  .request-dialog { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .dialog-header { padding: 10px 18px; align-items: center; }
  .dialog-header h2 { font-size: 20px; }
  .dialog-header .eyebrow { margin-bottom: 0; }
  .dialog-body { padding: 16px 18px; }
  .dialog-footer { padding: 10px 16px; }
}
