/* ═══════════════════════════════════════════════════════════════════════════
   V1, AURORA
   Мягкая, премиальная. Свет + тьма. Градиентные "северные сияния".
   Serif заголовки (Fraunces), grotesk body (Inter). Blur, stroke, soft shadows.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --ff-serif: 'CoFo Sans', 'Manrope', ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --ff-sans:  'CoFo Sans', 'Manrope', ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --ff-mono:  ui-monospace, "SF Mono", "JetBrains Mono", Menlo, ui-monospace, monospace;

  /* brand, Freedom Bank */
  --brand: #02B140;         /* Freedom vivid green */
  --brand-deep: #164734;    /* Freedom forest secondary */
  --brand-soft: #3DD16A;
  --accent: #02B140;        /* unified accent on brand */
  --accent-2: #164734;

  --radius-xs: 8px;
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --radius-xl: 44px;

  --shadow-soft: 0 1px 2px rgba(0,0,0,.04), 0 8px 40px rgba(2,177,64,.10);
  --shadow-lift: 0 1px 2px rgba(0,0,0,.06), 0 20px 60px rgba(2,177,64,.18);

  --dur: 280ms;
  --ease: cubic-bezier(.22,.61,.36,1);
}

[data-theme="dark"] {
  --bg:        #06120C;            /* deep forest near-black */
  --bg-2:      #0B1D14;            /* slightly lifted forest */
  --surface:   rgba(255,255,255,.04);
  --surface-2: rgba(255,255,255,.06);
  --hairline:  rgba(174,232,196,.12);
  --hairline-strong: rgba(174,232,196,.22);
  --fg:        #E9F5EC;
  --fg-dim:    rgba(233,245,236,.66);
  --fg-mute:   rgba(233,245,236,.44);
  --brand-fg:  #3DD16A;            /* legible green on dark */
  --danger:    #FF6B7A;            /* legible red on dark */
  --invert-fg: #06120C;
  --glow-a:    rgba(2,177,64,.20);
  --glow-b:    rgba(61,209,106,.14);
  --glow-c:    rgba(22,71,52,.30);
}

[data-theme="light"] {
  --bg:        #F4F8F1;            /* soft natural off-white */
  --bg-2:      #E9F0E2;
  --surface:   rgba(22,71,52,.04);
  --surface-2: rgba(22,71,52,.06);
  --hairline:  rgba(22,71,52,.12);
  --hairline-strong: rgba(22,71,52,.22);
  --fg:        #0E1F18;
  --fg-dim:    rgba(14,31,24,.68);
  --fg-mute:   rgba(14,31,24,.48);
  --brand-fg:  #02B140;
  --danger:    #C8304A;            /* deeper red on light */
  --invert-fg: #F4F8F1;
  --glow-a:    rgba(2,177,64,.12);
  --glow-b:    rgba(61,209,106,.12);
  --glow-c:    rgba(22,71,52,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--fg);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* aurora background layer */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora::before,
.aurora::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .9;
}
.aurora::before {
  width: 70vw;
  height: 70vw;
  left: -20vw;
  top: -30vw;
  background: radial-gradient(circle, var(--glow-a) 0%, transparent 70%);
}
.aurora::after {
  width: 60vw;
  height: 60vw;
  right: -15vw;
  top: 20vh;
  background: radial-gradient(circle, var(--glow-b) 0%, transparent 70%);
}
.aurora .blob-3 {
  position: absolute;
  width: 50vw;
  height: 50vw;
  left: 30vw;
  top: 80vh;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-c) 0%, transparent 70%);
  filter: blur(120px);
}

/* iOS / touch: filter: blur(120px) на 50-70vw элементах = тяжёлая GPU-нагрузка,
   main thread замирает на iOS Safari при первой отрисовке. Аврора декоративная,
   на маленьком экране почти не видна — отключаем на touch. */
@media (hover: none) and (pointer: coarse) {
  .aurora { display: none; }
}

/* grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ═══ NAV ═══ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 20px 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg) 18%, transparent);
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--fg);
  text-decoration: none;
}
.brand svg.brand-logo,
.brand svg:not([class]) {
  height: 24px;
  width: auto;
  color: var(--fg);
  display: block;
}
.brand-divider {
  width: 1px;
  height: 22px;
  background: var(--hairline-strong);
}
.brand-sub {
  font-family: var(--ff-sans);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--fg-dim);
  font-weight: 500;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--dur) var(--ease);
}
.nav-links a:hover { color: var(--fg); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-btn {
  appearance: none;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--fg-dim);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  font-size: 13px;
  font-weight: 600;
}
.icon-btn:hover {
  color: var(--fg);
  border-color: var(--hairline-strong);
  transform: translateY(-1px);
}
.icon-btn svg { width: 16px; height: 16px; }
.lang-pill {
  padding: 0 14px;
  width: auto;
  border-radius: 18px;
  font-size: 12px;
  letter-spacing: .06em;
  text-indent: .06em;        /* compensates trailing letter-spacing for visual centering */
}
/* Language dropdown (RU / EN / KK) */
.lang-switch { position: relative; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 132px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift);
  z-index: 60;
}
.lang-menu[hidden] { display: none; }
.lang-opt {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang-opt:hover { background: var(--surface); color: var(--brand-fg); }
.lang-opt[aria-selected="true"] { color: var(--brand-fg); font-weight: 600; }
.nav-burger { display: none; }
.nav-mobile { display: none; }
/* Login = icon-btn (inherits 36×36 + hover-lift from .icon-btn) */

@media (max-width: 900px) {
  .nav-links { display: none; }
  .brand-sub, .brand-divider { display: none; }
  .nav-login { display: none; }       /* hide ghost login on mobile (lives in burger) */
  .nav-burger { display: grid; }
  .nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    transition: max-height var(--dur) var(--ease), opacity var(--dur) var(--ease);
  }
  .nav-mobile.open {
    max-height: 340px;
    opacity: 1;
    pointer-events: auto;
    padding-top: 12px;
  }
  .nav-mobile a {
    padding: 14px 24px;
    color: var(--fg);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
  }
  .nav-mobile a:hover { background: var(--surface); color: var(--brand-fg); }
  .nav-mobile-login {
    color: var(--brand-fg) !important;
    font-weight: 600 !important;
  }
  .nav.open .nav-burger svg { transform: rotate(90deg); transition: transform var(--dur) var(--ease); }
}
@media (max-width: 560px) {
  .nav { padding: 20px 0; }
  .nav-inner { gap: 12px; }
  .brand svg.brand-logo { height: 18px; }
  .nav-actions { gap: 8px; }
  .icon-btn { width: 36px; height: 36px; }
  .lang-pill { padding: 0 10px; font-size: 11px; }
  .nav-actions .btn { padding: 10px 16px; font-size: 13px; }
  .nav-actions .btn svg { display: none; }
}

/* buttons */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -.005em;
  padding: 13px 22px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--fg);
  color: var(--invert-fg);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}
.btn-ghost {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--hairline);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--hairline-strong);
}
.btn svg { width: 16px; height: 16px; }

/* ═══ sections / type ═══ */
section { padding: 120px 0; position: relative; }
@media (max-width: 720px) { section { padding: 80px 0; } }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-sans);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 28px;
}
.tag::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .4;
}

h1, h2, h3 { font-family: var(--ff-serif); font-weight: 500; letter-spacing: -.01em; margin: 0; }
h1 {
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
h2 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  font-variation-settings: 'opsz' 110, 'SOFT' 30;
}
h3 { font-size: 22px; line-height: 1.2; font-variation-settings: 'opsz' 30; }

h1 em, h2 em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  color: var(--brand-fg);
}
/* Freedom Bank wordmark, match the logo's geometric sans */
h1 em.fb-mark, h2 em.fb-mark, .fb-mark {
  font-family: var(--ff-sans);
  font-style: normal;
  font-weight: 900;
  letter-spacing: -.02em;
  font-variation-settings: normal;
}

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--fg-dim);
  max-width: 620px;
}

/* inline link inside copy */
.ilink {
  color: var(--brand-fg);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--brand-fg) 50%, transparent);
  padding-bottom: 1px;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.ilink:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

/* ═══ HERO ═══ */
.hero {
  min-height: 78vh;
  display: flex;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 60px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 80px;
  width: 100%;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-dim);
  background: var(--surface);
  margin-bottom: 36px;
  backdrop-filter: blur(12px);
}
.hero-badge .dot {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-fg);
  position: relative;
}
.hero-badge .dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--brand-fg);
  opacity: .5;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: .5; }
  100% { transform: scale(1.6); opacity: 0; }
}

.hero h1 { margin-bottom: 32px; }
.hero .lead { margin-bottom: 40px; max-width: 560px; }

