body:has(.o2-timeline) { background: #171412; }

.o2-timeline {
  --timeline-ink: #fff4e5;
  --timeline-paper: #322822;
  --timeline-surface: #241e1a;
  --timeline-border: #8b7363;
  --timeline-math: #ffc087;
  --timeline-science: #a4e4d9;
  --timeline-selected: #ffb15c;
  --timeline-art-halo: url(#o2-timeline-glow);
  --timeline-art-halo-active: url(#o2-timeline-glow-active);
  color: var(--timeline-ink);
  color-scheme: dark;
  max-width: 72rem;
  margin-inline: auto;
  padding-bottom: 2rem;
}

.o2-timeline [hidden] { display: none; }
.o2-timeline-svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }

.o2-timeline :focus-visible {
  outline: 2px solid var(--timeline-selected);
  outline-offset: 3px;
}

.o2-timeline-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: clamp(.75rem, 2vw, 1.25rem);
  border: 2px solid var(--timeline-border);
  border-radius: 24px 19px 23px 17px / 19px 25px 18px 23px;
  background: var(--timeline-paper);
  color: var(--timeline-ink);
  box-shadow: 3px 4px 0 #4e3526;
}

.o2-timeline-hero h1 {
  color: inherit;
  max-width: 19ch;
  margin: 0 0 .2rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.12;
}

.o2-timeline-hero p { margin: 0; max-width: 55ch; }
.o2-timeline-hero img {
  width: clamp(48px, 10vw, 76px);
  height: auto;
  flex: none;
  background: transparent;
  filter: var(--timeline-art-halo);
}

.o2-timeline-filter { margin-left: auto; }
.o2-timeline:not([data-ready]) .o2-timeline-filter[open] { order: 5; flex-basis: 100%; }
.o2-timeline-filter > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: .35rem .65rem;
  border: 1px solid var(--timeline-border);
  border-radius: 9px 7px 9px 6px;
  background: var(--timeline-surface);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  list-style: none;
}
.o2-timeline-filter > summary::-webkit-details-marker { display: none; }
.o2-timeline-filter > summary::before { content: '⌕'; margin-right: .35rem; font-size: 1.2rem; line-height: 1; }
.o2-timeline-filter[open] > summary {
  width: fit-content;
  border-color: var(--timeline-selected);
  background: #392920;
}

.o2-timeline-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem;
  margin: .35rem 0 .45rem;
  padding: .75rem;
  border: 1px solid var(--timeline-border);
  border-radius: .65rem;
  background: var(--timeline-paper);
}

.o2-timeline-controls label { flex: 1 1 8.5rem; min-width: 0; font-weight: 650; }
.o2-timeline-controls label:first-child { flex-basis: 13rem; }

.o2-timeline-controls input,
.o2-timeline-controls select,
.o2-timeline-controls button,
.o2-timeline-nav button,
.o2-timeline-zoom button,
.o2-timeline-active-open,
.o2-timeline-detail-actions button {
  box-sizing: border-box;
  min-height: 44px;
  padding: .5rem .65rem;
  border: 1px solid var(--timeline-border);
  border-radius: 9px 7px 9px 6px;
  font: inherit;
  color: var(--timeline-ink);
  background: var(--timeline-surface);
}

.o2-timeline-controls input,
.o2-timeline-controls select { display: block; width: 100%; margin-top: .25rem; }
.o2-timeline-controls button { cursor: pointer; }
.o2-timeline-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .65rem;
  margin: .6rem 0 .3rem;
}

.o2-timeline-count { margin: 0; font-size: .9rem; font-weight: 700; }
.o2-timeline-nav { display: flex; gap: .4rem; }
.o2-timeline-nav button { min-width: 44px; cursor: pointer; }
.o2-timeline-nav button[aria-disabled="true"],
.o2-timeline-detail-actions button[aria-disabled="true"] { opacity: .48; cursor: default; }

