@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Токены совпадают с приложением (lessio/tailwind.tokens.js) */
  --bg: #F1F5F9;
  --surface: #FFFFFF;
  --ink: #0F172A;
  --muted: #64748B;
  --line: #CBD5E1;
  --primary: #625CB6;
  --primary-700: #554BA8;
  --glow: #8A67E8;
  --dot: #D4D4F7;
  --danger: #DC2626;
  --ok: #15803D;
  --radius-card: 16px;
  --radius-control: 12px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary-700); text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.025em; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 20; background: rgba(241, 245, 249, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top__row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__name { font-weight: 800; font-size: 22px; letter-spacing: -0.04em; }
.top__nav { display: flex; gap: 28px; margin-left: auto; }
.top__nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.top__nav a:hover { color: var(--primary-700); }

/* Кнопки */
.btn {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 56px; padding: 10px 16px;
  border-radius: var(--radius-control);
  border: 1.5px solid transparent;
  font: 600 16px/1.2 var(--font);
  text-decoration: none; cursor: pointer; text-align: left;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn__title { font-weight: 700; font-size: 16px; white-space: nowrap; }
.btn__sub { font-weight: 400; font-size: 13px; opacity: .8; }
.btn--ico { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; padding-inline: 14px; }
.btn__ico { flex: none; }
.btn__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-700); }
.btn--outline { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--disabled { background: transparent; color: var(--muted); border: 1.5px dashed var(--line); cursor: not-allowed; }
.btn--sm { min-height: 44px; padding: 8px 18px; font-size: 15px; justify-content: center; text-align: center; }
.btn:active:not(.btn--disabled) { transform: translateY(1px); }

/* Hero */
.hero { padding: 72px 0 88px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 56px; align-items: start; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--primary-700); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 20px; }
h1 { font-size: clamp(36px, 5.2vw, 62px); line-height: 1.04; font-weight: 800; letter-spacing: -0.04em; }
.lead { margin-top: 24px; font-size: 19px; line-height: 1.55; color: #334155; max-width: 34em; }
.cta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
.cta .btn { width: 100%; }
.note { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* Макет подтверждения занятия (подписи как в приложении) */
.demo { margin: 0; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: #E2E8F0; border-radius: 12px; margin-bottom: 14px; }
.tab { min-height: 40px; padding: 8px 18px; border: 0; border-radius: 9px; background: transparent; color: #475569; font: 600 15px/1 var(--font); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: 8px 8px 0 var(--dot); padding: 20px 22px 22px; }
.panel[hidden] { display: none; }
.panel + .panel { margin-top: 24px; }
.js .panel + .panel { margin-top: 0; }
.panel__title { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.panel__meta { margin-top: 2px; font-size: 14px; color: var(--muted); }
.rows { list-style: none; margin: 14px 0 0; padding: 0; }
.row { padding: 12px 0; border-top: 1px solid #E2E8F0; }
.row__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row__name { font-weight: 600; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #EEF2FF; color: #475569; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.opt { font-size: 14px; padding: 7px 12px; border-radius: 9px; background: #F1F5F9; color: #334155; }
.opt.is-on { background: var(--primary); color: #fff; font-weight: 600; }
.opts--stack { display: grid; gap: 8px; margin-top: 16px; }
.opt--wide { padding: 13px 16px; font-size: 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.opt--wide.is-on { background: #EEF2FF; border-color: var(--primary); color: var(--primary-700); }
.row__fx { margin-top: 8px; font-size: 14px; color: #475569; font-variant-numeric: tabular-nums; }
.what { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: #F8FAFC; border: 1px solid #E2E8F0; font-size: 15px; color: #334155; }
.what__h { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.panel__foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #E2E8F0; }
.fake { font-size: 14px; font-weight: 600; padding: 11px 16px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); }
.fake--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.demo__cap { margin-top: 14px; font-size: 13px; color: var(--muted); max-width: 30em; }

/* Общие секции */
section { scroll-margin-top: 72px; }
h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; font-weight: 800; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }

.problem { padding: 88px 0; border-top: 1px solid var(--line); }
.prose { font-size: 19px; color: #334155; display: grid; gap: 16px; }
.defs { margin: 64px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; }
.defs > div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.defs dt { font-weight: 700; }
.defs dd { margin: 0; color: #475569; }

/* Тёмный блок */
.how { background: var(--ink); color: #F8FAFC; padding: 96px 0; }
.how__intro { position: sticky; top: 96px; }
.how__intro p { margin-top: 16px; color: #CBD5E1; font-size: 19px; max-width: 22em; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 28px 0; border-top: 1px solid rgba(255,255,255,.18); }
.steps li:last-child { border-bottom: 1px solid rgba(255,255,255,.18); }
.steps__n { font-size: 56px; line-height: 1; font-weight: 300; color: #A78BFA; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 22px; font-weight: 700; }
.steps p { margin-top: 8px; color: #CBD5E1; }

/* Таблица правил */
.rules { padding: 96px 0; }
.rtable { width: 100%; border-collapse: collapse; margin-top: 40px; }
.rtable th, .rtable td { text-align: left; padding: 22px 16px 22px 0; border-top: 1px solid var(--line); vertical-align: baseline; }
.rtable tbody tr:last-child th, .rtable tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.rtable thead th { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 0; padding-block: 0 12px; }
.rtable tbody th { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; width: 42%; }
.rtable td { font-size: 18px; color: #334155; }

/* Где пользоваться */
.start { padding: 0 0 96px; }
.ways { list-style: none; margin: 40px 0 0; padding: 0; }
.ways li { display: grid; grid-template-columns: 220px 1fr auto; gap: 32px; align-items: center; padding: 26px 0; border-top: 1px solid var(--line); }
.ways li:last-child { border-bottom: 1px solid var(--line); }
.ways h3 { font-size: 22px; font-weight: 700; }
.ways p { color: #475569; max-width: 34em; }

/* FAQ */
.faq { padding: 88px 0 104px; background: var(--surface); border-top: 1px solid var(--line); }
.faq__list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; font-size: 26px; line-height: 1; color: var(--primary-700); }
details[open] summary::after { content: "−"; }
details p { padding: 0 48px 24px 0; color: #475569; max-width: 40em; }

/* Подвал */
.foot { padding: 32px 0 40px; font-size: 14px; color: var(--muted); }
.foot__row { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a, .linkbtn { color: var(--muted); }
.foot a:hover, .linkbtn:hover { color: var(--ink); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Диалог установки */
.dlg { width: min(460px, calc(100% - 32px)); border: 0; border-radius: var(--radius-card); padding: 32px 28px 28px; background: var(--surface); color: var(--ink); box-shadow: 8px 8px 0 var(--dot), 0 0 0 1px var(--line); }
.dlg::backdrop { background: rgba(15, 23, 42, .55); }
.dlg h2 { font-size: 28px; }
.dlg__lead { margin-top: 8px; color: var(--muted); font-size: 15px; }
.dlg__steps { margin: 20px 0 24px; padding-left: 22px; display: grid; gap: 12px; }
.dlg__close { position: absolute; top: 10px; right: 10px; margin: 0; }
.dlg__close button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.dlg__close button:hover { background: #F1F5F9; color: var(--ink); }

@media (max-width: 960px) {
  .hero { padding: 48px 0 64px; }
  .hero__grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .cta { grid-template-columns: 1fr; }
  .how__intro { position: static; }
  .defs { grid-template-columns: 1fr; }
  .ways li { grid-template-columns: 1fr; gap: 12px; }
  .ways .btn { justify-self: start; }
  .top__nav { display: none; }
  .top__row .btn { margin-left: auto; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .lead, .prose { font-size: 17px; }
  .defs > div { grid-template-columns: 1fr; gap: 4px; }
  .steps li { grid-template-columns: 48px 1fr; }
  .steps__n { font-size: 40px; }
  .rtable thead { display: none; }
  .rtable tr { display: grid; gap: 4px; padding: 18px 0; border-top: 1px solid var(--line); }
  .rtable th, .rtable td { border: 0 !important; padding: 0 !important; width: auto !important; }
  .rtable tbody th { font-size: 20px; }
  .how, .rules { padding-block: 64px; }
  .problem, .faq { padding-block: 64px; }
  details p { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

@media (max-width: 560px) { .panel { box-shadow: 5px 5px 0 var(--dot); padding: 16px; } .opt { font-size: 13px; padding: 7px 10px; } }
