/* ===== Page base: reset and which view shows on each tab ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body { margin: 0; background: #2A1B12; color: #EFEDE8; }
button, input, select { font: inherit; color: inherit; }
#app { min-height: 100svh; }
html[data-tab="insights"] .tl-only { display: none !important; }
html[data-tab="timeline"] .ins-only { display: none !important; }
/* Insights measures its width once per render; a fixed gutter keeps that width true whether or not the page scrolls yet. */
html { scrollbar-gutter: stable; }

/* ===== Kit: tokens, header, filter panel, timeline skeleton and footer shared by the page ===== */
.sk {
  --ground: #2A1B12; --acc: #E2BC5C;
  --paper: #EFEDE8; --dim: rgba(239, 237, 232, 0.68); --soft: rgba(239, 237, 232, 0.86); --faint: rgba(239, 237, 232, 0.2);
  --surface: rgba(255, 255, 255, 0.035); --surface-hi: rgba(255, 255, 255, 0.075); --matte: #ECE6DA;
  --f-geo: "Alan Sans", system-ui, sans-serif; --f-ui: "Alan Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1); --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --head-h: 60px;
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --pad: max(20px, 4vw, var(--safe-l), var(--safe-r));
  /* Wave shapes, used as masks so they take any colour */
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='12'%3E%3Cpath d='M0 6 Q12 0 24 6 T48 6 T72 6 T96 6' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
  --wave-bold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14'%3E%3Cpath d='M0 7 Q15 0 30 7 T60 7 T90 7 T120 7' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  --wave-edge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='10'%3E%3Cpath d='M0 0 H96 V4 Q84 10 72 4 T48 4 T24 4 T0 4 Z' fill='%23000'/%3E%3C/svg%3E");
  --wave-v: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='32'%3E%3Cpath d='M6 0 Q0 8 6 16 T6 32' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E");
  position: relative; min-height: 100svh; background: var(--ground); color: var(--paper);
  font-family: var(--f-ui); font-size: 1rem; line-height: 1.55;
}
.sk *, .sk *::before, .sk *::after { box-sizing: border-box; }
.sk a { color: inherit; text-underline-offset: 3px; }
.sk :focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.sk [tabindex="-1"]:focus { outline: none; }

/* ---------- Header: logo at the start, language at the end ---------- */
.sk-head { position: sticky; top: 0; z-index: 30; padding-top: var(--safe-t); --glass-extra: 0px; --glass-tint: 62%; }
.sk-bar { position: relative; z-index: 2; height: var(--head-h); display: flex; align-items: center; gap: 18px; padding-inline: var(--pad); }
/* Glass behind the bar and the open filter panel: one surface, so no blur meets another blur.
   It grows with the panel (--glass-extra, set by kit.js) and runs 64px past it, where it thins out
   in steps (strong blur + tint, then 8px, then 3px) and ends fully transparent: a progressive blur, no edge.
   The container stays plain (no opacity or filter), or the layers inside it would have nothing to blur. */
