/* Styles specific to the calculator page (index.html). Shared tokens and
   site chrome (nav/footer) live in styles.css. */

header h1 { font-size: 1.6rem; margin-bottom: 4px; }
.disclaimer { color: var(--muted); font-size: 0.85rem; margin-top: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.card-header h3 { margin: 0 0 4px; font-size: 1.05rem; }
.card-subtitle { color: var(--muted); font-size: 0.82rem; margin: 0 0 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
.core-inputs, .card-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.field-label { color: var(--muted); }
.field-input { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.field-input input, select {
  width: 100%; border: none; background: transparent; color: var(--text);
  padding: 7px 8px; font-size: 0.9rem;
}
.field-input:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
select { border: 1px solid var(--border); border-radius: 6px; padding: 7px 8px; }
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field-suffix { padding: 0 8px; color: var(--muted); font-size: 0.8rem; }
.field-hint { color: var(--muted); font-size: 0.72rem; }

.card-results { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
.result-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 10px; }
.result { display: flex; flex-direction: column; background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; }
.result span { font-size: 0.72rem; color: var(--muted); }
.result strong { font-size: 1.05rem; color: var(--accent); }
.flags { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--muted); }
.flag b { color: var(--text); }
.breakeven { font-size: 0.82rem; color: var(--muted); margin: 4px 0; }

.riders { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.riders-title { font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.rider-toggle { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; margin-bottom: 4px; }
.death-estimate { margin: 6px 0 4px 22px; padding: 8px 10px; border-left: 2px solid var(--border); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }

.blend-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.slider-row { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; margin-bottom: 6px; }
.slider-row input[type="range"] { flex: 1; }
.stack-bar { display: flex; height: 28px; border-radius: 6px; overflow: hidden; margin-top: 14px; border: 1px solid var(--border); }
.stack-segment { display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #fff; white-space: nowrap; overflow: hidden; }
.stack-guaranteed { background: #2f6f5e; }
.stack-flexible { background: #4d8fac; }
.stack-term { background: #b9843f; }

.collapsible { margin: 10px 0; }
.collapsible-toggle {
  background: none; border: none; color: var(--accent); font-size: 0.8rem;
  padding: 0; cursor: pointer; font-family: inherit;
}
.collapsible-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 10px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; margin-bottom: 8px; }
.radio-row label { display: flex; align-items: center; gap: 6px; }

.info-tip-wrap { position: relative; display: inline-block; }
.info-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 4px; border-radius: 50%;
  background: var(--border); color: var(--muted); font-style: normal;
  font-size: 0.65rem; cursor: pointer; vertical-align: middle;
  border: none; padding: 0; font-family: inherit; line-height: 1;
}
.info-tip-bubble {
  position: absolute; z-index: 20; top: 22px; left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 240px; background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  font-size: 0.75rem; font-weight: 400; text-transform: none; letter-spacing: normal;
  line-height: 1.4; box-shadow: 0 4px 16px rgba(0,0,0,0.25); text-align: left;
}

.vs-target { font-size: 0.8rem; color: var(--accent); margin: 4px 0 10px; }
tr.row-selected td { background: var(--accent-soft); font-weight: 600; }
td.rating-caution { color: var(--caution); font-weight: 700; }
.rating-note { margin-top: 10px; }

.scenario-list { display: flex; flex-direction: column; gap: 8px; }
.scenario-row { padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); position: relative; }
.scenario-row p { margin: 0; font-size: 0.85rem; }
.scenario-row.scenario-short { background: transparent; border: 1px dashed var(--border); color: var(--muted); }
.scenario-best { border: 1px solid var(--accent); }
.scenario-badge {
  display: inline-block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent); font-weight: 700; margin-bottom: 4px;
}

.reset-link {
  background: none; border: none; color: var(--accent); font-size: 0.85rem;
  padding: 0; cursor: pointer; font-family: inherit; text-decoration: underline;
}

.target-mode, .plan-picker {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 4px 0 14px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--accent-soft);
}
.target-mode-label, .plan-picker-label { font-size: 0.82rem; color: var(--muted); }
.target-mode-buttons, .plan-picker-buttons { display: flex; flex-wrap: wrap; gap: 4px; }

.amount-note {
  font-size: 0.78rem; color: var(--accent); margin: 0 0 10px;
  padding: 6px 10px; border-left: 2px solid var(--accent); background: var(--accent-soft);
}
