:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --success: #22C55E;
  --warning: #1D4ED8;
  --risk: #0F172A;
  --text: #0F172A;
  --muted: #64748B;
  --background: #F8FAFC;
  --surface: #FFFFFF;
  --surface-soft: #F1F5F9;
  --border: #E2E8F0;
  --shadow: 0 10px 30px rgba(37, 99, 235, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 3px;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(255, 255, 255, 0.96);
}

.nav-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: block;
}

.site-menu {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-menu a {
  position: relative;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease;
}

.site-menu a::after {
  position: absolute;
  right: 12px;
  bottom: 6px;
  left: 12px;
  height: 2px;
  border-radius: 99px;
  background: var(--primary);
  content: "";
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-menu a:hover,
.site-menu a.is-active {
  color: var(--text);
  background: var(--surface-soft);
}

.site-menu a:hover::after,
.site-menu a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-cta,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.nav-cta,
.button.primary {
  color: #FFFFFF;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.nav-cta:hover,
.button.primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px) scale(1.02);
}

.button.secondary {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.18);
  background: #FFFFFF;
}

.button.secondary:hover {
  color: #FFFFFF;
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px) scale(1.02);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: var(--text);
}

.hero {
  padding: 54px 0 22px;
  background: var(--background);
  text-align: center;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-subtitle {
  max-width: 620px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  font-weight: 500;
}

.hero-button {
  margin-top: 22px;
}

.section-heading {
  max-width: 640px;
  margin-bottom: 18px;
}

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading.compact {
  margin-bottom: 16px;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 500;
}

.calculator-section {
  padding: 18px 0 38px;
  background: var(--background);
}

.calculator-wrap {
  display: flex;
  justify-content: center;
}

.calc-panel {
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.74fr);
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.calc-input-side {
  min-width: 0;
}

.calc-intro {
  max-width: 460px;
  margin-bottom: 12px;
}

.calc-intro h2 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.calc-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calc-form label {
  display: grid;
  gap: 5px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
}

.calc-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 0 11px;
  color: var(--text);
  background: var(--surface);
  font-size: 0.94rem;
  font-weight: 800;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.calc-form input:hover {
  border-color: #94A3B8;
}

.calc-form input:focus {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  outline: none;
}

.calc-form input.has-error {
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.field-error {
  min-height: 14px;
  color: var(--risk);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.calc-submit {
  min-height: 42px;
  grid-column: 1 / -1;
  margin-top: 0;
  font-size: 0.92rem;
}

.calc-results {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: none;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.calc-results:hover {
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.calc-results.is-updated {
  animation: scale-fade 400ms ease both;
}

.results-heading {
  margin-bottom: 10px;
}

.results-heading h3 {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.result-card {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.result-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.07);
}

.result-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.result-card strong {
  display: block;
  margin: 0;
  font-size: clamp(1.06rem, 2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.08;
  text-align: right;
}

.result-card p {
  grid-column: 2;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

.info-card {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.04);
}

.info-card strong {
  color: var(--primary);
}

.safe-card,
.status-card.safe {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.05);
}

.safe-card strong,
.status-card.safe strong {
  color: var(--success);
}

.status-card.warning {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.06);
}

.status-card {
  grid-column: auto;
}

.status-card.warning strong {
  color: var(--warning);
}

.status-card.risk {
  border-color: rgba(15, 23, 42, 0.22);
  background: #F8FAFC;
}

.status-card.risk strong {
  color: var(--risk);
}

.result-grid.is-disabled .result-card {
  border-color: var(--border);
  background: #F8FAFC;
  box-shadow: none;
}

.result-grid.is-disabled .result-card strong {
  color: var(--muted);
}

.result-grid.is-disabled .status-card {
  border-color: rgba(15, 23, 42, 0.22);
  background: #F8FAFC;
}

.result-grid.is-disabled .status-card strong {
  color: var(--risk);
}

.indicator {
  width: 1px;
  height: 1px;
  overflow: hidden;
  position: absolute;
  opacity: 0;
}

.indicator span {
  display: block;
  width: 1px;
  height: 1px;
}

.faq-section {
  padding: 34px 0 44px;
  background: var(--background);
}

.features-section,
.about-section,
.terms-section,
.contact-section {
  padding: 42px 0;
  background: var(--background);
}

.features-section {
  border-top: 1px solid var(--border);
}

.about-section,
.contact-section {
  background: #FFFFFF;
}

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

.feature-card,
.content-card,
.policy-card,
.contact-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.feature-card {
  padding: 18px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.feature-card:hover {
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.10);
  transform: translateY(-3px);
}

.feature-card p,
.content-card p,
.policy-card p,
.contact-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.content-wrap {
  max-width: 860px;
}

.content-card,
.policy-card,
.contact-card {
  padding: 20px;
}

.content-card p:first-child,
.contact-card p:first-child {
  margin-top: 0;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.terms-wrap {
  max-width: 860px;
}

.terms-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

details:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

summary {
  cursor: pointer;
  font-weight: 800;
}

details p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 500;
  animation: fade-up 600ms ease both;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.calc-panel.reveal {
  transform: translateX(-18px);
  transition-duration: 500ms;
}

.calc-panel.reveal.is-visible {
  transform: translateX(0);
  animation: slide-in 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.feature-card.reveal,
.result-card.reveal,
details.reveal,
.content-card.reveal,
.policy-card.reveal,
.contact-card.reveal {
  transform: translateY(10px) scale(0.98);
  transition-duration: 400ms;
}

.feature-card.reveal.is-visible,
.result-card.reveal.is-visible,
details.reveal.is-visible,
.content-card.reveal.is-visible,
.policy-card.reveal.is-visible,
.contact-card.reveal.is-visible {
  transform: translateY(0) scale(1);
}

.feature-card.reveal.is-visible:hover,
.result-card.reveal.is-visible:hover,
details.reveal.is-visible:hover,
.content-card.reveal.is-visible:hover,
.policy-card.reveal.is-visible:hover,
.contact-card.reveal.is-visible:hover {
  transform: translateY(-3px) scale(1);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-fade {
  from {
    opacity: 0.72;
    transform: scale(0.985);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.site-footer {
  padding: 34px 0 24px;
  border-top: 1px solid var(--border);
  background: #FFFFFF;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(200px, 1fr);
  gap: 28px;
  align-items: start;
}

.footer-brand p,
.footer-column p,
.footer-bottom p {
  margin: 0;
}

.footer-brand p,
.footer-column p {
  max-width: 340px;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 600;
}

.footer-column h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  width: fit-content;
  color: var(--muted);
  font-weight: 700;
  transition: color 180ms ease, transform 180ms ease;
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(100, 116, 139, 0.16);
  color: var(--muted);
  font-weight: 700;
}

.footer-caption {
  color: var(--primary);
}

@media (max-width: 980px) {
  .calc-panel {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .container,
  .nav-shell {
    width: min(100% - 24px, 1120px);
  }

  .nav-shell {
    min-height: 62px;
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
  }

  .site-menu,
  .nav-cta {
    display: none;
  }

  .site-menu.open {
    display: grid;
    grid-column: 1 / -1;
    justify-self: stretch;
    gap: 6px;
    padding: 0 0 12px;
  }

  .site-menu.open a {
    min-height: 46px;
    border: 1px solid var(--border);
    background: var(--surface);
  }

  .hero {
    padding: 34px 0 14px;
  }

  h1 {
    font-size: clamp(2.25rem, 12vw, 3.2rem);
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-button {
    width: 100%;
    margin-top: 18px;
  }

  .calculator-section {
    padding: 14px 0 28px;
  }

  .section-heading {
    margin-bottom: 14px;
  }

  .section-heading.centered {
    text-align: left;
  }

  .calc-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
    border-radius: 20px;
  }

  .calc-intro {
    margin-bottom: 12px;
  }

  .calc-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .calc-form input {
    min-height: 42px;
  }

  .calc-submit {
    width: 100%;
  }

  .calc-results {
    padding: 12px;
  }

  .feature-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    min-height: 0;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .contact-card {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-actions {
    justify-content: stretch;
  }

  .contact-actions .button {
    flex: 1 1 100%;
  }
}

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