/* Theme F — archival specimen, after dark
   Theme E's layout, spacing and typography verbatim. Palette lifted from the
   author-links page: near-black ground, warm bone ink, gold as the only accent,
   rules drawn in gold at low alpha rather than in solid ink.

   Derived 27 Aug 2026. E is left untouched as the light reference. */

:root {
  /* ground */
  --paper: #080809;   /* page */
  --paper-2: #151414; /* recessed panels, pills, empty plates */
  --card: #141614;    /* raised cards */

  /* ink */
  --ink: #eee8df;     /* body */
  --ink-2: #c5bbb0;   /* muted */
  --stamp: #efc774;   /* accent — gold */

  /* Rules, in three tiers. Gold at alpha, never solid ink.
     --rule       decorative dividers only, inside an already-bounded area.
     --rule-card  component boundaries. Must clear WCAG 1.4.11 (3:1) because the
                  card background is only 1.10:1 against the page — the border is
                  what delineates a card. .43 is the computed minimum; .46 for margin.
     --rule-strong structural page rules, a tier above card edges. */
  --rule: rgba(239, 199, 116, .28);
  --rule-card: rgba(239, 199, 116, .46);
  --rule-strong: rgba(239, 199, 116, .6);

  --bg: var(--paper);
  --fg: var(--ink);
  --muted: var(--ink-2);
  --accent: var(--stamp);

  --serif: 'Spectral', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --measure: 33rem;
  --wide: 72rem;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background-color: var(--paper); }

body {
  margin: 0; color: var(--fg);
  font-family: var(--serif); font-weight: 400;
  font-size: 1.1rem; line-height: 1.68;
  background-color: var(--paper);
  /* faint fibrous tooth — inverted: light motes on dark, not dark on light */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(239, 199, 116, .045) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 65%, rgba(238, 232, 223, .035) 0 1px, transparent 1px);
  background-size: 17px 17px, 23px 23px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--fg); text-decoration-color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent); }

.skip { position: absolute; left: -9999px; background: var(--ink); color: var(--paper); padding: .75rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------- chrome */

.site-head {
  display: flex; flex-wrap: wrap; gap: .75rem 2rem; align-items: baseline;
  justify-content: space-between; max-width: var(--wide);
  margin: 0 auto; padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--rule-strong);
}
.wordmark {
  font-family: var(--mono); font-weight: 500; font-size: .92rem;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--fg);
}
.site-head nav { display: flex; flex-wrap: wrap; gap: 1.35rem; }
.site-head nav a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; color: var(--muted);
}
.site-head nav a:hover { color: var(--accent); }
.site-head nav a[aria-current] { color: var(--accent); text-decoration: underline; text-underline-offset: .3em; }

main { max-width: var(--wide); margin: 0 auto; padding: 0 1.75rem; }

.site-foot {
  border-top: 1px solid var(--rule-strong); margin-top: 5.5rem;
  max-width: var(--wide); margin-inline: auto; padding: 1.75rem 1.75rem 3.5rem;
}
.foot-grid { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.foot-name { font-family: var(--mono); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .4rem; }
.foot-social { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-content: start; max-width: 27rem; }
.foot-social a { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.foot-social a:hover { color: var(--accent); }

/* ------------------------------------------------------------- typography */

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.14; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); margin: 0 0 .9rem; }
h2 { font-size: clamp(1.35rem, 2.8vw, 1.75rem); margin: 0 0 .55rem; }
h3 { font-size: 1.15rem; margin: 0 0 .35rem; }

p { margin: 0 0 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.lede { font-family: var(--serif); font-weight: 300; font-size: 1.28rem; line-height: 1.5; color: var(--muted); max-width: var(--measure); }

/* every label is a filing label */
.meta, .eyebrow, .availability, .series-kind, .crumbs, .more, .pill, .buy-soon {
  font-family: var(--mono); text-transform: uppercase;
}
.meta { font-size: .66rem; letter-spacing: .11em; color: var(--muted); margin: 0 0 .45rem; }
.eyebrow {
  font-size: .68rem; letter-spacing: .16em; color: var(--accent);
  margin: 0 0 1.3rem; padding: .35rem 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong);
  display: inline-block; padding-inline: .55rem;
}
.availability { font-size: .66rem; letter-spacing: .11em; color: var(--accent); margin: 0 0 1.4rem; }
.series-kind { font-size: .64rem; letter-spacing: .13em; color: var(--muted); margin: -.7rem 0 .7rem; }

.tagline { font-style: italic; font-weight: 300; color: var(--muted); margin: .35rem 0 0; font-size: .98rem; line-height: 1.45; }
.tagline-lg { font-style: italic; font-weight: 300; font-size: 1.38rem; line-height: 1.4; color: var(--fg); margin: 0 0 1.4rem; }
.comps { font-style: italic; font-weight: 300; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 1rem; font-size: .96rem; }
.subtitle { font-style: italic; font-weight: 300; color: var(--muted); font-size: 1.15rem; margin: -.3rem 0 1rem; }