.o2-timeline-controls input::placeholder { color: #bdab99; opacity: 1; }
.o2-timeline-zoom { display: flex; gap: .25rem; }
.o2-timeline :is(
  .o2-timeline-controls button,
  .o2-timeline-nav button:not([aria-disabled="true"]),
  .o2-timeline-zoom button:not([aria-disabled="true"]),
  .o2-timeline-active-open,
  .o2-timeline-detail-actions button:not([aria-disabled="true"])
):hover {
  background: #48382e;
  border-color: var(--timeline-selected);
  color: var(--timeline-ink);
}
.o2-timeline-zoom button { min-width: 44px; padding: .35rem; font-variant-numeric: tabular-nums; cursor: pointer; }
.o2-timeline-zoom button[data-zoom="0"] { min-width: 52px; }
.o2-timeline-zoom button[aria-disabled="true"] { opacity: .48; cursor: default; }

.o2-timeline-scroll {
  --timeline-zoom: 1;
  container-type: inline-size;
  scrollbar-color: #a47f65 #2b221d;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  overflow-anchor: none;
  scroll-snap-type: x proximity;
  scroll-padding-inline: .25rem;
  padding: .35rem .25rem;
  max-width: 100%;
}

.o2-timeline-list {
  position: relative;
  display: flex;
  align-items: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
}

.o2-timeline-event {
  --event-color: var(--timeline-math);
  position: relative;
  flex: 0 0 clamp(8.75rem, calc(min(80cqi, 19rem) * var(--timeline-zoom)), 97%);
  min-width: 0;
  padding-inline-end: .85rem;
  padding-bottom: .7rem;
  scroll-snap-align: start;
  scroll-margin-top: 7rem;
}

.o2-timeline-event[data-field="science"] { --event-color: var(--timeline-science); }

.o2-timeline-event::before {
  content: "";
  position: absolute;
  inset: 2.05rem 0 auto;
  height: 2px;
  background: #97745e;
  border-radius: 48% 34% 45% 51%;
}

.o2-timeline-event::after {
  content: "";
  position: absolute;
  width: .72rem;
  height: .72rem;
  left: .75rem;
  top: 1.77rem;
  border: 2px solid #241914;
  border-radius: 51% 46% 48% 53%;
  background: var(--event-color);
  box-sizing: border-box;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.o2-timeline-date {
  display: block;
  min-height: 2.7rem;
  padding-inline: .75rem;
  color: var(--event-color);
  font-weight: 800;
}

.o2-timeline-card {
  padding: .9rem 1rem;
  border: 1px solid var(--timeline-border);
  border-radius: 15px 12px 16px 11px;
  background: var(--timeline-surface);
  color: var(--timeline-ink);
  overflow-wrap: anywhere;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.o2-timeline[data-ready] .o2-timeline-list .o2-timeline-card { cursor: pointer; }
.o2-timeline[data-ready] .o2-timeline-list .o2-timeline-card:hover {
  border-color: #c8a284;
  background: #2d241f;
}

.o2-timeline-art {
  display: grid;
  place-items: center;
  min-height: calc(5.8rem * clamp(.68, var(--timeline-zoom), 1.15));
  margin-bottom: .55rem;
  background: transparent;
}

.o2-timeline-art img {
  width: min(92%, calc(7.75rem * var(--timeline-zoom)));
  height: calc(5.875rem * var(--timeline-zoom));
  object-fit: contain;
  background: transparent;
  filter: var(--timeline-art-halo);
  transition: transform .15s ease, filter .15s ease;
}

.o2-timeline-event:is(.is-selected, .is-active) .o2-timeline-art img,
.o2-timeline-list .o2-timeline-card:hover .o2-timeline-art img {
  filter: var(--timeline-art-halo-active);
}

.o2-timeline-card .o2-timeline-source { margin-bottom: 0; font-size: .84rem; }
.o2-timeline-card .o2-timeline-topic { margin: 0 0 .3rem; font-size: .86rem; font-weight: 750; color: var(--event-color); }
.o2-timeline-card h2 { margin: 0; color: inherit; font-size: clamp(1rem, calc(1.18rem * var(--timeline-zoom)), 1.25rem); line-height: 1.25; }
.o2-timeline-card p { margin: .45rem 0; }
.o2-timeline-card summary { width: fit-content; padding: .45rem 0; cursor: pointer; font-weight: 700; }
.o2-timeline-card a { color: var(--event-color); text-decoration: underline; }

.o2-timeline-event:is(.is-selected, .is-active) .o2-timeline-card {
  border-color: var(--timeline-selected);
  background: #392920;
  box-shadow: inset 0 0 0 1px var(--timeline-selected);
}

.o2-timeline-event:is(.is-selected, .is-active)::after {
  background: var(--timeline-selected);
  box-shadow: 0 0 0 3px #785132;
  z-index: 2;
}

.o2-timeline-card .o2-timeline-select { color: var(--timeline-ink); text-decoration: none; }
.o2-timeline-card .o2-timeline-select:hover { color: var(--timeline-selected); text-decoration: underline; opacity: 1; }
.o2-timeline-card details[open] { border-top: 1px solid var(--timeline-border); }
.o2-timeline-more { display: inline-block; margin-top: .1rem; font-weight: 700; color: var(--event-color); font-size: .92rem; }
.o2-timeline[data-ready] .o2-timeline-list .o2-timeline-card :is(details, .o2-timeline-source) { display: none; }
.o2-timeline-detail .o2-timeline-more { display: none; }

@media (max-width: 640px) {
  .o2-timeline-hero { align-items: start; gap: .5rem; }
  .o2-timeline-count { display: none; }
  .o2-timeline-toolbar {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: .32rem;
    margin: .5rem 0 .25rem;
  }
  .o2-timeline-filter { margin-left: 0; margin-right: auto; }
  .o2-timeline-filter > summary {
    min-height: 38px;
    padding: .25rem .55rem;
    font-size: .88rem;
  }
  .o2-timeline-filter > summary::before { margin-right: .28rem; font-size: 1.1rem; }
  .o2-timeline-nav { gap: .22rem; flex-shrink: 0; }
  .o2-timeline-nav button {
    min-width: 36px;
    min-height: 38px;
    padding: .25rem .35rem;
  }
  .o2-timeline-zoom { gap: .18rem; flex-shrink: 0; }
  .o2-timeline-zoom button {
    min-width: 34px;
    min-height: 38px;
    padding: .25rem .28rem;
    font-size: .86rem;
  }
  .o2-timeline-zoom button[data-zoom="0"] { min-width: 44px; }
  .o2-timeline-controls label:first-child { flex-basis: 100%; }
  .o2-timeline-controls label { flex-basis: 42%; }
}

@media (max-width: 360px) {
  .o2-timeline-toolbar { gap: .2rem; }
  .o2-timeline-filter > summary {
    min-height: 34px;
    padding: .2rem .42rem;
    font-size: .81rem;
  }
  .o2-timeline-filter > summary::before { margin-right: .2rem; font-size: 1rem; }
  .o2-timeline-nav { gap: .15rem; }
  .o2-timeline-nav button { min-width: 31px; min-height: 34px; padding: .15rem; }
  .o2-timeline-zoom { gap: .14rem; }
  .o2-timeline-zoom button { min-width: 29px; min-height: 34px; padding: .15rem; font-size: .79rem; }
  .o2-timeline-zoom button[data-zoom="0"] { min-width: 39px; }
}

.o2-timeline-marker { display: none; }

.o2-timeline-scroll[data-density="thumbnails"] {
  --marker-width: clamp(2.65rem, calc(11rem * var(--timeline-zoom)), 4.6rem);
  scroll-snap-type: none;
}

.o2-timeline-scroll[data-density="markers"] {
  --marker-width: clamp(.52rem, calc(12rem * var(--timeline-zoom)), 2.1rem);
  scroll-snap-type: none;
}

.o2-timeline-scroll:is([data-density="thumbnails"], [data-density="markers"]) .o2-timeline-event {
  flex-basis: var(--marker-width);
  padding: 0;
}

.o2-timeline-scroll:is([data-density="thumbnails"], [data-density="markers"]) :is(.o2-timeline-date, .o2-timeline-card) {
  display: none;
}

.o2-timeline-scroll:is([data-density="thumbnails"], [data-density="markers"]) .o2-timeline-event::before {
  inset: auto 0 .95rem;
  pointer-events: none;
}

.o2-timeline-scroll:is([data-density="thumbnails"], [data-density="markers"]) .o2-timeline-event::after {
  top: auto;
  bottom: .64rem;
  left: calc(50% - .36rem);
  pointer-events: none;
}

.o2-timeline-scroll[data-density="markers"] .o2-timeline-event::after {
  --dot-size: clamp(.38rem, calc(var(--marker-width) * .58), .72rem);
  width: var(--dot-size);
  height: var(--dot-size);
  left: calc(50% - var(--dot-size) / 2);
  bottom: calc(.98rem - var(--dot-size) / 2);
  border-width: clamp(1px, calc(var(--marker-width) * .12), 2px);
}

.o2-timeline-scroll[data-density="markers"] .o2-timeline-event:is(.is-selected, .is-active, :hover)::after {
  transform: scale(1.45);
  z-index: 3;
}

.o2-timeline-scroll:is([data-density="thumbnails"], [data-density="markers"]) .o2-timeline-marker {
  display: flex;
  justify-content: center;
  align-items: end;
  min-height: 44px;
  padding: .25rem .12rem 1.45rem;
  border-radius: 9px 7px 9px 6px;
}

.o2-timeline-scroll[data-density="markers"] .o2-timeline-marker {
  padding-inline: 0;
}

.o2-timeline-marker:hover { opacity: 1; }
.o2-timeline-marker:focus-visible { outline-offset: -2px; }

.o2-timeline-marker img {
  display: block;
  width: min(100%, calc(var(--marker-width) - .25rem));
  max-width: 3.35rem;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: transparent;
  filter: var(--timeline-art-halo);
  transition: transform .15s ease, filter .15s ease;
}

.o2-timeline-marker:hover img {
  transform: translateY(-2px) scale(1.06);
  filter: var(--timeline-art-halo-active);
}

.o2-timeline-event:is(.is-selected, .is-active) .o2-timeline-marker img {
  transform: translateY(-3px) scale(1.1);
  filter: var(--timeline-art-halo-active);
}

.o2-timeline-scroll[data-density="markers"] .o2-timeline-marker img { display: none; }

.o2-timeline-active-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem .85rem;
  margin-top: .45rem;
  padding: .5rem .75rem;
  border: 1px solid var(--timeline-border);
  border-radius: 12px 9px 13px 10px;
  background: var(--timeline-paper);
}

.o2-timeline-active-summary {
  margin: 0;
  min-width: 0;
  font-size: .95rem;
}

.o2-timeline-active-summary strong {
  color: var(--timeline-selected);
  margin-right: .35rem;
}

.o2-timeline-active-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-left: auto;
}

.o2-timeline-active-open {
  min-height: 36px;
  padding: .3rem .65rem;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}

.o2-timeline-kbd-hint {
  font-size: .82rem;
  color: #dbcab9;
  white-space: nowrap;
}

.o2-timeline-kbd-hint kbd {
  display: inline-block;
  padding: .05rem .35rem;
  border: 1px solid var(--timeline-border);
  border-radius: 5px;
  background: var(--timeline-surface);
  font-family: inherit;
  font-size: .8rem;
}

@media (max-width: 560px) {
  .o2-timeline-kbd-hint { display: none; }
}

@media (pointer: fine) {
  .o2-timeline-scroll { cursor: grab; }
}

.o2-timeline .o2-timeline-scroll.is-dragging {
  cursor: grabbing;
  user-select: none;
  scroll-snap-type: none;
}

.o2-timeline-detail {
  --event-color: var(--timeline-math);
  position: fixed;
  inset: 0;
  width: min(calc(100% - 1.5rem), 43rem);
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--timeline-selected);
  border-radius: 17px 13px 18px 14px;
  background: #392920;
  color: var(--timeline-ink);
  box-shadow: 0 18px 48px #0008;
  overflow: hidden;
}

