:root {
  --primary: #0b3a67;
  --primary-2: #114a84;
  --accent: #0f9d8a;
  --accent-2: #00b8a6;
  --bg: #f4f8fc;
  --bg-2: #edf4fb;
  --card: rgba(255, 255, 255, 0.92);
  --card-strong: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbe4ef;
  --border-strong: #c7d3e1;
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  --shadow-2: 0 18px 54px rgba(15, 23, 42, 0.12);
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1140px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(17, 74, 132, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(15, 157, 138, 0.08), transparent 25%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}
body::selection { background: rgba(15, 157, 138, 0.18); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  width: min(var(--max), 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(219, 228, 239, 0.85);
  transition: box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}
.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.92);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 850;
  letter-spacing: 0.2px;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.logo::before {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 5px rgba(15, 157, 138, 0.1);
}

.main-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.main-nav a {
  color: #213047;
  font-weight: 600;
  text-decoration: none;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  transition: background-color 160ms ease, color 160ms ease;
}
.main-nav a:hover,
.main-nav a:focus-visible {
  background: rgba(11, 58, 103, 0.08);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}
.nav-toggle:hover { text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.78rem 1.1rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}
.btn:focus-visible,
.nav-toggle:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(15, 157, 138, 0.25);
  outline-offset: 2px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}
.btn-secondary {
  background: #fff;
  color: var(--primary);
  border-color: rgba(11, 58, 103, 0.18);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(15, 157, 138, 0.12), transparent 26%),
    radial-gradient(circle at 80% 0%, rgba(11, 58, 103, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(244, 248, 252, 0.8) 0%, rgba(244, 248, 252, 1) 100%);
  padding: 4.2rem 0 3.4rem;
  border-bottom: 1px solid var(--border);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(0);
  pointer-events: none;
}
.hero::before {
  width: 15rem;
  height: 15rem;
  right: -4rem;
  top: 0;
  background: radial-gradient(circle, rgba(15, 157, 138, 0.16), transparent 65%);
  animation: float 10s ease-in-out infinite;
}
.hero::after {
  width: 10rem;
  height: 10rem;
  left: -2rem;
  bottom: 0;
  background: radial-gradient(circle, rgba(11, 58, 103, 0.14), transparent 65%);
  animation: float 12s ease-in-out infinite reverse;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 1.5rem;
  align-items: start;
}
.hero h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}
.hero p {
  color: var(--muted);
  font-size: 1.04rem;
  max-width: 62ch;
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.15rem;
  flex-wrap: wrap;
}

.section {
  padding: 3.2rem 0;
}
.bg-soft {
  background: linear-gradient(180deg, rgba(244, 248, 252, 0.8), rgba(237, 244, 251, 0.9));
}
.section h2,
.prose h1,
.prose h2 {
  letter-spacing: -0.02em;
}
.section h2 {
  margin-top: 0;
}

.card {
  background: var(--card);
  border: 1px solid rgba(219, 228, 239, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.card h2,
.card h3 { margin-top: 0; }
.card ul { padding-left: 1.15rem; }
.card li { margin-bottom: 0.35rem; }

.stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.9));
  border-top: 4px solid rgba(15, 157, 138, 0.85);
}

.tool-grid,
.feature-grid,
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tool-card,
.guide-card {
  position: relative;
  display: block;
  border: 1px solid rgba(219, 228, 239, 0.95);
  border-radius: var(--radius-md);
  padding: 1.05rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, background-color 200ms ease;
  overflow: hidden;
}
.tool-card::before,
.guide-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.65;
}
.tool-card h3,
.guide-card h3 {
  margin: 0 0 0.45rem;
  color: var(--text);
}
.tool-card p,
.guide-card p {
  color: var(--muted);
  margin: 0;
}
.tool-card:hover,
.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: rgba(11, 58, 103, 0.18);
  text-decoration: none;
}
.tool-card.featured {
  background: linear-gradient(180deg, rgba(239,246,255,0.95), rgba(255,255,255,0.96));
}
.tool-card.muted {
  opacity: 0.8;
}

.section-action { margin: 1.2rem 0 0; }

