/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/*
 * ── Design tokens ─────────────────────────────────────────────
 *
 * Canonical tokens (colors, font, type scale, spacing, radii) come from the CDN:
 *   https://cdn.neorgon.org/v1.0.0/styles/base.css   (linked in index.html)
 * Do NOT redeclare them here — a local copy is how the fleet drifted. The block
 * below holds only what base.css does not define, plus the per-site accent.
 *
 * Motion: base.css still ships --ease-snap (bounce) for legacy sites, but it is
 * deprecated for new work (impeccable law: ease-out exponential, no bounce).
 * Use --ease-out below.
 */

:root {
  /* Per-site identity — set to this site's hub card accent (PROJECTS.md section 4) */
  --accent: #84cc16;
  --accent-bright: #a3e635;

  /* Site extras base.css does not define */
  --surface-toast: #1a1730;
  --danger: #e11d48;
  --danger-hover: #f43f5e;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --control-height: 44px;
  --control-height-sm: 36px;
  --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.5);
  --shadow-modal: 0 24px 48px rgba(2, 6, 23, 0.58);
  --z-sticky-header: 200;
  --z-modal: 400;
  --z-toast: 500;
}

/* Author display values (e.g. .section/.stack flex) would otherwise defeat the
   hidden attribute — restore its authority once, globally. */
[hidden] { display: none !important; }

html { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  min-height: 100%;
  color: var(--text-primary);
  display: flex; flex-direction: column;
}

body.modal-open {
  overflow: hidden;
}

main#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

/* ── Layout ────────────────────────────────────────────────── */
/*
 * GOTCHA: body { display:flex; flex-direction:column } + margin: 0 auto
 * on a child collapses its width — always pair with width: 100%.
 *
 * GOTCHA: External images (YouTube ggpht, Gravatar, etc.) may block loading
 * when the Referer header points to localhost or an unknown origin. Fix:
 * 1. Add <meta name="referrer" content="no-referrer"> in <head> (global)
 * 2. Or add referrerpolicy="no-referrer" on each <img> tag
 */
.container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-6);
  flex: 1;
}

/* Vertical rhythm: use inside .container or nested regions */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.stack--tight { gap: var(--space-4); }
.stack--loose { gap: var(--space-8); }

/* Page section: title row + body (replaces “card everything” for grouping) */
.section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}
.section__titles {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.section__title {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}
.section__lead {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 52ch;
}
.section__lead code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  color: var(--text-secondary);
}
.stack > .card { margin-bottom: 0; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

/* ── Header ────────────────────────────────────────────────────
 * Owned by the Neorgon Header Kit (css/neorgon-header.css — canonical
 * source: packages/neorgon-ui/header/). Do NOT style .header-bar,
 * .header-logo*, .header-title-link, .header-subtitle, .header-right,
 * .header-actions, or .header-home here. Auth styles (.auth-*) stay
 * site-owned below.
 */
nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ── Buttons (canonical) ─────────────────────────────────────
 * Use .btn + a variant. Aliases: .nav-link = toolbar ghost; .auth-* map below.
 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  transition:
    background-color var(--dur),
    color var(--dur),
    border-color var(--dur),
    box-shadow var(--dur),
    transform var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn--sm {
  min-height: var(--control-height-sm);
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
}
.btn--block { width: 100%; }
.btn--icon {
  min-width: var(--control-height);
  padding: 0;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.btn--secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn--ghost {
  background: transparent;
  color: rgba(255,255,255,0.92);
  border-color: rgba(255,255,255,0.18);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.btn--danger {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}
.btn--danger:hover { background: var(--danger-hover); }

/* Toolbar ghost (header nav) — same as .btn.btn--ghost.btn--sm */
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: 0 var(--space-3);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background-color var(--dur), color var(--dur), border-color var(--dur);
}
.nav-link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.auth-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--control-height);
  min-height: var(--control-height);
  padding: 0;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-family: inherit;
  transition: background-color var(--dur), color var(--dur), border-color var(--dur);
}
.auth-toggle:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.auth-toggle svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}
.auth-toggle.logged-in { color: var(--accent); }
.auth-toggle.logged-in svg circle:nth-of-type(2) {
  fill: currentColor;
  stroke: none;
}

/* ── Sheet (inline panel under header) — not a modal ─────────
 * Use for auth, filters, compact forms. No backdrop; page scrolls.
 * For blocking overlays use .modal below.
 */
