/* XEL — the annual report (report.html).
   business-nonsense dashboard: kpi tiles, holo charts, an org chart,
   risk factors, and a procedurally-signed signature block.
   builds on pages.css (glass cards, hero, reveal, footer). */

/* ---------- executive summary ---------- */

.exec-summary p {
  margin: 0.6rem 0;
  color: var(--ink-dim);
  font-size: 1.02rem;
  line-height: 1.65;
}

.exec-summary .exec-lede {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  line-height: 1.4;
  color: var(--ink);
  margin: 0.2rem 0 0.9rem;
  text-wrap: balance;
}

.exec-summary a {
  color: var(--seafoam);
  border-bottom: 1px dotted var(--seafoam);
}

.exec-fine {
  margin-top: 1.1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(157, 123, 255, 0.25);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ---------- kpi cards ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 0.8rem;
  margin-top: 1.1rem;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: rgba(22, 13, 52, 0.55);
  border: 1px solid rgba(157, 123, 255, 0.22);
  border-radius: var(--r-md);
  padding: 0.95rem 1rem 0.85rem;
  transition: transform 0.25s var(--ease-boing), border-color 0.25s, box-shadow 0.25s;
}

.kpi-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 249, 224, 0.45);
  box-shadow: 0 8px 30px rgba(5, 2, 20, 0.6);
}

.kpi-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.kpi-value {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  line-height: 1.05;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transform-origin: left center;
}

.kpi-note {
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--ink-faint);
}

/* accent flavors — each figure glows in its department's color */
.kpi-seafoam .kpi-value { color: var(--seafoam); text-shadow: 0 0 20px rgba(125, 249, 224, 0.35); }
.kpi-gold    .kpi-value { color: var(--gold);    text-shadow: 0 0 20px rgba(255, 214, 107, 0.35); }
.kpi-pink    .kpi-value { color: var(--pink);    text-shadow: 0 0 20px rgba(255, 106, 213, 0.35); }
.kpi-red     .kpi-value { color: var(--red);     text-shadow: 0 0 20px rgba(255, 92, 122, 0.35); }
.kpi-violet  .kpi-value { color: var(--violet);  text-shadow: 0 0 20px rgba(157, 123, 255, 0.4); }
.kpi-cyan    .kpi-value { color: var(--cyan);    text-shadow: 0 0 20px rgba(92, 225, 255, 0.35); }

/* live tick: a figure just moved. celebrate briefly, professionally. */
.kpi-value.kpi-tick { animation: kpi-tick 0.5s var(--ease-boing); }

@keyframes kpi-tick {
  0% { transform: scale(1.14); filter: brightness(1.5); }
  100% { transform: scale(1); filter: none; }
}

/* ---------- charts ---------- */

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  margin-bottom: 1.6rem;
}

.chart-grid .glass-card { margin-bottom: 0; }

.chart-card { display: flex; flex-direction: column; }

.chart-sub { font-size: 0.92rem; }

.chart-box {
  position: relative;
  margin-top: 0.8rem;
}

.chart-box-donut { height: 250px; }
.chart-box-spark { height: 200px; }

.chart-box canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0.9rem 0 0;
  padding: 0;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-dim);
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.legend-val { color: var(--ink-faint); font-size: 0.76rem; }

.chart-caption {
  margin-top: auto;
  padding-top: 0.7rem;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink-faint);
}

/* ---------- org chart ---------- */

.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.4rem;
}

.org-top {
  display: flex;
  align-items: center;
  justify-content: center;
}

.org-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
  width: clamp(160px, 26vw, 215px);
  background: rgba(22, 13, 52, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-md);
  padding: 0.85rem 0.9rem 0.8rem;
  transition: transform 0.25s var(--ease-boing), border-color 0.25s, box-shadow 0.25s;
}

.org-node:hover { transform: translateY(-3px); }

