:root {
  color-scheme: light;
  --ink: #091b36;
  --muted: #5b6b82;
  --blue: #0162f7;
  --blue-bright: #2998ff;
  --blue-soft: #e9f3ff;
  --mint: #61dfbd;
  --mint-soft: #e3faf4;
  --coral: #ff7c6b;
  --paper: #ffffff;
  --surface: #f5f7fb;
  --line: #d8e0eb;
  --shadow: 0 18px 48px rgba(9, 27, 54, 0.12);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f8fb;
  color: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #f7f8fb; }
button, input, textarea { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.site-header {
  width: min(1280px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand img { display: block; width: 134px; height: auto; }
.site-header nav { display: flex; align-items: center; gap: 24px; font-size: 13px; font-weight: 700; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { color: var(--blue); }
.newbuilds-link { padding: 13px 18px; border-radius: 999px; color: #fff !important; background: var(--blue); box-shadow: 0 9px 24px rgba(1, 98, 247, .22); }

.page-shell { width: min(1280px, calc(100% - 40px)); margin: 0 auto 64px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 8px 4px 18px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { color: var(--blue); text-decoration: none; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: 48px;
  align-items: center;
  min-height: 520px;
  padding: 56px;
  border: 1px solid #dbe5f0;
  border-radius: 34px;
  background: linear-gradient(120deg, #fff1ed 0%, #f9f9fb 44%, #e7f1ff 100%);
  overflow: hidden;
}
.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(42px, 5.4vw, 72px); line-height: .98; letter-spacing: -.055em; }
.hero-lead { max-width: 620px; margin-bottom: 28px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.download-note { margin: 10px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.primary-button { color: #fff; background: var(--blue); box-shadow: 0 12px 28px rgba(1, 98, 247, .24); }
.secondary-button { border-color: #cbd7e6; color: var(--ink); background: rgba(255,255,255,.84); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:focus-visible, .secondary-button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(41, 152, 255, .3); outline-offset: 3px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.hero-points li { padding: 8px 12px; border: 1px solid rgba(1,98,247,.15); border-radius: 999px; color: #26415f; background: rgba(255,255,255,.74); font-size: 12px; font-weight: 700; }

.workbook-shot { margin: 0; transform: perspective(1200px) rotateY(-3deg); }
.workbook-shot img { display: block; width: 100%; height: auto; border: 10px solid rgba(255,255,255,.82); border-radius: 20px; box-shadow: var(--shadow); }
.workbook-shot figcaption { margin: 14px 12px 0; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }

.calculator-section { margin-top: 28px; padding: 42px; border: 1px solid var(--line); border-radius: 32px; background: var(--paper); }
.section-intro { max-width: 780px; margin-bottom: 28px; }
.section-intro h2, .guide-intro h2 { margin-bottom: 12px; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.section-intro > p:last-child, .guide-intro > p:last-child { color: var(--muted); font-size: 16px; line-height: 1.55; }
.calculator-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(390px, .82fr); gap: 24px; align-items: start; }
.calculator-form { padding: 28px; border-radius: 26px; background: var(--surface); }
.form-section-heading { display: flex; align-items: center; gap: 13px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.form-section-heading > span { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 14px; color: var(--blue); background: var(--blue-soft); font-weight: 900; }
.form-section-heading h3 { margin: 0 0 3px; font-size: 22px; }
.form-section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.fields { display: grid; gap: 18px; margin-top: 20px; }
.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields label > span:first-child { display: block; min-height: 36px; margin-bottom: 7px; font-size: 12px; font-weight: 800; line-height: 1.3; }
.input-shell { display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 0 16px; border: 1px solid #cbd7e6; border-radius: 16px; background: #fff; box-shadow: inset 0 1px 0 rgba(9,27,54,.03); }
.input-shell:focus-within { border-color: var(--blue-bright); box-shadow: 0 0 0 4px rgba(41,152,255,.12); }
.input-shell input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 20px; font-weight: 700; }
.input-shell b { color: var(--muted); font-size: 12px; white-space: nowrap; }
.segmented-field { margin: 20px 0 0; padding: 0; border: 0; }
.segmented-field legend { margin-bottom: 8px; font-size: 12px; font-weight: 800; }
.segmented-control { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 5px; border-radius: 16px; background: #e8eef6; }
.segmented-control input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-control span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 12px; border-radius: 12px; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; cursor: pointer; }
.segmented-control input:checked + span { color: var(--ink); background: #fff; box-shadow: 0 3px 12px rgba(9,27,54,.1); }
.extra-settings { margin-top: 24px; border-top: 1px solid var(--line); }
.extra-settings summary { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 21px 0 4px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 800; }
.extra-settings summary::-webkit-details-marker { display: none; }
.extra-settings summary b { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px; border-radius: 11px; color: var(--blue); background: var(--blue-soft); font-size: 12px; }
.extra-settings summary small { color: var(--muted); font-size: 11px; font-weight: 600; }
.details-fields { margin-top: 14px; }
.compact { margin-top: 18px; }
.form-error { margin: 20px 0 0; padding: 13px 15px; border-radius: 12px; color: #9b2a1d; background: #fff0ed; font-size: 13px; font-weight: 700; }

.result-card { position: sticky; top: 16px; padding: 30px; border-radius: 28px; color: #fff; background: radial-gradient(circle at 90% 0, rgba(41,152,255,.32), transparent 34%), var(--ink); box-shadow: var(--shadow); }
.result-kicker { margin-bottom: 15px; color: #b7c7da; font-size: 10px; font-weight: 900; letter-spacing: .09em; }
.result-kicker span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--mint); }
.result-main { padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.14); }
.result-main small { display: block; margin-bottom: 5px; color: #b7c7da; font-size: 10px; font-weight: 800; }
.result-main strong { display: block; font-size: clamp(44px, 5.4vw, 70px); line-height: 1; letter-spacing: -.04em; }
.result-main p { margin: 9px 0 0; color: #b7c7da; font-size: 12px; }
.highlight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.highlight-grid div { padding: 15px; border: 1px solid rgba(97,223,189,.2); border-radius: 16px; background: rgba(97,223,189,.1); }
.highlight-grid span { display: block; margin-bottom: 5px; color: #a9dbc9; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.highlight-grid strong { color: var(--mint); font-size: 20px; }
.metrics { margin: 0; }
.metrics div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid rgba(255,255,255,.12); }
.metrics dt { color: #becbdd; font-size: 12px; }
.metrics dd { margin: 0; font-size: 14px; font-weight: 800; text-align: right; }
.balance-chart { margin: 18px 0; padding: 14px 12px 10px; border-radius: 16px; background: rgba(255,255,255,.06); }
.balance-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid line { stroke: rgba(255,255,255,.12); stroke-width: 1; }
.line-base, .line-actual { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.line-base { stroke: #7bc2ff; }
.line-actual { stroke: var(--mint); }
.chart-legend { display: flex; justify-content: center; gap: 18px; color: #bdcadd; font-size: 10px; }
.chart-legend i { display: inline-block; width: 18px; height: 3px; margin: 0 5px 3px 0; border-radius: 3px; }
.chart-legend i.actual { background: var(--mint); }
.chart-legend i.base { background: #7bc2ff; }
.result-download { width: 100%; background: var(--blue-bright); }
.result-download-note { margin: 8px 8px 0; color: #9fb1c8; text-align: center; }
.result-disclaimer { margin: 14px 0 0; color: #9fb1c8; font-size: 10px; line-height: 1.45; text-align: center; }

.schedule-preview { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; margin-top: 24px; padding: 26px; border: 1px solid var(--line); border-radius: 24px; }
.schedule-preview h3 { margin: 0; font-size: 24px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; }

.guide { margin-top: 28px; }
.guide-intro, .content-section, .steps-section, .faq-section, .online-link-section, .calculator-request { padding: 42px 46px; border: 1px solid var(--line); border-radius: 28px; background: #fff; }
.guide-intro { background: linear-gradient(100deg, #fff5f1, #edf5ff); }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 18px 0; }
.feature-grid section { padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: #fff; }
.feature-grid span { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 12px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 900; }
.feature-grid h3 { margin-bottom: 8px; font-size: 22px; }
.feature-grid p, .content-section p, .steps-section li span, .faq-list p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.content-section, .steps-section, .faq-section, .online-link-section, .calculator-request { margin-top: 18px; }
.content-section h2, .steps-section h2, .faq-section h2, .online-link-section h2, .calculator-request h2 { margin-bottom: 16px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.035em; }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 22px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 26px; color: #344b67; line-height: 1.5; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--blue); font-weight: 900; }
.steps-section ol { display: grid; gap: 15px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: steps; }
.steps-section li { counter-increment: steps; display: grid; grid-template-columns: 42px 190px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.steps-section li::before { content: counter(steps); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--blue); font-weight: 900; }
.steps-section li b { padding-top: 6px; font-size: 14px; }
.steps-section li span { padding-top: 2px; }
.formula-section { background: var(--ink); color: #fff; }
.formula-section p { color: #b7c7da; }
.formula-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.formula-grid div { padding: 18px; border-radius: 16px; background: rgba(255,255,255,.08); }
.formula-grid small { display: block; margin-bottom: 8px; color: var(--mint); font-weight: 900; }
.formula-grid code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; }
.warning-section { border-left: 5px solid #f5c443; }
.online-link-section { display: flex; justify-content: space-between; gap: 28px; align-items: center; background: var(--blue-soft); }
.online-link-section p { max-width: 760px; margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.online-link-section .secondary-button { flex: 0 0 auto; }
.calculator-request { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); gap: 34px; align-items: center; background: linear-gradient(120deg, #fff5f1, #edf5ff); }
.calculator-request-copy p:last-child { margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.calculator-request-form { display: grid; gap: 10px; padding: 22px; border: 1px solid rgba(1,98,247,.13); border-radius: 22px; background: rgba(255,255,255,.84); box-shadow: 0 12px 32px rgba(9,27,54,.07); }
.calculator-request-form label { font-size: 12px; font-weight: 800; }
.calculator-request-form textarea { width: 100%; min-height: 118px; resize: vertical; padding: 15px 16px; border: 1px solid #cbd7e6; border-radius: 16px; color: var(--ink); background: #fff; font-size: 15px; line-height: 1.5; }
.calculator-request-form textarea:focus { border-color: var(--blue-bright); box-shadow: 0 0 0 4px rgba(41,152,255,.12); outline: 0; }
.calculator-request-form .primary-button { width: 100%; cursor: pointer; }
.calculator-request-status { min-height: 18px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.calculator-request-status.is-error { color: #9b2a1d; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.faq-list summary { padding: 18px 20px; cursor: pointer; font-weight: 800; }
.faq-list p { margin: 0; padding: 0 20px 20px; }
.sources { margin: 20px 14px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.sources a { color: var(--blue); }
.site-footer { width: min(1280px, calc(100% - 40px)); margin: 0 auto; }

@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; }
  .workbook-shot { max-width: 850px; transform: none; }
  .calculator-grid { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .schedule-preview { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .site-header { min-height: 64px; }
  .site-header nav a:not(.newbuilds-link) { display: none; }
  .newbuilds-link { padding: 10px 13px; font-size: 11px; }
  .page-shell { width: min(100% - 24px, 1280px); }
  .hero { gap: 30px; min-height: 0; padding: 30px 22px; border-radius: 24px; }
  h1 { font-size: 42px; }
  .hero-lead { font-size: 16px; }
  .hero-actions { display: grid; }
  .workbook-shot img { border-width: 5px; border-radius: 13px; }
  .calculator-section { padding: 24px 14px; border-radius: 24px; }
  .calculator-form, .result-card { padding: 22px 16px; border-radius: 22px; }
  .two-cols { grid-template-columns: 1fr; }
  .fields label > span:first-child { min-height: 0; }
  .highlight-grid { grid-template-columns: 1fr; }
  .schedule-preview { padding: 20px 14px; }
  .guide-intro, .content-section, .steps-section, .faq-section, .online-link-section, .calculator-request { padding: 28px 22px; border-radius: 22px; }
  .feature-grid, .formula-grid, .check-list { grid-template-columns: 1fr; }
  .feature-grid section { padding: 24px 20px; }
  .steps-section li { grid-template-columns: 38px minmax(0, 1fr); }
  .steps-section li span { grid-column: 2; }
  .online-link-section { display: grid; }
  .online-link-section .secondary-button { width: 100%; }
  .calculator-request { grid-template-columns: 1fr; gap: 22px; }
  .calculator-request-form { padding: 18px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
