@layer base, components, responsive;
@layer base {
  :root { color-scheme: light; --paper:#f5f5ef; --white:#fff; --ink:#233d34; --muted:#6b756e; --line:#dddfd5; --accent:#e5ebbe; --green:#315f4c; font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:15px; }
  * { box-sizing:border-box; }
  body { margin:0; background:var(--paper); color:var(--ink); }
  a { color:inherit; text-underline-offset:3px; }
  button,input,select { font:inherit; }
  button,a,input,select { -webkit-tap-highlight-color:transparent; }
  button { cursor:pointer; }
  button:disabled { cursor:default; opacity:.5; }
  button,select { color:inherit; }
  [hidden] { display:none!important; }
  :focus-visible { outline:3px solid #548a70; outline-offset:4px; }
  .sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .skip-link { position:fixed; top:-60px; left:15px; z-index:50; background:white; padding:12px; }
  .skip-link:focus { top:10px; }
  h1,h2,h3,p { margin-top:0; }
  button { background:transparent; border:1px solid var(--line); border-radius:8px; padding:9px 13px; }
  .hint { color:var(--muted); font-size:.83rem; line-height:1.5; }
}
@layer components {
  .site-header { max-width:1800px; margin:auto; padding:27px 4%; display:flex; align-items:center; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); }
  .brand { display:flex; align-items:center; gap:10px; text-decoration:none; font-size:22px; letter-spacing:-1px; font-weight:650; }
  .brand-divider { margin:0 10px; font-weight:350; color:#9da79e; }
  .brand-search { font-size:19px; font-weight:400; letter-spacing:-.6px; }
  .header-links { display:flex; align-items:center; gap:30px; font-size:.87rem; }
  .header-links a { text-decoration:none; }
  .phase-label { font-size:.64rem; letter-spacing:1.7px; color:var(--muted); }
  .search-intro { max-width:960px; margin:auto; text-align:center; padding:62px 28px 40px; transition:padding .2s; }
  .eyebrow { font-size:.68rem; font-weight:650; letter-spacing:1.7px; color:var(--green); margin-bottom:18px; }
  .tiny-star { font-size:16px; padding-right:7px; vertical-align:middle; }
  h1 { font-size:clamp(35px,4.2vw,57px); line-height:1.08; font-weight:460; letter-spacing:-2.4px; margin-bottom:22px; }
  .intro-copy { color:var(--muted); font-size:.96rem; line-height:1.75; margin-bottom:28px; }
  .search-form { max-width:710px; margin:auto; position:relative; z-index:10; }
  .search-field { display:flex; gap:15px; align-items:center; background:white; border:1px solid #c9cec2; border-radius:12px; padding:8px 9px 8px 20px; box-shadow:0 4px 20px #263c3306; }
  .search-field:focus-within { border-color:var(--green); box-shadow:0 0 0 3px #315f4c12; }
  .search-icon { flex:none; color:#6c7d70; }
  .search-field input { width:100%; min-width:0; border:0; outline:0; background:transparent; height:43px; color:var(--ink); font-size:1rem; }
  .search-field input::placeholder { color:#8a928a; }
  .search-submit { background:var(--accent); border:0; width:42px; height:42px; font-size:24px; padding:0; flex:none; }
  .search-hint { color:var(--muted); font-size:.74rem; text-align:left; margin:10px 4px 0; }
  .suggestions { list-style:none; padding:6px; margin:6px 0 0; text-align:left; position:absolute; top:62px; left:0; right:0; max-height:380px; overflow:auto; background:white; border:1px solid var(--line); border-radius:12px; box-shadow:0 16px 38px #243d3420; }
  .suggestions li { padding:11px 13px; border-radius:6px; cursor:pointer; }
  .suggestions li[aria-selected=true],.suggestions li:hover { background:#edf0e3; }
  .suggestion-top { display:flex; justify-content:space-between; gap:12px; font-weight:600; }
  .suggestion-top small { font-weight:400; font-size:.73rem; color:var(--muted); }
  .suggestions p { margin:4px 0 0; font-size:.82rem; line-height:1.4; color:var(--muted); }
  .examples { display:flex; justify-content:center; align-items:center; gap:9px; margin-top:22px; font-size:.76rem; flex-wrap:wrap; }
  .examples>span { margin-right:5px; color:var(--muted); }
  .examples button { padding:6px 10px; border-radius:20px; font-size:inherit; background:#f9faf5; }
  .examples button span { margin-left:6px; color:var(--muted); }
  .workspace { max-width:1800px; padding:0 4% 60px; margin:auto; }
  .search-controls { display:flex; align-items:center; justify-content:space-between; gap:20px; border-block:1px solid var(--line); padding:17px 0; }
  .repositories { border:0; padding:0; margin:0; display:flex; align-items:center; gap:19px; }
  .control-label { font-size:.6rem; letter-spacing:1.4px; color:var(--muted); }
  .repositories label,.related-control { display:flex; align-items:center; gap:7px; font-size:.78rem; cursor:pointer; }
  input[type=checkbox] { accent-color:var(--green); width:14px; height:14px; margin:0; }
  .source-dot { width:6px; height:6px; border-radius:50%; display:inline-block; }
  .wikidata-dot { background:#a16c48; }
  .commons-dot { background:#428294; }
  .filter-controls { display:flex; align-items:center; gap:21px; }
  .rights-control select { border:0; background:transparent; font-size:.78rem; max-width:250px; }
  .entity-heading { display:flex; justify-content:space-between; align-items:flex-start; padding-top:33px; gap:20px; }
  .entity-heading .eyebrow { margin-bottom:8px; font-size:.6rem; }
  .entity-heading h2 { font-size:32px; font-weight:500; letter-spacing:-1px; margin-bottom:8px; }
  .entity-heading p { font-size:.9rem; color:var(--muted); line-height:1.55; margin-bottom:12px; }
  .qid-link { border:1px solid var(--line); border-radius:30px; padding:7px 12px; font-size:.75rem; text-decoration:none; margin-top:23px; white-space:nowrap; }
  .section-label { display:flex; align-items:baseline; gap:15px; margin:16px 0 12px; }
  .section-label h3 { font-size:.86rem; font-weight:600; margin:0; }
  .section-label>span { color:var(--muted); font-size:.74rem; }
  .collection-links { display:flex; flex-wrap:wrap; gap:8px; }
  .collection-button { border:1px solid #d5dcc9; border-radius:7px; background:#edf0e2; padding:9px 12px; display:flex; gap:9px; align-items:center; font-size:.81rem; text-align:left; }
  .collection-button small { color:var(--muted); font-size:.7rem; }
  .result-heading { display:flex; align-items:center; justify-content:space-between; margin:30px 0 14px; gap:15px; }
  .result-heading>div { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
  .result-heading h3 { font-size:1rem; font-weight:550; margin:0; }
  #result-count { color:var(--muted); font-size:.76rem; }
  .drag-hint { font-size:.75rem; color:var(--muted); margin:0; }
  .drag-hint span { font-size:20px; vertical-align:middle; margin-right:5px; }
  .source-status { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:16px; font-size:.71rem; color:var(--muted); }
  .source-status:empty { margin:0; }
  .source-pill { padding:6px 9px; border:1px solid var(--line); border-radius:6px; display:flex; align-items:center; gap:6px; }
  .source-pill[data-status=error] { border-color:#d2bda8; color:#87502c; }
  .card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(225px,1fr)); gap:20px; align-items:start; }
  .feed-page { margin-bottom:20px; overflow-anchor:none; }
  .feed-page[data-parked=true] { visibility:hidden; }
  .asset-card { position:relative; border:1px solid #e1e3da; border-radius:10px; overflow:hidden; background:white; min-width:0; transition:border-color .15s,box-shadow .15s; }
  .asset-card:hover { border-color:#bac6b3; box-shadow:0 6px 20px #233d340b; }
  .asset-card[draggable=true] { cursor:grab; }
  .asset-card.dragging { opacity:.55; }
  .card-preview { display:block; background:#e8e9df; position:relative; text-decoration:none; padding:0; border:0; border-radius:0; width:100%; }
  .card-preview img,.asset-card>a>img { display:block; width:auto; max-width:100%; height:auto; max-height:min(520px,70vh); margin-inline:auto; }
  .card-preview .placeholder { min-height:155px; display:flex; justify-content:center; align-items:center; color:#768176; font-size:.85rem; }
  .card-body { padding:13px 14px 12px; }
  .card-title { border:0; padding:0; border-radius:0; display:block; text-align:left; background:none; font-size:.86rem; font-weight:540; line-height:1.4; width:100%; overflow-wrap:anywhere; }
  .card-title span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .card-footer { display:flex; align-items:center; justify-content:space-between; gap:9px; margin-top:10px; }
  .license-link { color:#53674d; font-size:.67rem; text-decoration:none; background:#f0f3e8; padding:4px 6px; border-radius:4px; line-height:1.2; }
  .license-link[data-eligible=false] { color:#815531; background:#f4ebdf; }
  .card-copy { border:0; padding:2px 4px; font-size:.7rem; color:var(--muted); }
  .match-label { font-size:.65rem; color:#8a9389; margin-top:7px; }
  .drag-badge { position:absolute; top:8px; right:8px; padding:4px 7px; background:#fffffff0; border-radius:5px; font-size:.65rem; opacity:0; pointer-events:none; }
  .asset-card:hover .drag-badge,.asset-card:focus-within .drag-badge { opacity:1; }
  .feed-tail { text-align:center; color:var(--muted); font-size:.84rem; padding:25px 0 5px; min-height:30px; }
  .load-more { display:block; margin:15px auto; width:fit-content; background:#eef1e3; text-decoration:none; padding:11px 20px; border-radius:8px; }
  .notice { padding:13px 17px; border:1px solid #d9ceb4; background:#f6f0df; color:#74522d; border-radius:8px; font-size:.88rem; margin:20px 0; }
  .welcome { margin:50px 0 10px; border:1px solid var(--line); border-radius:13px; padding:40px; display:flex; align-items:center; gap:35px; background:linear-gradient(110deg,#eef0e2,#f8f8f2); }
  .welcome-symbol { display:flex; align-items:center; width:134px; flex:none; }
  .welcome-symbol span { height:66px; width:53px; display:flex; align-items:center; justify-content:center; background:#e0e8c8; border:3px solid var(--paper); border-radius:11px; font-size:29px; transform:rotate(-10deg); }
  .welcome-symbol span+span { margin-left:-15px; transform:rotate(5deg); background:#e6ded0; }
  .welcome-symbol span+span+span { transform:rotate(15deg); background:#cfddcf; }
  .welcome h2 { font-weight:500; font-size:23px; letter-spacing:-.7px; margin-bottom:10px; }
  .welcome p { color:var(--muted); line-height:1.75; font-size:.88rem; margin:0; }
  .welcome-note { margin-left:auto; padding-left:25px; border-left:1px solid #d9ddcb; display:flex; gap:16px; }
  .welcome-note>span { font-size:.65rem; padding-top:5px; color:#909a82; }
  .welcome-note p { font-size:.76rem; }
  .text-button { border:0; padding:5px 0; font-size:.8rem; color:var(--green); }
  .site-footer { max-width:1800px; margin:auto; padding:23px 4%; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:15px; font-size:.7rem; color:var(--muted); }
  body.has-results .search-intro { padding:27px 28px 25px; }
  body.has-results .search-intro>.eyebrow,body.has-results .search-intro>h1,body.has-results .intro-copy,body.has-results .examples { display:none; }
  body.has-results .search-hint { display:none; }
  dialog { padding:0; border:1px solid var(--line); border-radius:16px; width:min(1160px,94vw); max-height:90vh; color:var(--ink); background:#fff; box-shadow:0 20px 80px #0d251838; }
  dialog::backdrop { background:#18251ec9; }
  .dialog-toolbar { display:flex; align-items:center; justify-content:space-between; padding:14px 22px; border-bottom:1px solid var(--line); }
  .dialog-toolbar>span { font-size:.64rem; letter-spacing:1.6px; color:var(--muted); }
  .icon-button { border:0; padding:5px 8px; font-size:18px; }
  .dialog-layout { display:grid; grid-template-columns:1.3fr 1fr; }
  .dialog-preview { background:#edeee7; min-height:320px; padding:24px; display:flex; align-items:center; justify-content:center; }
  .dialog-preview img { max-width:100%; max-height:69vh; width:auto; height:auto; object-fit:contain; }
  .dialog-preview video { width:100%; max-height:65vh; }
  .dialog-details { padding:30px; min-width:0; }
  .dialog-details .eyebrow { font-size:.61rem; margin-bottom:12px; }
  .dialog-details h2 { font-size:25px; letter-spacing:-.6px; line-height:1.25; font-weight:500; overflow-wrap:anywhere; }
  #dialog-description { font-size:.84rem; line-height:1.7; color:var(--muted); white-space:pre-line; max-height:220px; overflow:auto; }
  dl { display:grid; grid-template-columns:85px 1fr; gap:10px 14px; font-size:.79rem; line-height:1.45; }
  dt { color:var(--muted); }
  dd { margin:0; overflow-wrap:anywhere; }
  .dialog-rights { background:#f1f4e8; border:1px solid #e0e6d2; padding:14px; border-radius:8px; margin:22px 0; font-size:.8rem; line-height:1.6; }
  .dialog-rights p { margin:5px 0 0; color:var(--muted); font-size:.73rem; }
  .dialog-actions { display:flex; flex-wrap:wrap; gap:8px; }
  .dialog-actions button,.primary-link { font-size:.76rem; }
  .primary-link { background:var(--green); color:white; border-radius:7px; padding:10px 14px; text-decoration:none; }
  .toast { position:fixed; bottom:25px; left:50%; transform:translateX(-50%); z-index:100; background:var(--ink); color:white; padding:12px 20px; border-radius:8px; font-size:.84rem; box-shadow:0 5px 20px #152d2125; }
  .fallback-page { max-width:1200px; margin:45px auto; padding:0 25px; }
  .fallback-form { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:30px 0; }
  .fallback-form input,.fallback-form select { padding:10px; border:1px solid var(--line); border-radius:7px; }
  .fallback-suggestions { padding:0; list-style:none; }
  .fallback-suggestions li { padding:15px; border-bottom:1px solid var(--line); }
  .fallback-page pre { white-space:pre-wrap; overflow-wrap:anywhere; }
}
@layer responsive {
  @media(min-width:1650px) { .card-grid { grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); } }
  @media(max-width:1100px) { .search-controls { align-items:flex-start; flex-direction:column; gap:15px; } .filter-controls { width:100%; justify-content:space-between; } .welcome-note { display:none; } }
  @media(max-width:700px) { .site-header { padding:20px 5%; } .phase-label { display:none; } .brand { font-size:20px; } .brand-search { font-size:17px; } .header-links { font-size:.77rem; } .search-intro { padding:42px 5% 28px; } h1 { letter-spacing:-1.6px; } .intro-copy { font-size:.86rem; } .desktop-break { display:none; } .search-field { padding-left:12px; gap:10px; } .search-field input { font-size:.87rem; } .workspace { padding-inline:5%; } .repositories { gap:14px; flex-wrap:wrap; } .control-label { display:none; } .repositories label,.related-control,.rights-control select { font-size:.72rem; } .filter-controls { gap:10px; } .rights-control select { max-width:180px; } .welcome { padding:25px 20px; margin-top:28px; gap:10px; } .welcome-symbol { display:none; } .welcome h2 { font-size:22px; } .welcome p { font-size:.8rem; } .site-footer { flex-direction:column; padding:20px 5%; gap:8px; } .entity-heading h2 { font-size:27px; } .entity-heading p { font-size:.82rem; } .drag-hint { display:none; } .section-label { flex-direction:column; gap:4px; } .card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } .card-body { padding:10px; } .card-title { font-size:.8rem; } .card-footer { align-items:flex-start; } .license-link { font-size:.61rem; } .card-copy { font-size:.63rem; } .dialog-layout { grid-template-columns:1fr; } .dialog-preview { min-height:180px; padding:15px; } .dialog-preview img { max-height:43vh; } .dialog-details { padding:22px; } .suggestions { max-height:50vh; } }
  @media(max-width:360px) { .card-grid { grid-template-columns:1fr; } .brand-divider { margin:0 6px; } .filter-controls { align-items:flex-start; flex-direction:column; } }
  @media(prefers-reduced-motion:reduce) { * { transition:none!important; scroll-behavior:auto!important; } }
}
