/* Copyright (C) 2026 Ningqi Wang (0xf3cd). SPDX-License-Identifier: MIT */
:root {
  --paper: #ffffff;
  --ink: #172536;
  --muted: #43556b;
  --accent: #164f9e;
  --surface: #f1f5fa;
  --border: #c6d2df;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
.guide { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
.guide *, .source-context { box-sizing: border-box; }
.guide a, .source-context a { color: var(--accent); text-underline-offset: .18em; }
.guide a:focus-visible, .guide summary:focus-visible, .source-context a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 4px;
}
.site-title { padding: 1.4rem 2rem; font-size: 1.25rem; font-weight: 700; }
.site-title span { margin-left: 1rem; font-size: 1rem; font-weight: 400; }
.source-context {
  padding: 1rem 2rem; background: var(--surface); border-block: 1px solid var(--border);
  color: var(--ink); font: .875rem/1.65 var(--sans); overflow-wrap: anywhere;
}
.source-context a:first-of-type { font-family: var(--mono); }
.layout { display: grid; grid-template-columns: 16rem minmax(0, 76ch); gap: 3rem; padding: 2rem; max-width: 90rem; }
.navigation { font-size: .875rem; }
.navigation summary { font-weight: 650; cursor: pointer; }
.navigation nav { display: grid; gap: .7rem; margin-top: 1rem; }
.guide main { min-width: 0; }
.contents { margin-bottom: 2rem; font-size: .875rem; }
.contents summary { cursor: pointer; }
.contents nav { display: grid; gap: .3rem; padding-top: .7rem; }
.guide h1 { font-size: 2rem; line-height: 1.2; margin: .5rem 0 1.5rem; }
.guide h2 { font-size: 1.5rem; line-height: 1.3; margin: 2.5rem 0 1rem; }
.guide h3 { font-size: 1.2rem; margin-top: 2rem; }
.guide p, .guide li { overflow-wrap: anywhere; }
.guide pre { overflow: auto; max-width: 100%; padding: 1rem; background: var(--surface); border: 1px solid var(--border); }
.guide code { font-family: var(--mono); font-size: .875em; }
.guide pre code { font-size: .875rem; overflow-wrap: normal; }
.guide table { display: block; overflow: auto; max-width: 100%; border-collapse: collapse; font-size: .9rem; }
.guide th, .guide td { text-align: left; padding: .6rem .8rem; border: 1px solid var(--border); }
.guide th { background: var(--surface); }
.guide blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--border); }
.guide img { max-width: 100%; }
.guide footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .875rem; }
.skip-link { position: absolute; left: 1rem; top: -5rem; background: var(--paper); padding: .5rem; }
.skip-link:focus { top: .5rem; }
@media (max-width: 54rem) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 1.25rem; }
  .site-title, .source-context { padding: 1rem 1.25rem; }
  .navigation { border-bottom: 1px solid var(--border); padding-bottom: 1.25rem; }
  .navigation nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
