/* True Rent vs Buy — local styles */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
}

.rvb-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width, 1600px);
  margin: 0 auto;
  padding: 20px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: clip;
}

/* ── Verdict ─────────────────────────────────────────────── */
.verdict-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.verdict-bar > .verdict-story,
.verdict-bar > .verdict-display-note {
  order: 10;
}

.verdict-bar.win-buy {
  border-color: rgba(13, 148, 136, 0.35);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), var(--bg-secondary) 55%);
}
.verdict-bar.win-rent {
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), var(--bg-secondary) 55%);
}
.verdict-bar.win-tie {
  border-color: rgba(100, 116, 139, 0.35);
}

.verdict-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1 1 220px;
}
.verdict-main > div {
  min-width: 0;
}

.verdict-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.win-buy .verdict-badge {
  background: rgba(13, 148, 136, 0.15);
  color: var(--accent-primary);
  border-color: rgba(13, 148, 136, 0.3);
}
.win-rent .verdict-badge {
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent-secondary);
  border-color: rgba(37, 99, 235, 0.28);
}

.verdict-main h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.verdict-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 42rem;
  overflow-wrap: anywhere;
}

.verdict-story {
  flex: 1 1 100%;
  width: 100%;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--border-color);
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 16px;
}
.verdict-story:empty {
  display: none;
  padding: 0;
  border: none;
}
.verdict-story li {
  position: relative;
  padding: 8px 10px 8px 28px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}
.verdict-story li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  opacity: 0.75;
}
.verdict-story li strong {
  color: var(--text-primary);
  font-weight: 700;
}
.verdict-display-note {
  flex: 1 1 100%;
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-warning, #d97706);
}
.verdict-display-note[hidden] {
  display: none !important;
}

.verdict-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 18px;
  min-width: 0;
  flex: 1 1 280px;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.metric-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.metric-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Control strip ───────────────────────────────────────── */
.control-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 14px 18px;
  min-width: 0;
  max-width: 100%;
}
.mode-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
}
.mode-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.seg-control {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}
.seg-control.mini {
  border-radius: 8px;
  padding: 2px;
}
.seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}
.seg-control.mini .seg-btn {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 6px;
  min-width: 28px;
}
.seg-btn:hover {
  color: var(--text-primary);
}
.seg-btn.active {
  background: var(--bg-secondary);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}
.horizon-block {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
}
.horizon-block label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.horizon-block input[type="range"] {
  width: 100%;
  accent-color: var(--accent-primary);
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.preset-btn {
  appearance: none;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.preset-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.preset-btn.active {
  background: rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.4);
  color: var(--accent-primary);
}

/* ── Layout grid ─────────────────────────────────────────── */
.rvb-grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
  min-width: 0;
}
.inputs-col,
.results-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px 18px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  min-width: 0;
}
.card-head > div {
  min-width: 0;
  flex: 1;
}
.card-head i,
.card-head svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--accent-primary);
  flex-shrink: 0;
}
.card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.card-head.row-between {
  justify-content: space-between;
  align-items: center;
}
.row-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.buy-head i { color: var(--accent-primary); }
.rent-head i { color: var(--accent-secondary); }
.assump-head i { color: var(--color-warning, #d97706); }
.assets-head i { color: #7c3aed; }

/* Dual % / $ fields */
.dual-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 0;
  max-width: 100%;
}
.dual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.dual-head > span {
  line-height: 1.3;
  min-width: 0;
}
.dual-hint {
  margin: 0;
  font-size: 10.5px;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--text-muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Own-mode snapshot */
.own-snapshot {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.own-snapshot:empty {
  display: none;
}
.snap-item {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(13, 148, 136, 0.06);
  border: 1px solid rgba(13, 148, 136, 0.18);
  min-width: 0;
}
.snap-item span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.snap-item strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

/* Asset buckets */
.buckets-panel {
  margin-top: 4px;
}
.buckets-intro {
  margin-top: 0;
}
.buckets-table-wrap {
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}
.buckets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.buckets-table th,
.buckets-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}
.buckets-table th {
  background: var(--bg-tertiary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  white-space: nowrap;
}
.buckets-table .td-check {
  text-align: center;
}
.buckets-table .td-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent-primary);
}
.bucket-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-interactive, #fff);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
}
.bucket-input.text {
  font-family: var(--font-sans);
  font-weight: 500;
  min-width: 5.5rem;
}
.bucket-input.order {
  max-width: 3.25rem;
}
.bucket-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary-glow);
}
.funding-readout {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.funding-readout:empty {
  display: none;
}
.funding-readout strong {
  color: var(--text-primary);
}
.funding-readout.has-shortfall,
.funding-readout.empty-buckets {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.28);
}
.funding-readout.fully-funded {
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.25);
}
.fund-warn {
  color: #dc2626;
  font-weight: 700;
}
.fund-ok {
  color: var(--accent-primary);
  font-weight: 700;
}

