:root {
  color-scheme: dark;
  --ink: #07090d;
  --vault: #0e121a;
  --vault-raised: #141a26;
  --line: rgba(170, 188, 230, .12);
  --line-strong: rgba(170, 188, 230, .22);
  --silver: #e8ebf2;
  --text: #c3c9d6;
  --mist: #a6aec0;
  --dim: #8a93a7;
  --sapphire: #93a9ff;
  --sapphire-strong: #7590ff;
  --emerald: #6fdcac;
  --violet: #bf9cff;
  --display: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sans: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-family: var(--sans);
  background: var(--ink);
  color: var(--silver);
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 17px; line-height: 1.7; background: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--sapphire); text-underline-offset: 4px; text-decoration-color: rgba(147, 169, 255, .4); }
a:hover { color: #c3d0ff; text-decoration-color: currentColor; }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--sapphire); outline-offset: 4px; border-radius: 6px; }
p { margin: 0 0 18px; color: var(--text); }
strong { color: var(--silver); font-weight: 650; }
code { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: .88em; color: var(--silver); padding: 1px 6px; border-radius: 6px; background: rgba(147, 169, 255, .1); white-space: nowrap; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.035em; }
h3 { line-height: 1.3; font-weight: 650; letter-spacing: -.01em; color: var(--silver); }
ul, ol { padding-left: 22px; }
li { color: var(--text); margin-bottom: 12px; }
li::marker { color: var(--sapphire); }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 30; padding: 10px 18px; transform: translateY(-160%); border-radius: 10px; background: var(--sapphire); color: #0a1226; }
.skip-link:focus { transform: none; }
.site-header, main, .site-footer { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }

/* Шапка */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 88px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--silver); text-decoration: none; }
.brand:hover { color: var(--silver); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--sapphire); background: radial-gradient(circle at 50% 30%, #1d2741, #0c0f16); }
.brand-name { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; font-size: 21px; line-height: 1; }
.brand-caption { display: block; margin-top: 5px; font-family: var(--sans); font-weight: 400; letter-spacing: 0; font-size: 12px; line-height: 1.2; color: var(--dim); }
.header-links { display: flex; align-items: center; gap: 24px; font-size: 15px; }
.header-links a { text-decoration: none; }
.community-link { color: var(--mist); }
.community-link:hover { color: var(--silver); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 13px 24px; border-radius: 999px; background: var(--sapphire); color: #0a1226; font-size: 16px; font-weight: 650; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background .15s; }
.button:hover { color: #0a1226; background: #b4c4ff; }
.button-compact { min-height: 42px; padding: 9px 18px; font-size: 14px; }
.vk-mark { font-weight: 800; letter-spacing: -.05em; }

/* Прогресс и лента глав */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 25; height: 2px; pointer-events: none; }
.reading-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--sapphire-strong), #c3d0ff); transform: scaleX(0); transform-origin: 0 50%; }
.chapter-bar { display: none; }

/* Первый экран */
.hero { position: relative; padding: 80px 0 64px; }
.hero::before { content: ""; position: absolute; z-index: -1; width: 70%; height: 420px; top: 0; left: -80px; background: radial-gradient(ellipse, rgba(117, 144, 255, .12), transparent 70%); pointer-events: none; }
h1 { margin: 0 0 28px; font-size: clamp(44px, 5.6vw, 76px); line-height: 1; padding-bottom: .06em; background: linear-gradient(180deg, #ffffff 0%, #d6dcea 52%, #8e9bbc 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { max-width: 640px; font-size: 19px; line-height: 1.6; color: #b9c0cf; }
.hero-meta { margin: 0; font-size: 14px; color: var(--dim); }
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.highlight { display: flex; flex-direction: column; padding: 24px 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--vault); text-decoration: none; transition: border-color .15s, background .15s; }
.highlight:hover { border-color: rgba(147, 169, 255, .4); background: var(--vault-raised); }
.highlight-label { color: var(--mist); font-size: 14px; }
.highlight strong { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.1; letter-spacing: -.035em; margin: 10px 0 8px; }
.highlight-note { color: var(--dim); font-size: 14px; }

/* Раскладка */
.guide-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 72px; align-items: start; }
.guide-body { min-width: 0; max-width: 780px; }
.sidebar { position: sticky; top: 32px; }
.toc-title { font-size: 14px; font-weight: 650; color: var(--silver); }
.toc ol { list-style: none; padding: 0; margin: 14px 0 20px; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc li a { display: flex; align-items: baseline; gap: 12px; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent; color: var(--mist); font-size: 14px; line-height: 1.4; text-decoration: none; transition: color .15s, border-color .15s; }
.toc li a:hover { color: var(--silver); }
.toc li a span { min-width: 16px; color: var(--dim); font-variant-numeric: tabular-nums; }
.toc li a[aria-current="true"] { color: var(--silver); border-left-color: var(--sapphire); }
.toc li a[aria-current="true"] span { color: var(--sapphire); }
.toc-community { display: inline-flex; gap: 6px; font-size: 14px; font-weight: 600; text-decoration: none; }

/* Главы */
.chapter { padding: 0 0 56px; margin-bottom: 56px; border-bottom: 1px solid var(--line); scroll-margin-top: 32px; }
.chapter-kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--sapphire); }
.chapter-num { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(147, 169, 255, .35); border-radius: 50%; font-family: var(--display); font-size: 17px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--silver); }
h2 { font-size: clamp(30px, 3.2vw, 40px); line-height: 1.1; margin: 0 0 24px; }
h3 { font-size: 20px; margin: 36px 0 12px; }
.steps { counter-reset: steps; list-style: none; padding: 0; margin: 32px 0; }
.steps > li { display: grid; grid-template-columns: 44px 1fr; gap: 18px; margin-bottom: 28px; counter-increment: steps; }
.steps > li::before { content: counter(steps); font-family: var(--display); font-weight: 800; letter-spacing: -.03em; font-size: 34px; line-height: 1; color: var(--sapphire); text-align: center; }
.steps h3 { margin: 2px 0 8px; }
.steps p { margin-bottom: 0; }
.callout { padding: 22px 24px; margin: 28px 0; border: 1px solid rgba(147, 169, 255, .2); border-left: 3px solid var(--sapphire); border-radius: 4px 16px 16px 4px; background: rgba(147, 169, 255, .06); }
.callout-label { display: block; color: var(--sapphire); font-size: 15px; font-weight: 650; margin-bottom: 6px; }
.callout p { margin: 0; font-size: 16px; }
.callout .callout-action { margin-top: 12px; font-weight: 600; }
.callout-green { border-color: rgba(111, 220, 172, .2); border-left-color: var(--emerald); background: rgba(111, 220, 172, .05); }
.callout-green .callout-label { color: var(--emerald); }
.callout-purple { border-color: rgba(191, 156, 255, .2); border-left-color: var(--violet); background: rgba(191, 156, 255, .05); }
.callout-purple .callout-label { color: var(--violet); }
.daily-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 24px 0; }
.daily-strip > div { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--vault); }
.daily-strip span { font-size: 13px; color: var(--dim); }
.daily-strip strong { margin-top: 2px; font-family: var(--display); font-weight: 800; letter-spacing: -.03em; font-size: 22px; line-height: 1.2; font-variant-numeric: lining-nums; }
.daily-strip .day-final { grid-column: span 2; border-color: rgba(147, 169, 255, .4); background: linear-gradient(135deg, #18213a, #0f1420 75%); }
.day-final strong { color: var(--sapphire); }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before { content: ""; position: absolute; left: 3px; top: .5em; width: 12px; height: 7px; border-left: 2px solid var(--emerald); border-bottom: 2px solid var(--emerald); transform: rotate(-45deg); }
.two-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.info-card { padding: 26px; background: var(--vault); border: 1px solid var(--line); border-radius: 20px; }
.info-card .eyebrow { font-size: 14px; color: var(--mist); }
.info-card h3 { font-family: var(--display); font-weight: 800; font-size: 23px; line-height: 1.2; letter-spacing: -.035em; margin: 6px 0 14px; }
.info-card p, .info-card li { font-size: 16px; }
.info-card p:last-child { margin-bottom: 0; }
.info-card ul { padding-left: 18px; }
.text-link { font-size: 16px; font-weight: 600; }
.example { padding: 24px 26px; margin: 26px 0; background: var(--vault); border: 1px solid var(--line); border-radius: 20px; }
.example .eyebrow { display: block; margin-bottom: 8px; font-size: 14px; color: var(--mist); }
.example-row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
.example-row strong { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; font-size: 21px; line-height: 1.2; color: var(--sapphire); }
.example p { font-size: 16px; margin: 14px 0 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; margin: 28px 0; background: var(--vault); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; text-align: left; }
caption { text-align: left; padding: 16px 20px; font-size: 15px; font-weight: 600; color: var(--silver); border-bottom: 1px solid var(--line); }
th, td { padding: 15px 20px; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { color: var(--dim); font-size: 13px; font-weight: 500; }
tbody th { width: 26%; color: var(--silver); font-weight: 650; }
td { color: var(--text); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.table-note { display: block; font-size: 13px; color: var(--dim); }
.routine-list { margin-bottom: 32px; }
.faq { margin-top: 32px; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; position: relative; padding: 20px 40px 20px 0; list-style: none; font-size: 18px; font-weight: 600; line-height: 1.4; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--sapphire); border-bottom: 2px solid var(--sapphire); transform: rotate(45deg); transition: transform .2s; }
details[open] summary::after { transform: translateY(4px) rotate(-135deg); }
details p { padding-right: 40px; font-size: 16px; }
.closing-card { padding: 48px 40px; border: 1px solid var(--line-strong); border-radius: 28px; background: radial-gradient(ellipse at 100% 0, rgba(117, 144, 255, .18), transparent 70%), var(--vault); margin-bottom: 72px; }
.closing-card h2 { font-size: clamp(30px, 3.2vw, 40px); margin: 0 0 14px; }
.closing-card p { font-size: 17px; margin-bottom: 28px; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; padding: 28px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim); }
.site-footer nav { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; color: var(--mist); }
.site-footer a:hover { color: var(--silver); }

@media (max-width: 960px) {
  :root { scroll-padding-top: 72px; }
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sidebar { display: none; }
  .guide-body { max-width: none; }
  .chapter { scroll-margin-top: 72px; }
  .chapter-bar { position: sticky; top: 0; z-index: 20; display: flex; gap: 6px; overflow-x: auto; padding: 10px 32px; margin: 0 -32px 36px; background: rgba(7, 9, 13, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .chapter-bar::-webkit-scrollbar { display: none; }
  .chapter-bar a { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--mist); font-size: 14px; text-decoration: none; white-space: nowrap; }
  .chapter-bar a span { color: var(--dim); font-variant-numeric: tabular-nums; }
  .chapter-bar a[aria-current="true"] { color: #0a1226; background: var(--sapphire); border-color: var(--sapphire); }
  .chapter-bar a[aria-current="true"] span { color: #26314f; }
  .reading-progress { display: none; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-header, main, .site-footer { width: calc(100% - 32px); }
  .chapter-bar { padding-inline: 16px; margin-inline: -16px; }
  .site-header { min-height: 72px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 19px; }
  .header-links { gap: 14px; }
  .community-link { display: none; }
  .button-compact .vk-mark { display: none; }
  .hero { padding: 40px 0 36px; }
  h1 { font-size: clamp(38px, 10.6vw, 52px); margin-bottom: 20px; }
  .hero-copy { font-size: 17px; }
  .highlights { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 28px; }
  .highlight { padding: 16px 20px; border-radius: 16px; }
  .highlight strong { margin: 4px 0 2px; font-size: 27px; }
  .highlight-label, .highlight-note { font-size: 13px; }
  .chapter { margin-bottom: 40px; padding-bottom: 40px; }
  h2 { font-size: clamp(27px, 7.4vw, 32px); margin-bottom: 20px; }
  h3 { font-size: 19px; margin-top: 30px; }
  .steps > li { grid-template-columns: 30px 1fr; gap: 12px; }
  .steps > li::before { font-size: 30px; text-align: left; }
  .callout { padding: 18px; }
  .callout p { font-size: 15px; }
  .daily-strip { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .daily-strip .day-final { grid-column: span 3; }
  .daily-strip > div { padding: 10px 12px; border-radius: 12px; }
  .daily-strip strong { font-size: 19px; }
  .two-cards { grid-template-columns: minmax(0, 1fr); }
  .example, .info-card { padding: 20px; border-radius: 16px; }
  .info-card p, .info-card li, .example p, .example-row { font-size: 15px; }
  .table-wrap { overflow: visible; border: 0; background: none; border-radius: 0; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap th, .table-wrap td, .table-wrap caption { display: block; width: auto; }
  .table-wrap caption { padding: 0 0 12px; border: 0; }
  .table-wrap thead { display: none; }
  .table-wrap tr { margin-bottom: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--vault); }
  .table-wrap tbody th { padding: 0 0 8px; border: 0; font-size: 17px; }
  .table-wrap td { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 8px 0 0; border: 0; font-size: 15px; }
  .table-wrap td::before { content: attr(data-label); color: var(--dim); font-size: 13px; padding-top: 2px; }
  summary { font-size: 17px; padding-right: 36px; }
  details p { padding-right: 0; font-size: 15px; }
  .closing-card { padding: 32px 22px; border-radius: 22px; margin-bottom: 48px; }
  .closing-card .button { width: 100%; }
  .site-footer { flex-direction: column; padding-bottom: 32px; }
}

@media (max-width: 370px) {
  .header-links .button { padding-inline: 14px; }
  .table-wrap td { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .highlight, .toc li a, summary::after, .button { transition: none; }
}
