
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --white: #ffffff; --surface: #f6f7f9; --text: #17212e; --muted: #576474; --line: #e0e5eb;
  --blue: #175ec9; --blue-hover: #124ea8; --blue-tint: #edf3fc;
  --ok: #1a7f4b; --warn: #8a5300; --err: #b42318;
  --radius: 4px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font: 16px/1.6 var(--font); overflow-x: hidden; }
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); letter-spacing: -0.025em; margin: 0 0 16px; }
h2 { font-size: 1.3rem; margin: 0 0 8px; }
h3 { font-size: 1rem; margin: 0 0 4px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.label { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mt { margin-top: 12px; } .mt2 { margin-top: 24px; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 340px; height: auto; display: block; }
.brand .label { border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 6px; }
.nav { display: flex; gap: 20px; font-size: .9rem; }
.nav a { color: var(--muted); } .nav a:hover { color: var(--text); text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 20px 0 32px; color: var(--muted); font-size: .85rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer a { color: var(--muted); }

/* focused signup */
.focus { max-width: 440px; margin: 56px auto 0; }
.focus .title { font-size: 1.6rem; margin-bottom: 6px; }
.focus details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }

/* panels, forms, buttons */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel.subtle { background: var(--surface); }
label { display: block; font-weight: 600; font-size: .875rem; margin: 14px 0 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type=email], input[type=text], input[type=password] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--text); font: inherit; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .875rem; color: var(--muted); }
label.check input { margin-top: 4px; width: 15px; height: 15px; accent-color: var(--blue); flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: .95rem; font-weight: 600; padding: 10px 16px; border-radius: var(--radius); border: 1px solid var(--blue); background: var(--blue); color: #fff; cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); text-decoration: none; }
.btn.block { width: 100%; margin-top: 18px; }
.btn.secondary { background: var(--white); color: var(--text); border-color: var(--line); font-weight: 500; }
.btn.secondary:hover { border-color: var(--muted); }
.btn.small { padding: 6px 10px; font-size: .85rem; }
.btn.danger { background: var(--white); color: var(--err); border-color: var(--line); font-weight: 500; padding: 6px 10px; font-size: .85rem; }
.btn.danger:hover { border-color: var(--err); }
.btn:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--err); font-weight: 600; min-height: 1.2em; margin: 12px 0 0; font-size: .875rem; }
.warn { color: var(--warn); font-weight: 600; }
.notice { border: 1px solid var(--line); border-left: 3px solid var(--warn); background: var(--surface); padding: 10px 12px; border-radius: var(--radius); font-size: .9rem; }
.usercode { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 28px; letter-spacing: 4px; font-weight: 600; }

/* code */
pre, code, .mono { font-family: var(--mono); }
.code { position: relative; margin: 8px 0 12px; }
.code pre { margin: 0; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; padding-right: 76px; font-size: .82rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.code .copy { position: absolute; top: 7px; right: 7px; background: var(--white); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: .75rem; padding: 3px 9px; cursor: pointer; }
.code .copy:hover { border-color: var(--blue); color: var(--blue); }


/* onboarding: sidebar + article */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-top: 40px; }
.sidebar { position: sticky; top: 24px; align-self: start; font-size: .9rem; }
.sidebar ol { list-style: none; padding: 0; margin: 8px 0 24px; border-left: 1px solid var(--line); }
.sidebar li a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); }
.sidebar li a:hover { color: var(--text); text-decoration: none; }
.sidebar li.on a { color: var(--text); border-left-color: var(--blue); }
.sidebar li.on a::after { content: " ✓"; color: var(--ok); }
.sidebar .links a { display: block; padding: 3px 0; }
.article { max-width: 760px; }
.article section { border-top: 1px solid var(--line); padding: 28px 0; }
.article section:first-of-type { border-top: 0; padding-top: 0; }
.secret { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .875rem; }
.secret th { text-align: left; font-weight: 500; color: var(--muted); width: 120px; padding: 8px 12px 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
.secret td { font-family: var(--mono); font-size: .82rem; padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.secret tr:last-child th, .secret tr:last-child td { border-bottom: 1px solid var(--line); }
.picker { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; margin-top: 12px; }
.clients { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); align-self: start; }
.chip { font: inherit; font-size: .9rem; text-align: left; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--white); color: var(--text); cursor: pointer; }
.chip:last-child { border-bottom: 0; }
.chip:hover { background: var(--surface); }
.chip[aria-selected=true] { background: var(--blue-tint); color: var(--blue); font-weight: 600; box-shadow: inset 2px 0 0 var(--blue); }
.chip.off { color: var(--muted); cursor: default; font-size: .82rem; }
.chip.off:hover { background: var(--white); }
.client-panel ol { padding-left: 20px; margin: 0; } .client-panel li { margin: 0 0 10px; }
.badge { display: inline-block; font-family: var(--mono); font-size: .72rem; padding: 0 6px; border-radius: var(--radius); border: 1px solid var(--line); color: var(--muted); }
.badge.ok { color: var(--ok); border-color: #b7dcc6; }
.badge.suspended { color: var(--err); border-color: #f0c2bd; }
details summary { cursor: pointer; color: var(--muted); font-size: .9rem; margin-top: 8px; }

/* admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); margin: 16px 0; }
.stat { padding: 12px 14px; font-size: .8rem; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.stat b { display: block; font-size: 1.35rem; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { border-collapse: collapse; width: 100%; font-size: .85rem; }
table.data th, table.data td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
table.data th { background: var(--surface); font-weight: 600; font-size: .78rem; color: var(--muted); }
table.data tr:last-child td { border-bottom: 0; }
td.actions { display: flex; gap: 6px; }
input.filter { width: 260px; padding: 7px 10px; font-size: .9rem; }
.between { justify-content: space-between; }

@media (max-width: 960px) {
  .docs { grid-template-columns: 1fr; gap: 16px; }
  .sidebar { position: static; }
  .sidebar ol { display: flex; flex-wrap: wrap; border-left: 0; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
  .sidebar li a { border-left: 0; border-bottom: 2px solid transparent; padding: 6px 12px 6px 0; margin: 0 0 -1px; }
  .sidebar li.on a { border-bottom-color: var(--blue); }
  .sidebar .links { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .brand img { width: 280px; }
  .panel { padding: 18px; }
  .picker { grid-template-columns: 1fr; gap: 12px; }
  .clients { flex-direction: row; flex-wrap: wrap; border: 0; gap: 6px; }
  .chip, .chip:last-child { border: 1px solid var(--line); border-radius: var(--radius); }
  .chip[aria-selected=true] { box-shadow: none; border-color: var(--blue); }
  .secret th { width: 90px; }
  input.filter { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
