:root {
  --navy: #0d4435; --paper: #f7f8f3; --surface: #ffffff; --ink: #202c29; --muted: #65736c; --line: #dfe4dc;
  --green: #145c48; --green-dark: #0d4435; --green-soft: #e8f0e9; --green-line: #c9d9c6; --lime: #d9efa1;
  --cta: #1d7f5f; --cta-dark: #145c48; --danger: #a43d2b; --danger-soft: #f7ede7; --danger-line: #e8d0c4;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; margin: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--paper); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1104px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 780px; }
h1, h2, h3 { line-height: 1.18; text-wrap: balance; font-weight: 650; letter-spacing: -0.02em; }
a { color: var(--green); }
.mono { font-family: var(--mono); font-size: .9em; }

.topbar { border-bottom: 1px solid var(--line); background: rgba(247,248,243,.96); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 50; }
.topbar .wrap { display: flex; align-items: center; gap: 18px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.04rem; color: var(--ink); text-decoration: none; }
.logo .mark { width: 30px; height: 30px; display: inline-flex; flex: none; }
.logo .mark svg { width: 30px; height: 30px; }
.logo .tld { color: var(--green); }
.top-contacts { margin-left: auto; display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.top-phone { font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.top-phone small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; line-height: 1.1; text-align: right; }
.btn { display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center; font-family: inherit; font-size: 1rem; font-weight: 600; padding: 13px 24px; border-radius: 10px; background: var(--cta); color: #fff; }
.btn:hover, .btn:focus-visible { background: var(--cta-dark); }
.btn:focus-visible { outline: 3px solid #b2ca6e; outline-offset: 2px; }
.btn.small { padding: 9px 15px; font-size: .9rem; border-radius: 7px; }
.btn.wa { background: #1da851; } .btn.wa:hover { background: #168540; }
.btn.tg { background: #2481cc; } .btn.tg:hover { background: #1c6aa8; }
.btn.max { background: #5b45e0; } .btn.max:hover { background: #4633c2; }

.crumbs { font-size: .85rem; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); }
header.page { padding: 18px 0 8px; }
header.page h1 { font-size: 2.15rem; margin-bottom: 14px; }
.lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 14px; }
.meta { font-size: .85rem; color: var(--muted); }

article section { padding: 26px 0 6px; }
article h2 { font-size: 1.5rem; margin-bottom: 14px; }
article h3 { font-size: 1.12rem; margin: 20px 0 8px; }
article p { margin-bottom: 12px; }
article ul, article ol { padding-left: 1.3em; margin-bottom: 12px; }
article li { margin-bottom: 6px; }

.summary { background: var(--green-soft); border: 1px solid var(--green-line); border-radius: 18px; padding: 20px 24px; margin: 18px 0 6px; }
.summary h2 { font-size: 1.2rem; margin-bottom: 10px; }
.summary li { margin-bottom: 8px; }
.warn { background: var(--danger-soft); border: 1px solid var(--danger-line); border-radius: 10px; padding: 14px 18px; margin: 14px 0; font-size: .95rem; }

.geo-answer { background: var(--green-soft); border: 1px solid var(--green-line); border-left: 4px solid var(--green); border-radius: 14px; padding: 18px 22px; margin: 16px 0 8px; }
.geo-answer .geo-label { font-family: var(--mono); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--green); margin-bottom: 6px; }
.geo-answer p:last-child { margin-bottom: 0; }

.quick-answer { background: #e5f3ec; border: 1px solid #b8decb; border-left: 4px solid #0e7a55; border-radius: 14px; padding: 18px 22px; margin: 16px 0 12px; color: var(--ink); }
.quick-answer .qa-label, .quick-answer .qa-title, .quick-answer h2, .quick-answer h3 { font-family: var(--mono); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: #0e7a55; margin: 0 0 8px; }
.quick-answer p { margin-bottom: 8px; font-size: .98rem; line-height: 1.56; }
.quick-answer p:last-child { margin-bottom: 0; }

.diagram-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 16px 0 18px; overflow: hidden; }
.diagram-box img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.diagram-box figcaption { margin-top: 10px; font-size: .88rem; line-height: 1.45; color: var(--muted); text-align: center; }

.brief-link { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 12px; padding: 15px 18px; margin: 14px 0; font-size: .96rem; }
.brief-link p:last-child { margin-bottom: 0; }

.code-block { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 12px 0 14px; overflow-x: auto; font-family: var(--mono); font-size: .86rem; line-height: 1.5; color: var(--ink); }

.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0 16px; }
.hub-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 18px; display: flex; flex-direction: column; gap: 6px; }
.hub-card a { font-weight: 650; font-size: 1.02rem; text-decoration: none; }
.hub-card a:hover { text-decoration: underline; }
.hub-card p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.48; }

.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 560px; }
th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
td { padding: 11px 14px; border-bottom: 1px solid #edf0ea; vertical-align: top; }
tr:last-child td { border-bottom: 0; }

.steps { counter-reset: s; list-style: none; padding-left: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 42px; margin-bottom: 12px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
.ui { background: var(--paper); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: .92em; white-space: normal; overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.cta-box { background: var(--surface); color: var(--ink); border: 1px solid var(--green-line); border-left: 5px solid var(--green); border-radius: 18px; padding: 26px 28px; margin: 22px 0 8px; }
.cta-box h2 { color: var(--ink); font-size: 1.4rem; margin-bottom: 10px; }
.cta-box p { color: var(--muted); }
.cta-box .row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

.faq-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 10px; overflow: hidden; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 15px 46px 15px 20px; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 1.25rem; color: var(--green); font-weight: 700; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .a { padding: 0 20px 16px; color: var(--muted); font-size: .95rem; }

.sources { font-size: .88rem; color: var(--muted); }
.sources li { margin-bottom: 6px; }
footer { border-top: 1px solid var(--line); padding: 26px 0 42px; font-size: .85rem; color: var(--muted); margin-top: 40px; }
footer .wrap { display: flex; gap: 8px 40px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 700px) {
  body { font-size: 16px; }
  header.page h1 { font-size: 1.6rem; }
  article h2 { font-size: 1.3rem; }
  .top-contacts .btn:not(.wa) { display: none; }
  .top-phone small { display: none; }
  .cta-box { padding: 22px 20px; }
  .quick-answer { padding: 14px 16px; }
  .diagram-box { padding: 10px; }
  .hub-grid { grid-template-columns: 1fr; }
}
/* ---------- навигация: ссылка на статьи и меню на телефоне ---------- */
html { scroll-padding-top: 76px; }
@media (max-width: 1000px) { html { scroll-padding-top: 130px; } }
.top-nav a { font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.top-nav a:hover { color: var(--green); text-decoration: underline; }
.top-menu { display: none; position: relative; }
.top-menu summary { list-style: none; cursor: pointer; font-weight: 600; font-size: .92rem; padding: 8px 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); }
.top-menu summary::-webkit-details-marker { display: none; }
.top-menu nav { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px; min-width: 240px; box-shadow: 0 10px 28px rgba(13,68,53,.12); display: flex; flex-direction: column; }
.top-menu nav a { padding: 10px 12px; color: var(--ink); text-decoration: none; border-radius: 6px; }
.top-menu nav a:hover { background: var(--paper); }
.top-menu .m-sep { border-top: 1px solid var(--line); margin: 6px 4px; }
@media (max-width: 1000px) { .top-nav { display: none; } .top-menu { display: block; margin-left: auto; } .top-menu summary { padding: 7px 10px; } }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 22px; margin: 18px 0 6px; font-size: .95rem; }
.toc b { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 22px; }
.toc li { margin: 4px 0; }

.cookie-note { position: fixed; left: 16px; bottom: 16px; z-index: 80; max-width: 440px; display: flex; gap: 14px; align-items: center; background: #fff; color: #3a463f; border: 1px solid #dfe4dc; border-radius: 12px; padding: 12px 14px 12px 16px; box-shadow: 0 10px 28px rgba(13,68,53,.14); font-size: .86rem; line-height: 1.45; }
.cookie-note[hidden] { display: none; }
.cookie-note p { margin: 0; }
.cookie-note a { color: #145c48; }
.cookie-note button { flex: none; border: 0; border-radius: 8px; background: #1d7f5f; color: #fff; font: inherit; font-weight: 600; padding: 9px 16px; cursor: pointer; }
.cookie-note button:hover, .cookie-note button:focus-visible { background: #145c48; }
@media (max-width: 560px) { .cookie-note { left: 10px; right: 10px; bottom: 10px; max-width: none; } }
