/* North Pole Case File — design tokens and components. Values from docs/design/design-system.md. */

@font-face { font-family: 'Special Elite'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/special-elite-latin.woff2) format('woff2');
  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; }
@font-face { font-family: 'Special Elite'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/special-elite-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/caveat-latin.woff2) format('woff2');
  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; }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/caveat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IM Fell English'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/im-fell-english.woff2) format('woff2'); }
@font-face { font-family: 'IM Fell English'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/im-fell-english-italic.woff2) format('woff2'); }

:root {
  --np-wall: #0D2F31; --np-teal: #12484A; --np-sea: #1F5F5C; --np-cream: #F7F0E1; --np-gold: #D4B052;
  --np-cranberry: #A3283A; --np-ink: #2B2521; --np-cork: #B8895A;
  --np-teal-panel: #103A3C; --np-teal-panel-line: #2C5A5A; --np-night: #060D0E; --np-code: #0F2224;
  --np-paper: #FDFCF8; --np-manila: #D6B676; --np-paper-sealed: #E8DCC2; --np-paper-letter: #FBF6EA;
  --np-sticky: #F3E38A; --np-admin-bg: #ECE3CF; --np-photo-empty: #3C5A5B; --np-photo-empty-text: #E9E1CF;
  --np-cream-text: #F3EAD6; --np-cream-muted: #E6DCC4; --np-folder-ink: #3D2C1F; --np-label: #6B4F3A;
  --np-meta: #5A4232; --np-placeholder: #7A6A58; --np-nav-meta: #B8A57A; --np-cranberry-dark: #8D2232;
  --np-classified-ink: #7F1E2C; --np-teal-mist: #9FB7B3;
  --np-rule: #E0D4B9; --np-border-input: #8A7A64; --np-border-choice: #D6C8AA; --np-border-remove: #C9A0A7;
  --np-border-danger: #D9A3AB; --np-teal-dashed: #5F8583; --np-badge-ring: #E9DFC6; --np-trim-gold: #C9A227;
  --np-pin-gold-edge: #8A6D1F; --np-pin-steel: #8F8A7A; --np-pin-steel-edge: #5A564B;
  --np-chip-sealed: #DDD3BF; --np-chip-sealed-text: #4A3A2C; --np-warn-bg: #F6E6B8; --np-warn-text: #5A3D08;
  --np-closed-stamp-edge: #E0566A; --np-closed-stamp-text: #F6A9B3;

  --np-font-dept: 'Special Elite', 'Courier New', monospace;
  --np-font-hand: 'Caveat', cursive;
  --np-font-title: 'IM Fell English', Georgia, serif;
  --np-font-code: 'Courier New', monospace;

  --np-shadow-card: 0 6px 14px rgba(0,0,0,.35);
  --np-shadow-card-open: 0 0 0 5px rgba(212,176,82,.35), 0 8px 18px rgba(0,0,0,.4);
  --np-shadow-folder: 0 8px 18px rgba(0,0,0,.4);
  --np-shadow-note: 0 4px 10px rgba(0,0,0,.3);
  --np-shadow-polaroid: 0 2px 6px rgba(0,0,0,.2);
  --np-shadow-tile: 0 2px 4px rgba(0,0,0,.25);
  --np-shadow-choice: 0 2px 4px rgba(0,0,0,.12);
  --np-shadow-pin: 1px 2px 3px rgba(0,0,0,.45);
  --np-shadow-badge: 0 4px 8px rgba(0,0,0,.35);
  --np-shadow-board: inset 0 0 0 2px #C9A227, 0 10px 30px rgba(0,0,0,.5);
  --np-shadow-admin: 0 2px 6px rgba(0,0,0,.12);
  --np-focus: 0 0 0 2px var(--np-paper), 0 0 0 4px var(--np-teal);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--np-wall); color: var(--np-ink); font-family: var(--np-font-dept); }
