/**
 * Lilith global stylesheet.
 *
 * Loaded by the root layout. Replaces the legacy dark/aqua wash with
 * cream-paper light, and exposes the canonical palette as CSS variables for
 * non-React surfaces (the Next/Tailwind ecosystem can read these without
 * importing the TS tokens).
 */

:root {
  /* Palette */
  --l-bg: #f1ebdd;
  --l-paper: #f7f1e2;
  --l-paper-2: #ede4cf;
  /* Raised card surface (tour dialog etc.) — must be theme-correct: the
     undefined token once fell back to light cream in dusk, putting light
     ink on a light card (EVE-VIS-005). */
  --l-surface-raised: #fbf7ec;
  --l-ink: #1f1a14;
  --l-ink-2: #3b3325;
  /* nudged darker (#5f5548 -> #574d3f) so muted body text clears WCAG AA 4.5:1
     even on the slightly-darker cream cards (e.g. #cdc8bc, previously 4.37:1);
     theme-scoped (dusk/cream-hc override below), strictly raises contrast. */
  --l-muted: #574d3f;
  --l-soft: #6b5d49;
  --l-rule: #d9cfb7;
  --l-rule-2: #e6dec6;
  --l-grid: #dfd4b4;
  --l-chip: #e8dfc7;
  --l-accent: #9a3e1c;
  --l-accent-2: #c97247;
  /* cream-safe TEXT variant of --l-accent-2 (#c97247 is a fill/accent value that
     only reaches ~3:1 as text on cream). Use --l-accent-2-text wherever the
     secondary accent is applied as text/label colour. */
  --l-accent-2-text: #8f4a1e;
  /* tint-safe TEXT variant of --l-accent. The brand accent (#9a3e1c) clears AA
     as text on plain cream (5.7:1) but lands at exactly 4.48:1 — just under AA —
     once it sits on a faint terracotta-tint pill (rgba(154,62,28,.10) composites
     cream down to ~#dcd0bd). This holds >=5:1 on that tint and >=6:1 on cream.
     Use for accent text/labels on accent-tinted surfaces, not for fills. */
  --l-accent-text: #8a3716;
  --l-ok: #3f5e2b;
  --l-ok-text: #2c4318;
  /* nudged darker (#7a5a23 -> #6f5220): the old value cleared AA on paper but
     only reached ~4.3:1 as text on the slightly-darker warm chip/card surfaces
     (#ded4bf/#e0d7c3); this holds >=4.9:1 across that whole family. */
  --l-warn: #6f5220;
  --l-alert: #7a2c12;

  /* Foreground colors for badges that use var(--l-{status}) as background.
     Theme-aware: dark text on lifted dusk pastels, light text on saturated
     cream-mode darks. */
  --l-ok-fg: #ffffff;
  --l-warn-fg: #ffffff;
  --l-alert-fg: #ffffff;

  /*
   * RGB-tuple companions for the paper/ink palette. Use as
   * rgba(var(--l-paper-rgb), 0.96) when you need a theme-aware translucent
   * paper background — replaces the old hardcoded rgba(247, 241, 226, 0.96)
   * pattern that read as cream-on-cream once the dusk theme switched the
   * surrounding shell to dark.
   */
  --l-paper-rgb: 247, 241, 226;
  --l-paper-2-rgb: 237, 228, 207;
  --l-bg-rgb: 241, 235, 221;
  --l-ink-rgb: 31, 26, 20;

  /*
   * Domain text accents — tuned for cream paper backgrounds. Each is a
   * darkened domain hue with ≥4.5:1 contrast against #f7f1e2. The dusk
   * theme below overrides each with a lifted hue so they remain readable on
   * dark paper without losing domain identity.
   */
  --l-tara-text-accent: #0f5964;
  --l-veritas-text-accent: #17506f;
  --l-nyx-text-accent: #4c3f9e;
  --l-arete-text-accent: #1b5e42;
  --l-nisaba-text-accent: #6b4616;
  --l-metis-text-accent: #1e40af;

  /* Knowledge-graph entity hues — passes 4.5:1 on cream and dusk */
  --l-kg-person: #6b4616;
  --l-kg-organization: var(--l-ok);
  --l-kg-location: #8c5a1f;
  --l-kg-event: var(--l-alert);
  --l-kg-topic: var(--l-accent);

  /* Eisenhower quadrant accents — passes 4.5:1 on cream paper */
  --l-eisen-q1: #b91c1c;
  --l-eisen-q2: var(--l-accent);
  --l-eisen-q3: #8c5a1f;
  --l-eisen-q4: #4b5563;

  /*
   * Semantic surfaces — the canonical translucent paper washes. Components
   * historically hand-rolled rgba(var(--l-paper-rgb), α) at dozens of ad-hoc
   * alphas (and, worse, sometimes reached for --l-ink-rgb, which inverts
   * against ink-family text in exactly one theme — the "ink plate" bug class
   * from the 2026-07-03 audit). Use these four steps instead; they track the
   * paper family in every theme, so ink/muted text on top stays readable in
   * cream, cream-hc, and dusk alike.
   *   veil  — barely-there hover/section wash
   *   wash  — quiet panel fill inside another panel
   *   card  — standard raised card fill
   *   solid — near-opaque sheet (menus, docks, sticky chrome)
   */
  --l-surface-veil: rgba(var(--l-paper-rgb), 0.4);
  --l-surface-wash: rgba(var(--l-paper-rgb), 0.66);
  --l-surface-card: rgba(var(--l-paper-rgb), 0.86);
  --l-surface-solid: rgba(var(--l-paper-rgb), 0.97);
  /*
   * Modal scrim. Pinned to literal ink so it DIMS the backdrop in every
   * theme — rgba(var(--l-ink-rgb), …) turns into a cream lightening veil on
   * dusk, which reads as fog, not focus.
   */
  --l-scrim: rgba(31, 26, 20, 0.55);

  /* Typography */
  --l-serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --l-sans: 'Inter', system-ui, sans-serif;
  --l-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  /* Motion */
  --l-motion-fast: 120ms;
  --l-motion-base: 220ms;
  --l-motion-slow: 420ms;
  --l-ease-paper: cubic-bezier(0.2, 0.7, 0.2, 1);
  --l-ease-ink: cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: light;
}

