/* NSS theme for Kaneo v2 (2026-11-05, live) - from STARTER (colors and logo only; NO font changes).
   Light = official NSS brand guide (inventory/brand/nss-brand-guide-2026-11-04.html).
   Dark = DERIVED PROPOSAL (the guide has no dark palette): Pete must approve; verify contrast numerically.
   Serve from /srv/nss-theme via Caddy; inject with replace-response. Do not add @import, --font-* or font-family rules. */

:root {
  --background: #FFFEF3;            /* Cave Cream */
  --foreground: #434343;            /* Charcoal */
  --card: #FFFFFF;
  --card-foreground: #434343;
  --popover: #FFFFFF;
  --primary: #924444;               /* NSS Red */
  --primary-foreground: #FFFFFF;
  --ring: #924444;
  --muted-foreground: #6B6B6B;
  --border: color-mix(in oklab, #434343 14%, transparent);
  --sidebar: #E7E5D7;               /* Limestone */
  --sidebar-foreground: #434343;
  --sidebar-primary: #924444;
  --sidebar-primary-foreground: #FFFFFF;
  --sidebar-border: color-mix(in oklab, #434343 14%, transparent);
  --sidebar-ring: #924444;
}

.dark {                              /* PROPOSAL - confirm with Pete */
  --background: #1E1D1A;
  --foreground: #F3F1E6;
  --card: #272622;
  --card-foreground: #F3F1E6;
  --popover: #272622;
  --primary: #CF7474;               /* derived: lightened NSS Red, 5.1:1 on dark bg (WCAG AA) */
  --primary-foreground: #1E1D1A;
  --ring: #CF7474;
  --muted-foreground: #B5B1A2;
  --border: color-mix(in oklab, #FFFFFF 10%, transparent);
  --sidebar: #191815;
  --sidebar-foreground: #E4E1D3;
  --sidebar-primary: #CF7474;
  --sidebar-primary-foreground: #1E1D1A;
  --sidebar-border: color-mix(in oklab, #FFFFFF 8%, transparent);
  --sidebar-ring: #CF7474;
}

/* active sidebar item: NSS Red bar + soft wash (verified selector on Kaneo 2.49) */
[data-slot="sidebar-container"] [data-active="true"] {
  background: color-mix(in oklab, #924444 12%, transparent) !important;
  box-shadow: inset 3px 0 0 #924444;
}
.dark [data-slot="sidebar-container"] [data-active="true"] {
  background: color-mix(in oklab, #CF7474 16%, transparent) !important;
  box-shadow: inset 3px 0 0 #CF7474;
}
[role="tab"][aria-selected="true"] { box-shadow: inset 0 -2px 0 #924444; }
.dark [role="tab"][aria-selected="true"] { box-shadow: inset 0 -2px 0 #CF7474; }
::selection { background: #924444; color: #FFFFFF; }

/* v2: NSS logo centred above "Invite people" (top of the sidebar footer). Logo file served by Caddy from /srv/nss-theme.
   612x320 source shown at 120 px wide: keep the (R), do not recolor or stretch; on dark it sits on a cream pill. */
@media (min-width: 768px) {
  [data-slot="sidebar-footer"]::before {
    content: "";
    display: block;
    align-self: center;
    box-sizing: content-box;
    width: 120px;
    height: 63px;
    margin: 4px auto 8px;
    background: url("/nss-logo.png") no-repeat center / contain;
    pointer-events: none;
  }
  .dark [data-slot="sidebar-footer"]::before {
    background-color: #FFFEF3;
    background-origin: content-box;
    padding: 4px 8px;
    border-radius: 8px;
  }
  [data-collapsible="icon"] [data-slot="sidebar-footer"]::before { display: none; }
}
