/* ============================================================
   DataLab × ye visual system — cards and site chrome
   Tokens from visual-system/ye-tokens.json (extracted from
   owner-supplied reference deck)
   One blue / Montserrat system from navigation through metadata.
   ============================================================ */

:root {
  --ye-primary: #A87C14;
  --ye-royal: #C9972B;
  --ye-periwinkle: #D4A843;
  --ye-peri-light: #E3C26E;
  --ye-lavender: #F1E3C0;
  --ye-slate: #8A7A55;
  --ye-bright: #E2B54B;
  --ye-cyan: #E2B54B;
  --ye-ink: #0A0805;
  --ye-grad-top: #F0D896;
  --ye-card-gradient: linear-gradient(165deg, #262014 0%, #1A1509 58%, #100D05 100%);
  --ye-card-gradient-hover: linear-gradient(165deg, #332914 0%, #241C0C 58%, #171206 100%);
  --ye-font: "Montserrat", "Inter", system-ui, sans-serif;
}

/* ---------- Bundle KPI cards (UPI / Cards / Economy etc.) ---------- */
section [class*="border-white/10"][class*="rounded"] {
  background: var(--ye-card-gradient);
  border: 1px solid rgba(241, 227, 192, 0.22) !important;
  box-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.55);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
section [class*="border-white/10"][class*="rounded"]:hover {
  background: var(--ye-card-gradient-hover);
  box-shadow: 0 14px 32px -16px rgba(212, 168, 67, 0.35);
}

/* Card typography: Montserrat everywhere inside cards */
section [class*="border-white/10"][class*="rounded"] *,
.dq-card, .dq-card * {
  font-family: var(--ye-font);
}
section [class*="border-white/10"][class*="rounded"] .font-serif {
  font-family: var(--ye-font) !important;
  font-weight: 600;
  letter-spacing: -0.01em;
}
/* Small uppercase labels get the ye tracking treatment */
section [class*="border-white/10"][class*="rounded"] [class*="uppercase"] {
  letter-spacing: 0.14em;
  font-weight: 500;
}

/* ---------- Extended-section cards (dq-*) ---------- */
.dq-card {
  background: var(--ye-card-gradient);
}
.dq-card:hover { background: var(--ye-card-gradient-hover); }
.dq-grid {
  gap: 12px;
  background: transparent;
  border: none;
}
.dq-card {
  border: 1px solid rgba(241, 227, 192, 0.22);
  border-radius: 12px;
}
.dq-card .dq-src-badge {
  color: var(--ye-lavender);
  background: rgba(10, 8, 5, 0.30);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}
.dq-card [style*="gold"], .dq-card .dq-delta { color: var(--ye-lavender); }

/* ---------- ye infographic blocks ---------- */
.ye-panel {
  margin-top: 2.5rem;
  padding: 1.8rem 1.7rem;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(212, 168, 67, 0.10), rgba(140, 105, 20, 0.24));
  border: 1px solid rgba(212, 168, 67, 0.25);
  font-family: var(--ye-font);
}
.ye-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.ye-panel-title {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
}
.ye-panel-src {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ye-peri-light);
}
.ye-gauge-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}
@media (min-width: 900px) { .ye-gauge-row { grid-template-columns: repeat(4, 1fr); } }
.ye-gauge { text-align: center; }
.ye-gauge svg { width: 128px; height: 128px; }
.ye-gauge-val {
  font-size: 1.45rem;
  font-weight: 600;
  fill: #fff;
}
.ye-gauge-name {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}
.ye-gauge-sub {
  font-size: 0.68rem;
  color: var(--ye-peri-light);
  margin-top: 0.15rem;
}

/* Comparison track bars (Conversion Comparison pattern) */
.ye-track { margin-top: 0.9rem; }
.ye-track-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--ye-lavender);
  margin-bottom: 0.3rem;
}
.ye-track-bar {
  height: 34px;
  border-radius: 999px;
  background: rgba(241, 227, 192, 0.16);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ye-track-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ye-bright), var(--ye-primary));
  display: flex;
  align-items: center;
  padding-left: 14px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}