body.np-night { background: var(--np-night); }
body.np-admin-body { background: var(--np-admin-bg); }
a { color: var(--np-gold); }
a:hover { color: var(--np-cream-text); }
:focus-visible { outline: none; box-shadow: var(--np-focus); }
/* Blazor focuses the page heading after navigation for screen readers; it isn't a control, so no ring. */
h1:focus, h1:focus-visible { outline: none; box-shadow: none; }
.np-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.np-hand { font-family: var(--np-font-hand); font-weight: 500; }
.np-title { font-family: var(--np-font-title); font-weight: 400; }
h1, h2, h3 { font-family: var(--np-font-title); font-weight: 400; margin: 0; }
p { margin: 0; }

/* Page column: 390 px phone layout, centred on desktop. */
.np-column { position: relative; width: 100%; max-width: 390px; margin: 0 auto; min-height: 100dvh; overflow-x: hidden; }
@media (min-width: 600px) { .np-column { border-left: 1px solid var(--np-teal-panel-line); border-right: 1px solid var(--np-teal-panel-line); } }

/* Shared controls */
.np-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 14px; border: none;
  border-radius: 4px; background: var(--np-teal); color: var(--np-cream-text); font: 14px/1.3 var(--np-font-dept); text-align: center;
  text-decoration: none; cursor: pointer; width: 100%; }
.np-btn:hover { color: var(--np-cream-text); background: #0f3d3f; }
.np-btn[disabled], .np-btn[aria-disabled=true] { background: #7d9293; cursor: not-allowed; }
.np-btn--outline { background: transparent; color: var(--np-teal); border: 2px solid var(--np-teal); }
.np-btn--outline:hover { background: rgba(18,72,74,.08); color: var(--np-teal); }
.np-btn--paper { background: var(--np-paper); color: var(--np-ink); border: 1px solid var(--np-border-input); }
.np-btn--paper:hover { background: #fff; color: var(--np-ink); }
.np-btn--danger { background: var(--np-cranberry-dark); }
.np-btn--danger:hover { background: #761c29; }
.np-btn--inline { width: auto; }
.np-link-btn { min-height: 44px; padding: 8px 12px; border: none; background: transparent; font: 500 18px/1 var(--np-font-hand);
  color: var(--np-label); text-decoration: underline; cursor: pointer; }
.np-input, .np-textarea, .np-select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--np-border-input); border-radius: 3px;
  background: var(--np-paper); color: var(--np-ink); font: 15px/1.5 var(--np-font-dept); }
.np-textarea { resize: vertical; min-height: 96px; }
.np-input::placeholder, .np-textarea::placeholder { color: var(--np-placeholder); }
.np-field-label { font: 500 20px/1 var(--np-font-hand); color: var(--np-label); }
.np-error { font-size: 13px; line-height: 1.5; color: var(--np-cranberry-dark); }
.np-eyebrow { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--np-label); }

/* Nav bar on dark pages */
.np-nav { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 0 8px; position: relative; z-index: 10; }
.np-nav__back { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; font-size: 13px; color: var(--np-gold); text-decoration: none; }
.np-nav__meta { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--np-nav-meta); }

/* Banners */
.np-banner { position: sticky; top: 0; z-index: 10; padding: 8px 14px; background: var(--np-gold); color: var(--np-ink); font-size: 12px;
  line-height: 1.4; text-align: center; }
.np-banner--preview { background: var(--np-sticky); border-bottom: 2px dashed var(--np-cranberry); }

/* Stamps: rotation is static so reduced motion still shows them tilted. */
.np-stamp { display: inline-block; padding: 4px 10px; border: 3px solid var(--np-cranberry); border-radius: 4px; color: var(--np-cranberry);
  letter-spacing: .12em; text-transform: uppercase; transform: rotate(var(--np-tilt, -8deg)); }
.np-stamp--lg { font-size: 20px; }
.np-stamp--md { font-size: 16px; }
.np-stamp--sm { font-size: 13px; }
.np-stamp--classified { color: var(--np-classified-ink); }
.np-stamp--slam { animation: np-slam .35s ease-out both; }
@keyframes np-slam { 0% { transform: rotate(var(--np-tilt, -8deg)) scale(1.6); opacity: 0; }
  60% { transform: rotate(var(--np-tilt, -8deg)) scale(.95); opacity: 1; } 100% { transform: rotate(var(--np-tilt, -8deg)) scale(1); opacity: 1; } }
