/* U.S. Energy History Timeline */
#eht-app {
  --eht-bg: #0A192F;
  --eht-panel: #0d1f35;
  --eht-gold: #C5A005;
  --eht-teal: #64ffda;
  --eht-text: rgba(255, 255, 255, 0.85);
  --eht-muted: #8b95a8;
  --eht-border: rgba(197, 160, 5, 0.22);
  background: linear-gradient(180deg, var(--eht-bg) 0%, var(--eht-panel) 100%);
  padding-bottom: 3rem;
}

.eht-kicker {
  color: var(--eht-teal);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 1rem;
}

.eht-title {
  font-family: 'Playfair Display', serif;
  color: #f0e6c8;
  font-size: 2.35rem;
  line-height: 1.2;
}

.eht-subtitle {
  max-width: 720px;
  margin: 1.25rem auto 0;
  color: var(--eht-muted);
  line-height: 1.65;
  font-size: 0.98rem;
}

.eht-controls {
  position: sticky;
  top: 56px;
  z-index: 20;
  background: rgba(10, 25, 47, 0.96);
  border-bottom: 1px solid var(--eht-border);
  border-top: 1px solid rgba(100, 255, 218, 0.12);
  padding: 1rem 0;
  backdrop-filter: blur(8px);
}

.eht-scrubber-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}

.eht-scrubber-lane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 140px;
  gap: 0;
}

.eht-scrubber-lane .eht-scrubber {
  flex: none;
  width: 100%;
  min-width: 0;
}

.eht-year-label {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--eht-gold);
  min-width: 4.5rem;
}

.eht-scrubber {
  flex: 1;
  min-width: 180px;
  accent-color: var(--eht-teal);
}

.eht-search {
  max-width: 220px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--eht-border);
  color: var(--eht-text);
  font-size: 0.9rem;
}

.eht-search:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--eht-teal);
  color: #fff;
  box-shadow: none;
}

.eht-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.eht-chip {
  border: 1px solid rgba(100, 255, 218, 0.35);
  background: transparent;
  color: var(--eht-teal);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.eht-chip:hover {
  background: rgba(100, 255, 218, 0.12);
}

.eht-chip--off {
  opacity: 0.4;
  border-color: rgba(100, 255, 218, 0.15);
  color: rgba(100, 255, 218, 0.55);
}

.eht-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.eht-filter-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--eht-muted);
  flex-shrink: 0;
}

.eht-chips--inline {
  margin-top: 0;
  flex: 1;
}

.eht-empty {
  color: var(--eht-muted);
  font-size: 0.9rem;
  padding: 2rem 0;
  text-align: center;
}

.eht-preset {
  border-color: rgba(197, 160, 5, 0.45);
  color: #D4AF37;
}

.eht-preset.is-active {
  background: rgba(197, 160, 5, 0.18);
  border-color: var(--eht-gold);
  color: #f0e6c8;
}

.eht-era-spine {
  position: relative;
  width: 100%;
  margin-top: 0.5rem;
  min-height: 2.75rem;
}

.eht-era-spine__track {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 7px;
  height: 2px;
  background: rgba(197, 160, 5, 0.35);
  border-radius: 1px;
  pointer-events: none;
}

