/* Docs wiki. Same tokens as the viewer and the operations page. */
:root {
  --bg: #0f1720;
  --card: #141e29;
  --line: rgba(255, 255, 255, 0.09);
  --text: #e8eef3;
  --text-2: #c3cdd6;
  --muted: #94a3b2;
  --accent: #57c7a5;
  --live: #4cc38a;
  --pending: #fab219;
  --design: #7aa7ff;
  --radius: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
pre { background: #0b1118; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
pre code { background: none; padding: 0; font-size: 12.5px; line-height: 1.5; overflow-wrap: normal; }

.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px; background: rgba(15,23,32,.94); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); flex: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M4 26V12l12-7 12 7v14h-6v-8H10v8z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M4 26V12l12-7 12 7v14h-6v-8H10v8z'/%3E%3C/svg%3E") center/contain no-repeat; }
.brand b { font-size: 16px; font-weight: 600; }
.brand span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 5px 10px; border-radius: 999px; font-size: 12.5px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; white-space: nowrap; }
.pill:hover { border-color: var(--accent); }

.layout { max-width: 1180px; margin: 0 auto; padding: 16px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
nav.side { position: sticky; top: 76px; align-self: start; }
nav.side ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
nav.side a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 14px; }
nav.side a:hover { background: var(--card); color: var(--text); }
nav.side a[aria-current="page"] { background: var(--card); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  nav.side { position: static; }
  nav.side ol { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  nav.side a { white-space: nowrap; background: var(--card); border: 1px solid var(--line); font-size: 13px; }
}

article { min-width: 0; max-width: 820px; }
article h1 { font-size: 30px; line-height: 1.2; margin: 6px 0 10px; letter-spacing: -0.01em; }
article h2 { font-size: 20px; margin: 34px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); }
article h3 { font-size: 16px; margin: 22px 0 6px; }
article p, article li { color: var(--text-2); }
article strong { color: var(--text); }
.lede { font-size: 17px; color: var(--text); max-width: 68ch; }

.note { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--card); border-radius: 10px; padding: 10px 14px; margin: 16px 0; }
.note p { margin: 4px 0; }
.note.warn { border-left-color: var(--pending); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; background: rgba(255,255,255,.02); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.total td { color: var(--text); font-weight: 600; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid currentColor; }
.tag.live { color: var(--live); }
.tag.pending { color: var(--pending); }
.tag.design { color: var(--design); }

.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 16px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tile .label { color: var(--muted); font-size: 12.5px; }
.tile .value { font-size: 24px; font-weight: 600; margin-top: 2px; }
.tile .meta { color: var(--muted); font-size: 12.5px; }

.steps { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 16px 0; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.step b { display: block; color: var(--text); }
.step span { color: var(--muted); font-size: 13.5px; }

figure { margin: 16px 0; }
figure img { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
figure.photo img { background: none; }
figcaption { color: var(--muted); font-size: 13px; margin-top: 6px; }
.two { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 700px) { .two { grid-template-columns: minmax(0, 1fr); } }

footer.page { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 12px; }
