/* Dashboard, sign-in and docs. Same palette and type as the marketing page (Coral). */
:root {
  --paper: oklch(100% 0 0);
  --cotton: oklch(98.4% 0.004 70);
  --ink: oklch(22% 0.011 40);
  --ink-hover: oklch(32% 0.012 40);
  --muted: oklch(48% 0.014 45);
  --rule: oklch(91% 0.008 60);
  --rule-strong: oklch(84% 0.01 60);
  --paid: oklch(62% 0.17 35);
  --paid-ink: oklch(48% 0.15 35);
  --paid-wash: oklch(96.5% 0.025 40);
  --ok: oklch(52% 0.12 150);
  --ok-wash: oklch(96% 0.03 150);
  --bad: oklch(50% 0.18 27);
  --bad-wash: oklch(96.5% 0.03 27);
  --radius: 8px;
  --font: "Albert Sans", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--font); }
::selection { background: var(--paid-wash); color: var(--ink); }
a { color: var(--ink); text-decoration-color: var(--paid); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--paid); outline-offset: 2px; }
code, pre, .mono { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--cotton); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; }
pre { background: oklch(22% 0.011 40); color: oklch(95% 0.006 70); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; line-height: 1.6; margin: 0 0 20px; }
pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 13px; }
h1 { text-wrap: balance; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
h2 { font-size: 18px; letter-spacing: -0.01em; margin: 32px 0 10px; }
h3 { font-size: 15px; margin: 24px 0 8px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* top bar */
.bar { display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 56px; border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 700; letter-spacing: -0.01em; text-decoration: none; font-size: 16px; }
.bar nav { display: flex; gap: 4px; margin-left: 8px; overflow-x: auto; }
.bar nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 6px; font-weight: 500; white-space: nowrap; }
.bar nav a:hover { color: var(--ink); background: var(--cotton); }
.bar nav a[aria-current="page"] { color: var(--ink); background: var(--cotton); }
.bar .end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.bar select { font: inherit; font-size: 13px; border: 1px solid var(--rule); border-radius: 6px; padding: 4px 6px; background: var(--paper); color: var(--ink); max-width: 160px; }

main.wrap { max-width: 960px; margin: 0 auto; padding: 32px 20px 80px; }
main.narrow { max-width: 420px; margin: 0 auto; padding: 56px 20px 80px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.head p { margin: 0; }

/* banners */
.banner { border-radius: var(--radius); padding: 12px 14px; margin: 0 0 20px; border: 1px solid var(--rule); background: var(--cotton); }
.banner.trial { background: var(--paid-wash); border-color: oklch(88% 0.05 40); }
.banner.bad { background: var(--bad-wash); border-color: oklch(86% 0.06 27); color: var(--bad); }
.banner.ok { background: var(--ok-wash); border-color: oklch(86% 0.05 150); }
.banner a { font-weight: 600; }

/* forms */
label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 6px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
input:disabled { background: var(--cotton); color: var(--muted); }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.row .field { flex: 1 1 200px; margin: 0; }
.err { color: var(--bad); font-weight: 500; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 14px; padding: 9px 14px; border-radius: var(--radius); border: 1px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--ink-hover); }
.btn.quiet { background: var(--paper); color: var(--ink); border-color: var(--rule-strong); }
.btn.quiet:hover { background: var(--cotton); }
.btn.danger { background: var(--paper); color: var(--bad); border-color: oklch(86% 0.06 27); }
.btn.danger:hover { background: var(--bad-wash); }
.btn.block { width: 100%; padding: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }
form.inline { display: inline; }

/* tables / lists */
.sheet { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin: 0 0 24px; background: var(--paper); }
.sheet + .sheet { margin-top: -8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: var(--cotton); flex-wrap: wrap; }
.sheet-head h2, .sheet-head h3 { margin: 0; font-size: 15px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 11px 16px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-size: 13px; }
td.actions { text-align: right; white-space: nowrap; }
td.actions form + form { margin-left: 6px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--cotton); border: 1px solid var(--rule); color: var(--muted); white-space: nowrap; }
.tag.live { background: var(--paid-wash); border-color: oklch(86% 0.06 40); color: var(--paid-ink); }
.tag.ok { background: var(--ok-wash); border-color: oklch(86% 0.05 150); color: var(--ok); }
.tag.off { text-decoration: line-through; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 24px; }
.card { border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; text-decoration: none; display: block; background: var(--paper); }
a.card:hover { border-color: var(--rule-strong); background: var(--cotton); }
.card h3 { margin: 0 0 4px; }
.card p { margin: 0; color: var(--muted); font-size: 13px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 24px; }
.steps li { counter-increment: step; position: relative; padding: 0 0 18px 40px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rule-strong); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.steps li.done::before { content: "✓"; background: var(--ink); color: #fff; border-color: var(--ink); }

.secret { display: flex; gap: 8px; align-items: center; background: var(--cotton); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; margin: 0 0 20px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* docs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; max-width: 1080px; margin: 0 auto; padding: 32px 20px 80px; }
.docs aside nav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
.docs aside p { font-size: 12px; font-weight: 600; color: var(--muted); margin: 16px 0 6px 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.docs aside a { text-decoration: none; color: var(--muted); padding: 5px 10px; border-radius: 6px; font-size: 14px; }
.docs aside a:hover { color: var(--ink); background: var(--cotton); }
.docs aside a[aria-current="page"] { color: var(--ink); background: var(--cotton); font-weight: 600; }
.docs article { max-width: 720px; }
.docs article h1 { font-size: 32px; margin-bottom: 12px; }
.docs article .lede { font-size: 17px; color: var(--muted); margin-bottom: 28px; }
.docs article h2 { font-size: 20px; margin-top: 40px; padding-top: 8px; }
.docs article ul, .docs article ol { padding-left: 20px; margin: 0 0 16px; }
.docs article li { margin-bottom: 6px; }
.docs article table { margin: 0 0 20px; border: 1px solid var(--rule); border-radius: var(--radius); }
.docs article td, .docs article th { padding: 8px 12px; }
.docs .next { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--rule); margin-top: 48px; padding-top: 20px; }
.note { border-left: 3px solid var(--paid); background: var(--paid-wash); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 20px; }

.kv dd { min-width: 0; overflow-wrap: anywhere; }
pre { max-width: 100%; }

@media (max-width: 760px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px 16px 64px; }
  .docs aside nav { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 8px; border-bottom: 1px solid var(--rule); }
  .docs aside a { white-space: nowrap; }
  .docs aside p { display: none; }
  .docs article table { display: block; overflow-x: auto; }
  /* Top bar: brand and account on the first row, the section links scroll on the second. */
  .bar { padding: 8px 16px 0; gap: 8px 12px; height: auto; flex-wrap: wrap; }
  .bar .brand { line-height: 36px; }
  .bar nav { order: 3; flex: 1 0 100%; margin: 0 -16px; padding: 0 12px 6px; }
  .bar .end { gap: 10px; }
  .bar .end .who { display: none; }
  main.wrap { padding: 24px 16px 64px; }
  main.narrow { padding-top: 40px; }
  td, th { padding-left: 12px; padding-right: 12px; }
  .hide-sm { display: none; }
  .sheet-head form.inline .btn { padding: 8px 10px; }
}

/* about */
main.page { max-width: 680px; margin: 0 auto; padding: 56px 20px 96px; }
.about h1 { font-size: 36px; line-height: 1.1; margin-bottom: 16px; }
.about .lede { font-size: 18px; color: var(--muted); margin-bottom: 32px; }
.about h2 { margin-top: 40px; }
.about p, .about li { font-size: 16px; }
.ruled-list { list-style: none; padding: 0; margin: 0 0 16px; border-top: 1px solid var(--rule); }
.ruled-list li { padding: 14px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.about-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 40px; }
.bar .end a.small { white-space: nowrap; }
@media (max-width: 760px) {
  main.page { padding: 32px 16px 64px; }
  .about h1 { font-size: 28px; }
}
.docs aside a .lock { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 0 6px; margin-left: 4px; }

/* monthly active users meter */
.meter { margin-top: 10px; }
.meter p { margin: 4px 0 0; }
.meter-bar { height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.meter.over .meter-bar span { background: var(--paid); }
