/* Tokens as in the Pulsar web app (DESIGN.md): graphite tinted toward the mark's
   sage, pale sage ink for the one primary action, sky for links and focus. */
:root {
  color-scheme: dark;
  --bg:       oklch(0.165 0.006 165);
  --deep:     oklch(0.130 0.006 165);
  --raised:   oklch(0.200 0.007 165);
  --raised-2: oklch(0.240 0.008 165);
  --line:     oklch(0.285 0.008 165);
  --line-2:   oklch(0.360 0.010 165);
  --ink:      oklch(0.940 0.010 170);
  --ink-2:    oklch(0.810 0.020 180);
  --muted:    oklch(0.700 0.012 170);
  --faint:    oklch(0.560 0.010 170);
  --sky:      oklch(0.740 0.110 237);
  --good:     oklch(0.800 0.100 160);
  --bad:      oklch(0.730 0.130 22);
  --r-panel: 10px;
  --r-ctl: 8px;
  --ui: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

header { display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 0 auto; padding: 16px; }
header .name { font-weight: 600; flex: 1; }
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 6px; }
h2 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 32px 0 8px; display: flex; align-items: center; gap: 8px; }
h2 .grow { flex: 1; }
.lede { color: var(--muted); margin: 0 0 24px; max-width: 520px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-2);
  background: var(--raised); color: var(--ink); white-space: nowrap; transition: background .15s ease-out; cursor: pointer; }
.btn:hover { background: var(--raised-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.btn.primary:hover { opacity: .9; background: var(--ink); }
.btn.big { padding: 10px 16px; font-size: 15px; }
.btn.quiet { background: none; border-color: transparent; color: var(--muted); padding: 6px 8px; }
.btn.quiet:hover { color: var(--ink); background: var(--raised-2); }
.btn.danger:hover { color: var(--bad); }

.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 8px; }
.hero .meta { color: var(--muted); font-size: 13px; }

.list { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-panel); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.row + .row { border-top: 1px solid var(--line); }
.row .what { flex: 1; min-width: 0; }
.row .what .n { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .what .d { color: var(--muted); font-size: 13px; }
.row.current { box-shadow: inset 2px 0 0 var(--ink-2); }
.empty { padding: 16px 14px; color: var(--muted); }
@media (max-width: 420px) { .row .btn .lbl { display: none; } .row .btn { padding: 7px 9px; } }

/* the admin drop zone */
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--r-panel); padding: 22px 16px; text-align: center; color: var(--muted);
  transition: border-color .15s ease-out, background .15s ease-out; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--ink-2); background: var(--raised); color: var(--ink-2); }
.drop b { color: var(--ink); font-weight: 500; }
.progress { height: 3px; background: var(--line); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.progress div { height: 100%; background: var(--ink-2); width: 0; transition: width .2s linear; }

/* forms */
.card { max-width: 360px; margin: 40px auto 0; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.input { width: 100%; padding: 9px 11px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--deep); }
.input:focus { border-color: var(--ink-2); outline: none; }
.err { color: var(--bad); font-size: 13px; min-height: 20px; margin: 4px 0 8px; }
.card .btn.primary { width: 100%; justify-content: center; padding: 10px; }
.link { background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 8px 10px; word-break: break-all; margin-top: 8px; }

details { border-top: 1px solid var(--line); padding: 10px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; align-items: center; gap: 8px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease-out; margin: 0 4px 0 2px; }
details[open] summary::before { transform: rotate(45deg); }
details ol { margin: 8px 0 4px; padding-left: 22px; color: var(--ink-2); }
details li + li { margin-top: 4px; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--raised-2); border-radius: 4px; padding: 1px 5px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--raised-2); border: 1px solid var(--line-2);
  border-radius: var(--r-ctl); padding: 8px 14px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .15s ease-out; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; }
#toast.bad { color: var(--bad); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.note { color: var(--muted); font-size: 13px; margin-top: 8px; }
.section { margin-top: 32px; }
.mt8 { margin-top: 8px; }
.narrow { max-width: 360px; margin-top: 10px; }
.check { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 400; }
.row.wrap { flex-wrap: wrap; }
.row.wrap .what { min-width: 220px; }
.select { padding: 6px 8px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--deep); color: var(--ink); }