.hero-ctas {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* hero visual, stacked cards */
.hero-vis {
  position: relative;
  aspect-ratio: 4/5;
  max-width: 460px;
  justify-self: end;
  width: 100%;
}
@media (max-width: 980px) { .hero-vis { justify-self: center; max-width: 380px; } }
.hv-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}
.hv-1 { left: 0; top: 0; width: 72%; aspect-ratio: 3/4; transform: rotate(-4deg); }
.hv-2 { right: 0; top: 20%; width: 68%; aspect-ratio: 3/4; transform: rotate(3deg); }
.hv-3 { left: 20%; bottom: 0; width: 60%; aspect-ratio: 3/4; transform: rotate(-1deg); z-index: 2; }

.hv-card-title {
  font-family: var(--ff-serif);
  font-size: 32px;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--brand-fg);
}
.hv-card-title--sm {
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -.005em;
}
.hv-card-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--fg-mute);
}
.hv-card-bar {
  position: absolute;
  bottom: 22px;
  left: 28px;
  right: 28px;
  height: 6px;
  background: var(--hairline);
  border-radius: 3px;
  overflow: hidden;
}
.hv-card-bar::after {
  content: '';
  position: absolute;
  inset: 0 40% 0 0;
  background: linear-gradient(90deg, var(--brand-fg), var(--accent));
  border-radius: 3px;
}
.hv-2 .hv-card-bar::after { inset: 0 20% 0 0; }
.hv-3 .hv-card-bar::after { inset: 0 10% 0 0; }

/* metric row */
.metrics {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--hairline);
  grid-column: 1 / -1;
}
@media (max-width: 720px) {
  .metrics { grid-template-columns: 1fr; gap: 24px; }
}
.metric .m-val {
  font-family: var(--ff-serif);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -.03em;
  margin-bottom: 10px;
  font-variation-settings: 'opsz' 110, 'SOFT' 50;
}
.metric .m-val {
  color: var(--brand-fg);
}
.metric .m-val em {
  font-style: italic;
  font-variation-settings: 'opsz' 110, 'SOFT' 100;
  color: var(--brand-fg);
}
.metric .m-val .m-mark { color: var(--fg); }
.metric .m-lbl {
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.4;
}

/* ═══ SECTION HEADER ═══ */
.sh {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 80px;
}
@media (max-width: 720px) { .sh { grid-template-columns: 1fr; gap: 24px; } }
.sh p { margin: 0; color: var(--fg-dim); font-size: 17px; line-height: 1.5; max-width: 480px; }

/* ═══ STEPS (timeline) ═══ */
.steps-grid {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0;
}
.step {
  display: contents;
}
.step-num {
  position: relative;
  padding-top: 8px;
  font-family: var(--ff-serif);
  font-size: 16px;
  color: var(--fg-mute);
  text-align: right;
  padding-right: 24px;
}
.step-num::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 12px;
  bottom: -40px;
  width: 1px;
  background: var(--hairline);
}
.step:last-child .step-num::after { display: none; }
.step-num::before {
  content: '';
  position: absolute;
  right: -5px;
  top: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--hairline-strong);
  transition: all var(--dur) var(--ease);
}
.step:hover .step-num::before {
  background: var(--brand-fg);
  border-color: var(--brand-fg);
}
.step-body {
  padding: 0 0 40px 32px;
}
.step-body h3 {
  font-family: var(--ff-sans);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -.01em;
  margin-bottom: 8px;
  color: var(--fg);
}
.step-body p {
  margin: 0;
  color: var(--fg-dim);
  line-height: 1.55;
  max-width: 640px;
}
.step:last-child .step-body { padding-bottom: 0; }

/* who/when cards after steps */
.steps-aside {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 720px) { .steps-aside { grid-template-columns: 1fr; } }
.aside-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 32px;
  backdrop-filter: blur(12px);
}
.aside-card h3 {
  font-family: var(--ff-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 14px;
}
.aside-card p { margin: 0; color: var(--fg); line-height: 1.55; }
.aside-card p + p { margin-top: 6px; }
.aside-card .lbl { font-weight: 600; color: var(--fg-dim); margin-right: 4px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--fg-dim);
}

/* ═══ REWARDS ═══ */
.rewards-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 60px;
}
@media (max-width: 860px) { .rewards-primary { grid-template-columns: 1fr; } }
.reward-card {
  position: relative;
  padding: 44px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: var(--surface);
  overflow: hidden;
  backdrop-filter: blur(12px);
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.reward-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--glow-a), transparent 60%);
  opacity: .5;
  pointer-events: none;
}
.reward-card:nth-child(2)::before {
  background: radial-gradient(circle at 100% 100%, var(--glow-b), transparent 60%);
}
.reward-card .r-label {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 20px;
  position: relative;
}
.reward-card .r-big {
  font-family: var(--ff-serif);
  font-size: clamp(64px, 8vw, 112px);
  line-height: .95;
  letter-spacing: -.04em;
  margin-bottom: 24px;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  position: relative;
  color: var(--brand-fg);
}
.reward-card .r-big em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  color: var(--brand-fg);
}
.reward-card .r-desc {
  color: var(--fg-dim);
  line-height: 1.55;
  margin: 0;
  flex: 1;
  position: relative;
}
.reward-card .r-note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--fg-mute);
  position: relative;
}

