:root {
  color-scheme: light;
  --background: #edf2ee;
  --surface: #fff;
  --ink: #1a2d26;
  --muted: #4d6258;
  --line: #d6e2da;
  --brand: #123e33;
  --accent: #116448;
  --accent-hover: #0b513a;
  --pale: #e9f4ed;
  --warm: #fff4df;
  --warm-text: #784b08;
  --danger: #f9e9e6;
  --danger-text: #873021;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--background);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 290px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
a { color: var(--accent); text-underline-offset: .18em; }
p, dl, dd, figure { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.24; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible { outline: 3px solid #278c69; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 10; left: 1rem; top: 1rem; background: white; padding: .75rem; border-radius: .4rem; }

.topbar { background: var(--brand); color: white; }
.header-inner, .shell { max-width: 1254px; margin: 0 auto; padding-inline: clamp(1rem, 4vw, 2.625rem); }
.header-inner { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.brand img { display: block; flex: 0 0 auto; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 1.07rem; font-weight: 800; line-height: 1.18; letter-spacing: .09em; white-space: nowrap; }
.brand span { color: #c4ddd2; font-size: .79rem; line-height: 1.14; margin-top: .16rem; }
.header-links { display: flex; align-items: center; justify-content: end; gap: .5rem; flex-wrap: wrap; }
.header-links button { border: 1px solid transparent; background: transparent; color: #eff9f3; padding: .46rem .68rem; border-radius: .44rem; font-size: .91rem; }
.header-links button:hover { background: #1d5143; }
.header-links button[aria-current="page"] { background: #d7eee2; color: var(--brand); border-color: #d7eee2; font-weight: 740; }
.header-links button:focus-visible { outline-color: #e4f7eb; }
.shell { padding-block: 1.85rem 0; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; padding: .15rem 0 1.4rem; }
.overline, .kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .065em; font-size: .76rem; font-weight: 760; }
.overline span { color: var(--muted); display: inline-block; margin-left: .6rem; border-left: 1px solid #afc2b7; padding-left: .72rem; }
h1 { color: var(--brand); font: 500 clamp(2.15rem, 4.5vw, 3rem)/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.045em; margin: .36rem 0 .5rem; }
.hero p { color: var(--muted); max-width: 700px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: end; gap: .65rem; flex-shrink: 0; padding-bottom: .15rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .24rem; align-items: stretch; border-bottom: 1px solid #a9c0b2; margin-bottom: 1.2rem; }
.tabs button { min-width: 0; border: 0; background: transparent; color: var(--muted); font-size: .94rem; font-weight: 650;
  border-bottom: 3px solid transparent; display: flex; gap: .43rem; align-items: center; padding: .8rem .95rem .66rem;
  text-align: start; overflow-wrap: anywhere; }
.tabs button:hover { color: var(--accent); background: #e1ebe4; }
.tabs button[aria-current] { color: var(--accent); border-bottom-color: var(--accent); background: #e5eee8; }
.tabs svg, .button svg, .side-foot svg { width: 1.13em; height: 1.13em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 302px); gap: 1.2rem; align-items: start; }
.screen { display: grid; gap: 1.15rem; min-width: 0; }
.summary { position: sticky; top: 1rem; display: grid; gap: .75rem; min-width: 0; }
.panel, .side-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: .74rem; }
.panel { padding: clamp(.95rem, 2.25vw, 1.55rem); }
.panel-heading { display: flex; gap: .8rem; align-items: start; justify-content: space-between; margin-bottom: 1.15rem; }
.panel-heading h2 { font-weight: 730; font-size: 1.23rem; letter-spacing: -.014em; }
.panel-heading p { color: var(--muted); margin-top: .27rem; font-size: .94rem; }
.panel-heading .button { flex-shrink: 0; }
.side-card { padding: 1.08rem; }
.side-card h2 { font-size: 1.05rem; letter-spacing: -.012em; }
.side-facts { padding: .85rem 0 .26rem; }
.side-facts > div { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .53rem; }
.side-facts dt, .side-foot { font-size: .89rem; color: var(--muted); }
.side-facts dd { font-size: .9rem; font-weight: 730; }
.route-chips { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.route-chips > span, .record-code { display: inline-flex; align-items: center; justify-content: center; color: var(--accent); background: var(--pale);
  border-radius: .28rem; padding: .16rem .34rem; font-size: .81rem; font-weight: 730; letter-spacing: .02em; white-space: nowrap; }
.side-next { border: 1px solid #e8d6ac; border-radius: .42rem; background: #fffaed; padding: .73rem; margin: .44rem 0 .85rem; }
.side-next .kicker { color: var(--warm-text); }
.side-next strong, .side-priority strong { display: block; margin-top: .15rem; }
.side-next p, .side-priority p { color: var(--muted); font-size: .89rem; margin: .28rem 0 .3rem; overflow-wrap: anywhere; }
.side-priority { padding-top: .66rem; border-top: 1px solid var(--line); }
.side-score { display: flex; align-items: center; gap: .52rem; margin: .37rem 0 .2rem; }
.side-score strong { font-size: 1.38rem; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.side-score small { font-size: .84rem; color: var(--muted); font-weight: 600; }
.side-foot { display: flex; align-items: center; gap: .5rem; padding: 0 .23rem; }
.footer { display: flex; align-items: start; justify-content: space-between; gap: .75rem 1.25rem; margin-top: 1.45rem; padding: 1.12rem 0 1.3rem;
  color: var(--muted); font-size: .89rem; border-top: 1px solid var(--line); }
.site-footer { max-width: 1170px; margin-inline: clamp(1rem, 4vw, 2.625rem); padding-bottom: 5rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .36rem 1.15rem; }
.site-footer a { font-weight: 600; }
@media (min-width: 1254px) { .site-footer { margin-inline: auto; } }
.evaluation-case { margin-top: .55rem; font-weight: 650; }
.evaluation-inputs > div, .method-map > div { display: grid; grid-template-columns: minmax(140px, .85fr) minmax(0, 1fr);
  align-items: baseline; gap: .33rem .85rem; padding: .59rem 0; border-top: 1px solid var(--line); }
.evaluation-inputs > div:first-child, .method-map > div:first-child { border-top: 0; }
.evaluation-inputs dt, .method-map dt { font-weight: 660; }
.evaluation-inputs dd, .method-map dd { color: var(--muted); overflow-wrap: anywhere; }
.method-map > div { grid-template-columns: minmax(75px, .25fr) minmax(0, 1fr); }
#method-sources { scroll-margin-top: 1rem; }
.preference-reason { margin-top: .92rem; }

.button { min-height: 40px; border: 1px solid var(--line); border-radius: .42rem; background: white; color: var(--brand);
  padding: .45rem .74rem; display: inline-flex; gap: .36rem; justify-content: center; align-items: center; font-size: .9rem; font-weight: 680; text-align: center; }
.button:hover:not(:disabled) { background: var(--pale); border-color: #a6c6b4; }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.text-button { padding: .28rem 0; min-height: 30px; border-color: transparent; color: var(--accent); background: transparent; text-align: left; }
.button.text-button:hover { border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: .2em; }
.button.icon-button { width: 2.35rem; min-height: 2.35rem; padding: .3rem; }
.actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1.05rem; }
.actions.small { margin-top: .45rem; }
.badge-group { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.badge { display: inline-flex; gap: .25rem; align-items: center; width: fit-content; padding: .14rem .47rem;
  border-radius: .34rem; font-size: .79rem; font-weight: 710; background: #e9efeb; color: #385247; white-space: normal; }
.badge.eligible { background: var(--pale); color: #155b41; }
.badge.pending { background: var(--warm); color: var(--warm-text); }
.badge.excluded { background: var(--danger); color: var(--danger-text); }
.tile { flex-shrink: 0; display: inline-grid; place-items: center; min-width: 2rem; min-height: 2rem; border-radius: .41rem; background: #dceee4;
  padding: .05rem .26rem; color: var(--brand); font-weight: 800; font-size: .96rem; line-height: 1; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .82rem 1rem; align-items: start; }
.field { display: grid; min-width: 0; gap: .31rem; }
.field.full { grid-column: 1 / -1; }
.field > span, .inline-select > span, fieldset legend { font-weight: 660; font-size: .92rem; line-height: 1.4; }
.field small, legend small { font-weight: 620; margin-left: .36rem; color: var(--muted); font-size: .76rem; }
.field .scale { font-size: .75rem; color: var(--muted); font-weight: 550; margin-left: 0; }
input:not([type=checkbox], [type=range], [type=hidden]), select, textarea {
  width: 100%; font-size: .96rem; color: var(--ink); background: #fff; border: 1px solid #b9cbbf;
  border-radius: .34rem; min-height: 2.53rem; padding: .41rem .58rem;
}
input::placeholder, textarea::placeholder { color: #586d62; }
textarea { resize: vertical; min-height: 3.35rem; }
select { appearance: none; padding-right: 1.8rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23385549' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .57rem center; }
input[type=checkbox], input[type=range] { accent-color: var(--accent); }
.need-list { padding: 0; margin: 0 0 .9rem; border: 0; min-width: 0; }
.need-list legend { margin-bottom: .32rem; }
.choices { display: flex; flex-wrap: wrap; gap: .38rem .65rem; }
.choice { display: inline-flex; align-items: center; gap: .34rem; padding: .26rem .45rem; border: 1px solid var(--line); border-radius: .38rem; font-size: .89rem; }
.choice:has(:checked) { background: var(--pale); border-color: #b0cdbc; }
.choice input { margin: .06rem; width: 1.03rem; height: 1.03rem; flex: 0 0 auto; }
.expand { border-top: 1px solid var(--line); margin-top: .85rem; padding-top: .65rem; }
.expand summary, .sources summary { cursor: pointer; font-weight: 670; color: var(--accent); font-size: .92rem; }
.expand[open] summary { margin-bottom: .64rem; }
.expand > p { color: var(--muted); }
.expand #risk-fields, .expand #support-choices { margin-top: .7rem; }
.muted, .empty { color: var(--muted); font-size: .94rem; }
.grow { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.ref { color: var(--muted); font-size: .78rem; }
.evidence-row, .archive-row, .route-row, .support-row { display: flex; gap: .66rem; align-items: start; border-top: 1px solid var(--line); padding: .65rem 0; }
.evidence-row:first-child, .archive-row:first-child, .route-row:first-child, .support-row:first-child { border-top: 0; }
.evidence-row small { display: block; font-size: .81rem; color: var(--muted); }
.evidence-row .button, .archive-row .button { flex-shrink: 0; }
.route-row .ref { margin-left: auto; text-align: right; min-width: 65px; }
.route-row p, .archive-row p, .support-row p, .alt-card p { font-size: .91rem; color: var(--muted); overflow-wrap: anywhere; }
.support-row { align-items: center; flex-wrap: wrap; }
.support-row h3 { font-size: 1rem; margin-block: .15rem .1rem; }
.support-row .badge-group { margin-top: .38rem; }
.alt-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 200px),1fr)); gap: .65rem; }
.alt-card { padding: .75rem; border: 1px solid var(--line); border-radius: .49rem; min-width: 0; }
.alt-top { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.alt-card h3 { font-size: 1rem; margin-block: .58rem .26rem; overflow-wrap: anywhere; }
.alt-card .button { margin-top: .3rem; }
.reasons { padding-left: 1.05rem; margin: .3rem 0 0; color: var(--muted); font-size: .88rem; }
.reasons li + li { margin-top: .28rem; }

.callout { padding: .68rem .8rem; margin-bottom: .75rem; border: 1px solid #bdd8c9; border-radius: .4rem; background: var(--pale); }
.callout.warn { color: var(--warm-text); border-color: #e5c78e; background: var(--warm); }
.callout p, .callout ul { margin: .24rem 0 0; font-size: .94rem; }
.callout ul { padding-left: 1.25rem; }
.result-lead { display: flex; gap: .9rem; align-items: center; justify-content: space-between; padding: .85rem; background: var(--pale); border: 1px solid #c9e1d3; border-radius: .53rem; }
.result-lead h3 { display: flex; gap: .46rem; align-items: center; font-size: 1.06rem; margin-top: .3rem; }
.big-score { font: 600 clamp(1.65rem, 4vw, 2.25rem)/1 Georgia, serif; color: var(--brand); white-space: nowrap; }
.big-score small { font: 600 .85rem/1.1 "Segoe UI", sans-serif; color: var(--muted); }
.not-ranked { margin-top: .63rem; border: 1px solid var(--line); border-radius: .44rem; background: #f9fbfa; padding: .59rem .67rem; overflow-wrap: anywhere; }
.not-ranked .badge { margin-left: .45rem; }
.not-ranked p { color: var(--muted); font-size: .88rem; }
.inline-select { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: .62rem; align-items: center; width: min(100%, 510px); margin-bottom: .8rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: .53rem .62rem; border-bottom: 1px solid var(--line); }
thead, tfoot { background: #eef4f0; }
th:not(:first-child), td:not(:first-child) { text-align: right; white-space: nowrap; }
.weight-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(115px,1fr)); gap: .65rem; }
.slider-label { font-weight: 660; display: flex; justify-content: space-between; align-items: center; color: var(--brand); }
.slider-label output { font-size: 1.2rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.sens-controls input[type=range] { width: 100%; margin: .45rem 0 .1rem; }
.slider-footer { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.sensitivity-result { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .55rem; border: 1px solid #c4ddce;
  border-radius: .48rem; background: var(--pale); padding: .66rem .76rem; margin: .7rem 0; }
.sensitivity-result strong { display: block; font-size: 1.3rem; color: var(--brand); }
.sensitivity-result p { font-size: .87rem; color: var(--muted); }
.sensitivity-score { border: 1px solid #b7d2c2; color: var(--brand); background: #fff; border-radius: .33rem;
  padding: .29rem .37rem; font-size: .89rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trend figcaption { font-size: .85rem; font-weight: 650; color: var(--muted); }
.trend svg { width: 100%; height: auto; max-height: 195px; display: block; }
.trend svg text { font: 13px "Segoe UI", sans-serif; fill: var(--muted); }
.chart-legend { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; font-size: .88rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: .28rem; }
.chart-legend i { width: 1.05rem; height: .16rem; display: block; }

.assistant-mode { display: flex; align-items: center; gap: .62rem; flex-wrap: wrap; margin-bottom: .73rem; }
.messages { background: #f2f6f3; border: 1px solid var(--line); border-radius: .53rem; display: grid; gap: .62rem; padding: .74rem;
  max-height: clamp(300px, 51vh, 520px); overflow: auto; }
.message { border-radius: .46rem; min-width: 0; padding: .6rem .71rem; overflow-wrap: anywhere; }
.message.bot { margin-right: min(4%, 24px); background: white; border: 1px solid var(--line); }
.message.person { margin-left: min(15%, 100px); background: #dfefe5; }
.message-label { display: block; font-size: .79rem; font-weight: 750; color: var(--accent); margin-bottom: .15rem; }
.message p { white-space: pre-wrap; }
.message .sources { margin-top: .5rem; }
.source-row { display: grid; gap: .14rem; border-top: 1px solid var(--line); padding: .48rem 0 .28rem; }
.source-row strong { font-size: .92rem; }
.source-row small { font-size: .81rem; color: var(--muted); }
.source-row p { color: var(--muted); font-size: .91rem; }
.generation, .draft-fields { padding: .45rem .55rem; margin-top: .5rem; border-radius: .35rem; background: var(--pale); font-size: .91rem; }
.draft-fields .button { margin-top: .4rem; }
.suggestions { display: flex; flex-wrap: wrap; gap: .35rem; margin: .72rem 0; }
.button.suggestion { min-height: 35px; font-weight: 580; font-size: .85rem; padding: .3rem .51rem; }
.composer { display: flex; gap: .5rem; align-items: center; }
.composer input { flex: 1; }

dialog { border: 1px solid #aac2b3; border-radius: .76rem; width: min(94vw, 630px); max-height: 89dvh; color: var(--ink); padding: 0; }
dialog.wide { width: min(94vw, 870px); }
dialog::backdrop { background: #0c251fc0; }
.modal-header { padding: .88rem 1rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between;
  align-items: start; gap: .78rem; background: #f5f9f6; }
.modal-header h2 { font-size: 1.23rem; }
.modal-header p { color: var(--muted); font-size: .92rem; }
.modal-body { padding: .96rem; }
.modal-body > p, .modal-body > h3:not(:first-child) { margin-top: .75rem; }
.modal-body > .expand:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.modal-actions { padding-top: .56rem; border-top: 1px solid var(--line); }
.picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-block: .05rem .55rem; }
.case-picker { display: grid; gap: .16rem; border: 1px solid var(--line); border-radius: .45rem; padding: .57rem .66rem;
  text-align: left; color: var(--ink); background: white; }
.case-picker:hover { background: var(--pale); border-color: #abcbb9; }
.case-picker span:not(.kicker) { color: var(--muted); font-size: .89rem; }
.scenario-grid .case-picker { align-content: start; padding: .76rem .86rem; gap: .29rem; }
.scenario-grid .case-picker strong { line-height: 1.28; color: var(--brand); }
.scenario-grid .case-picker .case-subtitle { color: var(--accent); font-weight: 700; }
.scenario-grid .case-description { line-height: 1.42; }
.scenario-grid .case-picker[data-id="blank"] { grid-column: 1 / -1; }
@media (min-width: 850px) { .picker-grid.scenario-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.allied-case { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: .8rem; align-items: stretch; }
.allied-case > .case-picker { align-content: start; gap: .5rem; padding: .92rem; background: #eef7f1; border-color: #a5c8b7; }
.allied-case > .case-picker:hover { background: #e1f1e7; border-color: #629b84; }
.allied-case > .case-picker strong { font-size: clamp(1.12rem, 2.15vw, 1.42rem); color: var(--brand); line-height: 1.26; }
.allied-case .case-picker .case-subtitle { color: var(--accent); font-weight: 700; }
.exercise-reference { display: grid; gap: .68rem; min-width: 0; border: 1px solid var(--line); border-radius: .45rem;
  padding: .76rem .84rem; background: #f6faf7; overflow-wrap: anywhere; }
.exercise-reference h3 { font-size: .91rem; color: var(--brand); margin-bottom: .17rem; }
.exercise-reference p, .exercise-reference a { font-size: .84rem; }
.exercise-reference a { display: inline-block; margin-top: .24rem; }
.case-reference-detail { margin: 0 0 .95rem; }
.case-reference-detail > summary { color: var(--accent); font-weight: 650; cursor: pointer; margin-bottom: .5rem; }
.report-content .exercise-reference { margin-bottom: .75rem; }
.case-focus { border-left: 3px solid #94bea9; padding: .62rem .76rem; margin: 0 0 .85rem; background: #f2f8f4; }
.case-focus h3 { font-size: .96rem; color: var(--brand); margin-bottom: .23rem; }
.case-focus p + p { margin-top: .32rem; }
.scenario-grid .case-picker[data-action="documentary-case"] { background: #f5f8f7; }
.scenario-grid .case-picker[data-action="documentary-case"]:hover { background: var(--pale); }
.route-update { border-top: 1px solid var(--line); padding-top: .72rem; margin-top: .74rem; }
.route-update p { margin: .22rem 0 .62rem; color: var(--muted); }
@media (max-width: 650px) { .allied-case { grid-template-columns: minmax(0, 1fr); } }
.saved-cases { margin-bottom: .84rem; }
.saved-cases .picker-grid { margin-top: .64rem; }
.entry-note { color: var(--muted); font-size: .9rem; margin: .82rem 0 0; }
.entry-actions { margin-top: 0; }
.command-hero .case-context { color: var(--accent); font-weight: 700; margin-bottom: .3rem; }
.tabs .case-step { color: var(--brand); border-bottom-color: var(--line); background: #f3f8f4; }
.tabs .case-step:hover { background: var(--pale); }
.repeat-row { background: #f4f8f5; border: 1px solid var(--line); border-radius: .46rem; padding: .69rem; margin-bottom: .6rem; }
.repeat-row .button { margin-top: .32rem; }
.notice-block { background: var(--pale); padding: .75rem; border-radius: .43rem; margin-bottom: .55rem; }
.proposal-row { display: grid; grid-template-columns: minmax(135px,.5fr) minmax(0,1fr); align-items: center; gap: .7rem; margin-bottom: .52rem; }
#notice { opacity: 0; pointer-events: none; transition: opacity .15s; position: fixed; z-index: 8; right: 1rem; bottom: 1rem;
  width: min(90vw, 410px); background: var(--brand); color: #fff; border-radius: .5rem; padding: .71rem .88rem; box-shadow: 0 5px 18px #123e3330; }
#notice.shown { opacity: 1; }
#modal-notice { display: none; }
#modal-notice.shown { display: block; margin-bottom: .7rem; border: 1px solid #e5c78e; border-radius: .4rem; padding: .55rem .68rem; background: var(--warm); color: var(--warm-text); }

@media (max-width: 1040px) {
  .hero-actions { max-width: 210px; }
  .workspace { grid-template-columns: minmax(0,1fr) minmax(237px, 268px); gap: .85rem; }
  .tabs button { padding-inline: .73rem; }
}
@media (max-width: 790px) {
  .shell { padding-top: 1.15rem; }
  .hero { align-items: start; flex-direction: column; gap: .68rem; padding-bottom: .75rem; }
  .hero-actions { max-width: none; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .summary { position: static; }
  .side-card { padding: .8rem .9rem; }
}
@media (max-width: 490px) {
  .header-inner { gap: .45rem; flex-wrap: wrap; padding-block: .5rem; }
  .brand img { width: 34px; height: 34px; }
  .brand strong { font-size: .86rem; }
  .brand span { font-size: .72rem; }
  .header-links { flex: 1 1 100%; justify-content: start; gap: .38rem; }
  .header-links button { padding-inline: .48rem; font-size: .86rem; }
  .form-grid, .picker-grid, .proposal-row { grid-template-columns: minmax(0,1fr); }
  .panel-heading { gap: .37rem; }
  .result-lead, .evidence-row { flex-wrap: wrap; }
  .inline-select { grid-template-columns: minmax(0,1fr); gap: .2rem; }
  .evaluation-inputs > div, .method-map > div { grid-template-columns: minmax(0,1fr); }
  .footer { flex-direction: column; gap: .45rem; }
  .composer { align-items: stretch; }
}
.details-help { position: relative; }
.details-help > .expand > summary { padding-right: 2.35rem; }
.button.info-button { width: 1.68rem; min-height: 1.68rem; height: 1.68rem; padding: 0; border-radius: 50%; display: inline-grid;
  place-items: center; font: 700 .95rem/1 Georgia, serif; border-color: #b3cdbf; background: var(--pale); color: var(--accent); }
.details-help > .info-button { position: absolute; top: .68rem; right: .1rem; }
.guided-field { position: relative; min-width: 0; }
.guided-field.full { grid-column: 1 / -1; }
.guided-field > label > span { padding-right: 2.02rem; min-height: 1.55rem; }
.guided-field > .info-button { position: absolute; inset: 0 0 auto auto; }
.evidence-status { color: var(--muted); margin-bottom: .72rem; }
.next-step { margin-top: 0; justify-content: end; }
.intro-steps { display: grid; gap: .77rem; margin: 0; padding: 0 0 0 1.3rem; }
.intro-steps li { padding-left: .25rem; }
.intro-steps li::marker { color: var(--accent); font-weight: 750; }
.intro-steps strong { color: var(--brand); }
.actor-cell { display: flex; gap: .58rem; align-items: start; }
.actor-cell small, .cell-note { display: block; color: var(--muted); font-size: .78rem; font-weight: 550; margin-top: .2rem; }
.actor-cell small { margin-top: 0; }
.actor-cell strong { font-size: .85rem; }
.role-mark { display: inline-grid; flex: 0 0 1.95rem; width: 1.95rem; height: 1.95rem; place-items: center;
  color: #125b43; background: #e4f1e9; border: 1px solid #bddecd; border-radius: .42rem; }
.role-mark.support { background: #e8eef8; border-color: #c7d6ed; color: #294a84; }
.role-mark.permission { background: #eeeaf7; border-color: #dcd1ee; color: #54427f; }
.role-mark.risk { background: #fff3de; border-color: #efdbb3; color: #80500a; }
.role-mark svg { width: 1.02rem; height: 1.02rem; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; }
.table-wrap[tabindex]:focus-visible { outline: 3px solid #278c69; outline-offset: 3px; }
.coordination-matrix, .effects-matrix { min-width: 565px; }
.decision-matrix { min-width: 700px; font-variant-numeric: tabular-nums; }
.decision-layout { margin-top: 1rem; }
.decision-layout h3 { font-size: 1.03rem; margin-bottom: .45rem; }
.decision-matrix th, .decision-matrix td { padding: .5rem .38rem; font-size: .86rem; }
.coordination-matrix th, .coordination-matrix td, .effects-matrix th, .effects-matrix td, .annex-matrix th, .annex-matrix td {
  text-align: left; white-space: normal; overflow-wrap: anywhere; }
.decision-matrix th:not(:first-child) { white-space: normal; }
.decision-matrix td { white-space: nowrap; }
.decision-matrix th:first-child > strong { display: block; margin-bottom: .32rem; }
.decision-matrix th:first-child { min-width: 145px; }
.coordination-matrix tbody th { width: 29%; }
.effects-matrix tbody th { width: 27%; }
.coordination-matrix tbody th, .decision-matrix tbody th, .effects-matrix tbody th, .annex-matrix tbody th { font-weight: 660; }
.coordination-matrix td, .coordination-matrix th, .decision-matrix td, .decision-matrix th, .effects-matrix td, .effects-matrix th { vertical-align: top; }
.matrix-workspace { grid-template-columns: minmax(0, 1fr); }
.matrix-workspace .summary { position: static; }
.matrix-workspace .side-card { width: 100%; }
.matrix-workspace .side-card .side-next { margin-bottom: .55rem; }
.matrix-checks { margin: 0; padding-left: 1rem; }
.matrix-checks li + li { margin-top: .3rem; }

.chat-dock { position: fixed; z-index: 8; inset: auto max(.75rem, env(safe-area-inset-right)) max(.75rem, env(safe-area-inset-bottom)) auto;
  display: flex; flex-direction: column; align-items: end; gap: .58rem; width: min(26rem, calc(100vw - 1.5rem)); pointer-events: none; }
.chat-pane, .chat-launcher { pointer-events: auto; }
.button.chat-launcher { min-height: 2.95rem; padding: .58rem 1.03rem; border-color: #164f40; border-radius: 1.65rem;
  box-shadow: 0 6px 18px #133d3433; background: var(--brand); color: #fff; }
.button.chat-launcher:hover { background: #195544; border-color: #195544; }
.chat-pane { display: flex; flex-direction: column; width: 100%; max-height: min(70dvh, 39rem); border: 1px solid #a6c1b2;
  box-shadow: 0 .65rem 2.4rem #102b2459; border-radius: .8rem; background: #fff; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; color: white; background: var(--brand); padding: .68rem .8rem; }
.chat-head h2 { font-size: 1.03rem; }
.chat-head p { color: #cbe5d9; font-size: .76rem; }
.chat-content { display: flex; flex-direction: column; min-height: 0; padding: .66rem; font-size: .9rem; }
.chat-content .assistant-mode { margin-bottom: .45rem; }
.chat-content .messages { min-height: min(11rem, 28dvh); max-height: min(31dvh, 18rem); min-width: 0; flex: 1 1 auto;
  overflow: auto; align-content: start; overscroll-behavior: contain; }
.chat-content .suggestions { overflow: auto; max-height: min(12dvh, 5.4rem); margin: .44rem 0; }
.chat-content .button.suggestion { font-size: .75rem; min-height: 29px; }
.chat-content .composer input { min-width: 0; font-size: .88rem; }
.chat-content .composer .button { min-height: 2.35rem; }
body:has(.chat-dock:not([hidden])) #notice { bottom: 4.25rem; z-index: 9; }
.annex-nav { display: flex; flex-wrap: wrap; gap: .5rem .95rem; margin-bottom: 1rem; }
.annex-nav a { font-size: .86rem; font-weight: 650; }
.annex-block { scroll-margin-top: .85rem; }
.annex-block > details { margin-top: .65rem; }
.annex-block h3 { margin-top: 1.1rem; font-size: 1.03rem; color: var(--brand); }
.annex-block h4 { font-size: .91rem; margin: .9rem 0 .4rem; }
.annex-matrix { min-width: 450px; }
.annex-matrix tbody th { white-space: nowrap; }
.annex-equations { display: grid; gap: .44rem; padding: .78rem; margin: .68rem 0; border-radius: .42rem; background: var(--pale); color: var(--brand); }
.annex-equations p { font-family: "Cascadia Mono", Consolas, monospace; font-size: .86rem; overflow-wrap: anywhere; }
.annex-sequence { margin: .65rem 0 0; padding-left: 1.3rem; }
.annex-sequence li { margin: .26rem 0; }
.annex-source-list .source-row:first-child { border-top: 0; }
.trace-flow { display: flex; flex-wrap: wrap; gap: .5rem; margin: .82rem 0; align-items: stretch; }
.trace-flow > div { flex: 1 0 112px; border: 1px solid var(--line); background: #f3f7f4; border-radius: .4rem; padding: .55rem; }
.trace-flow dt { color: var(--brand); font-weight: 710; margin-bottom: .18rem; }
.trace-flow dd { color: var(--muted); font-size: .79rem; }
.brand-link, .header-return { color: white; text-decoration: none; }
.header-return { font-size: .9rem; }
.header-return:hover { text-decoration: underline; }
.legal-shell { max-width: 920px; }
.legal-content { padding: clamp(1.25rem, 4vw, 2.5rem); }
.legal-content section { border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 1.1rem; }
.legal-content h2 { color: var(--brand); font-size: 1.15rem; margin-bottom: .48rem; }
.legal-content p { overflow-wrap: anywhere; }
.legal-content p + p { margin-top: .55rem; }
.legal-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
#privacy-status { color: var(--accent); margin-top: .5rem; font-weight: 650; }
@media (max-height: 480px) {
  .chat-pane { max-height: calc(100dvh - 4.35rem); }
  .chat-content .messages { min-height: 2.5rem; }
  .chat-content .suggestions { max-height: 2.4rem; }
}
@media (max-width: 490px) {
  .chat-dock { width: calc(100vw - 1.5rem); }
  .legal-shell .panel { padding: 1.05rem; }
  .header-return { text-align: end; }
  .annex-nav { gap: .3rem .75rem; }
}
.command-hero h1 {
  font: 760 clamp(1.9rem, 4.6vw, 2.76rem)/1.13 "Aptos", "Segoe UI", sans-serif;
  letter-spacing: -.038em;
}
.command-hero .hero-actions { max-width: none; }
.command-decision {
  border: 1px solid #0e382f;
  border-radius: .75rem;
  background: #102f29;
  color: #f1faf6;
  padding: clamp(1.03rem, 2.65vw, 1.57rem);
}
.brief-label { display: flex; gap: .52rem; align-items: center; justify-content: space-between; }
.command-decision h2 { font-size: 1.03rem; color: #dbece4; font-weight: 650; }
.command-decision .info-button { color: #e5f5ed; background: #1c4137; border-color: #709688; }
.command-decision .info-button:hover { color: var(--brand); background: #edf8f2; }
.command-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .54rem 1.5rem; margin: .69rem 0 .9rem; }
.command-main > p { color: #accabc; font-size: .91rem; }
.command-main h3, .command-noresult h3 { font-size: clamp(1.37rem, 3vw, 2.08rem); margin: .18rem 0 .64rem; line-height: 1.12; overflow-wrap: anywhere; }
.command-score { display: grid; justify-items: end; align-content: center; gap: .24rem; }
.command-score strong { font-size: clamp(2rem, 6vw, 3.05rem); font-variant-numeric: tabular-nums; line-height: 1; color: #c7e9d7; }
.command-score > span { color: #c1d9ce; font-size: .85rem; }
.command-facts { display: flex; flex-wrap: wrap; gap: .34rem; }
.command-facts > span { color: #e8f6ee; background: #204337; border: 1px solid #3c6457; padding: .21rem .5rem; border-radius: .35rem; font-size: .84rem; font-weight: 570; }
.command-reason { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .25rem .68rem; font-size: .86rem; color: #c1d9ce; }
.command-reason > strong { color: #eef8f3; font-variant-numeric: tabular-nums; }
.command-noresult { padding-block: .55rem .75rem; }
.command-noresult > p + p { margin-top: .4rem; }
.command-noresult ul { margin: .45rem 0 0; padding-inline-start: 1.2rem; }
.command-tail { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem .7rem; border-top: 1px solid #4d6c60; padding-top: .75rem; }
.command-tail p { color: #c1d9ce; font-size: .87rem; }
.command-tail .actions { margin: 0; }
.command-tail .button.secondary { color: white; background: transparent; border-color: #80a496; }
.command-tail .button.secondary:hover { background: #275749; border-color: #a8c9ba; }
.command-tail .button.primary { color: #142f27; background: #c8e8d6; border-color: #c8e8d6; }
.command-tail .button.primary:hover { background: #e3f3ea; border-color: #e3f3ea; }
.command-decision button:focus-visible { outline-color: #dbf6e6; }
.brief-indicators { display: grid; grid-template-columns: minmax(0, 1.23fr) repeat(3, minmax(0, 1fr)); gap: .72rem; }
.brief-indicator { display: grid; align-content: start; gap: .33rem; min-width: 0; border: 1px solid var(--line); border-radius: .65rem; padding: .73rem .84rem .5rem; background: var(--surface); }
.brief-indicator .brief-label strong { font-size: .88rem; color: var(--muted); }
.brief-indicator .brief-label .info-button { flex: 0 0 1.68rem; }
.brief-value { font-size: 1.34rem; line-height: 1.2; color: var(--brand); font-weight: 735; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.brief-indicator p { font-size: .81rem; color: var(--muted); }
.brief-indicator > button { justify-self: start; font-size: .83rem; margin-top: .1rem; }
.brief-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .88rem; }
.heading-info { display: inline-flex; gap: .5rem; align-items: center; }
.heading-info .info-button { flex: 0 0 1.68rem; }
.plot-list, .action-list { display: grid; gap: .74rem; padding: 0; margin: 0; list-style: none; }
.score-plot figcaption { color: var(--muted); font-size: .85rem; margin-bottom: .65rem; }
.plot-header { display: flex; justify-content: space-between; gap: .46rem; align-items: start; font-size: .9rem; }
.plot-header strong { overflow-wrap: anywhere; }
.plot-header > span:not(.badge) { flex: none; font-size: .83rem; color: var(--brand); font-weight: 700; font-variant-numeric: tabular-nums; }
.plot-track { position: relative; margin-top: .3rem; background: #e8f0eb; block-size: .46rem; border-radius: .42rem; }
.plot-track > span { display: block; width: var(--bar-width); block-size: 100%; border-radius: inherit; background-color: #4c846f; }
.plot-track > span.leading { background-color: #0e6e51; }
.plot-track.recovery > span { background-color: #405e8a; }
.plot-track > span.conditional { background: repeating-linear-gradient(135deg, #ae792f, #ae792f 4px, #d5ad6e 4px, #d5ad6e 7px); }
.plot-track > span.limit-fail { background: repeating-linear-gradient(135deg, #934235, #934235 4px, #cb8a7c 4px, #cb8a7c 7px); }
.plot-track > i { position: absolute; inset: -.16rem auto -.16rem var(--mark); width: 2px; background: #142b35; transform: translateX(-1px); }
.effect-plot { min-width: 0; padding: .88rem; border: 1px solid var(--line); border-radius: .5rem; background: #f9fbfa; }
.effect-plot figcaption { color: var(--brand); font-weight: 730; }
.plot-axis { display: flex; justify-content: space-between; margin: .22rem 0 .55rem; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .77rem; }
.plot-limit { margin-top: .7rem; color: var(--muted); font-size: .83rem; }
.action-list li + li { border-top: 1px solid var(--line); padding-top: .68rem; }
.action-list p { margin-top: .29rem; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.action-list .ref { display: block; }
.field-reference { margin-top: .8rem; padding: .65rem .76rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--pale); }
.field-reference dt { font-weight: 735; }
.field-reference dd { margin-top: .22rem; font-size: .87rem; overflow-wrap: anywhere; color: var(--muted); }
.reference-title { font-size: .94rem; }
.reference-list { margin: .45rem 0; padding-left: 1.2rem; }
.reference-list li + li { margin-top: .4rem; }
.reference-list small { display: block; font-size: .85rem; color: var(--muted); }
.instructions-lead { max-width: 68ch; color: var(--muted); }
.tabs .step-number { display: inline-grid; flex: 0 0 1.58rem; height: 1.58rem; place-items: center;
  border: 1px solid #adc6b7; background: #f4faf6; border-radius: .35rem; font-size: .8rem; font-weight: 760; }
.tabs [aria-current] .step-number { color: white; background: var(--accent); border-color: var(--accent); }
.tabs button:disabled { color: #53695c; opacity: .72; background: transparent; }
.tabs button:disabled .step-number { background: transparent; }
.result-nav { display: flex; flex-wrap: wrap; gap: .52rem; }
.review-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0 0 .8rem; }
.review-facts div { border: 1px solid var(--line); border-radius: .44rem; padding: .6rem .7rem; background: #f6faf7; }
.review-facts dt { color: var(--muted); font-size: .83rem; font-weight: 650; }
.review-facts dd { margin-top: .19rem; color: var(--brand); font-weight: 650; overflow-wrap: anywhere; }
.review-actions { margin-top: 1rem; padding-top: .78rem; border-top: 1px solid var(--line); }
.review-actions .choice { margin: .55rem 0; align-items: start; }
.analysis-chain { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); padding: 0; margin: 0 0 1rem; list-style: none; gap: .62rem; }
.analysis-chain > li { display: flex; align-items: flex-start; gap: .55rem; padding: .62rem; border: 1px solid var(--line); background: #f7fbf8; border-radius: .48rem; }
.analysis-chain strong, .analysis-chain small { display: block; overflow-wrap: anywhere; }
.analysis-chain strong { color: var(--brand); font-size: .9rem; }
.analysis-chain small { color: var(--muted); font-size: .78rem; }

dialog.report-dialog {
  width: min(1100px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); min-width: 0;
  background: #f2f6f3; overflow: hidden; box-shadow: 0 1.15rem 3.5rem #09221d66;
}
dialog.report-dialog[open] { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr); }
body:has(.report-dialog[open]) { overflow: hidden; }
.report-header { grid-row: 1; display: flex; justify-content: space-between; align-items: start; gap: .75rem;
  background: var(--brand); color: white; padding: .83rem clamp(.82rem, 2.35vw, 1.35rem); }
.report-header h2 { font-size: clamp(1.12rem, 3.25vw, 1.4rem); margin: 0; overflow-wrap: anywhere; }
.report-meta { font-size: .84rem; color: #cbe3d7; margin-top: .17rem; overflow-wrap: anywhere; }
.report-header .button { flex-shrink: 0; color: white; border-color: #70978a; background: transparent; }
.report-header .button:hover:not(:disabled) { color: white; background: #24594b; border-color: #b4d0c4; }
.report-header button:focus-visible { outline-color: #e0f5e9; }
#report-nav { grid-row: 2; padding: .55rem clamp(.82rem, 2.35vw, 1.35rem); background: white; border-bottom: 1px solid var(--line); }
#report-nav .button { min-height: 36px; }
#report-notice { grid-row: 3; display: none; }
#report-notice.shown { display: block; padding: .48rem clamp(.82rem, 2.35vw, 1.35rem); color: var(--brand); background: var(--pale); border-bottom: 1px solid var(--line); font-size: .87rem; }
.report-content { grid-row: 4; display: grid; gap: .84rem; align-content: start; min-width: 0; min-height: 0;
  padding: clamp(.8rem, 2.35vw, 1.35rem); padding-bottom: 4.16rem; overflow: hidden auto; overscroll-behavior-y: contain; }
.report-content > * { min-width: 0; }
.report-dialog .panel { padding: clamp(.85rem, 2vw, 1.22rem); }
.report-dialog .panel-heading { margin-bottom: .78rem; }
.report-dialog .chat-dock { position: absolute; inset: auto .8rem .7rem auto; width: min(26rem, calc(100% - 1.6rem)); }
.report-dialog .chat-pane { max-height: min(65dvh, 32rem); }
.report-dialog .table-wrap { overflow: visible; }
.report-dialog table, .report-dialog th, .report-dialog td { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.report-dialog .decision-matrix th:first-child { min-width: 0; width: 22%; }
.report-dialog .sensitivity-score { white-space: normal; }
.report-dialog .weight-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 115px), 1fr)); }
.report-dialog .result-lead { flex-wrap: wrap; }

.report-overview { display: grid; grid-template-columns: minmax(0, 1.26fr) minmax(0, 1fr); gap: .84rem; }
.report-overview > * { min-width: 0; }
.report-overview .command-decision { padding: clamp(.85rem, 2vw, 1.22rem); }
.report-overview .command-main h3 { font-size: clamp(1.27rem, 2.7vw, 1.78rem); }
.report-overview .command-score strong { font-size: clamp(1.8rem, 4.8vw, 2.45rem); }
.report-overview .plot-header { flex-wrap: wrap; }
.metric-controls, .sensitivity-input { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .55rem; }
.metric-controls { margin-bottom: .65rem; }
.metric-controls .metric-button { min-height: 35px; padding: .35rem .63rem; }
.metric-button[aria-pressed="true"], .metric-button[aria-pressed="true"]:hover:not(:disabled) {
  color: white; background: var(--accent); border-color: var(--accent);
}
.measure-plot { display: grid; gap: .37rem; min-width: 0; }
.measure-row { display: block; width: 100%; min-width: 0; background: white; color: var(--ink); text-align: start;
  border: 1px solid var(--line); border-radius: .45rem; padding: .52rem .65rem; }
.measure-row:hover { background: #f3f8f5; border-color: #a9cbbb; }
.measure-row[aria-pressed="true"] { background: #edf7f1; border-color: #629b84; }
.measure-row .plot-header { align-items: baseline; }
.measure-row .plot-header > :first-child { min-width: 0; overflow-wrap: anywhere; }
.measure-row .plot-track { display: block; height: .52rem; margin-top: .38rem; }
.report-action-detail { margin-bottom: .55rem; line-height: 1.42; }
.command-result.action-first { grid-template-columns: minmax(0, 1fr); gap: .55rem; }
.report-overview .action-first h3 { font-size: clamp(1.45rem, 2.85vw, 2rem); line-height: 1.16; }
.report-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; width: fit-content; max-width: 100%;
  color: #c7e1d6; border: 1px solid #53796c; border-radius: .32rem; padding: .16rem .42rem; font-size: .82rem; }
.report-score strong, .comparison-score strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-score strong { color: #edf8f3; }
.comparison-score { color: var(--muted); font-size: .84rem; }
.comparison-score strong { color: var(--brand); }
.measure-row .plot-track > span { transition: width .25s ease; }
.metric-axis { display: flex; justify-content: space-between; gap: .52rem; color: var(--muted); font-size: .76rem;
  font-variant-numeric: tabular-nums; margin: .18rem .65rem 0; }
.measure-detail { margin-top: .7rem; padding: .68rem .8rem; border: 1px solid #bed9ca; border-radius: .45rem;
  background: #f3f9f5; overflow-wrap: anywhere; }
.measure-detail h3 { color: var(--brand); font-size: 1.01rem; }
.measure-detail p { margin-top: .3rem; color: var(--muted); font-size: .86rem; }
.measure-facts { display: flex; flex-wrap: wrap; gap: .25rem .85rem; margin-top: .38rem; font-size: .86rem; }
.measure-facts dt { color: var(--muted); }
.measure-facts dd { font-weight: 740; color: var(--brand); font-variant-numeric: tabular-nums; }
.sensitivity-input { margin-top: .55rem; align-items: end; }
.sensitivity-input .field { width: min(100%, 13rem); }
.sensitivity-input #trial-weight { width: min(100%, 7.2rem); font-variant-numeric: tabular-nums; }

@media (max-width: 850px) { .tabs button { flex: 1 1 8.5rem; padding: .52rem .48rem; } }
@media (max-width: 720px) { .report-overview { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 660px) {
  .report-dialog :is(.decision-matrix, .effects-matrix, .coordination-matrix) { display: block; }
  .report-dialog :is(.decision-matrix, .effects-matrix, .coordination-matrix) thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%);
  }
  .report-dialog :is(.decision-matrix, .effects-matrix, .coordination-matrix) tbody,
  .report-dialog :is(.decision-matrix, .effects-matrix, .coordination-matrix) tbody tr { display: grid; }
  .report-dialog :is(.decision-matrix, .effects-matrix, .coordination-matrix) tbody { gap: .65rem; }
  .report-dialog :is(.decision-matrix, .effects-matrix, .coordination-matrix) tbody tr { border: 1px solid var(--line); border-radius: .43rem; }
  .report-dialog :is(.decision-matrix, .effects-matrix, .coordination-matrix) tbody th[scope="row"] { width: auto; background: #f1f6f2; }
  .report-dialog :is(.decision-matrix, .effects-matrix, .coordination-matrix) :is(th, td) { text-align: start; padding: .44rem .53rem; }
  .report-dialog :is(.decision-matrix, .effects-matrix, .coordination-matrix) td { display: block; }
  .report-dialog :is(.decision-matrix, .effects-matrix, .coordination-matrix) td[data-label]::before {
    content: attr(data-label); display: block; font-size: .76rem; font-weight: 700; color: var(--muted); margin-bottom: .1rem;
  }
  .report-dialog :is(.decision-matrix, .effects-matrix, .coordination-matrix) td:last-child { border-bottom: 0; }
}
@media (max-width: 490px) {
  dialog.report-dialog { width: calc(100vw - .75rem); max-height: calc(100dvh - .75rem); }
  #report-nav { gap: .25rem; }
  #report-nav .button { font-size: .8rem; padding: .37rem .48rem; }
  .report-dialog .chat-pane { max-height: min(60dvh, 32rem); }
  .report-dialog .plot-header { flex-wrap: wrap; }
}
@media (max-width: 720px) { .analysis-chain { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 460px) { .review-facts { grid-template-columns: minmax(0,1fr); } }
@media (min-width: 790px) and (max-width: 1040px) {
  .tabs button { padding-inline: .43rem; gap: .34rem; font-size: .9rem; }
}
@media (max-width: 750px) {
  .brief-indicators { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 490px) {
  .command-result { grid-template-columns: minmax(0, 1fr); gap: .55rem; }
  .command-score { justify-items: start; }
  .brief-indicators { gap: .45rem; }
  .brief-indicator { padding: .63rem .6rem .45rem; }
  .brief-value { font-size: 1.12rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