.np-shake { animation: np-shake .3s ease-in-out .3s; }
@keyframes np-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- Landing desk ---------- */
.np-desk { position: relative; min-height: 100dvh; overflow: hidden; background: var(--np-wall); }
.np-desk__window { position: absolute; left: 50%; top: 28px; width: 250px; height: 210px; margin-left: -125px; border: 10px solid #23170E;
  border-radius: 4px; background: #0A2224; overflow: hidden; }
.np-desk__window svg { position: absolute; inset: 0; }
.np-desk__mullion-v { position: absolute; left: 110px; top: 0; width: 10px; height: 190px; background: #23170E; }
.np-desk__mullion-h { position: absolute; left: 0; top: 90px; width: 230px; height: 10px; background: #23170E; }
.np-snow { animation: np-fall 9s linear infinite; }
.np-snow2 { animation: np-fall 13s linear infinite; }
@keyframes np-fall { from { transform: translateY(-20px); } to { transform: translateY(240px); } }
.np-wood { position: absolute; left: 0; right: 0; top: 260px; bottom: 0; background-color: #3E2A1B;
  background-image: repeating-linear-gradient(176deg, rgba(0,0,0,.12) 0px, rgba(0,0,0,.12) 2px, transparent 2px, transparent 19px),
    repeating-linear-gradient(183deg, rgba(255,220,170,.05) 0px, rgba(255,220,170,.05) 1px, transparent 1px, transparent 31px); }
.np-desk__lamp { position: absolute; left: -40px; right: -40px; top: 250px; height: 360px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,214,140,.22) 0%, rgba(255,214,140,.08) 45%, rgba(255,214,140,0) 70%); }
.np-folder-wrap { position: relative; margin: 292px auto 0; width: 302px; transform: rotate(-2deg); }
.np-folder__tab { width: 120px; height: 24px; background: var(--np-manila); border-radius: 6px 6px 0 0; }
.np-folder { position: relative; min-height: 210px; padding: 18px 18px 16px; background: var(--np-manila); border-radius: 0 4px 4px 4px;
  box-shadow: 0 10px 22px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 6px; }
.np-folder__eyebrow { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--np-folder-ink); }
.np-folder__name { font: 28px/1.05 var(--np-font-title); color: var(--np-ink); max-width: 170px; }
.np-folder__sub { font-size: 11px; color: var(--np-folder-ink); }
.np-folder__photo { position: absolute; right: 16px; top: 20px; width: 92px; padding: 6px 6px 4px; background: var(--np-paper); transform: rotate(6deg);
  box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.np-folder__photo div { height: 82px; background: var(--np-photo-empty); }
.np-folder__ring { position: absolute; left: 150px; top: 120px; width: 70px; height: 70px; border-radius: 50%; border: 5px solid rgba(94,58,30,.22); }
.np-folder__stamp { position: absolute; left: 16px; bottom: 18px; --np-tilt: -6deg; }
.np-folder__sticky { position: absolute; right: -6px; bottom: -18px; width: 104px; padding: 8px; background: var(--np-sticky); transform: rotate(5deg);
  box-shadow: 0 3px 8px rgba(0,0,0,.35); font: 500 18px/1.05 var(--np-font-hand); color: var(--np-ink); }
.np-sheet { position: relative; z-index: 20; margin: 48px 14px 14px; padding: 20px 18px 18px; background: var(--np-cream); border-radius: 4px;
  box-shadow: 0 -6px 24px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 12px; }
.np-sheet__dept { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--np-label); }
.np-sheet p { font-size: 14px; line-height: 1.55; }
.np-sheet__note { font: 500 18px/1.1 var(--np-font-hand); color: var(--np-label); }
.np-sheet__cleared { display: flex; align-items: center; gap: 14px; }
.np-sheet__cleared p { font-size: 13px; line-height: 1.5; }

/* ---------- Evidence board ---------- */
.np-case-header { margin: 20px 16px 0; padding: 18px 18px 16px; border: 2px solid var(--np-gold); border-radius: 4px; background: var(--np-teal-panel);
  display: flex; flex-direction: column; gap: 8px; }
