:root {
  color-scheme: light;
  --background: #f8fafb;
  --paper: #fff;
  --ink: #10202d;
  --muted: #46576a;
  --line: #d7e0e7;
  --faint: #f0f4f7;
  --link: #005c62;
  --selected: #e3f3f0;
  --brand: #0a1521;
  --accent: #ff9b59;
  font-family: Onest, system-ui, sans-serif;
  line-height: 1.65;
}
@font-face { font-family: Onest; src: url('/fonts/onest-cyrillic.woff2') format('woff2'); font-display: swap; unicode-range: U+0400-052F, U+2116; }
@font-face { font-family: Onest; src: url('/fonts/onest-latin.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2190-2199; }
@font-face { font-family: Exo; src: url('/fonts/exo-2-cyrillic.woff2') format('woff2'); font-display: swap; unicode-range: U+0400-052F, U+2116; }
@font-face { font-family: Exo; src: url('/fonts/exo-2-latin.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2190-2199; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.2rem; }
body { margin: 0; background: var(--background); color: var(--ink); }
h1, h2, h3, p, ul, ol, figure { margin-top: 0; }
h1, h2 { font-family: Exo, Onest, system-ui, sans-serif; line-height: 1.14; letter-spacing: -.025em; }
a { color: var(--link); text-decoration-thickness: .075em; text-underline-offset: .19em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid #08747b; outline-offset: 3px; }
summary { cursor: pointer; }
.skip { position: fixed; z-index: 5; top: .6rem; left: .6rem; translate: 0 -160%; background: var(--paper); padding: .7rem 1rem; }
.skip:focus { translate: none; }
.top { background: var(--brand); color: white; border-bottom: 3px solid var(--accent); }
.top-inner, .guide-footer { display: flex; align-items: center; gap: .7rem 1.4rem; justify-content: space-between; width: min(100% - 2rem, 88rem); margin-inline: auto; }
.top-inner { min-height: 4.25rem; flex-wrap: wrap; padding-block: .65rem; }
.top a { color: #dcecf4; }
.brand { display: flex; gap: .65rem; align-items: center; color: white; text-decoration: none; font-family: Exo, system-ui, sans-serif; font-weight: 750; letter-spacing: .04em; white-space: nowrap; }
.brand span span { color: #9fc4cb; margin-left: .38rem; font-size: .88rem; font-weight: 600; letter-spacing: 0; }
.top nav { display: flex; gap: 1.15rem; flex-wrap: wrap; font-size: .88rem; }
.top nav a { display: inline-block; padding-block: .28rem; }
.guide-layout { margin-inline: auto; width: min(100%, 88rem); min-height: 70vh; display: grid; grid-template-columns: 18rem minmax(0, 1fr); }
.sidebar { border-right: 1px solid var(--line); background: var(--paper); padding: 1.65rem .95rem 1.5rem; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow: auto; scrollbar-gutter: stable; }
.search { padding: 0 .25rem .95rem; }
.search label { display: block; font-size: .89rem; font-weight: 700; margin-bottom: .35rem; }
.search input { width: 100%; min-height: 2.7rem; border: 1px solid #aebdca; border-radius: .42rem; padding: .48rem .6rem; font: inherit; background: var(--background); color: var(--ink); }
.search input::placeholder { color: #536579; }
.search p:empty { display: none; }
.search p { color: var(--muted); margin: .55rem 0 .3rem; font-size: .78rem; }
.search ul, .chapter-nav ul, .index-groups ul { list-style: none; margin: 0; padding: 0; }
.search li { border-bottom: 1px solid var(--line); }
.search li a { padding: .5rem .12rem; display: block; line-height: 1.4; font-size: .89rem; }
.search li small { color: var(--muted); display: block; margin-top: .2rem; }
.mobile-disclosure > summary { display: none; }
.chapter-index, .chapter-nav li a { display: block; color: var(--ink); text-decoration: none; }
.chapter-index { min-height: 2.65rem; display: flex; align-items: center; font-weight: 700; padding: .45rem .65rem; margin-bottom: .25rem; border-radius: .36rem; }
.chapter-nav details { border-top: 1px solid var(--line); }
.chapter-nav details:last-child { border-bottom: 1px solid var(--line); }
.chapter-nav details summary { font-size: .93rem; font-weight: 700; padding: .56rem .58rem; }
.chapter-nav li a { margin: .06rem .38rem .12rem .72rem; padding: .41rem .56rem; font-size: .875rem; line-height: 1.35; border-left: 2px solid transparent; border-radius: 0 .32rem .32rem 0; }
.chapter-nav li:last-child a { margin-bottom: .65rem; }
.chapter-nav a:hover, .chapter-nav summary:hover { background: var(--faint); }
.chapter-nav a[aria-current="page"] { background: var(--selected); border-color: var(--link); color: #004b51; font-weight: 750; }
.reading { width: min(100%, 61rem); min-width: 0; padding: clamp(1.45rem, 4.8vw, 4.5rem) clamp(1.15rem, 4.7vw, 4.85rem) 4rem; }
.chapter-header { border-bottom: 1px solid var(--line); margin-bottom: 1.9rem; padding-bottom: 1.5rem; }
.chapter-header h1 { font-size: clamp(2rem, 5vw, 3.65rem); margin: 0 0 .65rem; }
.chapter-header p { color: var(--muted); max-width: 42rem; margin: 0; font-size: clamp(1rem, 1.75vw, 1.19rem); }
.primary { background: var(--brand); border-radius: .4rem; color: white; display: inline-flex; align-items: center; gap: .65rem; padding: .55rem .88rem; margin-top: 1.14rem; font-weight: 650; text-decoration: none; }
.primary span { color: var(--accent); }
.primary:hover { background: #213749; }
.index-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.8rem; }
.index-groups section { border-top: 2px solid #a4b7c4; padding-top: .85rem; }
.index-groups h2 { margin-bottom: .75rem; font-size: 1.48rem; }
.index-groups li + li { margin-top: .74rem; }
.index-groups li a { font-weight: 700; }
.index-groups li p { color: var(--muted); font-size: .9rem; line-height: 1.47; margin: .14rem 0 0; }
.breadcrumbs { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .55rem; color: var(--muted); font-size: .84rem; margin-bottom: 1rem; }
.article-toc { margin-bottom: 2.3rem; background: var(--faint); border-left: 3px solid #6c8f99; border-radius: 0 .45rem .45rem 0; padding: .72rem 1rem .85rem; }
.article-toc p { margin-bottom: .25rem; font-weight: 740; }
.article-toc ul { margin: 0; padding-left: 1.05rem; font-size: .92rem; }
.article-section { margin-bottom: 2.15rem; min-width: 0; }
.article-section h2 { font-size: clamp(1.46rem, 3vw, 2.08rem); margin: 0 0 .8rem; }
.article-section p, .article-section ul, .article-section ol { margin-bottom: .95rem; }
.article-section p:last-child { margin-bottom: 0; }
.article-section ol, .article-section ul { padding-left: 1.35rem; }
.article-section li + li { margin-top: .35rem; }
.article-section:target > h2::before { content: ''; display: inline-block; margin-right: .42rem; width: .16rem; height: .75em; background: #08747b; vertical-align: -.035em; }
.note { border-left: 3px solid #a45a20; background: #fff2e7; padding: .67rem .9rem; border-radius: 0 .35rem .35rem 0; margin: .9rem 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: .45rem; margin: .75rem 0 1.15rem; background: var(--paper); }
table { width: 100%; min-width: min(100%, 30rem); border-collapse: collapse; font-size: .94rem; line-height: 1.53; }
th, td { padding: .63rem .72rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
thead th { background: var(--faint); }
tbody th { min-width: 7em; }
tbody tr:last-child > * { border-bottom: 0; }
.screen-figure { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); align-items: start; gap: .85rem 1.3rem; margin: 1.05rem 0 1.3rem; }
.screen-link { position: relative; display: block; background: #131c26; border: 1px solid #273b4b; border-radius: .7rem; overflow: hidden; }
.screen-link img { width: 100%; height: auto; display: block; }
.screen-figure figcaption { font-size: .92rem; color: var(--muted); padding-top: .35rem; }
.screen-figure figcaption ol { padding-left: 1.22rem; margin: .65rem 0; }
.screen-full { display: inline-block; margin-top: .3rem; font-weight: 650; }
.marker { display: grid; place-items: center; position: absolute; left: var(--x); top: var(--y); width: 1.55rem; height: 1.55rem; translate: -100% -100%; border-radius: 50%; background: #ffac6e; color: #191410; border: 2px solid #171613; font: 800 .82rem/1 Onest, sans-serif; box-shadow: 0 0 0 2px #fff; pointer-events: none; }
.marker::after { content: ''; position: absolute; bottom: -.39rem; right: -.39rem; width: 0; height: 0; border: .3rem solid transparent; border-top-color: #ffac6e; rotate: -43deg; filter: drop-shadow(1px 1px #191410); }
.adjacent { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; border-top: 1px solid var(--line); padding-top: 1.05rem; }
.adjacent a { padding: .65rem; display: block; border: 1px solid var(--line); border-radius: .45rem; background: var(--paper); line-height: 1.35; font-weight: 700; }
.adjacent a span { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; margin-bottom: .2rem; }
.guide-footer { padding: 1rem 0 1.45rem; border-top: 1px solid var(--line); font-size: .87rem; flex-wrap: wrap; }
@media (max-width: 50rem) {
  .guide-layout { display: block; }
  .sidebar { position: static; max-height: none; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); padding: .85rem max(1rem, calc((100% - 44rem) / 2)); }
  .search { padding: 0 0 .65rem; }
  .mobile-disclosure > summary { display: list-item; font-weight: 720; min-height: 2.7rem; padding: .48rem .65rem; background: var(--faint); border-radius: .36rem; }
  .chapter-nav { padding-block: .55rem; }
  .reading { max-width: 47rem; margin-inline: auto; }
}
@media (max-width: 36rem) {
  .top-inner { column-gap: .75rem; }
  .top nav { gap: .7rem; }
  .index-groups, .screen-figure { grid-template-columns: minmax(0, 1fr); }
  .screen-link { width: min(100%, 17rem); }
  .screen-figure figcaption { padding-top: 0; }
  .adjacent { grid-template-columns: minmax(0, 1fr); }
  .adjacent > span { display: none; }
}