.sk-glass { position: absolute; z-index: 0; inset-inline: 0; top: 0; height: calc(100% + var(--glass-extra) + 64px); pointer-events: none; transition: height 240ms var(--ease); }
.sk-glass i { position: absolute; inset: 0; opacity: 0; transition: opacity 260ms ease-out; }
.sk-head.is-scrolled .sk-glass i, .sk-head.is-open .sk-glass i { opacity: 1; }
.sk-glass i:nth-child(1) {
  background: color-mix(in srgb, var(--ground) var(--glass-tint), transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  -webkit-mask: linear-gradient(to bottom, #000 calc(100% - 64px), transparent calc(100% - 34px));
  mask: linear-gradient(to bottom, #000 calc(100% - 64px), transparent calc(100% - 34px));
}
.sk-glass i:nth-child(2) {
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-mask: linear-gradient(to bottom, transparent calc(100% - 72px), #000 calc(100% - 54px), #000 calc(100% - 38px), transparent calc(100% - 16px));
  mask: linear-gradient(to bottom, transparent calc(100% - 72px), #000 calc(100% - 54px), #000 calc(100% - 38px), transparent calc(100% - 16px));
}
.sk-glass i:nth-child(3) {
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  -webkit-mask: linear-gradient(to bottom, transparent calc(100% - 44px), #000 calc(100% - 28px), transparent 100%);
  mask: linear-gradient(to bottom, transparent calc(100% - 44px), #000 calc(100% - 28px), transparent 100%);
}
.sk-head.is-open { --glass-tint: 76%; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sk-head { --glass-tint: 100%; }
}
.sk-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-geo); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; white-space: nowrap; }
.sk-logo .sk-mark { color: var(--paper); flex: none; overflow: visible; }
.sk-mark-orbit { transform-origin: 14px 14px; transform-box: view-box; }
@media (prefers-reduced-motion: no-preference) {
  .sk-mark-orbit { transition: transform 900ms var(--ease); }
  .sk-logo:hover .sk-mark-orbit { transform: rotate(360deg); }
}
.sk-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.sk-tabs button { height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--dim); cursor: pointer; font-size: 0.8125rem; white-space: nowrap; }
.sk-tabs button:hover { color: var(--paper); }
.sk-tabs button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.14); color: var(--paper); }
.sk-now { margin-inline-start: auto; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.sk-odo { display: inline-flex; font-family: var(--f-geo); font-weight: 300; font-size: 1.5rem; line-height: 1; letter-spacing: -0.02em; direction: ltr; font-variant-numeric: tabular-nums; }
.sk-nowe { font-size: 0.8125rem; color: var(--acc); }
.sk-tools { display: flex; align-items: center; gap: 8px; }
html[data-tab="insights"] .sk-tools { margin-inline-start: auto; }
.sk-fbtn, .sk-lang { height: 34px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--paper); cursor: pointer; font-size: 0.8125rem; white-space: nowrap; }
.sk-fbtn:hover, .sk-lang:hover { background: rgba(255, 255, 255, 0.11); }
.sk-fbtn[aria-expanded="true"] { background: var(--paper); color: var(--ground); }
.sk-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--acc); color: #160F0A; font-size: 0.8125rem; line-height: 18px; text-align: center; font-weight: 600; }
.sk-lang .short { display: none; }

/* ---------- Filter panel: the sentence ---------- */
/* the panel has no surface of its own: it sits on the header's glass layer */
.sk-panel { position: absolute; inset-inline: 0; top: 100%; z-index: 1; padding: 6px var(--pad) 30px; }
.sk-panel[hidden] { display: none; }
.sk-panel-in { max-width: 780px; display: grid; gap: 14px; }
.sk-sent { margin: 0; font-family: var(--f-geo); font-weight: 400; font-size: 1.625rem; line-height: 1.4; letter-spacing: -0.012em; }
html[lang="ar"] .sk-sent { line-height: 1.75; letter-spacing: 0; }
.sk-tok { border: 0; padding: 0 2px; margin: 0; background: none; font: inherit; color: var(--acc); cursor: pointer; text-decoration: underline; text-decoration-style: wavy; text-decoration-thickness: 1.5px; text-underline-offset: 6px; text-decoration-color: color-mix(in srgb, var(--acc) 55%, transparent); }
.sk-tok:hover, .sk-tok[aria-expanded="true"], .sk-tok[aria-pressed="true"] { text-decoration-color: var(--acc); }
.sk-menu { display: flex; flex-wrap: wrap; gap: 6px; transform-origin: top; }
.sk-menu[hidden] { display: none; }
.sk-menu button, .sk-jumps button { min-height: 34px; padding: 0 14px; display: inline-flex; align-items: center; line-height: 1.25; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--paper); cursor: pointer; font-size: 0.8125rem; }
.sk-menu button:hover, .sk-jumps button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.13); }
.sk-menu button[aria-pressed="true"] { background: var(--paper); color: var(--ground); }
.sk-match { display: flex; align-items: center; gap: 12px; font-family: var(--f-geo); font-size: 1.625rem; letter-spacing: -0.012em; }
.sk-qwrap { position: relative; flex: 1; min-width: 0; display: flex; }
.sk-match input { flex: 1; min-width: 0; height: 40px; border: 0; background: none; color: var(--paper); font: inherit; font-size: 1.25rem; padding: 0 2px; }
.sk-qwrap::after { content: ""; position: absolute; inset-inline: 0; bottom: -4px; height: 12px; background: color-mix(in srgb, var(--acc) 60%, transparent); -webkit-mask: var(--wave) repeat-x 0 50% / 48px 12px; mask: var(--wave) repeat-x 0 50% / 48px 12px; pointer-events: none; }
.sk-match:focus-within .sk-qwrap::after { background: var(--acc); }
.sk-match input::placeholder { color: rgba(239, 237, 232, 0.38); }
.sk-match input:focus { outline: none; }
.sk-cnt { margin: 0; font-size: 0.8125rem; color: var(--dim); display: flex; gap: 14px; align-items: baseline; }
.sk-cnt b { color: var(--paper); }
.sk-cnt button { border: 0; background: none; padding: 0; color: var(--paper); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 0.8125rem; }
.sk-jumps { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.sk-jumps button { display: inline-flex; gap: 10px; align-items: center; line-height: 1.25; padding-block: 7px; }
.sk-jumps button b { font-weight: 600; color: var(--acc); }
.sk-jumps button[aria-current="true"] { background: var(--paper); color: var(--ground); }
.sk-jumps button[aria-current="true"] b { color: var(--ground); }
.sk-jumps button:disabled { opacity: 0.32; cursor: default; }

/* ---------- Intro and era headers ---------- */
.sk-intro { min-height: 66vh; display: grid; align-content: end; gap: 18px; padding-block: 14vh 9vh; }
.sk-intro h1 { margin: 0; font-family: var(--f-geo); font-weight: 700; font-size: clamp(2.5rem, 4.6vw, 4.75rem); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
html[lang="ar"] .sk-intro h1 { line-height: 1.35; letter-spacing: 0; }
.sk-intro-txt { display: grid; gap: 18px; align-content: end; }
/* even padding, so the orbit block centres on the first screen */
.sk-intro.has-aside { --hero-pad: 6vh; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; align-content: center; gap: 4vw; min-height: calc(100svh - var(--head-h)); padding-block: var(--hero-pad); }
.sk-intro p { margin: 0; max-width: 46ch; font-size: 1.125rem; line-height: 1.6; color: var(--dim); text-wrap: pretty; }
.sk-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 10px; }
.sk-cta { height: 52px; display: inline-flex; align-items: center; gap: 10px; padding: 0 20px 0 24px; border: 0; border-radius: 999px; background: var(--acc); color: var(--ground); font-family: var(--f-geo); font-weight: 700; font-size: 1rem; cursor: pointer; transition: transform 160ms var(--ease), filter 160ms ease-out; }
.sk-cta svg { transition: transform 260ms var(--ease); }
.sk-cta:hover { filter: brightness(1.08); }
.sk-cta:hover svg { transform: translateY(3px); }
.sk-cta:active { transform: scale(0.97); }

.sk-era { position: relative; padding-top: 104px; }
.sk-eh { display: grid; gap: 8px; padding-bottom: 30px; }
.sk-eh .n { font-size: 0.8125rem; color: var(--acc); display: flex; gap: 10px; }
.sk-eh .n span { color: var(--dim); }
.sk-eh h2 { margin: 0; font-family: var(--f-geo); font-weight: 700; font-size: clamp(2.25rem, 4.2vw, 3.75rem); line-height: 1; letter-spacing: -0.03em; max-width: 16ch; text-wrap: balance; }
html[lang="ar"] .sk-eh h2 { line-height: 1.35; letter-spacing: 0; }
.sk-eh p { margin: 0; color: var(--dim); }
.sk-eh::after { content: ""; height: 14px; margin-top: 22px; background: var(--acc); opacity: 0.85; -webkit-mask: var(--wave-bold) repeat-x 0 0 / 120px 14px; mask: var(--wave-bold) repeat-x 0 0 / 120px 14px; }

/* ---------- Decade layers: a numeral pinned behind each, a wave between them ---------- */
.sk-dec { position: relative; padding-block: 8px 10px; overflow: clip; overflow-clip-margin: 10px; }
.sk-dec + .sk-dec::before { content: ""; display: block; height: 12px; margin-bottom: 14px; background: var(--faint); -webkit-mask: var(--wave) repeat-x 0 50% / 96px 12px; mask: var(--wave) repeat-x 0 50% / 96px 12px; }
.sk-decn { position: sticky; top: calc(var(--head-h) + 6px); height: 0; z-index: 0; pointer-events: none; }
.sk-decn span { display: block; font-family: var(--f-geo); font-weight: 200; font-size: clamp(130px, 15vw, 250px); line-height: 0.82; letter-spacing: -0.06em; color: rgba(239, 237, 232, 0.06); direction: ltr; unicode-bidi: isolate; margin-inline-start: -0.05em; padding-top: 6px; }
html[dir="rtl"] .sk-decn span { text-align: right; }
.sk-yg { position: relative; z-index: 1; margin-top: calc(var(--gap, 0px) + 26px); }
.sk-decn + .sk-yg { margin-top: calc(var(--gap, 0px) + 6px); }
/* The empty years: a wavy core line and how many years it spans */
.sk-yg[data-gap]::before { content: ""; position: absolute; inset-inline-start: var(--squig-x, 1rem); bottom: calc(100% + 12px); width: 12px; height: calc(var(--gap) - 16px); background: rgba(239, 237, 232, 0.34); -webkit-mask: var(--wave-v) repeat-y 0 0 / 12px 32px; mask: var(--wave-v) repeat-y 0 0 / 12px 32px; }
.sk-gapl { position: absolute; inset-inline-start: calc(var(--squig-x, 1rem) + 24px); bottom: calc(100% + 12px + (var(--gap) - 16px) / 2 - 0.6em); font-size: 0.75rem; color: var(--dim); white-space: nowrap; }
.sk-y { margin: 0; font-family: var(--f-geo); font-weight: 700; font-size: 1.75rem; line-height: 1.1; letter-spacing: -0.02em; color: var(--acc); direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .sk-y { text-align: right; }

/* ---------- Images on a paper matte ---------- */
.sk-frame { position: relative; margin: 0; aspect-ratio: 4 / 3; min-height: 0; overflow: hidden; border-radius: 14px; background: var(--matte); isolation: isolate; }
.sk-frame img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.sk-frame img.fit { object-fit: contain; padding: 7%; }
.sk-frame img.is-logo { object-fit: contain; padding: 16% 18%; }
.sk-frame.is-empty { background: rgba(255, 255, 255, 0.045); display: grid; place-items: center; align-content: center; gap: 12px; }
.sk-frame-none { font-size: 0.8125rem; color: var(--dim); text-align: center; }
.sk-frame-wave { width: 44%; height: 14px; background: var(--faint); -webkit-mask: var(--wave-bold) repeat-x 0 0 / 40px 14px; mask: var(--wave-bold) repeat-x 0 0 / 40px 14px; }

.sk-layers { color: var(--acc); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; display: block; }
.sk-meta { font-size: 0.8125rem; color: var(--dim); display: flex; flex-wrap: wrap; gap: 0 8px; }
.sk-meta span + span::before { content: "·"; margin-inline-end: 8px; }
.sk-meta .lmk { color: var(--acc); }

.sk-fine { display: grid; gap: 6px; font-size: 0.8125rem; color: var(--dim); }
.sk-fine .contested { margin: 0; font-size: 0.875rem; color: var(--soft); }
.sk-fine .contested b { color: var(--acc); font-weight: 600; }
.sk-fine .credit { overflow-wrap: anywhere; }
.sk-fine .sources { display: flex; flex-wrap: wrap; gap: 3px 12px; }
.sk .credit { font-size: 0.8125rem; color: var(--dim); overflow-wrap: anywhere; }

/* ---------- Live year odometer ---------- */
.sk-dg { position: relative; display: block; overflow: hidden; height: 1.05em; }
.sk-dg > span { display: block; }
.sk-dg > span.out-up, .sk-dg > span.out-down { position: absolute; inset-inline: 0; top: 0; }

.sk-empty { padding: 18vh 0; font-family: var(--f-geo); font-size: 1.75rem; }
.sk-ins { position: relative; z-index: 1; padding: 32px var(--pad) 120px; }
.sk-foot { position: relative; z-index: 1; padding: 40px var(--pad) 120px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; font-size: 0.8125rem; color: var(--dim); max-width: 1100px; }
.sk-foot::before { content: ""; grid-column: 1 / -1; height: 12px; background: var(--faint); -webkit-mask: var(--wave) repeat-x 0 50% / 96px 12px; mask: var(--wave) repeat-x 0 50% / 96px 12px; }
.sk-foot p { margin: 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* An animation, not a transition, so cards keep their own hover transitions */
  .sk [data-reveal]:not(.in) { opacity: 0; }
  .sk [data-reveal].in { animation: sk-reveal 640ms var(--ease) var(--d, 0ms) backwards; }
  @keyframes sk-reveal { from { opacity: 0; transform: translateY(18px); } }
  .sk-intro-txt > * { animation: sk-rise 760ms var(--ease) backwards; }
  .sk-intro-txt > :nth-child(2) { animation-delay: 90ms; }
  .sk-intro-txt > :nth-child(3) { animation-delay: 180ms; }
  @keyframes sk-rise { from { opacity: 0; transform: translateY(22px); } }
  .sk-panel.enter { animation: sk-drop 240ms var(--ease); }
  @keyframes sk-drop { from { opacity: 0; transform: translateY(-8px); } }
  .sk-menu.enter { animation: sk-menu 200ms var(--ease); }
  @keyframes sk-menu { from { opacity: 0; transform: translateY(-4px); } }
  .sk-dg > span.in-up { animation: sk-in-up 300ms var(--ease) both; }
  .sk-dg > span.in-down { animation: sk-in-down 300ms var(--ease) both; }
  .sk-dg > span.out-up { animation: sk-out-up 300ms var(--ease) both; }
  .sk-dg > span.out-down { animation: sk-out-down 300ms var(--ease) both; }
  @keyframes sk-in-up { from { transform: translateY(80%); opacity: 0; } }
  @keyframes sk-in-down { from { transform: translateY(-80%); opacity: 0; } }
  @keyframes sk-out-up { to { transform: translateY(-80%); opacity: 0; } }
  @keyframes sk-out-down { to { transform: translateY(80%); opacity: 0; } }
  .sk-tabs button, .sk-fbtn, .sk-lang, .sk-menu button, .sk-jumps button { transition: background-color 140ms ease-out, color 140ms ease-out, transform 140ms var(--ease); }
  .sk-fbtn:active, .sk-lang:active, .sk-menu button:active, .sk-jumps button:active { transform: scale(0.97); }
  .sk-nowe { transition: color 400ms ease-out; }
}

/* ---------- Tablets: the live year keeps its number, drops the era name ---------- */
@media (max-width: 1080px) { .sk-nowe { display: none; } }

/* ---------- Phones: the same header, tighter ---------- */
@media (max-width: 760px) {
  .sk { --head-h: 56px; }
  .sk-bar { gap: 8px; padding-inline: 14px; }
  .sk-logo { gap: 7px; font-size: 0.9375rem; }
  .sk-logo svg { width: 22px; }
  .sk-tabs { margin-inline-start: auto; }
  .sk-tabs button { padding: 0 9px; height: 26px; }
  .sk-now { display: none; }
  .sk-tools { gap: 6px; }
  .sk-fbtn, .sk-lang { height: 34px; padding: 0 10px; }
  .sk-fbtn .lbl { display: none; }
  .sk-lang .long { display: none; }
  .sk-lang .short { display: inline; font-weight: 600; }
  .sk-panel { padding-inline: 18px; }
  .sk-panel-in { max-height: calc(100svh - var(--head-h) - 60px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .sk-panel-in::-webkit-scrollbar { display: none; }
  .sk-sent, .sk-match { font-size: 1.25rem; }
  .sk-match input { font-size: 1.0625rem; }
  .sk-intro { min-height: 60vh; padding-inline: 0; }
  .sk-intro h1 { font-size: 2.125rem; }
  .sk-decn span { font-size: 34vw; }
  .sk-foot { grid-template-columns: minmax(0, 1fr); }
}

/* Scrollbars that sit on the dark grounds instead of flashing white */
.sk, .sk * { scrollbar-color: rgba(239, 237, 232, 0.28) transparent; }
dialog.bd-dlg { scrollbar-color: rgba(239, 237, 232, 0.28) transparent; }
/* Inner scroll areas scroll without drawing a straight bar */
.sp-panel, dialog.bd-dlg, .bd-strip { scrollbar-width: none; }
.sp-panel::-webkit-scrollbar, dialog.bd-dlg::-webkit-scrollbar, .bd-strip::-webkit-scrollbar { display: none; }

/* ---------- Footer credit ---------- */
.sk-credit { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 16px; padding: 64px var(--pad) 128px; color: var(--soft); font-size: 1rem; }
.sk-credit::before { content: ""; position: absolute; inset-inline: var(--pad); top: 0; height: 12px; background: var(--faint); -webkit-mask: var(--wave) repeat-x 0 50% / 96px 12px; mask: var(--wave) repeat-x 0 50% / 96px 12px; }
/* every piece is a line-height-1 box on one flex row, so the words, heart, mark and name share a centre line */
.sk-credit-t, .sk-sig { display: inline-flex; align-items: center; gap: 8px; line-height: 1; }
.sk-sig { gap: 10px; }
/* the mark's two dots sit on its left; in Arabic the mark goes after the name so the dots don't read as a colon before it */
.sk-credit[lang="ar"] .sk-alogo { order: 1; }
.sk-heart { display: inline-block; font-size: 1.125rem; line-height: 1; }
.sk-alogo { height: 22px; width: auto; color: var(--paper); flex: none; }
.sk-alogo .arc { fill: var(--acc); transition: fill 400ms ease-out; }
.sk-sig-n { color: var(--paper); font-weight: 600; }
/* A line-height-1 box centres the em box, but the letters' visual middle sits a little lower, and lower again in Arabic.
   Lifting the words (measured on screen) puts them on the heart's and mark's centre line. */
.sk-credit { --text-lift: -1px; }
.sk-credit[lang="ar"] { --text-lift: -2px; }
.sk-credit-t > span:not(.sk-heart), .sk-sig-n { translate: 0 var(--text-lift); }
@media (prefers-reduced-motion: no-preference) {
  .sk-credit:hover .sk-heart { animation: sk-beat 900ms var(--ease); }
  @keyframes sk-beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.28); } 60% { transform: scale(0.96); } }
}
/* Numerals keep their digit order but sit at the reading start: the right edge in Arabic. */
html[dir="rtl"] .sk-y, html[dir="rtl"] .sk-decn span { text-align: right; }

/* ===== Intro orbit: landmarks circle a featured centre ===== */
/* --wr (ring radius), --wa (wave amplitude) and --s-max (largest disc) come from orbit.js as shares of the orbit. */
.bd-orbit {
  --d1f: 0.15; --on-scale: 1.16;
  /* the year plus one line of name; a rare second line falls into the hero's padding, never off screen */
  --cap-gap: 32px; --cap-h: calc(1.75rem * 1.1 + 2px + 1.55rem);
  /* how far the largest featured disc reaches past the centre, as a share of the orbit, doubled */
  --span-k: calc(2 * (var(--wr) + var(--wa)) + var(--d1f) * var(--s-max) * var(--on-scale));
  /* the orbit shrinks on short screens so the discs and the caption fit the first screen */
  --fit-h: calc(100svh - var(--head-h) - 2 * var(--hero-pad, 0px) - var(--cap-gap) - var(--cap-h));
  --o: min(600px, 40vw, calc(var(--fit-h) / var(--span-k)));
  --d1: calc(var(--o) * var(--d1f));
  /* the inner ring rides the halo's edge, close to the core but clear of its picture */
  --halo-f: 0.25;
  --r2: calc(var(--o) * var(--halo-f)); --d2: calc(var(--o) * 0.075);
  --reach: calc(var(--o) * var(--span-k) / 2);
  --overhang: calc(var(--reach) - var(--o) / 2);
  --spin1: 96s; --spin2: 64s;
  /* the margins wrap the discs and the caption below, so the hero centres the orbit and its caption as one block */
  position: relative; justify-self: center; width: var(--o); aspect-ratio: 1;
  margin-block: var(--overhang) calc(var(--overhang) + var(--cap-gap) + var(--cap-h));
}
.sk-intro.has-aside { overflow-x: clip; }
/* a flat disc of lighter ground behind the centre, so the featured picture sits on a stage */
.bd-orbit::before { content: ""; position: absolute; inset: calc((0.5 - var(--halo-f)) * 100%); border-radius: 50%; background: color-mix(in srgb, var(--ground), #fff 4%); pointer-events: none; }
.bd-owave { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.bd-owave path { fill: none; stroke: color-mix(in srgb, var(--acc) 45%, transparent); stroke-width: 1.4; }

.bd-ring { position: absolute; inset: 0; pointer-events: none; }
.bd-disc {
  --r: calc(var(--o) * var(--rf, var(--wr))); --d: calc(var(--d1) * var(--s, 1));
  position: absolute; left: 50%; top: 50%; width: var(--d); height: var(--d); margin: calc(var(--d) / -2);
  padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; pointer-events: auto;
  transform: rotate(var(--a)) translateY(calc(-1 * var(--r))) rotate(calc(-1 * var(--a)));
}
.r2 .bd-disc { --r: var(--r2); --d: var(--d2); }
.r2 .bd-disc-in { border-width: 2px; }
.bd-disc-in {
  display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--matte); isolation: isolate;
  border: 3px solid var(--ground); outline: 3px solid transparent; outline-offset: 0;
  transition: scale 320ms var(--ease), outline-color 320ms var(--ease), filter 320ms ease-out;
}
.bd-disc-in img, .bd-core img { display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
/* a logo sits whole inside the circle: the padding keeps its corners clear of the round edge */
.bd-disc-in img.is-logo, .bd-core img.is-logo { object-fit: contain; padding: 14%; }
.r2 .bd-disc-in { filter: saturate(0.75) brightness(0.92); }
.bd-disc.on .bd-disc-in { scale: var(--on-scale); outline-color: var(--acc); filter: none; }
.bd-disc:focus-visible { outline: none; }
.bd-disc:focus-visible .bd-disc-in { outline-color: var(--paper); }
.bd-disc-in.flying { visibility: hidden; }

/* the featured centre: two layers crossfade so a new picture never pops in */
.bd-core { position: absolute; left: 50%; top: 50%; width: 36%; aspect-ratio: 1; translate: -50% -50%; margin: 0; border-radius: 50%; overflow: hidden; background: var(--matte); isolation: isolate; border: 10px solid color-mix(in srgb, var(--ground), #fff 8%); }
.bd-cl { position: absolute; inset: 0; opacity: 0; scale: 1.08; transition: opacity 700ms ease-out, scale 1400ms var(--ease); }
.bd-cl.on { opacity: 1; scale: 1; }

/* the intro's paragraph width limit would pull the caption off the orbit's axis */
.sk-intro .bd-ocap { max-width: none; }
.bd-ocap { position: absolute; inset-inline: 0; top: calc(50% + var(--reach) + var(--cap-gap)); margin: 0; display: grid; justify-items: center; gap: 2px; text-align: center; }
.bd-ocap b { font-family: var(--f-geo); font-weight: 700; font-size: 1.75rem; line-height: 1.1; letter-spacing: -0.02em; color: var(--acc); }
.bd-ocap span { font-size: 1rem; color: var(--soft); }

@media (prefers-reduced-motion: no-preference) {
  .bd-ring.r1, .r2 .bd-disc-in { animation: bd-spin var(--spin1) linear infinite; }
  .bd-ring.r2, .r1 .bd-disc-in { animation: bd-spin var(--spin1) linear infinite reverse; }
  .bd-ring.r2, .r2 .bd-disc-in { animation-duration: var(--spin2); }
  /* the rings and every picture on them stop together, so nothing drifts out of step */
  .bd-orbit.paused :is(.bd-ring, .bd-disc-in), .bd-orbit.held :is(.bd-ring, .bd-disc-in), .sk.is-film-open :is(.bd-ring, .bd-disc-in) { animation-play-state: paused; }
  @keyframes bd-spin { to { transform: rotate(360deg); } }
  .bd-disc { animation: bd-pop 760ms var(--ease) backwards; animation-delay: calc(240ms + var(--i) * 55ms); }
  .r2 .bd-disc { animation-delay: calc(520ms + var(--i) * 70ms); }
  @keyframes bd-pop { from { opacity: 0; scale: 0.3; } }
  .bd-core { animation: bd-pop 900ms var(--ease) backwards 120ms; }
  .bd-ocap.swap > * { animation: bd-cap 520ms var(--ease) backwards; }
  .bd-ocap.swap span { animation-delay: 70ms; }
  @keyframes bd-cap { from { opacity: 0; translate: 0 10px; filter: blur(4px); } }
}
@media (hover: hover) and (pointer: fine) {
  .bd-disc:hover .bd-disc-in { scale: 1.22; filter: none; }
}

@media (max-width: 900px) {
  .sk-intro.has-aside { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 8px; --hero-pad: 3vh; }
  /* stacked under the words: a smaller caption, sized so even a two-line name ends on the first screen */
  .bd-orbit { --o: min(78vw, 440px); --cap-gap: 28px; --stack-gap: 16px; --cap-gutter: 16px; --cap-h: calc(1.5rem * 1.1 + 2px + 2 * 0.9375rem * 1.55); margin-top: calc(var(--overhang) + var(--stack-gap)); }
  /* the caption spans the screen, not the narrower orbit, so long names keep to one line where they can */
  .bd-ocap { inset-inline: auto; left: 50%; width: calc(100vw - 2 * var(--cap-gutter)); translate: -50% 0; }
  .bd-ocap b { font-size: 1.5rem; }
  .bd-ocap span { font-size: 0.9375rem; }
}

/* ===== Bands ===== */
/* --cols cards per row beside the decade column; cards share one gap so a full row ends exactly at the margin */
.bd { --squig-x: 2.4rem; --rail: 188px; --g: 24px; --cols: 3; }
@media (min-width: 1600px) { .bd { --rail: 220px; --cols: 4; } }
.bd-main { padding-inline: var(--pad); }

/* ---------- Era header: a band with wavy edges; the photo sits beside the text, not under it ---------- */
.bd .sk-era { padding-top: 120px; }
.bd-eh { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 5vw; align-items: center; margin-inline: calc(-1 * var(--pad)); margin-bottom: 40px; padding: 56px var(--pad); background: color-mix(in srgb, var(--ground), #fff 6%); }
.bd-eh::before, .bd-eh::after { content: ""; position: absolute; inset-inline: 0; height: 14px; background: inherit; -webkit-mask: var(--wave-edge) repeat-x 0 0 / 120px 14px; mask: var(--wave-edge) repeat-x 0 0 / 120px 14px; }
.bd-eh::before { bottom: calc(100% - 1px); transform: scaleY(-1); }
.bd-eh::after { top: calc(100% - 1px); }
.bd-chip { display: grid; gap: 10px; }
.bd-chip { gap: 14px; }
.bd-chip .n { font-family: var(--f-geo); font-weight: 700; color: var(--acc); margin-inline-end: 12px; unicode-bidi: isolate; }
.bd-chip h2 { margin: 0; font-family: var(--f-geo); font-weight: 700; font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 0.98; letter-spacing: -0.035em; text-wrap: balance; }
html[lang="ar"] .bd-chip h2 { line-height: 1.3; letter-spacing: 0; }
.bd-chip p { margin: 0; font-size: 1.125rem; color: var(--paper); }
.bd-sig { margin: 0; display: grid; gap: 8px; }
.bd-sframe { border-radius: 20px; }
.bd-sig figcaption { display: grid; gap: 2px; font-size: 0.8125rem; color: var(--soft); }

/* ---------- Decades: the decade number holds its own column and stays in view while its years pass ---------- */
.bd .sk-dec { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); column-gap: var(--g); padding-block: 8px 28px; }
.bd .sk-dec + .sk-dec::before { grid-column: 1 / -1; margin-bottom: 44px; }
.bd .sk-decn { position: sticky; top: calc(var(--head-h) + 30px); height: auto; align-self: start; }
.bd .sk-decn span { font-size: clamp(56px, 5.1vw, 92px); font-weight: 300; line-height: 0.86; letter-spacing: -0.055em; color: var(--dim); padding-top: 2px; margin: 0; }
.bd .sk-decn i { font-style: normal; font-size: 0.4em; letter-spacing: 0; margin-inline-start: 0.06em; }
/* Arabic has no plural "s" for decades: the word sits under the number instead */
html[lang="ar"] .bd .sk-decn span { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
html[lang="ar"] .bd .sk-decn i { font-size: 0.26em; font-weight: 500; margin: 0; color: var(--dim); }
html[dir="rtl"] .bd .sk-decn span { text-align: right; }
/* Years flow side by side; a group grows with its card count, so every card in a row comes out the same width */
.bd .sk-decb { min-width: 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px var(--g); container-type: inline-size; }
.bd .sk-yg, .bd .sk-decn + .sk-yg { --cw: calc((100cqw - (var(--cols) - 1) * var(--g)) / var(--cols)); flex: var(--n) 1 calc(var(--n) * var(--cw) + (var(--n) - 1) * var(--g)); min-width: 0; max-width: 100%; margin-top: 0; display: grid; gap: 14px; }
.bd .sk-yg[data-gap]::before, .bd .sk-gapl { display: none; }
.bd .sk-y { font-size: 2.5rem; letter-spacing: -0.035em; padding-inline-start: 4px; }
.bd-main .sk-items { display: flex; flex-wrap: wrap; gap: 18px var(--g); }

/* ---------- Cards: image first ---------- */
.bd-card { position: relative; flex: 1 1 var(--cw); min-width: 0; container-type: inline-size; border-radius: 22px; background: var(--surface); overflow: clip; transition: background-color 220ms ease-out, transform 280ms var(--ease); }
.bd-in { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.bd-media { position: relative; }
.bd-img { border-radius: 0; }
.bd-img img { transition: transform 700ms var(--ease); }
.bd-img.flying { visibility: hidden; }
/* landmark: an accent star on the picture's corner, solid so it reads on any photo */
.bd-lm { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 1; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--acc); color: var(--ground); }
/* every card has the same skeleton: 2-line name, 3-line summary, footer pinned to the bottom */
.bd-txt { --lh-name: 1.25; --lh-s: 1.5; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; gap: 8px; padding: 16px 18px 16px; }
.bd-who { display: none; margin: 0; font-size: 0.9375rem; color: var(--acc); }
.bd-name { margin: 0; font-family: var(--f-geo); font-weight: 650; font-size: 1.25rem; line-height: var(--lh-name); letter-spacing: -0.012em; min-height: calc(2em * var(--lh-name)); }
html[lang="ar"] .bd-txt { --lh-name: 1.5; --lh-s: 1.65; }
html[lang="ar"] .bd-name { letter-spacing: 0; }
.bd-name > .bd-hit > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bd-hit { all: unset; display: block; cursor: pointer; }
.bd-hit::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bd-hit > span { text-decoration: underline wavy transparent; text-decoration-thickness: 1.5px; text-underline-offset: 6px; text-decoration-skip-ink: none; transition: text-decoration-color 240ms ease-out; }
.bd-s { margin: 0; color: var(--soft); font-size: 1rem; line-height: var(--lh-s); height: calc(3em * var(--lh-s)); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bd-foot { align-self: end; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
.bd-meta { flex: 1; min-width: 0; display: grid; gap: 1px; font-size: 0.8125rem; line-height: 1.35; }
.bd-meta > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-meta > span:first-child { color: var(--soft); }
.bd-meta > span + span { color: var(--dim); }
/* iteration count: Lucide layers icon in a pill */
.bd-iter { flex: none; height: 30px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--acc); transition: background-color 240ms ease-out, color 240ms ease-out; }
.bd-iter b { font-family: var(--f-geo); font-weight: 700; font-size: 0.875rem; line-height: 1; color: var(--paper); transition: color 240ms ease-out; }
/* Text card: the first version has no accurate picture, so the card is all text; the maker line and a longer summary fill it */
/* it keeps its own height beside a picture card instead of stretching into an empty middle */
.bd-card.is-text { align-self: flex-start; }
.bd-card.is-text .bd-in { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.bd-card.is-text .bd-txt { grid-template-rows: auto auto auto 1fr; gap: 10px; padding: 24px 22px 18px; }
.bd-card.is-text .bd-name { font-size: 1.5rem; line-height: 1.2; min-height: 0; padding-inline-end: 44px; }
.bd-card.is-text .bd-who { display: block; }
.bd-card.is-text .bd-s { height: auto; -webkit-line-clamp: 7; }
.bd-card.is-text .bd-lm { top: 22px; inset-inline-start: auto; inset-inline-end: 20px; }
.bd-lay { display: block; overflow: visible; }
.bd-lay path { transition: transform 360ms var(--ease); }

@container (min-width: 600px) {
  .bd-in { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .bd-media { height: 100%; }
  .bd-img { height: 100%; min-height: 340px; aspect-ratio: auto; }
  /* a wide frame would crop the object; show all of it on the matte instead */
  .bd-img img { object-fit: contain; padding: 6%; }
  .bd-txt { grid-template-rows: auto auto auto 1fr; padding: 28px 30px 24px; gap: 12px; }
  .bd-name { font-size: 1.5rem; line-height: 1.15; min-height: 0; }
  .bd-s { font-size: 1.125rem; height: auto; -webkit-line-clamp: 5; }
  .bd-who { display: block; }
}

@media (hover: hover) and (pointer: fine) {
  .bd-card:hover { background: var(--surface-hi); transform: translateY(-5px); }
  .bd-card:hover .bd-img img { transform: scale(1.06); }
  .bd-card:hover .bd-hit > span { text-decoration-color: var(--acc); }
  .bd-card:hover .bd-iter { background: var(--acc); color: var(--ground); }
  .bd-card:hover .bd-iter b { color: var(--ground); }
  .bd-card:hover .bd-lay .l1 { transform: translateY(-2px); }
  .bd-card:hover .bd-lay .l3 { transform: translateY(2px); }
}
.bd-card:has(.bd-hit:focus-visible) { background: var(--surface-hi); outline: 2px solid var(--acc); outline-offset: 3px; }
.bd-card:has(.bd-hit:focus-visible) .bd-hit > span { text-decoration-color: var(--acc); }
.bd-card:has(.bd-hit:active) { transform: scale(0.99); }

/* ---------- The filmstrip dialog ---------- */
.bd-dlg { width: min(1120px, calc(100vw - 48px)); max-width: none; max-height: calc(100svh - 48px); padding: 0; border: 0; border-radius: 28px; background: transparent; color: var(--paper); overflow: auto; overscroll-behavior: contain; scrollbar-width: none; }
.bd-dlg:focus { outline: none; }
.bd-ghost { position: fixed; z-index: 5; margin: 0; overflow: hidden; pointer-events: none; scale: none; filter: none; }
.bd-glayer { position: absolute; inset: 0; display: block; }
.bd-glayer img { display: block; width: 100%; height: 100%; box-sizing: border-box; }
.bd-fimg.waiting { visibility: hidden; }
.bd-dlg::backdrop { background: rgba(8, 6, 6, 0.62); }
/* The sheet is a dialog: it floats, so it keeps its shadow. */
.bd-sheet { position: relative; display: grid; gap: 34px; padding: 32px 32px 30px; border-radius: 28px; background: color-mix(in srgb, var(--ground), #fff 5%); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55); } /* taste-skill-ignore */
.bd-x { position: absolute; inset-inline-end: 20px; top: 20px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.09); cursor: pointer; }
.bd-x:hover { background: rgba(255, 255, 255, 0.16); }
.bd-x i::before, .bd-x i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 2px; margin: -1px 0 0 -7.5px; border-radius: 2px; background: var(--paper); transform: rotate(45deg); }
.bd-x i::after { transform: rotate(-45deg); }
/* the film's head is words only: the pictures all live in the strip below, first version included */
.bd-htxt { display: grid; gap: 10px; padding-inline-end: 56px; }
.bd-htxt h3 { margin: 0; font-family: var(--f-geo); font-weight: 700; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.05; letter-spacing: -0.03em; }
html[lang="ar"] .bd-htxt h3 { line-height: 1.4; letter-spacing: 0; }
.bd-sum { margin: 4px 0; color: var(--soft); font-size: 1rem; max-width: 60ch; text-wrap: pretty; }

.bd-film { display: grid; gap: 16px; margin-inline: -32px; }
.bd-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-inline: 32px; }
.bd-pills button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.07); cursor: pointer; font-size: 0.8125rem; transition: background-color 160ms ease-out, color 160ms ease-out; }
.bd-pills button:hover { background: rgba(255, 255, 255, 0.13); }
.bd-pills button[aria-current="true"] { background: var(--paper); color: var(--ground); }
.bd-strip { position: relative; list-style: none; margin: 0; padding: 6px 32px 18px; display: grid; grid-auto-flow: column; grid-auto-columns: 280px; gap: 22px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 32px; overscroll-behavior-x: contain; scrollbar-width: none; }
.bd-strip:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; border-radius: 12px; }
/* the line the frames hang from, drawn as a wave that scrolls with them */
.bd-strip::before { content: ""; position: absolute; inset-inline-start: 0; top: 10px; height: 12px; width: var(--strip-w, 100%); min-width: 100%; grid-row: 1; background: var(--faint); -webkit-mask: var(--wave) repeat-x 0 50% / 64px 12px; mask: var(--wave) repeat-x 0 50% / 64px 12px; }
.bd-fr { position: relative; display: grid; gap: 8px; align-content: start; scroll-snap-align: start; }
.bd-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--fa); border: 4px solid color-mix(in srgb, var(--ground), #fff 5%); margin-top: 5px; margin-inline-start: -4px; }
.bd-fy { font-family: var(--f-geo); font-weight: 700; font-size: 2.25rem; line-height: 1; letter-spacing: -0.035em; color: var(--fa); margin-top: 4px; }
.bd-fimg { border-radius: 14px; }
.bd-fr b { font-family: var(--f-geo); font-weight: 650; font-size: 1.0625rem; line-height: 1.25; margin-top: 4px; }
.bd-fr p { margin: 0; color: var(--soft); font-size: 0.9375rem; }
.bd-fr .bd-fwho { color: var(--fa); }
/* a frame's picture is a button that opens it full screen */
.bd-zbtn { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 14px; background: none; cursor: zoom-in; }
.bd-zbtn .sk-frame { pointer-events: none; }
.bd-zico { position: absolute; top: 10px; inset-inline-end: 10px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--ground) 72%, transparent); color: var(--paper); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transform: scale(0.9); transition: opacity 180ms ease-out, transform 220ms var(--ease); } /* taste-skill-ignore: a control floating on a photo */
.bd-zbtn:hover .bd-zico, .bd-zbtn:focus-visible .bd-zico { opacity: 1; transform: none; }
@media (hover: none) { .bd-zico { opacity: 1; transform: none; } }
.bd-zbtn img { transition: transform 600ms var(--ease); }
.bd-zbtn:hover img { transform: scale(1.04); }
.bd-fine { position: relative; padding-top: 18px; }
.bd-fine::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 10px; background: var(--faint); -webkit-mask: var(--wave) repeat-x 0 50% / 48px 10px; mask: var(--wave) repeat-x 0 50% / 48px 10px; }

@media (prefers-reduced-motion: no-preference) {
  .bd-dlg.enter .bd-fr { animation: bd-unroll 560ms var(--ease) backwards; animation-delay: calc(160ms + var(--i) * 60ms); }
  @keyframes bd-unroll { from { opacity: 0; transform: translateX(28px); } }
  html[dir="rtl"] .bd-dlg.enter .bd-fr { animation-name: bd-unroll-rtl; }
  @keyframes bd-unroll-rtl { from { opacity: 0; transform: translateX(-28px); } }
  .bd-dlg.enter .bd-pills, .bd-dlg.enter .bd-htxt { animation: bd-fade 420ms ease-out backwards 120ms; }
  @keyframes bd-fade { from { opacity: 0; transform: translateY(8px); } }
  .bd-dlg.enter::backdrop { animation: bd-dim 360ms ease-out; }
  .bd-dlg.leaving::backdrop { opacity: 0; transition: opacity 320ms ease-out; }
  @keyframes bd-dim { from { opacity: 0; } }
  .bd-strip { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .bd-card, .bd-img img { transition: none; }
}

@media (max-width: 1100px) {
  .bd { --cols: 2; }
  .bd .sk-dec { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .bd .sk-decn { position: static; }
  .bd .sk-decn span { font-size: 64px; }
}
@media (max-width: 900px) {
  .bd-eh { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 44px; }
  .bd-sig { max-width: 420px; }
  .bd .sk-y { font-size: 2rem; }
}
@media (max-width: 760px) {
  .bd { --squig-x: 0.6rem; }
  .bd-main { padding-inline: max(16px, var(--safe-l)) max(16px, var(--safe-r)); }
  .bd-eh { margin-inline: -16px; padding-inline: 18px; }
  /* each year swipes sideways, so a busy year costs one row of height */
  .bd .sk-yg { flex: 1 1 100%; width: 100%; }
  .bd .sk-decn span { font-size: 56px; }
  .bd-main .sk-items { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 4px 16px 10px; scroll-padding-inline: 16px; overscroll-behavior-x: contain; scrollbar-width: none; }
  .bd-card { flex: 0 0 82%; scroll-snap-align: start; }
  .bd-card:only-child { flex-basis: 100%; } /* a lone year has no neighbour to align with or swipe to */
  .bd-img { aspect-ratio: 3 / 2; }
  .bd-dlg { width: 100vw; max-height: 94svh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .bd-sheet { border-radius: 26px 26px 0 0; }
  .bd-sheet { padding: 22px 18px 28px; gap: 26px; }
  .bd-x { inset-inline-end: 14px; top: 14px; }
  .bd-htxt { padding-inline-end: 44px; }
  .bd-film { margin-inline: -18px; }
  .bd-pills { padding-inline: 18px; }
  .bd-strip { padding-inline: 18px; grid-auto-columns: 78vw; scroll-padding-inline: 18px; }
}

/* ===== Full-screen picture viewer ===== */
.bd-zoom { position: fixed; inset: 0; width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 8, 7, 0.9); -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2); color: var(--paper); overflow: hidden; }
.bd-zoom::backdrop { background: transparent; }
.bd-zoom[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; animation: bd-zfade 220ms ease-out; }

/* one track sized by the stage, not by the picture, so the picture's 100% height means the stage's height */
.bd-zstage { position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; min-height: 0; padding: 72px var(--pad) 16px; overflow: hidden; overscroll-behavior: contain; }
/* the whole picture fits the screen at once, softened while only the small copy is in, then sharpens in place */
.bd-zimg { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; cursor: zoom-in; animation: bd-zin 320ms var(--ease); transition: filter 360ms ease-out; }
.bd-zoom.is-loading .bd-zimg { filter: blur(3px); }
.bd-zimg:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; }
/* full size: the picture keeps its natural pixels and the stage scrolls */
.bd-zstage.is-zoomed { display: block; padding: 0; overflow: auto; cursor: zoom-out; }
.bd-zstage.is-zoomed .bd-zimg { width: auto; height: auto; max-width: none; margin: auto; cursor: zoom-out; animation: none; }

/* loading a sharper copy: a thin accent line sweeps under the picture */
.bd-zoom.is-loading .bd-zstage::after { content: ""; position: absolute; left: 0; bottom: 0; width: 32%; height: 2px; border-radius: 2px; background: var(--acc); animation: bd-zload 1.1s var(--ease-io) infinite; }

.bd-zbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px var(--pad) max(20px, env(safe-area-inset-bottom, 0px)); background: rgba(20, 16, 14, 0.55); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.bd-zcap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; min-width: 0; }
.bd-zyear { font-family: var(--f-geo); font-weight: 700; font-size: 1.25rem; color: var(--acc); font-variant-numeric: tabular-nums; }
.bd-zname { font-family: var(--f-geo); font-weight: 600; font-size: 1.0625rem; }
.bd-zcredit { flex-basis: 100%; color: var(--dim); font-size: 0.8125rem; }
.bd-zcredit a { color: inherit; }
.bd-zcredit:empty { display: none; }

.bd-zctl { display: flex; align-items: center; gap: 12px; flex: none; }
.bd-zctl[hidden] { display: none; }
.bd-zcount { min-width: 4ch; text-align: center; color: var(--dim); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.bd-zstep { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.09); color: var(--paper); cursor: pointer; transition: background-color 160ms ease-out, transform 160ms ease-out; }
.bd-zstep:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.bd-zstep:active:not(:disabled) { transform: scale(0.94); }
.bd-zstep:disabled { opacity: 0.3; cursor: default; }
.bd-zstep:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.bd-zstep.is-next svg { transform: scaleX(-1); }
html[dir="rtl"] .bd-zstep svg { transform: scaleX(-1); }
html[dir="rtl"] .bd-zstep.is-next svg { transform: none; }

.bd-zx { position: fixed; top: max(16px, var(--safe-t)); inset-inline-end: var(--pad); width: 44px; height: 44px; z-index: 3; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

@keyframes bd-zfade { from { opacity: 0; } }
@keyframes bd-zin { from { opacity: 0; transform: scale(0.97); } }
@keyframes bd-zload { from { translate: -100% 0; } to { translate: 320% 0; } }

@media (max-width: 640px) {
  .bd-zstage { padding: 64px 12px 12px; }
  .bd-zbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .bd-zctl { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .bd-zoom[open], .bd-zimg { animation: none; }
  .bd-zoom.is-loading .bd-zstage::after { animation: none; left: 34%; }
  .bd-zstep { transition: none; }
}

/* ===== Insights: the timeline's Bands look applied to the charts =====
   Same ground, Alan Sans, wavy dividers and rounded borderless surfaces as the timeline.
   Two series at most: hardware in warm paper, software in the era accent. Colours follow the era
   because the view and its tooltip live inside the page root (.sk), which carries --ground and --acc.
   insights.js sizes charts for a 16px grid gap and 20px card padding; keep those two in step with it. */
#view-insights {
  --bg: rgba(255, 255, 255, 0.04); --surface: color-mix(in srgb, var(--ground), #fff 5%); --raised: rgba(255, 255, 255, 0.07);
  --fg: var(--paper); --muted: var(--dim); --accent: var(--acc);
  --radius: 24px; --fs-body: 1rem; --fs-small: 0.875rem; --font-body: var(--f-ui);
  --c-hw: #CFC4B4; --c-sw: var(--acc); --c-grid: rgba(239, 237, 232, 0.07); --c-axis: rgba(239, 237, 232, 0.2);
  --track: rgba(239, 237, 232, 0.16); --ink: var(--paper);
  --card-pad: 28px; --grid-gap: 16px;
  color: var(--fg); font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.55; color-scheme: dark;
}
.ins { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--grid-gap); padding-block: 0 24px; }

/* ---------- Header: the timeline intro's voice, closed by the bold wave ---------- */
.ins-head { display: grid; gap: 16px; padding: 7vh 0 34px; }
.ins-head h2 { margin: 0; font-family: var(--f-geo); font-weight: 700; font-size: clamp(2.5rem, 5.4vw, 4.75rem); line-height: 0.98; letter-spacing: -0.035em; max-width: 16ch; text-wrap: balance; }
html[lang="ar"] .ins-head h2 { line-height: 1.3; letter-spacing: 0; }
.ins-head p { margin: 0; font-size: 1.125rem; line-height: 1.6; color: var(--dim); max-width: 52ch; }
.ins-head::after { content: ""; height: 14px; width: min(100%, 520px); margin-top: 18px; background: var(--acc); opacity: 0.85; -webkit-mask: var(--wave-bold) repeat-x 0 0 / 120px 14px; mask: var(--wave-bold) repeat-x 0 0 / 120px 14px; }

/* ---------- KPIs: label at the top, the number set like the year numerals at the foot ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 152px; padding: 22px 24px 24px; border-radius: var(--radius); background: var(--surface); }
.kpi span { font-size: 0.9375rem; line-height: 1.4; color: var(--dim); max-width: 22ch; }
.kpi b { display: block; font-family: var(--f-geo); font-weight: 700; font-size: clamp(2.5rem, 3.8vw, 3.75rem); line-height: 0.95; letter-spacing: -0.04em; color: var(--paper); text-align: start; }
html[dir="rtl"] .kpi b { text-align: end; }
.kpi:first-child b { color: var(--acc); }

/* ---------- Chart cards ---------- */
.ins-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--grid-gap); align-items: stretch; }
.card { margin: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; padding: 30px var(--card-pad) 28px; border-radius: var(--radius); background: var(--surface); }
.card.wide { grid-column: 1 / -1; }
.card figcaption { display: grid; gap: 6px; }
.card h3 { margin: 0; font-family: var(--f-geo); font-weight: 700; font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.015em; }
html[lang="ar"] .card h3 { line-height: 1.5; letter-spacing: 0; }
.card .take { margin: 0; max-width: 62ch; color: var(--dim); text-wrap: pretty; }

/* ---------- Charts ---------- */
.viz { direction: ltr; width: 100%; }
.viz svg { display: block; overflow: visible; }
.viz > svg { max-width: 100%; height: auto; }
.viz text { font-family: var(--f-ui); font-size: 12px; fill: var(--dim); font-variant-numeric: tabular-nums; }
.viz .lbl { fill: var(--paper); font-weight: 600; }
.viz .lbl.big { font-family: var(--f-geo); font-size: 15px; font-weight: 700; }
.viz .grid { stroke: var(--c-grid); stroke-width: 1; }
.viz .axis { stroke: var(--c-axis); stroke-width: 1; }
.viz .ref { stroke: var(--c-axis); stroke-width: 1; }
.viz [data-tip] { cursor: default; }
.viz [data-tip]:focus { outline: none; }
.viz [data-tip] :is(path, rect:not([fill="transparent"])) { transition: opacity 160ms ease-out; }
.viz svg:hover [data-tip]:not(:hover) :is(path, rect:not([fill="transparent"])) { opacity: 0.55; }
.viz [data-tip]:focus-visible :is(path, rect:not([fill="transparent"])) { outline: 2px solid var(--acc); }
/* point markers appear on hover only */
.viz .pt { opacity: 0; transition: opacity 120ms ease-out; }
.viz [data-tip]:hover .pt, .viz [data-tip]:focus .pt { opacity: 1; }
.scroll-x { overflow-x: auto; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font-size: var(--fs-small); color: var(--dim); }
.keys span { display: inline-flex; align-items: center; gap: 8px; }
.sw-key { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.keys.scale { gap: 10px; }
.keys .ramp { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 16%, var(--surface)), var(--accent)); } /* taste-skill-ignore: the heatmap's own sequential scale key */
html[dir="rtl"] .keys .ramp { transform: scaleX(-1); }

/* ---------- The peak decade's landmarks, as a row of short chips ---------- */
.lm-row { display: grid; gap: 12px; padding-top: 6px; }
.lm-row h4 { margin: 0; font-family: var(--f-geo); font-weight: 600; font-size: 1rem; color: var(--paper); }
.lm-row ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lm-row li { display: inline-flex; align-items: baseline; gap: 8px; height: 34px; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--raised); font-size: 0.875rem; color: var(--soft); white-space: nowrap; }
.lm-row li b { font-weight: 600; color: var(--acc); font-variant-numeric: tabular-nums; }
.lm-row li.more { background: none; color: var(--dim); }