.np-case-header__dept { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--np-gold); }
.np-case-header h1 { font-size: 34px; line-height: 1.05; color: var(--np-cream-text); }
.np-case-header__sub { font-size: 12px; color: var(--np-cream-muted); }
.np-case-header__count { font-size: 11px; color: var(--np-gold); }
.np-tray { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; list-style: none; padding: 0; }
.np-tray li { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.np-tray .is-earned { background: var(--np-sea); border: 2px solid var(--np-gold); }
.np-tray .is-empty { border: 2px dashed var(--np-teal-dashed); }

.np-board { position: relative; margin: 16px 10px 24px; padding: 32px 14px 40px; border: 8px solid var(--np-teal); border-radius: 6px; box-shadow: var(--np-shadow-board);
  background-color: var(--np-cork);
  background-image: radial-gradient(rgba(70,40,15,.35) 1px, transparent 1.6px), radial-gradient(rgba(255,238,205,.22) 1px, transparent 1.6px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 4px 6px;
  display: flex; flex-direction: column; gap: 34px; }
.np-string { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.np-string polyline { fill: none; stroke: var(--np-cranberry); stroke-linecap: round; stroke-linejoin: round; }
.np-string .is-sealed { stroke-dasharray: 6 6; opacity: .55; }
.np-string .is-solved { stroke-width: 2.2; }
.np-string .is-drawing { stroke-dasharray: var(--np-len); stroke-dashoffset: var(--np-len); animation: np-draw 1.2s ease-out .2s forwards; }
@keyframes np-draw { to { stroke-dashoffset: 0; } }

.np-row { position: relative; z-index: 3; display: flex; gap: 10px; align-items: flex-start; }
.np-row:nth-of-type(even) { flex-direction: row-reverse; }
.np-row__aside { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 24px; min-width: 0; }

.np-pin { position: absolute; left: 50%; top: -8px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--np-gold);
  border: 2px solid var(--np-pin-gold-edge); box-shadow: var(--np-shadow-pin); z-index: 5; }
.np-pin--steel { width: 12px; height: 12px; margin-left: -6px; top: -6px; background: var(--np-pin-steel); border-color: var(--np-pin-steel-edge); box-shadow: none; }

.np-card { position: relative; width: 210px; flex-shrink: 0; padding: 22px 14px 16px; background: var(--np-cream); border-radius: 2px;
  box-shadow: var(--np-shadow-card); display: flex; flex-direction: column; gap: 8px; }
.np-row:nth-of-type(odd) .np-card { transform: rotate(-3deg); }
.np-row:nth-of-type(even) .np-card { transform: rotate(2deg); }
.np-card h2 { font-size: 24px; line-height: 1.1; }
.np-card__statement { margin-top: 4px; font-size: 12px; line-height: 1.4; }
.np-card__stamp { align-self: flex-end; margin: 2px 0 -2px; --np-tilt: -11deg; opacity: .9; max-width: 180px; text-align: center; }
.np-card__link { font-size: 12px; color: var(--np-teal); min-height: 44px; display: flex; align-items: flex-end; }
.np-card--open { width: 240px; padding: 22px 16px 18px; border: 3px solid var(--np-gold); border-radius: 3px; box-shadow: var(--np-shadow-card-open); gap: 10px; }
.np-row .np-card--open { transform: rotate(-1deg); }
.np-card--open:not(.is-highlight) { box-shadow: var(--np-shadow-card); border-color: var(--np-gold); }
.np-card--open .np-eyebrow { color: var(--np-cranberry); }
.np-card--open h2 { font-size: 26px; }
.np-card__teaser { font-size: 12px; line-height: 1.5; }
.np-card__cody { font: 500 19px/1 var(--np-font-hand); color: var(--np-cranberry); }

.np-polaroid { margin: 4px 0 0; padding: 8px 8px 6px; background: var(--np-paper); box-shadow: var(--np-shadow-polaroid); display: flex; flex-direction: column; gap: 6px; transform: rotate(2deg); }
.np-row:nth-of-type(even) .np-polaroid { transform: rotate(-2deg); }
.np-polaroid img, .np-polaroid__empty { display: block; width: 100%; height: 120px; object-fit: cover; }
.np-polaroid__empty { background: var(--np-photo-empty); }
.np-polaroid figcaption { font: 500 19px/1 var(--np-font-hand); color: var(--np-ink); }

.np-sticky { width: 112px; min-height: 110px; padding: 12px 10px; background: var(--np-sticky); transform: rotate(4deg); box-shadow: var(--np-shadow-note);
  font: 500 20px/1.05 var(--np-font-hand); color: var(--np-ink); }
.np-slip { width: 96px; padding: 10px 8px; background: var(--np-paper); transform: rotate(7deg); box-shadow: 0 3px 8px rgba(0,0,0,.3); font-size: 11px; line-height: 1.4; }

.np-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; transform: rotate(6deg); }
.np-row:nth-of-type(even) .np-badge { transform: rotate(-5deg); }
.np-badge__disc { width: 80px; height: 80px; border-radius: 50%; background: var(--np-sea); border: 4px solid var(--np-gold); display: flex;
  align-items: center; justify-content: center; box-shadow: var(--np-shadow-badge); }
.np-badge__ring { width: 62px; height: 62px; border-radius: 50%; border: 2px dashed var(--np-badge-ring); display: flex; align-items: center; justify-content: center; }
.np-badge__name { padding: 2px 6px; background: var(--np-cream); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.np-sealed-label { align-self: center; padding: 6px 12px; background: var(--np-cream); transform: rotate(-2deg); box-shadow: var(--np-shadow-tile);
  font-size: 12px; letter-spacing: .14em; text-align: center; position: relative; z-index: 3; }
.np-sealed-grid { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
.np-sealed { position: relative; min-height: 100px; padding: 12px; background: var(--np-paper-sealed); border-radius: 2px; box-shadow: var(--np-shadow-note);
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px; transform: rotate(-2deg); }
.np-sealed:nth-child(even) { transform: rotate(3deg); }
.np-sealed .np-eyebrow { color: var(--np-meta); }
.np-sealed__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.np-sealed__date { font: 500 20px/1 var(--np-font-hand); }
.np-seal { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--np-cranberry); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,.35); }

.np-casetwo { position: relative; z-index: 3; align-self: center; width: 100%; max-width: 318px; }
.np-casetwo__tab { width: 124px; padding: 5px 12px; background: var(--np-manila); border-radius: 6px 6px 0 0; font-size: 11px; letter-spacing: .14em; }
.np-casetwo__body { position: relative; min-height: 120px; padding: 18px 14px 16px; background: var(--np-manila); border-radius: 0 4px 4px 4px; box-shadow: var(--np-shadow-folder);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; }
.np-casetwo__title { margin: 0; font-family: var(--np-font-title); font-size: 26px; line-height: 1.1; font-weight: normal; }
.np-casetwo__body .np-stamp { --np-tilt: 8deg; align-self: center; }
.np-casetwo__sealed { font-size: 11px; letter-spacing: .14em; color: var(--np-folder-ink); align-self: center; }

.np-fd { position: relative; z-index: 3; align-self: center; width: 254px; padding: 24px 18px 20px; background: var(--np-teal); border: 2px solid var(--np-gold); border-radius: 3px;
  box-shadow: 0 8px 18px rgba(0,0,0,.45); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.np-fd__label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--np-gold); }
