/* Сайт haohao.su — одна вёрстка, две темы. Цвета — токенами: светлая «Нефрит» в :root, тёмная «Чёрный лак»
   в :root[data-theme=dark]; сами значения подставляет сборщик site/build.py (там же проверяется контраст). */
:root { color-scheme: light; --bg: #f3f7f4; --bg-alt: #e7f0eb; --surface: #ffffff; --paper: #ffffff; --ink: #143d33; --text: #1d3a33; --muted: #4f665f; --line: #cddcd4; --accent: #1f6b5a; --accent-ink: #ffffff; --accent-soft: #dfece5; --cta: #c8372d; --cta-hover: #ae2f26; --cta-ink: #ffffff; --seal: #c0332a; --seal-soft: #e7b3ad; --ok: #1b7560; --focus: #1f6b5a; --panel: #143d33; --panel-ink: #ffffff; --panel-accent: #9fd0c0; --panel-edge: #143d33; --frame: #0e2a23; --frame-edge: #35564c; --frame-ring: rgba(20, 61, 51, .07); --frame-glow: rgba(31, 107, 90, 0); --shade: rgba(20, 61, 51, .36); --glyph: rgba(31, 107, 90, .08); --band-from: #1f6b5a; --band-to: #8fc1b1; --ghost: #dde8e2; --ink-brush: #143d33; --user-brush: #1f6b5a; --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.4l2.6 2.6 5-5.6' fill='none' stroke='%231f6b5a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:root[data-theme=dark] { color-scheme: dark; --bg: #15110f; --bg-alt: #1b1613; --surface: #231d19; --paper: #1b1613; --ink: #f6ecd9; --text: #e8ddc9; --muted: #b9ac96; --line: #3d332c; --accent: #e0b45a; --accent-ink: #1b1410; --accent-soft: #2c241e; --cta: #c8372d; --cta-hover: #d03c32; --cta-ink: #ffffff; --seal: #ee7061; --seal-soft: #6e342d; --ok: #6fc7ab; --focus: #e0b45a; --panel: #1f1815; --panel-ink: #f6ecd9; --panel-accent: #e0b45a; --panel-edge: #5a4526; --frame: #050404; --frame-edge: #7d6a59; --frame-ring: rgba(224, 180, 90, .10); --frame-glow: rgba(224, 180, 90, .16); --shade: rgba(0, 0, 0, .7); --glyph: rgba(200, 55, 45, .13); --band-from: #15110f; --band-to: #15110f; --ghost: #352c26; --ink-brush: #f6ecd9; --user-brush: #e0b45a; --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.4l2.6 2.6 5-5.6' fill='none' stroke='%23e0b45a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { color-scheme: dark; --bg: #15110f; --bg-alt: #1b1613; --surface: #231d19; --paper: #1b1613; --ink: #f6ecd9; --text: #e8ddc9; --muted: #b9ac96; --line: #3d332c; --accent: #e0b45a; --accent-ink: #1b1410; --accent-soft: #2c241e; --cta: #c8372d; --cta-hover: #d03c32; --cta-ink: #ffffff; --seal: #ee7061; --seal-soft: #6e342d; --ok: #6fc7ab; --focus: #e0b45a; --panel: #1f1815; --panel-ink: #f6ecd9; --panel-accent: #e0b45a; --panel-edge: #5a4526; --frame: #050404; --frame-edge: #7d6a59; --frame-ring: rgba(224, 180, 90, .10); --frame-glow: rgba(224, 180, 90, .16); --shade: rgba(0, 0, 0, .7); --glyph: rgba(200, 55, 45, .13); --band-from: #15110f; --band-to: #15110f; --ghost: #352c26; --ink-brush: #f6ecd9; --user-brush: #e0b45a; --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.4l2.6 2.6 5-5.6' fill='none' stroke='%23e0b45a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); } }
@media print { :root, :root[data-theme=dark] { color-scheme: light; --bg: #f3f7f4; --bg-alt: #e7f0eb; --surface: #ffffff; --paper: #ffffff; --ink: #143d33; --text: #1d3a33; --muted: #4f665f; --line: #cddcd4; --accent: #1f6b5a; --accent-ink: #ffffff; --accent-soft: #dfece5; --cta: #c8372d; --cta-hover: #ae2f26; --cta-ink: #ffffff; --seal: #c0332a; --seal-soft: #e7b3ad; --ok: #1b7560; --focus: #1f6b5a; --panel: #143d33; --panel-ink: #ffffff; --panel-accent: #9fd0c0; --panel-edge: #143d33; --frame: #0e2a23; --frame-edge: #35564c; --frame-ring: rgba(20, 61, 51, .07); --frame-glow: rgba(31, 107, 90, 0); --shade: rgba(20, 61, 51, .36); --glyph: rgba(31, 107, 90, .08); --band-from: #1f6b5a; --band-to: #8fc1b1; --ghost: #dde8e2; --ink-brush: #143d33; --user-brush: #1f6b5a; --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.4l2.6 2.6 5-5.6' fill='none' stroke='%231f6b5a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); } }

@font-face { font-family: "Golos Text"; src: url("/fonts/GolosText.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded-500.b5aed204.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded-700.693ccdb9.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "HaoHao Kai"; src: url("/fonts/kai-site.93a2ec32.woff2") format("woff2"); font-display: swap; }


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 "Golos Text", "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.zh { font-family: "HaoHao Kai", "Kaiti SC", KaiTi, STKaiti, serif; font-weight: 400; }
.py { font-family: "HaoHao Kai", "Golos Text", sans-serif; }
.nw { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.only-dark { display: none; }
:root[data-theme=dark] .only-dark { display: revert; }
:root[data-theme=dark] .only-light { display: none; }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 8px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; margin-right: auto; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -.01em; }
.brand span { white-space: nowrap; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { padding: 9px 9px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--accent-soft); }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn svg { width: 22px; height: 22px; }
.theme .moon { display: none; }
:root[data-theme=dark] .theme .sun { display: none; }
:root[data-theme=dark] .theme .moon { display: block; }
.menu { display: none; position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu .sheet { position: absolute; right: 0; top: 52px; min-width: 230px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 18px 40px -18px var(--shade); }
.menu .sheet a { display: block; padding: 12px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.menu .sheet a:hover { background: var(--accent-soft); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 13px 26px;
  border: 1px solid transparent; border-radius: 14px; font-weight: 700; font-size: 17px; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: transform .15s, background-color .15s, box-shadow .15s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn--cta { background: var(--cta); color: var(--cta-ink); box-shadow: 0 10px 24px -12px var(--cta); }
.btn--cta:hover { background: var(--cta-hover); }
.btn--alt { background: var(--accent-soft); color: var(--ink); border-color: var(--line); }
.btn--alt:hover { border-color: var(--accent); }
.btn--s { min-height: 44px; padding: 9px 18px; font-size: 15.5px; border-radius: 12px; }

/* ---------- Первый экран ---------- */
.hero { position: relative; overflow: hidden; padding: 44px 0 84px; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: 40px; }
.hero h1 { color: var(--ink); font-size: clamp(34px, 5.1vw, 58px); line-height: 1.06; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { margin-top: 20px; max-width: 34em; font-size: clamp(17.5px, 1.7vw, 20px); line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
/* где ещё есть HaoHao: веб-версия и Telegram — ссылки, магазины — «скоро» */
.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.platforms .btn--s { min-height: 40px; padding: 8px 14px; font-size: 14.5px; font-weight: 600; }
.btn--soon { background: transparent; color: var(--muted); border: 1px dashed var(--line); cursor: default; }
.btn--soon:active { transform: none; }
.trust-line { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 24px; color: var(--muted); font-size: 14.5px; }
.trust-line li { display: inline-flex; align-items: center; gap: 7px; }
.trust-line svg { width: 16px; height: 16px; color: var(--ok); flex: none; }
.hero .glyph { position: absolute; right: -30px; bottom: -90px; z-index: 0; font-size: clamp(260px, 34vw, 460px); line-height: 1; color: var(--glyph); pointer-events: none; user-select: none; }
.hero .stage { position: relative; justify-self: center; }
.wave { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; z-index: 0; background: linear-gradient(90deg, var(--band-from), var(--band-to)); }
:root[data-theme=dark] .wave { display: none; }
.stamp { display: none; position: absolute; z-index: 2; left: -26px; bottom: 34px; width: 72px; height: 72px; place-items: center; transform: rotate(-7deg);
  border: 3px solid var(--seal); border-radius: 10px; color: var(--seal); font-size: 36px; line-height: 1; background: color-mix(in srgb, var(--bg) 70%, transparent); }
:root[data-theme=dark] .stamp { display: grid; }

/* ---------- Телефон со снимком ---------- */
.phone { position: relative; width: min(290px, 68vw); aspect-ratio: 9 / 19.5; padding: 9px; border-radius: 40px; background: var(--frame);
  box-shadow: 0 0 0 1.5px var(--frame-edge), 0 0 0 6px var(--frame-ring), 0 0 48px -6px var(--frame-glow),
    0 40px 70px -34px var(--shade), 0 18px 30px -22px var(--shade); }
.phone picture { display: block; width: 100%; height: 100%; }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 31px; background: var(--surface); }
.phone--s { width: min(210px, 42vw); padding: 7px; border-radius: 30px; }
.phone--s img { border-radius: 23px; }
.pair { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; align-items: start; gap: 18px; }
.pair .phone:nth-child(2) { margin-top: 44px; }

/* ---------- Разделы ---------- */
.sec { padding: clamp(56px, 8vw, 104px) 0; }
.sec--alt { background: var(--bg-alt); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sec h2 { color: var(--ink); font-size: clamp(27px, 3.5vw, 41px); line-height: 1.13; font-weight: 800; letter-spacing: -.015em; text-wrap: balance; }
.sec h2 + p, .sec h2 + .sub { margin-top: 16px; }
.sub { max-width: 40em; font-size: 18px; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }

/* Боль */
.pains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.card h3 { color: var(--ink); font-size: 19px; line-height: 1.3; font-weight: 700; }
.card p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.pains .card { border-top: 3px solid var(--seal); }
.turn { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 44px; color: var(--ink); font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; text-align: center; }
.turn svg { width: 26px; height: 26px; color: var(--accent); }

/* Возможности */
.feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(28px, 5vw, 72px); }
.feature--flip .feature__text { order: 2; }
.feature__visual { display: grid; justify-items: center; }
.ticks { display: grid; gap: 11px; margin-top: 22px; }
.ticks li { position: relative; padding-left: 32px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .22em; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft) var(--tick) center / 12px no-repeat; border: 1px solid var(--line); }
.ticks strong, .feature p strong { color: var(--ink); font-weight: 700; }
.feature .btn { margin-top: 28px; }
.feature p + p { margin-top: 14px; }
.feature .ticks + p { margin-top: 20px; }

/* Живая проба прописи */
.demo { width: min(360px, 100%); padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 30px 60px -40px var(--shade); }
.demo__title { color: var(--ink); font-weight: 800; font-size: 18px; text-align: center; }
.demo__title .zh { font-size: 26px; color: var(--seal); }
.demo__hint { margin-top: 4px; color: var(--muted); font-size: 13.5px; text-align: center; }
.grid { position: relative; margin-top: 14px; aspect-ratio: 1; border: 2px solid var(--seal-soft); border-radius: 18px; background: var(--paper); overflow: hidden; touch-action: none; }
.grid svg, .grid canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.grid .axes line { stroke: var(--seal-soft); stroke-width: 6; stroke-dasharray: 22 22; }
.grid .ghost path { fill: var(--ghost); }
.grid .ink path { fill: none; stroke: var(--ink-brush); stroke-width: 150; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.grid .ink path.on { stroke-dashoffset: 0; transition: stroke-dashoffset .62s cubic-bezier(.4, .1, .3, 1); }
.grid canvas { cursor: crosshair; }
.demo__count { margin-top: 12px; color: var(--muted); font-size: 14px; text-align: center; }
.demo__count b { color: var(--ink); }
.demo__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.demo__btns .btn { min-height: 46px; padding: 10px 12px; font-size: 15px; }
.minis { display: flex; justify-content: center; gap: 16px; margin-top: 26px; }

/* Числа */
.band { background: var(--panel); color: var(--panel-ink); border-block: 1px solid var(--panel-edge); }
.nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; padding: clamp(40px, 6vw, 64px) 0; text-align: center; }
.nums b { display: block; color: var(--panel-accent); font-size: clamp(30px, 4.4vw, 50px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nums span { display: block; margin-top: 6px; font-size: 15px; opacity: .92; }

/* Доверие */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.grid3 .card svg { width: 30px; height: 30px; margin-bottom: 14px; color: var(--accent); }

/* Цены */
.prices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 38px; align-items: stretch; }
.price { display: flex; flex-direction: column; padding: 24px 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.price h3 { color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.25; }
.price .sum { margin-top: 12px; color: var(--ink); font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.price .sum s { margin-left: 8px; color: var(--muted); font-size: 17px; font-weight: 500; }
.price .sum small { margin-left: 6px; color: var(--muted); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.price .gain { margin-top: 6px; color: var(--ok); font-size: 14.5px; font-weight: 700; }
.price p { margin-top: 12px; color: var(--muted); font-size: 15.5px; }
.price--best { border: 2px solid var(--cta); box-shadow: 0 24px 50px -36px var(--cta); }
.price--free .sum { color: var(--ok); }
.price--wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px 36px; }
.price--wide > div { flex: none; min-width: 200px; }
.price--wide > p { margin-top: 0; font-size: 16.5px; }
.note { margin-top: 26px; color: var(--muted); font-size: 16px; text-align: center; }
.cta-row { display: flex; justify-content: center; margin-top: 26px; }

/* Установка */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; counter-reset: step; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 26px 20px 0; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); overflow: hidden; text-align: center; counter-increment: step; }
.step p { min-height: 4.6em; }
.step p::before { content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 12px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.step .phone { margin-bottom: -150px; }

/* Вопросы */
.faq { max-width: 860px; margin: 36px auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px; color: var(--ink); font-weight: 700; font-size: 17.5px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; margin-right: 6px; border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 2px 20px; max-width: 46em; }

/* Мастерская */
.studio { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: 26px; background: var(--surface); }
.seal-mark { display: grid; place-items: center; width: 92px; height: 92px; border: 4px solid var(--seal); border-radius: 16px; color: var(--seal); font-size: 54px; line-height: 1; transform: rotate(-5deg); }
.studio h2 { font-size: clamp(22px, 2.6vw, 30px); }
.studio h2 .zh { margin-left: 4px; color: var(--seal); font-weight: 400; white-space: nowrap; }
.studio p { margin-top: 10px; color: var(--muted); max-width: 44em; }
.studio .zi-teaser-btns { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 0; }   /* три кнопки справочника — ровным столбиком одной ширины */

/* Подвал */
.foot { padding: 44px 0 110px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.foot .wrap { display: grid; gap: 18px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot a { color: var(--ink); }
.foot .brand { font-size: 19px; }
.foot small { font-size: 13.5px; line-height: 1.55; }

/* Липкая кнопка на телефоне */
.dock { position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--notice-h, 0px)); z-index: 40; display: none; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 18px 40px -16px var(--shade); transform: translateY(140%); transition: transform .25s; }
.dock.show { transform: none; }

/* Плашка-уведомление: видна, пока не нажали «Понятно» (признак noticed ставит скрипт в <head> — без мигания) */
.notice { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 45; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  max-width: 820px; margin-inline: auto; padding: 14px 14px 14px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  color: var(--text); font-size: 14.5px; line-height: 1.45; box-shadow: 0 18px 40px -16px var(--shade); }
.notice p { flex: 1 1 200px; }
.notice .btn { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.noticed .notice { display: none; }
/* ---------- Плашка к старту HSK 3.0 (до конца января 2027) ---------- */
.hsk30 { background: var(--accent-soft); border-bottom: 1px solid var(--line); color: var(--ink); font-size: 14.5px; line-height: 1.4; }
.hsk30 .wrap { padding-block: 9px; text-align: center; }
.hsk30 p { margin: 0; }
.hsk30 a { font-weight: 700; white-space: nowrap; }
.dock span { flex: 1; min-width: 0; color: var(--ink); font-size: 14px; line-height: 1.3; }
.dock b { display: block; font-size: 15px; }

/* ---------- Страница «Под заказ» ---------- */
.dev-hero { position: relative; overflow: hidden; padding: 56px 0 64px; }
.dev-hero .wrap { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 34px; }
.dev-hero .seal-mark { width: 132px; height: 132px; font-size: 80px; border-width: 5px; border-radius: 22px; }
.dev-hero h1 { color: var(--ink); font-size: clamp(30px, 4.4vw, 50px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.dev-hero .cn { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 10px; color: var(--seal); font-size: clamp(26px, 3.4vw, 38px); }
.dev-hero .cn .py { color: var(--muted); font-size: 18px; }
.dev-hero .lead { margin-top: 18px; }
.cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 8px; }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; counter-reset: flow; }
.flow li { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); counter-increment: flow; }
.flow li::before { content: counter(flow); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 4vw, 56px); align-items: start; margin-top: 34px; }
.contact__ways { display: grid; gap: 12px; }
.way { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; }
.way small { display: block; color: var(--muted); font-weight: 400; font-size: 14px; }
.way svg { width: 26px; height: 26px; flex: none; color: var(--accent); }
.way:hover { border-color: var(--accent); }
.form { display: grid; gap: 16px; padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.field { display: grid; gap: 6px; }
.field label { color: var(--ink); font-weight: 700; font-size: 15.5px; }
.field input, .field textarea { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .hint { color: var(--muted); font-size: 13.5px; }
.trap { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.agree { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; color: var(--text); font-size: 15px; line-height: 1.45; cursor: pointer; }
.agree input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.form .btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.form__state { min-height: 1.5em; font-weight: 700; }
.form__state.ok { color: var(--ok); }
.form__state.bad { color: var(--seal); }
.form small { color: var(--muted); font-size: 13.5px; }

/* ---------- Появление (только со скриптом и если не просили меньше движения) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .js .rise.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grid .ink path.on { transition: none; }
}

/* ---------- Политика и условия: текст на двух языках, виден один ---------- */
html[data-lang=ru] .t[lang=en], html[data-lang=en] .t[lang=ru] { display: none; }
.doc { padding: 30px 0 76px; }
.doc .wrap { width: min(780px, 100% - 40px); }
.langs { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.langs button { min-height: 44px; padding: 8px 18px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; }
.langs button:hover { color: var(--ink); }
html[data-lang=ru] .langs [data-lang-set=ru], html[data-lang=en] .langs [data-lang-set=en] { background: var(--accent-soft); color: var(--ink); }
.doc h1 { margin-top: 28px; color: var(--ink); font-size: clamp(30px, 4.6vw, 44px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.doc h2 { margin-top: 40px; color: var(--ink); font-size: 23px; line-height: 1.25; font-weight: 700; }
.doc p, .doc ul { margin-top: 14px; }
.doc ul { padding-left: 22px; list-style: disc; }
.doc li { margin-top: 8px; }
.doc li::marker { color: var(--accent); }
.doc strong { color: var(--ink); }
.doc a { overflow-wrap: anywhere; }
.doc__back { margin-top: 44px; font-weight: 600; }

/* ---------- Главная, редакция 2: заголовки Unbounded, первый экран с мазком и печатью, «большая цифра» ---------- */
h1, h2 { font-family: "Unbounded", "Golos Text", "Segoe UI", Roboto, Arial, sans-serif; }
.hero--v2 h1 { font-weight: 700; font-size: clamp(30px, 4vw, 51px); line-height: 1.05; letter-spacing: -.015em; }
.hero--v2 .facts { margin-top: 26px; color: var(--muted); font-size: 15px; }
.hero--v2 .stage { position: relative; justify-self: center; padding: 30px 18px 34px; }
/* мазок рисуется вдоль, «сухие» просветы — вдоль штриха; наклон даёт поворот всего рисунка */
.stage .brush { position: absolute; left: -58%; top: 22%; width: 222%; z-index: 0; color: var(--ink-brush); opacity: .92;
  transform: rotate(-31deg); pointer-events: none; }
.stage .brush--tail { left: auto; right: -30%; top: 1%; width: 62%; transform: rotate(-31deg); }
.stage .tilt { position: relative; z-index: 1; transform: rotate(-4deg); }
.stage .seal { position: absolute; z-index: 2; left: -34px; bottom: 3%; width: clamp(70px, 7.4vw, 96px); transform: rotate(3deg);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .18)); }
.big { padding: clamp(64px, 10vw, 132px) 0; border-top: 1px solid var(--line); }
.big__num { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .22em; color: var(--ink); font-weight: 700; line-height: .92; }
.big__num b { font-size: clamp(84px, 19vw, 250px); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.big__num span { font-size: clamp(28px, 4.2vw, 56px); font-weight: 500; letter-spacing: -.01em; }
.big__text { margin-top: clamp(22px, 3vw, 34px); max-width: 38em; font-size: clamp(18px, 1.8vw, 21.5px); line-height: 1.55; }
.big__line { margin-top: 22px; color: var(--muted); font-size: 15.5px; }

/* лента экранов: на ПК пять в ряд, на телефоне — листать пальцем */
.strip { overflow: hidden; }
.strip__lead { max-width: 22em; color: var(--ink); font-size: clamp(24px, 3vw, 38px); line-height: 1.15; font-weight: 700; }
.strip__sub { margin-top: 14px; max-width: 40em; color: var(--muted); font-size: 17px; }
.strip__row { display: flex; gap: clamp(18px, 2.6vw, 36px); margin-top: clamp(30px, 4vw, 48px); padding: 6px max(20px, calc((100% - 1160px) / 2)) 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; list-style: none; }
.shot { flex: 0 0 auto; width: clamp(180px, 17vw, 204px); scroll-snap-align: center; }
.shot:nth-child(even) { margin-top: 34px; }
.shot .phone { width: 100%; }
.shot p { margin-top: 16px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.shot p b { color: var(--ink); font-weight: 700; }
/* переводчик и письмо: пронумерованные факты вместо галочек */
.feature--v2 h2 { color: var(--ink); font-size: clamp(26px, 3.2vw, 40px); line-height: 1.12; font-weight: 700; }
.steps-list { margin-top: 26px; counter-reset: step; list-style: none; padding: 0; }
.steps-list li { counter-increment: step; position: relative; padding-left: 52px; margin-top: 18px; }
.steps-list li::before { content: counter(step); position: absolute; left: 0; top: -4px; font-family: "Unbounded", sans-serif; font-weight: 700;
  font-size: 26px; line-height: 1; color: var(--seal); }
.free-line { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15.5px; }
/* заметка автора — на «бумаге» с зерном, подпись с маленькой печатью */
.author__paper { position: relative; max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 56px); border-radius: 20px;
  background-color: var(--paper); 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .35 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  border: 1px solid var(--line); box-shadow: 0 30px 60px -44px var(--shade); }
.author__paper blockquote { margin: 0; }
.author__paper blockquote p { color: var(--text); font-size: clamp(18px, 1.9vw, 21px); line-height: 1.65; }
.author__paper figcaption { display: flex; align-items: center; gap: 14px; margin-top: 26px; color: var(--ink); font-weight: 700; }
.seal-mini { width: 46px; flex: none; transform: rotate(-4deg); }
/* «Лаоши» и игра (02.11): широкая картинка без рамки телефона — снимок компьютера или обложка */
.wide { margin-top: clamp(28px, 4vw, 44px); }
.wide img { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: 0 40px 70px -40px var(--shade), 0 18px 30px -24px var(--shade); }
.laoshi__more { margin-top: clamp(40px, 6vw, 72px); }
.laoshi .sub, .game .sub { max-width: 44em; }
/* коротко о важном — спокойный блок в две колонки на ПК */
.brief__wrap { display: grid; grid-template-columns: .8fr 1.6fr; gap: clamp(24px, 4vw, 60px); align-items: start; }
.brief h2 { color: var(--ink); font-size: clamp(24px, 2.8vw, 34px); line-height: 1.15; font-weight: 700; }
.brief__text p + p { margin-top: 16px; }

/* ---------- Узкие экраны ---------- */
/* семь пунктов шапки (с «Преподавателям», 02.11) в строку помещаются от ~1240 px — уже — меню */
@media (max-width: 1240px) {
  .nav { display: none; }
  .menu { display: block; }
}
@media (max-width: 1020px) {
  .prices { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .menu { display: block; }
  .flow { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .hero { padding: 26px 0 70px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 34px; }
  .hero .stage { order: 2; }
  .stamp { left: -14px; }
  .pains, .grid3 { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; }
  .brief__wrap { grid-template-columns: 1fr; }
  .stage .seal { left: -14px; bottom: 1%; }
  .feature--flip .feature__text { order: 0; }
  .nums { grid-template-columns: repeat(2, 1fr); }
  .nums li:last-child { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; }
  .step p { min-height: 0; }
  .studio { grid-template-columns: 1fr; justify-items: start; }
  .dock { display: flex; }
  .dev-hero .wrap { grid-template-columns: 1fr; }
  .cols, .contact { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { width: min(1160px, 100% - 32px); }
  .top .wrap { height: 60px; }
  .top .btn--s { padding: 9px 14px; }
  .brand span { display: none; }
  .notice { padding: 12px 12px 12px 14px; font-size: 13.5px; gap: 8px 12px; }
  .actions .btn { flex: 1 1 100%; }
  .prices, .flow { grid-template-columns: 1fr; }
  .price--wide { flex-direction: column; align-items: stretch; gap: 0; }
  .price--wide > p { margin-top: 12px; font-size: 15.5px; }
  .pair { gap: 10px; }
  .phone--s { width: min(170px, 42vw); }
}

@media print {
  .top, .dock, .notice, .stamp, .hero .glyph { display: none !important; }
  .js .rise { opacity: 1 !important; transform: none !important; }
  .sec { padding: 24px 0; break-inside: avoid; }
}
