.odl-embed {
  --odl-ink: #0f172a;
  --odl-ink-soft: #334155;
  --odl-bg: radial-gradient(circle at 15% 20%, #edf6ff 0%, #f7fbff 38%, #fffaf1 100%);
  --odl-card: #ffffff;
  --odl-border: #d9e5f4;
  --odl-brand: #0f5db8;
  --odl-brand-alt: #0891b2;
  --odl-accent: #f59e0b;
  --odl-shadow: 0 24px 50px rgba(15, 23, 42, 0.09);
  position: relative;
  background: var(--odl-bg);
  color: var(--odl-ink);
  border: 1px solid var(--odl-border);
  border-radius: 10px;
  padding: 1.2rem;
  margin: 1.5rem 0;
  width: 110%;
  max-width: none;
  margin-left: -15px;
  box-shadow: var(--odl-shadow);
  overflow: visible;
}

.odl-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.odl-title {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  letter-spacing: 0.01em;
}

.odl-summary {
  margin: 1rem 0 0.4rem;
  color: var(--odl-ink-soft);
  max-width: 72ch;
}

.odl-badge {
  background: #e0f2ff;
  color: var(--odl-brand);
  border: 1px solid #b4d8ff;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.odl-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 220;
}

.odl-menu {
  position: relative;
}

.odl-action-menu {
  background: linear-gradient(135deg, #ffffff, #f1f7ff);
  border: 1px solid #b9d2ee;
  color: #0f4e91;
  box-shadow: 0 8px 16px rgba(15, 93, 184, 0.12);
  border-radius: 12px;
  padding: 0.56rem 0.94rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.odl-action-menu::after {
  content: '▾';
  margin-left: 0.38rem;
  display: inline-block;
}

.odl-menu.is-open .odl-action-menu,
.odl-action-menu:hover,
.odl-action-menu:focus-visible {
  background: linear-gradient(135deg, var(--odl-brand), var(--odl-brand-alt));
  color: #fff;
  border-color: #0f5db8;
  box-shadow: 0 10px 22px rgba(15, 93, 184, 0.24);
}

.odl-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 520;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #c7d9ed;
  border-radius: 12px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
  padding: 0.55rem;
  display: grid;
  gap: 0.4rem;
}

.odl-menu-panel[hidden] {
  display: none !important;
}

.odl-action {
  border: 1px solid #c7d9ed;
  background: #ffffff;
  color: #164a84;
  border-radius: 10px;
  padding: 0.54rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.odl-action:hover,
.odl-action:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 93, 184, 0.2);
  background: #f0f7ff;
  color: #164a84;
}

.odl-menu-panel .odl-action {
  width: 100%;
  text-align: left;
  color: #164a84 !important;
}

.odl-menu-panel .odl-action:hover,
.odl-menu-panel .odl-action:focus-visible {
  background: #eff6ff;
  color: #0f4e91 !important;
}

.odl-journalist {
  border: 1px solid #d6e7fb;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.85rem 0.95rem;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
}

.odl-journalist h4 {
  margin: 0 0 0.45rem;
  color: #0f5db8;
}

.odl-journalist ul {
  margin: 0;
  padding-left: 1.1rem;
  list-style: none;
}

.odl-journalist li {
  position: relative;
  padding-left: 0.2rem;
  margin-bottom: 0.35rem;
  color: #334155;
  font-size: 0.88rem;
  line-height: 1.5;
}

.odl-journalist li::before {
  content: '•';
  color: #94a3b8;
  font-weight: 400;
  position: absolute;
  left: -1rem;
  font-size: 1.1em;
}

.odl-finding-subject {
  color: #2a5f9f;
  font-weight: 600;
}

.odl-controls {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 1.45rem;
  align-items: end;
}

.odl-controls label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: var(--odl-ink-soft);
}

.odl-controls input,
.odl-controls select {
  border: 1px solid var(--odl-border);
  border-radius: 9px;
  min-height: 40px;
  min-width: 220px;
  padding: 0.45rem 0.65rem;
  font-size: 0.95rem;
}