/* screen-reader copy of each chart's numbers */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Tooltip: it floats over the charts, so it is the one surface that casts a shade ---------- */
#tip { position: fixed; z-index: 50; max-width: 260px; padding: 10px 12px; border-radius: 12px; background: rgba(20, 15, 12, 0.94); color: var(--paper); font-family: var(--f-ui); font-size: 0.8125rem; pointer-events: none; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); } /* taste-skill-ignore */
#tip .tv { font-weight: 600; font-size: 0.9375rem; }
#tip .tr { display: flex; align-items: center; gap: 6px; color: var(--dim); }
#tip .tk { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
/* the series keys inside the tooltip resolve against the same chart colours */
#tip { --c-hw: #CFC4B4; --c-sw: var(--acc); --accent: var(--acc); --ink: var(--paper); }

/* ---------- Entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  #view-insights:not([data-drawn]) :is(.ins-head > *, .kpi, .card) { animation: sk-reveal 640ms var(--ease) backwards; }
  .ins-head > :nth-child(2) { animation-delay: 70ms; }
  .kpi:nth-child(1) { animation-delay: 140ms; }
  .kpi:nth-child(2) { animation-delay: 190ms; }
  .kpi:nth-child(3) { animation-delay: 240ms; }
  .kpi:nth-child(4) { animation-delay: 290ms; }
  .card { animation-delay: 340ms; }
}

@media (max-width: 900px) {
  .ins-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { min-height: 120px; padding: 16px 18px 18px; gap: 14px; }
  .kpi span { font-size: 0.8125rem; }
  .kpi b { font-size: 2.25rem; }
  .card { padding: 22px 16px 20px; border-radius: 20px; gap: 16px; }
}

/* ===== Static pages: one page per invention, and the plain timeline crawlers read before the app takes over.
   They reuse the kit tokens and the film sheet, so an invention page looks like the film opened on the timeline. ===== */