.ye-track-fill.ye-alt { background: linear-gradient(90deg, var(--ye-peri-light), var(--ye-periwinkle)); }
.ye-track-note {
  margin-top: 0.8rem;
  font-size: 0.72rem;
  color: var(--ye-peri-light);
}

/* ============================================================
   Site chrome — one blue / Montserrat system from header to footer
   ============================================================ */
html { background: var(--ye-ink); }
body {
  background:
    radial-gradient(circle at 50% -10%, rgba(212, 168, 67, 0.12), transparent 34rem),
    var(--ye-ink);
  color: #fff;
  font-family: var(--ye-font);
}
#root, #root > div { background: transparent; }
#root [class*="font-serif"],
#root [class*="font-sans"] {
  font-family: var(--ye-font) !important;
}

/* Header and navigation */
#root header {
  background: linear-gradient(100deg, hsl(43, 74%, 40%) 0%, hsl(41, 82%, 50%) 55%, hsl(36, 88%, 55%) 100%) !important;
  border-bottom: 1px solid rgba(212, 168, 67, 0.30) !important;
  box-shadow: 0 12px 32px -24px rgba(212, 168, 67, 0.45);
}
#root header a,
#root header span,
#root header button { color: #fff !important; }
#root header a:hover,
#root header button:hover { color: var(--ye-lavender) !important; }
#root header [class*="bg-white"] { background-color: rgba(241, 227, 192, 0.12) !important; }
#root header [class*="border-white"] { border-color: rgba(212, 168, 67, 0.34) !important; }
#root header [class*="font-serif"] { font-weight: 600 !important; letter-spacing: -0.02em; }

/* Hero: quieter display scale, same sans voice as the data cards */
#root h1[class*="font-serif"] {
  font-family: var(--ye-font) !important;
  font-size: clamp(2.6rem, 7.2vw, 6.2rem) !important;
  font-weight: 600 !important;
  line-height: 1.02 !important;
  letter-spacing: -0.035em !important;
}

/* Shared section-heading rhythm */
.dq-kicker,
#economy span[class*="tracking-[0.2em]"][class*="uppercase"],
#upi span[class*="tracking-[0.2em]"][class*="uppercase"],
#cards span[class*="tracking-[0.2em]"][class*="uppercase"],
#work span[class*="tracking-[0.2em]"][class*="uppercase"] {
  color: var(--ye-peri-light) !important;
  font-family: var(--ye-font) !important;
  font-weight: 600;
}
.dq-title,
#economy h2[class*="font-serif"],
#upi h2[class*="font-serif"],
#cards h2[class*="font-serif"],
#work h2[class*="font-serif"] {
  color: #fff !important;
  font-family: var(--ye-font) !important;
  font-size: clamp(1.55rem, 3.4vw, 2.65rem) !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase;
}
.dq-desc,
#economy p[class*="max-w-lg"],
#upi p[class*="max-w-lg"],
#cards p[class*="max-w-lg"],
#work p[class*="max-w-lg"] {
  color: rgba(241, 227, 192, 0.72) !important;
  font-family: var(--ye-font) !important;
}
.dq-section,
#economy, #upi, #cards, #work { border-top-color: rgba(212, 168, 67, 0.16); }
.dq-insight {
  background: rgba(212, 168, 67, 0.08);
  border-left-color: var(--ye-royal);
  color: var(--ye-lavender);
  font-family: var(--ye-font);
}
.dq-insight strong,
.dq-card-delta { color: var(--ye-lavender); }
.dq-card .dq-src-badge { border-color: rgba(212, 168, 67, 0.38); }

