:root {
  --peach: #ffe3cc;
  --peach-deep: #ffd1ad;
  --orange: #f07c1f;
  --orange-dark: #c95f0a;
  --leaf: #3c8d4c;
  --ink: #2b2118;
  --muted: #6b5a4e;
  --card: #fffaf5;
}
html { scroll-behavior: smooth; }
html[data-theme="dark"] {
  --peach: #1f1410;
  --peach-deep: #2a1b14;
  --orange: #ff8c3a;
  --orange-dark: #ffa04d;
  --leaf: #7fcf8b;
  --ink: #f3e7dc;
  --muted: #c9b3a3;
  --card: #2a1b14;
  --rule: rgba(243,231,220,.35);
  --rule-soft: rgba(243,231,220,.15);
  --row-hover: rgba(255,160,77,.22);
  --row-active: rgba(255,160,77,.34);
}
:root { --rule: rgba(43,33,24,.35); --rule-soft: rgba(43,33,24,.15); --row-hover: rgba(240,124,31,.16); --row-active: rgba(240,124,31,.28); }
html, body { transition: background-color .25s, color .25s; }
html, body { background: var(--peach); color: var(--ink); margin: 0; }
body { font-family: Inter, "Segoe UI", Arial, sans-serif; }

.zest-page { max-width: 1120px; margin: 0 auto; padding: 0 20px 60px; }

.zest-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px 0 12px;
}
.zest-hero h1 { font-family: "Playfair Display", Georgia, "Times New Roman", serif; font-size: 56px; font-weight: 700; margin: 0; letter-spacing: -0.5px; }
.zest-hero h1 span { color: var(--orange); }
.zest-hero p { color: var(--muted); margin: 6px 0 0; font-size: 16px; max-width: 640px; }
.zest-hero-art { display: flex; align-items: center; gap: 28px; flex-shrink: 0; }
.zest-hero-art a { display: flex; align-items: center; height: 150px; transform: translateY(16px); }
.zest-orange { width: 150px; height: 150px; filter: drop-shadow(0 8px 16px rgba(201,95,10,.25)); }
.zest-logo { width: 220px; height: auto; display: block; transition: transform .15s; }
.zest-logo:hover { transform: scale(1.04); }

.kpi-row {
  display: flex; flex-wrap: wrap; margin: 22px 0 40px;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.kpi {
  flex: 1; min-width: 170px; padding: 14px 18px 14px 0; margin-right: 18px;
  border-right: 1px solid var(--rule-soft);
}
.kpi:last-child { border-right: 0; margin-right: 0; }
.kpi .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.kpi .value { font-size: 30px; font-weight: 700; margin: 4px 0 2px; color: var(--orange-dark); font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 13px; }
.kpi .up { color: var(--leaf); }
.kpi .down { color: #b3261e; }

.zest-section { margin-bottom: 46px; }
.zest-section h3 { font-family: "Playfair Display", Georgia, serif; font-size: 26px; margin: 0 0 4px; }
.zest-section h3::before { content: "◐ "; color: var(--orange); }
.zest-section .headline { font-size: 16px; margin: 0 0 14px; color: var(--ink); }
.zest-card { padding: 0; margin-bottom: 18px; }

.zest-spotlight { margin-top: 48px; padding-top: 18px; border-top: 3px double var(--rule); }
.zest-spotlight h2 { font-family: "Playfair Display", Georgia, serif; margin: 0 0 2px; font-size: 32px; }
.zest-spotlight .sub { color: var(--muted); margin: 0 0 18px; }

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td,
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th { background: transparent; }

.zest-foot {
  display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 13px;
  margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(201,95,10,.25); line-height: 1.6;
}
.zest-foot-logo { height: 40px; width: auto; }

.zest-nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 0;
  background: linear-gradient(var(--peach) 85%, rgba(255,227,204,0));
}
.zest-nav-btn {
  text-decoration: none; color: var(--orange-dark); font-weight: 600; font-size: 14px;
  padding: 7px 16px; border-radius: 999px; background: transparent;
  border: 1px solid var(--orange-dark); transition: background .15s, color .15s, transform .15s;
}
.zest-nav-btn:hover { background: var(--orange); color: #fff; transform: translateY(-1px); }
.zest-section, .zest-spotlight { scroll-margin-top: 70px; }

.zest-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.zest-controls .dash-dropdown { min-width: 170px; }
.zest-controls input[type="text"] {
  padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(201,95,10,.3); min-width: 240px;
  font-family: inherit; font-size: 14px; background: transparent;
}
.zest-btn {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--orange); background: var(--orange);
  color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit;
}
.zest-btn:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.zest-count { color: var(--muted); font-size: 13px; margin: 4px 0 8px; }

.zest-dateline {
  text-align: center; font-size: 12px; color: var(--muted); letter-spacing: .4px; text-transform: uppercase;
  padding: 10px 0 8px; border-bottom: 1px solid var(--rule); margin-top: 6px;
}
.zest-hero { border-bottom: 2px solid var(--rule); margin-bottom: 8px; }
.zest-section { border-top: 1px solid var(--rule-soft); padding-top: 16px; }
.zest-how { margin: -6px 0 14px; font-size: 13px; color: var(--muted); }
.zest-how summary { cursor: pointer; color: var(--orange-dark); font-weight: 600; }
.zest-how summary::marker { color: var(--orange); }
.zest-how p { margin: 6px 0 0 14px; max-width: 760px; line-height: 1.55; }
.zest-method { border-top: 2px solid var(--rule); margin-top: 40px; padding-top: 14px; }
.zest-method h3 { font-family: "Playfair Display", Georgia, serif; font-size: 22px; margin: 0 0 10px; }
.zest-method dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 16px; font-size: 14px; line-height: 1.55; }
.zest-method dt { font-weight: 600; color: var(--orange-dark); }
.zest-method dd { margin: 0; color: var(--ink); }

