:root {
  color-scheme: light !important;
  --editorial-ink: #17212b;
  --editorial-muted: #596572;
  --editorial-paper: #fffdf9;
  --editorial-canvas: #f2efe8;
  --editorial-line: #d9dfe3;
  --editorial-blue: #075f9f;
  --editorial-blue-soft: #e8f1f7;
  --editorial-orange: #e9682b;
  --editorial-orange-soft: #fff0e7;
  --editorial-shadow: 0 18px 50px rgba(31, 45, 55, 0.08);
  --editorial-radius: 18px;
  --editorial-display: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --editorial-body: "Leelawadee UI", "Noto Sans Thai", Aptos, Tahoma, sans-serif;
  --portable-bg: var(--editorial-canvas) !important;
  --portable-panel: var(--editorial-paper) !important;
  --portable-text: var(--editorial-ink) !important;
  --portable-muted: var(--editorial-muted) !important;
  --portable-border: var(--editorial-line) !important;
}

html {
  scroll-behavior: smooth;
  background: var(--editorial-canvas) !important;
  overflow-x: clip;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(7, 95, 159, 0.08), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(233, 104, 43, 0.09), transparent 25rem),
    var(--editorial-canvas) !important;
  color: var(--editorial-ink) !important;
  font-family: var(--editorial-body) !important;
  overflow-x: clip;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

::selection {
  background: rgba(233, 104, 43, 0.24);
  color: var(--editorial-ink);
}

.dashboard-shell.report-shell {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background: transparent !important;
  color: var(--editorial-ink) !important;
}

.analytics-top-bar {
  position: sticky !important;
  top: 0;
  z-index: 60;
  width: 100vw !important;
  max-width: 100vw;
  margin-left: calc((100% - 100vw) / 2) !important;
  min-height: 64px;
  padding: 0 28px !important;
  border-bottom: 1px solid rgba(23, 33, 43, 0.1) !important;
  background: rgba(255, 253, 249, 0.9) !important;
  color: var(--editorial-ink) !important;
  box-shadow: 0 8px 30px rgba(31, 45, 55, 0.05);
  backdrop-filter: blur(18px) saturate(135%);
}

.analytics-top-bar-leading {
  min-width: 0;
}

.analytics-top-bar-title h1 {
  margin: 0 !important;
  color: var(--editorial-ink) !important;
  font-family: var(--editorial-display) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
}

.analytics-top-bar-title::after {
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin-left: 12px;
  padding: 0 9px;
  border: 1px solid rgba(7, 95, 159, 0.18);
  border-radius: 999px;
  background: var(--editorial-blue-soft);
  color: var(--editorial-blue);
  content: "ENERGY RETAIL · 2026";
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  vertical-align: 2px;
}

.top-bar-refresh-text {
  color: var(--editorial-muted) !important;
  font-size: 12px !important;
  font-variant-numeric: tabular-nums;
}

.report-content-grid {
  width: min(1120px, calc(100% - 48px)) !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 44px 0 104px !important;
}

.analytics-layout-row {
  margin-bottom: 8px;
}

.analytics-layout-item,
.analytics-layout-item-shell {
  min-width: 0;
}

.panel {
  color: var(--editorial-ink) !important;
}

.report-markdown-block {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.report-markdown-block .report-block-body {
  padding: 10px 4px !important;
}

.markdown-body,
.rich-markdown,
.rich-markdown-preview {
  color: var(--editorial-ink) !important;
  font-family: var(--editorial-body) !important;
}

.markdown-body p,
.markdown-body li {
  max-width: 86ch;
  color: #34414d !important;
  font-size: 15.5px !important;
  line-height: 1.78 !important;
  text-wrap: pretty;
}

.markdown-body strong {
  color: var(--editorial-ink) !important;
  font-weight: 750;
}

.markdown-body h1,
.markdown-body h2,
.panel-header h2 {
  color: var(--editorial-ink) !important;
  font-family: var(--editorial-display) !important;
  letter-spacing: -0.025em !important;
  text-wrap: balance;
}

.markdown-body h2 {
  margin: 16px 0 14px !important;
  font-size: clamp(25px, 3vw, 34px) !important;
  line-height: 1.18 !important;
}

.markdown-body h3 {
  margin: 30px 0 12px !important;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(7, 95, 159, 0.14);
  color: var(--editorial-blue) !important;
  font-family: var(--editorial-display) !important;
  font-size: 21px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.markdown-body ol,
.markdown-body ul {
  padding-left: 1.45rem !important;
}

.markdown-body li + li {
  margin-top: 9px;
}

#title {
  position: relative;
  isolation: isolate;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(7, 95, 159, 0.16) !important;
  border-radius: 28px !important;
  background:
    linear-gradient(118deg, rgba(255, 253, 249, 0.98) 0 58%, rgba(232, 241, 247, 0.96) 58% 100%) !important;
  box-shadow: var(--editorial-shadow) !important;
}

#title::before,
#title::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
}

#title::before {
  width: 310px;
  height: 310px;
  top: -165px;
  right: -70px;
  border: 48px solid rgba(233, 104, 43, 0.16);
}

