@import "tailwindcss";

@theme {
  /* Brighton palette */
  --color-br-navy: #022B47;
  --color-br-gray: #414042;
  --color-br-orange: #FF6B1A;
  --color-br-orange-2: #C24D0E;
  --color-br-orange-soft: #FFC8A8;
  --color-br-orange-pale: #FFEEDD;
  --color-br-teal-deep: #146F82;
  --color-br-teal: #148699;
  --color-br-teal-mid: #6FB4BF;
  --color-br-teal-soft: #B5D8DD;
  --color-br-teal-pale: #E1EEF0;
  --color-br-bone: #F6F4EF;
  --color-br-mist: #ECEEEF;
  --color-br-line: #D8DBDD;
  --color-br-mute: #8B8E91;
  --color-br-ink: #1a1a1a;
  --color-br-paper: #FFFFFF;
  --color-br-warm: #B57B3F;
  --color-br-warm-soft: #EBD9C0;

  /* Brighton-tuned shadows */
  --shadow-br-sm: 0 1px 2px rgba(2,43,71,0.06), 0 1px 1px rgba(2,43,71,0.04);
  --shadow-br-md: 0 6px 16px rgba(2,43,71,0.08), 0 2px 4px rgba(2,43,71,0.05);
  --shadow-br-lg: 0 24px 48px rgba(2,43,71,0.14), 0 8px 16px rgba(2,43,71,0.06);

  /* Urbanist as the page font; loaded via Google Fonts in the layout. */
  --font-sans: "Urbanist", "system-ui", "sans-serif";
}

/* Heatmap cells: 5-step strength ramp.
   Used by _identity_heatmap partial; matched 1:1 to the design spec table. */
.hc-0 { background-color: var(--color-br-bone); box-shadow: inset 0 0 0 1px #E5E1D8; }
.hc-1 { background-color: var(--color-br-teal-soft); }
.hc-2 { background-color: var(--color-br-teal-mid); }
.hc-3 { background-color: var(--color-br-teal-deep); }
.hc-4 { background-color: var(--color-br-navy); }

/* Active section indicator on the sticky rail nav. */
.nav-active { position: relative; }
.nav-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--color-br-orange);
}

/* Matrix table row separators per design. */
.matrix-row { border-top: 1px dashed var(--color-br-line); }

/* Tabular numerals for stat blocks and the matrix. */
.tnum { font-feature-settings: "tnum"; }

/* Print rules for the /dashboard "Export as PDF" workflow. The brand expert
   wants a working printout — all sections expanded, no chrome, no truncation. */
@media print {
  /* Drop nav and any control surfaces marked .no-print. */
  body > header, .no-print, button, dialog { display: none !important; }

  /* Full bleed — let the content take the page. */
  main { max-width: none !important; padding: 0.5in !important; }

  /* Don't split a section across pages where possible; break BEFORE the
     cross-brand comparison rows and BEFORE big sections. */
  section { break-inside: avoid-page; }
  section > details { break-inside: avoid-page; }

  /* Untruncate everything — print isn't space-constrained the way a screen is. */
  .truncate, .line-clamp-1, .line-clamp-2, .line-clamp-3 {
    overflow: visible !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
    white-space: normal !important;
    display: block !important;
  }

  /* Force open every details panel (Stimulus also opens them, this is belt + suspenders). */
  details:not([open]) > summary ~ * { display: block !important; }
  details > summary { list-style: none; }

  /* Background colors print better when we let them through. */
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* No turbo frames in print. */
  turbo-frame { display: block !important; }
}