.np-fd h2 { font-size: 26px; line-height: 1.1; color: var(--np-cream-text); font-style: italic; }
.np-fd.is-closed h2 { font-style: normal; }
.np-fd p { font-size: 12px; line-height: 1.5; color: var(--np-cream-muted); }
.np-fd .np-stamp { border-color: var(--np-closed-stamp-edge); color: var(--np-closed-stamp-text); --np-tilt: -9deg; }

.np-memo { position: relative; z-index: 3; align-self: center; width: 100%; max-width: 318px; padding: 12px 14px; background: var(--np-paper); transform: rotate(1deg);
  box-shadow: var(--np-shadow-note); font-size: 11.5px; line-height: 1.55; }

.np-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; padding: 0 14px 32px; }
.np-footer a, .np-footer button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; font: 13px var(--np-font-dept); color: var(--np-gold);
  background: none; border: none; cursor: pointer; text-decoration: underline; }
.np-footer button:hover { color: var(--np-cream-text); }

/* ---------- Interrogation room ---------- */
.np-room { position: relative; min-height: 100dvh; overflow: hidden; background: var(--np-night); display: flex; flex-direction: column; }
.np-room__scene { position: absolute; left: 0; top: 0; width: 390px; max-width: 100%; height: 520px; pointer-events: none; }
.np-room__scene svg { position: absolute; left: 0; top: 0; }
.np-beam { position: absolute; left: 0; right: 0; top: 110px; height: 370px; clip-path: polygon(34% 0, 66% 0, 96% 100%, 4% 100%);
  background: linear-gradient(to bottom, rgba(255,226,160,.30), rgba(255,226,160,.07)); animation: np-flicker 7s infinite; }