.org-emoji {
  font-size: 1.7rem;
  filter: drop-shadow(0 0 10px rgba(125, 249, 224, 0.45));
}

.org-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  overflow-wrap: anywhere; /* nicknames are user input and can be long */
}

.org-role {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--seafoam);
}

.org-desc {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-faint);
  margin-top: 0.25rem;
}

.org-xel {
  border-color: rgba(125, 249, 224, 0.55);
  box-shadow: var(--glow-seafoam);
}

.org-void { border-color: rgba(157, 123, 255, 0.45); }
.org-void .org-role { color: var(--violet); }
.org-void .org-emoji { filter: drop-shadow(0 0 10px rgba(157, 123, 255, 0.55)); }

.org-you { border-color: rgba(92, 225, 255, 0.4); }
.org-you .org-role { color: var(--cyan); }
.org-you .org-emoji { filter: drop-shadow(0 0 10px rgba(92, 225, 255, 0.5)); }

/* the lateral dotted tie between manager and facilities: peers, roommates */
.org-tie {
  width: clamp(24px, 6vw, 64px);
  border-top: 2px dotted rgba(157, 123, 255, 0.55);
  flex: 0 0 auto;
}

/* vertical reporting lines */
.org-stem {
  width: 0;
  height: 28px;
  border-left: 2px dotted rgba(157, 123, 255, 0.55);
}

/* the stars: dotted, drifting, unpaid */
.org-interns-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* display:flex above would defeat the ua [hidden] rule — restore it, hard.
   the stars do not exist below stage 5 and must not leak into the filing. */
.org-interns-wrap[hidden] { display: none !important; }

.org-intern-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.org-intern {
  width: clamp(135px, 22vw, 165px);
  border: 1px dashed rgba(255, 214, 107, 0.45);
  background: rgba(255, 214, 107, 0.05);
  animation: intern-drift 4.5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.org-intern .org-role { color: var(--gold); }
.org-intern .org-emoji { font-size: 1.3rem; filter: drop-shadow(0 0 8px rgba(255, 214, 107, 0.7)); }

@keyframes intern-drift {
  50% { transform: translateY(-6px); }
}

/* ---------- outlook & risk factors ---------- */

.outlook-lede {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--ink);
}

.risk-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.risk-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px dashed rgba(255, 92, 122, 0.35);
  background: rgba(255, 92, 122, 0.05);
  border-radius: var(--r-md);
  padding: 0.7rem 0.95rem;
  margin-bottom: 0.6rem;
  transition: border-color 0.25s, transform 0.25s var(--ease-boing);
}

.risk-item:hover {
  border-color: rgba(255, 92, 122, 0.6);
  transform: translateX(4px);
}

.risk-item p { margin: 0.1rem 0 0; color: var(--ink-dim); font-size: 0.95rem; }
.risk-item p em { color: var(--ink-faint); font-style: italic; }

.risk-tag {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid rgba(255, 92, 122, 0.5);
  background: rgba(255, 92, 122, 0.1);
  border-radius: var(--r-pill);
  padding: 0.16rem 0.6rem;
  margin-top: 0.1rem;
}

/* jazz was a risk. jazz is now an asset. gold it accordingly. */
.risk-item.risk-realized {
  border-color: rgba(255, 214, 107, 0.4);
  background: rgba(255, 214, 107, 0.05);
}

.risk-item.risk-realized:hover { border-color: rgba(255, 214, 107, 0.65); }

.risk-item.risk-realized .risk-tag {
  color: var(--gold);
  border-color: rgba(255, 214, 107, 0.5);
  background: rgba(255, 214, 107, 0.1);
}

/* ---------- signature block ---------- */

.sig-card {
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 1.9rem;
}

.sig-lead {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  margin: 0 0 0.3rem;
}

#sig-canvas {
  display: block;
  width: min(300px, 84%);
  height: 96px;
  margin: 0 auto;
}