.odl-sort-hint {
  margin: 0.35rem 0 0;
  color: #4b5563;
  font-size: 0.75rem;
  flex-basis: 100%;
  padding-bottom: 0.55rem;
}

.odl-tabs {
  display: inline-flex;
  gap: 0.45rem;
  border: 1px solid var(--odl-border);
  border-radius: 12px;
  padding: 0.3rem;
  margin-bottom: 1rem;
  background: #f4f9ff;
}

.odl-tab {
  border: 0;
  background: transparent;
  color: var(--odl-ink-soft);
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 220ms ease;
}

.odl-tab.is-active {
  background: linear-gradient(135deg, var(--odl-brand), var(--odl-brand-alt));
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 93, 184, 0.3);
}

.odl-panel.is-hidden {
  display: none;
}

.odl-panel {
  margin-bottom: 1rem;
}

.odl-table-wrap {
  overflow-x: auto;
  border: 1px solid #d9e5f4;
  border-radius: 10px;
  background: var(--odl-card);
}

.odl-table-wrap.is-sticky-header,
.odl-table-wrap.is-sticky-first-col {
  overflow: auto;
  max-height: min(68vh, 640px);
}

.odl-table-wrap.is-overflow-scroll {
  overflow: auto;
  max-height: var(--odl-table-max-height, 640px);
}

.odl-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--odl-card);
  border-radius: 10px;
  overflow: visible;
}

.odl-table.is-equal {
  table-layout: auto;
}

.odl-table.is-wrap th,
.odl-table.is-wrap td {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.odl-table.is-nowrap th,
.odl-table.is-nowrap td {
  white-space: nowrap;
}

.odl-table caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.odl-table th,
.odl-table td:first-child {
  font-weight: 600;
}

.odl-table td {
  border-bottom: 1px solid #e6edf5;
  padding: 0.62rem 0.6rem;
  text-align: left;
  font-size: 0.88rem;
}

.odl-table td:first-child {
  min-width: 140px;
  overflow-wrap: break-word;
  word-break: normal;
}

.odl-table.is-sticky-header thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  box-shadow: 0 1px 0 #d9e5f4;
}

.odl-table.is-sticky-first-col thead th:first-child,
.odl-table.is-sticky-first-col tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #eef6ff;
}

.odl-table.is-sticky-first-col tbody td:first-child {
  background: #ffffff;
  box-shadow: 1px 0 0 #d9e5f4;
  font-weight: 600;
}

.odl-table.is-sticky-first-col.is-sticky-header thead th:first-child {
  z-index: 8;
}

.odl-table-scroll-hint {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  color: #516175;
}

.odl-table th {
  font-size: 0.88rem;
}

.odl-table thead th {
  background: #eef6ff;
  color: #0b4f97;
  font-weight: 700;
}

.odl-th-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #b8d0ea;
  background: linear-gradient(135deg, #5ba6ed, #3b89da);
  color: #ffffff;
  font: inherit;
  cursor: pointer;
  padding: 0.36rem 0.55rem;
  border-radius: 8px;
  line-height: 1.1;
  white-space: nowrap;
}

.odl-sort-indicator::before {
  content: '↕';
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.82);
}

.odl-th-btn.is-sorted[data-sort-dir="asc"] .odl-sort-indicator::before {
  content: '▲';
  font-size: 0.68rem;
  color: #ffffff;
}

.odl-th-btn.is-sorted[data-sort-dir="desc"] .odl-sort-indicator::before {
  content: '▼';
  font-size: 0.68rem;
  color: #ffffff;
}

.odl-table tbody tr {
  transition: background 160ms ease;
  cursor: pointer;
  user-select: none;
}

.odl-table tbody tr:hover {
  background: #f8fcff;
}

.odl-table tbody tr.is-highlighted {
  background: #dbeafe !important;
  box-shadow: inset 4px 0 0 #17A7FF;
}

.odl-table tbody tr.is-highlighted td {
  background: inherit !important;
}

