:root {
  --violet: #7c3aed;
  --pink: #ec4899;
  --orange: #fb923c;
  --ink: #1a1030;
  --ink-soft: #574a72;
  --ink-faint: #9b8fb0;
  --card-bg: #ffffff;
  --border: #ece7f5;
  --accent-soft: #f4edfe;
  --radius: 22px;
  --navbar-h: 64px;
}

@media (max-width: 480px) {
  :root { --navbar-h: 56px; }
}

* { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 10%, #2a1b52 0%, #1a1030 55%, #12081f 100%);
  position: relative;
}

.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
  animation: drift 16s ease-in-out infinite;
}

.blob-a {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -100px;
  background: var(--violet);
  animation-delay: 0s;
}

.blob-b {
  width: 380px;
  height: 380px;
  bottom: -140px;
  right: -100px;
  background: var(--pink);
  animation-delay: -5s;
}

.blob-c {
  width: 320px;
  height: 320px;
  top: 40%;
  right: 15%;
  background: var(--orange);
  opacity: 0.35;
  animation-delay: -10s;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
}

.scene {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--navbar-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 16px;
}

/* --- Sitewide navbar --- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  background: rgba(18, 8, 31, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-inner {
  height: var(--navbar-h);
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.navbar-brand .logo-mark {
  width: 26px;
  height: 26px;
}

.navbar-brand-text em {
  font-style: normal;
  background: linear-gradient(90deg, var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.navbar-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  padding: 4px 2px;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.navbar-links a:hover { color: #fff; }

.navbar-links a.active { color: #fff; }

.navbar-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--pink));
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.navbar-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.navbar-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }

.navbar-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 720px) {
  .navbar-toggle { display: flex; }

  .navbar-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: rgba(18, 8, 31, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 20px 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }

  .navbar-links.open {
    max-height: 320px;
    opacity: 1;
  }

  .navbar-links a {
    width: 100%;
    padding: 12px 0;
    font-size: 14.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .navbar-links a.active::after { display: none; }
  .navbar-links a.active { color: var(--pink); }
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -24px rgba(18, 8, 31, 0.55), 0 0 0 1px rgba(255,255,255,0.06);
  padding: 40px 40px 32px;
  text-align: center;
  animation: rise 0.5s ease-out;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 20px;
}

.brand span {
  background: linear-gradient(90deg, var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  flex-shrink: 0;
  display: block;
}

.country-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border: 1px solid #ecdcfb;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 24px;
}

.country-picker select {
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: var(--violet);
  cursor: pointer;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 8px;
}

.hero-number {
  font-size: clamp(42px, 11vw, 70px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 4px 0 16px;
  background: linear-gradient(90deg, var(--violet) 0%, var(--pink) 55%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
  max-width: 460px;
  margin: 0 auto 18px;
}

.hero-sub strong { color: var(--ink); }

.age-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 10px 16px;
  margin: 0 0 18px;
}

.age-control label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.age-control input {
  width: 64px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--violet);
  text-align: center;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1.5px solid #ecdcfb;
  background: var(--accent-soft);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.age-control input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
}

.age-note {
  flex-basis: 100%;
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.5;
}

.age-note strong { color: var(--ink-soft); }

.basis {
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border: 1px solid #ecdcfb;
  border-radius: 14px;
  padding: 12px 16px;
  line-height: 1.5;
}

.basis strong { color: var(--ink); }

.basis-link {
  display: block;
  margin-top: 8px;
  color: var(--violet);
  font-weight: 700;
  text-decoration: none;
}

.basis-link:hover { text-decoration: underline; }

.compare-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 700;
  color: var(--violet);
  background: var(--accent-soft);
  border: 1px solid #ecdcfb;
  border-radius: 999px;
  padding: 7px 16px;
  text-decoration: none;
}

.compare-link:hover { text-decoration: underline; }

.mode-toggle {
  display: inline-flex;
  background: var(--accent-soft);
  border: 1px solid #ecdcfb;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}

.mode-btn {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mode-btn:hover:not(.active) { color: var(--ink); }

.mode-btn.active {
  color: #fff;
  background: linear-gradient(90deg, var(--violet), var(--pink));
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0 26px;
}

.chart-section h2,
.calculator h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 4px;
}

.calc-sub {
  color: var(--ink-faint);
  font-size: 13.5px;
  margin: 0 0 18px;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  margin-bottom: 10px;
}

.compare-chart-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 8px;
}

.chart-note {
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.5;
  margin: 0;
}

.field-row {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.field-row label {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.field-row input {
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fbfaff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-row input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
  background: #fff;
}

.result {
  background: linear-gradient(120deg, var(--accent-soft), #fdeefc);
  color: var(--violet);
  font-weight: 700;
  font-size: 15px;
  border-radius: 16px;
  padding: 16px 18px;
  line-height: 1.5;
  transition: background 0.2s ease;
}

.result.done {
  background: linear-gradient(120deg, #e9fbf1, #eafcf5);
  color: #12946a;
}

.result .big {
  display: block;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 2px;
}

.result .future-age {
  display: block;
  margin-top: 8px;
  color: var(--orange);
  font-weight: 700;
  font-size: 13px;
}

footer {
  margin-top: 28px;
  font-size: 11.5px;
  color: var(--ink-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

footer div {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c9c9c9;
  flex-shrink: 0;
}

.dot.ok { background: #2fbf71; }
.dot.pending { background: #e0a83e; }

/* --- How-it-works page --- */