/* ------------------------------------------------------------- components */

.btn {
  display: inline-block; font-family: var(--mono); font-size: .7rem;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  padding: .7rem 1.25rem; margin: 0 .45rem .55rem 0;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.pill { display: inline-block; font-size: .6rem; letter-spacing: .13em; border: 1px solid var(--rule-strong); color: var(--ink); padding: .18rem .5rem; margin: 0 0 .5rem; background: var(--paper-2); }
.pill-free { border-color: var(--accent); color: var(--accent); background: transparent; }

/* hero — a specimen sheet: label rule, then plates laid out in a row */
.hero { padding: 3.5rem 0 3rem; border-bottom: 1px solid var(--rule-strong); }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); max-width: 22ch; margin-bottom: 1.5rem; }
.hero-actions { margin-top: 1.75rem; }
.hero-covers {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule);
}
.hero-covers .hc { width: 100%; border: 1px solid var(--rule-card); padding: .4rem; background: var(--card); }

.page-head { padding: 3.25rem 0 1.5rem; border-bottom: 1px solid var(--rule-strong); margin-bottom: 2.25rem; }

.band { padding: 2.75rem 0 1rem; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--rule-strong); padding-bottom: .5rem; margin-bottom: 1.4rem; }
.band-head h2 { margin: 0; }
.more { font-size: .66rem; letter-spacing: .12em; color: var(--accent); text-decoration: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1.5rem; }

/* each book is a catalogue card */
.book-card {
  display: flex; flex-direction: column; gap: .85rem;
  background: var(--card); border: 1px solid var(--rule-card); padding: .9rem;
}
.book-card h3 { margin: 0; font-size: 1.05rem; }
.book-card h3 a { text-decoration: none; }
.book-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.book-card-body { display: flex; flex-direction: column; }

.cover { width: 100%; border: 1px solid var(--rule-card); }
.cover-none {
  aspect-ratio: 1 / 1.6; display: grid; place-items: center; text-align: center;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border: 1px dashed var(--rule-card); background: var(--paper-2);
}

.feature {
  display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: 2.5rem;
  align-items: start; background: var(--card); border: 1px solid var(--rule-card); padding: 1.75rem;
}
.feature-cover { max-width: 16rem; border: 1px solid var(--rule-card); }

.book-detail { display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); gap: 3rem; align-items: start; padding: .5rem 0 2rem; }
.book-detail-cover { background: var(--card); border: 1px solid var(--rule-card); padding: 1rem; }
.book-detail-body { max-width: var(--measure); }
.book-detail-body h1 { margin-bottom: .5rem; }
.buy { margin-top: 1.4rem; }
.buy .btn { display: block; text-align: center; margin: 0 0 .5rem; }
.buy-soon { margin-top: 1.2rem; font-size: .66rem; letter-spacing: .11em; color: var(--accent); }

.crumbs { font-size: .64rem; letter-spacing: .12em; color: var(--muted); padding: 1.75rem 0 1.4rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--rule-strong); margin: 0 .4rem; }
.crumbs span[aria-current] { color: var(--fg); margin: 0; }

.prose { max-width: var(--measure); padding-bottom: 2rem; }
.prose h2 { margin-top: 2.6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--rule); }
.prose h3 { margin-top: 1.9rem; font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
.post h1 { margin-bottom: 1.4rem; }

.post-list { list-style: none; padding: 0; margin: 0; max-width: 48rem; }
.post-list li { background: var(--card); border: 1px solid var(--rule-card); padding: 1.5rem; margin-bottom: 1.25rem; }
.post-list h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.post-list h2 a { text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }

.cta { background: var(--card); border: 1px solid var(--rule-strong); padding: 2.25rem; margin: 4rem 0 1rem; max-width: 42rem; }
.cta h2 { margin-bottom: .6rem; }

/* form controls — inherit the dark ground rather than the UA's white */
input, textarea, select, button {
  font-family: var(--serif); font-size: 1rem; color: var(--fg);
  background: var(--paper-2); border: 1px solid var(--rule-strong);
  padding: .6rem .75rem; max-width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
label { font-family: var(--mono); font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); display: block; margin: 0 0 .35rem; }
button, input[type="submit"] {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border-color: var(--ink); cursor: pointer; padding: .7rem 1.25rem;
}
button:hover, input[type="submit"]:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ---------------------------------------------------------------- mobile */

@media (max-width: 760px) {
  body { font-size: 1.05rem; }
  .site-head { padding: 1.25rem 1.1rem .9rem; }
  main { padding: 0 1.1rem; }
  .site-foot { padding: 1.75rem 1.1rem 3rem; }
  .hero { padding: 2.5rem 0 2.25rem; }
  .hero-covers { grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 2.25rem; }
  .feature, .book-detail { grid-template-columns: 1fr; gap: 1.75rem; padding: 1.1rem; }
  .feature-cover { max-width: 12rem; }
  .book-detail { padding: 0; }
  .book-detail-cover { max-width: 15rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1rem; }
  .book-card { padding: .65rem; }
  .cta { padding: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