/* table */
.table-wrap {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(12px);
}
.table-head {
  padding: 24px 32px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--ff-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.ft {
  width: 100%;
  border-collapse: collapse;
}
.ft th, .ft td {
  text-align: left;
  padding: 20px 32px;
  font-size: 15px;
}
.ft th {
  font-weight: 500;
  color: var(--fg-mute);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--hairline);
}
.ft tbody tr { border-bottom: 1px solid var(--hairline); }
.ft tbody tr:last-child { border-bottom: none; }
.ft td:first-child { font-family: var(--ff-serif); font-size: 22px; color: var(--brand-fg); font-variation-settings: 'opsz' 30; }
.ft td .sub { color: var(--fg-mute); font-size: 13px; margin-left: 6px; font-family: var(--ff-sans); }
.ft td strong { font-weight: 500; color: var(--fg); }
.table-foot {
  padding: 20px 32px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.55;
}

.reward-info {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .reward-info { grid-template-columns: 1fr; } }
.ri-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface);
}
.ri-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.ri-card p { margin: 0; font-size: 14px; color: var(--fg-dim); line-height: 1.5; }

/* ═══ RULES TABS ═══ */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  margin-bottom: 40px;
  backdrop-filter: blur(8px);
}
.tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--fg-dim);
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.tab.active {
  background: var(--fg);
  color: var(--invert-fg);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 720px) { .rules-grid { grid-template-columns: 1fr; } }
.rule {
  display: flex;
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--hairline);
  font-size: 15px;
  line-height: 1.45;
  color: var(--fg);
  align-items: flex-start;
  transition: all var(--dur) var(--ease);
}
.rule:hover {
  border-color: var(--hairline-strong);
  transform: translateY(-1px);
}
.rule .r-mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.rule.do .r-mark {
  background: color-mix(in srgb, var(--brand-fg) 20%, transparent);
  color: var(--brand-fg);
}
.rule.dont .r-mark {
  background: color-mix(in srgb, var(--danger) 18%, transparent);
  color: var(--danger);
}
.rule .r-mark svg { width: 12px; height: 12px; }

/* ═══ FAQ ═══ */
.faq-list { border-top: 1px solid var(--hairline); }
.faq-item {
  border-bottom: 1px solid var(--hairline);
}
.faq-q {
  appearance: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  cursor: pointer;
  font-family: var(--ff-serif);
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -.01em;
  color: var(--fg);
  font-variation-settings: 'opsz' 30, 'SOFT' 50;
  transition: color var(--dur) var(--ease);
}
.faq-q:hover { color: var(--brand-fg); }
/* вопрос занимает всю ширину блока, плюс прижат к правому краю */
.faq-q > span:first-child { flex: 1; min-width: 0; }
.faq-q .plus {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  color: var(--fg-dim);
  transition: all var(--dur) var(--ease);
}
.faq-q .plus svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.faq-item.open .faq-q .plus {
  background: var(--fg);
  color: var(--invert-fg);
  border-color: var(--fg);
}
.faq-item.open .faq-q .plus svg { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms var(--ease);
}
.faq-a-inner {
  padding: 0 0 28px;
  color: var(--fg-dim);
  line-height: 1.55;
  font-size: 16px;
  max-width: none;
}
.faq-item.open .faq-a { max-height: 400px; }

/* ═══ LEGAL ═══ */
.legal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 40px;
  padding: 40px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(12px);
}
@media (max-width: 980px) { .legal-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .legal-grid { grid-template-columns: 1fr; padding: 28px; gap: 32px; } }
.legal-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-block h4 {
  margin: 0;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 600;
}
.legal-block p { margin: 0; color: var(--fg); line-height: 1.5; font-size: 15px; }
.legal-block p ~ p { color: var(--fg-dim); font-size: 14px; }

