:root {
  --paper: #fff;
  --ink: #171717;
  --muted: #666;
  --line: #dcdcdc;
  --soft: #f7f7f7;
  --accent: #171717;
  --green: #171717;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 108px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid #555; outline-offset: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.18; margin: 0; }
h1 { font-size: clamp(36px, 4vw, 49px); letter-spacing: -1.8px; }
h2 { font-size: 28px; letter-spacing: -.7px; }
h3 { font-size: 25px; letter-spacing: -.5px; }
p { margin: 0 0 12px; }
.skip { position: fixed; z-index: 30; top: -100px; left: 24px; padding: 12px 20px; background: var(--ink); color: white; }
.skip:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.header-inner { width: min(1280px, calc(100% - 96px)); height: 88px; margin: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; font: 29px/1 var(--serif); letter-spacing: -.9px; }
.brand-mark { display: block; width: 38px; height: 44px; object-fit: contain; }
.site-navigation, .header-utility { display: flex; align-items: center; gap: 32px; font-size: 12px; }
.header-utility { justify-self: end; gap: 24px; font-size: 11px; color: var(--muted); }
.site-navigation a, .header-utility a { padding-block: 12px; text-underline-offset: 5px; }
.site-navigation a:hover, .header-utility a:hover { color: var(--ink); text-decoration: underline; }
.simple-main { width: min(1180px, calc(100% - 96px)); margin: auto; padding-bottom: 64px; }
.simple-intro { padding: 42px 0 32px; }
.panel { min-width: 0; padding: 28px; border: 1px solid var(--line); background: white; }
.panel-head, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-head .link { flex-shrink: 0; }
.link { border: 0; border-bottom: 1px solid #aaa; background: none; padding: 4px 0; font-size: 12px; line-height: 1.5; }
.link:hover { border-color: var(--ink); }
.link:disabled { color: #999; border-color: #ddd; }
textarea { display: block; width: 100%; min-height: 264px; padding: 20px 22px; background: #fafafa; border: 1px solid #d5d5d5; border-radius: 0; resize: vertical; font: 16px/1.85 var(--serif); }
textarea::placeholder { color: #777; }
textarea:focus { background: white; }
.input-bottom { display: flex; justify-content: flex-end; gap: 16px; margin-top: 20px; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: 32px; min-height: 46px; border: 1px solid var(--ink); border-radius: 0; padding: 12px 20px; font-size: 12px; line-height: 1.5; transition: background .15s, border-color .15s; }
.primary { background: var(--ink); color: #fff; }
.primary:hover { background: #343434; border-color: #343434; }
.primary:disabled { background: #e7e7e7; border-color: #e7e7e7; color: #777; }
.secondary { background: white; }
.secondary:hover { background: var(--soft); }
.primary span { font-size: 19px; line-height: 1; }
.job-line { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; }
.job-line:has(.analysis-state[hidden]):has(#cancel[hidden]) { display: none; }
.prediction-section, .review-section { margin: 34px 0; }
.prediction-layout { display: grid; grid-template-columns: 1.8fr 1fr; gap: 20px; align-items: start; }
.route-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 22px; }
.route-top h3 { font-size: 30px; }
.route-top strong { font: 46px/1 var(--serif); letter-spacing: -1.2px; white-space: nowrap; }
.route-top p { margin: 8px 0 0; max-width: 330px; }
.muted, .small { color: var(--muted); font-size: 12px; }
.prob-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px 20px; margin: 18px 0; }
.prob-row:last-child { margin-bottom: 0; }
.prob-row .name { font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.prob-row b { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.prob-row > b { text-align: right; }
.prob-row .track { grid-column: 1/-1; height: 5px; background: #ededed; }
.prob-row .track i { display: block; height: 100%; background: #262626; }
.routing-distributions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 28px; align-items: start; }
.distribution { min-width: 0; }
.distribution + .distribution { border-left: 1px solid var(--line); padding-left: 24px; }
.distribution-heading h3 { font-size: 22px; }
.distribution-heading > span { display: block; font-size: 10px; color: var(--muted); margin-top: 7px; }
.route-list { max-height: 440px; overflow-y: auto; scrollbar-width: thin; padding: 4px; margin: -4px; }
.unit-link { border: 0; border-bottom: 1px solid #aaa; padding: 0 0 1px; background: none; font-size: 12px; font-weight: 600; text-align: left; }
.unit-link:hover { border-color: var(--ink); }
.route-description { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.grouped-routes { border-top: 1px solid var(--line); margin-top: 16px; }
.grouped-routes summary { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: start; padding: 13px 2px; list-style: none; cursor: pointer; font-size: 11px; }
.grouped-routes summary::-webkit-details-marker { display: none; }
.grouped-routes summary::before { content: '+'; font-size: 14px; line-height: 1.3; }
.grouped-routes[open] summary::before { content: '−'; }
.grouped-routes summary b { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.grouped-routes > .route-list { padding: 0 8px 8px 20px; margin: 0; border-left: 1px solid var(--line); }
.unresolved-routing { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin: 16px 0 0; padding-top: 13px; font-size: 11px; color: var(--muted); }
.unresolved-routing b { font-weight: 500; }
.estimate-note { font-size: 10px; color: var(--muted); margin: 22px 0 0; }
#selected-prediction .routing-distributions { grid-template-columns: 1fr; }
#selected-prediction .distribution + .distribution { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
.unit-dialog { width: min(660px,calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 30px; color: var(--ink); background: white; border: 1px solid var(--line); box-shadow: 0 16px 80px #0002; }
.unit-dialog::backdrop { background: #0005; }
body:has(.unit-dialog[open]) { overflow: hidden; }
.unit-dialog .panel-head { margin-bottom: 12px; }
.dialog-close { display: grid; place-items: center; flex-shrink: 0; height: 36px; width: 36px; border: 1px solid var(--line); background: white; font-size: 23px; line-height: 1; }
.dialog-close:hover { background: var(--soft); }
.unit-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 26px; }
.unit-stat { min-width: 0; }
.unit-stat + .unit-stat { padding-left: 28px; border-left: 1px solid var(--line); }
.unit-stat h3 { font-family: var(--sans); font-size: 12px; letter-spacing: 0; }
.unit-stat > strong { display: block; font: 45px/1.2 var(--serif); margin: 12px 0; }
.unit-stat p { font-size: 12px; line-height: 1.6; }
.unit-stat .stat-window { color: var(--muted); margin-top: 18px; }
.unit-stat .stat-interval, .unit-stat .stat-excluded { color: var(--muted); font-size: 11px; }
.unit-stat-note { border-top: 1px solid var(--line); padding-top: 18px; margin: 24px 0 0; font-size: 11px; color: var(--muted); }
.prob-row.other { color: var(--muted); }
.prob-row.other .track i { background: #a8a8a8; }
.outcome-panel { background: var(--soft); border-color: transparent; }
.outcome-panel h3 { margin-bottom: 28px; }
.outcome-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.outcome-metric { min-width: 0; }
.outcome-metric + .outcome-metric { border-left: 1px solid var(--line); padding-left: 22px; }
.outcome-metric strong { display: block; font: 39px/1.2 var(--serif); letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.outcome-metric span { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.outcome-metric p { margin: 10px 0 0; font-size: 11px; }
.metric-gap, .empty-recommendations { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0; }
.suggestion-section { margin: 34px 0 0; }
.suggestion-section > .panel-head { margin-bottom: 24px; }
.preference-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin-bottom: 10px; font-size: 12px; font-weight: 600; }
.choice { display: flex; gap: 12px; align-items: flex-start; min-height: 42px; padding: 9px 0; font-size: 13px; cursor: pointer; }
.choice input, .suggestion-card > input { width: 16px; height: 16px; flex: none; margin: 3px 0 0; accent-color: var(--ink); cursor: pointer; }
.choice span { line-height: 1.6; }
.choice.disabled { color: #777; cursor: default; }
.choice.disabled input { cursor: not-allowed; }
.choice small { display: inline-block; margin-left: 7px; padding: 1px 6px; background: #f0f0f0; font-size: 10px; line-height: 1.7; white-space: nowrap; }
.preference-bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
.preference-bottom .primary { margin-left: auto; flex-shrink: 0; }
.ranked-suggestions { margin-top: 24px; }
.ranked-suggestions:empty { margin-top: 0; }
.suggestion-card { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 18px; align-items: start; border-top: 1px solid var(--line); padding: 23px 0; }
.suggestion-card > input { margin-top: 7px; }
.suggestion-card .candidate-title { padding: 0; border: 0; background: none; text-align: left; font: 23px/1.3 var(--serif); letter-spacing: -.35px; }
.suggestion-card .candidate-title:hover { text-decoration: underline; text-underline-offset: 5px; }
.suggestion-card p { margin: 9px 0 0; max-width: 650px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.suggestion-card.active { background: var(--soft); margin-inline: -14px; padding-inline: 14px; box-shadow: inset 2px 0 var(--ink); }
.impact { display: flex; gap: 22px; text-align: right; padding-top: 2px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.impact b { display: block; margin-top: 4px; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.impact b.unfavorable { color: #994139; }
.empty-recommendations { padding-top: 8px; }
.review-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.review-grid .panel-head { margin-bottom: 24px; }
.badge { padding: 3px 8px; background: #f0f0f0; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.tracked-claims { max-height: 580px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 8px; font: 16px/1.9 var(--serif); }
.tracked-claims ins { color: #24583c; background: #e8f1e9; text-decoration: underline; text-underline-offset: 3px; }
.tracked-claims del { color: #963b36; background: #f8e9e7; text-decoration: line-through; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
#selected-outcomes:has(.outcome-metrics) { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
#selected-outcomes .outcome-metric strong { font-size: 32px; }
.conflict { margin-top: 16px; padding: 14px; color: #863d35; background: #fbefeb; font-size: 12px; }
.analysis-state { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.analysis-state:empty { display: none; }
.state-icon { display: grid; place-items: center; width: 17px; height: 17px; flex: none; border-radius: 50%; font-size: 11px; font-weight: 600; }
.analysis-state[data-state=idle] .state-icon:empty { display: none; }
.analysis-state[data-state=loading] .state-icon { border: 2px solid #ddd; border-top-color: var(--ink); animation: analysis-spin .85s linear infinite; }
.analysis-state[data-state=complete] .state-icon { background: #ededed; color: var(--ink); }
.analysis-state[data-state=error] { color: #8b4239; }
.analysis-state[data-state=error] .state-icon { background: #f7e9e6; }
.state-copy { min-width: 0; }
.state-copy small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.analysis-track { width: min(240px,100%); min-width: 130px; height: 3px; overflow: hidden; margin-top: 9px; background: #e9e9e9; }
.analysis-track i { display: block; height: 100%; background: #555; transition: width .3s ease; }
.analysis-track:not([aria-valuenow]) i { animation: analysis-wait 1.6s ease-in-out infinite alternate; }
#selection-status { margin: 20px 0; }
@keyframes analysis-spin { to { transform: rotate(360deg); } }
@keyframes analysis-wait { to { transform: translateX(280%); } }
@media (max-width: 1050px) {
  .prediction-layout { grid-template-columns: 1fr; }
  .header-inner, .simple-main { width: calc(100% - 48px); }
  .header-inner { gap: 24px; }
  .site-navigation { gap: 24px; }
  .header-utility { gap: 18px; }
  .panel { padding: 24px; }
  .preference-grid { gap: 28px; }
  .outcome-metrics { gap: 16px; }
  .outcome-metric + .outcome-metric { padding-left: 16px; }
  .outcome-metric strong { font-size: 34px; }
  .suggestion-card { gap: 14px; }
  .impact { gap: 16px; }
}
@media (max-width: 760px) {
  .header-inner { height: 76px; grid-template-columns: 1fr auto; }
  .brand { font-size: 26px; gap: 10px; }
  .brand-mark { width: 31px; height: 37px; }
  .site-navigation { display: none; }
  .header-utility { font-size: 11px; }
  .simple-intro { padding: 32px 0 26px; }
  h1 { font-size: 39px; letter-spacing: -1.25px; }
  h2 { font-size: 26px; }
  .prediction-layout, .review-grid { grid-template-columns: 1fr; }
  .prediction-section, .review-section { margin: 28px 0; }
  .suggestion-section { margin-top: 28px; }
  .suggestion-card { grid-template-columns: 20px minmax(0,1fr); }
  .suggestion-card .impact { grid-column: 2; text-align: left; gap: 25px; padding-top: 0; }
  .outcome-panel h3 { margin-bottom: 20px; }
}
@media (max-width: 560px) {
  .routing-distributions { grid-template-columns: 1fr; }
  .distribution + .distribution { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .unit-dialog { padding: 22px; }
  .unit-stat-grid { grid-template-columns: 1fr; gap: 20px; }
  .unit-stat + .unit-stat { border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; }
  .header-inner, .simple-main { width: calc(100% - 36px); }
  .header-inner { gap: 12px; }
  .brand { font-size: 23px; gap: 8px; }
  .brand-mark { width: 28px; height: 34px; }
  .header-utility { gap: 13px; font-size: 10px; }
  .panel { padding: 20px; }
  .panel-head { gap: 12px; }
  h1 { max-width: 390px; font-size: 38px; line-height: 1.1; }
  h2 { font-size: 25px; }
  textarea { min-height: 288px; font-size: 16px; padding: 16px; line-height: 1.75; }
  .preference-grid { grid-template-columns: 1fr; gap: 25px; }
  .choice { padding-block: 10px; }
  .preference-bottom { flex-wrap: wrap; gap: 16px; }
  .preference-bottom .analysis-state { flex-basis: 100%; }
  .primary, .secondary { padding-inline: 17px; gap: 24px; }
  .route-top h3 { font-size: 26px; }
  .route-top strong { font-size: 39px; }
  .route-top { gap: 16px; }
  .suggestion-card .candidate-title { font-size: 22px; }
  .tracked-claims { max-height: 500px; }
  .simple-main { padding-bottom: 36px; }
}
@media (max-width: 360px) {
  .header-inner, .simple-main { width: calc(100% - 28px); }
  .brand { font-size: 21px; }
  .header-utility { gap: 9px; }
  .panel { padding: 17px; }
  .panel-head h2 { font-size: 23px; }
  .outcome-metric strong { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* Predictions: tabbed distribution beside the selected unit's statistics. */
.routing-workspace { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(290px,1fr); gap:20px; align-items:start; }
.routing-main { padding-top:0; }
.routing-tabs { display:flex; gap:28px; border-bottom:1px solid var(--line); margin-bottom:24px; }
.routing-tabs [role=tab] { border:0; border-bottom:2px solid transparent; padding:22px 0 17px; margin-bottom:-1px; background:none; color:var(--muted); font-size:14px; }
.routing-tabs [aria-selected=true] { color:var(--ink); border-bottom-color:var(--ink); font-weight:600; }
.routing-tabs [role=tab]:hover { color:var(--ink); }
.routing-main .distribution { border:0; padding:0; }
.routing-main .prob-row { padding:10px 12px; margin:6px -12px; border-radius:3px; }
.routing-main .prob-row.chosen-unit { background:#f4f5f6; }
.routing-main .prob-row .name, .routing-main .prob-row b, .routing-main .unit-link { font-size:13px; }
.routing-main .prob-row > b { font-size:16px; font-weight:500; }
.routing-main .unit-link { border:0; }
.routing-main .unit-link:hover { text-decoration:underline; text-underline-offset:4px; }
.routing-main .route-description { max-width:430px; }
.routing-main .track { height:4px; }
.routing-main .route-list { max-height:460px; padding:4px 12px; margin:-4px -12px; }
.routing-main .grouped-routes > .route-list { margin:0; padding:0 16px 12px 20px; }
.routing-stats { background:#fafafa; position:sticky; top:24px; }
.pane-eyebrow { display:block; font-size:11px; color:var(--muted); margin-bottom:14px; }
.unit-pane-head h3 { font-size:29px; }
.unit-pane-head p { font-size:12px; color:var(--muted); margin:7px 0 0; }
.unit-pane-head .unit-pane-description { font-size:12px; line-height:1.6; margin-top:14px; }
.routing-stats .unit-stat-grid { grid-template-columns:1fr; margin-top:24px; gap:24px; }
.routing-stats .unit-stat + .unit-stat { border-left:0; border-top:1px solid var(--line); padding:22px 0 0; }
.routing-stats .unit-stat strong { font-size:42px; margin:8px 0; }
.routing-stats .stat-window { margin-top:10px; font-size:11px; }
.routing-stats .unit-stat p { font-size:11px; margin-bottom:0; }
.prediction-profile { display:flex; align-items:center; justify-content:flex-end; gap:32px; padding:20px 4px 0; }
.profile-label { color:var(--muted); font-size:11px; }
.prediction-profile .outcome-metrics { gap:24px; }
.prediction-profile .outcome-metric { display:flex; gap:10px; align-items:baseline; }
.prediction-profile .outcome-metric strong { font:23px/1.2 var(--serif); }
.prediction-profile .outcome-metric span { font-size:11px; margin:0; }
.prediction-profile .outcome-metric + .outcome-metric { padding-left:24px; }
.review-grid { display:flex; flex-direction:column; gap:24px; }
.review-grid > * { width:100%; }
.review-prediction { order:-1; }
.review-prediction > h3 { margin-bottom:20px; }
.tracked-claims { max-height:360px; }
#selected-outcomes:has(.outcome-metrics) { margin:18px 0 0; padding:18px 4px 0; border-top:0; }
#selected-outcomes .outcome-metrics { max-width:430px; margin-left:auto; }
@media(max-width:760px){
 .routing-workspace { grid-template-columns:1fr; }
 .routing-stats { position:static; }
 .routing-stats .unit-stat-grid { grid-template-columns:1fr 1fr; gap:22px; }
 .routing-stats .unit-stat + .unit-stat { border-top:0; border-left:1px solid var(--line); padding:0 0 0 22px; }
 .prediction-profile { flex-wrap:wrap; justify-content:flex-start; gap:12px; }
 .prediction-profile .profile-label { width:100%; }
 .routing-tabs { gap:24px; }
}
@media(max-width:420px){
 .routing-stats .unit-stat-grid { grid-template-columns:1fr; }
 .routing-stats .unit-stat + .unit-stat { border-left:0; border-top:1px solid var(--line); padding:20px 0 0; }
 .prediction-profile .outcome-metric { display:block; }
 .prediction-profile .outcome-metric span { margin-top:6px; }
}
.routing-main .grouped-routes { margin-top:0; }
.routing-main .grouped-routes:first-of-type { margin-top:18px; }
.routing-main .grouped-routes summary { padding-block:10px; }
