:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #5f6b7a;
  --brand: #2563eb;
  --brand-dark: #1e40af;
  --brand-soft: #dbeafe;
  --green: #15803d;
  --red: #b42318;
  --yellow: #8a5a00;
  --line: #dbe3ef;
  --shadow: 0 24px 70px rgba(23, 32, 51, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #edf4ff 0%, var(--bg) 42%, #fff 100%);
  line-height: 1.6;
}

a { color: var(--brand-dark); }
.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  color: var(--brand-dark);
  font-size: 1.2rem;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 18px; font-size: 0.95rem; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 700; }
.nav-links a:hover { color: var(--brand-dark); }
.hero-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 20px 82px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: 36px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 900;
}
h1, h2, h3 { line-height: 1.1; margin: 0 0 14px; }
h1 { font-size: clamp(2.35rem, 6vw, 5rem); max-width: 920px; letter-spacing: -0.055em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 3rem); letter-spacing: -0.035em; }
h3 { font-size: 1.15rem; }
.hero-copy { max-width: 720px; color: var(--muted); font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 900;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  min-height: 48px;
  font: inherit;
}
.button.primary { background: var(--brand); color: #fff; box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22); }
.button.primary:hover { background: var(--brand-dark); }
.button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.button.full { width: 100%; }
.button.disabled { opacity: 0.62; pointer-events: none; }
.hero-card, .calculator-card, .results-card, .offer-card, .related-grid article, .faq-section details, .notice-card, .formula-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 28px;
}
.hero-card { padding: 28px; }
.card-label { display: block; color: var(--muted); font-weight: 800; margin-bottom: 8px; }
.hero-card strong { display: block; font-size: 2rem; line-height: 1.05; margin-bottom: 12px; }
.section { max-width: 1180px; margin: 0 auto; padding: 56px 20px; }
.notice-section { padding-top: 0; }
.notice-card { padding: 24px; border-left: 6px solid var(--brand); }
.notice-card h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
.section-heading { max-width: 760px; margin-bottom: 26px; }
.section-heading p, .content-section p, .offer-card p, .hero-card p, .notice-card p { color: var(--muted); }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr); gap: 24px; align-items: start; }
.calculator-card, .results-card { padding: 24px; }
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
legend { grid-column: 1 / -1; font-weight: 900; font-size: 1.1rem; margin-bottom: 2px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 0.92rem; font-weight: 800; }
label.wide { grid-column: 1 / -1; }
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
input:focus { outline: 3px solid rgba(37, 99, 235, 0.18); border-color: var(--brand); }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.preset-button {
  border: 1px solid var(--line);
  background: #f8fbff;
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 800;
}
.preset-button:hover, .preset-button.active { background: var(--brand-soft); border-color: #93c5fd; }
.result-topline {
  padding: 22px;
  border-radius: 22px;
  background: #172033;
  color: #fff;
  margin-bottom: 16px;
}
.result-topline span { display: block; opacity: 0.75; font-weight: 800; }
.result-topline strong { display: block; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1; margin-top: 8px; }
.result-topline.positive { background: #0f5132; }
.result-topline.warning { background: #6b4e00; }
.result-topline.negative { background: #842029; }
.metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.metrics-grid div { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #f8fbff; }
.metrics-grid span { display: block; color: var(--muted); font-size: 0.83rem; font-weight: 800; }
.metrics-grid strong { display: block; font-size: 1.35rem; margin-top: 4px; }
.advice-box { margin-top: 16px; padding: 18px; border-radius: 20px; background: #eef5ff; border: 1px solid #bfdbfe; }
.advice-box.good { background: #edfdf4; border-color: #bbf7d0; }
.advice-box.caution { background: #fff8db; border-color: #fde68a; }
.advice-box.bad { background: #fff1f0; border-color: #fecaca; }
.small-note { font-size: 0.86rem; color: var(--muted); }
.scenario-card { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.scenario-table-wrap { overflow-x: auto; }
.scenario-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.scenario-table th, .scenario-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.scenario-table th { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.scenario-table tr.active-row td { background: var(--brand-soft); font-weight: 900; }
.formula-card { padding: 22px; box-shadow: none; margin-top: 18px; }
.formula-card p { margin: 8px 0; }
.plain-list { color: var(--muted); padding-left: 22px; }
.plain-list li { margin-bottom: 10px; }
.offer-card { padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: center; }
.offer-card ul { padding-left: 20px; }
.price-card { border: 1px solid var(--line); border-radius: 22px; padding: 20px; background: #f8fbff; text-align: center; }
.price-card span { color: var(--muted); font-weight: 900; }
.price-card strong { display: block; font-size: 4rem; line-height: 1; margin: 10px 0 18px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.related-grid article { padding: 20px; box-shadow: none; }
.faq-section details { padding: 18px 20px; margin-bottom: 12px; box-shadow: none; }
.faq-section summary { cursor: pointer; font-weight: 900; }
.compact-section { padding-top: 34px; padding-bottom: 34px; }
.footer { text-align: center; color: var(--muted); padding: 34px 20px 52px; }

@media (max-width: 840px) {
  .hero-grid, .tool-layout, .offer-card, .related-grid { grid-template-columns: 1fr; }
  fieldset { grid-template-columns: 1fr; }
  label.wide { grid-column: auto; }
  .nav { align-items: flex-start; }
  .nav-links { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 520px) {
  .nav { display: block; }
  .nav-links { margin-top: 12px; justify-content: flex-start; }
  .metrics-grid { grid-template-columns: 1fr; }
  .hero-grid { padding-top: 32px; }
  .preset-row { display: grid; }
}