/* Collapsible advanced blocks */
.advanced-block {
  margin-top: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  padding: 0;
  overflow: hidden;
}
.advanced-block > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  user-select: none;
}
.advanced-block > summary::-webkit-details-marker {
  display: none;
}
.advanced-block > summary::after {
  content: "▸";
  float: right;
  opacity: 0.6;
  transition: transform 0.15s ease;
}
.advanced-block[open] > summary::after {
  transform: rotate(90deg);
}
.advanced-block .advanced-grid,
.advanced-block .form-grid,
.advanced-block .hint,
.advanced-block .checkbox-field,
.advanced-block .buckets-panel {
  margin-left: 12px;
  margin-right: 12px;
}
.advanced-block .hint:last-child,
.advanced-block .buckets-panel,
.advanced-block .checkbox-field {
  margin-bottom: 12px;
}
.advanced-grid {
  margin-top: 4px;
  margin-bottom: 8px;
}
.assets-card {
  padding-top: 10px;
  padding-bottom: 10px;
}
.assets-card > .advanced-block {
  margin-top: 0;
  border: none;
  background: transparent;
}
.assets-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.assets-summary .summary-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.assets-summary .summary-title i,
.assets-summary .summary-title svg {
  width: 16px;
  height: 16px;
  color: #7c3aed;
}
.summary-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}
.summary-badge.on {
  background: rgba(13, 148, 136, 0.12);
  color: var(--accent-primary);
  border-color: rgba(13, 148, 136, 0.3);
}
.summary-badge.warn {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.28);
}
.summary-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  padding-left: 24px;
}
.field.dimmed {
  opacity: 0.55;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 12px;
  width: 100%;
  min-width: 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 0;
  max-width: 100%;
}
.field span {
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
/* Custom steppers (native spinners overflow the 2-col grid) */
.stepper {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-interactive, #fff);
  overflow: hidden;
  transition: border-color var(--transition-fast, 0.15s), box-shadow var(--transition-fast, 0.15s);
}
.stepper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}
.field input[type="number"] {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 8px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  appearance: textfield;
  -moz-appearance: textfield;
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.field input[type="number"]:focus {
  outline: none;
  box-shadow: none;
}
.stepper-btns {
  display: flex;
  flex-direction: column;
  flex: 0 0 26px;
  width: 26px;
  border-left: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}
.stepper-btn {
  appearance: none;
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  min-height: 0;
  transition: background var(--transition-fast, 0.15s), color var(--transition-fast, 0.15s);
}
.stepper-btn + .stepper-btn {
  border-top: 1px solid var(--border-color);
}
.stepper-btn:hover {
  background: rgba(13, 148, 136, 0.12);
  color: var(--accent-primary);
}
.stepper-btn:active {
  background: rgba(13, 148, 136, 0.2);
}
.stepper-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
  z-index: 1;
}
.stepper-btn svg {
  width: 12px;
  height: 12px;
  pointer-events: none;
}
.checkbox-field {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 8px 0 2px;
}
.checkbox-field span {
  flex: 1;
  min-width: 0;
}
.checkbox-field input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent-primary);
}
.hint {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.loan-readout {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ── Charts ──────────────────────────────────────────────── */
.chart-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}
.chart-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.leg i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.leg.buy i { background: var(--accent-primary); }
.leg.rent i { background: var(--accent-secondary); }
.leg.loan i {
  background: transparent;
  border: none;
  width: 12px;
  height: 0;
  border-top: 2px dashed #64748b;
  border-radius: 0;
  margin-top: 1px;
}
.leg.loan[hidden] {
  display: none !important;
}

/* ── Breakdown ───────────────────────────────────────────── */
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.break-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid transparent;
}
.break-item .bl {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.break-item .bv {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.break-item.highlight {
  border-color: rgba(13, 148, 136, 0.25);
  background: rgba(13, 148, 136, 0.06);
}
.break-item.muted .bv { color: var(--text-secondary); }

/* ── Tables ──────────────────────────────────────────────── */
.table-scroll {
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  max-height: 280px;
}
.table-scroll.tall { max-height: 360px; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table th,
.data-table td {
  padding: 8px 10px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-color);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table th:first-child,
.data-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--bg-secondary);
}
.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-tertiary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  z-index: 1;
}
.data-table thead th:first-child { z-index: 2; }
.data-table tbody tr:hover td { background: rgba(13, 148, 136, 0.04); }
.data-table tbody tr:hover td:first-child { background: rgba(13, 148, 136, 0.06); }
.data-table .pos { color: var(--accent-primary); font-weight: 600; }
.data-table .neg { color: var(--accent-secondary); font-weight: 600; }
.data-table td { font-family: var(--font-mono); font-size: 11.5px; }
.data-table td:first-child { font-family: var(--font-sans); font-weight: 600; }

.indifferent-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.indifferent-box strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

.btn-secondary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.btn-secondary i,
.btn-secondary svg {
  width: 14px;
  height: 14px;
}

.method-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.method-list strong { color: var(--text-primary); }
.disclaimer {
  margin: 14px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 1100px) {
  .rvb-grid {
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  }
}

@media (max-width: 1024px) {
  .rvb-grid {
    grid-template-columns: 1fr;
  }
  .verdict-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 640px) {
  .rvb-main { padding: 14px 12px 36px; }
  .form-grid { grid-template-columns: 1fr; }
  .verdict-metrics { grid-template-columns: 1fr 1fr; }
  .verdict-story { grid-template-columns: 1fr; }
  .control-strip {
    flex-direction: column;
    align-items: stretch;
  }
  .mode-block {
    width: 100%;
  }
  .mode-block .seg-control {
    display: flex;
    width: 100%;
  }
  .mode-block .seg-btn {
    flex: 1 1 0;
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
    white-space: normal;
    line-height: 1.25;
  }
  .dual-head {
    flex-wrap: wrap;
  }
  .presets {
    width: 100%;
  }
  .card-head.row-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .hdr-titles p {
    white-space: normal;
  }
  .summary-sub {
    padding-left: 0;
  }
}