/* Mobile navigation uses the same inverted blue surface */
.dq-mobile-menu {
  background: rgba(10, 8, 5, 0.98);
  border-bottom: 1px solid rgba(212, 168, 67, 0.35);
}
.dq-mobile-link { font-family: var(--ye-font); color: var(--ye-lavender); }
.dq-mobile-link:hover,
.dq-mobile-link:active { color: #fff; }

/* React footer */
#root footer {
  background: linear-gradient(180deg, #1C1608 0%, #0A0805 100%);
  border-top: 1px solid rgba(212, 168, 67, 0.22);
  font-family: var(--ye-font);
}
#root footer p { color: rgba(241, 227, 192, 0.68); }
#root footer a { color: var(--ye-peri-light); }
#root footer a:hover { color: #fff; }

/* ---------- Card internals: remove legacy inline-theme outliers ---------- */
.aq-source,
.aq-src-badge,
.aq-sparkline,
.aq-sparkline * {
  font-family: var(--ye-font) !important;
}
.aq-source { color: rgba(241, 227, 192, 0.64) !important; }
.aq-src-badge {
  color: var(--ye-lavender) !important;
  background: rgba(10, 8, 5, 0.35) !important;
  border: 1px solid rgba(212, 168, 67, 0.38) !important;
  border-radius: 999px !important;
}

/* Gold inline accents (e.g. #B8860B signal labels) are kept as-is. */

/* Work history: same blue gauge language as the other infographics. */
.aq-sparkline > div > span { color: var(--ye-lavender) !important; }
.aq-sparkline > div > span:last-child { color: rgba(241, 227, 192, 0.60) !important; }
.aq-sparkline > div > div {
  background: linear-gradient(180deg, var(--ye-royal), var(--ye-primary)) !important;
  border-radius: 999px 999px 3px 3px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20);
}
.aq-sparkline > div:last-child > div {
  background: linear-gradient(180deg, var(--ye-lavender), var(--ye-bright)) !important;
}
#work [class*="h-full"][class*="rounded-full"] {
  background: linear-gradient(90deg, var(--ye-bright), var(--ye-primary)) !important;
}