.auth-panel {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border-subtle);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.auth-panel.open { max-height: 300px; }
.auth-panel-inner {
  padding: var(--space-6);
  max-width: 400px;
  margin: 0 auto;
}
.auth-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.auth-tab {
  flex: 1;
  min-height: var(--control-height-sm);
  padding: 0 var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background-color var(--dur), color var(--dur), border-color var(--dur);
}
.auth-tab.active {
  background: var(--surface-2);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.auth-form input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: inherit;
}
.auth-submit {
  width: 100%;
  min-height: var(--control-height);
  padding: 0 var(--space-4);
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background-color var(--dur);
}
.auth-submit:hover { background: var(--accent-bright); }
#authUser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.auth-username {
  color: var(--text-primary);
  font-weight: 600;
}
.auth-logout {
  min-height: var(--control-height-sm);
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background-color var(--dur), color var(--dur), border-color var(--dur);
}
.auth-logout:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}
.auth-divider {
  height: 1px;
  background: var(--border-subtle);
}

/* ── Modal (blocking overlay) ──────────────────────────────── */
.modal[hidden] {
  display: none !important;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 12, 0.85);
  -webkit-backdrop-filter: blur(10px); /* Safari still needs the prefix */
  backdrop-filter: blur(10px);
}
.modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 520px);
  max-height: min(90vh, 680px);
  overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
}
/* For modals holding option grids or editors — narrow dialogs cramp them */
.modal__dialog--wide {
  width: min(100%, 760px);
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}
.modal__header h2 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}
.modal__body {
  padding: var(--space-6);
  overflow: auto;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
}
.modal__body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  color: var(--text-primary);
}
.modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

/* ── Card ──────────────────────────────────────────────────── */
/*
 * GOTCHA: backdrop-filter creates a stacking context — dropdowns inside
 * a card can be clipped by a later card's stacking context. Fix by adding
 * position: relative; z-index: 10 to the card that owns the open dropdown.
 *
 * Default: static surface (no hover lift — avoids generic “dashboard demo”).
 * Use .card--interactive for raised hover + entrance motion.
 *
 * GOTCHA: a <button> or <a> used AS a card does not inherit body text color —
 * buttons default to canvas text (near-black), rendering invisible on the dark
 * bg. When a card is an interactive element, set color: var(--text-primary)
 * and font-family: var(--font) explicitly on it.
 */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  backdrop-filter: blur(10px);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.45);
}
.card--interactive {
  transition:
    transform var(--dur) ease-out,
    box-shadow var(--dur) ease-out,
    border-color var(--dur);
  animation: fadeIn 0.35s ease-out both;
}
.card--interactive:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: var(--border-strong);
}
.card--enter {
  animation: fadeIn 0.35s ease-out both;
}
.card--flat:hover {
  box-shadow: none;
}
/* Card with an action row, in an equal-height grid: pin the toolbar to the
   bottom so buttons align across cards whose text wraps differently. */
.card--actions {
  display: flex;
  flex-direction: column;
}
.card--actions > .toolbar:last-child {
  margin-top: auto;
}

/* ── Button press feedback ─────────────────────────────────── */
button:active,
.btn:active,
.nav-link:active,
.auth-toggle:active,
.auth-tab:active,
.auth-submit:active,
.auth-logout:active {
  transform: scale(0.98);
  transition-duration: var(--dur-fast);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Skeleton loading ──────────────────────────────────────── */
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton {
  background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-2) 50%, var(--surface-1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  max-width: min(360px, calc(100vw - var(--space-8)));
  background: var(--surface-toast);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  pointer-events: none;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Footer ────────────────────────────────────────────────────
   Owned by the Neorgon Footer Kit (css/neorgon-footer.css).
   Don't add .neo-footer rules here — edit packages/neorgon-ui/footer/
   and re-run sync-footer.sh. */

/* ── Focus styles ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

/* ── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 1000;
  padding: var(--space-2) var(--space-4);
  background: var(--accent-bright);
  color: #000;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top var(--dur);
}
.skip-link:focus { top: 0; }

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .card--interactive:hover { transform: none; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .container { padding: var(--space-4); }
  .toast {
    left: var(--space-4);
    right: var(--space-4);
    max-width: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   NeoKeys page styles.
   Everything above this line is the template's shared kit. Below is only
   what this page adds; colours and spacing come from the CDN base.css
   tokens and are never redeclared.
   ══════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────── */
.nk-hero { text-align: center; padding-block: clamp(24px, 5vw, 48px); }
.nk-hero__title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 4.5vw, 2.5rem);
  font-weight: 700; letter-spacing: -.02em; color: #fff;
}
.nk-hero__lead {
  max-width: 58ch; margin: 0 auto;
  color: var(--text-secondary); line-height: 1.65;
}
.nk-hero__keys {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 26px 0 14px;
}
.nk-hero__note { margin: 0; font-size: .84rem; color: var(--text-muted); }

