:root {
  color-scheme: light;
  --paper: #f8f1e6;
  --cream: #fffaf2;
  --white: #fffdf8;
  --ink: #293d36;
  --muted: #65756f;
  --green: #2f6f5d;
  --green-soft: #dfeadd;
  --coral: #ef765d;
  --yellow: #f1bd62;
  --line: rgba(41, 61, 54, .13);
  --shadow: 0 24px 70px rgba(75, 57, 35, .1);
  font-family: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; }
img { display: block; max-width: 100%; }
.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(248, 241, 230, .94); }
.nav { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; text-decoration: none; font-size: 18px; font-weight: 800; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: var(--green); color: #fff; box-shadow: 0 8px 24px rgba(47, 111, 93, .24); }
.brand-mark::before { content: "Ч"; font-size: 22px; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: 22px; margin-left: auto; }
.nav-link { color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 15px; font-weight: 700; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--green); }
.nav-link[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.nav-telegram { color: #177fac; }
.nav-auth { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); color: var(--green); text-decoration: none; font-size: 14px; font-weight: 800; white-space: nowrap; }
.nav-auth:hover { background: #fff; }
.brand:focus-visible, .nav-link:focus-visible, .nav-auth:focus-visible, .article-link:focus-visible, .button:focus-visible, .toc a:focus-visible, .article-content a:focus-visible, .footer-line a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; border-radius: 4px; }

.articles-main { min-height: calc(100vh - 170px); padding: 72px 0 100px; }
.articles-heading { max-width: 850px; }
.articles-heading h1, .article-hero h1 { margin: 0; font-size: clamp(42px, 6vw, 70px); line-height: 1.01; letter-spacing: -.052em; text-wrap: balance; }
.articles-intro { max-width: 740px; margin: 24px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 21px); line-height: 1.65; }
.article-grid { display: grid; gap: 24px; margin-top: 54px; }
.article-card { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr); overflow: hidden; border: 1px solid var(--line); border-radius: 32px; background: rgba(255,255,255,.68); box-shadow: var(--shadow); }
.article-card-image { min-height: 330px; width: 100%; height: 100%; object-fit: cover; }
.article-card-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(30px, 5vw, 58px); }
.article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.article-meta span + span::before { content: "·"; margin-right: 10px; color: var(--coral); }
.article-card h2 { margin: 0; font-size: clamp(28px, 3.4vw, 43px); line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.article-card p { margin: 20px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.article-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; color: var(--green); text-decoration: none; font-weight: 850; }
.article-link::after { content: "→"; font-size: 21px; transition: transform .2s; }
.article-link:hover::after { transform: translateX(4px); }

.article-main { padding: 62px 0 96px; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; margin-bottom: 30px; color: var(--muted); font-size: 14px; }
.breadcrumbs a { text-decoration-color: rgba(47,111,93,.35); text-underline-offset: 3px; }
.breadcrumbs span[aria-hidden="true"] { color: var(--coral); }
.article-hero { max-width: 980px; margin-inline: auto; text-align: center; }
.article-hero h1 { font-size: clamp(40px, 6.3vw, 72px); }
.article-deck { max-width: 780px; margin: 26px auto 0; color: var(--muted); font-size: clamp(18px, 2.1vw, 22px); line-height: 1.62; text-wrap: balance; }
.article-hero .article-meta { justify-content: center; margin-top: 24px; }
.lead-figure { width: min(920px, 100%); margin: 40px auto 0; }
.lead-figure img { width: 100%; height: clamp(230px, 30vw, 360px); object-fit: cover; border-radius: 32px; box-shadow: var(--shadow); }
.lead-figure figcaption, .article-figure figcaption { margin-top: 11px; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: left; }

.article-layout { display: grid; grid-template-columns: minmax(0, 760px) 250px; align-items: start; justify-content: center; gap: 70px; margin-top: 64px; }
.article-content { min-width: 0; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.78; }
.article-content > p:first-child { margin-top: 0; font-size: 23px; line-height: 1.62; }
.article-content h2, .article-content h3 { color: var(--ink); font-family: Inter, ui-rounded, "Segoe UI", system-ui, sans-serif; text-wrap: balance; scroll-margin-top: 22px; }
.article-content h2 { margin: 70px 0 22px; font-size: clamp(31px, 4vw, 42px); line-height: 1.12; letter-spacing: -.035em; }
.article-content h3 { margin: 42px 0 14px; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; }
.article-content p { margin: 0 0 23px; }
.article-content ul, .article-content ol { margin: 0 0 28px; padding-left: 1.35em; }
.article-content li { margin: 10px 0; padding-left: 5px; }
.article-content a { color: var(--green); font-weight: 700; text-decoration-color: rgba(47,111,93,.35); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-content a:hover { text-decoration-color: var(--coral); }
.article-content strong { color: var(--ink); }
.article-table-wrap { overflow-x: auto; margin: 30px 0; border: 1px solid var(--line); border-radius: 22px; background: var(--white); }
.article-content table { width: 100%; border-collapse: collapse; font-family: Inter, ui-rounded, "Segoe UI", system-ui, sans-serif; font-size: 16px; line-height: 1.45; }
.article-content th, .article-content td { padding: 16px 20px; border-bottom: 1px solid var(--line); text-align: left; }
.article-content th { background: var(--green-soft); color: var(--green); font-size: 14px; }
.article-content th:last-child, .article-content td:last-child { text-align: right; }
.article-content tr:last-child td { border-bottom: 0; }
.article-figure { width: 46%; margin: 34px 0 28px 32px; float: right; font-family: Inter, ui-rounded, "Segoe UI", system-ui, sans-serif; }
.article-figure.figure-left { float: left; margin-right: 32px; margin-left: 0; }
.article-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 24px; box-shadow: 0 16px 42px rgba(75,57,35,.12); }
.callout { clear: both; margin: 38px 0; padding: 26px 28px; border-left: 5px solid var(--coral); border-radius: 0 22px 22px 0; background: var(--cream); font-family: Inter, ui-rounded, "Segoe UI", system-ui, sans-serif; font-size: 17px; line-height: 1.65; }
.service-callout { display: grid; gap: 15px; clear: both; margin: 42px 0; padding: 30px; border-radius: 26px; background: var(--green); color: #fffdf7; font-family: Inter, ui-rounded, "Segoe UI", system-ui, sans-serif; }
.service-callout h3 { margin: 0; color: #fffdf7; }
.service-callout p { margin: 0; color: rgba(255,255,255,.82); }
.service-callout a { color: #fff; text-decoration-color: rgba(255,255,255,.5); }
.source-list { clear: both; padding-top: 4px; }

.article-aside { position: sticky; top: 28px; }
.toc { padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.58); }
.toc strong { display: block; margin-bottom: 13px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.toc ol { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.toc a { color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.4; }
.toc a:hover { color: var(--green); }
.aside-cta { margin-top: 18px; padding: 23px; border-radius: 24px; background: var(--green-soft); }
.aside-cta strong { display: block; margin-bottom: 8px; font-size: 18px; }
.aside-cta p { margin: 0; color: #4c665e; font-size: 14px; line-height: 1.55; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; margin-top: 17px; padding: 0 17px; border-radius: 14px; background: var(--coral); color: #fff; text-decoration: none; font-size: 14px; font-weight: 850; }
.button:hover { background: #e96850; }

.site-footer { padding: 0 0 36px; }
.footer-line { display: flex; justify-content: space-between; gap: 24px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

@media (max-width: 940px) {
  .nav-link-service { display: none; }
  .article-layout { grid-template-columns: minmax(0, 760px); gap: 0; }
  .article-aside { position: static; grid-row: 1; margin-bottom: 42px; }
  .toc { padding: 22px; }
  .toc ol { grid-template-columns: 1fr 1fr; gap: 10px 24px; }
  .aside-cta { display: none; }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 24px, 1120px); }
  .nav { min-height: 76px; align-items: flex-start; flex-direction: column; padding: 14px 0 16px; gap: 12px; }
  .nav-links { width: 100%; justify-content: flex-start; gap: 18px; overflow-x: auto; padding-bottom: 2px; }
  .nav-auth { position: absolute; top: 17px; right: 12px; min-height: 38px; }
  .nav-telegram { margin-left: auto; }
  .articles-main { padding: 50px 0 76px; }
  .article-card { grid-template-columns: 1fr; border-radius: 26px; }
  .article-card-image { min-height: 220px; height: 220px; }
  .article-card-copy { padding: 28px 22px 34px; }
  .article-main { padding: 38px 0 72px; }
  .breadcrumbs { margin-bottom: 24px; }
  .lead-figure { margin-top: 30px; }
  .lead-figure img { height: 230px; border-radius: 24px; }
  .article-layout { margin-top: 40px; }
  .toc ol { grid-template-columns: 1fr; }
  .article-content { font-size: 18px; line-height: 1.72; }
  .article-content > p:first-child { font-size: 21px; }
  .article-content h2 { margin-top: 58px; }
  .article-figure, .article-figure.figure-left { width: 100%; float: none; margin: 30px 0; }
  .article-figure img { height: min(58vw, 260px); }
  .article-content th, .article-content td { padding: 14px 15px; }
  .service-callout { padding: 25px 22px; }
  .footer-line { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 440px) {
  .brand > span:last-child { max-width: 72px; line-height: 1.05; }
  .nav-link { font-size: 14px; }
  .nav-telegram { margin-left: 0; }
  .article-hero h1 { font-size: 39px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .article-link::after { transition: none; }
}