.odl-table tbody tr.is-highlighted:hover {
  background: #cfe0f7 !important;
}

.odl-chart {
  min-height: 420px;
  border: 1px solid var(--odl-border);
  border-radius: 12px;
  background: var(--odl-card);
  padding: 0.8rem 0.8rem 1rem;
  overflow: hidden;
}

.odl-line-svg {
  width: 100%;
  height: clamp(300px, 44vw, 420px);
  display: block;
}

.odl-heatmap-svg {
  width: max(100%, 760px);
  height: auto;
  max-height: none;
}

.odl-chart-legend {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: #475569;
}

.odl-chart-legend[hidden] {
  display: none !important;
}

.odl-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.odl-legend-scale-row,
.odl-legend-label-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  max-width: 360px;
}

.odl-legend-label-row {
  grid-template-columns: 1fr 1fr;
  max-width: 360px;
  padding: 0 0.15rem;
}

.odl-legend-label-row span:last-child {
  text-align: right;
}

.odl-legend-end {
  font-weight: 700;
  color: #334155;
  min-width: 28px;
  text-align: center;
}

.odl-legend-swatch {
  width: 14px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid #bfd3ea;
}

.odl-legend-swatch-bar {
  background: #0f5db8;
}

.odl-legend-line {
  width: 18px;
  height: 2px;
  border-top: 2px dashed #f59e0b;
}

.odl-legend-line-solid {
  border-top-style: solid;
  border-top-color: #0f5db8;
}

.odl-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #0f5db8;
}

.odl-legend-spectrum {
  width: 120px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #bfd3ea;
  background: linear-gradient(90deg, #5b21b6 0%, #1d4ed8 8%, #0891b2 16%, #16a34a 22%, #eab308 28%, #f97316 34%, #dc2626 42%, #991b1b 54%, #4a0e0e 70%, #1a0505 100%);
}

.odl-legend-heat {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #bfd3ea;
  background: linear-gradient(90deg, rgb(37 99 235) 0%, rgb(245 158 11) 100%);
}

.odl-axis-line {
  stroke: #94a3b8;
  stroke-width: 1;
}

.odl-line-path {
  fill: none;
  stroke: #0f5db8;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: odl-draw 1200ms ease forwards;
}

.odl-spectrum-fill {
  opacity: 0.88;
}

.odl-spectrum-outline {
  fill: none;
  stroke: #0f172a;
  stroke-width: 1.8;
}

.odl-spectrum-point {
  fill: #0f172a;
  opacity: 0.55;
  cursor: pointer;
}

.odl-line-point {
  fill: #0f5db8;
  stroke: #fff;
  stroke-width: 2;
  cursor: pointer;
}

.odl-svg-bar {
  fill: #0f5db8;
  transform-origin: center bottom;
  animation: odl-grow-svg 450ms ease both;
  cursor: pointer;
}

.odl-trend-line {
  fill: none;
  stroke: #f59e0b;
  stroke-width: 2;
  stroke-dasharray: 6 5;
  opacity: 0.92;
  pointer-events: none;
}

.odl-chart-axis {
  margin: 0.55rem 0 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #475569;
}

.odl-svg-axis-label {
  fill: #475569;
  font-size: 13px;
  font-weight: 600;
}

.odl-svg-value {
  fill: #0f5db8;
  font-size: 12px;
  font-weight: 700;
}

.odl-svg-label {
  fill: #334155;
  font-size: 11px;
}

.odl-heat-row-label {
  font-size: 18px;
  font-weight: 600;
}

.odl-heat-col-label {
  font-size: 16px;
  font-weight: 600;
}

.odl-transparency,
.odl-dictionary {
  margin-top: 0.85rem;
  border: 1px solid var(--odl-border);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem 0.8rem;
}

.odl-transparency summary,
.odl-dictionary summary {
  cursor: pointer;
  font-weight: 600;
}

.odl-transparency ul,
.odl-dictionary ul {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
}

.odl-attribution {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 1rem;
  color: var(--odl-ink-soft);
}

.odl-attribution.is-subtle {
  opacity: 0.78;
}

.odl-attribution a {
  color: var(--odl-brand);
  text-decoration-thickness: 2px;
  font-weight: 600;
}

.odl-embed-cta {
  margin-top: 0.9rem;
  margin-bottom: 10px;
  font-size: 1rem;
  color: var(--odl-ink-soft);
  opacity: 0.7;
}

.odl-embed-cta button {
  all: unset;
  color: var(--odl-brand);
  cursor: pointer;
  font: inherit;
}

.odl-embed-cta button:hover {
  text-decoration: underline;
}

.odl-watermark {
  margin-left: auto;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #d97706;
}

.odl-cta-wrap {
  margin-top: 0.85rem;
}

.odl-cta {
  display: inline-block;
  text-decoration: none;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--odl-brand), var(--odl-brand-alt));
  color: #fff;
  font-weight: 700;
  padding: 0.58rem 0.95rem;
}