.legal-block--cta {
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 6%, transparent) 0%, transparent 100%);
}
.legal-block--cta p {
  color: var(--fg-dim);
  font-size: 14px;
  max-width: 280px;
}
.legal-doc-btn {
  margin-top: auto;
  padding: 12px 18px;
  font-size: 14px;
}
.legal-doc-btn svg { width: 16px; height: 16px; }
@media (max-width: 980px) {
  .legal-block--cta { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .legal-block--cta {
    align-items: center;
    text-align: center;
  }
  .legal-block--cta p { max-width: 100%; }
  .legal-doc-btn { margin-left: auto; margin-right: auto; }
}

/* ═══ CTA ═══ */
.cta {
  padding: 80px 0 140px;
  text-align: center;
}
.cta-box {
  position: relative;
  padding: 80px 40px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--hairline);
  overflow: hidden;
  backdrop-filter: blur(12px);
}
.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, var(--glow-a), transparent 50%),
    radial-gradient(circle at 80% 50%, var(--glow-b), transparent 50%);
  opacity: .7;
  pointer-events: none;
}
.cta-box > * { position: relative; }
.cta-box h2 { margin-bottom: 20px; }
.cta-box p { color: var(--fg-dim); font-size: 18px; max-width: 500px; margin: 0 auto 36px; line-height: 1.5; }

/* ═══ FOOTER ═══ */
.footer {
  padding: 72px 0 40px;
  border-top: 1px solid var(--hairline);
  margin-top: 120px;
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 28px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 560px) {
  .footer { padding: 56px 0 32px; margin-top: 80px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; padding-bottom: 36px; }
  .footer-tagline, .footer-addr { max-width: 100%; }
  .footer-col h4 { margin: 0 0 14px; }
  .footer-col ul { gap: 8px; }
  .f-contact {
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    white-space: normal;
    line-height: 1.45;
  }
  .f-contact:hover { background: transparent; border: none; }
  .f-contact span { font-size: 14px; }
}
.footer-brand-row { margin-bottom: 16px; }
.footer-logo { height: 38px; width: auto; color: var(--fg); display: block; }
.footer-tagline { color: var(--fg-dim); font-size: 14px; line-height: 1.55; margin: 0 0 14px; max-width: 320px; }
.footer-addr { color: var(--fg-mute); font-size: 13px; line-height: 1.55; margin: 0; max-width: 320px; }
.footer-col h4 {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin: 4px 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: var(--fg-dim);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
  line-height: 1.45;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-col a:hover { color: var(--brand-fg); }
.f-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  white-space: nowrap;
  line-height: 1;
}
.f-contact svg { width: 16px; height: 16px; flex-shrink: 0; }
.f-contact span { font-size: 13px; }
.f-contact:hover { border-color: var(--brand-fg); background: color-mix(in oklab, var(--brand) 8%, transparent); color: var(--fg); }
.footer-col a[data-ext]::after {
  content: '↗';
  font-size: 11px;
  color: var(--fg-mute);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-disc {
  color: var(--fg-mute);
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
  max-width: 640px;
  white-space: pre-line;
}
@media (max-width: 560px) {
  .footer-disc { white-space: normal; }
}
.footer-license,
.footer-copyright {
  color: var(--fg-mute);
  font-size: 12px;
  margin: 0;
  text-align: right;
}
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}
@media (max-width: 720px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-meta { align-items: flex-start; }
  .footer-license,
  .footer-copyright { text-align: left; }
}
/* legacy single-line footer (used by some pages) */
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-links { display: flex; gap: 24px; align-items: center; }
.footer-links a { color: var(--fg-dim); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: var(--fg); }

/* ═══ REVEAL animation (non-blocking, visible by default) ═══ */
.reveal { opacity: 1; transform: none; }
.js-reveal-armed .reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js-reveal-armed .reveal.in { opacity: 1; transform: translateY(0); }

/* ═══ CONTACTS (отдельная страница) ═══ */
.contact-page {
  min-height: 100vh;
  padding: 40px 0 80px;
  position: relative;
  z-index: 2;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.contact-card {
  padding: 48px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}
@media (max-width: 720px) { .contact-card { padding: 32px 24px; } }
.contact-card h2 { margin-bottom: 12px; font-size: clamp(32px, 4vw, 44px); }
.contact-card .sub { color: var(--fg-dim); font-size: 16px; margin: 0 0 32px; line-height: 1.5; }

.field { display: block; margin-bottom: 20px; }
/* `.field` (display:block) перебивает UA `[hidden]` — нужна явная правка,
   иначе hidden-поле «свой вариант» остаётся видимым. */
.field[hidden] { display: none; }
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--fg-dim);
  margin-bottom: 8px;
  font-weight: 500;
}
.field-label .opt { color: var(--fg-mute); font-size: 12px; }
.input, .textarea {
  width: 100%;
  background-color: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: var(--ff-sans);
  font-size: 16px;          /* iOS no-zoom-on-focus threshold */
  color: var(--fg);
  transition: all var(--dur) var(--ease);
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-fg);
  background-color: var(--bg);
}
.textarea { min-height: 90px; resize: vertical; }
/* Нативный select под DS: убрать дефолтную стрелку, добавить свой шеврон */
.input--select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2389929B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.input--select:invalid { color: var(--fg-mute); }
.field.error .input, .field.error .textarea { border-color: var(--danger); }
.field-error {
  display: none;
  margin-top: 6px;
  color: var(--danger);
  font-size: 13px;
}
.field.error .field-error { display: block; }

