/* poap-vault — standalone styling (experiments carry their own styles).
   The color roles mirror src/input.css from the typographic redesign. Resolution matches
   the site theme model: dark canonical, system preference the silent default,
   html.light / html.dark (set by /theme.js) force a mode. */
@font-face {
    font-family: 'Public Sans';
    src: url('publicsans.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}
:root {
    --bg: #000000;
    --ink: #a3a3a3;
    --ink-soft: #737373;
    --title: #d4d4d4;
    --rule: #27272a;
    --accent: #ffffff;
}
@media (prefers-color-scheme: light) {
    html:not(.dark) {
        --bg: #ffffff;
            --ink: #52525b;
        --ink-soft: #71717a;
        --title: #3f3f46;
        --rule: #e4e4e7;
        --accent: #000000;
    }
}
html.light {
    --bg: #ffffff;
    --ink: #52525b;
    --ink-soft: #71717a;
    --title: #3f3f46;
    --rule: #e4e4e7;
    --accent: #000000;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Public Sans', system-ui, sans-serif;
    line-height: 1.55;
}
a {
    color: inherit;
}

/* Running head — mirrors the site-wide pattern from the redesign: label left,
   controls right, one hairline, static not sticky. This page is wider than the
   768px prose pages, so the head follows the gallery width. */
.running-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.3rem 20px 0;
}
.running-head .rh-left,
.running-head .rh-right {
    border-bottom: 1px solid var(--rule);
    padding-bottom: 0.8rem;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.running-head .rh-left { flex: 1 1 auto; }
.running-head .rh-right { flex: 0 0 auto; padding-left: 1rem; text-align: right; }
.running-head a,
.running-head button {
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.running-head a:hover,
.running-head button:hover { color: var(--accent); }
/* The theme control names the mode a tap switches TO; the label lives in CSS
   so it is right pre-paint and with JS off. Works under both the current
   3-state /theme.js and the redesign's 2-state one. */
#theme-toggle::before { content: "Light"; }
html.light #theme-toggle::before { content: "Dark"; }
@media (prefers-color-scheme: light) {
    html:not(.dark) #theme-toggle::before { content: "Dark"; }
}
html.dark #theme-toggle::before { content: "Light"; }

.head,
main,
footer {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}
h1 {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.9rem;
    margin: 18px 0 8px;
}
.sub {
    max-width: 64ch;
    margin: 0 0 10px;
}
.meta {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0;
}
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 26px 0 0;
    padding: 0;
}
.controls input {
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink);
    padding: 9px 13px;
    font: inherit;
    width: 230px;
}
.chip {
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink);
    padding: 7px 13px;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.chip.on {
    color: var(--accent);
    border-color: var(--ink);
}
.controls + .controls {
    margin-top: 10px;
}
.site-footer {
    text-align: center;
    color: var(--ink-soft);
    padding: 2.4rem 20px 2.2rem;
    font-size: 0.8rem;
}
.site-footer .footer-line {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-top: 0.45rem;
}
.site-footer .footer-line:first-child { margin-top: 0; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .provenance {
    max-width: 44em;
    margin: 0 auto 1.4rem;
}
.count {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 12px 0 0;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin: 14px 0 60px;
    padding: 0;
}
.card {
    position: relative;
    background: transparent;
    border: 1px solid var(--rule);
    padding: 12px;
    cursor: pointer;
    text-align: center;
    border: 0;
    color: inherit;
    font: inherit;
    display: block;
    width: 100%;
}
.card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: var(--bg);
}
.card .n {
    font-size: 0.8rem;
    margin: 8px 0 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card .y {
    font-size: 0.72rem;
    color: var(--ink-soft);
}
.anim {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    background: var(--bg);
    color: var(--ink);
    padding: 1px 5px;
    opacity: 0.85;
}
dialog {
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--rule);
    max-width: 560px;
    width: 92vw;
    padding: 22px;
}
dialog::backdrop {
    background: rgba(0, 0, 0, 0.75);
}
dialog img,
dialog video {
    width: min(300px, 70vw);
    display: block;
    margin: 0 auto 14px;
}
dialog h2 {
    color: var(--accent);
    font-size: 1.1rem;
    margin: 0 0 8px;
    text-align: center;
}
.desc {
    font-size: 0.88rem;
    white-space: pre-wrap;
}
.note {
    margin-top: 12px;
    font-size: 0.78rem;
    opacity: 0.85;
    border-left: 2px solid var(--rule);
    padding-left: 10px;
}
.prov {
    margin-top: 14px;
    border-top: 1px solid var(--rule);
    padding-top: 12px;
    font-size: 0.75rem;
    overflow-wrap: anywhere;
}
.prov div {
    margin: 3px 0;
}
.prov b {
    font-weight: 600;
}
.dead {
    opacity: 0.7;
}
.close {
    float: right;
    background: none;
    border: 0;
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}
footer {
    padding-bottom: 44px;
    font-size: 0.8rem;
    opacity: 0.75;
}
footer a {
    text-decoration: none;
}
footer a:hover {
    color: var(--accent);
}
