:root {
  color-scheme: light;
  --page: #f4f6f8;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #64748b;
  --line: #d8dee8;
  --line-strong: #c4ccd8;
  --accent: #0f766e;
  --accent-weak: #e8f4f1;
  --warn-weak: #fff7ed;
  --code: #eef2f7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.68;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topnav a,
.rail a {
  border-radius: 6px;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
}

.topnav a {
  padding: 7px 10px;
}

.topnav a.active,
.rail a.active {
  background: var(--accent-weak);
  color: var(--accent);
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 28px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
}

.rail {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.rail-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.rail a {
  display: block;
  padding: 9px 10px;
}

.rail-note {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.doc {
  min-width: 0;
}

.doc-hero {
  margin-bottom: 16px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-hero h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

.doc-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.doc-content {
  max-width: 1040px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.doc-content > h1:first-child {
  display: none;
}

.doc-content h1,
.doc-content h2,
.doc-content h3 {
  line-height: 1.32;
}

.doc-content h2 {
  margin: 46px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 23px;
}

.doc-content h3 {
  margin: 28px 0 10px;
  font-size: 18px;
}

.doc-content p,
.doc-content li {
  font-size: 15px;
}

.doc-image-link {
  display: block;
  width: 100%;
  margin: 18px 0 10px;
}

.doc-content img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.doc-content p:has(> .doc-image-link:only-child),
.doc-content p:has(> img:only-child) {
  margin: 26px 0 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}

table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 18px 0 28px;
  font-size: 14px;
}

thead, tbody, tr { width: 100%; }

th,
td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  vertical-align: top;
}

th {
  background: var(--accent-weak);
  color: #164e48;
  text-align: left;
  white-space: nowrap;
}

code {
  border-radius: 4px;
  background: var(--code);
  padding: 2px 5px;
  font-size: 0.92em;
}

ul,
ol {
  padding-left: 1.35rem;
}

.coverage table {
  max-width: none;
}

.screenshot-toolbar {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warn-weak);
  color: #7c2d12;
}

.screenshot-toolbar p {
  margin: 0;
}

.shot-grid {
  display: grid;
  gap: 18px;
}

.shot-card {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.shot-media {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f8fafc;
}

.shot-media img {
  display: block;
  width: 100%;
  height: 220px;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
}

.shot-body {
  position: relative;
  min-width: 0;
  padding-left: 44px;
}

.shot-id {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.shot-body h2 {
  margin: 0 0 10px;
  border: 0;
  padding: 0;
  font-size: 18px;
}

dl {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 7px 12px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

dd {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .shell {
    display: block;
    padding: 16px;
  }

  .rail {
    position: static;
    margin-bottom: 16px;
  }

  .doc-content,
  .doc-hero {
    padding: 22px;
  }

  .shot-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topnav {
    width: 100%;
    overflow-x: auto;
  }

  .doc-hero h1 {
    font-size: 24px;
  }

  .shot-body {
    padding-left: 0;
  }

  .shot-id {
    position: static;
    margin-bottom: 8px;
  }

  dl {
    grid-template-columns: 1fr;
  }
}