.consent {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 20px 0 28px;
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.5;
}
/* Согласие — в одну строку (без переноса) */
.consent > span { white-space: nowrap; }
.consent input {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--brand-fg);
  flex-shrink: 0;
}
.consent a { color: var(--fg); }
.consent.error { color: var(--danger); }

.form-submit {
  width: 100%;
  justify-content: center;
  padding: 16px;
  font-size: 15px;
}

/* Form result states — full-card takeover (replaces tabs/heading/form) */
.success-state, .error-state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px 40px;
  gap: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}
.success-state.show, .error-state.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
/* When a result state is shown, hide the rest of the contact card */
.contact-card:has(.success-state.show) > :not(.success-state),
.contact-card:has(.error-state.show)   > :not(.error-state) {
  display: none;
}
.state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.state-icon svg { width: 32px; height: 32px; }
.state-icon--ok {
  background: color-mix(in srgb, var(--brand-fg) 18%, transparent);
  color: var(--brand-fg);
}
.state-icon--err {
  background: color-mix(in srgb, var(--danger) 18%, transparent);
  color: var(--danger);
}
.state-title {
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--fg);
  margin: 0;
  font-variation-settings: 'opsz' 80, 'SOFT' 50;
}
.state-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-dim);
  margin: 0;
  max-width: 320px;
}
.state-btn { margin-top: 16px; }

/* contact info column */
.contact-info h1 {
  font-size: clamp(44px, 6vw, 76px);
  margin-bottom: 24px;
}
.contact-info p.lead { margin-bottom: 40px; max-width: 440px; }

/* tabs */
.contact-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  align-self: start;
  width: fit-content;
}
.c-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: var(--ff-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-dim);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.c-tab.active {
  background: var(--fg);
  color: var(--invert-fg);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 40px;
  transition: color var(--dur) var(--ease);
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.back-link:hover { color: var(--fg); border-color: var(--hairline-strong); }
.contact-info .back-link { align-self: flex-start; }
.contact-info { display: flex; flex-direction: column; }

/* country picker (flag + code) */
.phone-row {
  display: flex;
  gap: 8px;
}
.country-pick {
  position: relative;
  flex-shrink: 0;
}
.country-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 100%;
  min-height: 50px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--ff-sans);
  font-size: 15px;
  color: var(--fg);
}
.country-btn .flag { font-size: 20px; line-height: 1; }
.country-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  width: 280px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  padding: 6px;
  display: none;
}
.country-menu.open { display: block; }
.country-search {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-family: var(--ff-sans);
  font-size: 16px;          /* iOS no-zoom-on-focus threshold */
  color: var(--fg);
  margin-bottom: 6px;
}
.country-search:focus { outline: none; border-color: var(--brand-fg); }
.country-opt {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.country-opt:hover { background: var(--surface-2); }
.country-opt .c-name { flex: 1; color: var(--fg); }
.country-opt .c-code { color: var(--fg-mute); }

/* RU/EN content switching */
[data-ru], [data-en] { display: none; }
body:not(.lang-en) [data-ru] { display: inherit; }
body.lang-en [data-en] { display: inherit; }
body:not(.lang-en) .show-ru { display: inline; }
body.lang-en .show-en { display: inline; }

/* ═══════════════════════════════════════════════════════════════════════
   eRESIDENCY, premium product grid
   ═══════════════════════════════════════════════════════════════════════ */
/* #eresidency: uses default section padding (120 top/bottom) for consistent inter-section spacing */
.eres-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 8px;
}
@media (max-width: 960px) { .eres-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .eres-grid { grid-template-columns: 1fr; } }

