:root {
  --np-canvas: #1e3a52;
  --np-panel: #25465f;
  --np-raised: #2c506a;
  --np-inset: #183247;
  --np-text: #f5f9fc;
  --np-muted: #c4d3df;
  --np-border: #52738d;
  --np-accent: #a6d8ff;
  --np-action: #66baff;
  --np-positive: #96e4bf;
  --np-warning: #ffcf72;
  --np-negative: #ffacb0;
  --np-radius: 14px;
  --np-elevation: 0 12px 32px rgb(10 28 42 / 12%);
}

/* Authentication has its own small stylesheet; it does not load the editor. */
:root { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100dvh; }
a { color: var(--np-accent); text-underline-offset: 3px; }
button, input { font: inherit; }
button { cursor: pointer; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(16px,4vw,48px); border-bottom: 1px solid var(--np-border); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.header-actions { display: flex; gap: 20px; align-items: center; }
.header-actions a { min-height: 44px; display: inline-flex; align-items: center; font-size: .9rem; }
.header-actions .button { display: none; }
.auth-shell { display: grid; place-items: start center; }
.auth-panel { min-width: 0; }
.auth-copy { margin-bottom: 24px; }
.auth-copy .eyebrow { display: none; }
.auth-copy h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 12px; }
.auth-copy .lead { color: var(--np-muted); line-height: 1.6; margin: 0; }
.auth-panel:has(#login-form) .auth-copy { display: none; }
.auth-card-heading { margin-bottom: 24px; }
.auth-logo { display: none; }
.auth-card-heading h2 { margin: 0 0 10px; font-size: 1.5rem; line-height: 1.3; }
.auth-card-heading p { margin: 0; color: var(--np-muted); line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 24px; }
.auth-tabs button { border: 1px solid transparent; border-radius: 8px; font-weight: 600; padding: 8px; background: transparent; }
.auth-tabs button.is-active { border-color: var(--np-accent); }
.auth-form { display: none; gap: 20px; }
.auth-form.is-active { display: grid; }
.auth-form label { display: grid; gap: 8px; font-weight: 600; line-height: 1.5; }
.auth-form input { width: 100%; min-width: 0; border: 1px solid var(--np-border); padding: 12px; }
.button { border: 1px solid var(--np-action); padding: 12px 20px; font-weight: 700; }
.plain-button { border: 0; padding: 8px; min-height: 44px; color: var(--np-accent); background: transparent; }
.auth-note { margin: 20px 0 0; font-size: .875rem; line-height: 1.65; color: var(--np-muted); overflow-wrap: anywhere; }
.auth-form .auth-note { margin: 0; }
.auth-message { margin: 20px 0 0; line-height: 1.6; }
.auth-message:empty { display: none; }
.is-error { color: var(--np-negative); }
.is-success { color: var(--np-positive); }
.session-expired-banner { padding: 16px; margin-bottom: 20px; border-left: 3px solid var(--np-action); background: var(--np-inset); line-height: 1.6; }
.session-expired-banner button { display: block; background: transparent; color: var(--np-accent); border: 0; min-height: 44px; padding: 8px 0 0; }
#toast { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 480px) { .brand span { font-size: .875rem; } .header-actions { gap: 12px; } .header-actions a[href="./index.html"] { display: none; } }

body.auth-page { background:var(--np-canvas); color:var(--np-text); }
:focus-visible { outline:3px solid var(--np-accent); outline-offset:4px; }
button,a { touch-action:manipulation; }
button:disabled { cursor:not-allowed; }
.site-header { background:var(--np-inset); }
.brand,.ghost-link { color:var(--np-text); }
.auth-shell { padding:56px 24px; }
.auth-panel { width:min(100%,440px); }
.auth-card { padding:32px; border:1px solid var(--np-border); border-radius:18px; background:var(--np-panel); box-shadow:var(--np-elevation); }
.auth-tabs { background:var(--np-inset); border-radius:10px; }
.auth-tabs button { color:var(--np-muted); min-height:44px; }
.auth-tabs button.is-active { color:var(--np-text); background:var(--np-raised); }
.auth-form input { min-height:48px; font-size:1rem; color:var(--np-text); background:var(--np-inset); border-radius:10px; }
.auth-form .button { min-height:48px; color:#183247; background:#66baff; border-radius:10px; }
.skip-link { position:fixed; top:8px; left:16px; z-index:100000; transform:translateY(-150%); padding:12px 18px; background:var(--np-accent); color:var(--np-inset); border-radius:8px; }
.skip-link:focus { transform:none; }
@media(max-width:480px){.auth-shell{padding:32px 16px}.auth-card{padding:24px}}
