:root {
  color-scheme: light dark;
  --paper: #fcfaf6;
  --card: #fffdf9;
  --sand: #f2ebe0;
  --ink: #24211e;
  --muted: #60584d;
  --rule: #ded5c7;
  --accent: #9c4900;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1d1b19;
    --card: #23201e;
    --sand: #302923;
    --ink: #f7f0e5;
    --muted: #c9bdae;
    --rule: #4a4037;
    --accent: #ffb774;
  }
  .guide-footer img { filter: brightness(0) invert(1); }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.guide-shell { width: min(100% - 3.5rem, 86rem); margin-inline: auto; }
.skip-link { position: absolute; z-index: 4; left: 1rem; top: .7rem; background: var(--paper); padding: .45rem .8rem; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.guide-header { border-bottom: 1px solid var(--rule); background: var(--card); }
.guide-topbar { min-height: 4.65rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; }
.guide-brand { display: inline-flex; align-items: center; gap: 1rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.guide-brand img { display: block; }
.guide-brand span { border-inline-start: 1px solid var(--rule); padding-inline-start: 1rem; color: var(--muted); font-size: .9rem; }
.guide-languages { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .85rem; }
.guide-languages a { color: var(--muted); font-size: .85rem; }
.guide-languages a[aria-current] { color: var(--ink); text-decoration-thickness: .13em; font-weight: 650; }

.guide-layout { display: grid; grid-template-columns: minmax(12rem, 15.5rem) minmax(0, 1fr) minmax(10rem, 13rem); gap: clamp(1.35rem, 3vw, 3.2rem); align-items: start; }
.guide-sidebar, .guide-toc { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; padding: 2.45rem .3rem 2rem 0; }
.guide-menu summary { color: var(--ink); cursor: pointer; font-weight: 650; }
.guide-menu section { margin-block: 1.3rem; }
.guide-menu section > p, .guide-toc > p { margin: 0 0 .45rem; color: var(--muted); font-size: .8rem; font-weight: 650; }
.guide-menu ul, .guide-toc ul, .guide-results { list-style: none; padding: 0; margin: 0; }
.guide-menu nav a, .guide-toc a { display: block; color: var(--muted); text-decoration: none; font-size: .88rem; padding: .22rem .45rem; border-inline-start: 2px solid transparent; overflow-wrap: anywhere; }
.guide-menu nav a:hover, .guide-toc a:hover { color: var(--accent); }
.guide-menu nav a[aria-current] { border-color: var(--accent); color: var(--ink); background: var(--sand); font-weight: 650; }
.guide-toc { border-inline-start: 1px solid var(--rule); padding-inline-start: .8rem; }

.guide-search { margin-block-end: 1.05rem; }
.guide-search label { display: block; margin-block-end: .3rem; font-size: .8rem; font-weight: 650; }
.guide-search input { width: 100%; padding: .6rem .65rem; border: 1px solid var(--rule); background: var(--card); color: var(--ink); border-radius: .25rem; font: inherit; font-size: .9rem; }
.guide-results:not(:empty) { margin-top: .55rem; background: var(--card); border: 1px solid var(--rule); border-radius: .25rem; }
.guide-results li { padding: .55rem .65rem; border-block-end: 1px solid var(--rule); line-height: 1.35; }
.guide-results li:last-child { border-block-end: 0; }
.guide-results a { font-size: .88rem; font-weight: 650; }
.guide-results p, .guide-search-status { margin: .25rem 0 0; color: var(--muted); font-size: .8rem; }
.guide-search-status:empty { margin: 0; }

.guide-article { padding-block: 2.45rem 4rem; overflow-wrap: anywhere; min-width: 0; }
.guide-article h1, .guide-article h2, .guide-article h3 { font-family: var(--serif); font-weight: 400; line-height: 1.14; color: var(--ink); }
.guide-article h1 { font-size: clamp(2.2rem, 4vw, 3.55rem); letter-spacing: -.045em; margin: 0 0 1.4rem; }
.guide-article h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); letter-spacing: -.025em; border-block-start: 1px solid var(--rule); padding-block-start: 1.25rem; margin: 2.4rem 0 .75rem; }
.guide-article h3 { font-size: 1.34rem; margin: 1.7rem 0 .55rem; }
.guide-article p { margin-block: .7rem 1rem; }
.guide-article ul, .guide-article ol { padding-inline-start: 1.55rem; }
.guide-article li + li { margin-block-start: .28rem; }
.guide-article [id] { scroll-margin-block-start: 1rem; }
.guide-article :target { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .2em; }
.guide-article pre, .guide-table { max-width: 100%; overflow-x: auto; }
.guide-table { margin-block: 1.15rem; }
.guide-article table { border-collapse: collapse; width: 100%; min-width: 25rem; font-size: .93rem; line-height: 1.45; }
.guide-article th, .guide-article td { padding: .65rem .72rem; border: 1px solid var(--rule); text-align: start; vertical-align: top; }
.guide-article th { background: var(--sand); }
.guide-article code { padding: .08em .25em; background: var(--sand); font-size: .88em; }
.guide-article pre { padding: .95rem; background: var(--sand); border-radius: .3rem; }
.guide-article pre code { padding: 0; }
.guide-footer { border-block-start: 1px solid var(--rule); background: var(--card); padding-block: 1.5rem; }
.guide-footer img { max-width: 100%; height: auto; display: block; }

@media (max-width: 69rem) {
  .guide-layout { grid-template-columns: minmax(11rem, 14rem) minmax(0, 1fr); }
  .guide-toc { display: none; }
}

@media (max-width: 43rem) {
  .guide-shell { width: calc(100% - 2rem); }
  .guide-topbar { min-height: 0; flex-wrap: wrap; padding-block: .85rem; }
  .guide-layout { display: block; }
  .guide-sidebar { position: static; padding: 1rem 0; max-height: none; border-block-end: 1px solid var(--rule); }
  .guide-article { padding-block: 1.5rem 2.7rem; }
  .guide-brand img { width: 109px; height: auto; }
}
