/* History timeline. Phone layout first; .is-pinned (set by the script on wide screens) adds the sideways one. */
.ht {
	--ht-bg: #0b1626;
	--ht-surface: #13233b;
	--ht-line: #2f4e7f;
	--ht-rail: #1c3358;
	--ht-blue: #427ed1;
	--ht-gold: #f5b53f;
	--ht-text: #e8f0fc;
	--ht-muted: #a9c3ec;
	--ht-head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
	--ht-top: 0px;
	background: var(--ht-bg);
	color: var(--ht-text);
	font-family: "Karla", "Helvetica Neue", Arial, sans-serif;
	line-height: 1.6;
	position: relative;
}
.ht *, .ht *::before, .ht *::after { box-sizing: border-box; }
.ht a { color: var(--ht-gold); }
.ht :focus-visible { outline: 3px solid var(--ht-gold); outline-offset: 2px; }
.ht img { max-width: 100%; border-radius: 0; }

/* ---- title and intro ---- */
.ht__hero { padding: 36px 16px 32px; }
.ht__title { margin: 0 0 20px; font: 700 40px/1.04 var(--ht-head); letter-spacing: -0.02em; color: #fff; text-transform: none; }
.ht__title-top { display: block; color: var(--ht-gold); }
.ht__cue { display: none; margin: 0; align-items: center; gap: 14px; color: var(--ht-muted); font-size: 16px; }
.ht__cue svg { color: var(--ht-gold); flex: none; }
.ht__intro p { margin: 0 0 14px; font-size: 17px; line-height: 1.55; color: var(--ht-text); }
.ht__intro p:last-child { margin-bottom: 0; font-weight: 700; color: var(--ht-gold); }
.ht__intro blockquote { margin: 0 0 14px; padding: 16px 18px; background: var(--ht-surface); border: 1px solid var(--ht-line); border-radius: 8px; font-style: italic; }
.ht__intro blockquote p { margin: 0; font-size: 15px; font-weight: 400; color: #cfe0fa; }
.ht__intro blockquote p:last-child { font-weight: 400; color: #cfe0fa; }

/* ---- stage: top row is only for the sideways layout ---- */
.ht__stage { display: flex; flex-direction: column; }
.ht__top { display: none; }
.ht__viewport { position: relative; }

/* ---- year bar (phone: sticky strip of year buttons with a progress line) ---- */
.ht__bar { order: -1; position: sticky; top: var(--ht-top); z-index: 5; background: var(--ht-bg); border-bottom: 1px solid var(--ht-rail); }
.ht__rail { overflow-x: auto; scrollbar-width: none; padding: 10px 16px; }
.ht__rail::-webkit-scrollbar { display: none; }
.ht__cols { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ht__col { flex: 0 0 auto; list-style: none; margin: 0; padding: 0; }
.ht__dot, .ht__line, .ht__hint { display: none; }
.ht__chip { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 68px; min-height: 48px; padding: 6px 8px; border-radius: 6px; background: var(--ht-surface); border: 2px solid var(--ht-line); color: #fff; text-decoration: none; font-family: var(--ht-head); line-height: 1.2; }
.ht__chip b { font-weight: 700; font-size: 15px; }
.ht__chip small { font: 400 11px/1.2 "Karla", Arial, sans-serif; margin-top: 1px; opacity: 0.9; }
.ht__chip[aria-current="true"] { background: var(--ht-gold); border-color: var(--ht-gold); color: var(--ht-bg); }
.ht__prog { height: 4px; background: var(--ht-rail); }
.ht__prog i { display: block; height: 4px; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--ht-blue), var(--ht-gold)); }

/* ---- cards joined by one centre line ---- */
.ht__track { position: relative; padding: 32px 16px 0; }
.ht__track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: linear-gradient(var(--ht-blue), var(--ht-gold)); }
.ht__panel { position: relative; z-index: 1; margin-bottom: 56px; background: var(--ht-surface); border: 1px solid var(--ht-line); border-radius: 10px; overflow: hidden; scroll-margin-top: calc(var(--ht-top) + 84px); }
.ht__panel::after { content: ""; position: absolute; left: 50%; bottom: -36px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--ht-gold); border: 4px solid var(--ht-bg); box-shadow: 0 0 0 3px var(--ht-blue); }
.ht__media { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; }
.ht__media:empty { display: none; }
.ht__photo { position: relative; display: block; grid-column: span var(--mc, 12); aspect-ratio: var(--mar, 3/2); overflow: hidden; background: var(--ht-surface); cursor: zoom-in; }
.ht__photo img { display: block; width: 100%; height: 100%; object-fit: var(--fit, cover); object-position: var(--pos, center); }
.ht__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 8px; background: linear-gradient(rgba(11, 22, 38, 0), rgba(11, 22, 38, 0.88)); color: #fff; font-size: 13px; line-height: 1.3; pointer-events: none; }
.ht__media[data-dense] .ht__cap { display: none; }
.ht__empty { grid-column: 1 / -1; min-height: 88px; display: flex; align-items: center; justify-content: center; padding: 16px; color: var(--ht-muted); font-size: 15px; text-align: center; border-bottom: 1px solid var(--ht-line); background: repeating-linear-gradient(135deg, rgba(66, 126, 209, 0.07) 0 12px, transparent 12px 24px); }
.ht__copy { padding: 16px 20px 8px; }
.ht__year { margin: 0 0 14px; font: 700 68px/0.95 var(--ht-head); letter-spacing: -0.03em; color: var(--ht-gold); text-transform: none; }
.ht__text p { margin: 0 0 12px; font-size: 16px; line-height: 1.6; color: var(--ht-text); }
.ht__text a { text-decoration: underline; text-underline-offset: 2px; }

/* ---- photo viewer ---- */
.ht__lb { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: rgba(5, 10, 18, 0.94); color: #fff; }
.ht__lb:not([open]) { display: none; }
.ht__lb[open] { display: flex; align-items: center; justify-content: center; }
.ht__lb::backdrop { background: rgba(5, 10, 18, 0.94); }
.ht__lb-fig { margin: 0; max-width: min(92vw, 1400px); text-align: center; }
.ht__lb-fig img { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; object-fit: contain; }
.ht__lb-fig figcaption { margin-top: 12px; font-size: 16px; color: var(--ht-text); }
.ht__lb button { font-family: var(--ht-head); cursor: pointer; color: #fff; background: rgba(255, 255, 255, 0.12); border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 50%; width: 48px; height: 48px; font-size: 22px; line-height: 1; padding: 0; }
.ht__lb-x { position: absolute; top: 16px; right: 16px; }
.ht__lb-nav { position: absolute; top: 50%; margin-top: -24px; }
.ht__lb-prev { left: 12px; }
.ht__lb-next { right: 12px; }
.ht__lb-nav[hidden] { display: none; }

/* ---- sideways layout: wide, tall screens, motion allowed (class set by the script) ---- */
.ht.is-pinned { --ht-vh: 100vh; }
.ht.is-pinned .ht__hero { display: flex; gap: 64px; align-items: flex-start; padding: 56px 56px 72px; }
.ht.is-pinned .ht__hero-head { flex: 0 0 520px; display: flex; flex-direction: column; align-self: stretch; }
.ht.is-pinned .ht__title { font-size: 72px; }
.ht.is-pinned .ht__cue { display: flex; margin-top: auto; padding-top: 48px; }
.ht.is-pinned .ht__intro { flex: 1; min-width: 0; max-width: 680px; }
.ht.is-pinned .ht__intro p { font-size: 18px; }
.ht.is-pinned .ht__pin { height: var(--ht-pin-h); }
.ht.is-pinned .ht__stage { position: sticky; top: 0; height: var(--ht-vh); overflow: hidden; background: var(--ht-bg); }
.ht.is-pinned .ht__top { order: 1; flex: 0 0 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 56px; }
.ht.is-pinned .ht__eyebrow { font: 700 13px/1 var(--ht-head); letter-spacing: 0.22em; color: var(--ht-gold); }
.ht.is-pinned .ht__ctrl { display: flex; align-items: center; gap: 12px; }
.ht.is-pinned .ht__totop { margin-right: 14px; color: var(--ht-muted); font-size: 15px; }
.ht.is-pinned .ht__count { margin-right: 6px; color: var(--ht-muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.ht.is-pinned .ht__arrow { width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 2px solid var(--ht-blue); background: transparent; color: #fff; font: 400 20px/1 var(--ht-head); cursor: pointer; }
.ht.is-pinned .ht__next { background: var(--ht-blue); }
.ht.is-pinned .ht__arrow:disabled { opacity: 0.35; cursor: default; }
.ht.is-pinned .ht__viewport { order: 2; flex: 1; min-height: 0; overflow: hidden; }
.ht.is-pinned .ht__track { display: flex; width: calc(var(--ht-n) * 100%); height: 100%; padding: 0; will-change: transform; }
.ht.is-pinned .ht__track::before, .ht.is-pinned .ht__panel::after { display: none; }
.ht.is-pinned .ht__panel { contain: layout paint; flex: 0 0 calc(100% / var(--ht-n)); width: calc(100% / var(--ht-n)); height: 100%; margin: 0; padding: 8px 56px 16px; display: flex; gap: 48px; border: 0; border-radius: 0; background: none; overflow: visible; }
.ht.is-pinned .ht__panel[inert] { pointer-events: none; }
.ht.is-pinned .ht__media { flex: 0 0 min(50%, 640px); width: min(50%, 640px); height: 100%; gap: 10px; grid-auto-rows: 1fr; }
.ht.is-pinned .ht__media:empty { display: none; }
.ht.is-pinned .ht__media[data-layout="feature"] { grid-template-rows: 1.35fr 1fr; }
.ht.is-pinned .ht__photo { grid-column: span var(--dc, 12); aspect-ratio: auto; border-radius: 8px; }
.ht.is-pinned .ht__cap { font-size: 14px; padding: 34px 16px 12px; }
.ht.is-pinned .ht__media[data-dense] .ht__cap { display: block; opacity: 0; transition: opacity 0.2s; }
.ht.is-pinned .ht__media[data-dense] .ht__photo:hover .ht__cap, .ht.is-pinned .ht__media[data-dense] .ht__photo:focus-visible .ht__cap { opacity: 1; }
.ht.is-pinned .ht__empty { grid-column: 1 / -1; grid-row: 1 / -1; border: 2px dashed #3a5a8c; border-radius: 8px; min-height: 0; }
.ht.is-pinned .ht__copy { flex: 1; min-width: 0; padding: 0; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; }
.ht.is-pinned .ht__year { margin: 0 0 clamp(10px, 2.4vh, 22px); font-size: clamp(76px, 15vh, 124px); letter-spacing: -0.03em; }
.ht.is-pinned .ht__text p { font-size: clamp(16px, 2.3vh, 18px); }

/* the bar moves to the bottom of the stage; a marker follows the scroll */
.ht.is-pinned .ht__bar { order: 3; position: static; flex: 0 0 auto; padding: 6px 56px 10px; border-top: 1px solid var(--ht-rail); border-bottom: 0; }
.ht.is-pinned .ht__rail { overflow: visible; padding: 0; position: relative; }
.ht.is-pinned .ht__prog { display: none; }
.ht.is-pinned .ht__hint { display: block; margin: 8px 0 0; text-align: center; font-size: 14px; color: var(--ht-muted); }
.ht.is-pinned .ht__cols { gap: 0; }
.ht.is-pinned .ht__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.ht.is-pinned .ht__line { display: block; position: absolute; top: 12px; height: 6px; left: calc(50% / var(--ht-n)); right: calc(50% / var(--ht-n)); border-radius: 3px; background: var(--ht-rail); }
.ht.is-pinned .ht__fill { position: absolute; left: 0; top: 0; width: 100%; height: 6px; border-radius: 3px; transform: scaleX(0); transform-origin: 0 50%; will-change: transform; background: linear-gradient(90deg, var(--ht-blue), var(--ht-gold)); }
.ht.is-pinned .ht__marker { position: absolute; top: 3px; left: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; will-change: transform; border-radius: 50%; background: var(--ht-gold); border: 4px solid var(--ht-bg); box-shadow: 0 0 0 3px var(--ht-blue); pointer-events: none; z-index: 2; }
.ht.is-pinned .ht__dot { display: block; position: relative; z-index: 1; width: 14px; height: 14px; margin: 8px 0 8px; border-radius: 50%; background: var(--ht-bg); border: 2px solid #3a5a8c; }
.ht.is-pinned .ht__dot.is-past { background: var(--ht-gold); border-color: var(--ht-gold); }
.ht.is-pinned .ht__chip { width: calc(100% - 4px); min-width: 0; min-height: 46px; padding: 6px 0; }
.ht.is-pinned .ht__chip b { font-size: 13px; }
.ht.is-pinned .ht__chip small { display: none; }

/* the site's header stays out of the way while the years are pinned */
body.ht-pinned .site-header.is-stuck .hdr-main { transform: translateY(-100%) !important; }

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