.odl-embed-kit {
  border: 1px solid #c5dbf4;
  border-radius: 12px;
  padding: 0.8rem;
  width: min(880px, 90vw);
}

.odl-embed-kit textarea {
  width: 100%;
  height: 5.5rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 0.78rem;
  border: 1px solid #d9e5f4;
  border-radius: 8px;
  padding: 0.5rem;
}

.odl-kit-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.odl-kit-note {
  color: #334155;
  font-size: 1rem;
}

.odl-tooltip {
  position: absolute;
  z-index: 12;
  max-width: 320px;
  width: max-content;
  padding: 0;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.95);
  color: #cbd5e1;
  font-size: 0.78rem;
  pointer-events: none;
  white-space: normal;
  overflow: hidden;
}

.odl-tip-header {
  padding: 0.5rem 0.7rem;
  font-weight: 700;
  font-size: 0.84rem;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.odl-tip-body {
  padding: 0.35rem 0;
}

.odl-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0.7rem;
}

.odl-tip-row.is-active {
  background: rgba(23, 167, 255, 0.12);
}

.odl-tip-row.is-active .odl-tip-key,
.odl-tip-row.is-active .odl-tip-val {
  color: #17A7FF;
  font-weight: 600;
}

.odl-tip-key {
  color: #94a3b8;
}

.odl-tip-val {
  color: #e2e8f0;
  font-weight: 500;
  text-align: right;
}

.odl-embed > :not(script):not(.odl-dataset-json):not(.odl-machine-source) {
  margin-top: 0.7rem;
}

.odl-embed > :not(script):not(.odl-dataset-json):not(.odl-machine-source):first-child {
  margin-top: 0;
}

.odl-light-metrics {
  margin-top: 0.85rem;
  border: 1px solid var(--odl-border);
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem 0.9rem;
}

.odl-light-metrics h4 {
  margin: 0 0 0.65rem;
  color: #0f5db8;
}

.odl-light-metrics dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.55rem;
}

.odl-light-metric {
  border: 1px solid #d9e5f4;
  border-radius: 10px;
  padding: 0.48rem 0.56rem;
  background: #f8fbff;
}

.odl-light-metric dt {
  margin: 0;
  font-size: 0.76rem;
  color: #475569;
}

.odl-light-metric dd {
  margin: 0.2rem 0 0;
  font-weight: 700;
  color: #0f172a;
}

.odl-annotation {
  margin-top: 1rem;
  border: 1px solid #f2d8a6;
  background: #fff9ec;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  color: #5b4312;
}

.odl-annotation-row {
  margin-top: 0.24rem;
}

.odl-annotation-note {
  margin-top: 0.32rem;
  padding-top: 0.73rem;
  border-top: 1px dashed #e8c883;
}

.odl-annotation-hint {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: #516175;
}

.odl-machine-source {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.odl-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 460ms ease, transform 460ms ease;
  animation: odl-fallback-reveal 0s ease 2.5s forwards;
}

.odl-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

@keyframes odl-fallback-reveal {
  to { opacity: 1; transform: translateY(0); }
}