@keyframes np-flicker { 0%,90%,100% { opacity: 1; } 91% { opacity: .72; } 92% { opacity: 1; } 95% { opacity: .85; } 96% { opacity: 1; } }
.np-desk-table { position: absolute; left: 6px; right: 6px; top: 438px; height: 84px; border-radius: 50%;
  background: radial-gradient(ellipse at center, #5c4229 0%, #33231a 55%, #160f0b 100%); }
.np-room__spacer { flex: 1; min-height: 440px; }
.np-dialogue { position: relative; z-index: 20; margin: 0 14px 15px; padding: 26px 16px 16px; background: var(--np-cream); border-radius: 4px;
  box-shadow: 0 -8px 28px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 14px; }
.np-dialogue__tag { position: absolute; left: 14px; top: -13px; padding: 5px 10px; background: var(--np-teal); border: 1px solid var(--np-gold); border-radius: 3px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--np-gold); }
.np-dialogue__line { font-size: 15px; line-height: 1.55; min-height: 3em; }
.np-dialogue__line[data-typing] { cursor: pointer; }
/* Answers and the ending stamp wait until the inspector's line has finished typing (or she taps to skip).
   Before the script starts they're held back too, so they don't flash; if the script never runs they appear after 4 s. */
.np-typing .np-hidden-until-typed { display: none; }
.np-dialogue:has([data-type]:not([data-typed])) .np-hidden-until-typed { animation: np-hold 0s linear 4s both; }
@keyframes np-hold { from { visibility: hidden; } to { visibility: visible; } }
.np-hidden-until-typed { animation: np-fade-in .25s ease-out both; }
@keyframes np-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.np-cursor { display: inline-block; margin-left: 2px; color: var(--np-label); animation: np-blink 1.1s steps(1) infinite; }
@keyframes np-blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
.np-choices { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.np-choice { min-height: 46px; padding: 10px 14px; border: 1px solid var(--np-border-choice); border-radius: 3px; background: var(--np-paper);
  box-shadow: var(--np-shadow-choice); text-align: left; font: 14px/1.4 var(--np-font-dept); color: var(--np-ink); cursor: pointer; width: 100%; }
.np-choice:hover { border-color: var(--np-teal); }
.np-ending { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.np-ending .np-stamp { text-align: center; }

/* ---------- Simple pages ---------- */
.np-page { padding: 60px 14px 32px; display: flex; flex-direction: column; gap: 14px; }
.np-panel { padding: 16px; background: var(--np-cream); border-radius: 4px; box-shadow: var(--np-shadow-card); display: flex; flex-direction: column; gap: 10px; }

/* ---------- Admin ---------- */
.np-admin { max-width: 960px; margin: 0 auto; padding: 0 0 48px; color: var(--np-ink); }
.np-admin-head { background: var(--np-wall); color: var(--np-cream-text); padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.np-admin-head h1 { font-size: 28px; }
.np-admin-head .np-case-header__dept { color: var(--np-gold); }
.np-admin-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.np-admin-nav a { color: var(--np-gold); min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; }
.np-admin-nav a.active { color: var(--np-cream-text); }
.np-admin-section { margin: 14px; padding: 16px; background: var(--np-cream); border-radius: 4px; box-shadow: var(--np-shadow-admin); display: flex; flex-direction: column; gap: 12px; }
.np-admin-section h2 { font-size: 22px; }
.np-admin-section h3 { font-size: 18px; }
.np-meta { font-size: 11px; line-height: 1.4; color: var(--np-meta); }
.np-row-list { list-style: none; margin: 0; padding: 0; }
.np-row-list > li { padding: 10px 0; border-bottom: 1px solid var(--np-rule); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; }
.np-row-list > li:last-child { border-bottom: none; }
.np-chip { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; letter-spacing: .06em; background: var(--np-chip-sealed); color: var(--np-chip-sealed-text); }
.np-chip--ok { background: var(--np-sea); color: var(--np-cream-text); }
.np-chip--open { background: var(--np-gold); color: var(--np-ink); }
.np-chip--warn { background: var(--np-warn-bg); color: var(--np-warn-text); }
.np-chip--bad { background: var(--np-cranberry-dark); color: var(--np-cream-text); }
.np-issue { font-size: 12px; line-height: 1.45; padding: 6px 8px; border-radius: 3px; background: var(--np-paper); border-left: 4px solid var(--np-border-input); }
.np-issue--Error { border-color: var(--np-cranberry-dark); }
.np-issue--Confirm { border-color: var(--np-gold); background: var(--np-warn-bg); }
.np-issue--Warning { border-color: var(--np-sea); }
.np-answer { padding: 8px 10px; background: var(--np-paper); border-radius: 3px; display: flex; flex-direction: column; gap: 2px; }
.np-answer__q { font-size: 11px; line-height: 1.4; color: var(--np-meta); }
.np-answer__a { font: 500 20px/1.1 var(--np-font-hand); }
.np-form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.np-form-row > label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--np-meta); flex: 1 1 160px; }
.np-form-row .np-btn { width: auto; }
.np-danger-zone { border: 2px solid var(--np-border-danger); }
.np-toast { padding: 8px 12px; border-radius: 4px; background: var(--np-sea); color: var(--np-cream-text); font-size: 13px; }
.np-toast--bad { background: var(--np-cranberry-dark); }
.np-table-wrap { overflow-x: auto; }
.np-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.np-table th, .np-table td { padding: 6px 8px; border-bottom: 1px solid var(--np-rule); text-align: left; vertical-align: top; }

/* Editor */
.np-editor { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; margin: 14px; }
@media (max-width: 760px) { .np-editor { grid-template-columns: 1fr; } }
.np-editor__files { display: flex; flex-direction: column; gap: 2px; }
.np-editor__files button { text-align: left; min-height: 40px; padding: 6px 10px; border: none; border-radius: 3px; background: transparent; font: 13px var(--np-font-dept); color: var(--np-ink); cursor: pointer; }
.np-editor__files button.active { background: var(--np-paper-sealed); }
.np-code { width: 100%; min-height: 480px; padding: 14px; border: 1px solid var(--np-border-input); border-radius: 3px; background: var(--np-code); color: var(--np-cream-muted);
  font: 12.5px/1.6 var(--np-font-code); tab-size: 2; resize: vertical; }

dialog.np-dialog { border: none; border-radius: 4px; padding: 20px; background: var(--np-cream); max-width: 360px; box-shadow: var(--np-shadow-card); }
dialog.np-dialog::backdrop { background: rgba(6,13,14,.7); }

/* Motion off when she asks for less of it. */
@media (prefers-reduced-motion: reduce) {
  .np-snow, .np-snow2, .np-beam, .np-cursor, .np-stamp--slam, .np-shake, .np-string .is-drawing, .np-hidden-until-typed { animation: none !important; }
  .np-string .is-drawing { stroke-dashoffset: 0; }
}

/* Full-width backgrounds behind the 390 px column */
.np-screen { min-height: 100dvh; background: var(--np-wall); }
.np-screen--night { background: var(--np-night); }
.np-screen--admin { background: var(--np-admin-bg); }

/* Rehearsal mode strip (never on the real site) */
.np-rehearsal { background: var(--np-cranberry); color: var(--np-cream); font-size: 11px; letter-spacing: .06em; text-align: center; padding: 4px 16px; }

/* ---------- Share the case file (V1, V7) ---------- */
.np-share { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px 32px; }
.np-share__head { display: flex; flex-direction: column; gap: 6px; color: var(--np-cream-text); }
.np-share__head h1 { font-size: 32px; line-height: 1.05; }
.np-share__head p { font-size: 13px; line-height: 1.5; color: var(--np-cream-muted); }
.np-share__panel { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--np-cream); border-radius: 3px; box-shadow: var(--np-shadow-card); }
.np-share__notice { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; font-size: 13px; line-height: 1.4; background: var(--np-sticky); }
.np-share__empty { font-size: 20px; color: var(--np-label); }
.np-share__list { list-style: none; margin: 0; padding: 0; }
.np-share__list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--np-rule); }
.np-share__list li:last-child { border-bottom: none; }
.np-share__email { font-size: 14px; overflow-wrap: anywhere; }
.np-share__remove { min-height: 44px; border-color: var(--np-border-remove); color: var(--np-cranberry-dark); font-size: 13px; }
.np-share__toggle { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; line-height: 1.4; }
.np-switch { flex-shrink: 0; min-width: 64px; min-height: 44px; padding: 0 12px; border: 2px solid var(--np-teal); border-radius: 22px; background: transparent;
  color: var(--np-teal); font: 13px var(--np-font-dept); cursor: pointer; }