#title::after {
  width: 430px;
  height: 430px;
  right: -245px;
  bottom: -285px;
  border: 62px solid rgba(7, 95, 159, 0.12);
}

#title .report-block-body {
  display: flex;
  min-height: 300px;
  padding: 62px 64px !important;
  align-items: center;
}

#title .markdown-body {
  width: min(690px, 72%);
}

#title h1 {
  margin: 0 0 20px !important;
  color: #102331 !important;
  font-family: var(--editorial-display) !important;
  font-size: clamp(52px, 7vw, 86px) !important;
  font-weight: 700 !important;
  line-height: 0.92 !important;
  letter-spacing: -0.055em !important;
}

#title p {
  margin: 0 !important;
  color: var(--editorial-blue) !important;
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.55 !important;
  text-transform: uppercase;
}

#executive_summary {
  margin: 14px 0 4px;
  padding: 20px 26px !important;
  border-left: 4px solid var(--editorial-orange) !important;
  border-radius: 0 var(--editorial-radius) var(--editorial-radius) 0 !important;
  background: rgba(255, 253, 249, 0.72) !important;
}

#executive_summary h2 {
  color: var(--editorial-orange) !important;
}

.report-metric-card {
  min-height: 126px;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 43, 0.09) !important;
  border-radius: 16px !important;
  background: var(--editorial-paper) !important;
  box-shadow: 0 10px 28px rgba(31, 45, 55, 0.07) !important;
  transition: transform 180ms ease-out, box-shadow 180ms ease-out, border-color 180ms ease-out;
}

.report-metric-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--editorial-blue);
  content: "";
}

.report-metric-card[id$="c_rivalry"]::before,
.report-metric-card[id$="c_buyer"]::before,
.report-metric-card[id$="c_substitute"]::before {
  background: var(--editorial-orange);
}

.report-metric-card:hover {
  z-index: 2;
  border-color: rgba(7, 95, 159, 0.24) !important;
  box-shadow: 0 16px 38px rgba(31, 45, 55, 0.12) !important;
  transform: translateY(-3px);
}

.kpi-label {
  color: var(--editorial-muted) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.kpi-value {
  color: var(--editorial-ink) !important;
  font-family: var(--editorial-display) !important;
  font-size: 32px !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.chart-panel,
.table-card {
  overflow: hidden;
  border: 1px solid rgba(23, 33, 43, 0.1) !important;
  border-radius: var(--editorial-radius) !important;
  background: var(--editorial-paper) !important;
  box-shadow: 0 12px 36px rgba(31, 45, 55, 0.07) !important;
}

.chart-panel:hover,
.table-card:hover {
  border-color: rgba(7, 95, 159, 0.2) !important;
}

.panel-header {
  padding: 24px 26px 16px !important;
  border-bottom: 1px solid rgba(23, 33, 43, 0.08) !important;
  background: linear-gradient(180deg, rgba(232, 241, 247, 0.54), rgba(255, 253, 249, 0)) !important;
}

.panel-header h2 {
  margin: 0 !important;
  font-size: 21px !important;
  line-height: 1.3 !important;
}

.chart-frame {
  padding: 16px 18px 22px !important;
  background: var(--editorial-paper) !important;
}

.recharts-cartesian-grid line {
  stroke: #dfe5e8 !important;
  stroke-dasharray: 3 5;
}

.recharts-cartesian-axis-tick-value,
.recharts-label,
.chart-axis-number,
.chart-bar-value-label {
  fill: #52606c !important;
  font-family: var(--editorial-body) !important;
}

.chart-bar-value-label {
  font-weight: 750 !important;
}

.chart-legend-button {
  min-height: 36px;
  border-radius: 999px !important;
  transition: background 160ms ease-out;
}

.chart-legend-button:hover,
.chart-legend-button:focus-visible {
  background: var(--editorial-blue-soft) !important;
}

.table-scroll-shell,
.table-wrap {
  background: var(--editorial-paper) !important;
  scrollbar-color: rgba(7, 95, 159, 0.45) transparent;
  scrollbar-width: thin;
}

.data-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: var(--editorial-ink) !important;
  font-family: var(--editorial-body) !important;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 13px 14px !important;
  border-bottom: 1px solid #cbd5db !important;
  background: #edf3f6 !important;
  color: #324552 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.055em;
  line-height: 1.35 !important;
  text-transform: uppercase;
}

.data-table td {
  padding: 13px 14px !important;
  border-bottom: 1px solid rgba(23, 33, 43, 0.07) !important;
  color: #34414d !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  vertical-align: top !important;
}

.data-table tbody tr:nth-child(even) td {
  background: rgba(232, 241, 247, 0.34) !important;
}

.data-table tbody tr:hover td {
  background: var(--editorial-orange-soft) !important;
}

.table-sort-button {
  color: inherit !important;
  font: inherit !important;
  letter-spacing: inherit;
  text-transform: inherit;
}

.viz-card-actions {
  opacity: 0.12;
  transition: opacity 160ms ease-out;
}

.panel:hover > .viz-card-actions,
.panel:focus-within > .viz-card-actions,
.report-metric-card:hover .viz-card-actions,
.report-metric-card:focus-within .viz-card-actions {
  opacity: 1;
}

.viz-card-menu-button {
  min-width: 40px;
  min-height: 40px;
  border-radius: 999px !important;
  color: var(--editorial-muted) !important;
}

.viz-card-menu-button:hover,
.viz-card-menu-button:focus-visible {
  background: var(--editorial-blue-soft) !important;
  color: var(--editorial-blue) !important;
}

#rivalry_heading,
#supplier_heading,
#buyer_heading,
#entry_heading,
#sub_heading {
  margin-top: 30px;
  padding: 28px 30px !important;
  border: 1px solid rgba(23, 33, 43, 0.09) !important;
  border-left: 6px solid var(--editorial-blue) !important;
  border-radius: 4px var(--editorial-radius) var(--editorial-radius) 4px !important;
  background: rgba(255, 253, 249, 0.86) !important;
  box-shadow: 0 10px 30px rgba(31, 45, 55, 0.05) !important;
}

