/* Archival Ivory + Seal, for the standalone article pages.
 *
 * These articles are static files under /public, so they can't import the React design library
 * or Tailwind's @theme. This is the one place the Ivory tokens are restated by hand — keep the
 * values in step with web-app/app/globals.css. One stylesheet for all three articles, so they
 * can't drift apart.
 *
 * Previously each article carried its own <style> block: a near-white ground (#fbf9f5), a
 * dark-brown gradient masthead and a dark-red accent (#7a1f1f) — warm in spirit but none of it
 * the museum's palette.
 */

:root {
    /* palette — mirrors globals.css */
    --bg: #F3ECDC;
    --bg2: #EAE0CB;
    --surface: #FBF6EA;
    --surface-2: #FFFDF6;
    --line: rgba(74, 58, 28, 0.16);
    --rule: rgba(74, 58, 28, 0.15);
    --accent: #9A7526;
    --accent-2: #A6472F;
    --olive: #4E6B3C;
    --fg: #2A2418;
    --fg-dim: #6A6150;
    --fg-faint: #938A72;
    --paper: #EFE4CA;
    --mount: #cabb9c;

    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;

    --maxw: 820px;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-serif);
    line-height: 1.65;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px 80px }

/* ── brand bar ─────────────────────────────────────────────────────────────
   The site header is a React component the static pages can't render, so an
   article used to open with no way back into the museum. This is its stand-in. */
.sitebar { border-bottom: 1px solid var(--line); background: var(--bg) }
.sitebar a {
    display: flex; align-items: center; gap: 12px;
    max-width: 1152px; margin: 0 auto; padding: 12px 22px;
    text-decoration: none; border: 0;
}
.sitebar .name { font-family: var(--font-serif); font-size: 1.25rem; color: var(--fg); line-height: 1.15 }
.sitebar .sub {
    display: block; font-family: var(--font-sans); font-size: 0.62rem;
    text-transform: uppercase; letter-spacing: 0.28em; color: var(--fg-faint);
}

/* ── masthead ──────────────────────────────────────────────────────────────
   Ivory ground and a hairline rule, not a dark gradient panel: the museum has
   no dark hero anywhere else. */
header.masthead {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 46px 22px 34px;
    text-align: center;
}
header.masthead .kicker {
    font-family: var(--font-mono);
    text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.7rem;
    color: var(--accent); margin: 0 0 14px;
}
header.masthead h1 {
    font-family: var(--font-serif); font-weight: 600;
    font-size: 2.1rem; line-height: 1.14; letter-spacing: -0.01em;
    margin: 0 auto; max-width: 720px; color: var(--fg);
    text-wrap: balance;
}
header.masthead p.sub {
    margin: 16px auto 0; max-width: 600px;
    color: var(--fg-dim); font-style: italic; font-size: 1.02rem;
}

/* ── running text ──────────────────────────────────────────────────────────*/
h2 {
    font-family: var(--font-serif); font-weight: 600; color: var(--fg);
    font-size: 1.6rem; letter-spacing: -0.01em;
    margin: 2.4em 0 0.5em; padding-bottom: 0.2em;
    border-bottom: 2px solid var(--rule);
}
h3 { font-family: var(--font-serif); font-size: 1.2rem; margin: 1.8em 0 0.35em; color: var(--accent) }
h4 {
    font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600;
    letter-spacing: 0.02em; margin: 1.4em 0 0.25em; color: var(--fg);
}
p { margin: 0.7em 0 }
.lead { font-size: 1.12rem; color: var(--fg) }
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(154, 117, 38, 0.35) }
a:hover { border-bottom-color: var(--accent) }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
sup a { border: 0; text-decoration: none; font-size: 0.7em; padding: 0 1px }
hr, hr.div { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0 }
.muted { color: var(--fg-dim) }
.footnote { font-size: 0.82rem; color: var(--fg-dim) }