.np-switch[aria-checked=true] { background: var(--np-teal); color: var(--np-cream-text); }
.np-share .np-memo { max-width: none; }

/* ---------- Guest board (V4–V8) ---------- */
.np-banner--guest { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.np-banner__sub { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--np-meta); }
.np-case-header__greeting { font-size: 13px; line-height: 1.5; color: var(--np-cream-muted); }
.np-mini-grid { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; width: 100%; }
.np-mini { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 10px 12px; background: var(--np-cream); border-radius: 2px; box-shadow: var(--np-shadow-card); }
.np-mini:nth-child(odd) { transform: rotate(-1.5deg); }
.np-mini:nth-child(even) { transform: rotate(1.5deg); }
.np-mini h2 { font-size: 18px; line-height: 1.1; }
.np-mini .np-polaroid img, .np-mini .np-polaroid__empty { height: 80px; }
.np-mini .np-polaroid figcaption { font-size: 15px; }
.np-mini .np-card__statement { font-size: 11px; }
.np-mini .np-card__stamp { font-size: 10px; max-width: 100%; }
.np-mini-sealed { position: relative; z-index: 3; align-self: center; padding: 4px 10px; background: var(--np-paper-sealed); }
.np-letter { position: relative; z-index: 3; align-self: center; width: 100%; max-width: 318px; padding: 18px 16px; background: var(--np-paper-letter);
  box-shadow: var(--np-shadow-card); display: flex; flex-direction: column; gap: 10px; }