/*
 * Immersive plate — a full-screen surface that is DARK in every theme.
 *
 * Tara's session player, and its completion and reflection screens, paint
 * `rgba(var(--l-ink-rgb), 0.97)` and put light content on it: the paper/ink
 * relationship is deliberately INVERTED there, the way a cinema is dark
 * whatever time of day it is. Both halves of that inversion move with the
 * theme, so under dusk the plate turned into a near-white sheet still carrying
 * near-white content — the session's own follow-up action measured 1.09:1
 * (EVE-VIS-199), and the title, the segment labels and the caption went with
 * it. The same reasoning already pins `--l-scrim` to literal ink.
 *
 * So this block pins BOTH sides of the inversion:
 *
 *   - the TUPLES (`--l-ink-rgb`, `--l-paper-rgb`) keep their cream values,
 *     because the plate is painted from the first and its hairlines, tints and
 *     light fills from the second;
 *   - the NAMED foreground tokens point at the light end, because on this
 *     surface they are text. `--l-ink` is the one that looks strange —
 *     deliberately opposite its own tuple — and it is what makes any component
 *     that colours text with it readable here, including every `h1`–`h3`
 *     picking up the global heading rule below (which is what made the session
 *     title 1.07:1 in CREAM, where nobody had thought to look).
 *
 * Applies to descendants by inheritance, so the three player surfaces are the
 * only places that need the class.
 */
