.museum-hero { padding: 48px; margin-bottom: 28px; background-image: linear-gradient(transparent 31px, #ffffff07 32px); background-size: 100% 32px; }
.museum-hero .eyebrow { color: var(--chalk-accent); }
.museum-hero h1 { color: var(--chalk); font-size: clamp(36px, 5vw, 60px); line-height: 1.06; max-width: 14em; margin-bottom: 16px; }
.museum-hero > p:not(.eyebrow):not(.crumb) { color: var(--chalk-muted); max-width: 44em; }
.museum-hero .crumb, .museum-hero .crumb a { color: var(--chalk-muted); }
.problem-hero .chip { margin-bottom: 12px; }
.problem-question { font: italic 400 21px/1.45 var(--serif); color: var(--chalk) !important; }
.problem-status { font-size: 14px; }

.museum-tally { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 22px; padding: 18px 20px; border-radius: 14px; background: var(--board-raised); width: fit-content; max-width: 100%; }
.tally-squares { display: flex; gap: 8px; }
.tally { display: block; width: 26px; height: 26px; border-radius: 3px; border: 2px solid var(--chalk-muted); }
.tally-solved { background: var(--chalk); border-color: var(--chalk); }
.tally-claimed { background: var(--chalk-accent); border-color: var(--chalk-accent); }
.tally-ratio { margin: 0; color: var(--chalk-muted); font-size: 14px; }
.tally-ratio strong { display: block; font: 400 34px/1.05 var(--serif); color: var(--chalk); letter-spacing: -.02em; }
.tally-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0 0; font-size: 12px; color: var(--chalk-muted); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; border: 1.5px solid var(--chalk-muted); margin-left: 6px; }
.key:first-child { margin-left: 0; }
.key-solved { background: var(--chalk); border-color: var(--chalk); }
.key-claimed { background: var(--chalk-accent); border-color: var(--chalk-accent); }

.mode-toggle, .level-toggle, .filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mode-toggle { margin-top: 24px; padding: 4px; border-radius: 12px; background: var(--board-raised); width: fit-content; }
.mode-toggle button { min-height: 44px; padding: 8px 20px; border: 0; border-radius: 9px; background: transparent; color: var(--chalk-muted); font-size: 14px; font-weight: 600; }
.mode-toggle button[aria-pressed="true"] { background: var(--chalk); color: var(--board); }

.exhibit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.exhibit-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px; min-height: 280px; background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--radius); color: var(--ink); transition: transform .18s, border-color .18s; }
.exhibit-card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.exhibit-card.marked { border-top: 3px solid var(--accent); }
.exhibit-card .chip { align-self: flex-start; }
.exhibit-number { position: absolute; top: 20px; right: 22px; font: italic 400 30px/1 var(--serif); color: var(--hair-strong); }
.exhibit-card h3 { margin: 0; font: 400 23px/1.25 var(--serif); letter-spacing: -.02em; padding-right: 36px; }
.exhibit-card p { margin: 0; font-size: 14px; color: var(--muted); }
.exhibit-latest { margin-top: auto !important; padding-top: 12px; border-top: 1px dashed var(--hair); }
.exhibit-latest span { font-family: var(--mono); color: var(--accent); margin-right: 6px; }
.exhibit-go { font-size: 13px; color: var(--accent); }
.museum-rules { margin-top: 20px; }