.sig-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  margin: 0.5rem 0 0.15rem;
}

.sig-fine {
  font-size: 0.74rem;
  font-style: italic;
  color: var(--ink-faint);
  margin: 0;
}

/* ---------- print button (screen) & print-only elements ---------- */

.report-print-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.35rem;
}

.print-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: rgba(22, 13, 52, 0.7);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-pill);
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease-boing), border-color 0.25s, box-shadow 0.25s;
}

.print-btn:hover,
.print-btn:focus-visible {
  border-color: rgba(125, 249, 224, 0.6);
  box-shadow: var(--glow-seafoam);
  transform: translateY(-2px);
}

.print-btn:active { transform: translateY(0) scale(0.97); }

.print-btn-note {
  font-size: 0.76rem;
  font-style: italic;
  color: var(--ink-faint);
}

/* letterhead, signature line, closing footnote: paper-only artifacts.
   the @media print block at the bottom of this file turns them on. */
.print-only { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .chart-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}

@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); gap: 0.6rem; }
  .kpi-card { padding: 0.8rem 0.85rem 0.7rem; }
  .org-top { flex-direction: column; }
  .org-tie {
    width: 0;
    height: 24px;
    border-top: none;
    border-left: 2px dotted rgba(157, 123, 255, 0.55);
  }
  .org-node { width: min(88vw, 240px); }
  .org-intern { width: min(88vw, 200px); }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .kpi-value.kpi-tick { animation: none; }
  .org-intern { animation: none; }
  .kpi-card:hover, .org-node:hover, .risk-item:hover { transform: none; }
  .print-btn:hover, .print-btn:focus-visible, .print-btn:active { transform: none; }
}

/* =====================================================================
   PRINT — the annual report becomes an actual document.
   palette flips to ink-on-paper, screen chrome vanishes, every reveal
   is forced visible (paper does not scroll), cards refuse to be cut in
   half by page breaks, and a letterhead + signature line + footnote
   appear. report.js flips the canvases to the same ink palette and
   re-renders them at 2x on beforeprint.
   ===================================================================== */

@page {
  margin: 14mm 14mm 18mm;
  /* page-counter footer: supported margin boxes print it, everyone else
     ignores this block gracefully and keeps the in-flow .print-footnote */
  @bottom-center {
    content: "xel, incorporated · fy2026 · page " counter(page) " of " counter(pages);
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 8pt;
    color: #5f5987;
  }
}

