/* =====================================================================
   Rasanblaj Timeline — Public Stylesheet v1.2.0
   All color rules inside .rht-timeline use !important to defeat
   theme overrides, which were causing the "too dark" expanded content.
   ===================================================================== */

.rht-timeline {
  --rht-bg:       #1a1410;
  --rht-surface:  #251c13;
  --rht-surface2: #2d2118;
  --rht-border:   #4a3828;
  --rht-gold:     #d4a853;
  --rht-gold-dim: #9a7a3a;
  --rht-crimson:  #9b2020;
  --rht-cream:    #f0e6d3;
  --rht-muted:    #c8b090;
  --rht-font:     'Georgia', 'Times New Roman', serif;
  --rht-mono:     'Courier New', monospace;
  --rht-radius:   4px;
  --rht-dot-size: 14px;

  background:   var(--rht-bg)    !important;
  color:        var(--rht-cream) !important;
  font-family:  var(--rht-font)  !important;
  max-width:    900px;
  margin:       0 auto;
  padding:      2rem 1rem;
  border:       1px solid var(--rht-border) !important;
  border-radius: 6px;
  box-sizing:   border-box;
}

/* -----------------------------------------------------------------
   Filter buttons — century / era
----------------------------------------------------------------- */
.rht-timeline .rht-filters {
  display:       flex;
  flex-wrap:     wrap;
  gap:           .45rem;
  margin-bottom: 1rem;
}
.rht-timeline .rht-filter-btn {
  background:     var(--rht-surface2) !important;
  color:          var(--rht-cream)    !important;
  border:         1px solid var(--rht-border) !important;
  padding:        .35rem .85rem;
  border-radius:  20px;
  cursor:         pointer;
  font-family:    var(--rht-font);
  font-size:      .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition:     all .2s;
  box-shadow:     none !important;
}
.rht-timeline .rht-filter-btn:hover {
  border-color: var(--rht-gold) !important;
  color:        var(--rht-gold) !important;
}
.rht-timeline .rht-filter-btn.active {
  background:  var(--rht-gold) !important;
  color:       #1a1410         !important;
  border-color: var(--rht-gold) !important;
  font-weight: bold;
}

/* -----------------------------------------------------------------
   Search bar
----------------------------------------------------------------- */
.rht-timeline .rht-search-bar { margin-bottom: 1.5rem; }
.rht-timeline .rht-search-input {
  width:         100%;
  background:    var(--rht-surface2) !important;
  color:         var(--rht-cream)    !important;
  border:        1px solid var(--rht-border) !important;
  border-radius: var(--rht-radius);
  padding:       .6rem 1rem;
  font-family:   var(--rht-font);
  font-size:     .95rem;
  outline:       none;
  transition:    border-color .2s;
  box-sizing:    border-box;
  box-shadow:    none !important;
}
.rht-timeline .rht-search-input:focus        { border-color: var(--rht-gold) !important; }
.rht-timeline .rht-search-input::placeholder { color: var(--rht-muted) !important; opacity: 1; }

/* -----------------------------------------------------------------
   Era / century section label
----------------------------------------------------------------- */
.rht-timeline .rht-era-label {
  font-family:    var(--rht-font);
  font-size:      1.05rem;
  font-weight:    bold;
  color:          var(--rht-gold)     !important;
  background:     transparent         !important;
  letter-spacing: .08em;
  text-transform: uppercase;
  border:         none                !important;
  border-bottom:  1px solid var(--rht-gold-dim) !important;
  padding:        1.5rem 0 .4rem 2.5rem;
  margin-bottom:  .5rem;
}

/* -----------------------------------------------------------------
   Event row
----------------------------------------------------------------- */
.rht-timeline .rht-event {
  display:       flex;
  align-items:   flex-start;
  position:      relative;
  margin-bottom: .15rem;
}

/* Spine */
.rht-timeline .rht-event-spine {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  min-width:      28px;
  padding-top:    1.1rem;
}
.rht-timeline .rht-dot {
  width:         var(--rht-dot-size);
  height:        var(--rht-dot-size);
  border-radius: 50%;
  border:        2px solid var(--rht-gold) !important;
  background:    var(--rht-bg) !important;
  flex-shrink:   0;
  z-index:       1;
  transition:    background .2s;
}
.rht-timeline .rht-event:hover .rht-dot,
.rht-timeline .rht-event.rht-open  .rht-dot { background: var(--rht-gold) !important; }

