﻿:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --sunken: #efede7;
  --ink: #1c1b18;
  --muted: #6d6a62;
  --faint: #9b978d;
  --line: #e2dfd7;
  --accent: #d9480f;
  --accent-hover: #bf3f0c;
  --accent-ink: #ffffff;
  --accent-soft: #fcebe2;
  --ok: #2b8a3e;
  --ok-soft: #e6f4ea;
  --danger: #c92a2a;
  --danger-soft: #fbe9e9;
  --shadow: 0 1px 2px rgba(28, 27, 24, .06), 0 8px 24px rgba(28, 27, 24, .08);
  --radius: 10px;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #121315;
  --surface: #1a1c1f;
  --sunken: #0e0f11;
  --ink: #ecebe7;
  --muted: #a09d95;
  --faint: #6f6d67;
  --line: #2b2e32;
  --accent: #ff7a3d;
  --accent-hover: #ff8f5c;
  --accent-ink: #1a0d05;
  --accent-soft: #37221a;
  --ok: #69db7c;
  --ok-soft: #17301d;
  --danger: #ff8787;
  --danger-soft: #3a1c1c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 15px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: inherit; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.ic { display: inline-flex; flex: none; }
.ic svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--faint); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
[data-theme="dark"] .btn.danger { color: #2a0b0b; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--sunken); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; height: 38px; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--sunken); color: var(--ink); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

.input, .select { width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.input:focus, .select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.input.mono { font-family: var(--mono); font-size: 12.5px; }
.select { padding-right: 6px; }
.select.sm, .input.sm { height: 34px; width: auto; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 13px; }
.field small { color: var(--muted); }
.form { display: grid; gap: 16px; }
.form-error { padding: 9px 12px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.choice { display: grid; gap: 8px; }
.choice label { display: flex; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice b { display: block; font-weight: 600; }
.choice small { color: var(--muted); }
input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.copy-row { display: flex; gap: 6px; align-items: center; }
.copy-row .input { flex: 1; min-width: 0; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-side { background: #1c1b18; color: #f4f2ec; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h1 { font-size: 38px; line-height: 1.12; letter-spacing: -.025em; max-width: 13em; }
.auth-side h1 em { font-style: normal; color: #ff7a3d; }
.auth-side ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; color: #c9c5ba; font-size: 15px; }
.auth-side li { display: flex; gap: 10px; align-items: center; }
.auth-side li .ic { color: #ff7a3d; }
.auth-side .foot { color: #8a867c; font-size: 13px; }
.auth-main { display: grid; place-items: center; padding: 32px; }
.auth-card { width: 100%; max-width: 360px; display: grid; gap: 22px; }
.auth-card .sub { color: var(--muted); margin-top: 6px; }
.auth-card .switch { color: var(--muted); text-align: center; }
.auth-card .switch a { color: var(--accent); font-weight: 600; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: #fff; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; min-width: 0; display: flex; flex-direction: column; padding: 18px 12px 12px; border-right: 1px solid var(--line); background: var(--sunken); }
.sidebar .brand { padding: 2px 8px 18px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 550; }
.nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.nav a.active { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.nav a.active .ic { color: var(--accent); }
.nav-label { margin: 16px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.side-foot { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.meter-card { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 8px; font-size: 12.5px; }
.meter-card b { font-size: 13px; }
.meter-card { min-width: 0; }
.meter-card > b, .meter-card > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { height: 6px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); min-width: 2px; }
.meter.warn > i { background: var(--danger); }
.user-row { display: flex; align-items: center; gap: 8px; padding: 4px 2px 0 6px; min-width: 0; }
.user-row .icon-btn { flex: none; }
.user-row .who { flex: 1; min-width: 0; text-decoration: none; }
.user-row .who b, .user-row .who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .who span { color: var(--muted); font-size: 12px; }
.main { min-width: 0; padding: 28px 36px 80px; }
.page { max-width: 1180px; margin: 0 auto; display: grid; gap: 22px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; max-width: 62ch; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0 8px; }
  .nav { display: flex; flex-wrap: wrap; }
  .nav-label, .meter-card { display: none; }
  .side-foot { margin: 0 0 0 auto; }
  .main { padding: 18px 14px 80px; }
}

/* ---------- cards, stats, tables ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-body { padding: 16px; display: grid; gap: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { padding: 16px; display: grid; gap: 6px; }
.stat .label { color: var(--muted); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat .value { font-size: 26px; font-weight: 680; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .hint { color: var(--muted); font-size: 12.5px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }
.kv { display: grid; gap: 12px; }
.kv .k { font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 4px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 650; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: color-mix(in srgb, var(--ink) 3.5%, transparent); }
tbody tr.sel { background: var(--accent-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.tight, th.tight { width: 1%; white-space: nowrap; }
td.nowrap { white-space: nowrap; color: var(--muted); }
.name-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.name-cell .nm { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.name-cell a.nm { text-decoration: none; }
.name-cell a.nm:hover { text-decoration: underline; }
.thumb { width: 30px; height: 30px; border-radius: 6px; background: var(--sunken); display: grid; place-items: center; color: var(--muted); overflow: hidden; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.folder { color: var(--accent); background: var(--accent-soft); }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--sunken); color: var(--muted); white-space: nowrap; }
.badge.public { background: var(--ok-soft); color: var(--ok); }
.badge.admin { background: var(--accent-soft); color: var(--accent); }
.badge.off { background: var(--danger-soft); color: var(--danger); }

.empty { padding: 56px 20px; display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--muted); }
.empty .ic { color: var(--faint); }
.empty b { color: var(--ink); font-size: 15px; }
.empty p { max-width: 44ch; }

/* ---------- browser ---------- */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.crumbs a { text-decoration: none; color: var(--muted); padding: 0 2px; border-radius: 5px; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--faint); font-weight: 400; }
.crumbs .cur { padding: 0 2px; }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 180px; max-width: 340px; }
.search .ic { position: absolute; left: 10px; top: 9px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: 32px; height: 34px; }
.toolbar .spacer { flex: 1; }
.dropzone { position: relative; }
.dropzone.over::after { content: "Drop to upload here"; position: absolute; inset: 0; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: var(--radius); background: color-mix(in srgb, var(--accent-soft) 88%, transparent); color: var(--accent); font-weight: 650; font-size: 16px; z-index: 3; }
.more { padding: 12px; text-align: center; border-top: 1px solid var(--line); }

/* ---------- drawer ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(15, 14, 12, .35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow); z-index: 41; display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 18px; align-content: start; }
.preview { border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunken); min-height: 160px; max-height: 340px; display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.preview img, .preview video { max-width: 100%; max-height: 338px; display: block; }
.preview audio { width: calc(100% - 24px); }
.preview iframe { width: 100%; height: 338px; border: 0; background: #fff; }
.preview pre { margin: 0; padding: 12px; width: 100%; max-height: 338px; overflow: auto; font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--ink); align-self: start; }
.preview .none { display: grid; justify-items: center; gap: 8px; padding: 24px; }
.props { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; word-break: break-all; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 14, 12, .45); display: grid; place-items: center; padding: 20px; z-index: 60; }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.modal.wide { max-width: 600px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 0 20px; }
.modal-body { padding: 14px 20px 20px; display: grid; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; }
.callout { padding: 11px 13px; border-radius: 9px; background: var(--accent-soft); color: var(--ink); font-size: 13px; display: flex; gap: 9px; }
.callout .ic { color: var(--accent); margin-top: 2px; }
.callout.danger { background: var(--danger-soft); }
.callout.danger .ic { color: var(--danger); }

/* ---------- uploads ---------- */
.uploads { position: fixed; right: 20px; bottom: 20px; width: min(360px, calc(100vw - 40px)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 30; overflow: hidden; }
.uploads-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--line); font-weight: 650; }
.uploads-list { max-height: 260px; overflow-y: auto; }
.up { padding: 9px 14px; display: grid; gap: 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
.up:last-child { border-bottom: 0; }
.up-top { display: flex; justify-content: space-between; gap: 10px; }
.up-top .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-top .s { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.up.err .s { color: var(--danger); white-space: normal; text-align: right; }
.up.done .s { color: var(--ok); }
.up .meter { height: 4px; }

/* ---------- docs ---------- */
.code { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunken); }
.code pre { margin: 0; padding: 14px 44px 14px 14px; overflow-x: auto; font: 12.5px/1.6 var(--mono); }
.code .icon-btn { position: absolute; top: 6px; right: 6px; }
.doc-section { display: grid; gap: 10px; }
.doc-section p { color: var(--muted); max-width: 76ch; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 9px 12px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 90; justify-items: center; pointer-events: none; }
.toast { padding: 9px 14px; border-radius: 9px; background: #1c1b18; color: #f4f2ec; font-weight: 550; box-shadow: var(--shadow); max-width: 80vw; }
[data-theme="dark"] .toast { background: #ecebe7; color: #1c1b18; }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- bucket settings, versions ---------- */
.modal.wide { max-width: 680px; }
.textarea { width: 100%; min-height: 230px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: 12.5px/1.55 var(--mono); resize: vertical; }
.textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.textarea.short { min-height: 64px; }
.rule { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.rule-head { display: flex; align-items: center; gap: 10px; }
.rule-head .input { flex: 1; }
.rule-row { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; font-size: 13px; }
.rule .rule-row > span:first-child { min-width: 172px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check small { color: var(--muted); }
.versions { display: grid; border: 1px solid var(--line); border-radius: 9px; }
.version { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.version:last-child { border-bottom: 0; }
.modal .tabs { overflow-x: auto; overflow-y: hidden; padding-bottom: 1px; }
.modal .tabs button { white-space: nowrap; }

/* ---------- API playground ---------- */
.pg { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 4px; }
@media (max-width: 1000px) { .pg { grid-template-columns: 1fr; } .pg-list { position: static !important; max-height: 280px !important; } }
.pg-list { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 6px; }
.pg-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding: 12px 8px 4px; }
.pg-item { display: flex; gap: 8px; align-items: center; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 7px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; }
.pg-item:hover { background: var(--sunken); }
.pg-item.active { background: var(--accent-soft); }
.pg-main { display: grid; gap: 14px; min-width: 0; }
.mth { display: inline-block; min-width: 50px; font: 700 11px/1.4 var(--mono); letter-spacing: .02em; color: var(--muted); }
.mth.GET { color: var(--ok); }
.mth.POST { color: var(--accent); }
.mth.PUT { color: #1c7ed6; }
.mth.PATCH { color: #ae3ec9; }
.mth.DELETE { color: var(--danger); }
[data-theme="dark"] .mth.PUT { color: #74c0fc; }
[data-theme="dark"] .mth.PATCH { color: #e599f7; }
.pg-url { display: flex; gap: 6px; align-items: baseline; padding: 9px 11px; background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; font: 12.5px/1.5 var(--mono); overflow-x: auto; white-space: nowrap; }
.pg-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; justify-self: start; }
.seg button { border: 0; background: var(--surface); padding: 7px 12px; font: inherit; font-weight: 550; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { background: var(--accent-soft); color: var(--ink); }
.pg-details > summary { cursor: pointer; font-weight: 600; color: var(--muted); font-size: 13px; }
.pg-details > summary.card-head { color: var(--ink); }
.pg-details[open] > summary { margin-bottom: 8px; }
.pg-details > summary.card-head { margin-bottom: 0; }
.pg-details > .textarea { margin-top: 6px; }
.res-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.code.tall pre { max-height: 480px; overflow: auto; }
.pg-img { max-width: 100%; max-height: 380px; border-radius: 8px; border: 1px solid var(--line); justify-self: start; }
.pg-headers td { padding: 5px 10px; font-size: 12px; word-break: break-all; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.callout.good { background: var(--ok-soft); }
.callout.good .ic { color: var(--ok); }
.st-table td { vertical-align: top; }
.st-group td { background: var(--sunken); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 7px 12px; }
.st-detail { font-size: 12.5px; margin-top: 2px; }
.st-detail.st-err { color: var(--danger); }
.st-calls { margin-top: 6px; }
.st-calls > summary { font-size: 12px; font-weight: 550; }
.st-call-list { display: grid; gap: 4px; }
.st-call { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.st-path { word-break: break-all; }
.card.pg-details:not([open]) > summary.card-head { border-bottom: 0; }

/* ---------- public pages (signed out) ---------- */
.pub { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 28px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.topbar .spacer { flex: 1; }
.topnav { display: flex; gap: 2px; margin-left: 12px; flex-wrap: wrap; }
.topnav a { padding: 7px 11px; border-radius: 7px; color: var(--muted); font-weight: 550; text-decoration: none; }
.topnav a:hover { color: var(--ink); background: var(--sunken); }
.topnav a.active { color: var(--ink); background: var(--sunken); }
.pub-main { flex: 1; }
@media (max-width: 700px) { .topbar { padding: 10px 14px; } .topnav { margin-left: 0; order: 9; width: 100%; } }
.btn.lg { height: 42px; padding: 0 18px; font-size: 15px; }
.landing { gap: 40px; }
.hero { display: grid; gap: 18px; padding: 36px 0 4px; max-width: 800px; }
.hero .eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.06; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero > p { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 62ch; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.endpoints { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.land-section { display: grid; gap: 16px; }
.section-title { font-size: 22px; letter-spacing: -.02em; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.feature { padding: 18px; display: grid; gap: 8px; align-content: start; }
.feature-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.feature h3, .step h3 { font-size: 15px; }
.feature p, .step p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.step { padding: 18px; display: grid; gap: 8px; min-width: 0; }
.step-n { width: 26px; height: 26px; border-radius: 99px; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.docs-links { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.doc-link { display: flex; gap: 14px; padding: 18px; color: inherit; text-decoration: none; align-items: flex-start; }
.doc-link:hover { border-color: var(--accent); }
.doc-link > .ic { color: var(--accent); margin-top: 2px; }
.doc-link p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.land-foot { color: var(--muted); font-size: 13px; padding: 20px 0 0; border-top: 1px solid var(--line); }
.land-foot a { color: inherit; }
.auth-links { display: flex; gap: 14px; justify-content: center; font-size: 13px; }
.auth-links a { font-weight: 550 !important; }
.pg-lock { margin-left: auto; color: var(--faint); display: inline-flex; }
.pg-keybox { display: grid; gap: 6px; }
.pg-keybox > small { font-size: 12.5px; }
/* keep code samples inside their card: grid items must be allowed to shrink */
.step > *, .feature > * { min-width: 0; }
.step .code pre { white-space: pre-wrap; word-break: break-all; }