.lilithImmersivePlate {
  --l-ink-rgb: 31, 26, 20;
  --l-paper-rgb: 247, 241, 226;
  --l-paper: #f7f1e2;
  --l-paper-2: #ede4cf;
  --l-ink: #f7f1e2;
  --l-ink-2: #e7dec8;
  /* Both clear AA against the plate (#251f19): 9.3:1 and 7.4:1. */
  --l-muted: #cabfa6;
  --l-soft: #b6ab92;
  /*
   * Domain text accents come in two tunings — dark for cream paper, lifted for
   * dusk paper. This surface is dusk-dark whatever the theme, so it takes the
   * lifted set: the cream tuning put the completion screen's own numbers at
   * 2.02:1.
   */
  --l-tara-text-accent: #6fc2cf;
  --l-veritas-text-accent: #7ab4dc;
  --l-nyx-text-accent: #b5acf0;
  --l-arete-text-accent: #88cba4;
  --l-nisaba-text-accent: #d4a875;
  --l-metis-text-accent: #93afea;
  color: var(--l-paper);
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--l-bg);
  color: var(--l-ink);
  font-family: var(--l-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

a {
  color: inherit;
}

/* Focus ring — two-stroke, paper inset + ink */
:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--l-bg),
    0 0 0 4px var(--l-ink);
  border-radius: 4px;
}

::selection {
  background: var(--l-accent);
  color: var(--l-bg);
}

/* High-contrast accessibility variant */
[data-lilith-theme='cream-hc'] {
  --l-ink: #000000;
  --l-ink-2: #1a140a;
  --l-muted: #3a3122;
  --l-rule: #7a6c4e;
  --l-rule-2: #a89572;
  --l-accent: #7a2e10;
  /* cream-hc tint-safe accent text — clears the >=7:1 hc target on the tint */
  --l-accent-text: #6e2a0e;
  --l-chip: #dfd2b0;
  --l-ink-rgb: 0, 0, 0;
  /* Status colors lifted for ≥7:1 contrast on cream-hc */
  --l-ok: #2c4318;
  --l-ok-text: #2c4318;
  --l-warn: #5a4118;
  --l-alert: #5a1f0a;
}

/*
 * Dusk — evening reading register.
 *
 * Two entry points share this block:
 *   - [data-lilith-theme='dusk']    — the user's theme choice, set on <html>.
 *   - [data-lilith-register='night'] — a component-scoped register for
 *     surfaces that are night rooms BY DESIGN (planetarium, solar monitor,
 *     NEO tracker, telescope tools). Put it on the room's container and every
 *     --l-* token inside resolves to the warm-night palette regardless of the
 *     app theme, so the room stays a night room on cream too.
 */
[data-lilith-theme='dusk'],
[data-lilith-register='night'] {
  --l-bg: #241c12;
  --l-paper: #2c2418;
  --l-paper-2: #33291b;
  --l-surface-raised: #3a2f1f;
  --l-ink: #f1e8d0;
  --l-ink-2: #dccaa6;
  --l-muted: #c0ad8d;
  --l-soft: #b5a487;
  --l-rule: #4a3d28;
  --l-rule-2: #3a3120;
  --l-grid: #3d3320;
  --l-chip: #3a3020;
  --l-accent: #e58a5e;
  --l-accent-2: #f0a778;
  /* dusk: light terracotta reads as text on the dark dusk paper. */
  --l-accent-2-text: #f0a778;
  /* dusk tint sits over dark paper, so accent text must stay light. */
  --l-accent-text: #e58a5e;
  --l-paper-rgb: 44, 36, 24;
  --l-paper-2-rgb: 51, 41, 27;
  --l-bg-rgb: 36, 28, 18;
  --l-ink-rgb: 241, 232, 208;
  /* Domain text accents lifted to ≥4.5:1 against dusk paper #2c2418 */
  --l-tara-text-accent: #6fc2cf;
  --l-veritas-text-accent: #7ab4dc;
  --l-nyx-text-accent: #b5acf0;
  --l-arete-text-accent: #88cba4;
  --l-nisaba-text-accent: #d4a875;
  --l-metis-text-accent: #93afea;
  /* Knowledge-graph entity hues lifted for dusk paper */
  --l-kg-person: #d4b07d;
  --l-kg-organization: var(--l-ok);
  --l-kg-location: #e5b878;
  --l-kg-event: var(--l-alert);
  --l-kg-topic: var(--l-accent);
  /* Eisenhower quadrant accents lifted for dusk paper */
  --l-eisen-q1: #f0a890;
  --l-eisen-q2: var(--l-accent);
  --l-eisen-q3: #e5b878;
  --l-eisen-q4: #b8b0a0;
  /* Status colors tuned for dusk paper (≥4.5:1 AA on #2c2418) */
  --l-ok: #a8c98a;
  --l-ok-text: #a8c98a;
  --l-warn: #d4a87a;
  --l-alert: #f0a890;
  /* Foreground inversion: dark text on the lifted dusk status pastels */
  --l-ok-fg: #1f1a14;
  --l-warn-fg: #1f1a14;
  --l-alert-fg: #1f1a14;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --l-motion-fast: 0ms;
    --l-motion-base: 0ms;
    --l-motion-slow: 0ms;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.v2-shell-tile {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.85fr) auto;
  gap: 18px;
  align-items: stretch;
  border: 1px solid var(--l-rule);
  border-radius: 8px;
  background: var(--l-paper);
  padding: 22px;
  color: var(--l-ink);
}

