:root {
  color-scheme: light;
  --navy-950: #081624;
  --navy-900: #10273d;
  --navy-800: #173750;
  --cream: #fff8ed;
  --paper: #f6efe4;
  --orange: #ed6334;
  --amber: #ffbd55;
  --ink: #13263a;
  --muted: #637181;
  --line: rgba(16, 39, 61, 0.16);
  --shadow: 0 18px 55px rgba(8, 22, 36, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); line-height: 1.65; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.page-shell { overflow: clip; }
.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px clamp(20px, 5vw, 76px); color: var(--cream); background: var(--navy-950); border-bottom: 1px solid rgba(255,255,255,.12); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; color: var(--amber); font: 800 20px/1 ui-monospace, SFMono-Regular, monospace; }
.brand-name, .brand-subtitle { display: block; }
.brand-name { font-weight: 800; letter-spacing: .12em; font-size: 13px; }
.brand-subtitle { color: rgba(255,255,255,.58); font: 11px/1.4 ui-monospace, monospace; }
.site-nav { display: flex; gap: 24px; }
.site-nav a { padding: 12px 0; color: rgba(255,255,255,.78); text-decoration: none; font-size: 13px; }
.hero { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(420px, 1.15fr); min-height: min(680px, 72vh); background: var(--navy-950); color: var(--cream); }
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(54px, 8vw, 120px) clamp(26px, 6vw, 90px); background: radial-gradient(circle at 20% 25%, rgba(237,99,52,.16), transparent 40%); }
.eyebrow, .card-kicker, .method-topline { margin: 0 0 16px; color: var(--orange); font: 700 11px/1.4 ui-monospace, SFMono-Regular, monospace; letter-spacing: .18em; }
.hero h1, .section-heading h2, .method-card h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: .98; }
.hero h1 { max-width: 640px; font-size: clamp(48px, 6vw, 86px); letter-spacing: -.04em; }
.hero h1 em, .method-card h3 em { color: var(--amber); font-weight: 400; }
.hero-lede { max-width: 520px; margin: 32px 0 0; color: rgba(255,255,255,.7); font-size: 16px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.hero-tags span { border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 6px 12px; font-size: 11px; letter-spacing: .06em; }
.hero-art { position: relative; min-height: 480px; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy-950), transparent 38%), linear-gradient(0deg, rgba(8,22,36,.55), transparent 45%); }
.hero-art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-art-note { position: absolute; z-index: 1; right: clamp(20px, 5vw, 70px); bottom: 42px; display: grid; text-align: right; color: white; font-family: ui-monospace, monospace; }
.hero-art-note span, .hero-art-note small { font-size: 10px; letter-spacing: .18em; opacity: .72; }
.hero-art-note strong { font-size: 30px; line-height: 1.2; }
.planner-section, .result-section, .info-section { padding: clamp(68px, 8vw, 112px) clamp(18px, 5vw, 76px); }
.section-heading { max-width: 720px; margin-bottom: 40px; }
.section-heading h2 { color: var(--navy-900); font-size: clamp(38px, 5vw, 64px); letter-spacing: -.035em; }
.section-heading > p:last-child { margin: 18px 0 0; color: var(--muted); }
.planner-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 24px; align-items: start; }
.form-card, .method-card { border-radius: 22px; box-shadow: var(--shadow); }
.form-card { padding: clamp(22px, 4vw, 42px); background: var(--cream); border: 1px solid rgba(255,255,255,.7); }
.card-heading, .result-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.card-heading h3 { margin: 2px 0 0; font-size: 29px; line-height: 1.15; }
.card-kicker { margin-bottom: 6px; }
.step-badge { color: var(--muted); font: 11px ui-monospace, monospace; }
fieldset { min-width: 0; margin: 28px 0 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-weight: 800; font-size: 13px; }
.mode-options, .basis-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mode-option, .basis-options label { position: relative; display: block; }
.mode-option input, .basis-options input { position: absolute; opacity: 0; pointer-events: none; }
.mode-option span, .basis-options span { display: grid; min-height: 62px; align-content: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.5); }
.mode-option small { color: var(--muted); }
.mode-option input:checked + span, .basis-options input:checked + span { border-color: var(--orange); background: rgba(237,99,52,.08); box-shadow: inset 0 0 0 1px var(--orange); }
.mode-option input:focus-visible + span, .basis-options input:focus-visible + span { outline: 3px solid rgba(237,99,52,.28); outline-offset: 3px; }
.basis-fieldset { margin-bottom: 22px; }
.basis-options span { min-height: 48px; font-size: 13px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field { margin-top: 18px; min-width: 0; }
.field label { display: block; margin-bottom: 7px; font-weight: 750; font-size: 13px; }
.label-unit { color: var(--muted); font-weight: 500; }
.field input, .field select { width: 100%; min-height: 48px; border: 1px solid rgba(16,39,61,.24); border-radius: 10px; padding: 10px 12px; color: var(--ink); background: white; font-size: 16px; }
.field input:focus-visible, .field select:focus-visible, .button:focus-visible, .site-nav a:focus-visible, .brand:focus-visible { outline: 3px solid rgba(237,99,52,.38); outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: #b52828; box-shadow: 0 0 0 2px rgba(181,40,40,.12); }
.input-unit { display: grid; grid-template-columns: minmax(0,1fr) 88px; gap: 8px; }
.field-hint, .field-error { min-height: 1.45em; margin: 6px 0 0; font-size: 11px; }
.field-hint { color: var(--muted); }
.field-error, .form-error { color: #a51f1f; font-weight: 650; }
.form-error { min-height: 1.6em; margin: 12px 0 0; }
.form-actions, .result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button { min-height: 46px; border: 1px solid transparent; border-radius: 999px; padding: 10px 19px; font-weight: 800; }
.button-primary { color: white; background: var(--orange); box-shadow: 0 8px 22px rgba(237,99,52,.25); }
.button-primary:hover { background: #d85125; }
.button-quiet { color: var(--muted); background: transparent; border-color: var(--line); }
.button-outline { color: var(--navy-900); background: white; border-color: var(--line); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.method-card { position: sticky; top: 20px; padding: 30px; color: var(--cream); background: var(--navy-900); overflow: hidden; }
.method-topline { display: flex; justify-content: space-between; color: var(--amber); }
.method-card h3 { font-size: clamp(36px, 4vw, 54px); }
.method-card > p { color: rgba(255,255,255,.66); }
.track-diagram { display: block; width: 100%; height: auto; margin: 24px 0; }
.formula-list { margin: 0; border-top: 1px solid rgba(255,255,255,.15); }
.formula-list div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.formula-list dt { color: rgba(255,255,255,.6); }
.formula-list dd { margin: 0; font-family: ui-monospace, monospace; }
.result-section { background: var(--navy-950); color: var(--cream); }
.result-section .section-heading { max-width: none; }
.result-section .section-heading h2 { color: var(--cream); }
.result-actions { margin: 0; }
.result-status { color: rgba(255,255,255,.72); }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 26px 0; }
.summary-card { min-width: 0; padding: 19px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.05); }
.summary-card-primary { background: var(--orange); border-color: var(--orange); }
.summary-card dt { color: rgba(255,255,255,.62); font-size: 11px; letter-spacing: .08em; }
.summary-card dd { margin: 5px 0 0; overflow-wrap: anywhere; font: 800 clamp(20px, 3vw, 34px)/1.15 ui-monospace, monospace; }
.summary-card span { font-size: 11px; color: rgba(255,255,255,.62); }
.table-shell { width: 100%; overflow-x: auto; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; }
table { width: 100%; min-width: 780px; border-collapse: collapse; background: rgba(255,255,255,.03); }
caption { padding: 12px; text-align: left; color: rgba(255,255,255,.65); font-size: 12px; }
th, td { padding: 13px 14px; border-top: 1px solid rgba(255,255,255,.1); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
th { color: var(--amber); font-size: 11px; letter-spacing: .05em; }
th:first-child, td:first-child { text-align: left; }
.row-index { color: rgba(255,255,255,.48); }
.table-note { color: rgba(255,255,255,.55); font-size: 12px; }
.info-section { background: var(--cream); }
.info-grid, .policy-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.info-card, .policy-grid article { padding: 25px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.48); }
.info-index { color: var(--orange); font: 700 11px ui-monospace, monospace; }
.info-card h3, .policy-grid h3 { margin: 20px 0 8px; }
.info-card p, .policy-grid p { margin: 0; color: var(--muted); font-size: 14px; }
.policy-grid { margin-top: 14px; }
.policy-grid h3 { margin-top: 0; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px clamp(20px,5vw,76px); color: rgba(255,255,255,.58); background: var(--navy-950); font: 10px ui-monospace, monospace; letter-spacing: .1em; }
.noscript-message { padding: 20px; background: #fff3cd; color: #4f3b00; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { min-height: 430px; }
  .hero-art { min-height: 380px; }
  .hero-art::after { background: linear-gradient(0deg, var(--navy-950), transparent 45%); }
  .planner-grid { grid-template-columns: 1fr; }
  .method-card { position: static; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .site-header { min-height: 66px; padding: 10px 16px; }
  .brand-mark { width: 38px; height: 38px; }
  .site-nav { display: none; }
  .hero-copy { min-height: 400px; padding: 58px 20px; }
  .hero h1 { font-size: clamp(43px, 15vw, 60px); }
  .hero-art { min-height: 280px; }
  .planner-section, .result-section, .info-section { padding: 62px 16px; }
  .form-card, .method-card { padding: 22px 17px; border-radius: 17px; }
  .field-row, .info-grid, .policy-grid, .mode-options, .basis-options { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card { padding: 15px 12px; }
  .result-heading { display: block; }
  .result-actions { margin-top: 20px; }
  .button { min-height: 48px; }
  .form-actions .button-primary { flex: 1 1 100%; }
  .site-footer { display: grid; }
}
@media (max-width: 340px) {
  .hero-copy { padding-inline: 16px; }
  .planner-section, .result-section, .info-section { padding-inline: 12px; }
  .form-card, .method-card { padding-inline: 13px; }
  .summary-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  @page { margin: 12mm; }
  body { min-width: 0; background: white; color: #111; font-size: 10pt; }
  .site-header, .hero, .planner-section, .info-section, .site-footer, .result-actions, .table-note { display: none !important; }
  .result-section { padding: 0; background: white; color: #111; }
  .result-section .section-heading h2, .summary-card, th, td, caption { color: #111; }
  .summary-grid { grid-template-columns: repeat(4, 1fr); }
  .summary-card, .table-shell { border-color: #bbb; background: white; box-shadow: none; }
  .summary-card dt, .summary-card span, caption { color: #444; }
  .table-shell { overflow: visible; }
  table { min-width: 0; background: white; }
  th, td { padding: 5px; border-color: #ccc; white-space: normal; }
}