.eres-card {
  position: relative;
  padding: 28px 24px 26px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.eres-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 0% 0%, color-mix(in oklab, var(--brand) 8%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
.eres-card:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--brand) 40%, var(--hairline)); box-shadow: var(--shadow-lift); }
.eres-card:hover::before { opacity: 1; }
.eres-ic {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: color-mix(in oklab, var(--brand) 12%, transparent);
  color: var(--brand-fg);
  margin-bottom: 18px;
}
.eres-ic svg { width: 22px; height: 22px; }
.eres-card h3 {
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0 0 8px;
  min-height: calc(1.25em * 2);
  display: flex;
  align-items: flex-start;
}
.eres-card p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 14.5px;
  line-height: 1.55;
}
.eres-more {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px;
  padding: 12px 20px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.eres-more:hover { border-color: var(--brand-fg); background: color-mix(in oklab, var(--brand) 8%, transparent); }
.eres-more svg { width: 14px; height: 14px; }

/* ═══════════════════════════════════════════════════════════════════════
   CARRIERS, numbered cards, quieter
   ═══════════════════════════════════════════════════════════════════════ */
/* #carriers: uses default section padding (120 top/bottom) for consistent inter-section spacing */
.carr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}
@media (max-width: 900px) { .carr-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .carr-grid { grid-template-columns: 1fr; } }

.carr-card {
  position: relative;
  padding: 26px 24px 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}
.carr-num {
  position: absolute;
  top: 20px; right: 22px;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: .08em;
}
.carr-ic {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--brand-fg);
  margin-bottom: 4px;
}
.carr-ic svg { width: 26px; height: 26px; }
.carr-card h3 {
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: 20px;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -.005em;
}
.carr-card p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════════════════════
   CALCULATOR
   ═══════════════════════════════════════════════════════════════════════ */
.calc {
  margin-top: 48px;
  padding: 40px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow: var(--shadow-soft);
}
.calc-head { margin-bottom: 32px; }
.calc-head .tag { margin-bottom: 10px; }
.calc-head h3 {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 10px;
  max-width: 620px;
}
.calc-head p { margin: 0; color: var(--fg-dim); font-size: 15px; line-height: 1.55; }

.calc-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: stretch; }
@media (max-width: 900px) { .calc-body { grid-template-columns: 1fr; } }

.calc-controls { display: flex; flex-direction: column; gap: 26px; }
.calc-field { display: flex; flex-direction: column; gap: 10px; }
.calc-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px;
}
.calc-row label { color: var(--fg-dim); font-weight: 500; }
.calc-row output {
  font-family: var(--ff-mono);
  font-size: 15px;
  color: var(--fg);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: color-mix(in oklab, var(--brand) 8%, transparent);
}

.calc-field input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--hairline-strong);
  outline: none;
  cursor: pointer;
}
.calc-field input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--brand-fg);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--brand-fg), 0 4px 14px color-mix(in oklab, var(--brand) 40%, transparent);
  cursor: grab;
}
.calc-field input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--brand-fg);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--brand-fg);
  cursor: grab;
}
.calc-scale {
  position: relative;
  height: 16px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: .04em;
  margin: 0 8px;
}
.calc-scale span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.calc-scale span:first-child { transform: translateX(0); }
.calc-scale span:last-child  { transform: translateX(-100%); }

.calc-seg {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
  background: var(--surface-2);
}
.calc-seg .seg {
  appearance: none;
  border: none;
  background: transparent;
  padding: 7px 16px;
  font-family: var(--ff-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-dim);
  cursor: pointer;
  border-radius: 999px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.calc-seg .seg.active {
  background: var(--brand-fg);
  color: var(--brand-on);
}
.calc-hint { font-size: 12px; color: var(--fg-mute); line-height: 1.5; }

.calc-output {
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.calc-out-block { display: flex; flex-direction: column; gap: 4px; }
.calc-out-lbl {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--fg-mute);
  text-transform: uppercase;
}
.calc-out-val {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -.01em;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.calc-out-val .big { font-size: inherit; }
.calc-out-val .small { font-size: 13px; font-family: var(--ff-mono); color: var(--fg-mute); font-weight: 400; }
.calc-out-val .muted { color: var(--fg-mute); }
.calc-out-val--big { font-size: 40px; color: var(--brand-fg); }
.calc-out-sub { font-size: 12.5px; color: var(--fg-dim); }
.calc-out-divider {
  display: none;
}
.calc-out-block--total { margin-top: 4px; padding-top: 14px; border-top: 1px dashed var(--hairline-strong); }
.calc-foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--fg-mute);
  line-height: 1.55;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════
   TIMELINE, interactive
   ═══════════════════════════════════════════════════════════════════════ */
.tl { margin-top: 48px; padding: 36px; border: 1px solid var(--hairline); border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); box-shadow: var(--shadow-soft); }
.tl-head { margin-bottom: 22px; }
.tl-head .tag { margin-bottom: 10px; }
.tl-head h3 {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 10px;
  max-width: 620px;
}
.tl-head p { margin: 0; color: var(--fg-dim); font-size: 15px; line-height: 1.55; }