.v2-shell-tile__main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.v2-shell-tile__title,
.v2-shell-panel h2,
.v2-shell-stack-note h2 {
  margin: 0;
  font-family: var(--l-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
}

.v2-shell-tile__summary,
.v2-shell-panel p,
.v2-shell-stack-note p {
  margin: 0;
  color: var(--l-muted);
  font-size: 14px;
  line-height: 1.55;
}

.v2-shell-client-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v2-shell-client-list__item {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--l-rule);
  border-radius: 8px;
  background: var(--l-chip);
  padding: 0 8px;
  font-family: var(--l-mono);
  font-size: 11px;
  letter-spacing: 0;
}

.v2-shell-tile__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.v2-shell-tile__metrics div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--l-rule-2);
  border-radius: 8px;
  background: var(--l-bg);
  padding: 12px;
}

.v2-shell-tile__metrics dt {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--l-muted);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.v2-shell-tile__metrics dd {
  margin: 0;
  font-family: var(--l-serif);
  font-size: 25px;
  line-height: 1;
}

.v2-shell-tile__action,
.v2-shell-panel__link,
.v2-shell-surface__back a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--l-ink);
  border-radius: 8px;
  color: var(--l-ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.v2-shell-tile__action {
  min-height: 44px;
  align-self: end;
  padding: 0 14px;
  background: var(--l-ink);
  color: var(--l-bg);
}

.v2-public-chrome {
  max-width: 100vw;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.v2-public-chrome > * {
  min-width: max-content;
}

.v2-shell-surface {
  display: grid;
  gap: 24px;
  padding: 36px 56px 64px;
}

.v2-shell-surface__back {
  display: flex;
}

.v2-shell-surface__back a {
  min-height: 34px;
  border-color: var(--l-rule);
  padding: 0 10px;
  color: var(--l-muted);
}

.v2-shell-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid #2f5d50;
  border-radius: 8px;
  padding: 0 10px;
  color: #2f5d50;
  font-family: var(--l-mono);
  font-size: 11px;
  letter-spacing: 0;
}

.v2-shell-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.v2-shell-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--l-rule);
  border-radius: 8px;
  background: var(--l-paper);
  padding: 20px;
}

.v2-shell-list,
.v2-shell-route-list,
.v2-shell-contracts {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.v2-shell-list {
  list-style: none;
}

.v2-shell-list li,
.v2-shell-route-list a,
.v2-shell-contracts div {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--l-rule-2);
  color: var(--l-ink);
  text-decoration: none;
  font-size: 13px;
}

.v2-shell-list li {
  justify-content: flex-start;
}

