:root {
  --timeline-ink: #f0f0f0;
  --timeline-muted: #b8b8b8;
  --timeline-link: #ffcf70;
  --timeline-focus: #ffb019;
  --timeline-line: rgba(255, 207, 112, .24);
  --timeline-order: #72b8ff;
  --timeline-destruction: #ff7070;
}

html {
  color-scheme: dark;
}

body.timeline-page {
  color: var(--timeline-ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

body.timeline-page a {
  text-decoration: none;
}

body.timeline-page a:hover,
body.timeline-page a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

body.timeline-page button {
  font: inherit;
}

body.timeline-page button:focus-visible,
body.timeline-page a:focus-visible {
  outline: 2px solid var(--timeline-focus);
  outline-offset: 3px;
}

.timeline-skip {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 7px 10px;
  color: var(--timeline-ink);
  background: #1f1f1f;
  transform: translateY(-180%);
}

.timeline-skip:focus {
  transform: none;
}

.timeline-shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 62px 0 44px;
}

.timeline-masthead {
  padding: 30px 0 22px;
}

.timeline-kicker {
  margin: 0 0 5px;
  color: var(--timeline-muted);
  font: 700 .72rem/1.2 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.timeline-masthead h1 {
  margin: 0;
  font-size: clamp(3.1rem, 9vw, 6.9rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .88;
}

.timeline-deck {
  max-width: 650px;
  margin: 17px 0 0;
  color: var(--timeline-muted);
  font-size: clamp(1.03rem, 2vw, 1.28rem);
}

.campaign-section-nav {
  display: flex;
  gap: 10px 24px;
  flex-wrap: wrap;
  margin-top: 25px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .82rem;
  letter-spacing: .025em;
}

.campaign-section-nav a {
  color: var(--timeline-link);
}

.campaign-section-nav a[aria-current="page"] {
  color: var(--timeline-ink);
  font-weight: 750;
}

.timeline-caution {
  margin: 0;
  padding: 12px 0 34px;
  color: var(--timeline-muted);
  font-size: .91rem;
}

.timeline-summary {
  max-width: 860px;
  padding: 10px 0 30px;
}

.timeline-summary h2 {
  margin: 0 0 5px;
  color: var(--timeline-muted);
  font: 700 .67rem/1.2 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.timeline-summary-period {
  margin: 0 0 20px;
  color: var(--timeline-ink);
  font-size: .94rem;
}

.timeline-summary-head,
.timeline-summary-row {
  display: grid;
  grid-template-columns: minmax(145px, .7fr) minmax(0, 3.3fr);
  gap: 25px;
}

.timeline-summary-head > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  color: var(--timeline-muted);
  font: 700 .62rem/1.25 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.timeline-summary-row {
  align-items: center;
  margin-top: 12px;
}

.summary-realm {
  display: flex;
  gap: 11px;
  align-items: center;
}

.summary-realm img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px #000);
}

.summary-realm strong {
  font-size: 1.04rem;
  font-weight: 600;
}

.timeline-summary dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}

.timeline-summary dl div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.timeline-summary dt {
  display: none;
  color: var(--timeline-muted);
  font: 700 .65rem/1.25 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.timeline-summary dd {
  order: -1;
  margin: 2px 0 0;
  font-size: 1.42rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.timeline-summary-note {
  margin: 13px 0 0 170px;
  color: var(--timeline-muted);
  font: .76rem/1.45 ui-sans-serif, system-ui, sans-serif;
}

.timeline-kind {
  display: flex;
  gap: 4px 18px;
  align-items: center;
  margin: 0 0 13px;
  font: .78rem/1.3 ui-sans-serif, system-ui, sans-serif;
}

.timeline-kind > span {
  color: var(--timeline-muted);
}

.timeline-kind button {
  min-height: 36px;
  padding: 5px 0 3px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--timeline-muted);
  background: transparent;
  cursor: pointer;
}

.timeline-kind button[aria-pressed="true"] {
  border-bottom-color: currentColor;
  color: var(--timeline-ink);
  font-weight: 750;
}

.timeline-kind button:disabled {
  cursor: wait;
  opacity: 1;
}

.timeline-message {
  margin: 28px 0;
  padding: 18px 0;
  color: var(--timeline-muted);
}

.timeline-error strong {
  color: var(--timeline-ink);
  font-size: 1.12rem;
  font-weight: 600;
}

.timeline-error p {
  margin: 5px 0 10px;
}

.timeline-text-button,
.timeline-more-button {
  padding: 0;
  border: 0;
  color: var(--timeline-link);
  background: transparent;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .84rem;
  font-weight: 700;
}

.timeline-text-button:hover,
.timeline-text-button:focus-visible,
.timeline-more-button:hover,
.timeline-more-button:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.timeline-text-button:disabled,
.timeline-more-button:disabled {
  color: var(--timeline-muted);
  cursor: wait;
}

.outcome-stream {
  margin: 0;
  padding: 0;
  list-style: none;
}

#timelineMain {
  border-top: 1px solid var(--timeline-line);
}

.timeline-event {
  margin: 0;
}

.timeline-event + .timeline-event {
  margin-top: 6px;
}

.timeline-day {
  margin: 28px 0 2px 48px;
}

.timeline-day:first-child {
  margin-top: 22px;
}

.timeline-day h2 {
  margin: 0;
  color: var(--timeline-muted);
  font: 700 .69rem/1.3 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.timeline-event-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 0 18px;
  align-items: start;
  padding: 24px 0 28px;
  color: var(--timeline-ink);
}

body.timeline-page .timeline-event-link:hover,
body.timeline-page .timeline-event-link:focus-visible {
  text-decoration: none;
}

.timeline-marker {
  display: grid;
  width: 30px;
  min-height: 24px;
  place-items: center;
}

.timeline-marker img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px #000);
}

.timeline-marker-neutral {
  width: 9px;
  height: 9px;
  border: 1px solid var(--timeline-muted);
  border-radius: 50%;
}

.timeline-copy {
  min-width: 0;
}

.timeline-meta,
.timeline-route,
.timeline-time,
.timeline-note,
.timeline-how {
  display: block;
  margin: 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.timeline-meta {
  color: var(--timeline-muted);
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.timeline-title {
  margin: 4px 0 0;
  font-size: clamp(1.3rem, 3vw, 1.78rem);
  font-weight: 500;
  line-height: 1.18;
}

.result-order .timeline-realm {
  color: var(--timeline-order);
}

.result-destruction .timeline-realm {
  color: var(--timeline-destruction);
}

.timeline-fort-place.place-order {
  color: var(--timeline-order);
}

.timeline-fort-place.place-destruction {
  color: var(--timeline-destruction);
}

.timeline-note {
  margin-top: 5px;
  color: var(--timeline-ink);
  font-size: .86rem;
}

.timeline-route {
  margin-top: 8px;
  color: var(--timeline-ink);
  font-size: .88rem;
}

.timeline-time,
.timeline-how {
  margin-top: 5px;
  color: var(--timeline-muted);
  font-size: .79rem;
  line-height: 1.45;
}

.timeline-open {
  align-self: center;
  padding-left: 12px;
  color: var(--timeline-link);
  font: 700 .74rem/1.3 ui-sans-serif, system-ui, sans-serif;
  white-space: nowrap;
}

.timeline-event-link:hover .timeline-open,
.timeline-event-link:focus-visible .timeline-open {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.timeline-more {
  display: flex;
  gap: 18px;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid var(--timeline-line);
}

.timeline-more-button,
.timeline-text-button {
  min-height: 44px;
}

.timeline-count {
  margin: 0;
  color: var(--timeline-muted);
  font: .76rem/1.4 ui-sans-serif, system-ui, sans-serif;
}

.timeline-footer {
  display: flex;
  gap: 18px;
  align-items: baseline;
  justify-content: space-between;
  padding: 42px 0 0;
  color: var(--timeline-muted);
  font: .76rem/1.45 ui-sans-serif, system-ui, sans-serif;
}

.timeline-footer p {
  margin: 0;
}

.timeline-footer nav {
  display: flex;
  gap: 16px;
}

.timeline-footer a {
  color: var(--timeline-link);
}

@media (max-width: 700px) {
  .timeline-shell {
    width: min(100% - 26px, 1080px);
    padding-top: 18px;
  }

  .timeline-event-link {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 0 12px;
  }

  .timeline-summary-head {
    display: none;
  }

  .timeline-summary-row {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 18px;
  }

  .timeline-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 12px;
  }

  .timeline-summary dt {
    display: block;
    margin-top: 3px;
  }

  .timeline-summary-note {
    margin-left: 0;
  }

  .timeline-kind {
    gap: 2px 16px;
  }

  .timeline-kind button {
    min-height: 44px;
  }

  .timeline-marker {
    width: 26px;
  }

  .timeline-day {
    margin-left: 38px;
  }

  .timeline-open {
    grid-column: 2;
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-self: start;
    margin-top: 5px;
    padding-left: 0;
  }

  .timeline-more {
    padding-left: 38px;
  }

  .timeline-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .timeline-masthead h1 {
    font-size: 3.5rem;
  }

  .timeline-more {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

}

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