:root {
  --bg: #f4f6fa;
  --paper: #ffffff;
  --paper-soft: #f8fbff;
  --ink: #122033;
  --muted: #5f6c7a;
  --navy: #143a66;
  --navy-deep: #0b2240;
  --gold: #d89b2b;
  --mint: #1d8f6f;
  --red: #b84747;
  --line: rgba(20, 58, 102, 0.12);
  --shadow: 0 24px 60px rgba(18, 32, 51, 0.1);
  --radius: 24px;
  --radius-sm: 16px;
  --sans: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(216, 155, 43, 0.15), transparent 22%),
    radial-gradient(circle at left top, rgba(20, 58, 102, 0.14), transparent 18%),
    var(--bg);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(244, 246, 250, 0.9);
  border-bottom: 1px solid rgba(20, 58, 102, 0.08);
}

.nav-shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 1rem 0;
}

.brandmark {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.brandmark strong,
h1,
h2,
h3 {
  font-family: var(--serif);
  letter-spacing: -0.02em;
}

.brandmark-kicker,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  color: var(--navy);
  font-weight: 800;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

.site-nav a {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.site-nav a.is-active,
.site-nav a:hover {
  color: var(--navy-deep);
  background: rgba(20, 58, 102, 0.08);
}

.hero,
.page-hero {
  padding: 4.5rem 0 2rem;
}

.hero-grid,
.two-column,
.feature-grid,
.guide-grid,
.footer-grid,
.calculator-layout,
.dashboard-grid,
.chart-grid,
.scenario-grid,
.article-layout,
.state-hero-grid {
  display: grid;
  gap: 1.4rem;
}

.hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}

.hero h1,
.page-hero h1 {
  font-size: clamp(2.5rem, 4.2vw, 4.8rem);
  line-height: 0.98;
  margin: 0.35rem 0 1rem;
  max-width: 11ch;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 70ch;
}

.hero-panel-card,
.feature-card,
.guide-card,
.stat-card,
.compliance-panel,
.calculator-panel,
.side-card,
.dash-card,
.chart-card,
.scenario-card,
.faq-item,
.article-main,
.prose-shell,
.cookie-card,
.cookie-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel-card,
.feature-card,
.guide-card,
.compliance-panel,
.calculator-panel,
.side-card,
.dash-card,
.chart-card,
.scenario-card,
.cookie-card,
.cookie-panel {
  padding: 1.5rem;
}

.button-row,
.stat-grid,
.impact-grid,
.summary-grid,
.filter-buttons,
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 0.92rem 1.35rem;
  background: var(--navy);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--navy-deep);
}

.button-secondary,
.button-ghost {
  background: transparent;
  color: var(--navy-deep);
  border: 1px solid rgba(20, 58, 102, 0.18);
}

.button-secondary:hover,
.button-ghost:hover {
  background: rgba(20, 58, 102, 0.06);
}

.stat-grid {
  margin-top: 1.4rem;
}

.stat-card {
  padding: 1rem 1.1rem;
  flex: 1 1 180px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96));
  border: 1px solid var(--line);
}

.stat-card strong,
.summary-item strong,
.impact-grid strong {
  display: block;
  font-size: 1.35rem;
  color: var(--navy-deep);
  margin-bottom: 0.2rem;
}

.check-list,
.mini-list {
  padding-left: 1.1rem;
  margin: 0;
}

.check-list li,
.mini-list li {
  margin: 0.45rem 0;
}

.section {
  padding: 2rem 0 4rem;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(248, 251, 255, 0.75));
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 1.4rem;
}

.section-heading h2,
.calculator-panel h2,
.page-hero h1 {
  margin: 0.35rem 0 0.7rem;
  font-size: clamp(1.9rem, 3vw, 3rem);
}

.feature-grid,
.guide-grid,
.scenario-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card h3,
.guide-card h3,
.scenario-card h3 {
  margin: 0.35rem 0 0.65rem;
  font-size: 1.35rem;
}

.guide-card p,
.feature-card p,
.scenario-card p,
.microcopy,
.summary-item span,
.impact-grid span {
  color: var(--muted);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.94rem;
}

.meta-row a,
.text-link {
  color: var(--navy);
  font-weight: 700;
}

.two-column,
.calculator-layout,
.dashboard-grid,
.article-layout,
.footer-grid,
.state-hero-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calculator-layout {
  grid-template-columns: 1.35fr 0.65fr;
  align-items: start;
}

.chart-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-card-wide {
  grid-column: 1 / -1;
}

.sidebar-stack {
  display: grid;
  gap: 1rem;
}

.sticky-card {
  position: sticky;
  top: 5.6rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

label,
.search-box {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--navy-deep);
}

input,
select {
  width: 100%;
  padding: 0.92rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(20, 58, 102, 0.16);
  background: white;
  color: var(--ink);
  font: inherit;
}

.split-heading h3 {
  margin-bottom: 0.3rem;
  font-size: 1.18rem;
}

.split-heading p,
.alert-note,
.ai-report,
.legend-list,
.faq-item p {
  color: var(--muted);
}

.alert-note {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(20, 58, 102, 0.05);
  border: 1px solid rgba(20, 58, 102, 0.1);
  font-size: 0.95rem;
}

