/* Plus Jakarta Sans (SIL Open Font License), bundled locally */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #07120e; --surface: #0d1a15; --raised: #13241d; --line: #1e3a2f;
  --accent: #34d399; --accent-hover: #6ee7b7; --on-accent: #022c22;
  --text: #e8f2ee; --muted: #8fa89c; --danger: #f08a8a; --ok: #86efac; --r: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/24px 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
svg { display: block; flex: none; }
[hidden] { display: none !important; }

.nav { display: flex; align-items: center; justify-content: space-between; max-width: 960px; height: 64px; margin: 0 auto; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.brand svg { width: 22px; height: 22px; color: var(--accent); }
.nav-links { display: flex; gap: 8px; }

.page { max-width: 440px; margin: 0 auto; padding: 48px 24px 64px; }
.page.wide { max-width: 640px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.logo { width: 56px; height: 56px; color: var(--accent); }
h1 { margin-top: 16px; font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -.2px; }
h2 { font-size: 16px; line-height: 24px; font-weight: 600; }
.sub { margin-top: 8px; color: var(--muted); }
div.actions { display: flex; justify-content: center; gap: 12px; margin-top: 32px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--raised); }
.btn.primary { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn svg { width: 18px; height: 18px; }

.card { margin-top: 32px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { display: flex; justify-content: space-between; font-size: 13px; line-height: 16px; color: var(--muted); }
.field label em { font-style: normal; font-weight: 600; }
.control { position: relative; }
input { display: block; width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--text); font: inherit; outline: none; }
input:focus { border-color: var(--accent); }
input::placeholder { color: #5b7a6d; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.control.a1 input { padding-right: 48px; }
.lockprint { position: absolute; top: 10px; right: 12px; width: 24px; height: 24px; opacity: 0; transition: opacity .15s; }
.lockprint.on { opacity: 1; }
.meter { position: absolute; left: 1px; right: 1px; bottom: 1px; height: 2px; border-radius: 0 0 var(--r) var(--r); overflow: hidden; pointer-events: none; }
.meter::after { content: ""; display: block; height: 100%; width: var(--w, 0); background: var(--c, transparent); transition: width .2s; }
.note { color: var(--muted); font-size: 13px; line-height: 20px; }
.error { color: var(--danger); font-size: 13px; line-height: 20px; }
.error:empty { display: none; }

.steps { counter-reset: step; display: flex; flex-direction: column; gap: 16px; list-style: none; }
.steps li { position: relative; padding-left: 40px; color: var(--muted); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--raised); color: var(--accent); font-size: 13px; font-weight: 700; }
.steps b, .steps code { color: var(--text); }
code { padding: 1px 6px; border-radius: 4px; background: var(--raised); font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.meta { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }

.status { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); font-size: 13px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.ok .dot { background: var(--ok); }
.status.down .dot { background: var(--danger); }
.done { text-align: center; }
.done svg.check { width: 48px; height: 48px; margin: 0 auto; color: var(--ok); }

@media (max-width: 480px) {
  div.actions { flex-direction: column; }
  .nav-links .btn:not(.primary) { display: none; }
}
.card h2 + .steps { margin-top: 16px; }

.prose h1 { margin-top: 0; }
.prose h2 { margin-top: 32px; }
.prose p, .prose li { margin-top: 8px; color: var(--muted); }
.prose ul { padding-left: 20px; }
.prose b { color: var(--text); }
.prose a { color: var(--accent); }
.footer { display: flex; justify-content: center; gap: 24px; padding: 24px; color: var(--muted); font-size: 13px; }
.footer a { color: var(--muted); }
.link-muted { color: var(--muted); font-size: 14px; }

/* download page */
.cmd-box { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.cmd-box code { flex: 1; min-width: 0; padding: 0; background: none; overflow-x: auto; white-space: nowrap; }
.note-line { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 22px; }
.note-line b { color: var(--text); }
.card[hidden] { display: none; }

/* QR test page */
.qr-demo img { display: block; margin: 0 auto 24px; padding: 8px; border-radius: 12px; background: #fff; }
.qr-demo h2 { margin-bottom: 16px; }
.qr-demo .spaced-h { margin-top: 28px; }

/* ---- Look: King of Names' shapes and type in Emerald's colors ----
   Soft color washes behind everything, frosted-glass surfaces, 14px corners,
   roomy fields, lighter and larger headings, a letter-spaced wordmark. */
:root {
  --r: 14px; --r-sm: 10px;
  --input: #2b4c40; --glass: rgba(22, 24, 29, .55); --glass-strong: rgba(22, 24, 29, .78);
  --glass-edge: rgba(255, 255, 255, .07); --blur: blur(30px) saturate(1.2);
  --elevation: inset 0 0 0 1px var(--glass-edge), 0 6px 24px rgba(0, 0, 0, .28);
}
body {
  background:
    radial-gradient(1000px 640px at 88% -12%, rgba(52, 211, 153, .13), transparent 62%),
    radial-gradient(760px 560px at -8% 108%, rgba(110, 231, 183, .08), transparent 60%),
    radial-gradient(600px 420px at 40% 120%, rgba(30, 90, 120, .10), transparent 60%),
    var(--bg);
  font-size: 16px;
}
h1 { font-size: 42px; line-height: 1.05; font-weight: 500; letter-spacing: -.02em; }
h2 { font-weight: 600; letter-spacing: -.01em; }
.sub { font-size: 17px; line-height: 28px; }

.brand, .wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; text-decoration: none; }
.brand svg, .wordmark svg { width: 20px; height: 20px; color: var(--accent); }

input, textarea, select { border-color: var(--input); background: rgba(14, 15, 18, .5); }
input { height: 48px; border-radius: var(--r); font-size: 16px; }
input::placeholder { color: #6f737c; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52, 211, 153, .14); }
.field label { color: var(--text); font-size: 14px; line-height: 20px; font-weight: 500; }
.btn { height: 48px; border-radius: var(--r); border-color: var(--input); background: rgba(22, 24, 29, .5); }
.btn.small { height: 36px; border-radius: var(--r-sm); }
.btn.primary { font-size: 16px; }

.card { border-color: var(--line); border-radius: var(--r); background: var(--glass); box-shadow: var(--elevation); }
.status { border-radius: 999px; background: var(--glass); }

/* sign-in: one left-aligned column, no box around the form */
.auth { width: 100%; max-width: 392px; margin: 0 auto; padding: 48px 24px 64px; }
.auth .wordmark { margin-bottom: 48px; }
.auth h1 { margin-top: 0; }
.auth .sub { margin-top: 12px; }
.auth form { margin-top: 40px; }
.auth form h2 { font-size: 22px; line-height: 28px; }
.auth input { height: 52px; font-size: 17px; }
.auth .btn.primary { height: 52px; margin-top: 8px; font-size: 17px; }
.auth .link-btn { align-self: flex-start; color: var(--text); font-size: 15px; }
.auth .link-btn:hover { color: var(--accent); }
.auth-foot { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; line-height: 24px; }
.auth-foot a { color: var(--text); font-weight: 500; text-decoration: none; }
.auth-foot a:hover { color: var(--accent); }
@media (max-width: 480px) { .auth { padding-top: 40px; } .auth .wordmark { margin-bottom: 40px; } h1 { font-size: 38px; } }
.nowrap { white-space: nowrap; }
.done-auth .sub { margin-top: 12px; }
.wide-btn { width: 100%; height: 52px; margin-top: 32px; font-size: 17px; }
.auth .control.a1 input { padding-right: 48px; }
.auth .lockprint { top: 14px; }

/* ---- Palette: King of Names' dark neutrals (#0E0F12), emerald kept as the accent ----
   Buttons match King of Names: light primary, outlined secondary, round glass icons. */
:root {
  --bg: #0e0f12; --surface: #16181d; --raised: #1f2228; --line: rgba(255, 255, 255, .1);
  --text: #f2f3f5; --muted: #a7abb4; --input: #7d818b;
  --glass: rgba(255, 255, 255, .06); --glass-strong: rgba(26, 28, 33, .9); --glass-edge: rgba(255, 255, 255, .08);
  --elevation: inset 0 0 0 1px var(--glass-edge), 0 10px 30px rgba(0, 0, 0, .4);
  --primary: #f2f3f5; --on-primary: #16181d;
}
body {
  background:
    radial-gradient(1000px 640px at 88% -12%, rgba(52, 211, 153, .06), transparent 62%),
    radial-gradient(760px 560px at -8% 108%, rgba(255, 255, 255, .03), transparent 60%),
    var(--bg);
}
input, textarea, select { border-color: var(--input); background: rgba(255, 255, 255, .06); }
.btn { border: 1px solid var(--input); background: transparent; color: var(--text); font-weight: 600; }
.btn:hover { background: rgba(255, 255, 255, .06); }
.btn.primary { border-color: transparent; background: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: #ffffff; }
.btn.primary:disabled { opacity: .55; }
.card, .status { background: var(--glass); }
.auth .link-btn:hover, .auth-foot a:hover { color: var(--accent); }

/* the soft background washes, drawn once on a fixed layer instead of repainted on scroll */
body { background: var(--bg); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(1000px 640px at 88% -12%, rgba(52, 211, 153, .06), transparent 62%), radial-gradient(760px 560px at -8% 108%, rgba(255, 255, 255, .03), transparent 60%); }