.animate-in {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 360ms ease-out, transform 360ms ease-out;
  will-change: opacity, transform;
}
.animate-in.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.stagger-grid > *:nth-child(2) { transition-delay: 50ms; }
.stagger-grid > *:nth-child(3) { transition-delay: 100ms; }
.stagger-grid > *:nth-child(4) { transition-delay: 150ms; }
.stagger-grid > *:nth-child(5) { transition-delay: 200ms; }
.stagger-grid > *:nth-child(6) { transition-delay: 250ms; }

.compliance-strip {
  text-align: center;
  color: #334155;
}
.compliance-strip p {
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.footer-grid nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.footer-grid a {
  color: #334155;
}

.footer-grid nav a {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.09);
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.footer-grid nav a:hover {
  text-decoration: none;
  background: rgba(11, 58, 103, 0.08);
  border-color: rgba(11, 58, 103, 0.18);
}

.prose {
  max-width: 860px;
}
.prose h1 {
  margin-top: 0;
}
.prose h2 {
  margin-top: 1.8rem;
}
.prose p,
.prose li {
  color: #334155;
}
.prose a { font-weight: 600; }

.calc-wrap {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 1rem;
  align-items: start;
}
.calculator-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(290px, 0.92fr);
  gap: 1rem;
  align-items: start;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.field {
  display: grid;
  gap: 0.35rem;
}
.field label {
  font-size: 0.93rem;
  color: #334155;
  font-weight: 700;
}
.field small {
  color: var(--muted);
}
input,
select,
textarea {
  width: 100%;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-size: 0.98rem;
  background: #fff;
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
input:hover,
select:hover,
textarea:hover { border-color: #b9c7d8; }
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 157, 138, 0.75);
  box-shadow: 0 0 0 4px rgba(15, 157, 138, 0.12);
  outline: none;
}

.result-panel {
  position: sticky;
  top: 86px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,252,0.96));
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.result-item {
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(219, 228, 239, 0.95);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,250,252,0.92));
}
.result-item label {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}
.result-value {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
}
.result-value.large {
  font-size: 1.2rem;
}
.kpi {
  margin: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 650;
}
.kpi strong { color: var(--primary); }
.total-kpi {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-size: 1.05rem;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th,
td {
  padding: 0.68rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-size: 0.93rem;
}
th {
  background: #f8fbfe;
  color: #334155;
  position: sticky;
  top: 0;
}
th:first-child,
td:first-child { text-align: left; }

.faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  margin-bottom: 0.7rem;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.faq summary,
.prose summary {
  font-weight: 700;
  cursor: pointer;
}
.faq p {
  margin-bottom: 0;
}

.highlight-box,
.decision-box,
.disclaimer-box {
  border: 1px solid rgba(219, 228, 239, 0.95);
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,250,252,0.96));
  box-shadow: var(--shadow);
}

.highlight-box h3,
.decision-box h3 {
  margin-top: 0;
}

.guide-page,
.calculator-page {
  padding-bottom: 0.5rem;
}

.related-links ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1rem;
  padding-left: 1.1rem;
}
.related-links li {
  margin: 0;
}
.related-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(11, 58, 103, 0.05);
  border: 1px solid rgba(11, 58, 103, 0.08);
}
.related-links a:hover {
  text-decoration: none;
  background: rgba(15, 157, 138, 0.08);
}

.trust-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.trust-bar .card {
  padding: 0.95rem 1rem;
}
.trust-bar h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.trust-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumbs {
  font-size: 0.92rem;
  color: var(--muted);
}
.breadcrumbs a { color: var(--muted); }

@keyframes float {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(10px) translateX(-4px); }
}

@media (max-width: 1080px) {
  .tool-grid,
  .feature-grid,
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .hero-grid,
  .calc-wrap,
  .calculator-wrapper {
    grid-template-columns: 1fr;
  }
  .result-panel { position: static; }
  .footer-grid { align-items: flex-start; }
  .trust-bar,
  .related-links ul { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 4%;
    right: 4%;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-2);
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 0.75rem 0.8rem; }
  .nav-wrap { position: relative; }
  .site-header .btn-primary { display: none; }
  .hero,
  .section { padding: 2.3rem 0; }
  .hero h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .tool-grid,
  .feature-grid,
  .guide-grid,
  .form-grid,
  .result-grid,
  .trust-bar,
  .related-links ul {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .animate-in {
    opacity: 1;
    transform: none;
  }
}