.v2-shell-route-list a span:last-child,
.v2-shell-contracts strong {
  color: #224f74;
  font-family: var(--l-mono);
  font-size: 11px;
  font-weight: 500;
}

.v2-shell-panel__link {
  min-height: 38px;
  justify-self: start;
  padding: 0 12px;
}

.v2-shell-stack-note {
  display: grid;
  grid-template-columns: minmax(120px, 0.25fr) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--l-ink);
  border-bottom: 1px solid var(--l-ink);
  padding: 18px 0;
}

.v2-shell-stack-note code {
  border: 1px solid var(--l-rule);
  border-radius: 8px;
  background: var(--l-paper);
  padding: 8px 10px;
  color: var(--l-muted);
  font-size: 11px;
}

@media (max-width: 960px) {
  .v2-shell-tile,
  .v2-shell-grid,
  .v2-shell-stack-note {
    grid-template-columns: 1fr;
  }

  .v2-shell-tile__action,
  .v2-shell-panel__link {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .v2-shell-surface {
    padding: 24px 20px 48px;
  }

  .v2-shell-tile {
    padding: 18px;
  }

  .v2-shell-tile__metrics {
    grid-template-columns: 1fr;
  }

  .v2-shell-tile__title,
  .v2-shell-panel h2,
  .v2-shell-stack-note h2 {
    font-size: 21px;
  }
}

/* ==========================================================================
   Lilith Broadsheet — responsive landing layouts
   Used by MarketingLanding and other broadsheet-style pages.
   Designers consume via data-lilith-broadsheet=<variant> attributes
   so primitive components can stay free of media queries.
   ========================================================================== */

[data-lilith-broadsheet='page'] {
  padding: 36px 56px 0;
}

[data-lilith-broadsheet='three-col'] {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.4fr 1px 1fr 1px 1fr;
  gap: 28px;
}

[data-lilith-broadsheet='rule-vertical'] {
  align-self: stretch;
}

@media (max-width: 1024px) {
  [data-lilith-broadsheet='page'] {
    padding: 28px 36px 0;
  }
  [data-lilith-broadsheet='three-col'] {
    grid-template-columns: 1.4fr 1px 1fr;
    row-gap: 32px;
  }
  [data-lilith-broadsheet='three-col'] > :nth-child(4),
  [data-lilith-broadsheet='three-col'] > :nth-child(5) {
    grid-column: 1 / -1;
  }
  [data-lilith-broadsheet='three-col'] > :nth-child(4) {
    height: 1px;
    background: var(--l-rule);
  }
}

@media (max-width: 720px) {
  [data-lilith-broadsheet='page'] {
    padding: 22px 18px 0;
  }
  [data-lilith-broadsheet='three-col'] {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 28px;
  }
  [data-lilith-broadsheet='three-col'] > :nth-child(2),
  [data-lilith-broadsheet='three-col'] > :nth-child(4) {
    display: none; /* hide column rules on stack */
  }
}

[data-lilith-broadsheet='masthead-grid'] {
  display: grid;
  gap: 12px;
}

[data-lilith-broadsheet='footer'] {
  margin-top: 80px;
  padding: 40px 56px 32px;
  border-top: 2px solid var(--l-ink);
  background: var(--l-bg);
  font-family: var(--l-sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--l-muted);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 28px;
}

@media (max-width: 1024px) {
  [data-lilith-broadsheet='footer'] {
    padding: 32px 36px 28px;
    grid-template-columns: 2fr 1fr 1fr;
    row-gap: 32px;
  }
}

@media (max-width: 720px) {
  [data-lilith-broadsheet='footer'] {
    padding: 28px 20px 24px;
    grid-template-columns: 1fr 1fr;
    row-gap: 28px;
  }
}

@media (max-width: 480px) {
  [data-lilith-broadsheet='footer'] {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Lilith Customer Nav — responsive shell chrome
   ========================================================================== */

[data-lilith-nav='customer'] {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 20px 56px 14px;
  font-family: var(--l-sans);
}

[data-lilith-nav='customer'] [data-lilith-nav-mark] {
  font-size: 22px;
  padding-right: 28px;
  border-right: 1px solid var(--l-rule);
  flex-shrink: 0;
}

[data-lilith-nav='customer'] [data-lilith-nav-primary] {
  display: flex;
  gap: 24px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  min-width: 0;
}

[data-lilith-nav='customer'] [data-lilith-nav-actions] {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--l-muted);
}

[data-lilith-nav='customer'] [data-lilith-nav-kbd] {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: none;
}

[data-lilith-nav='customer'] [data-lilith-nav-avatar] {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

@media (max-width: 960px) {
  [data-lilith-nav='customer'] {
    padding: 18px 28px 12px;
    gap: 22px;
  }
  [data-lilith-nav='customer'] [data-lilith-nav-mark] {
    padding-right: 22px;
  }
  [data-lilith-nav='customer'] [data-lilith-nav-actions] [data-lilith-nav-label] {
    display: none;
  }
}

@media (max-width: 640px) {
  [data-lilith-nav='customer'] {
    padding: 14px 18px 10px;
    gap: 16px;
    flex-wrap: nowrap;
  }
  [data-lilith-nav='customer'] [data-lilith-nav-mark] {
    padding-right: 16px;
    font-size: 18px;
  }
  [data-lilith-nav='customer'] [data-lilith-nav-primary] {
    overflow-x: auto;
    overflow-y: hidden;
    gap: 18px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1 1 auto;
    white-space: nowrap;
  }
  [data-lilith-nav='customer'] [data-lilith-nav-primary]::-webkit-scrollbar {
    display: none;
  }
  [data-lilith-nav='customer'] [data-lilith-nav-actions] {
    gap: 10px;
  }
  [data-lilith-nav='customer'] [data-lilith-nav-actions] [data-lilith-nav-kbd] {
    display: none;
  }
}

@media (max-width: 380px) {
  [data-lilith-nav='customer'] [data-lilith-nav-mark] {
    display: none;
  }
}

/* ==========================================================================
   Lilith Subnav + Tara Room — responsive manuscript surfaces
   ========================================================================== */

[data-lilith-subnav] {
  -ms-overflow-style: none;
}

[data-lilith-subnav]::-webkit-scrollbar {
  display: none;
}

[data-lilith-subnav-item] {
  flex: 0 0 auto;
}

[data-tara-room-page] {
  padding: 36px 56px 64px;
}

[data-tara-room-masthead] {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--l-ink);
  margin-bottom: 28px;
}

[data-tara-room-grid] {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 36px;
}

[data-tara-room-primary],
[data-tara-room-secondary] {
  min-width: 0;
}

[data-tara-room-secondary] {
  border-left: 1px solid var(--l-rule);
  padding-left: 36px;
}

[data-tara-sitting-row] {
  grid-template-columns: 36px minmax(0, 1fr) 60px 30px;
  gap: 14px;
}

@media (max-width: 900px) {
  [data-tara-room-page] {
    padding: 32px 32px 56px;
  }

  [data-tara-room-grid] {
    gap: 28px;
  }

  [data-tara-room-secondary] {
    padding-left: 28px;
  }
}

@media (max-width: 720px) {
  [data-tara-room-page] {
    padding: 28px 18px 48px;
  }

  [data-tara-room-masthead] {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  [data-tara-room-grid] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  [data-tara-room-secondary] {
    border-left: 0;
    border-top: 1px solid var(--l-rule);
    margin-top: 28px;
    padding-left: 0;
    padding-top: 28px;
  }
}

@media (max-width: 480px) {
  [data-tara-sitting-row] {
    grid-template-columns: 34px minmax(0, 1fr) 46px 20px;
    gap: 10px;
  }
}

/* ==========================================================================
   Arete Room - responsive manuscript surface
   ========================================================================== */

[data-arete-room-page] {
  padding: 36px 56px 64px;
}

[data-arete-room-masthead] {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--l-ink);
  margin-bottom: 28px;
}

[data-arete-room-grid] {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 36px;
}

[data-arete-room-primary],
[data-arete-room-secondary] {
  min-width: 0;
}

[data-arete-room-intention-row] {
  grid-template-columns: minmax(0, 1fr) auto minmax(160px, 220px) 60px;
  gap: 18px;
}

@media (max-width: 1024px) {
  [data-arete-room-page] {
    padding: 32px 32px 56px;
  }

  [data-arete-room-grid] {
    gap: 28px;
  }

  [data-arete-room-intention-row] {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  [data-arete-room-intention-week] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  [data-arete-room-page] {
    padding: 28px 18px 48px;
  }

  [data-arete-room-masthead] {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  [data-arete-room-grid] {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-arete-room-secondary] {
    border-top: 1px solid var(--l-rule);
    margin-top: 28px;
    padding-top: 28px;
  }
}

/* ==========================================================================
   Veritas Room - responsive broadsheet evidence desk
   ========================================================================== */

[data-veritas-room-page] {
  padding: 32px 56px 64px;
}

[data-veritas-room-masthead] {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--l-ink);
  font-family: var(--l-sans);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--l-muted);
}

[data-veritas-room-grid] {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1px minmax(0, 1fr);
  gap: 36px;
  margin-top: 32px;
}

[data-veritas-room-article],
[data-veritas-room-evidence-rail] {
  min-width: 0;
}

[data-veritas-room-evidence-rail] {
  position: sticky;
  top: 24px;
  align-self: flex-start;
}

[data-veritas-room-headline] {
  max-width: 100%;
}

@media (max-width: 1080px) {
  [data-veritas-room-page] {
    padding: 32px 32px 56px;
  }

  [data-veritas-room-grid] {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  [data-veritas-room-column-rule] {
    display: none;
  }

  [data-veritas-room-evidence-rail] {
    position: static;
    border-top: 1px solid var(--l-rule);
    padding-top: 28px;
  }
}

@media (max-width: 720px) {
  [data-veritas-room-page] {
    padding: 28px 18px 48px;
  }

  [data-veritas-room-masthead] {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    letter-spacing: 1.4px;
  }
}

/* ==========================================================================
   Lilith Default Heading Treatment
   Applies cormorant serif typography to every h1, h2, h3 in customer
   surfaces unless the component specifies its own font-family inline.
   Studio operator surfaces (data-shell-kind="operator") opt out so they
   keep their dense sans register. Eyebrow labels (uppercase, small)
   keep the sans family via the data-l-eyebrow opt-out.
   ========================================================================== */

h1,
h2,
h3 {
  font-family: var(--l-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--l-ink);
  text-wrap: balance;
}

h1 {
  letter-spacing: -0.018em;
  line-height: 1.05;
}

h2 {
  letter-spacing: -0.014em;
  line-height: 1.1;
}

/* Operator/studio dense surfaces keep the sans register. */
[data-shell-kind='operator'] h1,
[data-shell-kind='operator'] h2,
[data-shell-kind='operator'] h3 {
  font-family: var(--l-sans);
  font-weight: 600;
  letter-spacing: 0;
}

/* Components that explicitly opt out of serif via data attribute. */
[data-l-no-serif] h1,
[data-l-no-serif] h2,
[data-l-no-serif] h3,
h1[data-l-no-serif],
h2[data-l-no-serif],
h3[data-l-no-serif] {
  font-family: var(--l-sans);
  font-weight: 600;
  letter-spacing: 0;
}

/* Small uppercase 'eyebrow' style headings remain sans by convention.
   Components mark them with data-l-eyebrow or use very small font-size. */
[data-l-eyebrow] {
  font-family: var(--l-sans) !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--l-muted);
}

/* ==========================================================================
   Lilith Comprehensive Editorial Reset
   Propagates link, button, input, focus, selection, scrollbar, and motion
   conventions across every customer surface. Studio operator surfaces
   ([data-shell-kind='operator']) and explicit opt-outs ([data-l-no-reset])
   keep their native browser defaults.
   ========================================================================== */

/* Links inherit ink color by default; underline on hover only. */
a {
  color: var(--l-ink);
  text-decoration: none;
  transition: color var(--l-motion-fast) var(--l-ease-paper);
}

a:hover {
  color: var(--l-accent);
}

a:visited {
  color: inherit;
}

/* Bare buttons (no className, no inline background) inherit the page font
   and color so a stray <button>Click</button> still reads in the editorial
   register instead of platform default. */
button {
  font-family: inherit;
  color: inherit;
  -webkit-font-smoothing: inherit;
}

/* Form inputs adopt the lilith register by default. */
input,
select,
textarea {
  font-family: inherit;
  color: var(--l-ink);
  font-size: 15px;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: var(--l-muted);
  opacity: 0.85;
}

/* Customer-surface focus ring: two-stroke (paper inset + ink outer) for
   the warm cream tone. Studio surfaces fall back to the browser default.
   This complements the existing :focus-visible rule earlier in the file —
   that rule wins via cascade order because it comes first; this is a no-op
   placeholder kept for documentation. */

/* Text selection — cream highlight on terracotta. */
::selection {
  background: var(--l-accent);
  color: var(--l-bg);
}

/* Scrollbar — warm cream rail with ink thumb, scoped to customer surfaces. */
[data-shell-kind='customer'] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

[data-shell-kind='customer'] ::-webkit-scrollbar-track {
  background: var(--l-paper);
}

[data-shell-kind='customer'] ::-webkit-scrollbar-thumb {
  background: var(--l-rule);
  border-radius: 999px;
  border: 2px solid var(--l-paper);
}

[data-shell-kind='customer'] ::-webkit-scrollbar-thumb:hover {
  background: var(--l-soft);
}

/* Native dialog / details summary picks up lilith chrome. */
dialog {
  border: 1px solid var(--l-rule);
  border-radius: 8px;
  background: var(--l-paper);
  color: var(--l-ink);
  font-family: var(--l-sans);
  padding: 24px;
  box-shadow: 0 24px 64px rgba(31, 26, 20, 0.18);
}

details > summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--l-sans);
  color: var(--l-ink);
  font-weight: 500;
}