/* The plain timeline is for crawlers and readers without scripts; with scripts the app replaces it. */
.js #app > .st-plain { display: none; }

.st-head { position: relative; }
.st-head .sk-tools { margin-inline-start: auto; }
.st .sk-lang, .st .sk-cta { text-decoration: none; }
.st-main { width: min(1120px, 100%); margin: 0 auto; padding: 8px var(--pad) 72px; display: grid; gap: 28px; }
.st-main > * { min-width: 0; } /* grid items may shrink, so the breadcrumb truncates instead of overflowing */

/* ---------- One invention ---------- */
.st-crumbs ol { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--dim); }
.st-crumbs li { white-space: nowrap; }
.st-crumbs li[aria-current] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.st-crumbs li + li::before { content: "›"; margin-inline-end: 8px; }
html[dir="rtl"] .st-crumbs li + li::before { content: "‹"; }
.st-crumbs a { color: var(--paper); }
.st-sheet { box-shadow: none; }
.st .bd-htxt { padding-inline-end: 0; }
.st .bd-htxt h1 { margin: 0; font-family: var(--f-geo); font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
html[lang="ar"] .st .bd-htxt h1 { line-height: 1.4; letter-spacing: 0; }
.st .bd-pills a { height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); font-size: 0.8125rem; text-decoration: none; transition: background-color 160ms ease-out; }
.st .bd-pills a:hover { background: rgba(255, 255, 255, 0.13); }
.st .bd-strip { scroll-behavior: smooth; }
.st .bd-fr h2.st-fname { margin: 4px 0 0; font-family: var(--f-geo); font-weight: 650; font-size: 1.0625rem; line-height: 1.25; }
.st .bd-fr .credit { font-size: 0.8125rem; color: var(--dim); overflow-wrap: anywhere; }
.st .bd-zbtn { text-decoration: none; }
.st-acts { margin: 0; }
.st-near { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.st-near a { display: grid; gap: 4px; padding: 18px 20px; border-radius: 18px; background: var(--surface); text-decoration: none; transition: background-color 160ms ease-out; }
.st-near a:hover { background: var(--surface-hi); }
.st-near a span:first-child { font-size: 0.8125rem; color: var(--dim); }
.st-near a b { font-family: var(--f-geo); font-weight: 650; }
.st-near-later { grid-column: 2; text-align: end; }

/* ---------- The plain timeline ---------- */
.st-plain h1 { margin: 24px 0 0; font-family: var(--f-geo); font-weight: 700; font-size: clamp(2.5rem, 4.6vw, 4.75rem); line-height: 1.02; letter-spacing: -0.035em; }
.st-lede { margin: 0; max-width: 46ch; font-size: 1.125rem; color: var(--dim); }
.st-era h2 { margin: 24px 0 12px; font-family: var(--f-geo); font-weight: 700; font-size: 1.75rem; }
.st-era h2 span { color: var(--acc); font-size: 1rem; }
.st-list { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.st-list h3 { margin: 0; font-size: 1.125rem; }
.st-list p { margin: 2px 0 0; color: var(--soft); max-width: 70ch; }
.st-list .st-y { color: var(--dim); font-size: 0.875rem; }

@media (max-width: 760px) {
  .st-main { padding-inline: 16px; }
  .st-sheet { margin-inline: -16px; border-radius: 0; }
  .st-near { grid-template-columns: minmax(0, 1fr); }
  .st-near-later { grid-column: 1; }
}
