/* Inner Compass opened from the Nest (?from=nest) — same painted world.
 * Activated by html.ic-nest (set in the page head). The public assessment
 * keeps its own look. Paper is drawn on ::before with the deckle filters
 * from /js/lilbird-deckle.js.
 */
html.ic-nest {
  --paper: radial-gradient(120% 90% at 30% 20%, #fffdf6 0%, #fff7e6 48%, #f8ebcf 82%, #efdcb4 100%);
  --paper-shadow: drop-shadow(0 14px 24px rgba(48, 32, 12, 0.2)) drop-shadow(0 2px 3px rgba(48, 32, 12, 0.12));
  --ink: #2a221b;
  --ink-soft: #54493d;
  --honey: #b8781f;
  /* Content always sits on cream paper, so use the day palette in both themes */
  --text-main: #2a221b;
  --text-muted: #54493d;
  --gold: #b8781f;
  --gold-dim: #9a6a22;
  --dark-mid: rgba(240, 222, 184, 0.45);
  --dark-card: rgba(255, 252, 244, 0.7);
  --dark-border: rgba(169, 124, 63, 0.25);
  --gold-faint: rgba(240, 190, 95, 0.16);
}
html.ic-nest[data-theme="dark"] {
  --paper: radial-gradient(120% 90% at 30% 20%, #fbf2de 0%, #f5e8cb 50%, #ecdab4 84%, #e1c995 100%);
  --paper-shadow: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* ── Painted scene behind the page ── */
html.ic-nest,
html.ic-nest body {
  background: #d9c79e !important;
  color: var(--ink);
}
html.ic-nest[data-theme="dark"],
html.ic-nest[data-theme="dark"] body { background: #0d2232 !important; }
html.ic-nest body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("/nest/assets/lilbird-kit/v3/meadow-day.webp") center bottom / max(100%, 1100px) auto no-repeat,
    url("/nest/assets/lilbird-kit/v3/scene-day.webp") center bottom / cover no-repeat;
}
html.ic-nest[data-theme="dark"] body::before {
  background-image:
    url("/nest/assets/lilbird-kit/v3/meadow-night.webp"),
    url("/nest/assets/lilbird-kit/v3/scene-night.webp");
}
html.ic-nest #particles,
html.ic-nest .progress-bar-wrap,
html.ic-nest .cmyk-stripe,
html.ic-nest .theme-wipe { display: none !important; }

/* ── Header: floats over the scene; "Back to your Nest" is the way home ── */
html.ic-nest .site-top,
html.ic-nest[data-theme="light"] .site-top {
  background: transparent !important;
  border-bottom: 0 !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}
html.ic-nest .nav-back:not(.nav-back-nest) { display: none !important; }
html.ic-nest .nav-back-nest,
html.ic-nest[data-theme="light"] .nav-back-nest {
  display: inline-flex !important;
  font-family: var(--font-sans, "DM Sans", sans-serif) !important;
  font-size: 0.88rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  background: #17485b !important;
  border: 1px solid #17485b !important;
  color: #fff9ef !important;
  border-radius: 999px !important;
  padding: 0.5rem 1rem !important;
}
html.ic-nest .nav-wordmark { color: var(--ink) !important; text-shadow: 0 0 12px rgba(255, 250, 238, 0.9); }
html.ic-nest[data-theme="dark"] .nav-wordmark { color: #fbf3e2 !important; text-shadow: 0 0 12px rgba(8, 22, 36, 0.9); }

/* ── Torn-paper panels ── */
html.ic-nest #screen-results :is(
  .result-header, .read-accordion, .insight-card, .canvas-hero-card, .role-reflection,
  .partner-section, .whats-next-panel, .sidebar-card, .nest-next-card, .ic-unlock
) {
  position: relative;
  isolation: isolate;
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--ink);
}
html.ic-nest #screen-results :is(
  .result-header, .read-accordion, .insight-card, .canvas-hero-card, .role-reflection,
  .partner-section, .whats-next-panel, .sidebar-card, .nest-next-card, .ic-unlock
)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 18px;
  background: var(--paper);
  filter: var(--paper-shadow);
  pointer-events: none;
}
html.ic-nest.lb-deckle-ready #screen-results :is(.result-header, .canvas-hero-card, .whats-next-panel, .partner-section, .ic-unlock)::before {
  border-radius: 24px 18px 26px 16px;
  filter: url(#lb-deckle-a) var(--paper-shadow);
}
html.ic-nest.lb-deckle-ready #screen-results :is(.read-accordion, .insight-card, .role-reflection)::before {
  border-radius: 18px 14px 20px 16px;
  filter: url(#lb-deckle-c) var(--paper-shadow);
}
html.ic-nest.lb-deckle-ready #screen-results :is(.sidebar-card, .nest-next-card)::before {
  border-radius: 16px 12px 18px 14px;
  filter: url(#lb-deckle-soft) var(--paper-shadow);
}
html.ic-nest #screen-results .result-header {
  padding: 2rem 2.2rem 1.9rem !important;
  margin-bottom: 1.5rem;
}
html.ic-nest #screen-results :is(.read-accordion, .insight-card, .canvas-hero-card, .role-reflection, .partner-section, .whats-next-panel, .ic-unlock) {
  padding-left: 1.45rem !important;
  padding-right: 1.45rem !important;
}
html.ic-nest #screen-results :is(.read-accordion, .insight-card, .role-reflection, .partner-section, .whats-next-panel, .canvas-hero-card, .ic-unlock) {
  margin-bottom: 1rem;
}

