@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #f5f2e9;
  --surface: #fcfaf5;
  --surface-muted: #eeebe1;
  --ink: #20352f;
  --muted: #626b61;
  --line: #d9dacb;
  --green: #18543e;
  --green-soft: #e4ede2;
  --amber: #88601d;
  --amber-soft: #f6ecd1;
  --red: #a13729;
  --red-soft: #f8e9e1;
  --focus: #276c54;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --mono: "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .46; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button, input { border-radius: 4px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
::selection { background: #cbdcc8; color: var(--ink); }
[hidden] { display: none !important; }
h1, h2, h3, h4, p, dl { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(46px, 4.4vw, 72px); line-height: 1.03; letter-spacing: -.045em; }
h1 em { font-weight: 400; color: var(--green); }
h2 { font-size: clamp(26px, 2.4vw, 36px); line-height: 1.15; letter-spacing: -.025em; }
h3 { font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -.02em; }
h4 { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; margin: 25px 0 10px; }
dd { margin: 0; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
legend { padding: 0; font-weight: 600; font-size: 13px; margin-bottom: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; padding: 12px 20px; transform: translateY(-150%); clip-path: inset(100%); z-index: 20; background: var(--green); color: white; border-radius: 3px; }
.skip-link:focus { transform: translateY(0); clip-path: none; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.5; }
.small-rule { display: inline-block; width: 26px; height: 2px; margin-right: 10px; background: var(--amber); vertical-align: middle; }
.muted, .fine-print { color: var(--muted); }
.fine-print { font-size: 11px; line-height: 1.6; }
.dot-separator { padding: 0 7px; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.mono { font-family: var(--mono); font-size: 11px; }
.app-shell { display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 34px 25px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: #efeee4; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 30px/1 var(--serif); letter-spacing: -.035em; }
.brand-subtitle { display: block; margin-top: 8px; font: 8px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .14em; }
.brand-mark { flex: 0 0 24px; height: 35px; position: relative; border-left: 2px solid var(--green); border-right: 2px solid var(--green); transform: skewY(-20deg); }
.brand-mark::before { content: ""; position: absolute; inset: 6px 7px; border-left: 2px solid var(--green); }
.brand-mark::after { content: ""; position: absolute; width: 6px; height: 6px; top: -3px; right: -4px; border-radius: 50%; background: var(--amber); }
.sidebar-caption { font: 22px/1.3 var(--serif); letter-spacing: -.02em; margin: 58px 0 32px; }
.main-nav { display: flex; flex-direction: column; gap: 3px; margin-left: -10px; margin-right: -10px; }
.main-nav a { display: flex; align-items: center; gap: 12px; min-height: 45px; padding: 10px; font-size: 12px; font-weight: 500; text-decoration: none; border-radius: 3px; }
.main-nav a:hover, .main-nav a[aria-current="location"] { background: #e0e5d9; color: var(--green); }
.nav-index { font: 10px var(--mono); color: var(--muted); }
.sidebar-note { margin-top: auto; padding-top: 32px; }
.environment-label { display: inline-block; color: var(--green); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding-bottom: 6px; border-bottom: 1px solid var(--green); }
.sidebar-note p { font-size: 11px; color: var(--muted); margin: 14px 0 8px; }
.workspace { min-width: 0; width: 100%; max-width: 1620px; margin: 0 auto; padding: 0 42px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 90px; border-bottom: 1px solid var(--line); }
.topbar > .eyebrow { color: var(--muted); }
.topbar-separator { margin: 0 10px; color: #8a8d7e; }
.session-tools { display: flex; align-items: center; gap: 15px; font-size: 11px; }
.session-user { color: var(--muted); max-width: 120px; overflow-wrap: anywhere; }
.connection-state { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; white-space: nowrap; }
.connection-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.connection-state[data-state="online"]::before { background: var(--green); }
.connection-state[data-state="error"]::before { background: var(--red); }
.overview { padding-top: 45px; }
.hero-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 275px); align-items: center; gap: 30px; }
.hero-heading h1 { margin-top: 20px; }
.hero-description { max-width: 500px; margin-top: 20px; color: var(--muted); font-size: 13px; }
.engine-card { align-self: stretch; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--line); padding-left: 26px; }
.engine-card > strong { display: block; margin-top: 12px; font: 30px/1.2 var(--serif); letter-spacing: -.02em; }
.engine-card > .muted { display: block; margin-top: 5px; font-size: 12px; overflow-wrap: anywhere; }
.cycle-list { margin-top: 20px; font-size: 10px; }
.cycle-list > div { margin-top: 8px; }
.cycle-list dt { color: var(--muted); }
.cycle-list dd { font-variant-numeric: tabular-nums; }
.control-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.control-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.button { min-height: 42px; padding: 10px 16px; border: 1px solid transparent; font-size: 12px; font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.button-primary { background: var(--green); color: #fffdf5; border-color: var(--green); }
.button-primary:not(:disabled):hover { background: #103e2d; border-color: #103e2d; }
.button-secondary { background: transparent; color: var(--ink); border-color: #b7bfae; }
.button-secondary:not(:disabled):hover { background: var(--surface-muted); border-color: var(--green); }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:not(:disabled):hover { color: var(--ink); background: var(--surface-muted); }
.button-danger-quiet { background: transparent; color: var(--red); border-color: #dfc7bb; }
.button-danger-quiet:not(:disabled):hover { background: var(--red-soft); border-color: var(--red); }
.button-danger { background: var(--red); color: #fff; border-color: var(--red); }
.button-danger:not(:disabled):hover { background: #81291e; }
.button-small { min-height: 36px; font-size: 11px; padding: 7px 12px; }
.control-help { margin: 9px 0 22px; }
.notice { padding: 15px 18px; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 3px; font-size: 12px; margin: 14px 0; overflow-wrap: anywhere; }
.notice p { margin-top: 4px; }
.notice ul { padding-left: 19px; margin: 7px 0 0; }
.notice-info { background: var(--green-soft); }
.notice-warning { border-color: #d9c69c; border-left-color: var(--amber); background: var(--amber-soft); color: #674d1c; }
.notice-error { border-color: #e2c1b6; border-left-color: var(--red); background: var(--red-soft); color: #852a20; }
.kill-switch-notice { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.kill-switch-notice .button { flex-shrink: 0; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 25px 0 22px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--surface); }
.metric-card { min-width: 0; padding: 22px 20px 18px; border-right: 1px solid var(--line); }
.metric-card:last-child { border-right: 0; }
.metric-primary { background: var(--green); color: #f8f6e9; }
.metric-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.metric-value { font: 30px/1.25 var(--serif); letter-spacing: -.035em; margin: 14px 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums lining-nums; }
.metric-foot { font-size: 10px; color: var(--muted); line-height: 1.6; }
.metric-primary .metric-label, .metric-primary .metric-foot { color: #d6e0cd; }
.metric-budget { background: #f0eddf; }
.metric-value[data-missing="true"] { font: 17px/1.6 var(--sans); letter-spacing: 0; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; margin-bottom: 20px; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; }
.panel-heading .eyebrow { margin-bottom: 6px; color: var(--muted); }
.panel-body { padding: 0 24px 25px; }
.panel-intro { padding: 0 24px 18px; color: var(--muted); font-size: 11px; }
.count-label { font: 10px/1.5 var(--mono); color: var(--muted); text-align: right; }
.chart-heading { padding-bottom: 12px; }
.chart-heading h2 { font-size: 29px; }
.chart-tools { display: flex; align-items: center; gap: 14px; }
.segmented-control { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 4px; }
.segment { min-height: 29px; padding: 4px 10px; border: 0; font-size: 10px; background: transparent; color: var(--muted); }
.segment[aria-pressed="true"] { color: var(--green); background: var(--green-soft); font-weight: 600; }
.segment:hover { background: var(--surface-muted); }
.chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; padding: 4px 24px 8px; font-size: 10px; color: var(--muted); }
.chart-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.legend-line { display: inline-block; width: 18px; height: 2px; }
.legend-net { background: var(--green); }
.legend-demo { height: 0; border-top: 2px dashed var(--amber); }
.chart-legend .chart-reference { margin-left: auto; }
.chart-reference strong { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-viewport { height: 300px; position: relative; margin: 4px 14px 0; }
#equityChart { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.chart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 230px; text-align: center; padding: 30px; background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 60px; }
.chart-empty strong { font: 24px/1.3 var(--serif); margin: 17px 0 8px; padding: 0 10px; background: var(--surface); }
.chart-empty p { max-width: 365px; font-size: 11px; color: var(--muted); background: var(--surface); padding: 3px 12px; }
.empty-mark { width: 22px; height: 22px; border: 1px solid #aab6a5; background: var(--surface); border-radius: 50%; box-shadow: 0 0 0 7px var(--surface); }
.chart-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 24px 16px; }
.chart-readout { min-height: 18px; font: 10px/1.6 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.chart-footer > .fine-print { font-size: 9px; flex-shrink: 0; }
.history-details { border-top: 1px solid var(--line); }
.history-details summary { padding: 11px 24px; font-size: 11px; color: var(--muted); cursor: pointer; }
.history-details summary:hover { background: var(--surface-muted); }
.freshness { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; color: var(--muted); font-size: 10px; margin-top: -5px; }
.page-section { margin-top: 58px; scroll-margin-top: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 23px; }
.section-heading .eyebrow { color: var(--muted); margin-bottom: 10px; }
.section-description { font-size: 11px; color: var(--muted); max-width: 280px; }
.portfolio-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 24px 22px; gap: 24px; }
.portfolio-facts dt { color: var(--muted); font-size: 10px; }
.portfolio-facts dd { font: 22px/1.5 var(--serif); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.table-scroll { max-width: 100%; overflow: auto; overscroll-behavior-x: contain; }
.table-scroll:focus-visible { outline-offset: -3px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; }
th { padding: 12px 18px; background: #f0f0e7; font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
td { padding: 14px 18px; border-bottom: 1px solid #e8e7dc; vertical-align: top; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:not(:has(.empty-cell)):hover { background: #f5f5ec; }
.empty-cell { padding: 32px 24px; color: var(--muted); text-align: center; white-space: normal; font-size: 12px; }
.wide-table { min-width: 1000px; }
.decision-table { min-width: 830px; }
.cell-wrap { min-width: 240px; max-width: 430px; white-space: normal; overflow-wrap: anywhere; }
.cell-id { max-width: 160px; white-space: normal; overflow-wrap: anywhere; }
.cell-secondary { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.cell-date { font-size: 10px; font-variant-numeric: tabular-nums; }
.mobile-table-hint { display: none; padding: 0 24px 10px; color: var(--muted); font-size: 10px; }
.tag { display: inline-block; border-radius: 3px; padding: 3px 7px; font-size: 9px; line-height: 1.6; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.tag-neutral { background: #eaece2; color: #4e5e50; }
.tag-positive { background: var(--green-soft); color: var(--green); }
.tag-warning { background: var(--amber-soft); color: #79551c; }
.tag-negative { background: var(--red-soft); color: var(--red); }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.two-column > .panel { margin-bottom: 0; }
.two-column + .panel { margin-top: 20px; }
.body-note { color: var(--muted); font-size: 11px; margin-bottom: 12px; }
.fee-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 24px 21px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fee-totals dt { font-size: 9px; color: var(--muted); }
.fee-totals dd { font: 18px/1.4 var(--serif); margin-top: 6px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#feesForm { margin-top: 25px; }
.fee-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field { min-width: 0; margin-bottom: 17px; }
.field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; }
.field-unit { font-weight: 400; color: var(--muted); }
.field input { display: block; width: 100%; min-height: 44px; padding: 10px 12px; background: #fffdf7; color: var(--ink); border: 1px solid #b9c1b2; font-variant-numeric: tabular-nums; }
.field input:focus { border-color: var(--green); }
.field input:disabled { background: #efeee5; color: var(--muted); }
.field .fine-print { margin-top: 7px; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 17px; }
.traceability-note { color: var(--muted); border-left: 2px solid var(--line); padding-left: 12px; font-size: 10px; margin-top: 22px; }
.real-budget-panel { background: #f1eee1; }
.budget-explainer { font: 24px/1.35 var(--serif); margin: 3px 0 27px; letter-spacing: -.02em; }
.budget-explainer strong { font-weight: 400; color: var(--amber); }
.budget-meter { margin-bottom: 23px; }
.budget-meter label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 10px; }
progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 4px; overflow: hidden; background: #dbdccb; accent-color: var(--green); }
progress::-webkit-progress-bar { background: #dbdccb; }
progress::-webkit-progress-value { background: var(--green); }
progress::-moz-progress-bar { background: var(--green); }
.budget-breakdown > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid #dcdccc; font-size: 12px; }
.budget-breakdown dt { color: var(--muted); }
.budget-breakdown dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; max-width: 55%; }
.budget-breakdown + .fine-print { margin-top: 20px; }
.key-value-list > div { display: grid; grid-template-columns: minmax(100px, .9fr) minmax(0, 1.1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid #e7e6db; font-size: 11px; }
.key-value-list > div:first-child { padding-top: 2px; }
.key-value-list > div:last-child { border-bottom: 0; }
.key-value-list dt { color: var(--muted); overflow-wrap: anywhere; }
.key-value-list dd { overflow-wrap: anywhere; }
.compact-list > div { padding: 8px 0; }
.guardrails-panel { background: var(--green); color: #f8f6e9; }
.guardrails-panel .panel-heading .eyebrow { color: #bfcebb; }
.guardrails-panel .fine-print { color: #d4decb; margin-top: 20px; }
.guard-mark { font: 65px/.7 var(--serif); color: #96ae8d; padding-right: 8px; }
.guardrail-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; border-bottom: 1px solid #3b6951; padding: 13px 0; }
.guardrail-list dt { font-size: 12px; color: #d3dfcb; }
.guardrail-list dd { font: 27px/1.3 var(--serif); font-variant-numeric: tabular-nums; text-align: right; }
.candidate-list, .memory-list, .event-list { list-style: none; margin: 0; padding: 0; }
.candidate-list > li, .memory-list > li { padding: 19px 24px; border-top: 1px solid #e7e6db; }
.candidate-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.candidate-heading strong { font: 11px var(--mono); overflow-wrap: anywhere; }
.candidate-heading time { margin-left: auto; color: var(--muted); font-size: 10px; }
.candidate-summary { font-size: 12px; max-width: 90ch; overflow-wrap: anywhere; }
.candidate-metrics { display: flex; flex-wrap: wrap; gap: 8px 25px; margin-top: 12px; }
.candidate-metrics > div { font-size: 10px; display: flex; gap: 9px; overflow-wrap: anywhere; min-width: 0; }
.candidate-metrics dt { color: var(--muted); }
.candidate-metrics dd { font-variant-numeric: tabular-nums; }
.memory-list > li { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.memory-list .key-value-list { max-width: 900px; }
.event-list > li { display: grid; grid-template-columns: 140px 65px minmax(0, 1fr); gap: 14px; padding: 14px 24px; border-top: 1px solid #e7e6db; align-items: baseline; font-size: 11px; }
.event-list time { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.event-list .tag { justify-self: start; }
.event-list p { overflow-wrap: anywhere; }
.list-empty, .event-list > li.list-empty { display: block; padding: 27px 24px; font-size: 12px; color: var(--muted); text-align: center; }
.page-footer { display: flex; justify-content: space-between; gap: 30px; padding: 28px 0 36px; margin-top: 45px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.footer-brand { flex-shrink: 0; }
.footer-brand > span { margin: 0 6px; }
.page-footer p { max-width: 550px; text-align: right; }
.confirmation-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100vh - 40px); border: 1px solid #a7b29f; border-radius: 6px; background: var(--surface); color: var(--ink); padding: 32px; box-shadow: 0 24px 100px #152d2840; }
.confirmation-dialog::backdrop { background: #152d2870; backdrop-filter: blur(3px); }
.confirmation-dialog h2 { margin: 12px 0 18px; }
.confirmation-dialog p:not(.eyebrow) { color: var(--muted); font-size: 13px; }
.confirmation-dialog .field { margin-top: 22px; }
.confirmation-dialog .field strong { font-family: var(--mono); font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* The login page is an editorial cover, not an invented market snapshot. */
.login-page { min-height: 100vh; display: flex; flex-direction: column; }
.login-header, .login-footer { width: min(1230px, calc(100% - 100px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.login-header { padding: 35px 0; border-bottom: 1px solid var(--line); }
.login-layout { width: min(1100px, calc(100% - 100px)); margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 425px); gap: 100px; align-items: center; padding: 55px 0; }
.login-intro { position: relative; }
.login-intro h1 { font-size: clamp(60px, 6.7vw, 96px); margin: 24px 0; }
.login-lead { max-width: 370px; color: var(--muted); font-size: 13px; }
.login-principles { margin-top: 35px; max-width: 395px; }
.login-principles > div { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 15px; padding: 12px 0; border-top: 1px solid var(--line); }
.login-principles dt { font-size: 11px; font-weight: 600; }
.login-principles dt span { font: 9px var(--mono); color: var(--amber); margin-right: 10px; }
.login-principles dd { font-size: 10px; color: var(--muted); }
.login-card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--green); padding: 35px; border-radius: 5px; box-shadow: 0 16px 60px #223a2c08; }
.login-card-heading h2 { font-size: 34px; margin: 11px 0 13px; }
.login-card-heading > p:last-child { font-size: 12px; color: var(--muted); }
.login-status { font-size: 11px; color: var(--muted); min-height: 18px; margin: 20px 0; }
.login-card .field { margin-bottom: 21px; }
.login-card .field input { min-height: 46px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.text-button { font-size: 11px; color: var(--green); background: transparent; border: 0; min-height: 30px; padding: 2px 4px; text-decoration: underline; text-underline-offset: 3px; }
.totp-input { letter-spacing: .4em; font-family: var(--mono); font-size: 20px; }
.login-submit { display: flex; justify-content: space-between; width: 100%; align-items: center; margin-top: 8px; min-height: 48px; }
.login-submit span { font-size: 19px; line-height: 1; margin-left: 8px; }
.login-security { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 26px; color: var(--muted); font-size: 10px; }
.login-footer { padding: 22px 0; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }

@media (min-width: 1650px) {
  .workspace { padding-left: 55px; padding-right: 55px; }
  .hero-heading { grid-template-columns: minmax(0, 1fr) 320px; }
  .chart-viewport { height: 350px; }
}
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding: 30px 20px 22px; }
  .brand { font-size: 27px; gap: 10px; }
  .brand-subtitle { font-size: 7px; }
  .workspace { padding: 0 28px; }
  .metric-card { padding: 18px 14px; }
  .metric-value { font-size: 25px; }
  .metric-label { font-size: 9px; }
  .hero-heading { grid-template-columns: minmax(0, 1fr) 220px; }
  .chart-heading { align-items: flex-start; }
  .chart-tools { flex-direction: column; align-items: flex-end; gap: 8px; }
  .section-description { max-width: 230px; }
  .costs-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .costs-grid .panel-heading { align-items: flex-start; flex-wrap: wrap; gap: 9px; }
  .fee-totals { gap: 8px; }
  .fee-totals dd { font-size: 16px; }
  .key-value-list > div { grid-template-columns: minmax(90px, .9fr) minmax(0, 1.1fr); gap: 10px; }
  .login-layout { gap: 60px; }
}
@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 22px 28px 0; display: grid; grid-template-columns: 1fr auto; gap: 22px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-caption, .sidebar-note { display: none; }
  .main-nav { grid-column: 1 / -1; flex-direction: row; gap: 0; margin: 0 -8px; overflow-x: auto; }
  .main-nav a { gap: 7px; padding: 13px 12px; min-height: 44px; white-space: nowrap; border-radius: 3px 3px 0 0; }
  .brand-subtitle { font-size: 8px; }
  .topbar { min-height: 72px; }
  .overview { padding-top: 30px; }
  h1 { font-size: 57px; }
  .metric-value { font-size: 28px; }
  .costs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-layout { gap: 40px; width: calc(100% - 64px); }
  .login-header, .login-footer { width: calc(100% - 64px); }
  .login-card { padding: 28px; }
}
@media (max-width: 760px) {
  .workspace { padding: 0 20px; }
  .sidebar { padding: 21px 20px 0; }
  .topbar > .eyebrow { display: none; }
  .topbar { min-height: 62px; justify-content: flex-end; }
  .session-tools { justify-content: space-between; width: 100%; gap: 10px; }
  .session-user { margin-left: auto; }
  .hero-heading { grid-template-columns: minmax(0, 1fr) 185px; gap: 20px; }
  h1 { font-size: 45px; }
  .hero-heading > div > .eyebrow { font-size: 9px; letter-spacing: .1em; }
  .engine-card { padding-left: 20px; }
  .engine-card > strong { font-size: 25px; }
  .hero-description { font-size: 12px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { padding: 20px; }
  .metric-card:nth-child(2) { border-right: 0; }
  .metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric-value { font-size: 32px; margin: 12px 0; }
  .metric-label { font-size: 10px; }
  .two-column, .costs-grid { grid-template-columns: minmax(0, 1fr); }
  .two-column { gap: 18px; }
  .panel-heading { padding: 20px; }
  .panel-body { padding: 0 20px 22px; }
  .fee-totals { margin-left: 20px; margin-right: 20px; }
  .fee-totals dd { font-size: 23px; }
  .costs-grid .panel-heading { flex-wrap: nowrap; }
  .section-heading { gap: 18px; }
  .section-description { max-width: 190px; font-size: 10px; }
  .page-section { margin-top: 45px; }
  .chart-heading h2 { font-size: 26px; }
  .chart-tools { gap: 6px; }
  .chart-legend { padding-left: 20px; padding-right: 20px; gap: 10px 18px; }
  .chart-legend .chart-reference { flex-basis: 100%; margin-left: 0; }
  .chart-viewport { height: 270px; margin: 6px 4px 0; }
  .chart-footer { align-items: flex-start; padding: 7px 20px 15px; flex-direction: column; gap: 5px; }
  .freshness { font-size: 9px; }
  .portfolio-facts { padding: 0 20px 20px; gap: 15px; }
  .portfolio-facts dd { font-size: 19px; }
  .mobile-table-hint { display: block; padding-left: 20px; }
  th:first-child, td:first-child { padding-left: 20px; }
  .panel-intro { padding-left: 20px; padding-right: 20px; }
  .candidate-list > li, .memory-list > li { padding: 18px 20px; }
  .event-list > li { grid-template-columns: 135px 1fr; padding: 14px 20px; gap: 6px 14px; }
  .event-list p { grid-column: 1 / -1; }
  .page-footer { flex-direction: column; gap: 12px; padding-bottom: 25px; }
  .page-footer p { text-align: left; }
  .login-layout { grid-template-columns: 1fr; width: min(460px, calc(100% - 40px)); padding: 40px 0; gap: 32px; }
  .login-header, .login-footer { width: calc(100% - 40px); }
  .login-intro h1 { font-size: 58px; line-height: 1.05; margin: 17px 0; }
  .login-intro h1 br { display: none; }
  .login-intro h1 em { display: block; }
  .login-intro h1 { max-width: 390px; }
  .login-principles { display: none; }
  .login-lead { font-size: 12px; }
  .login-header { padding: 25px 0; }
  .login-card { padding: 28px; }
  .login-footer { flex-wrap: wrap; gap: 6px; font-size: 9px; }
}
@media (max-width: 480px) {
  .workspace { padding: 0 15px; }
  .sidebar { padding: 21px 15px 0; gap: 18px; }
  .main-nav a { font-size: 11px; padding: 12px 9px; }
  .nav-index { font-size: 9px; }
  .hero-heading { grid-template-columns: 1fr; gap: 25px; }
  .hero-heading h1 { font-size: 48px; }
  .hero-description { max-width: 300px; }
  .engine-card { padding: 16px 0; border-left: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
  .engine-card > .eyebrow { grid-column: 1; font-size: 9px; }
  .engine-card > strong { grid-column: 1; margin-top: 3px; font-size: 25px; }
  .engine-card > .muted { grid-column: 1; font-size: 11px; margin-top: 0; }
  .cycle-list { grid-column: 2; grid-row: 1 / 4; margin-top: 0; align-self: center; font-size: 9px; }
  .cycle-list > div:first-child { margin-top: 0; }
  .control-bar { margin-top: 18px; align-items: flex-start; gap: 5px; }
  .control-buttons { gap: 7px; }
  .control-buttons .button { font-size: 11px; padding: 10px 12px; }
  .control-bar > .button { padding: 10px 3px; font-size: 10px; }
  .control-help { font-size: 10px; }
  .kill-switch-notice { align-items: flex-start; flex-direction: column; gap: 13px; }
  .metric-card { padding: 18px 13px; }
  .metric-label { font-size: 8px; letter-spacing: .04em; }
  .metric-value { font-size: 27px; }
  .metric-foot { font-size: 9px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .section-heading h2 { font-size: 28px; }
  .section-description { max-width: 300px; font-size: 11px; }
  .panel-heading { gap: 12px; padding: 19px 17px; }
  .panel-body { padding: 0 17px 22px; }
  .chart-heading { flex-direction: column; gap: 17px; }
  .chart-tools { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; }
  .chart-legend { font-size: 9px; padding-left: 17px; padding-right: 17px; }
  .chart-reference strong { font-size: 10px; }
  .chart-viewport { height: 245px; }
  .chart-empty { padding: 20px; min-height: 230px; }
  .chart-empty strong { font-size: 21px; }
  .chart-footer { padding-left: 17px; padding-right: 17px; }
  .history-details summary { padding-left: 17px; padding-right: 17px; font-size: 10px; }
  .history-details summary .fine-print { display: block; font-size: 9px; padding-left: 11px; }
  .portfolio-facts { gap: 12px; padding-left: 17px; padding-right: 17px; }
  .portfolio-facts dt { font-size: 9px; }
  .portfolio-facts dd { font-size: 17px; }
  .fee-totals { margin-left: 17px; margin-right: 17px; }
  .fee-totals dd { font-size: 18px; }
  .fee-totals dt { font-size: 9px; }
  .fee-inputs { gap: 8px; }
  .field label { font-size: 11px; }
  .fee-inputs input { padding: 9px; }
  .form-footer .button { width: 100%; }
  .costs-grid .panel-heading { flex-wrap: wrap; }
  .budget-explainer { font-size: 25px; }
  .key-value-list > div { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .guardrail-list dd { font-size: 25px; }
  .candidate-heading time { margin-left: 0; width: 100%; }
  .confirmation-dialog { padding: 25px; }
  .dialog-actions .button { flex: 1 1 auto; }
  .login-header .environment-label { font-size: 8px; }
  .login-header .brand { font-size: 26px; }
  .login-header .brand-subtitle { font-size: 7px; }
  .login-intro h1 { font-size: 51px; }
  .login-card { padding: 26px 22px; }
  .login-card-heading h2 { font-size: 32px; }
  .login-status { margin: 18px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .metric-primary, .guardrails-panel { border: 1px solid CanvasText; }
  .tag, .button, .segment[aria-pressed="true"] { border: 1px solid ButtonText; }
  .brand-mark, .brand-mark::before { border-color: CanvasText; }
}