.odl-empty {
  border: 1px dashed #b9c6d8;
  border-radius: 10px;
  padding: 1rem;
  color: #475569;
  background: #f8fbff;
}

/* --- Drill-down: expandable detail rows --- */

.odl-row-expandable {
  cursor: pointer;
}

.odl-row-expandable:hover {
  background: #f0f7ff;
}

.odl-drilldown-th {
  width: 48px;
  min-width: 48px !important;
  padding: 0 !important;
}

.odl-drilldown-cell {
  width: 48px;
  text-align: center;
  padding: 0.4rem !important;
}

.odl-drilldown-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #c7d9ed;
  border-radius: 8px;
  background: #f4f9ff;
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease;
}

.odl-drilldown-btn:hover,
.odl-drilldown-btn:focus-visible {
  background: #e0f0ff;
  border-color: #93c5fd;
}

.odl-drilldown-btn[aria-expanded="true"] {
  background: var(--odl-brand);
  border-color: var(--odl-brand);
}

.odl-drilldown-btn[aria-expanded="true"] .odl-drilldown-chevron {
  transform: rotate(180deg);
  border-top-color: #fff;
}

.odl-drilldown-chevron {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #0f5db8;
  transition: transform 200ms ease, border-top-color 200ms ease;
}

.odl-detail-row {
  background: #f7fbff;
}

.odl-detail-row:hover {
  background: #f7fbff;
}

.odl-detail-cell {
  padding: 0 !important;
  border-bottom: 2px solid var(--odl-brand, #0f5db8) !important;
}

.odl-detail-content {
  padding: 0.8rem;
  animation: odl-detail-open 300ms ease both;
}

.odl-detail-embed {
  width: 100%;
  margin: 0;
  padding: 0.8rem;
  border: none;
  box-shadow: none;
  background: #fff;
  border-radius: 8px;
}

.odl-detail-spinner {
  text-align: center;
  color: var(--odl-ink-soft, #334155);
  font-size: 0.9rem;
  padding: 1.5rem 0;
  margin: 0;
}

@keyframes odl-detail-open {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    max-height: 2000px;
    transform: translateY(0);
  }
}

@keyframes odl-grow-svg {
  from { transform: scaleY(0.05); }
  to { transform: scaleY(1); }
}

@keyframes odl-draw {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 700px) {
  .odl-embed {
    padding: 1rem;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }

  .odl-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-bottom: 0.95rem;
  }

  .odl-controls input,
  .odl-controls select {
    min-width: 100%;
  }

  .odl-watermark {
    margin-left: 0;
  }

  .odl-toolbar {
    gap: 0.45rem;
  }

  .odl-action {
    font-size: 0.76rem;
    padding: 0.4rem 0.58rem;
  }

  .odl-menu {
    width: 100%;
  }

  .odl-action-menu {
    width: 100%;
    justify-content: space-between;
  }

  .odl-menu-panel {
    position: static;
    margin-top: 0.4rem;
    min-width: 0;
    width: 100%;
    box-shadow: none;
    border-radius: 10px;
  }

  .odl-tabs {
    width: 100%;
    justify-content: flex-start;
  }

  .odl-chart {
    min-height: 340px;
    padding: 0.5rem;
  }

  .odl-line-svg {
    height: clamp(250px, 62vw, 340px);
  }

  .odl-heatmap-svg {
    width: max(100%, 640px);
    height: auto;
  }

  .odl-svg-axis-label {
    font-size: 11px;
  }

  .odl-heat-row-label {
    font-size: 12px;
  }

  .odl-heat-col-label {
    font-size: 11px;
  }

  .odl-tooltip {
    max-width: 370px;
  }

  .odl-th-btn {
    font-size: 0.9rem;
    padding: 0.32rem 0.48rem;
  }

  .odl-table th {
    min-width: 120px;
  }

  .odl-table th,
  .odl-table td:first-child {
  font-weight: 600;
}

.odl-table td {
    padding: 0.55rem 0.5rem;
    font-size: 16.5px;
  }

  .odl-detail-embed {
    padding: 0.5rem;
  }

  .odl-drilldown-th {
    width: 36px;
    min-width: 36px !important;
  }

  .odl-drilldown-btn {
    width: 28px;
    height: 28px;
  }
}