.card-wide {
  max-width: 720px;
  text-align: left;
}

.card-wide h1,
.card-wide .page-sub,
.card-wide .chart-section,
.card-wide .example-box,
.card-wide .age-control,
.card-wide .compare-caveat {
  text-align: center;
}

.back-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--violet);
  text-decoration: none;
  margin-bottom: 18px;
}

.back-link:hover { text-decoration: underline; }

.page-title {
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 4px 0 10px;
}

.page-sub {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 28px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fbfaff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
}

.step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--pink));
}

.step-body h3 {
  margin: 2px 0 4px;
  font-size: 15px;
  font-weight: 800;
}

.step-body p {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.step-value {
  display: inline-block;
  font-weight: 800;
  font-size: 14.5px;
  color: var(--violet);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 4px 10px;
}

.timeline-section,
.formula-section {
  margin-bottom: 32px;
}

.timeline-section h2,
.formula-section h2,
.chart-section h2 {
  text-align: center;
}

.timeline-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  margin: 44px 6px 12px;
}

.timeline-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--pink));
}

.timeline-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.dot-violet { background: var(--violet); }
.dot-pink { background: var(--pink); }

.timeline-label {
  position: absolute;
  top: -26px;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
}

.timeline-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-faint);
  padding: 0 6px;
}

.formula-box {
  background: #fbfaff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.formula {
  font-size: clamp(14px, 3.4vw, 17px);
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 0;
}

.frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin-left: 6px;
  font-weight: 700;
}

.frac .num {
  padding: 0 6px 3px;
  border-bottom: 2px solid var(--ink);
}

.frac .den {
  padding-top: 3px;
}

.formula-legend {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.formula-note {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 14px 4px 0;
}

.formula-note code {
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 12.5px;
}

.example-box {
  background: linear-gradient(120deg, var(--accent-soft), #fdeefc);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 28px;
}

.example-box p {
  margin: 0 0 6px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.example-result {
  font-size: 22px;
  font-weight: 900;
  color: var(--violet);
}

.example-compare {
  font-size: 12.5px;
  color: var(--ink-faint) !important;
}

.disclaimer {
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.6;
  text-align: center;
  margin: 0 0 22px;
}

/* --- Compare-countries table --- */

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.compare-table th,
.compare-table td {
  padding: 11px 14px;
  text-align: left;
  white-space: nowrap;
}

.compare-table thead th {
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  position: sticky;
  top: 0;
}

.compare-table tbody tr {
  border-top: 1px solid var(--border);
}

.compare-table tbody tr:hover {
  background: #fbfaff;
}

.compare-table .qn-cell {
  font-weight: 800;
  color: var(--violet);
}

.compare-table .own-row {
  background: linear-gradient(120deg, var(--accent-soft), #fdeefc);
}

.compare-table .own-row .qn-cell { color: var(--pink); }

.compare-table .flag {
  font-size: 15px;
  margin-right: 2px;
  vertical-align: -1px;
}

.own-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, var(--violet), var(--pink));
  border-radius: 999px;
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.compare-caveat {
  margin: 0 0 24px;
}

.cta-link {
  display: block;
  text-align: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, var(--violet), var(--pink));
  border-radius: 999px;
  padding: 13px 20px;
  text-decoration: none;
}

.cta-link:hover { opacity: 0.92; }

/* --- Site footer (below the card, on the dark background) --- */

.site-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  line-height: 1.7;
}

.site-footer p { margin: 0; }

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

.footer-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.footer-logo .logo-mark {
  width: 26px;
  height: 26px;
}

/* --- Floating scroll-to-calculator button --- */

.fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  box-shadow: 0 12px 26px -8px rgba(124, 58, 237, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.fab:hover { transform: translateY(-2px) scale(1.04); }

.fab-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.8);
}

/* --- "Corporate slave" floating bubble --- */

.slave-bubble {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 21;
  width: min(320px, calc(100vw - 32px));
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 50px -14px rgba(18, 8, 31, 0.5), 0 0 0 1px rgba(0,0,0,0.04);
  padding: 18px 20px 16px;
  text-align: center;
  animation: bubble-rise 0.35s ease-out;
}

@keyframes bubble-rise {
  from { opacity: 0; transform: translateX(-50%) translateY(14px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.slave-bubble-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.slave-bubble-text {
  margin: 4px 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.slave-bubble-sub {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.slave-bubble-cta {
  display: inline-block;
  font-weight: 800;
  font-size: 13.5px;
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  border-radius: 999px;
  padding: 10px 18px;
  text-decoration: none;
}

.slave-bubble-cta:hover { opacity: 0.92; }

@media (max-width: 480px) {
  .card { padding: 28px 20px 24px; border-radius: 18px; }
  .field-row { flex-direction: column; }
  .chart-wrap { height: 200px; }
  .blob { filter: blur(50px); opacity: 0.4; }
  .card-wide { text-align: left; }
  .step { flex-direction: column; }
  .timeline-track { margin: 40px 4px 12px; }
  .timeline-label { font-size: 10.5px; padding: 2px 7px; }
  .fab { right: 16px; bottom: 16px; width: 48px; height: 48px; }
  .slave-bubble { bottom: 16px; padding: 16px 18px 14px; }
  .compare-table th, .compare-table td { padding: 9px 12px; font-size: 12.5px; }
  .navbar-inner { padding: 0 14px; }
}