.rht-timeline .rht-line {
  width:      3px;
  flex:       1;
  min-height: 24px;
  background: var(--rht-border) !important;
}

/* Card shell */
.rht-timeline .rht-event-card {
  flex:          1;
  background:    var(--rht-surface)  !important;
  border:        1px solid var(--rht-border) !important;
  border-radius: var(--rht-radius);
  margin:        .4rem 0 .4rem .5rem;
  overflow:      hidden;
  transition:    border-color .2s;
}
.rht-timeline .rht-event:hover .rht-event-card,
.rht-timeline .rht-event.rht-open  .rht-event-card { border-color: var(--rht-gold-dim) !important; }

/* Meta row (date / tag / id) */
.rht-timeline .rht-event-meta {
  display:     flex;
  align-items: center;
  flex-wrap:   wrap;
  gap:         .4rem;
  padding:     .5rem .75rem .25rem;
  background:  var(--rht-surface) !important;
}
.rht-timeline .rht-date {
  font-size:      .78rem;
  color:          var(--rht-gold)  !important;
  font-family:    var(--rht-mono);
  letter-spacing: .03em;
}
.rht-timeline .rht-entry-id {
  font-size:   .7rem;
  color:       var(--rht-muted) !important;
  font-family: var(--rht-mono);
  margin-left: auto;
}