.o2-timeline-detail::backdrop { background: rgb(0 0 0 / .76); }
body:has(.o2-timeline-detail[open]) { overflow: hidden; }
.o2-timeline-detail[data-field="science"] { --event-color: var(--timeline-science); }

.o2-timeline-detail-actions {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .65rem;
  border-bottom: 1px solid rgb(139 115 99 / .45);
  background: #2d211a;
}

.o2-timeline-detail-actions form { margin: 0 0 0 auto; }

.o2-timeline-detail-actions > button {
  min-height: 38px;
  padding: .3rem .65rem;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}

.o2-timeline-detail-actions form button {
  min-width: 40px;
  min-height: 38px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.o2-timeline-detail-body {
  max-height: calc(100dvh - 5.25rem);
  overflow: auto;
  overscroll-behavior: contain;
}

.o2-timeline-detail .o2-timeline-card {
  padding: 1rem 1.15rem 1.25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.o2-timeline-detail .o2-timeline-art.has-portrait {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.o2-timeline-detail .o2-timeline-art img {
  width: min(92%, 8.25rem);
  height: 6.25rem;
}

.o2-timeline-detail .o2-timeline-art img.o2-timeline-portrait-cameo {
  width: 5.25rem;
  height: 5.25rem;
}

.o2-timeline-detail-date {
  display: block;
  margin: 0 0 .55rem;
  color: var(--event-color);
  font-weight: 800;
}