.summary-grid,
.impact-grid {
  gap: 1rem;
}

.summary-item,
.impact-grid > div {
  flex: 1 1 180px;
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  background: rgba(20, 58, 102, 0.05);
  border: 1px solid rgba(20, 58, 102, 0.08);
}

.dashboard-grid {
  align-items: stretch;
}

.ai-report {
  font-size: 1rem;
}

.pie-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 1rem;
}

.pie-chart {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) 0deg, var(--gold) 180deg, var(--navy) 180deg, var(--navy) 360deg);
  box-shadow: inset 0 0 0 20px rgba(255, 255, 255, 0.96);
  position: relative;
}

.pie-chart::after {
  content: "";
  position: absolute;
  inset: 48px;
  border-radius: 50%;
  background: white;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-right: 0.45rem;
}

.legend-principal {
  background: var(--gold);
}

.legend-interest {
  background: var(--navy);
}

.line-chart {
  width: 100%;
  min-height: 280px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(20, 58, 102, 0.04), rgba(20, 58, 102, 0));
  border: 1px solid rgba(20, 58, 102, 0.08);
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 0.8rem;
  align-items: end;
  min-height: 280px;
  padding-top: 1rem;
}

.bar-group {
  display: grid;
  gap: 0.4rem;
  align-items: end;
  justify-items: center;
}

.bar-stack {
  width: 100%;
  height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 14px 14px 6px 6px;
  background: rgba(20, 58, 102, 0.04);
  overflow: hidden;
  border: 1px solid rgba(20, 58, 102, 0.08);
}

.bar-principal {
  background: linear-gradient(180deg, #ebb44b, #d89b2b);
}

.bar-interest {
  background: linear-gradient(180deg, #2f5c94, #143a66);
}

.bar-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.badge,
.pill,
.pill-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  background: rgba(20, 58, 102, 0.08);
  color: var(--navy-deep);
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(20, 58, 102, 0.1);
}

.pill.is-active {
  background: var(--navy);
  color: white;
}

.table-shell {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.table-scroll {
  overflow: auto;
  max-height: 620px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  text-align: left;
  padding: 0.78rem 0.75rem;
  border-bottom: 1px solid rgba(20, 58, 102, 0.08);
  font-size: 0.94rem;
}

th {
  position: sticky;
  top: 0;
  background: var(--paper-soft);
  z-index: 1;
}

.ad-placeholder {
  min-height: 120px;
  border-radius: 18px;
  border: 1px dashed rgba(20, 58, 102, 0.28);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(20, 58, 102, 0.06),
      rgba(20, 58, 102, 0.06) 14px,
      rgba(255, 255, 255, 0.75) 14px,
      rgba(255, 255, 255, 0.75) 28px
    );
  color: var(--navy-deep);
  font-weight: 700;
}

.filter-bar {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.faq-item {
  padding: 1rem 1.2rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy-deep);
}

.prose-shell {
  padding: 2rem;
}

.prose-block {
  margin-bottom: 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(20, 58, 102, 0.08);
}

.prose-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.article-main {
  padding: 1.7rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  color: var(--muted);
  margin-bottom: 1rem;
}

.takeaway-block {
  background: rgba(20, 58, 102, 0.04);
  padding: 1rem 1.2rem;
  border-radius: 18px;
}

.site-footer {
  padding: 2rem 0 3.2rem;
  background: linear-gradient(180deg, rgba(11, 34, 64, 0.96), rgba(11, 34, 64, 1));
  color: rgba(255, 255, 255, 0.9);
}

.footer-brand {
  font-size: 1.3rem;
  margin: 0 0 0.6rem;
  font-family: var(--serif);
}

.footer-heading {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.footer-copy,
.footer-mail {
  color: rgba(255, 255, 255, 0.76);
}

.cookie-banner {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 40;
}

.cookie-card {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 1.2rem;
}

.cookie-dialog {
  border: none;
  padding: 0;
  background: transparent;
  width: min(720px, calc(100% - 2rem));
}

.cookie-dialog::backdrop {
  background: rgba(18, 32, 51, 0.48);
}

.cookie-panel {
  padding: 1.5rem;
}

.dialog-header,
.cookie-option {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.dialog-header {
  margin-bottom: 1rem;
  align-items: start;
}

.dialog-close {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  font-size: 1.3rem;
  background: rgba(20, 58, 102, 0.08);
  cursor: pointer;
}

.cookie-option {
  padding: 1rem 0;
  border-top: 1px solid rgba(20, 58, 102, 0.08);
}

.cookie-option:first-of-type {
  border-top: none;
  padding-top: 0.4rem;
}

.pill-locked {
  background: rgba(216, 155, 43, 0.12);
  color: #8b6515;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .hero-grid,
  .feature-grid,
  .guide-grid,
  .footer-grid,
  .calculator-layout,
  .dashboard-grid,
  .chart-grid,
  .scenario-grid,
  .article-layout,
  .state-hero-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .pie-shell {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .sticky-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 1rem, 1180px);
  }

  .nav-shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .cookie-card {
    grid-template-columns: 1fr;
  }

  .hero,
  .page-hero,
  .section {
    padding-top: 1.6rem;
  }

  .hero h1,
  .page-hero h1 {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button {
    transition: none;
  }
}