.eht-era-spine__marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.eht-era-spine__marker:focus-visible {
  outline: 2px solid var(--eht-teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.eht-era-spine__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--eht-gold);
  background: var(--eht-bg);
  flex-shrink: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.eht-era-spine__marker.is-active .eht-era-spine__dot {
  background: var(--eht-gold);
  box-shadow: 0 0 10px rgba(197, 160, 5, 0.45);
}

.eht-era-spine__label {
  margin-top: 0.35rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  max-width: 4.25rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eht-era-spine__marker--compact .eht-era-spine__label {
  font-size: 0.58rem;
  max-width: 3.75rem;
}

.eht-era-spine__marker.is-active .eht-era-spine__label {
  color: #D4AF37;
}

@media (max-width: 767.98px) {
  .eht-era-spine {
    min-height: 1.5rem;
  }

  .eht-era-spine__label {
    display: none;
  }

  .eht-era-spine__dot {
    width: 12px;
    height: 12px;
  }
}

.eht-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

@media (max-width: 991px) {
  .eht-layout {
    grid-template-columns: 1fr;
  }
}

.eht-rail {
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid rgba(197, 160, 5, 0.35);
}

.eht-era-band {
  position: absolute;
  left: -1.25rem;
  width: calc(100% + 1.25rem);
  pointer-events: none;
  opacity: 0.07;
  border-radius: 4px;
}

.eht-card {
  position: relative;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--eht-border);
  border-radius: 8px;
  transition: opacity 0.2s, border-color 0.2s;
  scroll-margin-top: 140px;
}

.eht-card.dimmed {
  opacity: 0.38;
}

.eht-card.highlight {
  border-color: var(--eht-teal);
  box-shadow: 0 0 0 1px rgba(100, 255, 218, 0.25);
}

.eht-card-year {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--eht-gold);
  background: rgba(197, 160, 5, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.45rem;
}

.eht-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: #f0e6c8;
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

.eht-card-summary {
  font-size: 0.88rem;
  color: var(--eht-text);
  line-height: 1.6;
  margin: 0;
}

.eht-card-note {
  font-size: 0.78rem;
  color: var(--eht-muted);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(100, 255, 218, 0.25);
}

.eht-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.eht-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: rgba(100, 255, 218, 0.1);
  color: var(--eht-teal);
}

.eht-tag.milestone {
  background: rgba(197, 160, 5, 0.2);
  color: #D4AF37;
}

.eht-tag.legal {
  background: rgba(197, 160, 5, 0.18);
  color: #D4AF37;
}

.eht-card-links {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.eht-card-links a {
  font-size: 0.78rem;
  color: var(--eht-teal);
  text-decoration: none;
  font-weight: 600;
}

.eht-card-links a:hover {
  text-decoration: underline;
}

.eht-panel {
  position: sticky;
  top: 130px;
  max-height: calc(100dvh - 145px);
  align-self: start;
}

@media (max-width: 991px) {
  .eht-panel {
    position: static;
    max-height: none;
  }
}

.eht-panel-inner {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--eht-border);
  border-radius: 10px;
  padding: 1.15rem;
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 255, 218, 0.35) transparent;
}

.eht-panel-inner::-webkit-scrollbar {
  width: 5px;
}

.eht-panel-inner::-webkit-scrollbar-thumb {
  background: rgba(100, 255, 218, 0.35);
  border-radius: 4px;
}

.eht-panel-kicker {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--eht-teal);
  margin: 0 0 0.35rem;
}

.eht-panel-kicker span {
  color: var(--eht-gold);
}

.eht-panel-helper {
  font-size: 0.78rem;
  color: var(--eht-muted);
  line-height: 1.5;
  margin: 0 0 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(197, 160, 5, 0.15);
}

.eht-panel-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--eht-muted);
  margin: 0 0 0.35rem;
}

.eht-panel-section-label--chart {
  margin-top: 0.75rem;
}

.eht-era-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--eht-gold);
  margin: 0 0 0.35rem;
}

.eht-era-summary {
  font-size: 0.85rem;
  color: var(--eht-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.eht-leader {
  font-size: 0.88rem;
  color: var(--eht-text);
  margin-bottom: 1rem;
  padding: 0.65rem;
  background: rgba(100, 255, 218, 0.06);
  border-radius: 6px;
  border-left: 3px solid var(--eht-teal);
}

.eht-pre1949 {
  font-size: 0.85rem;
  color: var(--eht-muted);
  line-height: 1.55;
  padding: 0.75rem;
  background: rgba(197, 160, 5, 0.08);
  border-radius: 6px;
}

#eht-mix-chart {
  width: 100%;
  height: 160px;
  margin-top: 0.35rem;
}

.eht-loading {
  color: var(--eht-muted);
  font-size: 0.9rem;
  padding: 2rem;
  text-align: center;
}

.eht-about-item .accordion-button {
  background-color: rgba(10, 25, 47, 0.95) !important;
  color: #D4AF37 !important;
  font-weight: 600;
}

.eht-about-item .accordion-button:not(.collapsed) {
  color: var(--eht-teal) !important;
}

.eht-about-item .accordion-body {
  background-color: #0d1f35 !important;
  color: var(--eht-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

@media (prefers-reduced-motion: reduce) {
  .eht-card {
    transition: none;
  }
}
