:root {
  --ink: #203631; --muted: #5b6d66; --paper: #f6f7f3; --panel: #fff;
  --line: #dce4dc; --teal: #166b56; --teal-dark: #10543f; --teal-soft: #eaf4ed;
  --navy: #203e35; --amber: #805817; --amber-soft: #fff7e5; --red: #913b35; --red-soft: #fff2ef;
  --shadow: 0 3px 12px rgb(30 54 43 / 3%); --radius: 18px;
  font-family: "Segoe UI", Arial, sans-serif; font-size: 16px; font-synthesis: none;
  color: var(--ink); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 106px; }
body { margin: 0; background: var(--paper); line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; border: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
.busy button:disabled { cursor: progress; }
a { color: inherit; }
:where(button, a, summary, input, textarea, select):focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(30px, 2.65vw, 42px); font-weight: 680; letter-spacing: -1.4px; line-height: 1.15; }
h1 span { color: var(--teal); }
h2 { font-size: 23px; font-weight: 660; letter-spacing: -.55px; line-height: 1.3; }
h3 { font-size: 17px; line-height: 1.4; }
h4 { font-size: 14px; line-height: 1.5; }
ul, ol, dl, dd { margin: 0; }
[hidden] { display: none !important; }
:where(p, h1, h2, h3, h4, dd, li) { overflow-wrap: anywhere; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 30; padding: 12px 20px; border-radius: 9px; background: var(--navy); color: white; }
.skip-link:focus { top: 12px; }

