/* ════════════════════════════════════════════════════════════
   LETTROLOGY CHART UI STYLES — chart.css
   Color tokens use the same --blue-rgb / --purple-rgb / --accent-rgb
   from style.css, plus new chart-specific tokens.
   ════════════════════════════════════════════════════════════ */

/* ── Chart tokens ─────────────────────────────────────── */
:root {
  --cr-red:    #ef4444;
  --cr-orange: #f97316;
  --cr-yellow: #facc15;
  --cr-green:  #4ade80;
  --cr-sky:    #38bdf8;
  --cr-cyan:   #67E8F9;
  --cr-silver: #8B949E;
  --cr-dark-bg: rgba(13, 17, 23, 0.82);
  --cr-border:  rgba(240, 246, 252, 0.1);
  --cr-col-w:  35px;
}

/* ── Case-Studies Chart Section ──────────────────────── */
.cs-chart-section {
  margin-top: 0;
  animation: fadeSlideUp 0.6s var(--ease-out-expo) both;
}

/* ── Input Card ──────────────────────────────────────── */
.cs-chart-input-card {
  background: rgba(var(--purple-rgb), 0.13);
  border: 1px solid rgba(var(--blue-rgb), 0.2);
  border-radius: 20px;
  padding: 2rem 2rem 1.5rem;
  animation: fadeSlideDown 0.7s var(--ease-out-expo) both;
}

.cs-chart-input-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--white) 20%, rgba(var(--blue-rgb),.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.35rem;
}

.cs-chart-input-card .cs-card-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,.4);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.cs-chart-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

.cs-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cs-form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
}

.cs-form-group input {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(var(--blue-rgb),.2);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.cs-form-group input:focus {
  border-color: rgba(var(--blue-rgb),.55);
  box-shadow: 0 0 0 3px rgba(var(--blue-rgb),.12);
}

.cs-form-group input::placeholder {
  color: rgba(255,255,255,.2);
}

/* Name field spans both date columns on small screens */
.cs-form-group--name {
  grid-column: 1 / -1;
}

@media (min-width: 600px) {
  .cs-form-group--name { grid-column: auto; }
  .cs-chart-form { grid-template-columns: 1.6fr 0.7fr 0.7fr 0.7fr auto; }
}

.cs-chart-submit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.6rem 1.4rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, rgba(var(--purple-rgb),.8), rgba(var(--accent-rgb),.6));
  color: var(--white);
  transition: transform 200ms ease, box-shadow 200ms ease;
  white-space: nowrap;
}

.cs-chart-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb),.3);
}

.cs-chart-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.cs-form-error {
  font-size: 0.78rem;
  color: var(--cr-red);
  margin-top: 0.5rem;
  min-height: 1.1em;
}

/* ── Chart Result Container ──────────────────────────── */
#cr-chart-result {
  margin-top: 1.5rem;
}

/* ── Chart Root ──────────────────────────────────────── */
.cr-root {
  font-family: 'EB Garamond', 'Garamond', Georgia, serif;
  background: #0D1117;
  color: #E6EDF3;
  border-radius: 16px;
  overflow: hidden;
}

/* ── Chart Box ───────────────────────────────────────── */
.cr-box {
  padding: 1.5rem;
  background: var(--cr-dark-bg);
  border: 1px solid rgba(192,132,252,.2);
  border-radius: 16px;
  box-shadow:
    0 0 8px  rgba(192,132,252,.3),
    0 0 20px rgba(192,132,252,.2),
    0 0 40px rgba(192,132,252,.15);
  backdrop-filter: blur(2px);
}

.cr-box-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.cr-person-name {
  font-family: 'Montserrat', 'Outfit', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: #E6EDF3;
  margin: 0;
}

.cr-meta-pills {
  display: flex;
  gap: 8px;
}

.cr-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.cr-pill-age  { background: rgba(192,132,252,.15); color: rgba(192,132,252,.9); border: 1px solid rgba(192,132,252,.25); }
.cr-pill-year { background: rgba(56,189,248,.12);  color: rgba(56,189,248,.9);  border: 1px solid rgba(56,189,248,.2); }

/* ── Section Title ───────────────────────────────────── */
.cr-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cr-silver);
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
}

/* ══════════════════════════════════════════════════════
   NAME HEADER
   ══════════════════════════════════════════════════════ */
.cr-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.55;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 0.5rem;
}

