/* docs.ezpreorder.com. System fonts only: no third-party requests. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-hover: #eef1f6;
  --ink: #16191f;
  --ink-soft: #4a5160;
  --ink-faint: #727a8a;
  --line: #e3e6ec;
  --accent: #2f5bd3;
  --accent-ink: #ffffff;
  --accent-soft: #eaf0fd;
  --code-bg: #f1f3f7;
  --radius: 10px;
  --topbar-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --bg-soft: #181b22;
    --bg-hover: #20242d;
    --ink: #e8eaef;
    --ink-soft: #b4bac6;
    --ink-faint: #8a92a1;
    --line: #2a2f3a;
    --accent: #8fb0ff;
    --accent-ink: #0d1530;
    --accent-soft: #1c2640;
    --code-bg: #1f232c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 6px; z-index: 30; }
.skip:focus { left: 8px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 16px; height: var(--topbar-h); max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; white-space: nowrap; }
.brand-sub { color: var(--ink-faint); font-weight: 500; }
.search { position: relative; flex: 1; max-width: 520px; margin-left: auto; }
.search input {
  width: 100%; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-soft); color: var(--ink); font: inherit; font-size: 15px;
}
.search input:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.search-results {
  position: absolute; top: 46px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.14); max-height: 70vh; overflow: auto;
}
.search-results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.search-results a span { display: block; color: var(--ink-faint); font-size: 13px; }
.search-results li[aria-selected="true"] a, .search-results a:hover { background: var(--bg-hover); }
.search-results .empty { padding: 10px; color: var(--ink-faint); }
.install {
  white-space: nowrap; background: var(--accent); color: var(--accent-ink); text-decoration: none;
  padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.menu-toggle { display: none; }

/* Layout */
.shell { display: grid; grid-template-columns: 270px minmax(0, 1fr) 220px; gap: 40px; max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.sidebar {
  position: sticky; top: var(--topbar-h); align-self: start; max-height: calc(100vh - var(--topbar-h));
  overflow: auto; padding: 24px 4px 40px 0; font-size: 14px;
}
.sidebar details { margin-bottom: 4px; }
.sidebar summary { cursor: pointer; padding: 6px 8px; border-radius: 6px; font-weight: 600; color: var(--ink); list-style-position: outside; }
.sidebar summary:hover { background: var(--bg-hover); }
.sidebar ul { list-style: none; margin: 2px 0 10px; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.sidebar li a { display: block; padding: 4px 8px; color: var(--ink-soft); text-decoration: none; border-radius: 6px; line-height: 1.4; }
.sidebar li a:hover { color: var(--ink); background: var(--bg-hover); }
.sidebar li a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.content { min-width: 0; max-width: 780px; padding: 28px 0 64px; }
.toc { position: sticky; top: var(--topbar-h); align-self: start; padding: 32px 0; font-size: 13px; max-height: calc(100vh - var(--topbar-h)); overflow: auto; }
.toc-title { margin: 0 0 8px; font-weight: 650; color: var(--ink); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 3px 12px; color: var(--ink-faint); text-decoration: none; line-height: 1.4; }
.toc a:hover, .toc a.active { color: var(--accent); }

/* Article typography */
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 4vw, 36px); margin: 8px 0 12px; }
h2 { font-size: 23px; margin: 40px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 18px; margin: 28px 0 8px; }
h2 .anchor, h3 .anchor { float: left; margin-left: -22px; padding-right: 6px; color: var(--ink-faint); text-decoration: none; opacity: 0; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
p, ul, ol { margin: 0 0 14px; }
li { margin: 4px 0; }
li > ul, li > ol { margin: 6px 0; }
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--code-bg); padding: 2px 5px; border-radius: 5px; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: var(--radius); overflow: auto; }
pre code { background: none; padding: 0; }
blockquote { margin: 0 0 16px; padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0; }
blockquote p:last-child { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.breadcrumb { display: flex; gap: 8px; font-size: 14px; color: var(--ink-faint); }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--ink-faint); font-size: 14px; margin-bottom: 24px; }
.meta a { color: var(--ink-faint); }
.badge { background: var(--accent-soft); color: var(--accent); font-weight: 600; padding: 3px 10px; border-radius: 999px; }
article > p:first-of-type { font-size: 17.5px; color: var(--ink); }
.help-cta { margin-top: 48px; padding: 16px 18px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.help-cta p { margin: 0; }

/* Home and collection pages */
.hero { padding: 16px 0 8px; }
.lead { font-size: 18px; color: var(--ink-soft); max-width: 640px; }
.section-title { border-top: 0; padding-top: 0; margin-top: 36px; font-size: 20px; }
.cards, .topics { list-style: none; padding: 0; display: grid; gap: 12px; }
.cards { grid-template-columns: 1fr; }
.topics { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cards a, .topics a {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink); text-decoration: none; background: var(--bg);
}
.cards a:hover, .topics a:hover { border-color: var(--accent); background: var(--bg-soft); }
.cards span, .topics span { color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; }
.topics em { color: var(--ink-faint); font-style: normal; font-size: 13px; margin-top: auto; padding-top: 6px; }

.footer { border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 14px; }
.footer-inner { max-width: 1400px; margin: 0 auto; padding: 20px 16px 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer p { margin: 0; }
.footer a { color: var(--ink-soft); }

/* Responsive */
@media (max-width: 1200px) {
  .shell { grid-template-columns: 250px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .shell { display: block; }
  .menu-toggle {
    display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--line);
    border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer;
  }
  .brand-sub, .install { display: none; }
  .sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0; width: min(320px, 86vw); max-height: none;
    background: var(--bg); border-right: 1px solid var(--line); padding: 16px; transform: translateX(-100%);
    transition: transform 0.2s ease; z-index: 15;
  }
  body.nav-open .sidebar { transform: none; box-shadow: 8px 0 32px rgb(0 0 0 / 0.18); }
  .content { padding-top: 20px; }
  h2 .anchor, h3 .anchor { display: none; }
}
