:root {
  --navy: #0f172a;
  --navy-ink: #0b1220;
  --paper: #f3efe6;
  --paper-2: #e9e3d4;
  --sidebar: #efe8d8;
  --ink: #1c1917;
  --muted: #57534e;
  --rule: #c4bba8;
  --rule-strong: #8a8274;
  --accent: #9a3412;
  --accent-2: #1e3a5f;
  --link: #1d4ed8;
  --code: #0b1220;
  --code-fg: #e2e8f0;
  --code-muted: #93c5fd;
  --ok: #3f6212;
  --header-fg: #e2e8f0;
  --current: #fbbf24;
  --main: 720px;
  --toc: 232px;
  --serif: "Iwanami Mincho", "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --sans: "IBM Plex Sans", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "Source Code Pro", Consolas, "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  color: #e2e8f0;
  background: #0f172a;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.8;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
  z-index: 30;
  font-family: var(--sans);
}

.skip:focus {
  left: 12px;
}

.site-header {
  background: var(--navy);
  color: var(--header-fg);
  border-bottom: 3px solid #1e293b;
}

.header-inner {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand svg {
  flex: 0 0 auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-family: var(--sans);
  font-size: 13px;
}

.site-nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a.is-current {
  color: #fff;
  border-bottom-color: var(--current);
}

.doc-rail {
  background: var(--navy-ink);
  color: #94a3b8;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-rail-inner {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 88px;
  display: grid;
  grid-template-columns: var(--toc) var(--main);
  column-gap: 48px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 16px;
  background: var(--sidebar);
  border: 1px solid var(--rule);
  padding: 16px 16px 18px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
}

.doc-toc p {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.doc-toc li {
  border-top: 1px dashed var(--rule);
}

.doc-toc li:first-child {
  border-top: 0;
}

.doc-toc a {
  display: block;
  padding: 8px 0;
  color: var(--ink);
  text-decoration: none;
}

.doc-toc a:hover {
  color: var(--accent);
}

.doc-main {
  max-width: var(--main);
  min-width: 0;
}

.doc-hero {
  padding-bottom: 28px;
  border-bottom: 2px solid #64748b;
  margin-bottom: 36px;
}

.kicker {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 16px;
  font-size: 30px;
  line-height: 1.35;
  font-weight: 700;
}

h2 {
  margin: 42px 0 14px;
  padding-top: 12px;
  border-top: 1px solid #64748b;
  font-size: 22px;
  line-height: 1.4;
}

h3 {
  margin: 22px 0 8px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
}

p {
  margin: 0 0 14px;
}

.lead {
  font-size: 18px;
}

.meta-table,
.spec-table,
.cmp-table,
.req-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0 0 18px;
  background: #fff8ee;
}

.meta-table th,
.meta-table td,
.spec-table th,
.spec-table td,
.cmp-table th,
.cmp-table td,
.req-table th,
.req-table td {
  border: 1px solid var(--rule);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.meta-table th,
.spec-table th,
.cmp-table th,
.req-table th {
  width: 28%;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  background: var(--paper-2);
  font-weight: 700;
}

.clause {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent-2);
  background: #fff8ee;
}

.clause strong {
  font-family: var(--sans);
}

.note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px dashed var(--rule-strong);
  background: #f6f1e3;
  font-size: 15px;
}

.case {
  margin: 0 0 16px;
  padding: 0 0 12px;
  border-bottom: 1px dotted var(--rule);
}

.case:last-of-type {
  border-bottom: 0;
}

.case .who {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

pre,
.code-panel {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--code);
  color: var(--code-fg);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  overflow-x: auto;
  border: 1px solid #1e293b;
}

pre code {
  font-family: inherit;
  color: inherit;
}

.cmd-hint {
  color: var(--code-muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
}

.btn:hover {
  background: #1e293b;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
}

.btn-ghost:hover {
  background: var(--paper-2);
  color: var(--navy);
}

.faq-list {
  margin: 0;
}

.faq-item {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #fff8ee;
  border: 1px solid var(--rule);
}

.faq-item dt {
  font-family: var(--sans);
  font-weight: 700;
  margin: 0 0 8px;
}

.faq-item dd {
  margin: 0;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

li {
  margin: 0 0 6px;
}

.stamp {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 2px 8px;
  margin-bottom: 10px;
}

.site-footer {
  background: var(--navy);
  color: #cbd5e1;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.7;
}

.footer-inner {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.site-footer a {
  color: #fde68a;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.foot-nav a {
  text-decoration: none;
}

.verify {
  margin: 0 0 10px;
  color: #e2e8f0;
}

.legal {
  margin: 0;
  color: #94a3b8;
}

@media (max-width: 960px) {
  .page {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }

  .doc-toc {
    position: static;
  }

  h1 {
    font-size: 26px;
  }

  .header-inner,
  .doc-rail-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

@media print {
  .site-header,
  .site-nav,
  .doc-toc,
  .skip,
  .cta-row,
  .doc-rail {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .page {
    display: block;
    width: auto;
    padding: 0;
  }

  .doc-main {
    max-width: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  pre {
    border: 1px solid #000;
    color: #000;
    background: #fff;
  }
}

.dl-stick {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #020617;
  border-bottom: 1px solid #334155;
  font-family: var(--sans);
}
.dl-stick-inner {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 52px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  color: #e2e8f0;
  font-size: 13px;
}
.dl-stick a {
  color: #0f172a;
  background: #fbbf24;
  text-decoration: none;
  padding: 6px 10px;
  font-weight: 700;
}
.dl-stick a:hover { background: #f59e0b; color: #0f172a; }
.dl-stick-meta { color: #94a3b8; }
.doc-main, .doc-toc, .page { color: #e2e8f0; }
.doc-toc { background: #111827; }
.doc-main { background: #1e293b; }
