/* See how nico works, from referral to remittance — demo chrome only. Everything inside the shell is bundle.css; this file lays out the page around it. Every color is a token. */

html, body { height: 100%; }
body { overflow: hidden; }
.demo { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; background: var(--surface); color: var(--ink); }

/* top bar: wordmark, title, position, controls */
.demo-bar { display: flex; align-items: center; gap: var(--space-4); height: var(--space-12); padding: 0 var(--space-4); border-bottom: 1px solid var(--line); background: var(--surface); }
.demo-bar .wordmark { display: block; height: 20px; width: auto; }
.wm-ink { fill: var(--ink); } .wm-dot { fill: var(--accent); }
.demo-bar-title { font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.demo-bar-sep { width: 1px; height: 20px; background: var(--line); flex: none; }
.demo-bar-pos { font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-faint); white-space: nowrap; }
.demo-bar-actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.demo-bar-actions .nc-btn .nc-kbd { margin-left: var(--space-1); }

/* the stage holds the shell or the cover */
.demo-stage { min-height: 0; position: relative; }
.demo-stage > .nc-shell { height: 100%; }
.demo-stage .nc-pane-thread .nc-scroll { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { .demo-stage .nc-pane-thread .nc-scroll { scroll-behavior: auto; } }

/* cover and closing scenes */
.cover { height: 100%; overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); padding: var(--space-12) var(--space-8); background: var(--surface); }
.cover-words { max-width: 560px; display: flex; flex-direction: column; gap: var(--space-4); }
.cover-words .wordmark { display: block; height: 72px; width: auto; }
.cover-tag { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 0; }
.cover-lede { font-size: 14px; line-height: 20px; color: var(--ink-muted); margin: 0; max-width: var(--measure); }
.cover-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.cover-list b { color: var(--ink); font-weight: 600; }
.cover-side { display: flex; flex-direction: column; gap: var(--space-4); max-width: 480px; }
.cover-side .nc-card { background: var(--surface-raised); }
.cover-states { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cover-cast { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2) var(--space-3); align-items: center; font-size: 13px; line-height: 18px; }
.cover-cast .nc-entry-role { color: var(--ink-faint); }
.cover-keys { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-3); align-items: center; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.cover-start { align-self: flex-start; }
.cover-found { display: flex; flex-direction: column; gap: var(--space-2); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.cover-found p { margin: 0; }
.cover-found b { color: var(--ink); font-weight: 600; }
.cover-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.cover-stat { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); }
.cover-stat b { font-family: var(--font-mono); font-size: 20px; line-height: 28px; font-weight: 600; color: var(--ink); }
.cover-stat span { font-size: 12px; line-height: 16px; color: var(--ink-faint); }
.cover-loop { display: flex; flex-direction: column; gap: var(--space-1); }
.cover-loop a { display: grid; grid-template-columns: var(--icon) auto minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; min-height: 28px; color: var(--ink); text-decoration: none; font-size: 13px; line-height: 18px; border-radius: var(--radius-sm); padding: 0 var(--space-1); }
.cover-loop a:hover { background: var(--surface-sunken); }
.cover-loop a:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cover-loop a > .nc-icon { color: var(--ink-faint); }

/* layers: the palette and the help sheet float over everything, on the scrim */
.demo-layer { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding: 12vh var(--space-4) var(--space-4); background: var(--scrim); }
.demo-layer[hidden] { display: none; }
.demo-help { width: 560px; max-width: 100%; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.demo-help h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -.01em; }
.demo-help p { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.demo-help .cover-keys { font-size: 13px; }
.demo-help .nc-btn { align-self: flex-end; }

/* a toast for what E and N would do, in the record's own words */
.demo-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; max-width: min(560px, calc(100vw - 32px)); background: var(--surface-raised); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: var(--space-3) var(--space-4); font-size: 13px; line-height: 18px; }
.demo-toast[hidden] { display: none; }
.demo-toast b { font-weight: 600; }

/* theme toggle wears aria-pressed; both glyphs exist, one shows */
[data-theme="dark"] .only-light, :root:not([data-theme="dark"]) .only-dark { display: none; }

/* the thread's "try it" hint under the gate, in the demo only */
.demo-try { display: flex; align-items: center; gap: var(--space-2); font-size: 13px; line-height: 18px; color: var(--ink-faint); }
.demo-try .nc-kbd { color: var(--ink-muted); }

/* narrow screens: the inspector becomes a sheet over the scrim, then the list becomes a page of its own */
.demo-only-narrow { display: none; }
@media (max-width: 1180px) {
  .demo-stage > .nc-shell { grid-template-columns: var(--pane-list) minmax(0, 1fr); }
  .demo-stage .nc-pane-inspector { display: none; }
  .demo.show-inspector .nc-pane-inspector { display: flex; position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--pane-inspector), 100vw); z-index: 45; padding: var(--space-2); box-shadow: var(--shadow-md); }
  .demo.show-inspector .demo-scrim { display: block; }
  .demo-only-narrow { display: inline-flex; }
}
@media (max-width: 820px) {
  .demo-stage > .nc-shell { grid-template-columns: minmax(0, 1fr); }
  .demo-stage .nc-pane-list { display: none; }
  .demo.show-list .nc-pane-list { display: flex; position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 100vw); z-index: 45; box-shadow: var(--shadow-md); }
  .demo.show-list .demo-scrim { display: block; }
  .nc-rail-caption { grid-template-columns: auto minmax(0, 1fr) auto; }
  .nc-rail-caption-lines { display: none; }
  .demo-bar-title, .demo-bar-sep { display: none; }
  .demo-bar-actions .nc-btn:not(.nc-btn-icon) { padding: 0; aspect-ratio: 1; }
  .demo-bar-actions .nc-btn:not(.nc-btn-icon) > :not(.nc-icon) { display: none; }
  .cover { grid-template-columns: minmax(0, 1fr); padding: var(--space-6) var(--space-4); }
}
.demo-scrim { display: none; position: fixed; inset: 0; z-index: 40; background: var(--scrim); border: 0; padding: 0; }

/* The email gate reuses the keys sheet's frame. */
.demo-gate form { display: flex; flex-direction: column; gap: var(--space-2); }
.demo-gate label { font-size: 12px; line-height: 16px; color: var(--ink-faint); }
.demo-gate input { height: 36px; padding: 0 var(--space-3); border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); font: inherit; font-size: 14px; }
.demo-gate input:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.demo-gate .demo-gate-note { min-height: 18px; color: var(--ink-muted); }
.demo-gate .demo-gate-actions { display: flex; justify-content: flex-end; gap: var(--space-2); }
.demo-gate .demo-gate-actions .nc-btn { align-self: auto; }
.demo-gate .demo-gate-fine { color: var(--ink-faint); font-size: 12px; line-height: 16px; }
