:root {
  color-scheme: light;
  --ink:#24201d; --muted:#5e5148; --accent:#a83b04; --accent-bright:#f58927;
  --page:#fff4df; --panel:#fffdf8; --border:#a65722; --soft:#f4d4ac;
  --focus:#195b9d; --radius:8px; --space:1rem;
  font-family: system-ui, sans-serif; color:var(--ink); background:var(--page);
}
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; display:flex; flex-direction:column; background-image:linear-gradient(90deg,#ffedce 1px,transparent 1px),linear-gradient(#ffedce 1px,transparent 1px); background-size:16px 16px; }
a { color:var(--accent); text-underline-offset:.15em; overflow-wrap:anywhere; }
a:hover { text-decoration-thickness:2px; }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.skip-link { position:absolute; left:-9999px; }
.skip-link:focus { left:1rem; top:1rem; background:var(--panel); padding:1rem; z-index:5; }
.site-header { background:var(--panel); border-bottom:4px solid var(--border); padding:1rem max(1rem,calc((100vw - 68rem)/2)); box-shadow:0 3px 0 var(--soft); }
.brand { display:inline-flex; align-items:center; gap:.75rem; font-size:1.6rem; font-weight:850; color:var(--ink); text-decoration:none; letter-spacing:-.04em; }
.brand::before { content:""; width:32px; height:32px; flex:none; background:linear-gradient(135deg,var(--panel) 0 48%,var(--accent-bright) 48% 100%); border:3px solid var(--ink); border-radius:2px; box-shadow:3px 3px 0 var(--accent-bright); transform:rotate(-4deg); }
.site-header nav { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:1rem; }
.site-header nav a { min-height:44px; display:inline-flex; align-items:center; padding:.45rem .9rem; border:2px solid var(--border); border-radius:var(--radius); background:linear-gradient(#fffdf8,#f9dfba); color:var(--ink); font-weight:650; text-decoration:none; box-shadow:0 2px 0 var(--soft); }
.site-header nav a[aria-current=page] { color:#fff; background:var(--accent); border-color:var(--accent); box-shadow:0 2px 0 var(--border); }
.site-header nav a:hover { border-color:var(--ink); }
.site-main { flex:1; width:min(100%,68rem); margin:0 auto; padding:1.5rem 1rem; }
.panel { background:var(--panel); border:2px solid var(--border); border-radius:var(--radius); box-shadow:4px 4px 0 var(--soft); padding:clamp(1rem,3vw,2rem); line-height:1.65; overflow-wrap:anywhere; }
.panel h1 { margin:0 0 1rem; line-height:1.2; font-size:clamp(1.7rem,4vw,2.6rem); border-bottom:4px double var(--border); padding-bottom:.6rem; }
.panel h2 { font-size:1.3rem; margin:1.5rem 0 .5rem; color:var(--ink); border-left:6px solid var(--accent-bright); padding-left:.6rem; }
.panel p { max-width:75ch; }
.panel ul,.panel ol { padding-inline-start:1.5rem; }
.panel li { margin-block:.5rem; }
.panel li p { color:var(--muted); margin:.3rem 0 .8rem; }
input,select,button { font:inherit; color:var(--ink); padding:.5rem; border:2px solid var(--border); border-radius:var(--radius); background:var(--panel); max-width:100%; }
button { min-height:44px; cursor:pointer; background:var(--accent); color:white; }
footer { background:var(--panel); border-top:2px solid var(--border); color:var(--muted); text-align:center; padding:1rem; font-size:.875rem; }
@media(max-width:480px) { .site-header { padding:.75rem; } .site-header nav { gap:.4rem; } .site-header nav a { flex:1 1 7rem; justify-content:center; } .site-main { padding:1rem .6rem; } .panel { padding:.9rem; box-shadow:2px 2px 0 var(--soft); } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }

/* Museum landing page */
.museum-intro { font-size:1.15rem; }
.museum-feature { border:2px solid var(--border); background:linear-gradient(135deg,var(--panel),#ffe3b8); padding:1rem; border-radius:var(--radius); }
.museum-feature h2 { margin-top:0; }
.panel .museum-grid { list-style:none; padding:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap:.8rem; }
.museum-grid li { margin:0; padding:.75rem; border:1px solid var(--border); border-radius:var(--radius); background:var(--panel); min-width:0; }
.museum-grid h3,.museum-eras h3 { margin:0; font-size:1.05rem; }
.museum-grid a,.museum-feature a { display:inline-flex; min-height:44px; align-items:center; }
.museum-eras li { padding:.4rem 0; }

/* Long-form reading */
.article-crumbs { font-size:.9rem; margin-bottom:1rem; }
.article-toc { border:1px solid var(--border); border-radius:var(--radius); padding:.8rem; max-width:75ch; background:#fff4df; }
.article-toc h2 { margin-top:0; }
.article-prose { max-width:75ch; }
.article-prose h2,[id^="source-"],#article-sources,#article-relationships { scroll-margin-top:1rem; }
[id^="source-"]:target,.article-prose h2:target { background:var(--soft); }
.article-prose a[href^="#source-"] { font-weight:650; white-space:nowrap; }

/* Topic browsing */
.panel .topic-cards{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:1rem}.topic-cards li{border:1px solid var(--border);padding:1rem;border-radius:var(--radius);min-width:0}.topic-cards h2{margin:0}.topic-cards a{display:inline-flex;min-height:44px;align-items:center}

/* Original visual collection */
.panel figure{margin:1.5rem 0;padding:1rem;border:1px solid var(--border);border-radius:var(--radius)}.panel figure img{display:block;max-width:100%;height:auto;margin:auto}.panel figcaption{margin-top:1rem;max-width:75ch}