/* Workspace frame */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 220px; overflow: auto; display: flex; flex-direction: column; padding: 30px 17px 22px; border-right: 1px solid var(--line); background: #fdfefa; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 2px 30px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; flex: none; width: 38px; height: 40px; border-radius: 11px; color: white; background: var(--navy); font-size: 23px; font-weight: 600; }
.brand strong { font-size: 16px; letter-spacing: -.4px; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.mobile-brand { display: none; }
.workspace-card { display: flex; flex-direction: column; gap: 6px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 27px; background: #f3f6ef; }
.workspace-card strong { font-size: 14px; line-height: 1.5; }
.workspace-card > span:last-child { font-size: 12px; color: var(--muted); }
.eyebrow, .section-label, .guide-kicker { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1px; line-height: 1.5; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 9px; margin-bottom: 11px; }
.rail-heading h2 { font-size: 13px; letter-spacing: 0; }
.count { display: inline-grid; place-items: center; min-width: 28px; min-height: 25px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 7px; background: #f3f6ef; color: var(--muted); font-size: 12px; font-weight: 650; }
.request-list { display: grid; gap: 8px; }
.request-nav-item { display: block; width: 100%; padding: 14px 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; text-align: left; color: var(--ink); transition: background .15s, border-color .15s; }
.request-nav-item:hover { background: #f0f4ec; }
.request-nav-item.active { background: var(--teal-soft); border-color: #c2d8c8; }
.request-nav-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.request-nav-title { display: block; font-size: 14px; line-height: 1.5; font-weight: 650; }
.request-nav-location { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.nav-status-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #768f7d; }
.nav-status-dot.recorded { background: var(--teal); box-shadow: 0 0 0 3px #d4e7d9; }
.rail-note { display: flex; align-items: flex-start; gap: 9px; margin: 25px 5px 30px; }
.note-icon { display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 2px; border: 1px solid #93ab98; border-radius: 50%; color: var(--teal); font: italic 13px Georgia, serif; }
.rail-note strong { display: block; font-size: 13px; line-height: 1.5; }
.rail-note p { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.sidebar-bottom { display: flex; align-items: center; gap: 10px; padding: 22px 3px 0; margin-top: auto; border-top: 1px solid var(--line); }
.avatar { display: grid; place-items: center; flex: none; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: #f0f5ec; font-size: 12px; color: var(--muted); }
.sidebar-bottom strong { display: block; font-size: 13px; font-weight: 600; }
.sidebar-bottom div > span { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.main-shell { min-width: 0; width: calc(100% - 220px); margin-left: 220px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 77px; padding: 14px 36px; border-bottom: 1px solid var(--line); background: #fdfefa; color: var(--muted); font-size: 13px; }
.topbar > div:first-child { display: flex; align-items: center; gap: 13px; }
.topbar-section { font-size: 12px; font-weight: 700; letter-spacing: .8px; color: var(--ink); }
.topbar-divider { color: #9daa9f; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.environment { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.environment-dot, .small-dot { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.tour-toggle { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font-size: 13px; font-weight: 600; }
.tour-toggle:hover, .tour-toggle[aria-pressed="true"] { background: var(--teal-soft); border-color: #b6d0bc; color: var(--teal-dark); }
main { max-width: 1400px; margin: 0 auto; padding: 34px 36px 24px; outline: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 29px; }
.page-heading .eyebrow { margin-bottom: 11px; }
.purpose-note { flex: 0 0 205px; padding-left: 17px; border-left: 2px solid #b6d0bc; }
.purpose-note strong { font-size: 14px; }
.purpose-note p { margin-top: 6px; color: var(--muted); font-size: 13px; }
.workspace-session { margin: 20px 0 16px; color: var(--muted); font-size: 12px; }

/* Guided rail and saved record */
.journey { position: sticky; top: 12px; z-index: 8; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 6px; margin: 0 0 23px; border: 1px solid var(--line); border-radius: 13px; background: #fdfefa; list-style: none; box-shadow: 0 4px 16px rgb(29 56 40 / 5%); }
.journey-step { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 49px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 600; transition: color .18s, background .18s; }
.step-number { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 1px solid #d7e0d7; border-radius: 50%; background: #f3f6ef; font-size: 12px; font-weight: 650; }
.journey-step.active { background: var(--teal-soft); color: var(--teal-dark); }
.journey-step.active .step-number { border-color: var(--teal); background: var(--teal); color: white; }
.journey-step.done { color: var(--teal); }
.journey-step.done .step-number { border-color: #c4d8c8; background: #e7f1e8; }
.guide-intro { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 23px; padding: 23px 26px; border: 1px solid #cadccb; border-radius: var(--radius); background: #edf5e9; }
.guide-copy { max-width: 680px; }
.guide-copy h2 { margin-top: 5px; font-size: 23px; }
.guide-copy p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.guide-kicker { color: var(--teal-dark); }
.intro-note, .stage-hint { margin-top: 13px; font-size: 13px; color: var(--muted); }
.guide-intro > .button { flex: none; }
.stage-hint { margin: -8px 0 20px; }
.scenario-tag { display: flex; flex: 0 0 230px; flex-direction: column; align-items: flex-start; gap: 7px; padding: 17px 19px; border: 1px solid #cadccb; border-radius: 12px; background: #f7fbf1; color: var(--teal-dark); font-size: 12px; font-weight: 400; }
.scenario-tag strong { font-size: 15px; font-weight: 650; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: 24px; align-items: start; }
.request-column, .review-column { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.panel { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 21px; }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 6px; background: #eef1e9; color: #526344; font-size: 12px; font-weight: 650; line-height: 1.5; text-align: center; }
.badge.approved { background: #e3f1e6; color: var(--teal-dark); }
.badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.refused-stale, .badge.rejected { background: var(--red-soft); color: var(--red); }
.request-identification { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.record-id { color: var(--teal); font-size: 13px; letter-spacing: .5px; font-weight: 700; }
.revision-label { color: var(--muted); font-size: 12px; }
.request-panel h2 { font-size: 28px; line-height: 1.25; letter-spacing: -.65px; }
.record-summary { margin-top: 17px; }
.request-meta, .record-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); margin: 0 0 20px; }
.request-meta dt, .record-facts dt { margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.request-meta dd, .record-facts dd { font-size: 14px; font-weight: 600; line-height: 1.5; }
.record-description { margin: 16px 0; font-size: 15px; line-height: 1.75; color: var(--muted); white-space: pre-wrap; }
.field-label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 13px; font-weight: 650; }
.field-label > span { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
textarea, select, input:not([type="checkbox"]):not([type="radio"]) { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #bfcdbf; border-radius: 9px; padding: 11px 13px; background: white; color: var(--ink); font-size: 15px; line-height: 1.6; transition: border-color .15s; }
textarea { min-height: 100px; resize: vertical; }
textarea:focus, select:focus, input:focus { border-color: var(--teal); }
textarea:disabled, input:disabled { background: #f3f6f0; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.form-footer p { flex: 1; color: var(--muted); font-size: 12px; }
.form-footer .button { flex: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 11px 17px; border: 1px solid transparent; border-radius: 9px; font-size: 14px; font-weight: 650; line-height: 1.45; text-align: center; text-decoration: none; white-space: normal; transition: background .15s, border-color .15s, box-shadow .15s; }
.button-primary { background: var(--teal); border-color: var(--teal); color: white; box-shadow: 0 2px 3px rgb(20 75 53 / 8%); }
.button-primary:hover:not(:disabled) { background: var(--teal-dark); border-color: var(--teal-dark); box-shadow: 0 3px 9px rgb(20 75 53 / 12%); }
.button-secondary { border-color: #cbd7c9; background: white; color: var(--ink); }
.button-secondary:hover:not(:disabled) { border-color: #a8c0aa; background: #f0f6eb; }
.button-small { min-height: 44px; padding: 9px 13px; font-size: 13px; }
.button-text { min-height: 44px; padding: 9px 5px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 550; }
.button-text:hover:not(:disabled) { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.hint { margin-top: 8px; font-size: 12px; line-height: 1.65; color: var(--muted); }

/* Optional source detail */
summary { cursor: pointer; min-height: 44px; padding: 11px 0; color: var(--ink); font-size: 13px; font-weight: 600; }
summary::marker { color: var(--teal); }
.record-editor, .policy-details, .analysis-options { border-top: 1px solid var(--line); margin-top: 17px; }
.record-editor[open] > summary, .policy-details[open] > summary, .analysis-options[open] > summary { margin-bottom: 7px; }
.record-editor > form { padding: 4px 0 5px; }
.context-panel h2 { font-size: 18px; letter-spacing: -.3px; }
.source-tag { color: var(--muted); font-size: 12px; letter-spacing: .4px; }
.context-list { display: flex; flex-direction: column; gap: 19px; }
.context-item { display: flex; gap: 12px; }
.context-icon { display: grid; place-items: center; flex: none; width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 8px; background: #f5f7f0; color: var(--muted); font-size: 12px; }
.context-item h3 { font-size: 14px; font-weight: 650; }
.context-item p { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.policy-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); margin-top: 22px; margin-bottom: 11px; }
.policy-heading h3 { font-size: 14px; }
.policy-heading > span { font-size: 12px; color: var(--muted); }
.policy-list { display: grid; gap: 10px; }
.policy-item { padding: 13px 14px; border: 1px solid #e0e7db; border-radius: 9px; background: #f8faf4; }
.policy-item h4 { font-size: 13px; }
.policy-item p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.policy-id { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.review-panel { border-color: #c7d9c8; background: #fefffc; }
.review-panel .panel-header { margin-bottom: 15px; }
.provider-badge { display: inline-block; padding: 4px 8px; border: 1px solid #d5e4d0; border-radius: 6px; background: #f0f6e9; color: #46633d; font-size: 12px; text-align: center; }
.panel-intro { margin: 10px 0 17px; font-size: 15px; color: var(--muted); }
.provider-explainer { padding: 12px 14px; border-left: 3px solid #aac6a8; border-radius: 0 7px 7px 0; margin: 14px 0 19px; background: #f0f6eb; color: #46623d; font-size: 13px; line-height: 1.65; }
.provider-explainer.live { background: #eef3f2; color: #38594f; border-color: #87a79a; }
.mode-choice { margin: 14px 0 18px; }
.review-submit { width: 100%; justify-content: space-between; margin-top: 15px; }
.review-submit > span:last-child { font-size: 21px; font-weight: 400; }
.review-disclaimer { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin-top: 13px; color: var(--muted); font-size: 12px; text-align: center; }
.review-disclaimer .small-dot { margin-top: 7px; }
.boundary-note { padding: 14px 16px; border: 1px solid #d6e4d1; border-radius: 10px; margin-top: 18px; background: #f3f7ed; color: var(--teal-dark); font-size: 14px; font-weight: 600; line-height: 1.6; }
.boundary-note p { margin-top: 5px; color: var(--muted); font-size: 13px; font-weight: 400; }
.tour-note { display: none; padding: 11px 14px; border: 1px dashed #91b59a; border-radius: 9px; margin-top: 15px; background: #f6fbf1; color: #375b3d; font-size: 13px; line-height: 1.6; }
.tour-note strong { display: block; margin-bottom: 3px; }
body.show-tour .tour-note { display: block; }

/* Suggestions, drafts, and recorded decisions */
.proposal-panel { min-height: 245px; }
.empty-state { display: flex; align-items: center; flex-direction: column; padding: 15px 9px; text-align: center; }
.empty-state h2 { margin-top: 24px; font-size: 21px; }
.empty-state p { max-width: 330px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.empty-label { margin-top: 20px; color: var(--muted); font-size: 12px; letter-spacing: .9px; font-weight: 600; }
.empty-symbol { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; width: 52px; height: 59px; border: 1px solid #d2dfcb; border-radius: 10px; background: #f2f7e9; }
.empty-symbol > span { width: 25px; height: 3px; border-radius: 3px; background: #bfd2b3; }
.empty-symbol > span:nth-child(2) { width: 18px; margin-right: 7px; }
.empty-symbol i { position: absolute; right: -10px; bottom: -7px; display: grid; place-items: center; width: 28px; height: 28px; border: 3px solid white; border-radius: 50%; background: #dcefdc; color: var(--teal); font-size: 13px; font-style: normal; }
.proposal-picker { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.proposal-picker label { color: var(--muted); font-size: 12px; }
.proposal-picker select { flex: 1; font-size: 13px; }
.proposal-source { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 21px; color: var(--muted); font-size: 12px; }
.proposal-source .proposal-provider { flex-basis: 100%; color: var(--teal-dark); font-weight: 650; }
.recommendation-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.priority { color: var(--muted); font-size: 12px; line-height: 1.5; }
.priority.urgent { color: var(--amber); font-weight: 650; }
.proposal-panel h3 { margin-top: 9px; font-size: 22px; font-weight: 650; letter-spacing: -.4px; line-height: 1.45; }
.rationale { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.evidence-block { margin-top: 23px; }
.evidence-block h4, .uncertainties-block h4 { margin-bottom: 10px; font-size: 14px; }
.evidence-item { padding: 13px 15px; border-left: 3px solid #b5cfa9; border-radius: 0 8px 8px 0; margin-top: 10px; background: #f5f8ef; }
.evidence-item blockquote { margin: 0; color: #47633e; font-size: 14px; line-height: 1.7; }
.evidence-item cite { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; font-style: normal; overflow-wrap: anywhere; }
.uncertainties-block { margin-top: 22px; }
.uncertainties-block ul { padding-left: 20px; color: #6e5b34; font-size: 14px; }
.uncertainties-block li { padding-left: 3px; margin-top: 6px; }
.source-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 23px; color: var(--muted); font-size: 13px; }
.provenance-list { display: grid; gap: 9px; padding-bottom: 16px; }
.provenance-list > div { display: grid; grid-template-columns: 91px minmax(0, 1fr); gap: 10px; }
.provenance-list dt { color: var(--muted); font-size: 12px; }
.provenance-list dd { font-size: 13px; overflow-wrap: anywhere; }
.source-snapshot { display: grid; gap: 11px; padding-bottom: 16px; }
.source-snapshot > div { padding: 12px; border-radius: 8px; background: #f6f8f1; }
.source-snapshot strong { display: block; font-size: 13px; }
.source-snapshot p { margin-top: 5px; color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.decision-controls { padding-top: 21px; }
.decision-controls > p { margin-bottom: 13px; font-size: 13px; color: var(--muted); }
.decision-primary-row { display: flex; flex-wrap: wrap; gap: 10px; }
.decision-primary-row .button { flex: 1 1 145px; }
.decision-secondary-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-top: 5px; }
.revision-form { padding: 19px; border: 1px solid #c5d8bb; border-radius: 12px; margin-top: 20px; background: #f5f9ef; }
.revision-form h4 { font-size: 17px; }
.revision-form > p { margin: 7px 0 17px; color: var(--muted); font-size: 13px; }
.revision-form textarea { margin-bottom: 16px; }
.revision-form #revised-priority-help { margin: 8px 0 17px; }
.revision-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.recorded-action, .decision-result { padding: 17px 18px; border: 1px solid #c5dec5; border-radius: 12px; margin-top: 21px; background: #edf7e9; }
.recorded-action p { margin-top: 7px; color: #345c2e; font-size: 15px; font-weight: 600; }
.recorded-action > span:last-child { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; }
.recorded-action #recorded-action-priority { display: block; margin-top: 8px; }
.decision-result strong { font-size: 16px; color: var(--teal-dark); }
.decision-result p { margin-top: 7px; color: var(--muted); font-size: 14px; }
.decision-result.refused-stale, .decision-result.rejected { border-color: #e5d5ad; background: var(--amber-soft); }
.decision-result.refused-stale strong, .decision-result.rejected strong { color: var(--amber); }
.stale-notice { padding: 16px; border: 1px solid #e5d5ad; border-radius: 10px; margin-bottom: 18px; background: var(--amber-soft); color: var(--amber); font-size: 14px; }
.stale-notice p { margin-top: 6px; font-size: 13px; }

/* Completion and actual saved history */
.completion-panel { position: relative; display: flex; gap: 21px; padding: 29px; border: 1px solid #b8d2ba; border-radius: var(--radius); margin-top: 24px; background: #edf6e8; animation: settle-in .25s ease-out; }
.completion-mark { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #bed9bd; border-radius: 50%; margin-bottom: 17px; background: #dff0dc; color: var(--teal); font-size: 23px; }
.completion-panel h2 { font-size: 27px; }
.completion-panel p { max-width: 760px; margin-top: 10px; color: #4c6542; font-size: 15px; }
.completion-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 21px; }
.history-panel { margin-top: 24px; padding-bottom: 12px; }
.history-panel .panel-header { margin-bottom: 10px; }
.history-panel h2 { margin-top: 6px; }
.history-intro { margin-bottom: 26px; color: var(--muted); font-size: 14px; }
.history-list { list-style: none; padding: 0; }
.history-event { position: relative; display: grid; grid-template-columns: 27px minmax(0, 1fr) 130px; align-items: start; gap: 13px; padding-bottom: 24px; }
.history-event:not(:last-child)::before { position: absolute; content: ""; top: 25px; bottom: 0; left: 12px; width: 1px; background: #d9e5d4; }
.history-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #c4d8bc; border-radius: 50%; margin-top: 1px; background: #edf5e7; color: var(--teal); font-size: 12px; }
.history-dot.error { background: var(--amber-soft); border-color: #e6d5ac; color: var(--amber); }
.history-event h3 { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.7; letter-spacing: 0; }
.history-event p { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.history-event .history-actor { margin-top: 7px; font-size: 12px; }
.history-event time { padding-top: 3px; color: var(--muted); font-size: 12px; text-align: right; }
.history-empty { padding: 7px 0 18px; color: var(--muted); font-size: 14px; }
.history-change { display: grid; gap: 9px; padding: 12px 15px; border: 1px solid #dae5d4; border-radius: 9px; margin-top: 12px; background: #f6f9f1; }
.history-change strong, .history-change dt { color: var(--ink); font-size: 12px; font-weight: 650; }
.history-change p, .history-change dd { margin-top: 3px; font-size: 13px; color: var(--muted); }
.history-change > div + div { padding-top: 9px; border-top: 1px solid #dce6d5; }
.recovery-panel { padding: 23px 26px; border: 1px solid #d7ddcd; border-radius: 12px; margin-top: 24px; background: #fafbf6; }
.recovery-panel h2 { font-size: 21px; }
.recovery-panel p { max-width: 760px; margin: 9px 0 17px; color: var(--muted); font-size: 14px; }
.recovery-panel .button + .button { margin-left: 8px; }
.notification { display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px 15px 19px; border: 1px solid #c5dac1; border-radius: 11px; margin-bottom: 21px; background: #edf6e7; color: #3d6137; font-size: 14px; line-height: 1.65; }
.notification.error { border-color: #e6c9c0; background: var(--red-soft); color: var(--red); }
.notification.info { border-color: #c9dbd0; background: #eff6f0; color: #3b5e48; }
.notification-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notification-dismiss { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 8px; margin: -7px -6px -7px 0; background: transparent; color: inherit; font-size: 23px; line-height: 1; }
.notification-dismiss:hover { background: rgb(32 54 49 / 5%); }
.load-error h2 { margin-bottom: 10px; }
.load-error p { margin-bottom: 19px; color: var(--muted); font-size: 15px; }

/* Loading preserves the surrounding layout. */
.analysis-loading { padding: 17px 0 3px; }
.analysis-loading > p, .boot-skeleton > p { margin-bottom: 16px; color: var(--muted); font-size: 14px; }
.skeleton-line, .skeleton-card { position: relative; overflow: hidden; border-radius: 6px; background: #e9eee3; }
.skeleton-line { height: 12px; margin: 11px 0; }
.skeleton-line:nth-child(2n) { width: 83%; }
.skeleton-line:nth-child(3n) { width: 64%; }
.skeleton-card { min-height: 85px; margin: 19px 0; border-radius: 11px; }
.skeleton-line::after, .skeleton-card::after { position: absolute; content: ""; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgb(255 255 255 / 65%), transparent); animation: skeleton-pass 1.5s ease-in-out infinite; }
.boot-skeleton { width: calc(100% - 40px); max-width: 940px; margin: 48px auto; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.boot-skeleton .skeleton-card { min-height: 180px; }

/* Explanations and deliberate confirmation */
.demo-controls { border: 1px solid var(--line); border-radius: 12px; margin-top: 24px; background: #f0f4e9; }
.demo-controls > summary { display: flex; align-items: center; gap: 11px; padding: 16px 20px; list-style: none; }
.demo-controls > summary::-webkit-details-marker { display: none; }
.demo-controls > summary::before { content: "+"; color: var(--teal); font-size: 20px; font-weight: 400; }
.demo-controls[open] > summary::before { content: "−"; }
.demo-controls-hint { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 400; }
.demo-controls-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; padding: 23px; border-top: 1px solid var(--line); }
.reset-control { padding-left: 24px; border-left: 1px solid #d3dfcd; }
.reset-control strong { font-size: 14px; }
.reset-control p { margin: 7px 0 14px; color: var(--muted); font-size: 13px; }
.page-footer { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 9px 20px; padding: 26px 2px 0; color: var(--muted); font-size: 12px; }
.page-footer > .communication-note { flex-basis: 100%; margin-top: 2px; }
.communication-note { color: var(--muted); font-size: 12px; line-height: 1.65; }
dialog { width: 610px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 48px); overflow: auto; padding: 30px; border: 1px solid #cbdac4; border-radius: 20px; color: var(--ink); box-shadow: 0 24px 100px rgb(23 44 29 / 22%); }
dialog::backdrop { background: rgb(24 44 33 / 40%); backdrop-filter: blur(3px); }
dialog h2 { margin: 10px 0 13px; font-size: 27px; }
dialog p { color: var(--muted); font-size: 15px; }
.dialog-buttons { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 11px; margin-top: 24px; }
.approval-summary { padding: 17px 19px; border: 1px solid #d2e0c8; border-radius: 11px; margin: 18px 0; background: #f3f8eb; }
.approval-summary strong { display: block; margin-bottom: 6px; font-size: 16px; }
.approval-summary p { font-size: 15px; }
.approval-summary dl { display: grid; gap: 11px; margin-top: 13px; }
.approval-summary dt { color: var(--muted); font-size: 12px; }
.approval-summary dd { margin-top: 3px; font-size: 14px; }
.explain-dialog { width: 830px; }
.capability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 23px; }
.capability-card { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #f7f9f2; }
.capability-card h3 { font-size: 15px; }
.capability-card p { margin-top: 7px; color: var(--muted); font-size: 13px; }
.access-gate { display: grid; place-items: center; min-height: 100vh; padding: 36px 20px; background: radial-gradient(ellipse at top, #e8f0dd, var(--paper) 70%); }
.access-card { width: 100%; max-width: 500px; padding: 38px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 18px 65px rgb(29 59 34 / 7%); }
.gate-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 36px; font-size: 17px; }
.access-card > .eyebrow { margin-bottom: 12px; }
.access-card h1 { font-size: 36px; }
.gate-intro { margin: 20px 0 26px; color: var(--muted); font-size: 15px; }
.access-card .hint { margin: 9px 0 19px; }
.access-card .button { width: 100%; }
.access-feedback { padding: 13px; border-radius: 9px; margin-bottom: 16px; background: var(--red-soft); color: var(--red); font-size: 14px; }
.access-card > .communication-note { padding-top: 20px; border-top: 1px solid var(--line); margin-top: 27px; }
@keyframes skeleton-pass { to { transform: translateX(100%); } }
@keyframes settle-in { from { opacity: .7; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1600px) {
  main { padding-top: 42px; }
  .panel { padding: 30px; }
  .history-panel { padding-bottom: 15px; }
  .work-grid { gap: 28px; }
  .page-heading { margin-bottom: 34px; }
}
@media (max-width: 1200px) {
  main, .topbar { padding-right: 26px; padding-left: 26px; }
  .topbar > div:first-child > span:last-child:not(.topbar-section), .topbar-divider { display: none; }
  .panel { padding: 23px; }
  .purpose-note { display: none; }
  .work-grid { gap: 20px; }
  .panel-header { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 1080px) {
  .app-shell { display: block; }
  .sidebar { position: static; display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 18px; width: 100%; padding: 17px 26px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .brand { padding: 0; }
  .sidebar > #open-demonstrates { grid-column: 1 / -1; justify-self: start; padding: 7px 0; }
  .workspace-card, .rail-heading, .rail-note, .sidebar-bottom { display: none; }
  .request-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .request-nav-item { padding: 9px 12px; border-color: var(--line); }
  .request-nav-top { margin-bottom: 3px; }
  .request-nav-title { font-size: 13px; }
  .request-nav-location { margin-top: 3px; }
  .main-shell { width: 100%; margin-left: 0; }
  .topbar { min-height: 65px; }
  main { padding-top: 29px; }
  h1 { font-size: 35px; }
  .history-event { grid-template-columns: 27px minmax(0, 1fr) 125px; }
}
@media (max-width: 860px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .request-panel h2 { max-width: 580px; }
  .request-column, .review-column { gap: 20px; }
  .guide-intro { align-items: flex-start; }
  .guide-intro > .button { align-self: center; }
  .guide-copy h2 { font-size: 22px; }
  .context-list { gap: 17px; }
  .proposal-panel { min-height: 0; }
  .empty-state { padding: 14px 20px; }
  .empty-state p { max-width: 420px; }
  .decision-primary-row .button { flex-grow: 0; }
  .decision-secondary-row { justify-content: flex-start; gap: 24px; }
  .page-footer { flex-direction: column; gap: 7px; }
  .demo-controls-hint { display: none; }
}
@media (max-width: 620px) {
  html { scroll-padding-top: 104px; }
  .sidebar { display: block; padding: 18px; }
  .brand { gap: 10px; margin-bottom: 16px; }
  .brand strong { font-size: 17px; }
  .brand small { font-size: 12px; }
  .brand-mark { width: 35px; height: 37px; font-size: 21px; }
  .request-list { gap: 8px; }
  .request-nav-item { padding: 10px; border-radius: 10px; }
  .request-nav-top { font-size: 12px; }
  .request-nav-title { font-size: 13px; }
  .request-nav-location { display: none; }
  .topbar { gap: 10px; padding: 11px 18px; }
  .topbar > div:first-child { display: none; }
  .topbar-actions { flex: 1; width: 100%; justify-content: space-between; gap: 8px; }
  .environment { gap: 5px; font-size: 12px; }
  .tour-toggle { padding: 8px 10px; font-size: 12px; }
  main { padding: 25px 17px 22px; }
  .page-heading { margin-bottom: 24px; }
  .page-heading .eyebrow { font-size: 12px; letter-spacing: .7px; }
  h1 { font-size: 32px; letter-spacing: -.9px; }
  .workspace-session { margin-bottom: 14px; }
  .journey { top: 8px; gap: 2px; padding: 5px; margin-bottom: 18px; border-radius: 11px; }
  .journey-step { flex-direction: column; gap: 5px; min-height: 62px; padding: 7px 3px; font-size: 12px; }
  .step-number { width: 23px; height: 23px; font-size: 12px; }
  .guide-intro { display: block; padding: 20px; margin-bottom: 18px; border-radius: 14px; }
  .guide-copy h2 { font-size: 22px; }
  .guide-intro > .button { margin-top: 17px; width: 100%; }
  .scenario-tag { margin-top: 19px; padding: 14px 16px; }
  .panel { padding: 21px 19px; border-radius: 14px; }
  .panel-header { margin-bottom: 18px; }
  .section-label { font-size: 12px; letter-spacing: .6px; }
  .request-panel h2 { font-size: 26px; }
  .request-meta, .record-facts { gap: 17px 12px; padding: 18px 0; margin-bottom: 18px; }
  .request-meta dd, .record-facts dd { font-size: 14px; }
  .record-description { font-size: 15px; }
  textarea, select, input:not([type="checkbox"]):not([type="radio"]) { font-size: 16px; }
  .form-footer { align-items: flex-start; flex-direction: column; gap: 11px; }
  .form-footer .button { width: 100%; }
  .context-item { gap: 10px; }
  .context-icon { width: 26px; height: 26px; }
  .policy-heading { flex-wrap: wrap; gap: 5px; }
  .proposal-panel h3 { font-size: 21px; }
  .recommendation-heading { align-items: flex-start; }
  .proposal-picker { flex-direction: column; align-items: stretch; gap: 6px; }
  .decision-primary-row { display: grid; grid-template-columns: minmax(0, 1fr); }
  .decision-secondary-row { gap: 3px 15px; justify-content: space-between; }
  .revision-form { padding: 16px; }
  .revision-buttons { align-items: stretch; }
  .revision-buttons > .button-primary { width: 100%; }
  .source-tag { letter-spacing: 0; }
  .completion-panel { display: block; margin-top: 20px; }
  .completion-panel h2 { font-size: 25px; }
  .completion-actions { align-items: stretch; gap: 9px; }
  .completion-actions .button { width: 100%; }
  .history-panel { margin-top: 20px; padding-bottom: 5px; }
  .history-panel h2 { font-size: 23px; }
  .history-event { grid-template-columns: 25px minmax(0, 1fr); gap: 8px 11px; padding-bottom: 25px; }
  .history-event time { grid-column: 2; padding-top: 0; margin-top: -4px; text-align: left; }
  .history-event:not(:last-child)::before { left: 12px; }
  .history-change { padding: 11px 12px; }
  .recovery-panel { margin-top: 20px; }
  .recovery-panel .button { width: 100%; }
  .recovery-panel .button + .button { margin: 10px 0 0; }
  .notification { padding: 14px; gap: 5px; font-size: 14px; }
  .demo-controls { margin-top: 20px; }
  .demo-controls > summary { padding: 14px 17px; }
  .demo-controls-body { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 20px; }
  .reset-control { padding: 19px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  dialog { padding: 24px 21px; max-width: calc(100vw - 24px); border-radius: 16px; }
  dialog h2 { font-size: 25px; }
  .dialog-buttons { align-items: stretch; flex-direction: column-reverse; gap: 9px; }
  .dialog-buttons .button { width: 100%; }
  .approval-summary { padding: 15px; }
  .capability-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .capability-card { padding: 16px; }
  .access-card { padding: 29px 23px; border-radius: 18px; }
  .access-card h1 { font-size: 32px; }
  .gate-brand { margin-bottom: 29px; }
  .boot-skeleton { padding: 23px; }
}
@media (max-width: 360px) {
  main { padding-right: 12px; padding-left: 12px; }
  .sidebar, .topbar { padding-right: 13px; padding-left: 13px; }
  .panel { padding-right: 16px; padding-left: 16px; }
  .request-meta, .record-facts { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .request-list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .journey-step.active, .request-nav-item.active { outline: 2px solid Highlight; outline-offset: -3px; }
  .skeleton-line, .skeleton-card { border: 1px solid CanvasText; }
}


/* Public launch framing reuses the existing guided workspace. */
.guide-copy .launch-note { margin-top: 11px; font-size: 13px; color: var(--muted); }
.guide-copy > .button { margin-top: 18px; }
.completion-recovery { padding-top: 13px; border-top: 1px solid #cfdfc8; margin-top: 19px; }
.completion-recovery .hint { margin-top: 0; font-size: 13px; }
@media (max-width: 620px) {
  .guide-copy > .button { width: 100%; }
  .guide-intro .scenario-tag { display: none; }
  .completion-recovery .button { width: 100%; justify-content: flex-start; text-align: left; }
}
