/* ── smvcalc.html — page styles (extracted from inline <style>) ── */

.calc-page { display: none; }
.calc-page.visible { display: block; }
.screen { display: none; }
.screen.visible { display: block; }
.calc-content { padding-bottom: 3rem; }
.calc-tabs { flex-wrap: wrap; }
.tab-btn.a-active { background: var(--scarlet); color: #fffaf3; border-color: var(--scarlet); }
.tab-btn.b-active { background: #5d4db4; color: #fffaf3; border-color: #5d4db4; }

.exam-panel {
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,250,243,0.74));
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.25rem, 4vw, 2rem);
}
.exam-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--scarlet);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.exam-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 0.8rem;
}
.exam-copy {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.exam-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 1.35rem 0 1.6rem;
}
.exam-stat {
  background: rgba(255,252,247,0.76);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}
.exam-stat-num {
  color: var(--scarlet);
  font-size: 22px;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.exam-stat-label {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}
.lens-selector {
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: rgba(255,252,247,0.62);
  padding: 1rem;
  margin: 1.2rem 0 1.45rem;
}
.lens-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.lens-title {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 0.15rem;
}
.lens-copy {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}
.lens-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0.9rem;
}
.lens-btn {
  border: 0.5px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.54);
  color: var(--text-muted);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  padding: 0.48rem 0.82rem;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.lens-btn.active {
  background: var(--scarlet);
  color: #fffaf3;
  border-color: var(--scarlet);
}
.weight-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.weight-chip {
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.5);
  padding: 0.55rem 0.65rem;
  min-width: 0;
}
.weight-name {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.weight-val {
  color: var(--scarlet);
  font-size: 18px;
  line-height: 1.1;
  margin-top: 0.1rem;
}
.score-formula {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.45;
  margin-top: 0.8rem;
}
.factor-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-top: 1.35rem;
}
.factor-map-card {
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255,252,247,0.62);
  padding: 0.75rem 0.8rem;
  min-height: 88px;
}
.factor-map-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 0.3rem;
}
.factor-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--scarlet);
}
.factor-map-text {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.progress-shell {
  background: rgba(255,252,247,0.72);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  margin-bottom: 1rem;
}
.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 12px;
}
.progress-bar {
  height: 6px;
  background: rgba(116, 79, 61, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--scarlet-deep), var(--scarlet), var(--gold));
  transition: width 0.28s ease;
}
.factor-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0.85rem;
}
.factor-pill {
  border: 0.5px solid var(--border-light);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.45);
  padding: 0.45rem 0.65rem;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
}
.factor-pill.active {
  border-color: currentColor;
  background: rgba(255,255,255,0.9);
  font-weight: 700;
}
.factor-pill span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.question-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(255,250,243,0.76));
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.1rem, 4vw, 1.75rem);
}
.factor-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.question-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.55rem, 3.8vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 0.7rem;
}
.question-sub {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 1.15rem;
  max-width: 760px;
}
.options-grid {
  display: grid;
  gap: 9px;
  margin-bottom: 1.2rem;
}
.opt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  text-align: left;
  background: rgba(255,252,247,0.86);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.82rem 1rem;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.opt:hover {
  transform: translateY(-1px);
  border-color: rgba(196, 30, 58, 0.34);
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow-soft);
}
.opt.selected {
  border-color: var(--scarlet);
  border-width: 1px;
  background: var(--scarlet-pale);
  color: var(--scarlet-deep);
}
.opt-mark {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 0.5px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  margin-top: 0.1rem;
  flex: 0 0 auto;
}
.opt-main {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}
.opt-title {
  font-size: 14px;
  line-height: 1.35;
}
.opt-detail {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}
.income-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,252,247,0.86);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  max-width: 420px;
  margin-bottom: 0.9rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.income-input-wrap:focus-within {
  border-color: var(--scarlet);
  box-shadow: var(--shadow-soft);
}
.income-prefix {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  color: var(--scarlet-deep);
  line-height: 1;
}
.income-field {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  color: var(--text);
  letter-spacing: 0.01em;
}
.income-suffix {
  color: var(--text-muted);
  font-size: 13px;
  flex: 0 0 auto;
}
.income-preview {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 1.2rem;
  max-width: 620px;
}
.income-preview strong { color: var(--scarlet-deep); }
.income-hint { font-style: italic; }
.sex-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 1.2rem; max-width: 460px;
}
.age-grid { grid-template-columns: repeat(3, 1fr); }
.sexbtn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 1rem; background: rgba(255,252,247,0.86);
  border: 0.5px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; font-family: Georgia, "Times New Roman", serif; font-size: 16px; color: var(--text);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.sexbtn:hover { transform: translateY(-1px); border-color: rgba(196,30,58,0.34); box-shadow: var(--shadow-soft); }