/* flat tables: peach through, rules only */
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table { background: transparent; }
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
  background: transparent !important; border-bottom: 2px solid var(--rule) !important;
}
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td {
  background: transparent !important; border-bottom: 1px solid var(--rule-soft) !important;
  border-left: 0 !important; border-right: 0 !important;
}
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th,
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td { border-top: 0 !important; }
.dash-dropdown .Select-control, .dash-dropdown .Select-menu-outer { background: var(--peach) !important; border-color: var(--rule) !important; }

.zest-nav-toggle { margin-left: auto; background: var(--orange-dark); color: var(--peach); cursor: pointer; font-family: inherit; }
.zest-nav-toggle:hover { background: var(--orange); color: #fff; }
html[data-theme="dark"] .kpi .delta.down { color: #ff7b6b; }
html[data-theme="dark"] .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td,
html[data-theme="dark"] .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th { color: var(--ink) !important; }
html[data-theme="dark"] .dash-dropdown .Select-value-label, html[data-theme="dark"] .dash-dropdown .Select-placeholder,
html[data-theme="dark"] .dash-dropdown .Select-option { color: var(--ink) !important; }
html[data-theme="dark"] .zest-controls input[type="text"] { color: var(--ink); border-color: var(--rule); }

/* Dark mode: cells ignore the mouse entirely, so nothing can paint a hover or
   active state. Column headers keep pointer events so sorting still works.
   Light mode is untouched. */
html[data-theme="dark"] .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td.dash-cell,
html[data-theme="dark"] .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td.dash-cell * {
  pointer-events: none !important;
}
/* Header too: no hover paint. Sorting still works because the sort arrow
   keeps pointer events; the rest of the header cell ignores the mouse. */
html[data-theme="dark"] .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th.dash-header,
html[data-theme="dark"] .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th.dash-header:hover,
html[data-theme="dark"] .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th.dash-header div {
  background: transparent !important; background-color: transparent !important; color: var(--ink) !important;
  pointer-events: none !important;
}
html[data-theme="dark"] .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th.dash-header .column-actions,
html[data-theme="dark"] .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th.dash-header .sort {
  pointer-events: auto !important;
}

/* ── Responsive ── */
.zest-page { overflow-x: hidden; }
.zest-card .dash-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.zest-nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.zest-nav::-webkit-scrollbar { display: none; }
.zest-nav-btn { white-space: nowrap; flex-shrink: 0; }

/* Tablet */
@media (max-width: 900px) {
  .zest-hero { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 18px; }
  .zest-hero h1 { font-size: 44px; }
  .zest-hero-art { align-self: center; gap: 18px; }
  .zest-logo { width: 170px; }
  .zest-orange { width: 110px; height: 110px; }
  .zest-hero-art a { height: 110px; transform: translateY(10px); }
  .kpi { min-width: 45%; border-right: 0; margin-right: 0; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
  .kpi .value { font-size: 26px; }
  .zest-method dl { grid-template-columns: 1fr; gap: 2px 0; }
  .zest-method dt { margin-top: 10px; }
}

/* Phone */
@media (max-width: 600px) {
  .zest-page { padding: 0 12px 40px; }
  .zest-dateline { font-size: 11px; }
  .zest-hero h1 { font-size: 38px; }
  .zest-hero p { font-size: 14px; }
  .zest-hero-art { gap: 14px; }
  .zest-logo { width: 140px; }
  .zest-orange { width: 90px; height: 90px; }
  .zest-hero-art a { height: 90px; transform: translateY(8px); }
  .zest-nav { gap: 6px; padding: 8px 0; }
  .zest-nav-btn { font-size: 13px; padding: 6px 12px; }
  .zest-nav-toggle { margin-left: 0; }
  .kpi { min-width: 100%; }
  .kpi .value { font-size: 24px; }
  .zest-section h3 { font-size: 21px; }
  .zest-section .headline { font-size: 15px; }
  .zest-spotlight h2 { font-size: 26px; }
  .zest-controls { flex-direction: column; align-items: stretch; }
  .zest-controls .dash-dropdown, .zest-controls input[type="text"] { min-width: 0; width: 100%; }
  .zest-btn { width: 100%; text-align: center; }
  .zest-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  .js-plotly-plot .plotly .modebar { display: none !important; }
}