/* Tags */
.rht-timeline .rht-tag {
  font-size:      .68rem;
  padding:        .15rem .5rem;
  border-radius:  3px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-family:    sans-serif;
  font-weight:    bold;
  border:         none;
}
.rht-timeline .rht-tag-migration,
.rht-timeline .rht-tag-indigenous  { background: #0f3f3f !important; color: #7ee8e8 !important; }
.rht-timeline .rht-tag-taino       { background: #0e2e52 !important; color: #80c4f0 !important; }
.rht-timeline .rht-tag-colonial,
.rht-timeline .rht-tag-contact     { background: #5c1010 !important; color: #ffc8c8 !important; }
.rht-timeline .rht-tag-slave-trade,
.rht-timeline .rht-tag-slavery     { background: #341258 !important; color: #d8b8ff !important; }
.rht-timeline .rht-tag-revolution  { background: #7a1010 !important; color: #ffe0e0 !important; }
.rht-timeline .rht-tag-general,
.rht-timeline .rht-tag             { background: var(--rht-surface2) !important; color: var(--rht-cream) !important; border: 1px solid var(--rht-border) !important; }

/* Title button */
.rht-timeline .rht-event-title {
  display:         flex;
  align-items:     baseline;
  justify-content: space-between;
  width:           100%;
  background:      var(--rht-surface) !important;
  border:          none !important;
  color:           var(--rht-cream)   !important;
  font-family:     var(--rht-font);
  font-size:       .95rem;
  text-align:      left;
  padding:         .3rem .75rem .55rem;
  cursor:          pointer;
  line-height:     1.4;
  gap:             .5rem;
  box-shadow:      none !important;
}
.rht-timeline .rht-event-title:hover { color: var(--rht-gold) !important; }

.rht-timeline .rht-chevron {
  font-size:   1.2rem;
  color:       var(--rht-gold-dim) !important;
  transition:  transform .25s;
  flex-shrink: 0;
}
.rht-timeline .rht-event.rht-open .rht-chevron {
  transform: rotate(90deg);
  color:     var(--rht-gold) !important;
}

/* ================================================================
   EXPANDED BODY — all text forced light against dark background
   The !important rules here specifically defeat theme overrides.
================================================================ */
.rht-timeline .rht-event-body {
  padding:    .85rem 1rem 1.1rem;
  border-top: 1px solid var(--rht-border) !important;
  background: #221a10 !important;   /* slightly lighter than card for depth */
}

.rht-timeline .rht-event-body * {
  /* Blanket override — theme cannot darken any text inside the body */
  color: var(--rht-cream) !important;
}

/* Then re-apply specific accent colors on top of the blanket rule */
.rht-timeline .rht-event-body .rht-body-text {
  font-size:   .93rem;
  line-height: 1.8;
  color:       var(--rht-cream) !important;
  margin-bottom: .8rem;
}
.rht-timeline .rht-event-body .rht-body-text p { margin: 0 0 .65rem; }

.rht-timeline .rht-significance,
.rht-timeline .rht-nuance {
  font-size:    .88rem;
  line-height:  1.65;
  color:        var(--rht-cream) !important;
  margin-bottom: .65rem;
  padding:      .55rem .8rem;
  border-left:  3px solid var(--rht-gold) !important;
  border-top:    none !important;
  border-right:  none !important;
  border-bottom: none !important;
  background:   rgba(212, 168, 83, .06) !important;
  border-radius: 0 var(--rht-radius) var(--rht-radius) 0;
}
.rht-timeline .rht-significance strong,
.rht-timeline .rht-nuance strong {
  display:        block;
  color:          var(--rht-gold) !important;
  font-size:      .72rem;
  font-weight:    bold;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom:  .25rem;
}

.rht-timeline .rht-people {
  display:   flex;
  flex-wrap: wrap;
  gap:       .35rem;
  margin:    .5rem 0;
}
.rht-timeline .rht-person-pill {
  background:    rgba(255,255,255,.07) !important;
  color:         var(--rht-cream)      !important;
  border:        1px solid var(--rht-gold-dim) !important;
  border-radius: 20px;
  padding:       .15rem .6rem;
  font-size:     .78rem;
}

.rht-timeline .rht-connection {
  font-size:  .83rem;
  color:      var(--rht-muted) !important;
  margin-top: .4rem;
  font-style: italic;
}

.rht-timeline .rht-citation {
  display:     flex;
  align-items: center;
  flex-wrap:   wrap;
  gap:         .4rem;
  margin-top:  .8rem;
  padding-top: .55rem;
  border-top:  1px solid var(--rht-border) !important;
  font-size:   .78rem;
}
.rht-timeline .rht-citation-label {
  font-family:    sans-serif;
  font-size:      .62rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color:          var(--rht-muted)   !important;
  background:     var(--rht-surface) !important;
  border:         1px solid var(--rht-border) !important;
  border-radius:  3px;
  padding:        .1rem .4rem;
}
.rht-timeline .rht-source-ref    { color: var(--rht-cream) !important; }
.rht-timeline .rht-source-ref em { color: var(--rht-gold)  !important; font-style: italic; }
.rht-timeline .rht-bates {
  font-family:    var(--rht-mono);
  font-size:      .72rem;
  color:          var(--rht-muted)   !important;
  background:     var(--rht-surface) !important;
  border:         1px solid var(--rht-border) !important;
  border-radius:  3px;
  padding:        .1rem .4rem;
  letter-spacing: .04em;
}

/* -----------------------------------------------------------------
   Hidden / filtered
----------------------------------------------------------------- */
.rht-timeline .rht-event.rht-hidden,
.rht-timeline .rht-era-label.rht-hidden { display: none !important; }

.rht-timeline .rht-no-results {
  text-align: center;
  color:      var(--rht-muted) !important;
  padding:    2rem;
  font-style: italic;
}

.rht-timeline .rht-empty {
  color:      var(--rht-muted) !important;
  text-align: center;
  padding:    2rem;
  font-style: italic;
}

/* -----------------------------------------------------------------
   Compact layout
----------------------------------------------------------------- */
.rht-timeline[data-layout="compact"] .rht-event-card { margin: .2rem 0 .2rem .4rem; }
.rht-timeline[data-layout="compact"] .rht-event-body { font-size: .82rem; }

/* -----------------------------------------------------------------
   Responsive
----------------------------------------------------------------- */
@media (max-width: 600px) {
  .rht-timeline         { padding: 1rem .5rem; }
  .rht-timeline .rht-event-spine  { min-width: 20px; }
  .rht-timeline .rht-event-title  { font-size: .88rem; }
  .rht-timeline .rht-era-label    { padding-left: 1.5rem; }
  .rht-timeline .rht-filter-btn   { font-size: .72rem; padding: .28rem .65rem; }
}
