@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 600;font-display:swap;src:url(/assets/fonts/golos-cyr.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 600;font-display:swap;src:url(/assets/fonts/golos-lat.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;}
@font-face{font-family:'Literata';font-style:normal;font-weight:500 700;font-display:swap;src:url(/assets/fonts/literata-cyr.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Literata';font-style:normal;font-weight:500 700;font-display:swap;src:url(/assets/fonts/literata-lat.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;}
@font-face{font-family:'Caveat';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/caveat-cyr.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Caveat';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/caveat-lat.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;}
/* posle9.ru — «школьный ежедневник»: бумага, клетка, чернила, красная ручка */
:root {
  --paper: #f7f2e8;
  --paper-2: #efe6d3;
  --card: #fffdf8;
  --ink: #1c2b4a;
  --ink-soft: #4a587a;
  --ink-faint: #7d8299;
  --red: #c8402b;
  --red-soft: #f6d9d2;
  --green: #2c7356;
  --green-soft: #dcebe2;
  --grid: rgba(28, 43, 74, .07);
  --line: rgba(28, 43, 74, .14);
  --radius: 14px;
  --shadow: 0 1px 0 rgba(28, 43, 74, .06), 0 10px 30px -18px rgba(28, 43, 74, .35);
  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --sans: 'Golos Text', 'Segoe UI', system-ui, sans-serif;
  --hand: 'Caveat', 'Segoe Print', cursive;
  --wrap: 1120px;
  --read: 700px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.62 var(--sans);
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration-color: rgba(200, 64, 43, .55); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--card); padding: 8px 14px; }

/* ——— шапка ——— */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 242, 232, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px/1 var(--serif); letter-spacing: -.01em; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo small { display: block; font: 500 11px/1.2 var(--sans); color: var(--ink-faint); letter-spacing: .02em; margin-top: 3px; }
.nav { display: none; gap: 22px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-soft); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }
.burger { border: 1px solid var(--line); background: var(--card); border-radius: 10px; height: 40px; padding: 0 12px; font: 500 15px var(--sans); color: var(--ink); cursor: pointer; }
.drawer { display: none; border-top: 1px solid var(--line); background: var(--paper); }
.drawer.open { display: block; }
.drawer a { display: block; padding: 14px 16px; border-bottom: 1px dashed var(--line); text-decoration: none; font-weight: 500; }
@media (min-width: 900px) { .nav { display: flex; } .burger, .drawer { display: none !important; } }

/* ——— клетка и поля ——— */
.grid-paper {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
}

/* ——— герой главной ——— */
.hero { padding: 40px 0 34px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero .kicker { font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.hero h1 { font: 700 clamp(34px, 8.4vw, 64px)/1.04 var(--serif); letter-spacing: -.025em; margin: 14px 0 18px; max-width: 17ch; }
.hero h1 .u { position: relative; white-space: nowrap; }
.hero h1 .u svg { position: absolute; left: -2%; bottom: -.14em; width: 104%; height: .32em; overflow: visible; }
.hero h1 .u path { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.1s .35s cubic-bezier(.6, .1, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero .lead { font-size: clamp(17px, 2.4vw, 20px); color: var(--ink-soft); max-width: 46ch; margin: 0 0 26px; }
.hero .margin-note { position: absolute; right: 4%; top: 46px; transform: rotate(4deg); display: none; }
@media (min-width: 900px) { .hero { padding: 72px 0 56px; } .hero .margin-note { display: block; } }

/* выбор маршрута */
.route { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; max-width: 760px; }
.route-q { font: 600 15px var(--sans); margin: 0 0 12px; }
.route-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.route-tabs button {
  font: 500 15px var(--sans); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 15px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.route-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.route-panel { display: none; }
.route-panel.on { display: grid; gap: 10px; animation: rise .35s ease both; }
.route-panel a {
  display: flex; gap: 14px; align-items: center; text-decoration: none;
  padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); background: var(--paper);
}
.route-panel a:hover { border-color: var(--red); border-style: solid; color: var(--ink); }
.route-panel b { font-weight: 600; display: block; }
.route-panel span.d { font-size: 14px; color: var(--ink-soft); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* обведённая цифра «красной ручкой» */
.circ {
  flex: none; display: inline-grid; place-items: center;
  width: 38px; height: 38px; font: 600 22px/1 var(--hand); color: var(--red);
  border: 2px solid var(--red);
  border-radius: 52% 46% 55% 44% / 48% 55% 45% 52%;
  transform: rotate(-6deg);
}

/* пометка на полях */
.note { font: 600 22px/1.15 var(--hand); color: var(--red); }
.note::before { content: "↘ "; }

/* ——— секции главной ——— */
.section { padding: 46px 0; }
.section h2 { font: 700 clamp(26px, 5vw, 36px)/1.15 var(--serif); letter-spacing: -.015em; margin: 0 0 8px; }
.section .sub { color: var(--ink-soft); margin: 0 0 24px; max-width: 60ch; }
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s;
}
.card:hover { transform: translateY(-2px); border-color: rgba(200, 64, 43, .45); color: var(--ink); }
.card .tag { font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.card h3 { font: 700 21px/1.25 var(--serif); margin: 0; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.card .more { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: 15px; }
.card .more::after { content: " →"; color: var(--red); }

/* полоса «как мы работаем» */
.facts { display: grid; gap: 18px; grid-template-columns: 1fr; counter-reset: f; }
@media (min-width: 800px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts div { display: flex; gap: 14px; align-items: flex-start; }
.facts p { margin: 4px 0 0; color: var(--ink-soft); font-size: 15.5px; }
.facts b { display: block; font-size: 17px; }

/* ——— статья ——— */
.crumbs { font-size: 14px; color: var(--ink-faint); padding: 18px 0 0; }
.crumbs a { color: var(--ink-faint); }
.article-head { padding: 18px 0 26px; border-bottom: 1px solid var(--line); }
.article-head h1 { font: 700 clamp(30px, 6.6vw, 50px)/1.08 var(--serif); letter-spacing: -.02em; margin: 6px 0 14px; max-width: 22ch; }
.article-head .lead { font-size: clamp(17px, 2.3vw, 20px); color: var(--ink-soft); margin: 0; max-width: 58ch; }
.meta { font-size: 14px; color: var(--ink-faint); margin-top: 14px; display: flex; gap: 14px; flex-wrap: wrap; }

.layout { display: block; padding: 28px 0 56px; }
.prose { max-width: var(--read); position: relative; }
@media (min-width: 1000px) {
  .layout { display: grid; grid-template-columns: minmax(0, var(--read)) 1fr; gap: 56px; }
  /* «поля» тетради — красная вертикаль слева от текста */
  .prose { padding-left: 34px; }
  .prose::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 0; width: 2px; background: linear-gradient(var(--red-soft), var(--red-soft)); }
}
.prose h2 { font: 700 clamp(24px, 4.4vw, 31px)/1.2 var(--serif); letter-spacing: -.012em; margin: 42px 0 12px; scroll-margin-top: 80px; }
.prose h3 { font: 700 20px/1.3 var(--serif); margin: 28px 0 8px; }
.prose p, .prose li { font-size: 17.5px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--red); }
.prose blockquote { margin: 22px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--red); font-family: var(--serif); font-size: 19px; color: var(--ink-soft); }
.prose strong { font-weight: 600; }
.prose .src { font-size: 14px; color: var(--ink-faint); }

/* оглавление */
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 8px; }
.toc b { font: 600 13px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.toc ol { margin: 8px 0 0; padding-left: 1.3em; }
.toc li { font-size: 16px; margin: 4px 0; }

/* выноски */
.callout { border-radius: var(--radius); padding: 16px 18px; margin: 22px 0; border: 1px solid; }
.callout p:first-child { margin-top: 0; } .callout p:last-child { margin-bottom: 0; }
.callout.key { background: var(--green-soft); border-color: rgba(44, 115, 86, .3); }
.callout.warn { background: var(--red-soft); border-color: rgba(200, 64, 43, .3); }
.callout .t { display: block; font-weight: 600; margin-bottom: 4px; }

/* таблица «как в журнале» */
.tbl { width: 100%; overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.tbl table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.tbl table:has(th:nth-child(3)) { min-width: 540px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.tbl th { font-weight: 600; background: var(--paper-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { font-weight: 500; }

/* шаги-план */
.steps { list-style: none; padding: 0 !important; margin: 20px 0; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px dashed var(--line); margin: 0; }
.steps li:last-child { border-bottom: 0; }
.steps li b { display: block; }
.steps .when { font: 600 13px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--red); }

/* чек-лист */
.check { list-style: none; padding: 0 !important; }
.check li { position: relative; padding-left: 34px; }
.check li::before { content: ""; position: absolute; left: 2px; top: .3em; width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 4px; }
.check li::after { content: ""; position: absolute; left: 7px; top: .45em; width: 12px; height: 7px; border-left: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(-45deg); }

/* партнёрский блок */
.offer {
  margin: 30px 0; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 20px; position: relative; box-shadow: 6px 6px 0 var(--paper-2);
}
.offer .ad { font-size: 12px; color: var(--ink-faint); margin: 0 0 8px; line-height: 1.4; }
.offer h3 { font: 700 21px/1.25 var(--serif); margin: 0 0 6px; }
.offer p { margin: 0 0 14px; color: var(--ink-soft); font-size: 16px; }
.offer ul { margin: 0 0 16px; padding-left: 1.1em; font-size: 15.5px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 12px; text-decoration: none;
  background: var(--red); color: #fff; font: 600 16px var(--sans); border: 0; cursor: pointer;
  box-shadow: 0 2px 0 #9c2f1f; transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { color: #fff; background: #b5371f; }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 #9c2f1f; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: none; }
.btn.ghost:hover { color: var(--red); border-color: var(--red); background: transparent; }
@media (max-width: 520px) { .offer .btn { width: 100%; } }

/* боковая колонка статьи */
.aside { display: none; }
@media (min-width: 1000px) {
  .aside { display: block; position: sticky; top: 84px; align-self: start; }
  .aside .box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
  .aside .box b { display: block; font: 700 18px/1.3 var(--serif); margin-bottom: 8px; }
  .aside .box a { display: block; font-size: 15px; padding: 6px 0; text-decoration: none; border-bottom: 1px dashed var(--line); }
  .aside .box a:last-child { border-bottom: 0; }
}

/* калькулятор */
.calc { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 20px; margin: 24px 0; }
.calc h3 { margin-top: 0; }
.calc .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.calc label { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.calc input {
  width: 100%; height: 52px; font: 600 22px var(--sans); color: var(--ink); text-align: center;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper);
}
.calc input:focus { border-color: var(--ink); outline: none; }
.calc .out { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 0 4px; border-top: 1px dashed var(--line); }
.calc .big { font: 700 44px/1 var(--serif); color: var(--red); }
.calc .hint { font-size: 15px; color: var(--ink-soft); margin: 8px 0 0; }

/* связанные статьи */
.related { border-top: 1px solid var(--line); padding: 34px 0 10px; }
.related h2 { font: 700 24px var(--serif); margin: 0 0 16px; }

/* подвал */
.foot { background: var(--ink); color: #d8dbe6; padding: 40px 0 28px; margin-top: 30px; font-size: 15px; }
.foot a { color: #fff; text-decoration-color: rgba(255, 255, 255, .35); }
.foot .cols { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .foot .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot b { color: #fff; display: block; margin-bottom: 8px; font-weight: 600; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 6px 0; }
.foot .legal { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 28px; padding-top: 18px; font-size: 13.5px; color: #a9afc4; }

/* cookie-плашка */
.cookie {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 10px 12px; font-size: 13.5px; line-height: 1.4; max-width: 560px; margin-inline: auto;
}
.cookie.show { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.cookie button { flex: none; min-height: 38px; padding: 0 14px; font-size: 14px; }

/* появление при загрузке */
.reveal { animation: rise .55s ease both; }
.reveal.d1 { animation-delay: .08s; } .reveal.d2 { animation-delay: .16s; } .reveal.d3 { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero h1 .u path { stroke-dashoffset: 0; }
}
@media print { .top, .foot, .offer, .aside, .cookie { display: none !important; } body { background: #fff; } }
