*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 500;
  color: #0C4A6E;
  background: #FFFFFF;
  line-height: 1.55;
}

img,
svg,
input {
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid #38BDF8;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  padding: 10px 14px;
  background: #0C4A6E;
  color: #fff;
  border-radius: 12px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 448px;
  margin: 0 auto;
  padding: 18px 20px 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.waves {
  display: block;
  flex-shrink: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  color: #0C4A6E;
}

.age {
  font-size: 12px;
  font-weight: 700;
  color: #0C4A6E;
  background: #F1F5F9;
  border-radius: 999px;
  padding: 6px 10px;
}

.hero {
  max-width: 448px;
  margin: 0 auto;
  padding: 28px 20px 8px;
  text-align: center;
  background: #FFFFFF;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 7vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #0C4A6E;
}

.hero-text {
  margin: 0 auto;
  max-width: 34em;
  color: #3B6B86;
  font-size: 16px;
}

.calc {
  position: relative;
  max-width: 448px;
  margin: 28px auto 40px;
  padding: 28px 20px 24px;
  background: #FFFFFF;
  border-radius: 28px;
  box-shadow: 0 12px 40px rgba(12, 74, 110, 0.08);
}

.label {
  margin: 0 0 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #3B6B86;
}

.display {
  margin: 0 auto 14px;
  max-width: 100%;
  padding: 8px 8px 10px;
  border-bottom: 2px solid #38BDF8;
  font-size: clamp(1.65rem, 8.2vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-align: center;
  color: #0C4A6E;
  white-space: nowrap;
}

input[type="range"] {
  display: block;
  width: 100%;
  height: 32px;
  margin: 0;
  appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38BDF8 var(--progress, 7%), #F1F5F9 var(--progress, 7%));
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  background: #FFFFFF;
  border: 3px solid #38BDF8;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(12, 74, 110, 0.12);
}

input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: #F1F5F9;
}

input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: #38BDF8;
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: #FFFFFF;
  border: 3px solid #38BDF8;
  border-radius: 50%;
}

.range-ends {
  display: flex;
  justify-content: space-between;
  margin: 2px 0 24px;
  font-size: 12px;
  color: #3B6B86;
}

.term-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.term {
  min-height: 54px;
  padding: 0 8px;
  border: 0;
  background: #F1F5F9;
  color: #0C4A6E;
  border-radius: 16px;
  font-weight: 700;
}

.term.is-on {
  background: #38BDF8;
  color: #0C4A6E;
}

.term-live {
  margin: 12px 0 0;
  text-align: center;
  font-weight: 700;
}

.calc-note {
  margin: 18px 0 16px;
  text-align: center;
  font-size: 13px;
  color: #3B6B86;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-main {
  background: #38BDF8;
  color: #0C4A6E;
}

.btn-soft {
  margin-top: 10px;
  background: #F1F5F9;
  color: #0C4A6E;
}

.load-box {
  padding: 36px 8px;
  text-align: center;
}

.pulse {
  width: 22px;
  height: 22px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #38BDF8;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.load-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
}

.load-sub {
  margin: 0;
  color: #3B6B86;
}

.calc:has(#resultView:not([hidden])) {
  background: #E0F2FE;
  box-shadow: none;
}

.veil {
  padding: 4px 0;
}

.result-card {
  padding: 22px 16px 18px;
  background: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(12, 74, 110, 0.1);
  text-align: center;
}

.result-kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #3B6B86;
}

.code {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 12vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
}

.sum {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  background: #F1F5F9;
  border-radius: 18px;
  text-align: left;
}

.sum p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.sum span {
  color: #3B6B86;
}

.result-note {
  margin: 0 0 16px;
  font-size: 13px;
  color: #3B6B86;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 448px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.pill {
  flex: 1 1 200px;
  padding: 18px 16px;
  background: #FFFFFF;
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(12, 74, 110, 0.06);
}

.pill-t {
  margin: 0 0 6px;
  font-weight: 800;
}

.pill-d {
  margin: 0;
  font-size: 14px;
  color: #3B6B86;
}

.how,
.faq {
  max-width: 448px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.how h2,
.faq h2 {
  margin: 0 0 16px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.how-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
}

.how-n {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  color: #38BDF8;
  border-radius: 50%;
  font-weight: 800;
}

.how-t {
  margin: 0 0 4px;
  font-weight: 800;
}

.how-d {
  margin: 0;
  font-size: 14px;
  color: #3B6B86;
}

.faq-item {
  margin-bottom: 10px;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 6px 22px rgba(12, 74, 110, 0.05);
}

.faq-q {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: #0C4A6E;
  text-align: left;
  font-weight: 700;
  border-radius: 18px;
}

.faq-a {
  display: none;
  padding: 0 16px 14px;
  color: #3B6B86;
  font-size: 14px;
}

.faq-a p {
  margin: 0;
}

.faq-item.is-open .faq-a {
  display: block;
}

.foot {
  max-width: 448px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  text-align: center;
  font-size: 13px;
  color: #3B6B86;
}

.foot-brand {
  margin: 0 0 10px;
  font-weight: 800;
  color: #0C4A6E;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
  margin-top: 16px;
}

.foot-nav a {
  color: #0C4A6E;
}

.legal-page {
  background: #F1F5F9;
}

.legal-page .legal-hero {
  max-width: 448px;
  margin: 0 auto;
  padding: 24px 20px 8px;
}

.back-link {
  display: inline-block;
  margin-bottom: 12px;
  color: #3B6B86;
  text-decoration: none;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 6vw, 2rem);
  color: #0C4A6E;
}

.legal-wrap {
  max-width: 448px;
  margin: 0 auto;
  padding: 16px 20px 64px;
}

.legal-paper {
  padding: 24px 20px;
  background: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 10px 32px rgba(12, 74, 110, 0.06);
}

.legal-paper h2 {
  margin: 24px 0 8px;
  font-size: 17px;
}

.legal-paper p,
.legal-paper li {
  color: #3B6B86;
}

.legal-paper ul {
  padding-left: 18px;
}

@media (min-width: 640px) {
  .calc {
    padding: 36px 36px 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .pulse {
    animation: none;
  }
}
