:root {
  --ink: #18212f;
  --muted: #5b6878;
  --line: #d8e0e8;
  --paper: #ffffff;
  --canvas: #f5f7fa;
  --navy: #12304d;
  --teal: #087f76;
  --teal-soft: #e9f6f3;
  --gold: #b7791f;
  --gold-soft: #fff8e8;
  --danger: #af3030;
  --code: #122331;
  --max: 1120px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }

img { max-width: 100%; }

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }

.nav a {
  color: var(--muted);
  padding: 7px 9px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
}

.nav a[aria-current="page"], .nav a:hover { background: var(--teal-soft); color: var(--teal); }

.doc-main { padding: 38px 0 54px; }

.breadcrumb { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.7fr);
  gap: 38px;
  align-items: center;
  padding: 20px 0 46px;
  border-bottom: 1px solid var(--line);
}

.eyebrow { color: var(--teal); font-size: 14px; font-weight: 700; margin: 0 0 10px; }

h1, h2, h3 { color: var(--navy); line-height: 1.26; letter-spacing: 0; }
h1 { margin: 0; font-size: 40px; }
h2 { margin: 0 0 16px; font-size: 26px; }
h3 { margin: 0 0 8px; font-size: 18px; }

.lede { max-width: 680px; margin: 18px 0 0; color: #3d4a5a; font-size: 18px; }

.hero-visual {
  min-height: 220px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-visual img { width: 148px; max-height: 80px; object-fit: contain; object-position: left center; }
.hero-visual p { color: var(--muted); font-size: 14px; margin: 20px 0 0; }

.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--teal);
  border-radius: 4px;
  background: var(--teal);
  color: #fff;
  font-weight: 680;
  text-decoration: none;
}

.button:hover { background: #066960; color: #fff; }
.button.secondary { background: var(--paper); color: var(--teal); }
.button.secondary:hover { background: var(--teal-soft); }

.section { padding: 42px 0 0; }
.section > p { max-width: 760px; color: #425064; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tile {
  display: block;
  min-height: 164px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.tile:hover { border-color: var(--teal); box-shadow: 0 5px 14px rgba(18, 48, 77, 0.08); color: var(--ink); }
.tile p { margin: 0; color: var(--muted); font-size: 14px; }
.tile .kicker { color: var(--teal); font-size: 13px; font-weight: 700; margin-bottom: 8px; }

.layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 34px; align-items: start; }

.side-nav {
  position: sticky;
  top: 20px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.side-nav strong { display: block; margin-bottom: 8px; font-size: 14px; }
.side-nav a { display: block; padding: 5px 0; color: var(--muted); font-size: 14px; text-decoration: none; }
.side-nav a:hover { color: var(--teal); }

.article {
  padding: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.article h1 { font-size: 34px; margin-bottom: 14px; }
.article h2 { margin-top: 36px; }
.article h3 { margin-top: 22px; }
.article p, .article li { color: #3d4a5a; }
.article ul, .article ol { padding-left: 22px; }

.callout {
  margin: 24px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
  color: #174b47;
}

.callout.warn { border-left-color: var(--gold); background: var(--gold-soft); color: #745018; }
.callout.danger { border-left-color: var(--danger); background: #fff0f0; color: #7c2929; }

pre {
  overflow-x: auto;
  margin: 18px 0;
  padding: 18px;
  border-radius: 5px;
  background: var(--code);
  color: #e7eef4;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
p code, li code, td code { padding: 1px 4px; background: #eef2f6; border-radius: 3px; color: #243b53; }

table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--navy); background: #f7fafc; }

.footer { border-top: 1px solid var(--line); background: var(--paper); padding: 24px 0; color: var(--muted); font-size: 14px; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer p { margin: 0; }

@media (max-width: 760px) {
  .shell { width: min(var(--max), calc(100% - 28px)); }
  .topbar { align-items: flex-start; flex-direction: column; padding: 15px 0; gap: 10px; }
  .nav { justify-content: flex-start; }
  .hero, .layout { grid-template-columns: 1fr; gap: 22px; }
  .grid, .grid.two { grid-template-columns: 1fr; }
  .side-nav { position: static; }
  h1, .article h1 { font-size: 30px; }
  .article { padding: 22px; }
}