/* Insets inside the header: soft slips on the same paper */
html.ic-nest #screen-results :is(.result-gap-callout, .strain-bend-wrap, .share-hero-card, .confidence-summary, .result-hero-meter-wrap, .result-hero-lane) {
  background: rgba(240, 222, 184, 0.38) !important;
  border: 1px solid rgba(169, 124, 63, 0.2) !important;
  border-radius: 14px 10px 16px 12px !important;
  box-shadow: none !important;
}

/* ── One voice: no typewriter mono labels ── */
html.ic-nest #screen-results :is(
  .eyebrow, .result-section-label, .result-gap-kicker, .share-hero-kicker, .strain-bend-kicker,
  .ic-unlock-kicker, .confidence-summary-label, .result-hero-meter-label
),
html.ic-nest .nav-back {
  font-family: var(--font-sans, "DM Sans", sans-serif) !important;
  font-size: 0.7rem !important;
  font-weight: 500;
  letter-spacing: 0.13em !important;
  text-transform: uppercase;
  color: var(--honey) !important;
}
html.ic-nest #screen-results :is(h1, h2, h3) { color: var(--ink) !important; }
html.ic-nest #screen-results .ftag {
  font-family: var(--font-sans, "DM Sans", sans-serif) !important;
  letter-spacing: 0.02em !important;
  border-radius: 999px !important;
  background: rgba(255, 252, 244, 0.7) !important;
  border-color: rgba(169, 124, 63, 0.3) !important;
  color: var(--ink-soft) !important;
}

/* Buttons: teal pill primary, outlined pill secondary */
html.ic-nest #screen-results :is(.btn, .sidebar-action-btn, .btn-copy-summary, .canvas-toggle-btn) {
  font-family: var(--font-sans, "DM Sans", sans-serif) !important;
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}
html.ic-nest #screen-results :is(.btn-gold, .btn-ember, .btn.primary, .sidebar-action-btn.primary) {
  background: #17485b !important;
  border: 1px solid #17485b !important;
  color: #fff9ef !important;
}
html.ic-nest #screen-results :is(.btn-copy-summary, .canvas-toggle-btn, .sidebar-action-btn:not(.primary), .btn-outline) {
  background: rgba(255, 252, 244, 0.6) !important;
  border: 1.5px solid rgba(42, 34, 27, 0.45) !important;
  color: var(--ink) !important;
}

/* Body must be transparent so the fixed scene (z -1) shows */
html.ic-nest body,
html.ic-nest[data-theme] body { background: transparent !important; }

/* Header: a soft parchment bar so nothing scrolls under bare text */
html.ic-nest .site-top,
html.ic-nest[data-theme] .site-top {
  background: rgba(255, 248, 232, 0.9) !important;
  border-bottom: 1px solid rgba(169, 124, 63, 0.25) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}
html.ic-nest[data-theme="dark"] .site-top {
  background: rgba(13, 34, 50, 0.88) !important;
  border-bottom-color: rgba(90, 118, 138, 0.35) !important;
}
html.ic-nest .nav-wordmark { text-shadow: none; }

/* Same soft day/night switch as the Nest */
html.ic-nest .theme-toggle,
html.ic-nest[data-theme] .theme-toggle {
  background: rgba(255, 252, 244, 0.92) !important;
  border: 1px solid rgba(176, 146, 100, 0.4) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  outline: none;
}
html.ic-nest .theme-toggle:focus-visible { outline: 2px solid #18495c; outline-offset: 3px; }

/* Remaining typewriter labels inside the read */
html.ic-nest #screen-results :is([class*="meter"], [class*="badge"], [class*="-tag"], [class*="label"]) {
  font-family: var(--font-sans, "DM Sans", sans-serif) !important;
}