#rivalry_heading,
#buyer_heading,
#sub_heading {
  border-left-color: var(--editorial-orange) !important;
}

#decision_lens_heading,
#scenario_heading,
#watchlist_heading,
#validation_heading,
#sources_heading {
  margin-top: 38px;
  padding-top: 34px !important;
  border-top: 1px solid rgba(23, 33, 43, 0.16) !important;
}

.report-toc {
  position: fixed;
  top: 92px;
  left: max(18px, calc((100vw - 1400px) / 2));
  z-index: 40;
  display: none;
  width: 174px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 16px 12px;
  border: 1px solid rgba(23, 33, 43, 0.1);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.88);
  box-shadow: 0 16px 40px rgba(31, 45, 55, 0.08);
  backdrop-filter: blur(16px);
  scrollbar-width: none;
}

.report-toc::-webkit-scrollbar {
  display: none;
}

.report-toc__eyebrow {
  margin: 0 8px 10px;
  color: var(--editorial-orange);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.report-toc__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-toc a {
  display: block;
  padding: 7px 9px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: #61707b;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  transition: color 160ms ease-out, background 160ms ease-out, border-color 160ms ease-out;
}

.report-toc a:hover,
.report-toc a:focus-visible,
.report-toc a[aria-current="true"] {
  border-left-color: var(--editorial-orange);
  background: var(--editorial-orange-soft);
  color: var(--editorial-ink);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 3px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--editorial-blue), var(--editorial-orange));
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(23, 33, 43, 0.14);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.92);
  color: var(--editorial-blue);
  box-shadow: 0 10px 28px rgba(31, 45, 55, 0.13);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease-out, transform 180ms ease-out, background 180ms ease-out;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--editorial-blue);
  color: white;
}

:focus-visible {
  outline: 3px solid rgba(233, 104, 43, 0.58) !important;
  outline-offset: 3px !important;
}

@media (min-width: 1480px) {
  .report-toc {
    display: block;
  }

  .report-content-grid {
    transform: translateX(72px);
  }
}

@media (max-width: 900px) {
  .analytics-top-bar {
    min-height: 56px;
    padding: 0 16px !important;
  }

  .analytics-top-bar-title::after {
    display: none;
  }

  .top-bar-refresh-text {
    font-size: 10px !important;
  }

  .report-content-grid {
    width: min(100% - 28px, 760px) !important;
    padding-top: 22px !important;
  }

  #title {
    min-height: 250px;
    border-radius: 22px !important;
  }

  #title .report-block-body {
    min-height: 250px;
    padding: 42px 34px !important;
  }

  #title .markdown-body {
    width: 88%;
  }

  #title h1 {
    font-size: clamp(44px, 13vw, 68px) !important;
  }

  .panel-header {
    padding: 20px 18px 14px !important;
  }

  .data-table th,
  .data-table td {
    min-width: 132px;
  }
}

@media (max-width: 560px) {
  .analytics-top-bar-actions {
    display: none !important;
  }

  .report-content-grid {
    width: calc(100% - 20px) !important;
    padding-bottom: 76px !important;
  }

  #title .report-block-body {
    padding: 34px 24px !important;
  }

  #title .markdown-body {
    width: 100%;
  }

  #title p {
    max-width: 30ch;
    font-size: 11px !important;
  }

  #executive_summary,
  #rivalry_heading,
  #supplier_heading,
  #buyer_heading,
  #entry_heading,
  #sub_heading {
    padding: 20px 18px !important;
  }

  .markdown-body p,
  .markdown-body li {
    font-size: 15px !important;
    line-height: 1.72 !important;
  }

  .markdown-body h2 {
    font-size: 25px !important;
  }

  .report-metric-card {
    min-height: 112px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  :root {
    color-scheme: light !important;
  }

  body {
    background: white !important;
  }

  .analytics-top-bar,
  .report-toc,
  .reading-progress,
  .back-to-top,
  .viz-card-actions {
    display: none !important;
  }

  .report-content-grid {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    transform: none !important;
  }

  .chart-panel,
  .table-card,
  #title {
    box-shadow: none !important;
    break-inside: avoid;
  }
}