.tl-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  gap: 18px;
  margin-bottom: 20px;
}
@media (max-width: 560px) { .tl-inputs { grid-template-columns: 1fr; } }

.tl-input { display: flex; flex-direction: column; gap: 8px; }
.tl-input label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--fg-mute);
  text-transform: uppercase;
}
.tl-input input[type=date] {
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--bg);
  font-family: var(--ff-mono);
  font-size: 15px;
  color: var(--fg);
  outline: none;
  transition: border-color var(--dur) var(--ease);
}
.tl-input input[type=date]:focus { border-color: var(--brand-fg); }

.tl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--bg);
  font-size: 12.5px;
  color: var(--fg-dim);
}
.tl-leg { display: inline-flex; align-items: center; gap: 8px; }
.tl-leg .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tl-leg .dash { width: 18px; height: 2px; border-top: 2px dashed; display: inline-block; }
.tl-leg--onboard .dot { background: #3C7EF5; }
.tl-leg--issue   .dot { background: #02B140; }
.tl-leg--payout  .dot { background: #164734; }
.tl-leg--90      .dash { color: #02B140; }

.tl-scroll {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--bg);
  padding: 24px 28px 24px 100px;
  overflow: auto;
  max-height: 560px;
  position: relative;
}
.tl-canvas {
  position: relative;
  min-height: 200px;
}
.tl-axis {
  position: absolute;
  top: 0; bottom: 0;
  left: 22px;
  width: 2px;
  background: var(--hairline-strong);
  border-radius: 2px;
}
.tl-month-row {
  position: absolute;
  left: 0; right: 0;
  border-top: 1px dashed var(--hairline);
}
.tl-month-row:first-child { border-top: none; }
.tl-month-label {
  position: absolute;
  left: -78px;
  top: -8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--fg-mute);
  text-transform: uppercase;
  width: 70px;
  text-align: right;
}

.tl-band {
  position: absolute;
  left: 18px;
  width: 10px;
  background: color-mix(in oklab, #02B140 18%, transparent);
  border-left: 2px dashed color-mix(in oklab, #02B140 60%, transparent);
  border-radius: 2px;
  z-index: 0;
}

.tl-evt {
  position: absolute;
  left: 22px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
  transition: filter var(--dur) var(--ease);
}
.tl-evt[data-drag] { cursor: grab; user-select: none; }
.tl-evt[data-drag]:hover { filter: brightness(1.04); }
.tl-evt[data-drag].dragging { cursor: grabbing; z-index: 10; }
.tl-evt[data-drag] .tl-evt-card { position: relative; padding-left: 32px; }
.tl-evt-handle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: .5;
  font-weight: 700;
  letter-spacing: -2px;
}
.tl-canvas.drag-active { cursor: grabbing; }
.tl-evt-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-left: -5px;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1.5px currentColor;
}
.tl-evt-card {
  padding: 8px 14px 9px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  min-width: 180px;
  max-width: 280px;
}
.tl-evt-title {
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--fg);
  line-height: 1.25;
}
.tl-evt-meta {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  color: var(--fg-mute);
  margin-top: 3px;
}

.tl-evt--onboard { color: #3C7EF5; }
.tl-evt--onboard .tl-evt-card { background: color-mix(in oklab, #3C7EF5 10%, var(--surface)); border-color: color-mix(in oklab, #3C7EF5 30%, var(--hairline)); }
.tl-evt--issue   { color: #02B140; }
.tl-evt--issue   .tl-evt-card { background: color-mix(in oklab, #02B140 10%, var(--surface)); border-color: color-mix(in oklab, #02B140 30%, var(--hairline)); }
.tl-evt--ninety  { color: #02B140; }
.tl-evt--ninety  .tl-evt-card { background: transparent; border-style: dashed; border-color: color-mix(in oklab, #02B140 50%, var(--hairline)); }
.tl-evt--payout  { color: #164734; }
.tl-evt--payout  .tl-evt-card { background: color-mix(in oklab, #164734 10%, var(--surface)); border-color: color-mix(in oklab, #164734 30%, var(--hairline)); }

.tl-foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--fg-mute);
  line-height: 1.55;
  font-style: italic;
}
