:root {
  color-scheme: light;
  --paper: #faf9f5;
  --surface: #fffdfa;
  --ink: #25211e;
  --subtle: #625a52;
  --line: #e4dcd2;
  --accent: #d97757;
  --accent-ink: #a34a34;
  --accent-hover: #863b2a;
  --telegram: #0865ab;
  --telegram-hover: #074f85;
  --blush: #f6e6dd;
  --graphite: #191919;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent-ink); text-underline-offset: .2em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; }
p { margin: 0; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 400; }
section[id] { scroll-margin-top: 24px; }
.shell { width: min(1216px, calc(100% - 72px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 5;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  transform: translateY(-150%);
  background: var(--surface);
}
.skip-link:focus { transform: none; }

.topbar { border-bottom: 1px solid var(--line); background: var(--paper); }
.topbar-inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 26px;
}
.brand {
  justify-self: start;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font: 400 1.45rem/1 var(--serif);
  letter-spacing: -.045em;
}
.brand:hover { color: var(--ink); }
.top-nav, .footer-nav { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 32px); }
.top-nav a, .footer-nav a {
  color: var(--subtle);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 550;
  white-space: nowrap;
}
.top-nav a:hover, .footer-nav a:hover, .top-nav a[aria-current='page'], .footer-nav a[aria-current='page'] {
  color: var(--accent-ink);
}
.top-nav a[aria-current='page'] { text-decoration: underline; text-underline-offset: 6px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 52px;
  max-width: 100%;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent-ink);
  color: #fff;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
}
.button:hover { background: var(--accent-hover); color: #fff; }
.button .arrow { flex: 0 0 auto; font: 400 1.15em/1 var(--sans); }
.telegram-button { background: var(--telegram); }
.telegram-button:hover { background: var(--telegram-hover); }
.telegram-button:focus-visible { outline-color: var(--telegram); }
.button-copy { display: grid; gap: 3px; }
.button-copy small { color: #ecf7ff; font: 500 .8125rem/1.25 var(--sans); }
.button-hero {
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  min-width: min(326px, 100%);
  padding: 11px 12px 11px 19px;
  border-radius: 13px;
  box-shadow: 0 4px 0 #06477a, 0 8px 20px #063d6329;
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: left;
}
.button-hero .arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff24;
}
.button-hero:active { transform: translateY(2px); box-shadow: 0 2px 0 #06477a; }
.button-header {
  justify-self: end;
  min-height: 40px;
  padding: 8px 12px;
  gap: 10px;
  border-color: #b1cede;
  background: #edf7fc;
  color: #084f83;
  font-size: .8125rem;
}

.hero { border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 96% 45%, #f3e8dd 0%, var(--paper) 67%); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(296px, 1fr);
  align-items: center;
  gap: clamp(34px, 6vw, 92px);
  padding-block: clamp(40px, 5vw, 76px) clamp(40px, 5vw, 70px);
}
.hero-copy { min-width: 0; }
.breadcrumb {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--subtle);
  font-size: .8125rem;
}
.breadcrumb a { color: inherit; }
.review {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 5px;
  margin-bottom: 16px;
  color: var(--accent-ink);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.review > span { width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  font-size: clamp(2.625rem, 4.1vw, 4rem);
  line-height: 1.035;
  letter-spacing: -.054em;
  overflow-wrap: anywhere;
}
.hero-lead {
  max-width: 57ch;
  margin-top: 18px;
  color: var(--subtle);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.55;
}
.hero-action { display: flex; flex-direction: column; align-items: start; gap: 8px; margin-top: 23px; }
.facts { margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.facts li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid #9bbdab;
  border-radius: 8px;
  background: #eaf5ee;
  color: #173c2b;
  line-height: 1.25;
  font-size: .9375rem;
  font-weight: 700;
}
.facts li > span {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  height: 20px;
  border-radius: 50%;
  background: #205e42;
  color: #fff;
  font-size: .8125rem;
}
.callout .callout-terms { margin-top: 10px; padding-top: 9px; border-top: 1px solid currentColor; font-size: .875rem; font-weight: 650; }

.hero-panel {
  display: grid;
  gap: 8px;
  padding: clamp(17px, 2vw, 25px);
  border: 1px solid #483c35;
  border-radius: 14px;
  background: linear-gradient(145deg, #272221, var(--graphite) 72%);
  box-shadow: 0 16px 38px rgba(36, 24, 16, .13);
  color: #fff6ed;
}
.panel-label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 0 9px;
  color: #efbeac;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.signal { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.case-link, .panel-jump, .panel-message {
  display: grid;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid #4b413b;
  border-radius: 8px;
  background: #302b28;
  color: #fff6ed;
  text-decoration: none;
}
.case-link:hover, .panel-jump:hover { background: #42352f; border-color: #c0816e; color: #fff; }
.hero-panel :focus-visible { outline-color: #efbeac; }
.case-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #51362e;
  color: #ffcab5;
  font: 600 .875rem/1 var(--mono);
}
.case-copy { display: grid; gap: 3px; }
.case-copy strong, .panel-message code { font: 600 .875rem/1.3 var(--mono); }
.case-copy span { color: #d1c5bb; font-size: .8125rem; line-height: 1.35; }
.case-arrow { color: #efbeac; }
.panel-message { grid-template-columns: auto minmax(0, 1fr); margin-bottom: 5px; }
.panel-message code { padding: 0; background: none; color: inherit; }
.panel-jump {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 46px;
  padding: 9px 12px;
  background: transparent;
  color: #e6d8cf;
  font-size: .875rem;
}

.reading-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(168px, .8fr) minmax(0, 3fr);
  gap: clamp(30px, 6vw, 98px);
  padding-block: 43px 72px;
}
.toc { position: sticky; top: 28px; }
.toc nav { display: grid; gap: 9px; padding: 6px 0 6px 15px; border-left: 1px solid var(--line); }
.toc p { margin-bottom: 4px; color: var(--ink); font-size: .875rem; font-weight: 700; }
.toc a { color: var(--subtle); text-decoration: none; font-size: .8125rem; line-height: 1.4; }
.toc a:hover { text-decoration: underline; color: var(--accent-ink); }
.reading-flow { min-width: 0; }
.editorial-section { line-height: 1.62; }
.editorial-section + .editorial-section, .callout + .editorial-section { margin-top: 43px; }
.editorial-section h2, .missing h1 {
  font-size: clamp(1.875rem, 3.1vw, 2.75rem);
  line-height: 1.11;
  letter-spacing: -.043em;
}
.editorial-section > :not(h2) { margin-top: 15px; }
.editorial-section > p { max-width: 77ch; }
code { padding: 1px .25em; border-radius: 3px; background: #f0ebe3; font: .875em/1.5 var(--mono); overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: .875rem; line-height: 1.5; text-align: left; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead { background: #f1eae2; color: #493e37; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { width: 28%; font-weight: 650; }

.steps { display: grid; gap: 11px; margin-bottom: 0; padding-left: 29px; }
.steps li { padding-left: 5px; }
.steps li::marker { color: var(--accent-ink); font: 650 .93em var(--mono); }
.steps li p { margin-top: 2px; }
.snippet { overflow: hidden; margin-inline: 0; margin-bottom: 0; border: 1px solid #473b36; border-radius: 9px; background: var(--graphite); color: #f5eee7; }
.snippet figcaption { padding: 8px 14px; border-bottom: 1px solid #4b413b; background: #302b28; color: #f0bcaa; font-size: .8125rem; }
.snippet pre { margin: 0; padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.snippet code { padding: 0; background: none; color: inherit; }

.price {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 17px 20px;
  border: 1px solid #e8cec0;
  border-radius: 9px;
  background: var(--blush);
}
.price strong, .price span { display: block; }
.price strong { color: var(--accent-ink); font: 400 2.25rem/1.1 var(--serif); }
.price span { margin-top: 5px; color: var(--subtle); font-size: .8125rem; }
.result-check { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.result-check p { display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: 10px; padding: 10px 14px; }
.result-check p + p { border-top: 1px solid var(--line); }
.result-check strong { color: var(--accent-ink); }

.callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  margin-top: 31px;
  padding: 20px;
  border: 1px solid #c8deeb;
  border-radius: 13px;
  background: #f0f7fb;
}
.callout > div > p + p { margin-top: 4px; color: var(--subtle); font-size: .875rem; line-height: 1.5; }
.callout-title { font: 400 1.5rem/1.13 var(--serif); letter-spacing: -.025em; }
.button-compact { min-height: 46px; gap: 12px; padding: 10px 14px; font-size: .875rem; }
.callout-final { border-color: #473b36; background: var(--graphite); color: #fff6ed; }
.callout-final > div > p + p { color: #e0d1c6; }
.callout-final .button { background: #bce5ff; color: #143348; }
.callout-final .button:hover { background: #d6efff; }
.callout-final .button:focus-visible { outline-color: #bce5ff; }

.references { margin-top: 24px; color: var(--subtle); font-size: .875rem; }
.references summary { width: fit-content; padding: 7px 0; cursor: pointer; }
.references ul { display: grid; gap: 6px; margin: 7px 0 0; padding-left: 20px; }
.faq { margin-top: 38px; }
.faq h2 { margin-bottom: 14px; }
.faq > details { margin-top: 0; border-top: 1px solid var(--line); }
.faq > details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 2px;
  list-style: none;
  cursor: pointer;
  font-weight: 650;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent-ink); font: 400 1.1em var(--mono); }
.faq details[open] summary::after { content: '−'; }
.faq summary:hover { color: var(--accent-ink); }
.faq details p { max-width: 75ch; padding: 0 26px 14px 2px; color: var(--subtle); }

.site-footer { border-top: 1px solid var(--line); background: #f3eee7; }
.footer-inner { display: flex; justify-content: space-between; align-items: start; gap: 24px; padding-block: 31px; }
.footer-inner p { max-width: 45ch; margin-top: 10px; color: var(--subtle); font-size: .8125rem; line-height: 1.5; }
.footer-nav { flex-wrap: wrap; }
.mobile-action { display: none; }
.missing { min-height: 55vh; padding-block: 56px; }
.missing p { margin-block: 14px 21px; }

@media (max-width: 940px) {
  .hero-inner { gap: 28px; }
  .reading-layout { grid-template-columns: minmax(136px, .72fr) minmax(0, 3fr); gap: 32px; }
  .callout { grid-template-columns: 1fr; justify-items: start; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .topbar-inner { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 9px; padding-block: 13px 10px; }
  .top-nav { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 5px 10px; }
  .top-nav a { display: inline-flex; align-items: center; min-height: 28px; font-size: .8125rem; }
  .button-header { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 23px 26px; }
  .hero h1 { font-size: clamp(1.875rem, 8.5vw, 3.25rem); line-height: 1.07; }
  .hero-lead { margin-top: 13px; }
  .review { margin-bottom: 12px; }
  .hero-action { margin-top: 16px; }
  .hero-action .button { width: 100%; }
  .callout .button { width: 100%; }
  .facts { margin-top: 12px; gap: 6px; }
  .facts li { padding: 7px 8px; }
  .hero-panel { max-width: 560px; }
  .reading-layout { display: block; padding-block: 30px 42px; }
  .toc { display: none; }
  .editorial-section + .editorial-section, .callout + .editorial-section { margin-top: 31px; }
  .editorial-section h2 { font-size: clamp(1.65rem, 6.5vw, 2.5rem); }
  .price { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .result-check p { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  .footer-inner { flex-direction: column; padding-block: 24px; }
  .mobile-action {
    display: block;
    position: fixed;
    z-index: 3;
    inset: auto 0 0;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid #c8deeb;
    background: #f7fbfe;
  }
  .button-sticky { width: 100%; min-height: 48px; background: #e2f2fb; color: #084f83; }
  html { scroll-padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
}