/* ── panels ────────────────────────────────────────────────────────────────*/
blockquote.note, .callout {
    background: var(--bg2); border-left: 3px solid var(--accent);
    margin: 1.4em 0; padding: 14px 18px; border-radius: 0 6px 6px 0; font-size: 0.97rem;
}
blockquote.note strong, .callout strong { color: var(--accent) }
/* oxblood is the system's security/alert colour */
.alert {
    background: var(--surface); border: 1px solid var(--line);
    border-left: 3px solid var(--accent-2);
    padding: 14px 18px; border-radius: 6px; margin: 1.4em 0; font-size: 0.95rem;
}
.alert strong { color: var(--accent-2) }
.toc {
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 14px 22px; margin: 30px 0; font-size: 0.95rem;
}
.toc strong {
    font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: 0.14em; color: var(--fg-faint);
}
.toc ol { margin: 8px 0 2px; padding-left: 20px }
.toc a { border: 0 }
.toc a:hover { border-bottom: 1px solid var(--accent) }

/* ── figures — the LitMount idiom: aged-paper fill, mount border ───────────*/
figure {
    margin: 1.7em 0; background: var(--paper); border: 1px solid var(--mount);
    border-radius: 10px; padding: 12px; text-align: center;
}
figure img { display: block; width: 100%; height: auto; border-radius: 4px; background: var(--paper) }
figure figcaption, figcaption {
    font-family: var(--font-sans); font-size: 0.82rem; color: var(--fg-dim); margin-top: 0.6em;
}
figcaption .credit { display: block; margin-top: 3px; font-style: italic; color: var(--fg-faint) }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.4em 0 }
.grid2 figure { margin: 0 }
/* the NoImageCard idiom */
.missing {
    border: 1px dashed var(--mount); border-radius: 10px; padding: 26px 16px; text-align: center;
    color: var(--fg-dim); background: var(--surface);
    font-family: var(--font-sans); font-size: 0.9rem;
}

/* ── catalogue entries ─────────────────────────────────────────────────────*/
.cat-entry {
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 6px 22px 18px; margin: 26px 0;
}
.specs { font-family: var(--font-sans); font-size: 0.86rem; color: var(--fg-dim) }
.denoms { font-family: var(--font-mono); font-variant-numeric: tabular-nums }
.chip {
    display: inline-block; background: var(--bg2); border: 1px solid var(--line);
    border-radius: 4px; padding: 0 6px;
    font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-dim);
}
.price { white-space: nowrap; font-family: var(--font-mono); font-variant-numeric: tabular-nums }

/* Badge idiom: small, uppercase, mono, semantic colour */
.tag {
    display: inline-block; font-family: var(--font-mono); font-size: 0.64rem;
    text-transform: uppercase; letter-spacing: 0.1em; padding: 2px 8px; border-radius: 999px;
    vertical-align: middle; margin-left: 8px; border: 1px solid;
}
.tag.illus { background: var(--surface); color: var(--olive); border-color: var(--olive) }
.tag.attest { background: var(--surface); color: var(--accent); border-color: var(--accent) }
.tag.sold { background: var(--surface); color: var(--accent-2); border-color: var(--accent-2) }

/* ── tables ────────────────────────────────────────────────────────────────*/
.tablewrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line); border-radius: 10px }
table { border-collapse: collapse; width: 100%; font-family: var(--font-sans); font-size: 0.88rem }
th, td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top }
th {
    background: var(--bg2); color: var(--fg);
    font-family: var(--font-mono); font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500;
}
tbody tr:nth-child(even) { background: var(--surface) }
tbody tr:last-child td { border-bottom: 0 }
td.tick { text-align: center; color: var(--olive); font-weight: 700 }
td.no { text-align: center; color: var(--fg-faint) }

/* ── references / footer ───────────────────────────────────────────────────*/
.refs { font-size: 0.86rem; color: var(--fg-dim) }
.refs li { margin: 0.45em 0 }
footer.foot {
    border-top: 2px solid var(--rule); margin-top: 60px; padding-top: 22px;
    font-size: 0.82rem; color: var(--fg-dim);
}

@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr } }
@media (max-width: 560px) {
    body { font-size: 17px }
    header.masthead h1 { font-size: 1.6rem }
}
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important }
}
