:root { color-scheme: light; --paper:#f4f2ee; --ink:#171717; --muted:#54524f; --line:#c9c5bd; --accent:#fa4590; --max:1320px; }
*,*::before,*::after { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--paper); color:var(--ink); font-family:Arial, Helvetica, sans-serif; line-height:1.5; }
a { color:inherit; text-decoration:none; }
a:hover { text-decoration:underline; text-underline-offset:.25em; }
a:focus-visible { outline:3px solid var(--ink); outline-offset:5px; }
.wrap { width:min(calc(100% - clamp(2rem, 9vw, 9rem)),var(--max)); margin-inline:auto; }
.skip { position:absolute; left:1rem; top:1rem; padding:.8rem; background:var(--paper); transform:translateY(-200%); z-index:2; }
.skip:focus { transform:none; }
.masthead { display:flex; align-items:center; justify-content:space-between; min-height:82px; border-bottom:1px solid var(--line); gap:1rem; }
.wordmark { font-size:1.35rem; letter-spacing:-.08em; font-weight:800; }
.wordmark span { font-weight:400; }
nav { display:flex; gap:clamp(1rem,3vw,2.5rem); font-size:.86rem; font-weight:700; }
.intro { padding:clamp(3rem,8vw,7rem) 0 clamp(2rem,5vw,4rem); }
.eyebrow,.edition,.section-head span,.art-label,.footer,.status { font-family:Consolas, 'Courier New', monospace; font-size:.75rem; letter-spacing:.04em; text-transform:uppercase; }
.intro .eyebrow { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.dot { display:inline-block; width:.55rem; height:.55rem; border-radius:50%; background:var(--ink); flex-shrink:0; }
.edition { margin-left:auto; color:var(--muted); }
.intro h1 { font-size:clamp(5.3rem,16.5vw,14rem); line-height:.78; letter-spacing:-.105em; margin:.28em 0 .32em -.055em; font-weight:800; }
.intro h1 span { font-weight:400; }
.intro-foot { display:flex; justify-content:space-between; align-items:end; gap:2rem; }
.intro-foot p { max-width:35ch; font-size:clamp(1rem,1.6vw,1.3rem); margin:0; }
.jump { display:inline-flex; gap:1rem; align-items:center; font-size:.85rem; font-weight:700; white-space:nowrap; }
.jump span { font-size:1.2rem; }
.section-head { display:flex; justify-content:space-between; align-items:baseline; gap:1rem; border-top:1px solid var(--ink); padding:1rem 0; }
.section-head h2 { font-size:1rem; text-transform:uppercase; letter-spacing:.06em; margin:0; }
.section-head span { color:var(--muted); text-align:right; }
.feature { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(0,1fr); gap:clamp(1.5rem,5vw,5rem); align-items:center; }
.art-placeholder { background:#181818; color:#f4f2ee; min-height:360px; aspect-ratio:5/4; display:flex; flex-direction:column; justify-content:space-between; padding:clamp(1.2rem,3vw,2.6rem); }
.art-label { color:#bfbab4; display:flex; justify-content:space-between; gap:.5rem; }
.art-type { font-size:clamp(2.5rem,7vw,6.25rem); line-height:.89; font-weight:900; letter-spacing:-.085em; margin:.3em 0; }
.art-type span { color:var(--accent); }
.feature-info h3 { font-size:clamp(2rem,4vw,4rem); line-height:1; letter-spacing:-.07em; margin:.4em 0; }
.feature-info > p:not(.eyebrow):not(.status) { color:var(--muted); max-width:32ch; }
.status { display:flex; align-items:center; gap:.5rem; margin-top:2rem; }
.about { margin-top:clamp(4rem,9vw,8rem); padding-bottom:clamp(3rem,7vw,6rem); }
.about > p { font-size:clamp(1.6rem,3.8vw,3.5rem); letter-spacing:-.045em; line-height:1.12; max-width:28ch; margin:1.2rem 0; }
.about > .small { font-size:1rem; letter-spacing:normal; color:var(--muted); max-width:55ch; line-height:1.5; }
.footer { display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; border-top:1px solid var(--line); padding:1.3rem 0 2rem; color:var(--muted); }
@media(max-width:650px) { .masthead { min-height:64px; } .intro-foot { align-items:start; flex-direction:column; gap:1rem; } .feature { grid-template-columns:1fr; } .art-placeholder { min-height:0; } .art-type { font-size:clamp(2.5rem,11vw,5rem); } .intro .edition { margin-left:0; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

/* Work records: editorial layout, independent of collection palette. */
.record-link { display:inline-flex; gap:1.1rem; align-items:center; font-size:.9rem; font-weight:700; border-bottom:1px solid var(--ink); padding:.35rem 0; }
.record-link:hover { text-decoration:none; border-bottom-width:2px; padding-bottom:calc(.35rem - 1px); }
.work-record { padding:clamp(2.5rem,6vw,5.5rem) 0 clamp(3rem,7vw,6rem); }
.breadcrumb { font-size:.85rem; color:var(--muted); margin-bottom:2.5rem; }
.record-kicker { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.8rem; color:var(--muted); }
.record-title { font-size:clamp(2.5rem,7vw,6.5rem); line-height:.93; letter-spacing:-.07em; margin:.45em 0 .3em; overflow-wrap:anywhere; }
.record-subtitle { font-size:clamp(1rem,2vw,1.4rem); color:var(--muted); margin:0 0 2.5rem; }
.record-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(0,1fr); gap:clamp(1.5rem,5vw,5rem); align-items:start; }
.record-figure { margin:0; min-width:0; }
.record-art { aspect-ratio:4/5; background:var(--ink); color:var(--paper); padding:clamp(1rem,3.5vw,3rem); display:flex; flex-direction:column; justify-content:space-between; }
.record-art-text { font-weight:900; font-size:clamp(2rem,5.9vw,6rem); line-height:.94; letter-spacing:-.065em; margin:1rem 0; }
.record-art-text span { color:var(--accent); }
.record-figure figcaption { font-size:.85rem; color:var(--muted); margin-top:.75rem; }
.record-meta { margin:0; }
.record-meta div { border-top:1px solid var(--line); padding:.85rem 0; }
.record-meta div:first-child { border-top:1px solid var(--ink); }
.record-meta dt { font: .75rem Consolas, 'Courier New', monospace; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin-bottom:.35rem; }
.record-meta dd { margin:0; font-size:1rem; }
.record-context { max-width:68ch; margin:clamp(3rem,6vw,6rem) 0; }
.record-context h2 { font-size:1rem; text-transform:uppercase; letter-spacing:.06em; border-top:1px solid var(--ink); padding-top:1rem; }
.record-context p { font-size:clamp(1rem,1.7vw,1.25rem); }
.preview-note { border-left:3px solid var(--ink); padding:.15rem 1rem; color:var(--muted); margin-top:2rem; }
@media(max-width:650px) { .record-grid { grid-template-columns:1fr; } .record-art-text { font-size:clamp(2rem,10vw,5rem); } .intro h1 { font-size:clamp(3rem,16.5vw,5.3rem); } }

/* Attribution page: monochrome editorial treatment. */
.policy-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(1.5rem,4vw,3rem); margin:3rem 0; }
.policy-grid section { border-top:1px solid var(--ink); padding-top:1rem; }
.policy-grid h2 { font:700 .85rem Consolas,'Courier New',monospace; text-transform:uppercase; letter-spacing:.04em; margin:0 0 1rem; }
.policy-grid p { max-width:60ch; margin:0; font-size:clamp(1rem,1.6vw,1.2rem); }
.credit-line { font-weight:700; }
@media(max-width:650px) { .policy-grid { grid-template-columns:1fr; } .masthead { flex-wrap:wrap; padding:.75rem 0; } nav { flex-wrap:wrap; gap:.85rem; } }

/* Theme: charcoal by default; the original paper palette remains available. */
:root:not([data-theme="light"]) {
  color-scheme: dark;
  --paper: #191918;
  --ink: #e8e5df;
  --muted: #a6a39d;
  --line: #393937;
  --panel: #232322;
}
:root[data-theme="light"] { color-scheme: light; }

/* The artwork is a fixed print palette, not part of the interface theme. */
.record-art { background: #171717; color: #f4f2ee; }
:root:not([data-theme="light"]) .art-placeholder,
:root:not([data-theme="light"]) .record-art {
  outline: 1px solid var(--line);
  outline-offset: -1px;
}
/* Keep the publication's neutral typographic panel distinct from the page. */
:root:not([data-theme="light"]) .art-placeholder { background: var(--panel); }

/* A quiet footer utility, not a primary navigation item. */
.theme-toggle {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  min-height: 24px;
  text-decoration: underline;
  text-underline-offset: .25em;
  text-decoration-color: var(--line);
}
.theme-toggle:hover { color: var(--ink); text-decoration-color: currentColor; }
.theme-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.theme-toggle[hidden] { display: none; }
.footer { align-items: center; }
@media (max-width: 650px) { .theme-toggle { min-height: 44px; } }

/* Almost Agape — Artwork Gallery */

.gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 4vw, 3rem);
}

.gallery-item {
    min-width: 0;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.2s ease;
}

.gallery-item a:hover img {
    opacity: 0.88;
}

.gallery-caption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.gallery-caption h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.gallery-caption span {
    font-family: Consolas, monospace;
    font-size: 0.75rem;
    color: var(--muted);
}

@media (max-width: 650px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-item img {
        transition: none;
    }
}

/* Almost Agape — Generated work pages */
.record-image { display:block; width:100%; height:auto; }
.record-image-link { display:block; }
.record-image-link:focus-visible { outline-offset:5px; }
.record-caption { display:flex; justify-content:space-between; flex-wrap:wrap; gap:.5rem; }
.record-context .statement { white-space:pre-line; overflow-wrap:anywhere; }
.record-neighbors { display:flex; justify-content:space-between; flex-wrap:wrap; gap:1rem; margin-top:2rem; }

/* Almost Agape — Collection covers v0.8 */
.collection-card { display:block; min-width:0; }
.collection-card:hover { text-decoration:none; }
.collection-card:hover h3 { text-decoration:underline; text-underline-offset:.25em; }
.collection-cover { aspect-ratio:5/4; background:#181818; color:#f4f2ee; border:1px solid var(--line); display:flex; flex-direction:column; justify-content:space-between; padding:clamp(1rem,3vw,2.6rem); }
.collection-cover .art-type { font-size:clamp(2rem,5.2vw,5rem); overflow-wrap:anywhere; }
.collection-cover .art-type span { color:var(--collection-accent,#f4f2ee); }
.collection-cover-image { display:block; width:100%; height:auto; }
.collection-description { color:var(--muted); max-width:60ch; margin:0 0 2.5rem; }
.collection-card .gallery-caption { align-items:flex-start; }
.collection-card .gallery-caption span { white-space:nowrap; }
@media(max-width:650px) { .collection-cover .art-type { font-size:clamp(2rem,10vw,5rem); } }

/* Almost Agape — Immersive viewer v0.9 */
html.agape-viewer-open { overflow:hidden; }
.art-viewer:not([open]) { display:none; }
.art-viewer[open] { position:fixed; inset:0; margin:0; width:100%; height:100%; max-width:none; max-height:none; box-sizing:border-box; border:0; padding:clamp(.75rem,2vw,1.5rem); background:#141414; color:#e8e5df; display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:.75rem; overflow:auto; }
.art-viewer::backdrop { background:#141414; }
.viewer-bar { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.viewer-bar h2 { font-size:clamp(.85rem,2vw,1.15rem); margin:0; line-height:1.35; overflow-wrap:anywhere; }
.viewer-close { flex-shrink:0; background:transparent; color:inherit; border:1px solid #777; padding:.55rem .85rem; cursor:pointer; font:inherit; }
.viewer-close:hover { background:#333; }
.viewer-close:focus-visible, .viewer-caption a:focus-visible { outline:2px solid #e8e5df; outline-offset:3px; }
.viewer-image { display:block; width:100%; height:100%; min-height:0; object-fit:contain; }
.viewer-caption { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.5rem 1rem; font-size:.75rem; color:#b8b5af; }
.viewer-caption a { color:inherit; text-decoration:underline; text-underline-offset:.2em; }

/* Almost Agape — Production layout safeguards v0.11.2 */
.gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.collection-card { display:block; min-width:0; }
.collection-cover { display:flex; flex-direction:column; justify-content:space-between; aspect-ratio:5/4; background:#181818; color:#f4f2ee; border:1px solid var(--line); padding:clamp(1rem,3vw,2.6rem); }
.collection-cover .art-type span { color:var(--collection-accent,#f4f2ee); }
.record-grid > * { min-width:0; }
.record-image-link { display:block; width:100%; max-width:100%; }
.record-image { display:block; width:100%; max-width:100%; height:auto; }
.record-meta dd { overflow-wrap:anywhere; }
@media(max-width:650px) { .gallery, .record-grid { grid-template-columns:minmax(0,1fr); } }
