* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--bg-main); color:var(--text-main); font:14px/1.6 var(--font-body); }
[hidden] { display:none !important; }
button, input, select { font:inherit; }
button, select { cursor:pointer; }
a { color:inherit; text-underline-offset:4px; }
:focus-visible { outline:3px solid var(--accent-dark); outline-offset:4px; }
.skip-link { position:absolute; top:-100px; left:20px; z-index:30; background:white; padding:12px; }
.skip-link:focus { top:12px; }
.top-note { text-align:center; padding:8px 16px; color:#f7f0e6; background:#252321; font-size:9px; letter-spacing:.12em; }
.topbar { max-width:1320px; margin:auto; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:28px 40px; }
.logo { text-decoration:none; display:block; }
.logo img { display:block; width:210px; height:auto; }
.logo span { display:block; font-size:9px; letter-spacing:.1em; margin-top:6px; color:var(--text-muted); }
.topbar nav { display:flex; gap:30px; font-size:13px; }
.topbar nav a { text-decoration:none; }
.topbar nav a:hover { color:var(--accent-dark); }
.shell { max-width:1320px; margin:auto; padding:12px 40px 50px; }
.hero { display:grid; grid-template-columns:1.5fr 1fr; gap:50px; align-items:center; min-height:300px; padding:36px 50px; background:#eee6dc; border:1px solid #e2d6c7; }
.eyebrow { margin-bottom:16px; font-size:10px; font-weight:600; letter-spacing:.17em; text-transform:uppercase; color:var(--accent-dark); }
.hero h1 { font:400 clamp(38px,4.7vw,62px)/1.08 var(--font-title); letter-spacing:-.035em; margin:0 0 22px; }
.hero h1 em { color:var(--accent-dark); font-weight:400; }
.hero p { font-size:14px; color:#686057; line-height:1.85; max-width:48ch; margin:0; }
.hero-art { height:246px; display:flex; align-items:center; justify-content:center; }
.hero-art img { max-width:100%; height:100%; object-fit:contain; mix-blend-mode:multiply; }
.metrics { display:flex; align-items:center; gap:52px; padding:30px 0; margin-bottom:12px; border-bottom:1px solid var(--border); }
.metric strong { display:block; font:400 28px/1.3 var(--font-title); color:var(--accent-dark); }
.metric span { font-size:11px; color:var(--text-muted); }
.content { display:grid; grid-template-columns:205px minmax(0,1fr); gap:30px; padding-top:22px; }
.panel { background:#f2ede6; border:1px solid #e4dbcf; padding:20px 14px; align-self:start; position:sticky; top:16px; }
.panel h3 { font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:#62584e; margin:0 0 14px; font-weight:600; }
.section { padding-bottom:20px; margin-bottom:20px; border-bottom:1px solid #ded5c9; }
.section:last-child { margin:0; padding:0; border:0; }
.filterbtn { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; border:1px solid transparent; padding:10px 11px; background:transparent; color:#686057; text-align:left; margin:3px 0; font-size:12px; }
.filterbtn:hover { background:#e8dfd3; }
.filterbtn.active { background:#8d6c49; color:white; }
.filterbtn .small { font-size:10px; }
.sidebar-label { font-size:11px; color:var(--text-muted); line-height:1.8; margin-bottom:0; }
.main { min-width:0; scroll-margin-top:20px; }
.toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:20px; }
.toolbar h2 { font:400 31px/1.2 var(--font-title); margin:0; }
.toolbar p { color:var(--text-muted); margin:7px 0 0; font-size:12px; }
.sort { border:1px solid #d8cfc2; background:#fffdf9; border-radius:3px; padding:11px; color:#645b51; max-width:170px; min-height:44px; }
.searchbar { display:flex; align-items:center; gap:13px; padding:0 16px; min-height:56px; background:#fffdf9; border:1px solid #cdbfae; border-radius:3px; margin-bottom:20px; }
.searchbar:focus-within { outline:2px solid var(--accent-dark); outline-offset:2px; }
.searchbar svg { color:var(--accent-dark); flex-shrink:0; }
.searchbar input { flex:1; border:0; min-width:0; color:var(--text-main); background:transparent; min-height:54px; outline:none; }
.searchbar input::placeholder { color:#82796e; }
.clear { border:0; background:transparent; font-size:11px; color:var(--accent-dark); padding:10px 0; }
.chips { display:flex; gap:7px; flex-wrap:wrap; margin-bottom:20px; }
.chip { background:transparent; border:1px solid #d9cfc1; border-radius:3px; padding:8px 11px; color:#6d6257; font-size:11px; }
.chip.active { background:#252321; border-color:#252321; color:white; }
.resultcount { display:flex; justify-content:space-between; align-items:center; gap:14px; color:var(--text-muted); font-size:11px; margin:0 0 14px; }
.cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; }
.item { background:#fffdf9; border:1px solid #dfd6ca; border-radius:4px; min-height:242px; padding:20px; display:flex; flex-direction:column; cursor:pointer; }
.item:hover, .item:focus-visible { border-color:var(--accent-dark); box-shadow:0 8px 22px rgba(65,47,28,.07); }
.card-head { display:flex; justify-content:space-between; gap:8px; align-items:center; margin-bottom:19px; }
.number { display:inline-block; background:#f2eadd; color:#765837; border-left:4px solid var(--sheet-color,#b69368); padding:6px 10px; font:400 20px/1.1 var(--font-title); min-width:55px; text-align:center; white-space:nowrap; }
.gender { font-size:9px; color:var(--text-muted); }
.item h3 { font-size:12px; line-height:1.7; margin:0 0 10px; font-weight:600; overflow-wrap:anywhere; }
.group { display:inline-block; align-self:flex-start; color:#76674f; font-size:11px; line-height:1.7; }
.group::before { content:""; display:inline-block; width:7px; height:7px; margin-right:7px; border-radius:50%; background:var(--sheet-color,#b69368); border:1px solid rgba(0,0,0,.12); }
.card-bottom { margin-top:auto; padding-top:20px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; }
.source { font-size:10px; color:var(--text-muted); }
.more { font-size:10px; color:var(--accent-dark); }
.empty { border:1px dashed #cdbfae; text-align:center; padding:55px 24px; color:var(--text-muted); grid-column:1/-1; }
.empty h3 { color:var(--text-main); font:400 26px var(--font-title); }
.pager { display:flex; gap:14px; justify-content:center; align-items:center; margin:28px 0; font-size:12px; }
.pager button { border:1px solid #d8cfc2; background:#fffdf9; border-radius:3px; padding:10px 14px; color:#665844; }
.pager button:disabled { opacity:.45; cursor:default; }
.footer { margin-top:48px; padding-top:28px; border-top:1px solid #dbd1c4; display:flex; justify-content:space-between; align-items:center; gap:20px; font-size:11px; color:var(--text-muted); }
.footer-brand { font:400 28px var(--font-title); color:var(--text-main); text-decoration:none; }
.footer p { margin:0; }
.dialog { background:#fffdf9; color:var(--text-main); border:1px solid #d3c5b2; border-radius:5px; max-height:90vh; overflow:auto; width:min(740px,calc(100% - 32px)); padding:32px; box-shadow:0 25px 80px rgba(0,0,0,.2); }
.dialog::backdrop { background:rgba(37,35,33,.5); }
.dialogtop { display:flex; justify-content:space-between; align-items:start; gap:18px; }
.dialog h2 { font:400 29px/1.25 var(--font-title); margin:15px 0 12px; overflow-wrap:anywhere; }
.dialog .eyebrow { letter-spacing:.04em; }
.close { border:1px solid #ddd1c1; background:#f2ece3; border-radius:50%; height:40px; width:40px; font-size:24px; flex-shrink:0; color:var(--text-main); }
.noteboxes { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:26px; }
.notebox { border-top:2px solid #b69368; background:#f1ebe2; padding:16px; }
.notebox b { font-size:10px; color:#7b5b36; letter-spacing:.08em; text-transform:uppercase; }
.notebox p { font-size:12px; line-height:1.9; margin:10px 0 0; color:#5f574d; overflow-wrap:anywhere; }
.details { padding-top:18px; line-height:1.9; color:#665d52; }
.details strong { color:var(--text-main); }
.sourceinfo { margin-top:24px; padding-top:17px; border-top:1px solid var(--border); font-size:10px; color:var(--text-muted); overflow-wrap:anywhere; }
.script-note { text-align:center; padding:20px; }
.no-scroll { overflow:hidden; }
@media(max-width:1100px) {
 .cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .content { grid-template-columns:185px minmax(0,1fr); gap:22px; }
 .hero { padding:30px; gap:25px; }
}
@media(max-width:720px) {
 .topbar { padding:22px 20px; gap:18px; }
 .logo img { width:155px; }
 .logo span { font-size:7px; }
 .topbar nav { gap:15px; font-size:11px; }
 .topbar nav a:first-child { display:none; }
 .shell { padding:0 18px 30px; }
 .hero { grid-template-columns:1fr 110px; gap:10px; padding:26px 22px; min-height:250px; }
 .hero h1 { font-size:38px; }
 .hero p { font-size:12px; }
 .hero-art { height:180px; }
 .metrics { gap:25px; padding:24px 0; }
 .metric strong { font-size:24px; }
 .metric span { font-size:10px; }
 .content { display:block; padding-top:16px; }
 .panel { position:static; display:grid; grid-template-columns:1fr 1fr; gap:20px; padding:18px; margin-bottom:28px; }
 .panel .section { margin:0; padding:0; border:0; }
 .panel .section:last-child { display:none; }
 .toolbar h2 { font-size:27px; }
 .searchbar input, .sort { font-size:16px; }
 .toolbar { align-items:flex-start; }
 .sort { max-width:145px; }
 .noteboxes { grid-template-columns:1fr; }
 .dialog { padding:24px; }
 .dialog h2 { font-size:25px; }
 .footer { flex-wrap:wrap; }
 .footer p { order:3; width:100%; }
}
@media(max-width:430px) {
 .topbar nav { gap:12px; font-size:10px; }
 .top-note { font-size:7px; }
 .logo img { width:138px; }
 .hero { grid-template-columns:1fr; }
 .hero-art { display:none; }
 .metrics { gap:20px; }
 .metric span { font-size:9px; }
 .cards { grid-template-columns:1fr; }
 .item { min-height:200px; }
 .item h3 { font-size:14px; }
 .toolbar h2 { font-size:25px; }
 .toolbar p { font-size:11px; }
 .sort { max-width:135px; font-size:14px; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