@media print {

  /* ---- flip the palette: every var() consumer turns ink-on-white ---- */
  :root {
    --bg-deep: #ffffff;
    --bg-1: #ffffff;
    --bg-2: #ffffff;
    --ink: #17102e;
    --ink-dim: #3b3560;
    --ink-faint: #5f5987;
    --seafoam: #0c8f74;
    --cyan: #0b7fae;
    --pink: #c9308f;
    --gold: #a87b12;
    --violet: #6a48d7;
    --green: #1f9e4d;
    --red: #d61f47;
    --orange: #b26a15;
    --panel-bg: #ffffff;
    --panel-border: #d5cfee;
    --panel-blur: 0px;
    --shadow-pop: none;
    --glow-seafoam: none;
    --glow-violet: none;
    --glow-gold: none;
  }

  html, body {
    background: #fff !important;
    color: var(--ink);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ---- screen chrome does not survive lamination ---- */
  #bg-canvas,
  #site-nav,
  #audio-toggle-root,
  .noscript-banner,
  .report-print-cta,
  .page-footer { display: none !important; }

  .page-main {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  /* ---- paper does not scroll: force every reveal visible ---- */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* ---- hero: the gradient-clipped h1 would print as invisible text ---- */
  .page-hero { margin-bottom: 1.6rem; break-after: avoid; page-break-after: avoid; }
  .page-hero h1 {
    background: none;
    -webkit-text-fill-color: var(--ink);
    color: var(--ink);
    filter: none;
  }
  .page-hero .hero-kicker { background: #fff; }

  /* ---- cards: white paper stock, no glass, never split mid-card ---- */
  .glass-card {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid #d5cfee;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .section-title { break-after: avoid; page-break-after: avoid; }
  .section-title .st-emoji { filter: none; }
  .exec-fine { border-top-color: #d5cfee; }
  .exec-summary a { color: var(--ink); text-decoration: underline; }

  /* ---- kpi tiles: crisp ink figures, no neon haze ---- */
  .kpi-card {
    background: #fff;
    border: 1px solid #d5cfee;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .kpi-card:hover { transform: none; box-shadow: none; }
  .kpi-value { text-shadow: none !important; }
  .kpi-value.kpi-tick { animation: none; }

  /* ---- charts: the bitmaps must reach the paper untouched ---- */
  .chart-box canvas,
  #sig-canvas {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .chart-card { break-inside: avoid; page-break-inside: avoid; }
  .legend-swatch { box-shadow: none !important; }

  /* ---- org chart: ink borders, grounded interns ---- */
  .org-node {
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
    transition: none;
  }
  .org-node:hover { transform: none; }
  .org-emoji,
  .org-void .org-emoji,
  .org-you .org-emoji,
  .org-intern .org-emoji { filter: none; }
  .org-xel { border-color: rgba(12, 143, 116, 0.6); }
  .org-void { border-color: rgba(106, 72, 215, 0.5); }
  .org-you { border-color: rgba(11, 127, 174, 0.5); }
  .org-tie { border-top-color: rgba(106, 72, 215, 0.6); }
  .org-stem { border-left-color: rgba(106, 72, 215, 0.6); }
  .org-intern {
    border-color: rgba(168, 123, 18, 0.55);
    background: rgba(168, 123, 18, 0.04);
    animation: none;
  }

  /* ---- risk factors: filed in red ink, gold where realized ---- */
  .risk-item {
    background: rgba(214, 31, 71, 0.04);
    border-color: rgba(214, 31, 71, 0.4);
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .risk-item:hover { transform: none; }
  .risk-tag {
    background: rgba(214, 31, 71, 0.06);
    border-color: rgba(214, 31, 71, 0.5);
  }
  .risk-item.risk-realized {
    background: rgba(168, 123, 18, 0.05);
    border-color: rgba(168, 123, 18, 0.45);
  }
  .risk-item.risk-realized .risk-tag {
    background: rgba(168, 123, 18, 0.08);
    border-color: rgba(168, 123, 18, 0.5);
  }

  /* ---- paper-only artifacts wake up ---- */
  .print-only { display: block; }

  /* letterhead: XEL, INCORPORATED — official, notarized, centered */
  .print-letterhead {
    text-align: center;
    border-bottom: 2px solid var(--ink);
    padding-bottom: 0.7rem;
    margin-bottom: 1.4rem;
    break-after: avoid;
    page-break-after: avoid;
  }
  .letterhead-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: 0.3em;
    color: var(--ink);
    margin: 0;
  }
  .letterhead-line {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.68rem;
    letter-spacing: 0.32em;
    color: var(--ink-faint);
    margin: 0.3rem 0 0;
  }

  /* signature block: the squiggle, plus an actual line to be bound by */
  .sig-card { break-inside: avoid; page-break-inside: avoid; }
  .sig-print-line { margin-top: 1.5rem; }
  .sig-print-rule {
    display: block;
    width: min(340px, 70%);
    margin: 0 auto 0.4rem;
    border-bottom: 1px solid var(--ink);
  }
  .sig-print-caption {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    color: var(--ink-dim);
    margin: 0;
    text-align: center;
  }

  /* closing footnote: prints once, at the end of the record */
  .print-footnote {
    margin-top: 1.6rem;
    padding-top: 0.7rem;
    border-top: 1px solid #d5cfee;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
  }
}