/* --- Spectral: Total Irradiance hero stat --- */
.odl-total-irradiance {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--odl-border);
  border-radius: 12px;
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
  padding: 1rem 1.2rem;
  margin-bottom: 0.5rem;
}

.odl-total-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.odl-total-value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--odl-brand);
  line-height: 1.2;
  margin: 0.2rem 0;
}

.odl-total-value small {
  font-size: 0.45em;
  font-weight: 600;
  color: #475569;
  vertical-align: baseline;
}

.odl-total-note {
  font-size: 0.76rem;
  color: #64748b;
}

/* --- Spectral: summation explanation --- */
.odl-spectrum-context {
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.55;
  border-left: 3px solid var(--odl-brand);
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  background: #f8fbff;
  border-radius: 0 8px 8px 0;
}

@media (max-width: 700px) {
  .odl-total-value {
    font-size: 1.8rem;
  }
}

/* --- Mobile compact: spectrum sections --- */
@media (max-width: 700px) {
  .odl-journalist--spectrum {
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.5rem;
  }
  .odl-journalist--spectrum .odl-findings-toggle summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }
  .odl-journalist--spectrum .odl-findings-toggle summary::-webkit-details-marker { display: none; }
  .odl-journalist--spectrum .odl-findings-toggle summary::before {
    content: '▶';
    font-size: 0.6rem;
    transition: transform 0.2s;
    color: #94a3b8;
  }
  .odl-journalist--spectrum .odl-findings-toggle[open] summary::before {
    transform: rotate(90deg);
  }
  .odl-journalist--spectrum .odl-findings-toggle:not([open]) + .odl-findings-toggle ul,
  .odl-journalist--spectrum .odl-findings-toggle:not([open]) ul {
    display: none;
  }
  /* Default closed on mobile */
  .odl-journalist--spectrum .odl-findings-toggle {
    /* JS will remove open attr on mobile */
  }
  .odl-journalist--spectrum ul {
    margin-top: 0.35rem;
  }
  .odl-journalist--spectrum li {
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
  }
  .odl-total-irradiance {
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.3rem;
  }
  .odl-total-label {
    font-size: 0.7rem;
  }
  .odl-total-value {
    font-size: 1.6rem;
    margin: 0.1rem 0;
  }
  .odl-total-note {
    font-size: 0.68rem;
  }
  .odl-spectrum-context {
    font-size: 0.78rem;
    padding: 0.35rem 0.55rem;
    margin: 0.3rem 0;
  }
}

/* --- Mobile: ultra-compact spectrum layout --- */
@media (max-width: 700px) {
  /* Hide summation note on mobile — hero stat already communicates this */
  .odl-spectrum-context {
    display: none;
  }
  /* Light metrics: tighter 2-col grid, smaller cards */
  .odl-light-metrics dl {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem;
  }
  .odl-light-metric {
    padding: 0.3rem 0.4rem;
  }
  .odl-light-metric dt {
    font-size: 0.68rem;
  }
  .odl-light-metric dd {
    font-size: 0.88rem;
    margin-top: 0.1rem;
  }
  .odl-light-metrics {
    padding: 0.5rem 0.55rem;
  }
  .odl-light-metrics h4 {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
  }
  /* Share/Export toolbar: single row on mobile for spectrum */
  .odl-journalist--spectrum ~ .odl-toolbar {
    margin-bottom: 0.5rem;
  }
}

/* --- Spacing: summation note to Light Metrics --- */
.odl-spectrum-context {
  margin-bottom: 1.2rem;
}

/* Hide empty annotation note div */
.odl-annotation-note:empty {
  display: none;
}

/* --- Force spacing between summation and Light Metrics (beats LS combine) --- */
.odl-spectrum-context {
  margin-bottom: 1.8rem !important;
}