.exhibit-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.exhibit-panel { padding: 26px; background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--radius); min-width: 0; }
.exhibit-panel.wide { grid-column: 1 / -1; }
.exhibit-panel h3 { font: 400 22px/1.3 var(--serif); margin-bottom: 14px; }
.exhibit-panel ul { margin: 0; padding-left: 18px; }
.exhibit-panel li { margin-bottom: 10px; font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.exhibit-panel p { font-size: 15px; color: var(--ink-soft); overflow-wrap: anywhere; }
.board-panel { background: var(--board); color: var(--chalk); border-color: var(--board); }
.board-panel h3, .board-panel strong { color: var(--chalk); }
.board-panel p, .board-panel li { color: var(--chalk-muted); }
.board-panel a { color: var(--chalk-accent); }
.claim-list { list-style: none; padding: 0 !important; }
.claim-list li { padding: 12px 0; border-bottom: 1px dashed var(--board-line); }
.grade-line { font: 12px/1.6 var(--mono); color: var(--chalk-accent); }
.muted-chalk { color: var(--chalk-muted); font-size: 12px; }
.level-toggle { margin-bottom: 16px; }
.level-toggle button, .filter-chips button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--hair-strong); border-radius: 999px; background: var(--sheet); font-size: 13px; color: var(--ink-soft); }
.level-toggle button[aria-pressed="true"], .filter-chips button[aria-pressed="true"] { background: var(--board); border-color: var(--board); color: var(--chalk); }
.level-text p { font: 400 18px/1.7 var(--serif); color: var(--ink); max-width: 68ch; }
.level-text + .level-text { margin-top: 18px; }
.level-name { font: 600 11px/1.4 var(--sans) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--accent) !important; margin-bottom: 6px; }
.js-museum .level-name { display: none; }

.filter-chips { margin-bottom: 28px; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 128px; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 104px; width: 2px; background: linear-gradient(var(--hair-strong), var(--hair-strong) 92%, transparent); }
.era { margin: 36px 0 18px -128px; }
.era:first-child { margin-top: 0; }
.era span { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--board); color: var(--chalk); font: italic 400 17px/1.3 var(--serif); }
.event { position: relative; margin-bottom: 18px; }
.event::before { content: ""; position: absolute; left: -30px; top: 22px; width: 12px; height: 12px; border-radius: 2px; background: var(--sheet); border: 2px solid var(--hair-strong); }
.event-date { position: absolute; left: -128px; top: 17px; width: 86px; text-align: right; font: 13px/1.4 var(--mono); color: var(--muted); }
.event-card { padding: 18px 22px; background: var(--sheet); border: 1px solid var(--hair); border-radius: 12px; max-width: 720px; }
.event-card h3 { margin: 0 0 8px; font: 400 20px/1.3 var(--serif); }
.event-card p { margin: 0 0 8px; font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.event-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px !important; }
.event-kind { padding: 2px 8px; border-radius: 4px; background: var(--flat-bg); color: var(--flat); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.event-links { font-size: 13px !important; margin: 0 !important; }
.kind-ai::before { background: var(--accent); border-color: var(--accent); }
.kind-ai .event-card { border-left: 3px solid var(--accent); }
.kind-ai .event-kind { background: var(--accent-soft); color: var(--accent-strong); }
.kind-prize::before { background: var(--ok); border-color: var(--ok); }
.kind-prize .event-kind { background: var(--ok-bg); color: var(--ok); }
.kind-barrier .event-kind, .kind-dispute .event-kind { background: var(--bad-bg); color: var(--bad); }
.kind-formulation::before { background: var(--board); border-color: var(--board); }
.kind-formulation .event-kind { background: var(--board); color: var(--chalk); }
.kind-formal .event-kind { background: var(--warn-bg); color: var(--warn); }
.event-next .event-card { border-style: dashed; background: transparent; }
.era-next span { background: transparent; color: var(--accent); border: 1px dashed var(--accent); }
.museum-neighbours { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--hair); }
.museum-neighbours a { display: inline-flex; align-items: center; min-height: 44px; font: 400 17px/1.3 var(--serif); }

.js-museum .event.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js-museum .event.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .museum-hero { padding: 28px 22px; border-radius: 18px; }
  .museum-hero h1 { font-size: 36px; }
  .problem-question { font-size: 18px; }
  .exhibit-layout { grid-template-columns: minmax(0, 1fr); }
  .exhibit-card, .exhibit-panel { padding: 20px; min-height: 0; }
  .timeline { padding-left: 28px; }
  .timeline::before { left: 6px; }
  .era { margin-left: -28px; }
  .event::before { left: -28px; }
  .event-date { position: static; width: auto; text-align: left; margin-bottom: 6px; }
  .level-text p { font-size: 17px; }
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .filter-chips::-webkit-scrollbar { display: none; }
  .filter-chips button { flex: none; }
  .museum-tally { padding: 16px; gap: 12px 18px; }
  .tally-squares { gap: 6px; }
  .tally { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .js-museum .event.reveal { opacity: 1; transform: none; }
}