/* Benchmark histories read as inset data, not separate grey cards. */
.dq-bench {
  background: rgba(14, 24, 51, 0.18);
  border-color: rgba(212, 168, 67, 0.20);
}
.dq-bench-row + .dq-bench-row { border-top-color: rgba(212, 168, 67, 0.18); }
.dq-bench-period { color: rgba(241, 227, 192, 0.60); }
.dq-bench-value { color: #fff; }

/* ---------- Work: radial sector fan + smooth monthly trend ---------- */
.ye-sector-panel { overflow: hidden; }
.ye-sector-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.8fr);
  gap: 1.5rem;
  align-items: center;
}
.ye-sector-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ye-sector-outer,
.ye-sector-spoke {
  fill: none;
  stroke: rgba(212, 168, 67, 0.48);
  stroke-width: 1.2;
}
.ye-sector-spoke { stroke-opacity: 0.58; }
.ye-sector-wedge {
  stroke: rgba(10, 8, 5, 0.65);
  stroke-width: 1;
  transition: opacity 0.2s ease;
}
.ye-sector-wedge:hover { opacity: 0.82; }
.ye-sector-hub {
  fill: rgba(10, 8, 5, 0.92);
  stroke: rgba(212, 168, 67, 0.38);
}
.ye-sector-total { fill: #fff; font: 600 28px var(--ye-font); }
.ye-sector-total-label { fill: var(--ye-peri-light); font: 600 9px var(--ye-font); letter-spacing: 2px; }
.ye-sector-svg-label { fill: #fff; font: 600 11px var(--ye-font); }
.ye-sector-svg-value { fill: var(--ye-peri-light); font-size: 10px; font-weight: 500; }
.ye-sector-legend { min-width: 0; }
.ye-sector-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto 44px;
  gap: 0.65rem;
  align-items: center;
  padding: 0.72rem 0;
  border-bottom: 1px solid rgba(212, 168, 67, 0.16);
}
.ye-sector-row:last-child { border-bottom: 0; }
.ye-sector-swatch { width: 9px; height: 9px; border-radius: 50%; }
.ye-sector-name { color: var(--ye-lavender); font-size: 0.72rem; line-height: 1.35; }
.ye-sector-number { color: #fff; font-size: 0.78rem; font-weight: 600; }
.ye-sector-pct { color: var(--ye-peri-light); font-size: 0.70rem; text-align: right; }

.ye-trend {
  padding: 1.4rem 1.5rem 1rem;
  border: 1px solid rgba(212, 168, 67, 0.25);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(212, 168, 67, 0.18), transparent 65%),
    linear-gradient(180deg, rgba(10, 8, 5, 0.90), rgba(22, 17, 8, 0.80));
  font-family: var(--ye-font);
}
.ye-trend-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.4rem;
  color: var(--ye-peri-light);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.13em;
}
.ye-trend-head span:last-child {
  max-width: 60%;
  text-align: right;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ye-trend svg { display: block; width: 100%; height: auto; }
.ye-trend-grid { stroke: rgba(212, 168, 67, 0.24); stroke-width: 1; stroke-dasharray: 3 6; }
.ye-trend-baseline { stroke: rgba(212, 168, 67, 0.58); stroke-width: 1.2; }
.ye-trend-line {
  fill: none;
  stroke: url(#ye-trend-stroke);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ye-trend-point { fill: url(#ye-trend-dot); stroke: #E3C26E; stroke-width: 1.4; }
.ye-trend-axis { fill: rgba(241, 227, 192, 0.65); font: 500 13px var(--ye-font); }
.ye-trend-value { fill: #fff; font: 600 15px var(--ye-font); }
.ye-trend-month { fill: var(--ye-peri-light); font: 500 14px var(--ye-font); }

@media (max-width: 800px) {
  .ye-sector-layout { grid-template-columns: 1fr; gap: 0.5rem; }
  .ye-sector-svg-label { display: none; }
  .ye-sector-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
  .ye-sector-row { grid-template-columns: 8px minmax(0, 1fr) auto; gap: 0.45rem; }
  .ye-sector-pct { grid-column: 2 / 4; text-align: left; margin-top: -0.35rem; }
}
@media (max-width: 600px) {
  .ye-sector-panel { padding: 1.2rem 1rem; }
  .ye-sector-legend { grid-template-columns: 1fr; }
  .ye-sector-row { grid-template-columns: 9px minmax(0, 1fr) auto 44px; }
  .ye-sector-pct { grid-column: auto; text-align: right; margin-top: 0; }
  .ye-trend { padding: 1rem 0.65rem 0.65rem; border-radius: 14px; }
  .ye-trend-head { align-items: flex-start; flex-direction: column; gap: 0.35rem; padding: 0 0.35rem; }
  .ye-trend-head span:last-child { max-width: 100%; text-align: left; }
  .ye-trend-axis { font-size: 20px; }
  .ye-trend-value { font-size: 23px; }
  .ye-trend-month { font-size: 21px; }
}


/* ============================================================
   Nov 2026 — ye "Quarterly Report Part 2" design grammar,
   recolored to the site gold system (deck blues NOT imported).
   Sources: p.14 semicircle fan gauge · p.4 pill track bars ·
   p.3 gold accent tab on insight callouts.
   ============================================================ */
.ye-semi-row {
  grid-template-columns: repeat(auto-fit, minmax(230px, 340px));
  justify-content: center;
}
.ye-semi svg { width: 200px; height: 122px; }
.ye-semi-val { font-size: 1.7rem; }

.ye-pillrow { margin-top: 1.05rem; }
.ye-pillrow-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.60);
  margin-bottom: 0.3rem;
}
.ye-pillrow-bar {
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.ye-pillrow-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d4a843, #b8860b);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
}
.ye-pillrow-val {
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}
.ye-pillrow-delta { margin-top: 0.28rem; font-size: 0.72rem; letter-spacing: 0.02em; }
.ye-pillrow-delta.ye-up { color: #3fbf6f; }
.ye-pillrow-delta.ye-down { color: #e05252; }
.ye-pillrow-delta.ye-flat { color: rgba(255, 255, 255, 0.45); }

/* Affluence-signal / What-to-watch callouts: gold accent tab
   (deck p.3 callout grammar) over the site's black+gold system. */
.dq-insight {
  background: rgba(255, 255, 255, 0.03) !important;
  border-left: 3px solid hsl(43, 74%, 55%) !important;
  border-radius: 0 10px 10px 0;
  color: rgba(255, 255, 255, 0.72) !important;
}
.dq-insight strong { color: hsl(43, 74%, 58%) !important; }
