:root {
  --ink: #1d2a24;
  --muted: #5d6862;
  --paper: #fbf8f0;
  --paper-2: #f3eee1;
  --card: #fffdf8;
  --line: #e3dccb;
  --board: #23463a;
  --board-2: #1b382e;
  --chalk: #f4f1e6;
  --chalk-dim: #c9d4cc;
  --yellow: #f2cf5b;
  --green: #2e7d55;
  --green-2: #256a47;
  --red: #c0453b;
  --radius: 14px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); }
a { color: var(--green-2); }
img, svg { max-width: 100%; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Шапка */
.bar { position: sticky; top: 0; z-index: 10; background: rgba(27, 56, 46, .94); backdrop-filter: blur(8px); color: var(--chalk); }
.bar__in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--chalk); text-decoration: none; font-weight: 700; letter-spacing: .01em; }
.logo__mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--yellow); border-radius: 8px; color: var(--yellow); font: 700 14px var(--serif); }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--chalk-dim); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--chalk); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 12px; border: 2px solid transparent; font: 600 16px/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease; text-align: center; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.btn--chalk { background: var(--yellow); color: #1f2a1e; box-shadow: 0 6px 20px rgba(242, 207, 91, .25); }
.btn--chalk:hover { background: #f7d96f; }
.btn--line { border-color: rgba(244, 241, 230, .5); color: var(--chalk); }
.btn--line:hover { border-color: var(--chalk); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-2); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn--ghost:hover { border-color: var(--green); }

/* Подписи */
.kicker { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.kicker--chalk { color: var(--yellow); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(28px, 3.4vw, 40px); max-width: 820px; }
.sub { color: var(--muted); max-width: 760px; margin: 14px 0 0; }

/* Первый экран — школьная доска */
.hero { position: relative; overflow: hidden; color: var(--chalk); background:
  radial-gradient(1200px 500px at 15% 0%, rgba(255,255,255,.07), transparent 60%),
  radial-gradient(800px 400px at 90% 100%, rgba(0,0,0,.25), transparent 60%),
  var(--board); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .22; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: linear-gradient(#8a6a45, #6f5232); box-shadow: 0 -2px 0 rgba(0,0,0,.2) inset; }
.hero__in { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -.01em; }
.chalk-under { position: relative; white-space: nowrap; color: var(--yellow); }
.chalk-under::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: -.12em; height: .22em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14 C 60 4, 140 4, 297 9' fill='none' stroke='%23f2cf5b' stroke-width='5' stroke-linecap='round' opacity='.85'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.lead { font-size: 19px; color: var(--chalk-dim); margin: 22px 0 0; max-width: 600px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__free { margin: 14px 0 0; font-size: 14px; color: var(--chalk-dim); }

.demo { background: var(--card); color: var(--ink); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden; transform: rotate(1.2deg); }
.demo__head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.demo__head span { width: 10px; height: 10px; border-radius: 50%; background: #d8cfba; }
.demo__head b { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.demo__q { margin: 16px; padding: 12px 14px; background: #eef4ef; border-radius: 12px 12px 12px 4px; font-size: 14px; line-height: 1.5; }
.demo__q i { font-style: normal; background: rgba(242, 207, 91, .45); border-radius: 4px; padding: 0 3px; }
.demo__a { margin: 0 16px 18px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 14px; }
.demo__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); }
.demo__row:first-child { border-top: 0; }
.demo__row--h { background: var(--paper-2); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.demo__row--fade { opacity: .45; }
.demo__row span:last-child { font-variant-numeric: tabular-nums; color: var(--green); font-weight: 600; }

/* Цифры */
.facts { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.facts__in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.fact { display: flex; flex-direction: column; gap: 4px; }
.fact b { font: 700 34px/1.1 var(--serif); color: var(--board); }
.fact span { font-size: 16px; }
.fact small { color: var(--muted); font-size: 13px; }

/* Секции */
.section { padding: 88px 0; }
.section--paper { background: var(--paper-2); }
.section--board { background: var(--board); color: var(--chalk); }

/* Генератор */
.gen { display: grid; grid-template-columns: 300px 1fr; gap: 24px; margin-top: 36px; align-items: start; }
.gen__list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 80px; }
.gen__tab { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: 500 15px/1.3 var(--sans); text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
.gen__tab:hover { border-color: var(--green); }
.gen__tab[aria-selected="true"] { background: var(--board); border-color: var(--board); color: var(--chalk); }
.gen__num { flex-shrink: 0; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--paper-2); color: var(--board); font: 700 13px var(--sans); font-variant-numeric: tabular-nums; }
.gen__tab[aria-selected="true"] .gen__num { background: var(--yellow); color: #1f2a1e; }
.gen__card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: 0 10px 30px rgba(30, 50, 40, .06); min-width: 0; }
.gen__title { font-size: 26px; }
.gen__note { margin: 8px 0 0; color: var(--muted); }
.gen__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 20px; }
.gen__fields .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea, .pre input, .pre textarea { width: 100%; font: 400 16px/1.4 var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.field textarea, .pre textarea { resize: vertical; min-height: 76px; }
.field input:focus, .field select:focus, .field textarea:focus, .pre input:focus, .pre textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(46, 125, 85, .15); }
.gen__warn { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: #fbeceb; color: #8d2f27; font-size: 15px; }
.gen__out { margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gen__out-head { display: flex; justify-content: space-between; padding: 8px 14px; background: var(--paper-2); font-size: 13px; font-weight: 600; color: var(--muted); }
.gen__prompt { margin: 0; padding: 16px; max-height: 340px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; font: 14.5px/1.55 var(--mono); color: var(--ink); background: #fff; }
.gen__prompt mark { background: rgba(242, 207, 91, .55); color: inherit; border-radius: 3px; padding: 0 2px; }
.gen__prompt .empty { background: #f1ece0; color: var(--muted); border-radius: 3px; padding: 0 2px; }
.gen__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Памятка */
.memo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.memo__col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.memo__col h3 { display: flex; align-items: flex-start; gap: 10px; font-size: 22px; margin-bottom: 12px; }
.memo__col--ok h3 { color: var(--green); }
.memo__col--no h3 { color: var(--red); }
.dot { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-top: -1px; border-radius: 50%; color: #fff; font: 700 15px var(--sans); flex-shrink: 0; }
.memo__col--ok .dot { background: var(--green); }
.memo__col--no .dot { background: var(--red); }
.memo__col ul { margin: 0; padding: 0; list-style: none; }
.memo__col li { position: relative; padding: 7px 0 7px 22px; border-top: 1px dashed var(--line); }
.memo__col li:first-child { border-top: 0; }
.memo__col li::before { content: ""; position: absolute; left: 4px; top: calc(7px + .775em - 4px); width: 8px; height: 8px; border-radius: 50%; }
.memo__col--ok li::before { background: var(--green); }
.memo__col--no li::before { background: var(--red); }
.memo__rule { margin-top: 20px; padding: 16px 20px; border-left: 4px solid var(--board); background: var(--card); border-radius: 0 12px 12px 0; }
.memo__rule p { margin: 0; }
.memo__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Шаги */
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 32px 0 0; padding: 0; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 50%; background: var(--board); color: var(--yellow); font: 700 18px var(--serif); }
.steps b { font-size: 18px; }
.steps span { color: var(--muted); }

/* Полный набор */
.nabor { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.nabor h2 { color: var(--chalk); }
.nabor__text > p { color: var(--chalk-dim); }
.nabor__list { list-style: none; margin: 22px 0 0; padding: 0; }
.nabor__list li { padding: 10px 0; border-top: 1px solid rgba(244, 241, 230, .14); color: var(--chalk-dim); }
.nabor__list b { color: var(--chalk); }
.nabor__price { display: flex; flex-direction: column; gap: 4px; margin: 26px 0 0; }
.nabor__price span { color: var(--chalk-dim); }
.nabor__price b { font: 700 24px/1.25 var(--serif); color: var(--yellow); }
.pre { background: var(--card); color: var(--ink); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.pre h3 { font-size: 24px; }
.pre > p { margin: 0; color: var(--muted); font-size: 15px; }
.pre label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.pre label em { font-style: normal; font-weight: 400; }
.pre label > span { display: block; }
.pre .check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14px; color: var(--ink); }
.pre .check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--green); }
.pre .check span { line-height: 20px; }
.pre .btn { width: 100%; }
.pre__msg { margin: 0; min-height: 1.4em; font-size: 15px; }
.pre__msg.ok { color: var(--green); font-weight: 600; }
.pre__msg.err { color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Вопросы */
.faq h2, .faq details { max-width: 860px; }
.faq h2 { margin-bottom: 24px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font-weight: 600; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 400 26px/1 var(--sans); color: var(--green); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* Подвал */
.foot { background: var(--board-2); color: var(--chalk-dim); font-size: 14px; padding: 28px 0; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot a { color: var(--chalk-dim); }
.foot__legal { flex-basis: 100%; font-size: 12.5px; opacity: .7; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--board); color: var(--chalk); padding: 12px 20px; border-radius: 12px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 960px) {
  .hero__in { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; padding-bottom: 64px; }
  .hero__demo { max-width: 520px; }
  .gen { grid-template-columns: 1fr; }
  .gen__list { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .nabor { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { display: none; }
  .section { padding: 60px 0; }
  .facts__in { grid-template-columns: 1fr; gap: 18px; }
  .fact b { font-size: 28px; }
  .memo, .steps { grid-template-columns: 1fr; }
  .gen__list { display: flex; flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
  .gen__list::-webkit-scrollbar { display: none; }
  .gen__tab { flex: 0 0 auto; width: auto; max-width: 260px; scroll-snap-align: start; }
  .gen__card { padding: 20px 16px; border-radius: 14px; }
  .gen__title { font-size: 22px; }
  .gen__actions .btn, .memo__cta .btn, .hero__cta .btn { width: 100%; }
  .chalk-under { white-space: normal; }
  .lead { font-size: 17px; }
  .pre { padding: 22px 16px; }
  .demo { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .toast, .faq summary::after { transition: none; }
}
