:root {
  color-scheme: light;
  --ink: #172b43;
  --muted: #475569;
  --teal: #0f766e;
  --line: #d7e1e8;
  font-family: Arial, system-ui, sans-serif;
  color: var(--ink);
  background: #f3f6fa;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.65; }
main { max-width: 1180px; margin: auto; padding: 32px 24px; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 10px; background: white; z-index: 9; }
.skip-link:focus { top: 0; }
.hero { background: linear-gradient(115deg, #102844, #155467); color: white; padding: 34px; border-radius: 20px; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.18; letter-spacing: -.025em; margin: 14px 0 20px; }
.hero > p:not(.eyebrow) { max-width: 820px; color: #e1ebf2; margin: 0; }
.eyebrow { font-size: 11px; letter-spacing: .1em; font-weight: 700; margin: 0; color: var(--muted); }
.hero .eyebrow { color: #b6eef0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags span { font-size: 12px; padding: 4px 11px; border: 1px solid #688998; border-radius: 40px; color: #edf5fa; }
.notice { font-size: 14px; margin: 20px 4px 12px; color: #334155; }
.load-status { margin: 0 4px 20px; font-size: 13px; color: var(--teal); }
.calculator-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 20px; }
h2 { font-size: 19px; line-height: 1.4; margin: 0 0 20px; }
.step { display: inline-flex; align-items: center; justify-content: center; background: #d7f0ec; color: #115e59;
  border-radius: 9px; width: 30px; height: 30px; margin-right: 7px; font-size: 15px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { min-width: 0; margin-bottom: 18px; }
label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; line-height: 1.45; }
.field p, .section-note { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 7px 0 0; }
.section-note { margin: -8px 0 22px; }
input, select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #91a5b7; border-radius: 8px;
  background: #fff; color: var(--ink); padding: 10px 11px; font: inherit; font-size: 14px; }
input::placeholder { color: #64748b; opacity: 1; }
input:focus, select:focus { border-color: var(--teal); outline: 2px solid #0f766e; outline-offset: 2px; }
button { border: 1px solid #aabcc8; border-radius: 9px; padding: 10px 14px; background: #f4f8fa;
  color: #294258; font: inherit; font-size: 14px; cursor: pointer; min-height: 44px; }
button:hover { background: #e4eef2; }
button:focus-visible, summary:focus-visible { outline: 3px solid #0f766e; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .6; }
button.primary { width: 100%; background: var(--teal); color: #fff; border-color: var(--teal); font-weight: 700; font-size: 16px; }
button.primary:hover { background: #115e59; }
.secondary-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.result { padding: 30px; }
.result h2 { margin-top: 20px; font-size: 22px; }
.result p:last-child { font-size: 14px; color: var(--muted); }
.probability { font-size: clamp(64px, 7vw, 84px); line-height: 1.1; font-weight: 700; letter-spacing: -.04em; margin: 20px 0; color: #123950; }
.result.error { border-color: #a05e15; }
.result.error h2 { color: #854b0b; }
.warnings { font-size: 14px; color: #633f10; }
.warnings:not(:empty) { padding: 16px 18px; margin-bottom: 20px; border: 1px solid #e5ca9d; border-radius: 12px; background: #fff7e9; }
.warnings ul { padding-left: 20px; margin: 6px 0; }
.warnings li + li { margin-top: 8px; }
.explanation { padding: 2px 10px; color: var(--muted); font-size: 14px; }
.explanation h2 { font-size: 16px; margin-bottom: 8px; }
.privacy-note { padding-top: 12px; border-top: 1px solid var(--line); }
.details { margin-top: 14px; }
details { border: 1px solid var(--line); background: white; border-radius: 12px; margin: 12px 0; }
summary { cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 15px; }
details > div { padding: 0 22px 18px; font-size: 14px; color: #334155; }
details li + li { margin-top: 10px; }
footer { text-align: center; margin-top: 26px; color: var(--muted); font-size: 12px; }
[hidden] { display: none !important; }
@media (max-width: 780px) {
  .calculator-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .result-column { margin-bottom: 12px; }
  main { padding: 16px 14px; }
  .hero { padding: 24px 20px; }
  .card { padding: 20px; }
}
@media (max-width: 430px) {
  .fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero h1 { font-size: 29px; }
  .secondary-actions > button { flex: 1; }
}