.sexbtn.selected { border-color: var(--scarlet); border-width: 1px; background: var(--scarlet-pale); color: var(--scarlet-deep); }
.sexbtn i { font-size: 18px; }
.unit-toggle {
  display: inline-flex; gap: 4px; margin-bottom: 0.85rem;
  background: rgba(0,0,0,0.04); border-radius: 999px; padding: 3px;
}
.unitbtn {
  border: none; background: transparent; cursor: pointer;
  font-family: Georgia, "Times New Roman", serif; font-size: 13px; color: var(--text-muted);
  padding: 0.35rem 0.9rem; border-radius: 999px; transition: background 120ms ease, color 120ms ease;
}
.unitbtn.active { background: var(--scarlet); color: #fff; }
.num-input-wrap {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  background: rgba(255,252,247,0.86); border: 0.5px solid var(--border); border-radius: var(--radius-md);
  padding: 0.7rem 1rem; max-width: 420px; margin-bottom: 0.9rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.num-input-wrap:focus-within { border-color: var(--scarlet); box-shadow: var(--shadow-soft); }
.num-field {
  flex: 1 1 auto; min-width: 0; border: none; background: transparent; outline: none;
  font-family: Georgia, "Times New Roman", serif; font-size: 22px; color: var(--text);
}
.num-field.short { max-width: 70px; flex: 0 0 auto; }
.unit-lbl { color: var(--text-muted); font-size: 14px; }
.num-preview { color: var(--text-muted); font-size: 13px; line-height: 1.55; margin-bottom: 1.2rem; max-width: 640px; }
.num-preview strong { color: var(--scarlet-deep); }
.num-hint { font-style: italic; }
.soft-flag { color: #A06A12; }
.calc-import {
  display: flex; gap: 0.6rem; align-items: flex-start;
  background: #E1F5EE; border: 0.5px solid rgba(29,158,117,0.45); border-radius: var(--radius-md);
  padding: 0.85rem 1rem; margin-bottom: 1.2rem; max-width: 640px;
  font-size: 14px; line-height: 1.55; color: var(--text);
}
.calc-import i { color: #1D9E75; font-size: 18px; margin-top: 0.1rem; flex: 0 0 auto; }
.calc-import a, .calc-link a { color: var(--scarlet-deep); }
.calc-link { font-size: 13px; margin-bottom: 1.2rem; }
.soft-banner {
  display: flex; gap: 0.5rem; align-items: center;
  background: #FBF3E2; border: 0.5px solid rgba(160,106,18,0.4); border-radius: var(--radius-md);
  padding: 0.7rem 1rem; margin-bottom: 1rem; max-width: 640px;
  font-size: 13px; line-height: 1.5; color: #7a5210;
}
.soft-banner i { color: #A06A12; flex: 0 0 auto; }
.soft-banner a, .num-preview a { color: var(--scarlet-deep); }
.face-estimate { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.6rem; max-width: 460px; }
.face-estimate input[type=range] { flex: 1 1 auto; accent-color: var(--scarlet); }
.face-estimate-val {
  font-family: Georgia, "Times New Roman", serif; font-size: 18px; color: var(--scarlet-deep);
  min-width: 110px; text-align: right;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 1rem;
}
.btn-subtle {
  box-shadow: none;
  background: transparent;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn:disabled:hover {
  transform: none;
}

.score-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
  align-items: stretch;
}
.score-hero {
  text-align: center;
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(255,250,243,0.72));
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem 1.25rem;
}
.score-ring {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto 1rem;
  border: 3px solid;
}
.score-num {
  font-size: 42px;
  line-height: 1;
}
.score-denom {
  color: var(--text-muted);
  font-size: 13px;
}
.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 0.7rem;
}
.score-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  max-width: 420px;
  margin: 0 auto;
}
.result-panel {
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,250,243,0.72));
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
}
.result-title {
  color: var(--text);
  font-size: 18px;
  margin-bottom: 0.45rem;
}
.result-copy {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.factor-breakdown {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin: 1rem 0 1.2rem;
}
.fb-card {
  background: rgba(255,252,247,0.78);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.8rem;
}
.fb-name {
  color: var(--text);
  font-size: 12px;
  margin-bottom: 0.45rem;
}
.fb-bar {
  height: 5px;
  background: rgba(116, 79, 61, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.fb-fill {
  height: 100%;
  border-radius: 999px;
}
.fb-score {
  font-size: 12px;
}
.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 1rem 0;
}
.insight-card {
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255,252,247,0.7);
  padding: 0.85rem;
}
.insight-label {
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.insight-value {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}
.lever-list {
  display: grid;
  gap: 8px;
}
.lever-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255,252,247,0.68);
  padding: 0.8rem 0.9rem;
}
.lever-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--scarlet-pale);
  color: var(--scarlet);
  font-size: 12px;
  flex: 0 0 auto;
}
.lever-title {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 0.15rem;
}
.lever-copy {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}
.score-note {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.55;
  margin-top: 1rem;
}
.import-panel {
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: rgba(255,252,247,0.62);
  padding: 1rem;
  margin: 1.2rem 0 1.45rem;
}
.import-box {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.58);
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 10.5px;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
  margin: 0.65rem 0 0.75rem;
}
.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.import-status {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.45;
}
.pkg-readout { margin: 10px 0 0; }
.pkg-readout:empty { display: none; }
.pkg-readout-name { font-weight: 700; color: var(--text-muted); font-size: 13px; }
.pkg-readout-sub { color: var(--text-dim); font-size: 11px; margin-top: 1px; }
.pkg-readout-stats { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.pkg-readout-stats li { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; border-bottom: 0.5px solid var(--border); padding: 3px 0; }
.pkg-readout-stats li span { color: var(--text-dim); }
.pkg-readout-stats li b { color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px){ .pkg-readout-stats { grid-template-columns: 1fr; } }
.import-report {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
  margin-top: 0.75rem;
}
.import-report strong {
  color: var(--text);
}
.manual-gap-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.8rem;
}
.manual-gap-row {
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.52);
  padding: 0.75rem;
}
.manual-gap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
.manual-gap-name {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.manual-gap-val {
  color: var(--scarlet);
  font-size: 12px;
  font-weight: 700;
  min-width: 34px;
  text-align: right;
}
.manual-gap-row input[type="range"] {
  width: 100%;
  accent-color: var(--scarlet);
}
.manual-gap-note {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.45;
  margin-top: 0.35rem;
}
.manual-gap-weak {
  border-color: var(--scarlet);
  background: rgba(196,30,58,0.06);
}
.manual-gap-flag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--scarlet);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.auto-next-control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 12px;
  user-select: none;
  cursor: pointer;
}
.auto-next-control input {
  width: 16px;
  height: 16px;
  accent-color: var(--scarlet);
}
.matchup-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
  align-items: stretch;
  margin-top: 1rem;
}
.matchup-verdict {
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255,252,247,0.72);
  padding: 1rem;
}
.matchup-kicker {
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.matchup-scoreline {
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.55rem;
}
.matchup-scoreline span {
  color: var(--scarlet);
}
.matchup-copy {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}
.matchup-stats {
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255,252,247,0.72);
  padding: 0.8rem 1rem;
}
.matchup-grid {
  display: grid;
  gap: 8px;
}
.matchup-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255,252,247,0.7);
  padding: 0.7rem 0.8rem;
}
.matchup-name {
  color: var(--text);
  font-size: 12px;
}
.matchup-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(116, 79, 61, 0.12);
  overflow: hidden;
  position: relative;
}
.matchup-fill {
  height: 100%;
  border-radius: 999px;
}
.matchup-target {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  border-radius: 999px;
  background: var(--text);
  opacity: 0.72;
}
.matchup-delta {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(240px, 0.92fr);
  gap: 1rem;
  align-items: start;
}
.pb-label {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 6px;
  display: block;
}
.pb-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  margin-bottom: 1rem;
}
.pb-input:focus {
  outline: none;
  border-color: var(--scarlet);
}
.factor-slider-row {
  background: rgba(255,252,247,0.8);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 8px;
}
.fs-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.35rem;
}
.fs-name {
  color: var(--text);
  font-size: 13px;
}
.fs-val {
  color: var(--scarlet);
  font-size: 13px;
}
.fs-desc {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}
.pb-result {
  position: sticky;
  top: 96px;
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(255,250,243,0.74));
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
}
.pb-circle {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}
.pb-score-num {
  font-size: 30px;
  line-height: 1;
}
.pb-score-den {
  color: var(--text-dim);
  font-size: 11px;
}
.pb-name {
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  margin-bottom: 0.45rem;
}
.pb-tier {
  display: inline-flex;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.pb-breakdown {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}
.section-label-sm {
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

@media (max-width: 860px) {
  .exam-stats,
  .score-grid,
  .pb-layout,
  .matchup-hero,
  .insight-grid,
  .weight-grid {
    grid-template-columns: 1fr;
  }
  .factor-map,
  .factor-rail,
  .factor-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pb-result {
    position: static;
  }
}
@media (max-width: 540px) {
  .factor-map,
  .factor-rail,
  .factor-breakdown {
    grid-template-columns: 1fr;
  }
  .opt {
    grid-template-columns: 1fr;
  }
  .opt-mark {
    display: none;
  }
  .btn-row .btn {
    width: 100%;
    justify-content: center;
  }
  .auto-next-control {
    width: 100%;
    justify-content: center;
  }
  .matchup-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
  .matchup-delta {
    white-space: normal;
  }
}
