@font-face {
  font-family: Montserrat; src: url("fonts/montserrat-cyrillic.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Montserrat; src: url("fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2190-21FF;
}
:root {
  color-scheme: dark;
  --canvas: #1b1b1b;
  --paper: #242424;
  --raised: #30302f;
  --hover: #393836;
  --ink: #f6f4f0;
  --body: #e0ded9;
  --muted: #bfbab2;
  --rule: #484644;
  --warm: #f3debc;
  --inset: clamp(1.375rem, 4vw, 3.5rem);
  --reading: 65ch;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--canvas);
  font: 400 1rem/1.65 Montserrat, system-ui, sans-serif;
  overflow-wrap: anywhere;
}
::selection { background: var(--warm); color: #24211e; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: .075em; }
a:focus-visible, [tabindex="-1"]:focus-visible { outline: 2px solid var(--warm); outline-offset: 3px; }
a:hover { color: var(--warm); }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.11; letter-spacing: -.031em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.05vw, 3.65rem); font-weight: 750; }
h2 { font-size: clamp(1.35rem, 2.1vw, 1.9rem); font-weight: 700; }
ul, ol { margin: 0; }
img { display: block; max-inline-size: 100%; block-size: auto; }
.arrow { flex: none; }
.skip { position: absolute; inset: .5rem auto auto .5rem; z-index: 3; padding: .6rem 1rem; color: #24211e; background: var(--warm); font-weight: 700; }
.skip:not(:focus) { clip-path: inset(50%); }
.skip:hover { color: #24211e; }
.shell {
  display: grid; grid-template-columns: clamp(11rem, 16.2vw, 14rem) minmax(0, 1fr);
  max-inline-size: 84rem; margin: 1.875rem auto; inline-size: calc(100% - 3.5rem);
  border: 1px solid var(--rule); border-radius: 1rem; background: var(--paper);
}
.rail { position: relative; padding: 1.4rem 1.1rem; }
.rail::after { position: absolute; content: ""; inset: 1.5rem 0 1.5rem auto; width: 1px; background: var(--rule); }
.masthead { display: inline-flex; min-height: 3rem; align-items: center; gap: .45rem; padding: .3rem .25rem; text-decoration: none; line-height: 1.05; }
.masthead img { flex: none; }
.masthead span { font-size: 1.65rem; letter-spacing: -.025em; font-weight: 750; }
.masthead small { display: block; color: var(--muted); font-size: .75rem; font-weight: 550; margin-top: .35rem; letter-spacing: 0; }
.rail nav { margin-top: 1.8rem; }
.rail ul, .link-items, .crumbs ol, .contents ul { list-style: none; padding: 0; }
.rail nav a {
  text-decoration: none; color: var(--body); min-block-size: 44px;
  display: flex; align-items: center; line-height: 1.25; font-size: .875rem; font-weight: 600; padding: .6rem .65rem; border-radius: .55rem;
}
.rail nav a:hover, .rail nav a.is-current { background: var(--raised); color: var(--ink); }
.rail nav a.is-current { font-weight: 750; }
.sheet { min-inline-size: 0; overflow-x: clip; padding: var(--inset); }
#main:focus-visible { outline-offset: -.125rem; }
.hero { position: relative; min-block-size: 25.25rem; }
.hero-copy { position: relative; z-index: 1; }
.hero h1 { max-inline-size: 20ch; }
.lede { color: var(--body); font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.5; }
.hero .lede { max-inline-size: 34ch; margin-block: 1.1rem 1.3rem; }
.primary, .checkout {
  display: inline-flex; min-block-size: 3.15rem; align-items: center; justify-content: space-between; gap: .85rem;
  max-inline-size: 100%; text-decoration: none; font-weight: 700; line-height: 1.25;
  border-radius: .7rem; padding: .8rem 1.05rem;
}
.primary { background: var(--ink); color: #232220; }
.primary:hover { background: var(--warm); color: #232220; }
.book {
  position: absolute; inset: auto 0 .55rem auto;
  inline-size: min(58%, 37rem); max-inline-size: none; pointer-events: none;
}
.quick {
  display: flex; gap: .85rem 1.6rem; flex-wrap: wrap; align-items: center;
  border-bottom: 1px solid var(--rule); margin-block: 0 1.65rem; padding-block: .25rem 1.05rem;
}
.quick a {
  min-block-size: 44px; display: inline-flex; text-decoration: none; align-items: center; gap: .65rem;
  color: var(--body); font-size: .94rem; font-weight: 600; line-height: 1.3;
}
.quick a:hover { color: var(--warm); }
.quick a + a { border-inline-start: 1px solid var(--rule); padding-inline-start: 1.6rem; }
.home-section { scroll-margin-top: 1.25rem; }
.home-section h2 { margin-bottom: 1rem; }
.link-items { display: grid; gap: .65rem; }
.devices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.link-items a {
  display: flex; min-block-size: 44px; align-items: center; justify-content: space-between; gap: .7rem;
  text-decoration: none; line-height: 1.38; border-radius: .65rem; padding: .8rem; color: var(--ink);
}
.devices a { align-items: start; height: 100%; background: var(--raised); border: 1px solid var(--rule); }
.link-items a:hover { background: var(--hover); }
.item-content { display: grid; gap: .35rem; min-inline-size: 0; }
.item-content small { font-size: .78rem; color: var(--muted); }
.devices .arrow { margin-top: .12rem; }
.home-section .more-devices { margin-top: 1.05rem; }
.after-install { margin-top: 2.8rem; }
.after-install .prose { max-inline-size: var(--reading); }
.article { max-inline-size: 74ch; }
.article h1 { font-size: clamp(1.95rem, 3.8vw, 3.25rem); margin-block: .85rem 1.1rem; }
.crumbs { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .7rem; }
.crumbs li { display: flex; align-items: center; gap: .65rem; }
.crumbs li + li::before { content: ""; display: inline-block; inline-size: .36rem; block-size: .36rem; flex: none; rotate: -45deg; border-inline-end: 1px solid currentColor; border-block-end: 1px solid currentColor; }
.crumbs a { display: inline-flex; align-items: center; min-block-size: 44px; }
.opening { max-inline-size: 55ch; }
.prose { color: var(--body); }
.article .prose { max-inline-size: var(--reading); margin-top: 1.4rem; }
.prose h2 { color: var(--ink); margin: 2.1rem 0 .7rem; scroll-margin-top: 1.4rem; }
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: .8rem; }
.prose a:not(.checkout) { color: var(--warm); }
.prose a:not(.checkout):hover { color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 680; }
.prose ol, .prose ul { padding-inline-start: 1.55em; }
.prose ol { margin-block: .8rem 1.15rem; }
.prose ol li { padding-inline-start: .3em; }
.prose li + li { margin-top: .62rem; }
.prose li::marker { color: var(--warm); font-weight: 700; }
.prose code { font-family: ui-monospace, monospace; font-size: .92em; color: var(--ink); background: var(--raised); border-radius: .2em; padding: .11em .18em; }
.prose table { border-collapse: collapse; width: 100%; margin: .7rem 0 1rem; table-layout: fixed; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: .7rem .6rem; text-align: start; vertical-align: top; }
.prose th { background: var(--raised); color: var(--ink); }
.prose th:first-child { width: 32%; }
.contents { margin-block: 1.5rem 1.7rem; border-block: 1px solid var(--rule); padding: .95rem 0 .6rem; }
.contents p { font-size: .83rem; color: var(--muted); }
.contents a { display: inline-flex; align-items: center; min-block-size: 44px; }
.access-note { background: var(--raised); border-radius: .8rem; padding: 1.2rem; margin-block: 2.3rem 0; }
.access-note h2 { font-size: clamp(1.2rem, 1.65vw, 1.55rem); }
.access-page .prose { margin-top: 1rem; }
.access-page .prose p:has(a[href^="/"]) a { min-height: 44px; display: inline-flex; align-items: center; }
.access-page .prose h2 { margin-top: 1.85rem; padding-top: 1.45rem; border-top: 1px solid var(--rule); }
.checkout {
  color: var(--ink); background: radial-gradient(circle, var(--hover) 70%, transparent 72%) no-repeat calc(100% - 1.45rem) center / .4rem .4rem, var(--raised);
  border: 1px solid #77726b;
}
.checkout:is(:hover, :focus-visible) { color: var(--ink); background-position: center; background-size: 200% 650%; }
@media (prefers-reduced-motion: no-preference) and (hover: hover) { .checkout { transition: background-size .22s ease-out; } }
.after-article { margin-block: 2.85rem 0; }
.after-article h2 { margin-bottom: .9rem; }
.related { gap: 0; }
.related li + li { border-top: 1px solid var(--rule); }
.related a { padding-inline: .25rem; }
.not-found .lede { margin: .9rem 0 1.2rem; }
.site-footer {
  margin-top: 3rem; padding-top: 1.15rem; border-top: 1px solid var(--rule);
  font-size: .81rem; color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; column-gap: 1.05rem; }
.site-footer a { display: inline-flex; align-items: center; min-block-size: 44px; }
@media (max-width: 66rem) {
  .devices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 51rem) {
  .shell { display: block; inline-size: 100%; margin: 0; border: 0; border-radius: 0; min-height: 100vh; }
  .rail { padding: .75rem var(--inset) 0; }
  .masthead { padding-inline: 0; }
  .rail::after { display: none; }
  .rail nav { margin-top: .3rem; }
  .rail nav ul { display: flex; gap: .2rem .52rem; flex-wrap: wrap; }
  .rail nav li:first-child, .rail nav li:nth-child(4) { display: none; }
  .rail nav a { padding: .35rem .31rem; border-radius: .35rem; }
  .sheet { padding-top: 1.05rem; }
  .hero { min-block-size: 0; }
  .hero h1 { font-size: clamp(2.1rem, 6.8vw, 3.3rem); }
  .hero .lede { margin-block: .75rem 1rem; }
  .book { position: relative; inset: auto; inline-size: min(97%, 26rem); margin: .7rem 0 .2rem auto; }
  .quick { display: grid; gap: 0; padding-block: .25rem .55rem; margin-bottom: 1.4rem; }
  .quick a + a { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--rule); }
  .article h1 { margin-block-start: .45rem; }
}
@media (max-width: 34rem) {
  .devices { grid-template-columns: 1fr; }
  .devices a { padding: .74rem .85rem; align-items: center; }
  .devices { gap: .55rem; }
  .item-content { gap: .2rem; }
  .crumbs ol { gap: .1rem .55rem; }
}

/* Opus 5.5 comparison: B */
/* Указатель: цельный лист, верхняя навигация */
.shell { display: block; inline-size: 100%; max-inline-size: 84rem; min-block-size: 100vh; margin: 0 auto; border: 0; border-radius: 0; }
.rail {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 2rem;
  margin-inline: var(--inset); padding: .9rem 0 .7rem; border-bottom: 1px solid var(--rule);
}
.rail::after { content: none; }
.masthead { padding-inline: 0; }
.rail nav { margin: 0; }
.rail nav ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.rail nav a, .rail nav a:hover, .rail nav a.is-current { padding: .5rem 0; border-radius: 0; background: none; }
.rail nav a:hover { color: var(--warm); }
.rail nav a.is-current { color: var(--ink); text-decoration: underline 2px var(--warm); text-underline-offset: .5em; }
.sheet { padding: clamp(1.5rem, 3.2vw, 2.75rem) var(--inset) 1.75rem; }

/* Первый экран */
.hero { display: grid; gap: clamp(1.25rem, 3vw, 2.75rem) clamp(1.5rem, 4vw, 3.5rem); min-block-size: 0; }
.hero h1 { max-inline-size: 14em; font-size: clamp(2.05rem, 1.1rem + 3.6vw, 4rem); line-height: 1.04; letter-spacing: -.035em; }
.hero .lede { max-inline-size: 34ch; margin: 0 0 1.5rem; }
.primary { border-radius: .3rem; }
.hero .quick {
  display: grid; gap: 0; max-inline-size: 24rem; margin: 1.75rem 0 0; padding: 0;
  border-top: 1px solid var(--rule); border-bottom: 0;
}
.hero .quick a { display: flex; justify-content: space-between; padding: .55rem 0; }
.hero .quick a + a { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--rule); }
.hero-book { min-inline-size: 0; }
.book {
  position: static; inset: auto; inline-size: 100%; max-inline-size: 19rem; block-size: auto;
  margin: 0 0 0 auto; pointer-events: none;
}

/* Указатель устройств и заметки */
.home .home-section { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.home-section h2 { font-size: clamp(1.45rem, 1rem + 1.4vw, 2.2rem); max-inline-size: 13em; }
.index-body { min-inline-size: 0; }
.index .devices { display: block; }
.index .devices li { border-top: 1px solid var(--rule); }
.index .devices a { align-items: center; height: auto; padding: .9rem 0; background: none; border: 0; border-radius: 0; }
.index .devices a:hover { background: none; color: var(--warm); }
.index .item-content { gap: .15rem 1.5rem; }
.index .item-content strong { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.index .item-content small { font-size: .94rem; line-height: 1.45; color: var(--muted); max-inline-size: 48ch; }
.index .arrow { margin: 0; color: var(--warm); }
.home .more-devices { margin-top: 1rem; }
.home .prose a { padding-block: .6rem; }
.after-install .prose {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  column-gap: clamp(1.5rem, 3vw, 2.5rem); max-inline-size: none;
}
.after-install .prose p { margin: 0; padding: .85rem 0 1.1rem; border-top: 1px solid var(--rule); }
.after-install .prose a { font-weight: 650; }

/* Статьи: тот же лист, без плашек у линеек */
.access-note { border-radius: .25rem; }
.related a:hover, .link-items.related a:hover { background: none; }
.prose th { background: none; }

@media (min-width: 30rem) {
  .index .item-content { grid-template-columns: 8.5rem minmax(0, 1fr); align-items: baseline; }
}
@media (min-width: 40rem) {
  .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { grid-column: 1 / -1; }
  .hero-book { align-self: end; }
  .book { max-inline-size: 32rem; }
}
@media (min-width: 64rem) {
  .hero, .home .home-section { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(1.5rem, 4vw, 3.5rem); }
  .home .home-section { display: grid; align-items: start; }
  .home-section h2 { margin: 0; padding-top: .85rem; border-top: 1px solid var(--rule); }
}
