.reader {
  --doc-text: #151c2f;
  --doc-copy: #37435a;
  --doc-muted: #5a667b;
  --doc-line: #d8dfed;
  --doc-link: #354fa1;
  --doc-focus: #3d66c1;
  color: var(--doc-text);
  background: #f8faff;
  padding: clamp(1.4rem, 3vw, 3.15rem) 0 clamp(4rem, 6vw, 7rem);
}
.reader :is(a, button, summary):focus-visible { outline: 3px solid var(--doc-focus); outline-offset: 3px; }
.doc-layout {
  display: grid;
  grid-template-columns: minmax(11rem, .98fr) minmax(0, 3.24fr) minmax(9rem, .75fr);
  gap: clamp(1.7rem, 3.25vw, 3.6rem);
  align-items: start;
}
.doc-library,
.reader-index-wide {
  min-width: 0;
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 3.25rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c3cde0 transparent;
  padding: .2rem .35rem .55rem;
}
.doc-library h2,
.reader-index-wide h2 {
  margin: 0 0 .85rem;
  color: var(--doc-text);
  font: 680 .93rem/1.4 Inter, sans-serif;
  letter-spacing: -.012em;
}
.doc-library h2 { padding-inline: .65rem; }
.reader :is(.doc-topic-links, .doc-section-links) {
  list-style: none;
  margin: 0;
  padding: 0;
}
.doc-topic-links li:first-child { padding-bottom: .7rem; margin-bottom: .7rem; border-bottom: 1px solid var(--doc-line); }
.doc-topic-links a {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 2.55rem;
  padding: .63rem .65rem;
  color: var(--doc-copy);
  font-size: .905rem;
  line-height: 1.38;
  font-weight: 500;
  border-radius: 7px;
}
.doc-topic-links a .ico { width: 1.12rem; height: 1.12rem; color: #616f89; }
.doc-topic-links a:hover { background: #eaf0fb; color: var(--doc-text); }
.doc-topic-links a[aria-current="page"] { background: #dfe7ff; color: #293f89; font-weight: 650; }
.doc-topic-links a[aria-current="page"] .ico { color: inherit; }
.doc-section-links li { margin-block: .12rem; }
.doc-section-links a {
  display: block;
  padding: .42rem .15rem .42rem .8rem;
  border-left: 1px solid var(--doc-line);
  color: var(--doc-muted);
  font-size: .86rem;
  line-height: 1.45;
  text-decoration: none;
}
.doc-section-links a:hover,
.doc-section-links a[aria-current="location"] { color: var(--doc-link); border-color: var(--doc-link); }
.doc-section-links a[aria-current="location"] { font-weight: 650; }
ol.doc-section-links { counter-reset: guide-step; }
ol.doc-section-links > li { counter-increment: guide-step; }
ol.doc-section-links a::before { content: counter(guide-step) ". "; font-variant-numeric: tabular-nums; }
.doc-mobile-tools { display: none; }
.doc-article { min-width: 0; }

.reader .chapter-crumbs { margin: 0 0 1.6rem; }
.reader .chapter-crumbs ol { gap: .18rem 0; color: var(--doc-muted); font-size: .82rem; line-height: 1.6; }
.reader .chapter-crumbs li + li::before { color: #77849a; margin-inline: .55em; }
.reader .chapter-crumbs li[aria-current] { color: var(--doc-copy); }
.reader .chapter-crumbs a:hover { color: var(--doc-link); text-decoration: underline; }

.reader-header { margin: 0 0 clamp(1.8rem, 3.2vw, 3.2rem); }
.reader-header h1 {
  margin: 0;
  max-width: 22ch;
  color: var(--doc-text);
  font: 650 clamp(2.5rem, 3.65vw, 4rem)/1.06 Rubik, Inter, sans-serif;
  letter-spacing: -.04em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.reader-header > p {
  max-width: 65ch;
  margin: 1.05rem 0 0;
  color: var(--doc-copy);
  font-size: clamp(1.05rem, 1.23vw, 1.23rem);
  line-height: 1.6;
  text-wrap: pretty;
}
.reader-start {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 2.75rem;
  margin-top: 1.2rem;
  padding: .67rem 1.1rem;
  border-radius: 7px;
  color: #fff;
  background: var(--doc-link);
  font-size: .91rem;
  font-weight: 650;
}
.reader-start .ico { width: 1rem; height: 1rem; transform: rotate(90deg); }
.reader-start:hover { background: #223a81; color: #fff; }
.reader-body > .screen-shot { margin-bottom: clamp(2.2rem, 3.6vw, 3.65rem); }
.reader .chapter-section {
  scroll-margin-top: 2.5rem;
  padding-block: clamp(1.95rem, 3.4vw, 3.25rem);
  border-top: 1px solid var(--doc-line);
}
.reader .chapter-section:first-child { padding-top: 1.65rem; }
.reader .chapter-section h2 {
  margin: 0;
  color: var(--doc-text);
  font: 600 clamp(1.5rem, 2.1vw, 2.25rem)/1.2 Rubik, Inter, sans-serif;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.reader .chapter-section :is(p, h2) { overflow-wrap: break-word; }
.reader .chapter-section > p,
.reader .chapter-note {
  max-width: 69ch;
  margin: .8rem 0 0;
  color: var(--doc-copy);
  font-size: clamp(1rem, 1.12vw, 1.1rem);
  line-height: 1.7;
  text-wrap: pretty;
}
.reader .chapter-section strong { font-weight: 630; color: var(--doc-text); }
.reader kbd {
  border: 1px solid #b9c4d7;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fff;
  color: #23314f;
  padding: .02em .34em;
  font: 580 .85em/1.45 Inter, sans-serif;
  white-space: nowrap;
}
.reader-guide .chapter-section h2 { display: flex; align-items: baseline; gap: .58em; }
.reader .guide-step-marker {
  flex: 0 0 auto;
  display: inline-grid;
  place-content: center;
  align-self: flex-start;
  width: 1.8em;
  height: 1.8em;
  margin-top: .05em;
  border-radius: 50%;
  color: #2b438b;
  background: #dce6ff;
  font: 650 .62em/1 Inter, sans-serif;
  font-variant-numeric: tabular-nums;
}

.reader .screen-shot { margin-inline: 0; margin-top: 0; }
.reader .chapter-section :is(.screen-shot, .audio-demo) { margin-top: 1.4rem; }
.reader .shot-zoom {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #e9eef8;
  border: 1px solid #d1dae9;
  border-radius: 12px;
  padding: clamp(.85rem, 2vw, 1.7rem);
}
.reader .shot-zoom img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(46rem, 84vh);
  object-fit: contain;
  border-radius: 2px;
}
.reader .screen-shot figcaption { margin-top: .58rem; color: var(--doc-muted); font-size: .84rem; line-height: 1.5; }
.reader .zoom-symbol {
  right: .55rem;
  bottom: .55rem;
  width: 2.4rem;
  height: 2.4rem;
  background: #fff;
  color: #253964;
  border: 1px solid #aebcd2;
  border-radius: 7px;
}
.reader .shot-zoom:hover .zoom-symbol,
.reader .shot-zoom:focus-visible .zoom-symbol { color: #fff; background: var(--doc-link); border-color: var(--doc-link); }
.reader .audio-demo { width: 100%; max-width: 41rem; }
.reader .chapter-note { margin: 0 0 1.8rem; padding: 1rem 1.2rem; border-radius: 8px; background: #e8eef9; }
.reader .chapter-related-link {
  color: var(--doc-link);
  font-size: .95rem;
  font-weight: 590;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: .22em;
}
.reader .chapter-related-link:hover { color: #202e6c; }
.reader .chapter-next {
  align-items: center;
  margin: .3rem 0 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid #bfcadd;
}
.reader .chapter-next p { margin: 0 0 .28rem; color: var(--doc-muted); font-size: .83rem; }
.reader .chapter-next-link { color: var(--doc-link); font: 610 clamp(1.25rem, 2vw, 1.85rem)/1.23 Rubik, Inter, sans-serif; letter-spacing: -.025em; }
.reader .chapter-next-link:hover { text-decoration: underline; }

@media (max-width: 1179px) {
  .doc-layout { grid-template-columns: minmax(11.7rem, .86fr) minmax(0, 2.95fr); gap: clamp(1.5rem, 3.7vw, 3rem); }
  .reader-index-wide, .doc-library-compact { display: none; }
  .doc-mobile-tools {
    display: flex;
    position: relative;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: 1.35rem;
  }
  .reader .chapter-crumbs { margin-bottom: .75rem; }
  .doc-mobile-tools summary {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.75rem;
    padding: .48rem .72rem;
    border-radius: 7px;
    border: 1px solid #bcc8dc;
    background: #fff;
    color: #2e416d;
    list-style: none;
    cursor: pointer;
    font-size: .86rem;
    font-weight: 610;
  }
  .doc-mobile-tools summary .ico { width: 1rem; height: 1rem; }
  .doc-mobile-tools summary::-webkit-details-marker { display: none; }
  .doc-mobile-tools details[open] > summary { background: #e1e9ff; color: #273f89; }
  .doc-mobile-tools details > nav {
    position: absolute;
    z-index: 3;
    inset-inline-start: 0;
    top: calc(100% + .4rem);
    width: min(100%, 24rem);
    max-height: 52vh;
    padding: .55rem;
    overflow: auto;
    border: 1px solid #bcc8dc;
    border-radius: 9px;
    background: #fff;
  }
  .doc-mobile-tools nav a { min-height: 2.75rem; }
  .doc-mobile-tools .doc-section-links a { display: flex; align-items: baseline; gap: .3em; padding: .73rem .7rem; border: 0; border-radius: 5px; font-size: .93rem; }
  .doc-mobile-tools .doc-section-links a[aria-current] { background: #e5ecfd; }
}
@media (max-width: 800px) {
  .doc-layout { display: block; }
  .doc-library { display: none; }
  .doc-library-compact { display: block; }
  .reader-header h1 { font-size: clamp(2.22rem, 7vw, 3.25rem); }
  .reader-header > p { font-size: 1.05rem; }
  .reader .shot-zoom { border-radius: 8px; padding: .65rem; }
  .reader .zoom-symbol { width: 2rem; height: 2rem; right: .35rem; bottom: .35rem; }
}
@media (max-width: 410px) {
  .doc-mobile-tools { gap: .35rem; }
  .doc-mobile-tools summary { padding-inline: .52rem; gap: .33rem; }
  .doc-mobile-tools summary .ico { width: .92rem; }
}