.nk-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--border, rgba(255,255,255,.12)); border-radius: 999px;
  background: transparent; color: var(--text-secondary);
  font: inherit; font-size: .85rem; cursor: pointer;
  transition: border-color .2s var(--ease-out, ease), color .2s var(--ease-out, ease);
}
.nk-chip:hover { border-color: var(--accent); color: #fff; }

/* ── Verdict monitor ──────────────────────────────────────── */
.nk-monitor {
  display: grid; gap: 16px;
  padding: 20px;
  border: 1px solid var(--border, rgba(255,255,255,.12)); border-radius: 14px;
  background: var(--surface-1, rgba(255,255,255,.03));
}
.nk-monitor__stage { display: flex; align-items: center; gap: 18px; }
.nk-monitor__key {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 76px; height: 76px;
  border: 1px solid var(--border, rgba(255,255,255,.14));
  border-bottom-width: 3px; border-radius: 12px;
  background: rgba(255,255,255,.04);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.9rem; font-weight: 700; color: #fff;
}
.nk-monitor__verdict { min-width: 0; }
.nk-monitor__badge {
  display: inline-block; margin-bottom: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid currentColor;
}
.nk-monitor__badge[data-verdict="idle"]          { color: var(--text-muted); }
.nk-monitor__badge[data-verdict="bound"]         { color: var(--accent-bright); }
.nk-monitor__badge[data-verdict="typing"]        { color: #38bdf8; }
.nk-monitor__badge[data-verdict="modifier"]      { color: var(--text-muted); }
.nk-monitor__badge[data-verdict="unbound"]       { color: var(--text-muted); }
.nk-monitor__badge[data-verdict="shortcuts-off"] { color: #fbbf24; }
.nk-monitor__why { margin: 0; color: var(--text-secondary); line-height: 1.6; }

.nk-monitor__field { display: grid; gap: 6px; }
.nk-monitor__field > span { font-size: .78rem; color: var(--text-muted); }
.nk-monitor__field input,
.nk-monitor__editable {
  padding: 10px 12px;
  border: 1px solid var(--border, rgba(255,255,255,.14)); border-radius: 8px;
  background: rgba(0,0,0,.25); color: var(--text-secondary);
  font: inherit; font-size: .88rem;
}
.nk-monitor__field input:focus,
.nk-monitor__editable:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── Cards / grids ────────────────────────────────────────── */
.nk-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}
.nk-grid--tight { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.nk-mech { display: flex; flex-direction: column; gap: 10px; }
.nk-mech__head { display: flex; align-items: center; gap: 12px; }
.nk-mech__name { margin: 0; font-size: .98rem; color: #fff; }
.nk-mech__owner {
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted);
}
.nk-mech__body { flex: 1; margin: 0; font-size: .86rem; line-height: 1.6; color: var(--text-secondary); }
.nk-mech .btn { align-self: flex-start; }

.nk-a11y__title { margin: 0 0 6px; font-size: .92rem; color: #fff; }
.nk-a11y__body { margin: 0; font-size: .84rem; line-height: 1.6; color: var(--text-secondary); }

.nk-aside {
  margin: 16px 0 0; padding: 13px 15px;
  border-left: 2px solid var(--accent); border-radius: 0 8px 8px 0;
  background: rgba(132, 204, 22, .06);
  font-size: .84rem; line-height: 1.6; color: var(--text-secondary);
}

/* ── Collision lab ────────────────────────────────────────── */
.nk-lab { display: grid; gap: 14px; }
.nk-lab__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.nk-lab__field { display: grid; gap: 5px; }
.nk-lab__field--wide { flex: 1; min-width: 170px; }
.nk-lab__field > span { font-size: .76rem; color: var(--text-muted); }
.nk-lab__field input {
  width: 100%; padding: 8px 11px;
  border: 1px solid var(--border, rgba(255,255,255,.14)); border-radius: 8px;
  background: rgba(0,0,0,.25); color: var(--text-secondary); font: inherit;
}
#collideKey { width: 62px; text-align: center; text-transform: lowercase; }
.nk-lab__field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.nk-lab__log { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nk-lab__entry {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  font-size: .83rem; line-height: 1.5;
  border: 1px solid transparent;
}
.nk-lab__entry.is-ok { border-color: rgba(132,204,22,.35); background: rgba(132,204,22,.07); color: var(--text-secondary); }
.nk-lab__entry.is-no { border-color: rgba(248,113,113,.32); background: rgba(248,113,113,.06); color: var(--text-secondary); }

/* ── Install steps ────────────────────────────────────────── */
.nk-steps { display: grid; gap: 16px; margin: 0; padding: 0 0 0 1.15em; }
.nk-step::marker { color: var(--accent); font-weight: 700; }
.nk-step__title { margin: 0 0 4px; font-size: .95rem; color: #fff; }
.nk-step__body { margin: 0 0 10px; font-size: .86rem; line-height: 1.6; color: var(--text-secondary); }

.nk-code { position: relative; }
.nk-code pre {
  margin: 0; padding: 13px 15px; overflow-x: auto;
  border: 1px solid var(--border, rgba(255,255,255,.12)); border-radius: 10px;
  background: rgba(0,0,0,.32);
}
.nk-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem; line-height: 1.65; color: var(--text-secondary);
  white-space: pre;
}
.nk-code__copy {
  position: absolute; top: 8px; right: 8px;
  padding: 4px 9px;
  border: 1px solid var(--border, rgba(255,255,255,.16)); border-radius: 6px;
  background: var(--bg, #040714); color: var(--text-muted);
  font: inherit; font-size: .72rem; cursor: pointer;
}
.nk-code__copy:hover { color: #fff; border-color: var(--accent); }

/* ── Key map ──────────────────────────────────────────────── */
.nk-stats {
  display: grid; gap: 14px; margin-bottom: 22px;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
}
.nk-stat {
  padding: 16px;
  border: 1px solid var(--border, rgba(255,255,255,.1)); border-radius: 12px;
  background: var(--surface-1, rgba(255,255,255,.03));
}
.nk-stat__num {
  display: block; font-size: 2rem; font-weight: 700; line-height: 1;
  color: var(--accent-bright);
  font-variant-numeric: tabular-nums;
}
.nk-stat__label {
  display: block; margin: 4px 0 8px;
  font-size: .78rem; letter-spacing: .04em; color: #fff;
}
.nk-stat__body { margin: 0; font-size: .8rem; line-height: 1.6; color: var(--text-muted); }

.nk-tier {
  padding: 16px 18px; margin-bottom: 12px;
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-left-width: 3px; border-radius: 0 12px 12px 0;
}
.nk-tier--reserved   { border-left-color: var(--accent); }
.nk-tier--convention { border-left-color: #38bdf8; }
.nk-tier--site       { border-left-color: var(--text-muted); }
.nk-tier__name { margin: 0 0 3px; font-size: .95rem; color: #fff; }
.nk-tier__note { margin: 0 0 12px; font-size: .8rem; color: var(--text-muted); }
.nk-tier__rows { display: grid; gap: 4px; }
.nk-tier__row { display: flex; align-items: baseline; gap: 12px; }
.nk-tier__key { flex: none; display: flex; gap: 4px; min-width: 92px; }
.nk-tier__meaning { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: .85rem; color: var(--text-secondary); }
.nk-tier__detail { font-size: .76rem; color: var(--text-muted); }

@media (max-width: 640px) {
  .nk-monitor__stage { flex-direction: column; align-items: flex-start; }
  .nk-tier__row { flex-direction: column; gap: 3px; }
}

/* ── Loading-screen tip strip ─────────────────────────────────
   Sits between the content and the footer, where a loading screen would put
   it. A button rather than a div because clicking it advances the tip, and a
   thing you can click should say so to the keyboard as well as the mouse. */
.nk-tip {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 10px;
  width: 100%; padding: 18px var(--layout-gutter, 20px) 22px;
  border: 0; border-top: 1px solid var(--border, rgba(255,255,255,.07));
  background: transparent;
  font: inherit; text-align: center; cursor: pointer;
}
.nk-tip:hover .nk-tip__text { color: var(--text-secondary); }
.nk-tip:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nk-tip__eyebrow {
  flex: none;
  padding: 2px 8px; border: 1px solid var(--accent); border-radius: 999px;
  font-size: .64rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-bright);
}
.nk-tip__text {
  margin: 0; max-width: 62ch;
  font-size: .85rem; line-height: 1.55; color: var(--text-muted);
  opacity: 0; transform: translateY(3px);
  transition: opacity .35s var(--ease-out, ease), transform .35s var(--ease-out, ease), color .2s;
}
.nk-tip__text.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .nk-tip__text { transition: none; transform: none; }
}

/* ── Safety layers ────────────────────────────────────────── */
.nk-layers { display: grid; gap: 2px; }
.nk-layer {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 15px 16px;
  border: 1px solid var(--border, rgba(255,255,255,.09));
  border-radius: 10px;
  background: var(--surface-1, rgba(255,255,255,.02));
}
.nk-layer__n {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 27px; height: 27px;
  border: 1px solid var(--accent); border-radius: 50%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem; font-weight: 700; color: var(--accent-bright);
}
.nk-layer__title { margin: 3px 0 5px; font-size: .92rem; color: #fff; }
.nk-layer__text { margin: 0; font-size: .84rem; line-height: 1.6; color: var(--text-secondary); }