.np-letter h2 { font-size: 22px; }
.np-letter p { font: 500 20px/1.35 var(--np-font-hand); white-space: pre-line; }

/* ---------- Visual claim editor (E6, E7) ---------- */
.np-claim-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.np-claim-list li { display: flex; align-items: stretch; gap: 4px; border-radius: 3px; }
.np-claim-list li.active { background: var(--np-paper-sealed); }
.np-claim-list__open { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; padding: 6px 8px; border: none;
  background: transparent; font: 13px var(--np-font-dept); color: var(--np-ink); text-align: left; cursor: pointer; }
.np-claim-list__move { display: flex; flex-direction: column; }
.np-claim-list__move button { width: 32px; flex: 1; min-height: 22px; border: none; background: transparent; color: var(--np-teal); cursor: pointer; font-size: 14px; }
.np-claim-list__move button[disabled] { color: var(--np-chip-sealed); cursor: default; }
.np-check { flex-direction: row !important; align-items: center; gap: 8px !important; font-size: 13px !important; color: var(--np-ink) !important; }
.np-check input { width: 20px; height: 20px; }
.np-step-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--np-paper); border: 1px solid var(--np-rule); border-radius: 4px; }
.np-step-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; }
.np-step-card__kind { width: auto; min-height: 40px; }
.np-step-card__rename { width: 160px; min-height: 40px; }
.np-step-card__field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--np-meta); }
.np-step-card__choice { align-items: flex-end; }
.np-claims-actions { position: sticky; bottom: 0; padding: 10px 0; background: var(--np-cream); border-top: 1px solid var(--np-rule); }
.np-share__panel h2.np-eyebrow { font-family: var(--np-font-dept); font-size: 11px; }
