@font-face { font-family: "American Captain"; src: url("fonts/american-captain.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Golos Text"; src: url("fonts/golos-cyrillic.woff2") format("woff2"); font-weight: 400 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; src: url("fonts/golos-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap;
  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+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0f1115;
  --surface: #161a20;
  --surface-2: #1c2129;
  --line: #262b33;
  --text: #e7e9ec;
  --muted: #9aa1ab;
  --accent: #4285f4;
  --accent-text: #7aa9ff;
  --accent-soft: rgba(66, 133, 244, .13);
  --warn: #f5a524;
  --warn-soft: rgba(245, 165, 36, .12);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16.5px/1.62 "Golos Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 28px 20px calc(80px + env(safe-area-inset-bottom)); }

/* типографика */
.display { font-family: "American Captain", "Golos Text", sans-serif; font-weight: 400; letter-spacing: .01em; line-height: .95; margin: 0; }
p { margin: 0 0 14px; }
b { font-weight: 600; color: #fff; }
a { color: var(--accent-text); text-decoration: none; border-bottom: 1px solid rgba(122, 169, 255, .35); }
a:active { opacity: .7; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 600; margin: 30px 0 10px; color: #fff; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 6px 0; }
li::marker { color: var(--accent); }
.accent { color: var(--accent); }

/* обложка */
.hero { padding: 6px 0 28px; }
.hero__top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 44px; }
.brand { font-weight: 700; color: var(--text); letter-spacing: .02em; text-transform: none; font-size: 14px; }
.hero__title { font-size: clamp(46px, 13.5vw, 84px); color: #fff; }
.rule { width: 64px; height: 4px; border-radius: 2px; background: var(--accent); margin-top: 26px; }

/* оглавление */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 8px 8px; margin: 28px 0 8px; }
.toc .kicker { padding: 0 12px; }
.toc ol { list-style: none; margin: 8px 0 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: flex; gap: 14px; align-items: baseline; padding: 10px 12px; border: 0; border-radius: 10px; color: var(--text); }
.toc a:active, .toc a:hover { background: var(--surface-2); }
.toc__num { font-family: "Golos Text"; font-weight: 700; font-size: 13px; color: var(--accent); min-width: 20px; }

/* разделы */
.chapter { padding-top: 56px; scroll-margin-top: 8px; }
.kicker { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 12px; }
.chapter h2 { font-size: clamp(36px, 10vw, 54px); color: #fff; margin-bottom: 20px; }
.chapter + .chapter { border-top: 1px solid var(--line); margin-top: 24px; }

/* шаги */
.step { display: flex; gap: 12px; align-items: flex-start; }
.step__num { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 700; display: grid; place-items: center; margin-top: -1px; }

/* выноски */
.note { display: flex; gap: 12px; border-radius: var(--radius); padding: 14px 16px; margin: 18px 0; background: var(--accent-soft); }
.note p { margin: 0 0 6px; } .note p:last-child { margin: 0; }
.note__icon { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--accent); color: #fff; margin-top: 2px; font-style: normal; }
.note--warn { background: var(--warn-soft); }
.note--warn .note__icon { background: var(--warn); color: #1a1205; }

/* готовые фразы */
.phrase { position: relative; margin: 14px 0; padding: 14px 16px 12px; background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 4px var(--radius) var(--radius) 4px; }
.phrase__label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.phrase blockquote { margin: 0; color: #d6dae0; }

/* видео */
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin: 16px 0 20px; }
.yt img, .yt iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.yt__play { position: absolute; inset: 0; margin: auto; width: 72px; height: 50px; border: 0; border-radius: 14px;
  background: rgba(255, 0, 0, .9); cursor: pointer; }
.yt__play::after { content: ""; position: absolute; left: 30px; top: 15px; border-style: solid; border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff; }

/* финал и подвал */
.final { text-align: center; font-size: 18px; color: #fff; margin: 40px 0 0; padding: 24px 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(66, 133, 244, .22), rgba(66, 133, 244, .05)); }
.foot { margin-top: 36px; text-align: center; color: var(--muted); font-size: 13px; }

/* прогресс и «наверх» */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10; }
.progress__bar { height: 100%; width: 0; background: var(--accent); }
.totop { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 20px; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .2s; }
.totop.is-visible { opacity: 1; pointer-events: auto; }
