:root {
  --ink: #203542;
  --muted: #667b87;
  --line: #d6e3e8;
  --line-strong: #c4d6de;
  --canvas: #f3f8f9;
  --navy: #245370;
  --blue: #357b9e;
  --blue-2: #5d92aa;
  --blue-soft: #e8f3f7;
  --aqua: #4b9a94;
  --aqua-soft: #e7f4f1;
  --green: #4a9788;
  --amber: #d49a52;
  --red: #c66f5c;
  --shadow: 0 14px 34px rgba(34, 83, 112, .075);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: linear-gradient(180deg, #fbfdfd 0, #f6fafb 260px, var(--canvas) 720px); }
button, input, select { font: inherit; }
.shell { width: min(1500px, calc(100% - 48px)); margin-inline: auto; }
.mobile-shortcuts { display: none; }

.topbar { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.topbar-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 42px; height: 42px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding: 10px; border-radius: 12px; background: linear-gradient(145deg, var(--navy), var(--aqua)); box-shadow: 0 6px 16px rgba(36,83,112,.18); }
.brand-mark span { width: 5px; border-radius: 5px; background: white; }
.brand-mark span:nth-child(1) { height: 11px; opacity: .68; }
.brand-mark span:nth-child(2) { height: 21px; }
.brand-mark span:nth-child(3) { height: 16px; opacity: .82; }
.brand h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; }

.page { padding-block: 20px 42px; }
.intro { display: block; margin-bottom: 18px; }
.eyebrow, .section-kicker { margin: 0; color: var(--navy); font-size: 15px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.section-kicker { display: inline-flex; align-items: center; min-height: 34px; border: 1px solid #c9dee6; border-radius: 10px; background: linear-gradient(135deg, #eef7f9, var(--aqua-soft)); padding: 8px 12px; box-shadow: 0 3px 10px rgba(36,83,112,.055); }
.intro h2 { max-width: 920px; margin: 0; font-size: clamp(30px, 3.2vw, 47px); line-height: 1.06; letter-spacing: -.045em; }

.panel { border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(255,255,255,.985); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading h3 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.ghost-button { border: 1px solid var(--line-strong); border-radius: 9px; background: white; color: var(--navy); padding: 8px 12px; cursor: pointer; font-size: 14px; font-weight: 700; transition: .16s ease; }
.ghost-button:hover { border-color: #80a8ba; background: #f5f9fb; }

.followup-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.followup-heading .ghost-button { flex: 0 0 auto; padding: 7px 10px; font-size: 13px; }
.longitudinal-timeline { margin: 0 0 12px 44px; padding: 15px 14px; border: 1px solid #e0eaee; border-radius: 13px; background: linear-gradient(180deg, #fbfdfd, #f5f9fa); }
.timeline-shell { position: relative; display: grid; grid-template-columns: minmax(0,4fr) minmax(0,1fr); align-items: start; gap: 0; margin: 0; }
.timeline-track { position: absolute; top: 25px; left: 10%; right: 10%; height: 4px; border-radius: 99px; background: #dbe7eb; overflow: hidden; }
.timeline-track span { display: block; width: 50%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--navy), var(--aqua)); transition: width .28s ease; }
.timeline-stops { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4,1fr); }
.landmark-tab, .outcome-stop { display: flex; min-width: 0; flex-direction: column; align-items: center; border: 0; background: transparent; color: var(--muted); text-align: center; }
.landmark-tab { cursor: pointer; padding: 0 4px; }
.landmark-tab .tab-node, .outcome-node { width: min(90px, calc(100% - 6px)); height: 50px; display: grid; place-items: center; border: 3px solid white; border-radius: 10px; background: #e3edf0; box-shadow: 0 0 0 1.5px #c8d9df; color: #506a77; padding: 0 4px; font-size: 16px; line-height: 1.12; font-weight: 800; transition: .18s ease; }
.landmark-tab.completed .tab-node { background: var(--navy); color: white; box-shadow: 0 0 0 2px var(--navy); }
.landmark-tab.active .tab-node { transform: scale(1.05); background: var(--blue-2); color: white; box-shadow: 0 0 0 2px var(--blue-2), 0 4px 11px rgba(36,83,112,.16); }
.outcome-stop { position: relative; z-index: 1; }
.outcome-node { background: #fff5ea; color: #995b27; box-shadow: 0 0 0 1.5px #e1ad7c; }
.analysis-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(465px,.85fr); gap: 18px; align-items: start; }
.factor-panel { overflow: hidden; }
.factor-heading, .risk-panel-heading { align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(232,243,247,.58), rgba(255,255,255,0)); }
.factor-group { padding: 18px 24px; }
.factor-group + .factor-group { border-top: 1px solid var(--line); }
.factor-group-title { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; margin-bottom: 12px; }
.group-index { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg, var(--navy), var(--blue)); color: white; font-size: 14px; font-weight: 800; letter-spacing: .05em; box-shadow: 0 5px 13px rgba(36,83,112,.16); }
.factor-group-title h4 { margin: 0; font-size: 22px; letter-spacing: -.015em; }
.factor-group-title p { margin: 0; color: var(--muted); font-size: 9px; }
.score-list, .clinical-list { margin-left: 44px; border-top: 1px solid var(--line); }
.clinical-list { border-top: 0; }
.clinical-subgroup { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.clinical-subgroup + .clinical-subgroup { margin-top: 10px; }
.clinical-group-heading { padding: 9px 13px; border-bottom: 1px solid var(--line); background: linear-gradient(100deg, #edf6f8, #f8fbfc); }
.clinical-group-heading h5 { margin: 0; color: var(--navy); font-size: 16px; font-weight: 800; letter-spacing: .01em; }
.clinical-group-rows { padding-inline: 12px; }
.clinical-group-rows .predictor-row:last-child { border-bottom: 0; }
.longitudinal-group .score-list { border-top: 0; }
.score-item { display: grid; grid-template-columns: 34px minmax(100px,145px) minmax(140px,1fr) 72px; align-items: center; gap: 10px; min-height: 66px; border-bottom: 1px solid var(--line); }
.score-item .scale-shell { width: 100%; max-width: 312px; justify-self: center; }
.predictor-row { display: grid; grid-template-columns: 34px minmax(190px,210px) minmax(100px,1fr) 96px; align-items: center; gap: 10px; min-height: 60px; padding-block: 5px; border-bottom: 1px solid var(--line); }
.predictor-row .scale-shell { width: 100%; max-width: 240px; justify-self: start; }
.predictor-row.is-binary { min-height: 52px; }
.predictor-row.is-binary .predictor-label strong { white-space: nowrap; }
.predictor-row.is-binary .segment-control { grid-column: 3 / -1; width: 100%; max-width: 208px; min-height: 38px; justify-self: end; }
.predictor-row.is-binary .segment-control button { padding-block: 5px; }
.row-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #c5dce2; border-radius: 8px; background: #edf7f7; color: var(--aqua); }
.row-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.score-row-icon { background: var(--blue-soft); color: var(--blue); }
.score-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.predictor-label { display: grid; gap: 3px; }
.score-label strong { font-size: 16px; line-height: 1.3; }
.predictor-label strong { font-size: 16px; line-height: 1.3; }
.select-control { text-align: left; font-size: 15px; min-width: 0; }
.scale-shell { position: relative; padding-top: 14px; }
.scale-shell::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 6px; background: repeating-linear-gradient(90deg, #a9bcc7 0 1px, transparent 1px calc(10%)); opacity: .75; pointer-events: none; }
.score-number { width: 72px; min-height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; background: #f9fbfc; color: var(--navy); text-align: center; font-size: 18px; font-weight: 800; outline: none; }
.score-entry { display: grid; justify-items: center; gap: 2px; }
.score-entry-action { border: 0; background: transparent; padding: 3px 1px; color: var(--blue); font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.score-entry-action:hover { text-decoration: underline; }
.score-item:not(.is-recorded) .score-number { color: #8799a2; background: #f6f8f9; }
.predictor-value { width: 100%; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 8px; background: #f9fbfc; color: var(--navy); padding: 8px 10px; text-align: center; font-size: 16px; font-weight: 800; outline: none; }
.numeric-control { width: 96px; min-height: 38px; padding: 6px 6px; justify-self: end; }
.predictor-value:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,109,140,.08); }
.category-select { grid-column: 3 / -1; min-height: 44px; appearance: none; -webkit-appearance: none; padding: 10px 34px 10px 12px; border-radius: 10px; background: #f8fbfc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23245370' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 11px center / 16px no-repeat; color: var(--navy); text-align: left; font-size: 15px; cursor: pointer; transition: border-color .16s ease, background-color .16s ease; }
.category-select:hover { border-color: #80a8ba; background-color: #f0f7fa; }
.segment-control { display: grid; grid-template-columns: repeat(var(--segments), minmax(0,1fr)); gap: 3px; width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 9px; background: #f3f6f8; padding: 3px; }
.segment-control button { min-width: 0; border: 0; border-radius: 6px; background: transparent; color: #60727e; padding: 8px 6px; cursor: pointer; font-size: 14px; font-weight: 700; white-space: nowrap; transition: .16s ease; }
.segment-control button:hover { background: #e6edf2; color: var(--navy); }
.segment-control button.active { background: linear-gradient(135deg, var(--navy), var(--blue)); color: white; box-shadow: 0 2px 6px rgba(36,83,112,.18); }
input[type="range"] { width: 100%; accent-color: var(--blue); cursor: pointer; }

.risk-panel { position: sticky; top: 18px; padding: 0; overflow: hidden; }
.risk-panel-body { position: relative; padding: 0 24px 20px; }
.risk-panel-body > h3 { margin: 0; padding-top: 20px; font-size: 22px; letter-spacing: -.02em; }
.risk-empty-overlay { --empty-art-opacity: .17; position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px; border-radius: 0 0 17px 17px; background: #f8fbfd; overflow: hidden; }
.risk-empty-overlay::before { content: ""; position: absolute; inset: 0; background: url("assets/prediction-empty-background.png") center / cover no-repeat; opacity: var(--empty-art-opacity); pointer-events: none; }
.risk-empty-overlay[hidden] { display: none; }
.risk-empty-message { position: relative; z-index: 1; display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 16px; width: min(100%, 450px); padding: 28px 24px; border: 1px solid #cadde6; border-radius: 16px; background: linear-gradient(150deg, #fff 45%, #f2f8fb); box-shadow: 0 16px 40px rgba(36,83,112,.10), inset 0 1px 0 #fff; text-align: left; overflow: hidden; }
.risk-empty-message::before { content: ""; position: absolute; top: 0; left: 32px; right: 32px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, #3e7b9b, #70a8b5); }
.risk-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(145deg, var(--navy), #578ea8); color: #fff; box-shadow: 0 6px 16px rgba(36,83,112,.16); }
.risk-empty-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.risk-empty-message strong { display: block; color: var(--navy); font-size: clamp(20px, 1.8vw, 23px); font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.risk-empty-copy p { margin: 6px 0 0; color: var(--muted); font-size: 16px; line-height: 1.4; }
.risk-focus { display: flex; justify-content: center; align-items: center; padding: 23px 2px 25px; }
.risk-gauge { --risk-angle: 0deg; --risk-mid-angle: 0deg; --risk-color: var(--navy); width: 190px; height: 190px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(#b9dfe9 0deg, #63a9c5 var(--risk-mid-angle), var(--risk-color) var(--risk-angle), #e7eef1 var(--risk-angle) 360deg); position: relative; transition: background .25s ease; }
.risk-gauge::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: white; box-shadow: inset 0 0 0 1px #e0e8eb; }
.risk-gauge-inner { position: relative; z-index: 1; text-align: center; }
.risk-gauge-inner > span { display: block; max-width: 140px; margin: 0 auto; color: var(--muted); font-size: 13px; line-height: 1.25; }
.risk-gauge-inner div { margin: 8px 0 2px; color: var(--navy); line-height: 1; }
.risk-gauge-inner strong { font-size: 57px; letter-spacing: -.06em; }
.risk-gauge.is-three-digit .risk-gauge-inner strong { font-size: 47px; }
.risk-gauge-inner b { margin-left: 3px; font-size: 21px; }
.risk-gauge.is-empty .risk-gauge-inner b { display: none; }
.model-warning { margin: 5px 0 15px; border: 1px solid #ead7b3; border-radius: 8px; background: #fffaf1; color: #795b30; padding: 8px 10px; font-size: 12px; line-height: 1.4; }
.model-warning[hidden] { display: none; }
.trend-section { padding-top: 15px; border-top: 1px solid var(--line); }
.trend-heading h4 { margin: 0; color: var(--ink); font-size: 18px; }
.chart-wrap { margin-top: 4px; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-grid { stroke: #e1eaee; stroke-width: 1; }
.chart-axis { fill: #667b87; font-size: 17px; font-weight: 700; }
.chart-line { fill: none; stroke: url(#chartRiskGradient); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { stroke: white; stroke-width: 3; }
.chart-dot.is-primary { stroke: white; stroke-width: 3; filter: drop-shadow(0 2px 4px rgba(36,83,112,.25)); }
.chart-value { fill: var(--navy); font-size: 18px; font-weight: 800; }
.chart-time { fill: #4b6573; font-size: 19px; font-weight: 700; }
.chart-time.is-muted { fill: #9aaab2; }
.chart-history-dot { fill: #bdcbd1; }
.chart-status { fill: #899aa2; font-size: 14px; font-weight: 700; }
.result-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 7px; padding-top: 15px; border-top: 1px solid var(--line); }
.result-actions button { border: 1px solid var(--line-strong); border-radius: 8px; background: white; color: var(--navy); padding: 9px 12px; cursor: pointer; font-size: 13px; font-weight: 800; transition: .16s ease; }
.result-actions button:hover { border-color: var(--aqua); background: var(--aqua-soft); }
.result-actions button:disabled { cursor: not-allowed; opacity: .55; }
.result-actions button:disabled:hover { border-color: var(--line-strong); background: white; }

footer { border-top: 1px solid var(--line); background: rgba(255,255,255,.55); color: var(--muted); padding: 18px 0 25px; font-size: 12px; }
footer .shell { display: flex; justify-content: space-between; gap: 20px; }

@media (min-width: 761px) {
  .predictor-row:not(.is-binary):not(.is-multicategory) { grid-template-columns: 34px minmax(110px,150px) minmax(0,1fr) 96px; }
}
@media (max-width: 1120px) {
  .analysis-layout { grid-template-columns: 1fr; }
  .risk-panel { position: relative; top: auto; }
}
@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1500px); }
  .topbar-inner { min-height: 64px; }
  .page { padding-top: 22px; }
  .intro h2 { font-size: 30px; }
  .factor-group, .factor-heading, .risk-panel-heading, .risk-panel-body { padding-left: 17px; padding-right: 17px; }
  .longitudinal-timeline { margin-left: 0; }
  .timeline-track { top: 24px; }
  .landmark-tab { padding-inline: 1px; }
  .landmark-tab .tab-node, .outcome-node { width: min(80px, calc(100% - 4px)); height: 48px; padding-inline: 2px; border-width: 2px; border-radius: 8px; font-size: 14px; }
  .score-list, .clinical-list { margin-left: 0; }
  .score-item { grid-template-columns: 34px 1fr 72px; gap: 10px; padding: 8px 0; }
  .score-item .scale-shell { grid-column: 2 / -1; grid-row: 2; }
  .predictor-row { grid-template-columns: 34px 1fr 150px; gap: 10px; padding: 8px 0; }
  .predictor-row .scale-shell { grid-column: 2 / -1; grid-row: 2; }
  .predictor-value { width: 150px; }
  .category-select { grid-column: 2 / -1; grid-row: 2; width: 100%; }
  .numeric-control { width: 96px; }
  .segment-control button { padding-inline: 4px; font-size: 13px; }
  footer .shell { flex-direction: column; }
}

@media (max-width: 540px) {
  .predictor-row { grid-template-columns: 34px minmax(0,1fr); }
  .predictor-row .predictor-value, .predictor-row .segment-control { grid-column: 2 / -1; grid-row: 2; width: 100%; }
  .predictor-row .numeric-control { width: min(100%, 145px); }
  .predictor-row .scale-shell { grid-column: 2 / -1; grid-row: 3; }
  .predictor-row.is-binary .segment-control { grid-column: 2 / -1; grid-row: 2; }
  .predictor-row:not(.is-binary):not(.is-multicategory) { grid-template-columns: 34px minmax(0,1fr) 96px; }
  .predictor-row .numeric-control { grid-column: 3; grid-row: 1; width: 96px; }
  .predictor-row .scale-shell { grid-row: 2; }
}

@media (min-width: 560px) and (max-width: 760px) {
  .predictor-row.is-binary { grid-template-columns: 34px minmax(0,1fr) 208px; }
  .predictor-row.is-binary .segment-control { grid-column: 3; grid-row: 1; }
}
@media (max-width: 559px) {
  .predictor-row.is-binary { grid-template-columns: 34px minmax(0,1fr); }
  .predictor-row.is-binary .segment-control { grid-column: 2 / -1; grid-row: 2; }
}

@media (max-width: 400px) {
  .longitudinal-timeline { padding-inline: 7px; }
  .landmark-tab { padding-inline: 0; }
  .landmark-tab .tab-node, .outcome-node { width: calc(100% - 2px); padding-inline: 1px; font-size: 12px; }
  .risk-empty-message { grid-template-columns: 40px minmax(0,1fr); gap: 12px; padding: 24px 16px; }
  .risk-empty-icon { width: 40px; height: 40px; border-radius: 12px; }
}

@media (max-width: 760px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 10px; padding-block: 12px; }
  .brand { min-width: 0; }
  .brand-mark { flex-shrink: 0; }
  .brand h1 { font-size: 18px; line-height: 1.25; }
  .mobile-shortcuts { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-block: 8px; background: var(--canvas); }
  .mobile-shortcuts a { display: grid; place-items: center; min-height: 44px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 9px; background: white; color: var(--navy); font-size: 14px; font-weight: 700; text-align: center; text-decoration: none; }
  .mobile-shortcuts a[aria-current="location"] { background: var(--navy); border-color: var(--navy); color: white; }
  #predictor-profile, #prediction-results { scroll-margin-top: 72px; }
  .page { padding-top: 10px; }
  .factor-group-title h4 { font-size: 20px; line-height: 1.3; }
  .factor-group-title { align-items: start; }
  .followup-heading { gap: 8px 12px; }
  .followup-heading .ghost-button { min-height: 44px; font-size: 14px; }
  .predictor-value, .category-select { min-height: 44px; font-size: 16px; }
  .predictor-row .numeric-control { min-height: 44px; }
  .predictor-row.is-binary .segment-control { min-height: 52px; }
  .segment-control button { min-height: 44px; font-size: 15px; }
  .score-number { min-height: 44px; }
  .score-entry-action { min-height: 32px; padding: 6px 4px; font-size: 13px; }
  .scale-shell input[type="range"] { min-height: 32px; margin: 0; }
  .result-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .result-actions button { min-height: 48px; padding: 8px 6px; font-size: 14px; line-height: 1.3; }
  .risk-empty-message { max-width: 100%; }
  .risk-empty-message strong { overflow-wrap: anywhere; }
  button, a, input, select { -webkit-tap-highlight-color: rgba(53,123,158,.15); }
  :is(button,a,input,select):focus-visible { outline: 3px solid #6aa5bd; outline-offset: 3px; }
}

@media (max-width: 360px) {
  .landmark-tab .tab-node, .outcome-node { font-size: 10px; }
  .risk-empty-message { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .brand-mark { width: 36px; height: 36px; }
}

/* Compact, single-column mobile inputs; desktop rules stay unchanged. */
@media (max-width: 760px) {
  .shell { width: min(100% - 16px,1500px); }
  .topbar-inner { gap: 6px; padding-block: 9px; }
  .brand h1 { font-size: 17px; }
  .mobile-shortcuts { gap: 6px; padding-block: 6px; }
  .mobile-shortcuts a { min-height: 44px; padding: 6px; }
  .analysis-layout { gap: 12px; }
  .factor-heading, .risk-panel-heading { padding: 11px 12px; }
  .section-kicker { min-height: 30px; padding: 6px 9px; font-size: 13px; letter-spacing: .04em; }
  .factor-group { padding: 12px; }
  .factor-group-title { grid-template-columns: 30px minmax(0,1fr); gap: 8px; align-items: center; margin-bottom: 8px; }
  .group-index { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
  .factor-group-title h4 { font-size: 18px; line-height: 1.25; }
  .followup-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
  .followup-heading .ghost-button { min-height: 44px; padding: 6px 8px; font-size: 12px; }
  .clinical-subgroup + .clinical-subgroup { margin-top: 8px; }
  .clinical-group-heading { padding: 6px 9px; }
  .clinical-group-heading h5 { font-size: 15px; }
  .clinical-group-rows { padding-inline: 8px; }
  .row-icon { width: 24px; height: 24px; border-radius: 6px; }
  .row-icon svg { width: 18px; height: 18px; }
  .predictor-label strong, .score-label strong { font-size: 15px; line-height: 1.25; }
  .predictor-label, .score-label { min-width: 0; }
  .predictor-row { gap: 8px; min-height: 56px; padding: 5px 0; }
  .predictor-row .row-icon { grid-column: 1; grid-row: 1; }
  .predictor-row .predictor-label { grid-column: 2; grid-row: 1; }
  .predictor-row:not(.is-binary):not(.is-multicategory) { grid-template-columns: 24px 104px minmax(28px,1fr) 56px; }
  .predictor-row:not(.is-binary) .predictor-label strong { white-space: nowrap; }
  .predictor-row .scale-shell { grid-column: 3; grid-row: 1; max-width: none; }
  .predictor-row .numeric-control { grid-column: 4; grid-row: 1; width: 56px; min-height: 44px; padding: 6px 4px; }
  .predictor-row.is-binary { grid-template-columns: 24px minmax(0,1fr) 104px; min-height: 56px; }
  .predictor-row.is-binary .predictor-label strong { white-space: normal; }
  .predictor-row.is-binary .segment-control { grid-column: 3; grid-row: 1; width: 104px; max-width: 100%; min-height: 52px; }
  .predictor-row.is-binary .segment-control button { padding-inline: 3px; font-size: 14px; }
  .predictor-row.is-multicategory { grid-template-columns: 24px 130px minmax(0,1fr); }
  .predictor-row .category-select { grid-column: 3; grid-row: 1; width: 100%; min-width: 0; min-height: 44px; padding: 8px 26px 8px 8px; background-position: right 7px center; text-overflow: ellipsis; }
  .scale-shell { padding-top: 8px; }
  .scale-shell::before { top: 2px; height: 5px; }
  .scale-shell input[type="range"] { min-height: 32px; margin: 0; }
  .longitudinal-timeline { margin: 0 0 6px; padding: 9px 8px; }
  .timeline-track { top: 22px; }
  .landmark-tab .tab-node, .outcome-node { width: calc(100% - 4px); height: 44px; padding-inline: 1px; font-size: 12px; }
  .score-item { grid-template-columns: 24px 72px minmax(32px,1fr) 100px; gap: 6px; min-height: 56px; padding: 5px 0; }
  .score-label strong { white-space: nowrap; }
  .score-item .row-icon { grid-column: 1; grid-row: 1; }
  .score-item .score-label { grid-column: 2; grid-row: 1; }
  .score-item .scale-shell { grid-column: 3; grid-row: 1; max-width: none; }
  .score-item .score-entry { grid-column: 4; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: 4px; width: 100px; }
  .score-number { width: 52px; min-height: 44px; font-size: 17px; }
  .score-entry-action { width: 44px; min-height: 44px; padding: 5px 0; font-size: 12px; }
  .risk-panel-body { padding-inline: 14px; }
}

@media (max-width: 360px) {
  .predictor-row .row-icon { display: none; }
  .predictor-row .predictor-label { grid-column: 1; }
  .predictor-row:not(.is-binary):not(.is-multicategory) { grid-template-columns: 104px minmax(28px,1fr) 56px; }
  .predictor-row .scale-shell { grid-column: 2; }
  .predictor-row .numeric-control { grid-column: 3; }
  .predictor-row.is-multicategory { grid-template-columns: 130px minmax(0,1fr); }
  .predictor-row .category-select { grid-column: 2; }
  .predictor-row.is-binary { grid-template-columns: minmax(0,1fr) 104px; }
  .predictor-row.is-binary .segment-control { grid-column: 2; width: 104px; }
  .landmark-tab .tab-node, .outcome-node { padding-inline: 0; font-size: 10px; }
}