.cr-name-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cr-row-vowels, .cr-row-letters, .cr-row-nums, .cr-row-chunks {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.cr-row-vowels  { color: #EE4B2B; }
.cr-row-letters { color: #111827; font-size: 14px; }
.cr-row-nums    { color: #111827; font-size: 13px; }
.cr-row-chunks  { color: #555; font-size: 12px; gap: 0; margin-top: 2px; }

/* Each letter/number slot - use same width for alignment */
.hn-v, .hn-l, .hn-n, .hn-s {
  display: inline-block;
  width: 14px;
  text-align: center;
}

/* Space character slot for letters row */
.hn-sp {
  display: inline-block;
  width: 6px;
}

.hn-chunk {
  display: inline-block;
  text-align: center;
  font-size: 12px;
  color: #555;
}

.cr-row-total {
  color: #555;
  font-size: 12px;
  margin-left: 0.5rem;
}

.cr-details-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.cr-ug {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.cr-red  { color: #EE4B2B; }

.cr-bday {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  color: #555;
}

/* ══════════════════════════════════════════════════════
   TABLE SHARED
   ══════════════════════════════════════════════════════ */
.cr-scroll-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--blue-rgb),.2) transparent;
}

.cr-scroll-wrap::-webkit-scrollbar { height: 5px; }
.cr-scroll-wrap::-webkit-scrollbar-thumb {
  background: rgba(var(--blue-rgb),.2);
  border-radius: 4px;
}

.cr-table {
  border-collapse: separate;
  border-spacing: 4px;
  table-layout: fixed;
  width: max-content;
}

.cr-table td, .cr-table th {
  text-align: center;
  width: var(--cr-col-w);
  height: var(--cr-col-w);
  font-size: 13px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  vertical-align: middle;
}

.cr-lbl {
  width: 50px !important;
  text-align: right !important;
  padding-right: 10px !important;
  min-width: 50px;
  font-size: 11px !important;
  font-weight: 600;
  color: var(--cr-silver) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: transparent !important;
}

.cr-highlight {
  outline: 1.5px solid rgba(255,255,255,.6);
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════════
   YEARLY TABLE COLORS
   ══════════════════════════════════════════════════════ */
.cr-row-age  td { color: var(--cr-silver); font-weight: 600; }
.cr-row-name td { color: #E6EDF3; }
.cr-row-sep  td { color: rgba(255,255,255,.15); font-size: 9px; }
.cr-row-ess  td { color: var(--cr-sky);    font-weight: 700; }
.cr-row-com  td { color: var(--cr-cyan);   font-weight: 700; }
.cr-row-py   td { color: var(--cr-orange); font-weight: 700; }
.cr-row-cy   td { color: var(--cr-green);  font-weight: 700; }

/* ══════════════════════════════════════════════════════
   MONTHLY TABLE
   ══════════════════════════════════════════════════════ */
.cr-monthly-table {
  margin-top: 1rem;
}

.cr-year-lbl {
  color: var(--cr-silver) !important;
  font-size: 11px !important;
  font-weight: 600;
  text-align: center !important;
  width: auto !important;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.cr-cur-year {
  outline: 1.5px solid rgba(255,255,255,.45);
  border-radius: 4px;
}

.cr-mrow .cr-m-ess-cell  { color: var(--cr-red);    font-weight: 700; }
.cr-mrow .cr-m-pme-cell  { color: var(--cr-sky);    font-weight: 700; }
.cr-mrow .cr-m-mcom-cell { color: var(--cr-cyan);   font-weight: 700; }
.cr-mrow .cr-m-pm-cell   { color: var(--cr-sky);    font-weight: 700; }
.cr-mrow .cr-m-cm-cell   {
  color: var(--cr-green);
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease;
  border-radius: 4px;
}
.cr-mrow .cr-m-cm-cell:hover { background: rgba(74,222,128,.12); }
.cr-mrow .cr-m-py-cell  { color: var(--cr-red);    font-weight: 700; }

/* ══════════════════════════════════════════════════════
   POWER NUMBERS & PATTERN HIGHLIGHTS
   ══════════════════════════════════════════════════════ */
.cr-power-11,
.cr-power-13,
.cr-power-16 {
  background: transparent !important;
  font-weight: 800 !important;
}

/* ══════════════════════════════════════════════════════
   CHART HIGHLIGHTS (Accidental Death references)
   ══════════════════════════════════════════════════════ */

/* Yellow Box for Header Info (UG, BDAY) */
.cr-yellow-box {
  outline: 2px solid #facc15;
  outline-offset: 1px;
  background-color: rgba(250, 204, 21, 0.2);
  padding: 0 4px;
}

/* Yellow Highlight Box Column (Yearly Focus Pattern) */
.cr-col-highlight {
  background-color: rgba(250, 204, 21, 0.15) !important;
  /* Light overlay without hiding the numbers */
}

/* Green Highlight Encasement Block (Focus Year Monthly View) */
.cr-box-top { border-top: 1.5px solid #22c55e !important; }
.cr-box-bottom { border-bottom: 1.5px solid #22c55e !important; }
.cr-box-left { border-left: 1.5px solid #22c55e !important; }
.cr-box-right { border-right: 1.5px solid #22c55e !important; }

/* The yellow highlight for power numbers inside the boxes */
.cr-power-hl {
  background-color: #fce750 !important;
  color: #1a1200 !important; /* always dark so it's readable on yellow */
  border-radius: 2px;
  padding: 0 3px;
  font-weight: 800 !important;
}

/* HORIZONTAL RED BOX FOR CONSECUTIVE POWER NUMBERS */
.cr-ph { position: relative; }
.cr-ph::before {
  content: "";
  position: absolute;
  top: -2.5px; bottom: -2.5px;
  border-top: 1.5px solid #ef4444;
  border-bottom: 1.5px solid #ef4444;
  pointer-events: none;
  z-index: 10;
}
.cr-ph-l::before { left: -2.5px; border-left: 1.5px solid #ef4444; }
.cr-ph-extend::before { right: -6.5px; } /* bridge 4px table gap */
.cr-ph-r::before { right: -2.5px; border-right: 1.5px solid #ef4444; }

/* VERTICAL RED BOX FOR COM/MCOM POWER STACK */
.cr-pv { position: relative; }
.cr-pv::after {
  content: "";
  position: absolute;
  left: -2.5px; right: -2.5px;
  border-left: 1.5px solid #ef4444;
  border-right: 1.5px solid #ef4444;
  pointer-events: none;
  z-index: 9;
}
.cr-pv-t::after { top: -2.5px; bottom: -6.5px; border-top: 1.5px solid #ef4444; }
.cr-pv-m::after { top: -2.5px; bottom: -6.5px; }
.cr-pv-b::after { top: -2.5px; bottom: -2.5px; border-bottom: 1.5px solid #ef4444; }

/* ══════════════════════════════════════════════════════
   LETTER HIGHLIGHTS — A & S
   ══════════════════════════════════════════════════════ */

/* Shared highlight base */
.cr-letter-highlight {
  font-weight: 800 !important;
  border-radius: 3px;
}

/* Letter A — Gold/Amber: Initiative, Change, Action */
.cr-letter-A {
  background-color: #fbbf24 !important;
  color: #1a0a00 !important;
  box-shadow: 0 0 6px rgba(251,191,36,0.55);
}

/* Letter S — Rose/Pink: The Emotional Marker */
.cr-letter-S {
  background-color: #f472b6 !important;
  color: #1a0008 !important;
  box-shadow: 0 0 6px rgba(244,114,182,0.55);
}

/* Pair of letters forming a power number (11, 13, 16) */
.cr-letter-pn {
  background-color: #fce750 !important;
  color: #1a1200 !important;
}

/* Vertical Amplifier Box (Inset red box) */
.cr-amp-top { box-shadow: inset 2px 2px 0 0 #ef4444, inset -2px 0 0 0 #ef4444 !important; }
.cr-amp-mid { box-shadow: inset 2px 0 0 0 #ef4444, inset -2px 0 0 0 #ef4444 !important; }
.cr-amp-bot { box-shadow: inset 2px 0 0 0 #ef4444, inset -2px -2px 0 0 #ef4444, inset 0 -2px 0 0 #ef4444 !important; }

/* Forward Slash Pattern */
.cr-slash-cell {
  position: relative;
}
.cr-slash-cell::after {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -6px;
  right: -1px;
  width: 2px;
  background-color: #ef4444;
  transform: rotate(30deg);
  z-index: 10;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════
   SLIDER
   ══════════════════════════════════════════════════════ */
.cr-slider-wrap {
  padding: 0.85rem 0 0.5rem;
  border-top: 1px solid var(--cr-border);
  margin-top: 1rem;
}

.cr-slider-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cr-silver);
  margin-bottom: 6px;
}

.cr-slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 12px;
  color: var(--cr-silver);
  font-family: 'Roboto Mono', monospace;
}

.cr-slider {
  flex-grow: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  background: var(--cr-border);
  border-radius: 5px;
  outline: none;
}

.cr-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  background: #58A6FF;
  cursor: pointer;
  border-radius: 50%;
  border: 3px solid #0D1117;
  box-shadow: 0 0 6px rgba(88,166,255,.5);
}

.cr-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  background: #58A6FF;
  cursor: pointer;
  border-radius: 50%;
  border: 3px solid #0D1117;
}

/* ══════════════════════════════════════════════════════
   DEEP PATTERN ROW — compact badge design
   ══════════════════════════════════════════════════════ */
.cr-dp-row {
  background: rgba(250,199,20,0.04);
}
.cr-dp-cell {
  padding: 3px 1px;
  text-align: center;
  vertical-align: middle;
  border-top: 1px dashed rgba(250,199,20,0.2);
  height: 22px;          /* fixed height — never stretches */
  max-height: 22px;
  overflow: hidden;
  white-space: nowrap;
}
/* Each pattern result is a tiny colored pill */
.cr-dp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  height: 16px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 4px;
  margin: 0 2px;
  cursor: help;
}
.cr-dp-badge--pn {
  background: #fce750;
  color: #1a1200;
  box-shadow: 0 0 6px rgba(252,231,80,0.6);
}
.cr-dp-badge--nine {
  background: transparent;
  color: #4ade80;
  border: 1px solid #4ade80;
}

/* Deep Patterns reveal button */
.cr-btn-outline {
  background: transparent;
  border: 1px solid rgba(88,166,255,0.45);
  color: #58A6FF;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 7px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cr-btn-outline:hover {
  background: rgba(88,166,255,0.12);
  border-color: #58A6FF;
  color: #fff;
}

/* ══════════════════════════════════════════════════════
   INFO ROW: Planes + Birthday + UG
   ══════════════════════════════════════════════════════ */
.cr-info-row {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 0.5rem;
  font-family: 'Consolas', 'Courier New', monospace;
}

/* PLANES BLOCK */
.cr-planes-block {
  flex-shrink: 0;
}

.cr-planes-rows {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cr-plane-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  cursor: default;
  padding: 1px 0;
  position: relative;
}

.cr-plane-init {
  display: inline-block;
  width: 14px;
  color: #555;
  font-weight: 600;
  font-size: 13px;
}

.cr-plane-count {
  color: #111827;
  min-width: 18px;
  text-align: right;
}

.cr-plane-eq {
  color: #555;
  font-size: 12px;
}

/* Percentage: show only on hover */
.cr-plane-pct {
  color: #888;
  font-size: 11px;
  opacity: 0;
  transition: opacity 150ms ease;
  pointer-events: none;
}
.cr-plane-row:hover .cr-plane-pct { opacity: 1; }

.cr-plane-genius {
  font-size: 11px;
  color: #06B6D4;
  margin-top: 4px;
}

/* BIRTHDAY CENTER — sits in the middle of the info row */
.cr-bday-center {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  margin-left: auto;   /* pushes it to the right-center */
  padding-right: 6rem; /* keeps it away from the far right */
}

.cr-bday-full {
  color: #111827;
  font-weight: 600;
}

.cr-bday-reduced {
  color: #555;
  font-size: 12px;
}

/* UG block (right side of info row) */
.cr-ug-block {
  margin-left: auto;
  flex-shrink: 0;
}

.cr-ug-block .cr-ug {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

/* ══════════════════════════════════════════════════════
   DAY MODAL
   ══════════════════════════════════════════════════════ */
.cr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(4px);
  z-index: 800;
}

.cr-day-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  background: #0D1117;
  border: 1px solid rgba(var(--blue-rgb),.25);
  border-radius: 16px;
  padding: 2rem 2rem 1.5rem;
  max-width: 680px;
  width: 92vw;
  max-height: 86vh;
  overflow-y: auto;
  z-index: 810;
  color: #E6EDF3;
  font-family: 'EB Garamond', Georgia, serif;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.cr-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.5);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: color 150ms, background 150ms;
}

.cr-modal-close:hover {
  color: #fff;
  background: rgba(var(--blue-rgb),.15);
}

.cr-modal-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #E6EDF3;
  margin: 0 0 4px;
}

.cr-modal-sub {
  font-size: 0.82rem;
  color: var(--cr-silver);
  margin-bottom: 4px;
}

.cr-modal-hint {
  font-size: 0.78rem;
  color: rgba(255,255,255,.3);
  margin-bottom: 0.75rem;
}

.cr-day-info {
  font-size: 0.82rem;
  color: rgba(255,255,255,.7);
  padding: 6px 8px;
  background: rgba(var(--blue-rgb),.06);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  min-height: 30px;
}

.cr-day-calendar {
  border-collapse: separate;
  border-spacing: 4px;
  width: 100%;
}

.cr-day-calendar th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cr-silver);
  padding: 4px 0;
  text-align: center;
}

.cr-day-cell {
  text-align: center;
  width: 52px; height: 52px;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  transition: background 150ms, border-color 150ms, box-shadow 150ms;
  vertical-align: middle;
  position: relative;
}

.cr-day-cell:hover {
  background: rgba(var(--blue-rgb),.12);
  border-color: rgba(var(--blue-rgb),.45);
  box-shadow: 0 0 10px rgba(88,166,255,0.15);
}

.cr-day-num {
  font-size: 10px;
  color: rgba(255,255,255,.38);
  line-height: 1;
  margin-bottom: 2px;
}

.cr-day-de {
  font-size: 17px;
  font-weight: 800;
  color: #E6EDF3;
  line-height: 1;
}
/* Power-highlighted Daily Essence number: vivid yellow on dark */
.cr-day-de .cr-power-hl {
  background: #fce750 !important;
  color: #1a1200 !important;
  display: inline-block;
  border-radius: 4px;
  padding: 0 4px;
  box-shadow: 0 0 8px rgba(252,231,80,0.5);
}

.cr-day-empty {
  width: 44px; height: 44px;
}

/* ══════════════════════════════════════════════════════
   LOADING STATE
   ══════════════════════════════════════════════════════ */
.cr-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.25rem;
  color: rgba(255,255,255,.5);
  font-size: 0.88rem;
}

.cr-loading-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(var(--blue-rgb),.5);
  animation: cr-blink 1.2s ease infinite;
}

.cr-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.cr-loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes cr-blink {
  0%,80%,100% { opacity: 0.2; transform: scale(0.85); }
  40%         { opacity: 1;   transform: scale(1.1);  }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .cr-box { padding: 1rem; }
  .cr-header { flex-direction: column; }
  .cr-details-section { align-items: flex-start; }
  .cs-chart-form { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════
   PURE LAYOUT OVERRIDES (LIGHT THEME BACKGROUND FOR TABLE)
   ══════════════════════════════════════════════════════ */
.cr-root {
  background: white !important;
  color: #111827 !important;
}

.cr-box {
  background: white !important;
}

.cr-screenshot-style {
  background: white !important;
  font-family: 'Consolas', 'Courier New', monospace !important;
  margin: 0 auto !important;
  overflow: auto !important;
  border-radius: 8px;
  padding: 1rem;
}

.cr-screenshot-style .cr-table {
  border-spacing: 0 !important;
  border-collapse: collapse !important;
  margin: 0 auto;
}

.cr-screenshot-style td {
  width: 25px !important;
  height: min-content !important;
  line-height: 1.4 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  padding: 0 !important;
  background: white !important;
}

/* YEARLY TABLE COLORS */
.cr-yearly-pure .cr-row-age-tens td, 
.cr-yearly-pure .cr-row-age-ones td { color: #111827 !important; font-weight: 500 !important; }

.cr-row-name td { color: #EE4B2B !important; } 
.cr-row-sep td { color: #EE4B2B !important; }

.cr-row-ess td { color: #1D4ED8 !important; } 
.cr-row-com td { color: #06B6D4 !important; } 
.cr-row-py td { color: #1D4ED8 !important; } 
.cr-row-cy td { color: #10B981 !important; } 

.cr-asterisk-cell { color: #EE4B2B !important; font-size: 16px !important; }

/* MONTHLY TABLE COLORS */
.cr-m-gap { width: 16px !important; } /* Spacer between years */

.cr-mrow .cr-m-ess-cell { color: #EE4B2B !important; font-weight: 400 !important; }
.cr-mrow .cr-m-pme-cell { color: #1D4ED8 !important; font-weight: 400 !important; }
.cr-mrow .cr-m-mcom-cell { color: #06B6D4 !important; font-weight: 400 !important; }
.cr-mrow .cr-m-pm-cell { color: #1D4ED8 !important; font-weight: 400 !important; }
.cr-mrow .cr-m-cm-cell { color: #10B981 !important; font-weight: 400 !important; }
.cr-mrow .cr-m-py-cell { color: #EE4B2B !important; font-weight: 400 !important; }

.cr-year-lbl { 
  color: #111827 !important; 
  font-size: 13px !important;
  padding-top: 10px !important; 
  font-weight: 600 !important;
}

.cr-monthly-table {
  margin-top: 2rem !important;
}

.cr-screenshot-style .cr-highlight {
  outline: none !important; /* remove white outlines */
  background: transparent !important;
}
.cr-screenshot-style .cr-cur-year {
  outline: none !important;
}

/* ══════════════════════════════════════════════════════
   FORENSIC MODE overrides
   ══════════════════════════════════════════════════════ */
.cr-root.cr-forensic-mode .cr-power-hl {
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  font-weight: inherit !important;
}

.cr-root.cr-forensic-mode .cr-ph::before,
.cr-root.cr-forensic-mode .cr-pv::after,
.cr-root.cr-forensic-mode .cr-slash-cell::before,
.cr-root.cr-forensic-mode .cr-dp-row {
  display: none !important;
}

.cr-root.cr-forensic-mode .cr-letter-pn,
.cr-root.cr-forensic-mode .cr-dp-cell {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Fix table alignment collapse — don't hide cells, just their box styling */
.cr-root.cr-forensic-mode .cr-box-left { border-left-color: transparent !important; }
.cr-root.cr-forensic-mode .cr-box-right { border-right-color: transparent !important; }
.cr-root.cr-forensic-mode .cr-box-top { border-top-color: transparent !important; }
.cr-root.cr-forensic-mode .cr-box-bottom { border-bottom-color: transparent !important; }

/* Restore for the exact forensic target year/month */
.cr-root.cr-forensic-mode td.cr-forensic-target .cr-power-hl,
.cr-root.cr-forensic-mode th.cr-forensic-target .cr-power-hl,
.cr-root.cr-forensic-mode .cr-forensic-target.cr-power-hl {
  background: #ef4444 !important;
  color: #fff !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5) !important;
  font-weight: 800 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  display: inline-block !important; /* ensures inline elements show */
}

/* Vertical target highlight column (Red overlay) */
.cr-root.cr-forensic-mode td.cr-forensic-target {
  background: rgba(239, 68, 68, 0.1) !important;
  border-left: 2px solid #ef4444 !important;
  border-right: 2px solid #ef4444 !important;
}
.cr-root.cr-forensic-mode tr.cr-m-ess td.cr-forensic-target {
  border-top: 2px solid #ef4444 !important;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}
.cr-root.cr-forensic-mode tr.cr-m-py td.cr-forensic-target {
  border-bottom: 2px solid #ef4444 !important;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* Hover cross-highlighting */
.cr-glow-pulse .cr-power-hl,
.cr-glow-pulse.cr-power-hl,
td.cr-glow-pulse,
tr.cr-glow-pulse td.cr-forensic-target {
  animation: cr-pulse 1.5s infinite !important;
  background: rgba(239, 68, 68, 0.4) !important;
  color: #fff !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.8) !important;
  border-radius: 4px;
}

@keyframes cr-pulse {
  0% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.6); }
  50% { box-shadow: 0 0 16px rgba(239, 68, 68, 1); }
  100% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.6); }
}

/* Daily Chart Flagged Power Zones */
.cr-day-flagged {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  box-shadow: inset 0 0 8px rgba(239, 68, 68, 0.3);
}

/* Forensic Target Arrow */
.cr-forensic-arrow {
  display: block;
  text-align: center;
  font-size: 20px;
  color: #ef4444;
  margin-bottom: -15px; /* Pull it down closer to the red box */
  margin-top: -10px;
  animation: cr-bounce 2s infinite ease-in-out;
}

@keyframes cr-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