details > summary::-webkit-details-marker {
  display: none;
}

/* Native HR — warm rule by default. */
hr {
  border: none;
  border-top: 1px solid var(--l-rule);
  margin: 24px 0;
}

/* Native blockquote — italic editorial pull. */
blockquote {
  margin: 0;
  padding: 12px 0 12px 18px;
  border-left: 2px solid var(--l-accent);
  font-family: var(--l-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: var(--l-ink-2);
}

/* Native code / pre — mono register. */
code,
kbd,
samp,
pre {
  font-family: var(--l-mono);
  font-size: 0.92em;
}

/* Native lists in body content get balanced rhythm without overriding
   component-styled lists (those use display: grid or display: flex). */
ul,
ol {
  padding-inline-start: 1.4em;
}

ul li,
ol li {
  margin-block: 0.35em;
  line-height: 1.55;
}

/* Native tables — warm rule borders, header in ink, ample padding. */
table {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--l-sans);
  color: var(--l-ink);
}

th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--l-rule);
  text-align: left;
  font-weight: inherit;
  vertical-align: top;
}

th {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--l-muted);
}

/* Paragraph rhythm — body copy gets the reading-friendly line-height
   unless component overrides. */
p {
  line-height: 1.6;
}

/* Strong / em rhythm — keep typeset weight; em uses serif italic. */
strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

/* Editorial figure / figcaption used by image surfaces. */
figure {
  margin: 0;
}

figcaption {
  font-family: var(--l-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--l-muted);
  margin-top: 8px;
  line-height: 1.55;
}

/* Native disabled state — consistent low contrast. */
:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Motion preference respect — already covered earlier in this file. */
