:root {
  color-scheme: light dark;
  --surface: var(--tg-theme-bg-color, #f5f7fb);
  --ink: var(--tg-theme-text-color, #18243a);
  --muted: var(--tg-theme-hint-color, #65718a);
  --panel: var(--tg-theme-secondary-bg-color, #ffffff);
  --accent: var(--tg-theme-button-color, #4769ed);
  --accent-ink: var(--tg-theme-button-text-color, #ffffff);
  --line: rgba(87, 108, 148, .17);
  --shadow: 0 18px 60px rgba(24, 40, 79, .07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: var(--tg-theme-bg-color, #101726);
    --ink: var(--tg-theme-text-color, #f4f7fd);
    --muted: var(--tg-theme-hint-color, #a6b0c2);
    --panel: var(--tg-theme-secondary-bg-color, #1b2639);
    --accent: var(--tg-theme-button-color, #7793ff);
    --accent-ink: var(--tg-theme-button-text-color, #101726);
    --line: rgba(203, 215, 240, .16);
    --shadow: 0 18px 60px rgba(0, 0, 0, .17);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button { font: inherit; }
[hidden] { display: none !important; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 9px;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.shell {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.brand small { display: block; margin-top: -3px; font-size: 9px; font-weight: 700; letter-spacing: .2em; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ink); transform: rotate(-8deg); }
.brand-mark span { width: 15px; height: 15px; border: 3px solid var(--surface); border-radius: 5px; transform: rotate(8deg); }
.trust-banner { display: flex; align-items: center; gap: 7px; margin: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: var(--panel); font-size: 11px; font-weight: 700; }
.trust-dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #e6a345; }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 27px 0 29px; padding: 5px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); box-shadow: var(--shadow); }
.tabs button { min-height: 44px; padding: 9px 3px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.tabs button[aria-current="page"] { background: var(--ink); color: var(--surface); }
.tabs button:not([aria-current="page"]):hover { color: var(--ink); background: var(--surface); }

.intro { margin: 0 0 27px; }
.eyebrow, .card-kicker { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { margin: 0 0 9px; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(34px, 8vw, 49px); line-height: 1.07; letter-spacing: -.055em; }
.heading-dot { color: var(--accent); }
.lead { max-width: 42ch; margin: 15px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }

.status-card { position: relative; isolation: isolate; overflow: hidden; padding: 24px; border-radius: 23px; background: #1b2c58; color: #fff; box-shadow: 0 18px 40px rgba(26, 47, 106, .18); }
.status-card::after { content: ""; position: absolute; z-index: -1; width: 225px; height: 225px; right: -80px; top: -84px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.055), 0 0 0 86px rgba(255,255,255,.035); }
.status-card-head { display: flex; align-items: center; justify-content: space-between; }
.status-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.36); border-radius: 12px; font-size: 28px; line-height: 1; }
.status-tag { padding: 6px 9px; border: 1px solid rgba(255,255,255,.33); border-radius: 99px; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.status-card h2 { margin: 25px 0 5px; font-size: 25px; letter-spacing: -.03em; line-height: 1.2; }
.status-card p { margin: 0; color: rgba(255,255,255,.8); font-size: 14px; }
.status-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 26px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.24); font-size: 13px; }
.status-meta span { color: rgba(255,255,255,.7); }
.status-meta strong { font-weight: 700; }

.offer-card, .plain-card, .steps-card { margin-top: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); }
.card-kicker { display: flex; align-items: center; gap: 10px; }
.number { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; letter-spacing: 0; }
.offer-card h2, .plain-card h2, .steps-card h2 { margin: 17px 0 7px; font-size: 23px; line-height: 1.25; letter-spacing: -.03em; }
.offer-card p, .plain-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.offer-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px 20px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); font-size: 13px; }
.offer-footer span { color: var(--muted); }
.offer-footer strong { max-width: 26ch; font-weight: 700; text-align: right; }
.footnote { margin: 19px 3px 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.steps-card ol { list-style: none; margin: 18px 0 0; padding: 0; }
.steps-card li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.steps-card li span { color: var(--accent); font-size: 11px; font-weight: 800; }
.steps-card li p { margin: 0; font-size: 14px; }
code { padding: 2px 5px; border-radius: 4px; background: var(--surface); color: var(--ink); font-size: .9em; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 15px; margin: 35px 2px 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.footer span:first-child { font-weight: 900; letter-spacing: .13em; }

@media (max-width: 390px) {
  .shell { padding-right: 16px; padding-left: 16px; }
  .topbar { align-items: flex-start; }
  .trust-banner { font-size: 10px; }
  .status-card, .offer-card, .plain-card, .steps-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
