/* Learnli Publications design system, V1 (reconciled with the Learnli Publications design direction).
   Self-contained: pages link only this file. Same-origin; no fonts, scripts or inline styles (compatible with style-src 'self'). */

:root {
  /* Heritage Forest palette */
  --forest: #1E3A2F;     /* Deep Forest: primary dark (header, hero, footer, headings, selected states) */
  --brass: #C7A867;      /* Antique Brass: accents, labels, dividers, emphasis; text on Deep Forest and the cover only */
  --ivory: #F5EFE1;      /* Ivory / parchment: primary light background */
  --paper: #FFFCF6;      /* Paper white: raised panels */
  --charcoal: #2A2C28;   /* Charcoal: body text */
  --sage-mid: #7F8F7B;   /* Sage: decorative only (not for text on light backgrounds) */
  /* Derived, so every text pairing meets WCAG AA (checked by tools/validate.mjs) */
  --brass-deep: #725618;   /* Brass for small text and rules on ivory / paper */
  --sage-deep: #4F5D4B;    /* Sage for secondary text on ivory / paper */
  --sage-light: #CCD6C7;   /* Sage for text on Deep Forest */
  --sage-mute: #AFBDAA;    /* Quieter sage for small notes on Deep Forest */
  --sage-soft: #E2E8DA;    /* Soft sage surface (labels, notices) */
  --forest-2: #284536;     /* Deep Forest, one step lighter (hover states) */
  --claret: #4A1B27;       /* Placeholder cover only: keeps the Atlas cover distinct from the page */
  --claret-2: #6A2A3A;
  --hair: #DAD6C0;
  --focus: #1F5FD6;
  --focus-on-dark: #F2DFA8;  /* Focus ring on Deep Forest (the blue ring is only 2.2:1 there) */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --measure: 62ch;
  --wrap: 74rem;
  --gutter: clamp(1.25rem, 4.5vw, 3rem);
  --section: clamp(4rem, 9vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--charcoal); font: 1.0625rem/1.75 var(--sans); }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--forest); letter-spacing: -.012em; line-height: 1.12; margin: 0 0 .55em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.15em; }
a { color: var(--forest); text-decoration-color: var(--brass-deep); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.site-header :focus-visible, .hero :focus-visible, .site-footer :focus-visible { outline-color: var(--focus-on-dark); }
em { font-style: italic; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.measure { max-width: var(--measure); }
.section { padding-block: var(--section); }
.section--paper { background: var(--paper); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.eyebrow { font: 600 .74rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--brass-deep); margin: 0 0 1.25rem; }
.lede { font-family: var(--serif); font-size: clamp(1.2rem, 2.3vw, 1.5rem); line-height: 1.55; color: var(--sage-deep); font-weight: 400; }
.rule { width: 2.75rem; height: 1px; background: var(--brass-deep); border: 0; margin: 0 0 1.75rem; }

.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--forest); color: var(--ivory); padding: .7rem 1rem; z-index: 10; }
.skip-link:focus { top: 1rem; }

/* Header and wordmark */
.site-header { background: var(--forest); color: var(--ivory); border-bottom: 1px solid rgba(199, 168, 103, .35); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2.5rem; padding-block: 1.25rem; }
.wordmark { display: inline-flex; align-items: baseline; text-decoration: none; color: var(--ivory); }
.wordmark__name { font-family: var(--serif); font-size: 1.6rem; letter-spacing: .005em; }
.wordmark__sub { margin-left: .95rem; padding-left: .95rem; border-left: 1px solid rgba(199, 168, 103, .6); font: 600 .68rem/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--brass); }
.site-nav { display: flex; flex-wrap: wrap; gap: .1rem 1.9rem; }
.site-nav a { color: var(--ivory); text-decoration: none; font-size: .92rem; letter-spacing: .02em; padding-block: .45rem; border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--brass); }

/* Hero */
.hero { background: var(--forest); color: var(--ivory); }
.hero h1, .hero h2 { color: var(--ivory); }
.hero .eyebrow { color: var(--brass); }
.hero .lede { color: var(--sage-light); }
.hero .wrap { display: grid; gap: 3.5rem; align-items: center; padding-block: var(--section); }
.hero--page .wrap { display: block; padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.hero--page h1 { margin-bottom: .3em; }
@media (min-width: 54rem) { .hero--split .wrap { grid-template-columns: 1.2fr .8fr; gap: 5rem; } }

/* On the dark hero the cover is lifted so it separates from the background */
.hero .cover { box-shadow: 0 2.4rem 4rem -1.4rem rgba(0, 0, 0, .6), 0 0 0 1px rgba(199, 168, 103, .55), inset 9px 0 0 rgba(0, 0, 0, .2), inset 10px 0 0 rgba(199, 168, 103, .2); }

/* Buttons and links */
.button { display: inline-block; padding: .85rem 1.6rem; border: 1px solid var(--brass); color: var(--forest); background: var(--brass); text-decoration: none; font-weight: 600; font-size: .95rem; letter-spacing: .03em; transition: background-color .2s ease, color .2s ease; margin: 0 .4rem .6rem 0; }
.button:hover { background: var(--ivory); border-color: var(--ivory); }
.button--ghost { background: transparent; color: var(--ivory); border-color: rgba(199, 168, 103, .7); }
.button--ghost:hover { background: var(--brass); border-color: var(--brass); color: var(--forest); }
.button--on-light { background: var(--forest); color: var(--ivory); border-color: var(--forest); }
.button--on-light:hover { background: var(--forest-2); border-color: var(--forest-2); color: var(--brass); }
.text-link { font-weight: 600; display: inline-block; padding-block: .5rem; }

/* Status labels: words carry meaning, colour is secondary */
.status { display: block; width: fit-content; margin: 0 0 1.1rem; font: 600 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .5rem .75rem; border: 1px solid currentColor; }
.status--in-development { color: var(--brass-deep); }
.status--under-consideration, .status--planned, .status--out-of-print { color: var(--sage-deep); }
.status--announced { color: #2A5877; }
.status--pre-order { color: #64408A; }
.status--available { color: #1D6342; }
.hero .status--in-development { color: var(--brass); }
.hero .status--under-consideration, .hero .status--planned, .hero .status--out-of-print { color: var(--sage-light); }
.hero .status--announced { color: #9CC4DD; }
.hero .status--pre-order { color: #C9B1E3; }
.hero .status--available { color: #93D9B0; }

/* Cover placeholder (CSS only). Replace with a same-origin PNG or SVG once rights are confirmed (the live host serves only .svg and .png). */
.cover { position: relative; aspect-ratio: 2 / 3; width: min(100%, 22rem); margin-inline: auto; background: linear-gradient(150deg, var(--claret-2), var(--claret) 70%); display: flex; flex-direction: column; justify-content: space-between; padding: 2.4rem 1.8rem 1.8rem 2.5rem; color: var(--ivory); text-align: center; box-shadow: 0 2.2rem 3.5rem -1.6rem rgba(74, 27, 39, .55), 0 .4rem 1rem -.4rem rgba(74, 27, 39, .3), inset 9px 0 0 rgba(0, 0, 0, .22), inset 10px 0 0 rgba(199, 168, 103, .14); }
.cover::before { content: ""; position: absolute; inset: .9rem .9rem .9rem 1.5rem; border: 1px solid rgba(199, 168, 103, .55); pointer-events: none; }
.cover__imprint { font: 600 .62rem/1.4 var(--sans); letter-spacing: .34em; text-transform: uppercase; color: var(--brass); }
.cover__title { font-family: var(--serif); font-size: clamp(1.6rem, 4.2vw, 2.1rem); line-height: 1.12; font-weight: 500; }
.cover__title small { display: block; font: 600 .66rem/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--brass); margin-top: 1rem; }
.cover__note { font: .68rem/1.5 var(--sans); letter-spacing: .06em; color: #E0CFC6; }
@media (max-width: 40rem) { .cover { width: min(100%, 17rem); } }
.cover--small { width: min(100%, 10rem); padding: 1.3rem .9rem 1rem 1.3rem; }
.cover--small::before { inset: .5rem .5rem .5rem .9rem; }
.cover--small .cover__title { font-size: 1.1rem; }
.cover--small .cover__note, .cover--small .cover__title small { display: none; }

/* Editorial statement band */
.statement { text-align: center; }
.statement .rule { margin-inline: auto; }
.statement__text { font-family: var(--serif); font-size: clamp(1.9rem, 4.6vw, 3.3rem); line-height: 1.2; letter-spacing: -.015em; color: var(--forest); margin: 0 auto; max-width: 20ch; font-weight: 400; }
.statement .eyebrow { margin-bottom: 1.5rem; }

/* Featured title */
.feature { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 54rem) { .feature { grid-template-columns: .8fr 1.2fr; gap: 6rem; } }
.feature .cover { width: min(100%, 19rem); }

/* Areas of publishing: numbered hairline list */
.areas { list-style: none; margin: 0; padding: 0; display: grid; counter-reset: area; }
@media (min-width: 46rem) { .areas { grid-template-columns: 1fr 1fr; column-gap: 4rem; } }
.areas li { counter-increment: area; display: grid; grid-template-columns: 2.75rem 1fr; padding-block: 1.6rem; border-top: 1px solid var(--hair); }
.areas li::before { content: counter(area, upper-roman); font-family: var(--serif); font-style: italic; color: var(--brass-deep); font-size: 1.15rem; padding-top: .15rem; }
.areas h3 { margin-bottom: .25em; font-size: 1.3rem; }
.areas p { margin: 0; color: var(--sage-deep); font-size: .98rem; }

/* Catalogue */
.catalogue { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--hair); }
.book-row { display: grid; gap: 1.75rem 3.5rem; padding-block: 2.75rem; border-top: 1px solid var(--hair); align-items: start; }
@media (min-width: 40rem) { .book-row { grid-template-columns: 11rem 1fr; } }
.book-row .cover--small { width: min(100%, 11rem); margin-inline: 0; }
.book-row h3 { font-size: clamp(1.7rem, 3.2vw, 2.2rem); margin-bottom: .25em; }
.book-row h3 a { text-decoration: none; }
.book-row h3 a:hover { text-decoration: underline; text-decoration-color: var(--brass-deep); }
.book-row__meta { color: var(--sage-deep); font-size: .95rem; margin-bottom: 1rem; }
.empty-slot { padding-block: 2.25rem; color: var(--sage-deep); font-family: var(--serif); font-style: italic; font-size: 1.1rem; border-top: 1px solid var(--hair); }
.format-chips { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; font-size: .84rem; }
.format-chips li { padding: .3rem .7rem; border: 1px solid var(--hair); color: var(--sage-deep); background: var(--paper); }
.format-chips .is-priority { border-color: var(--brass-deep); color: var(--forest); }

/* Availability explainer */
.statuses { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.statuses li { margin: 0; }
.statuses .status { margin: 0; }

/* Detail page */
.detail { display: grid; gap: 3.5rem; }
.detail h2 { margin-top: 3rem; }
.detail .notice + h2 { margin-top: 0; }
@media (min-width: 54rem) { .detail { grid-template-columns: 21rem 1fr; gap: 5.5rem; } .detail__aside { position: sticky; top: 2rem; align-self: start; } }
.facts { margin: 0 0 2.25rem; border-top: 1px solid var(--hair); }
.facts div { display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--hair); }
.facts dt { font-weight: 600; color: var(--forest); font-size: .95rem; }
.facts dd { margin: 0; color: var(--sage-deep); }
@media (max-width: 30rem) { .facts div { grid-template-columns: 1fr; gap: .1rem; } }
.notice { border-left: 2px solid var(--brass-deep); background: var(--sage-soft); padding: 1.1rem 1.4rem; margin: 0 0 2.5rem; font-size: .98rem; }
.tag { display: inline-block; margin-left: .5rem; font: 600 .68rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--forest); background: var(--sage-soft); border: 1px solid var(--brass-deep); padding: .35rem .55rem; vertical-align: middle; }

/* Edition selector: native radio group + :checked, no JavaScript.
   Without CSS every panel is shown. Radios stay focusable; the focus ring is drawn on the label. */
.editions { border: 0; margin: 0 0 2.5rem; padding: 0; min-width: 0; }
.editions legend { padding: 0; margin-bottom: 1rem; font: 600 .74rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--brass-deep); }
.ed-body { display: flex; flex-wrap: wrap; gap: .75rem; }
.ed-radio { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ed-tab { flex: 1 1 11rem; display: block; padding: 1rem 1.15rem; background: var(--paper); border: 1px solid var(--hair); border-top: 2px solid var(--hair); color: var(--forest); cursor: pointer; font-family: var(--serif); font-size: 1.2rem; line-height: 1.25; transition: border-color .2s ease, background-color .2s ease; }
.ed-tab small { display: block; margin-top: .3rem; font: .82rem/1.35 var(--sans); color: var(--sage-deep); }
.ed-tab:hover { border-top-color: var(--brass-deep); }
.ed-radio:checked + .ed-tab { background: var(--forest); border-color: var(--forest); border-top-color: var(--brass); color: var(--ivory); }
.ed-radio:checked + .ed-tab small { color: var(--sage-light); }
.ed-radio:focus-visible + .ed-tab { outline: 3px solid var(--focus); outline-offset: 3px; }
.ed-panels { flex-basis: 100%; }
.ed-panel { display: none; padding: 1.9rem; background: var(--paper); border: 1px solid var(--hair); border-top: 0; }
#ed-hardcover:checked ~ .ed-panels #panel-hardcover,
#ed-paperback:checked ~ .ed-panels #panel-paperback,
#ed-ebook:checked ~ .ed-panels #panel-ebook { display: block; }
.ed-panel h3 { margin-bottom: .4em; }
.ed-panel .facts { margin-bottom: 1.4rem; }
.ed-panel__buy h4 { font: 600 .74rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--brass-deep); margin: 0 0 .5rem; }
.ed-panel__buy p { margin: 0; color: var(--sage-deep); }

/* Where to buy. Rendered ONLY when a verified active listing exists (see docs/CATALOGUE.md). */
.buy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.buy-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: 1rem 0; border-top: 1px solid var(--hair); }
.buy-list .format { font-family: var(--serif); font-size: 1.15rem; color: var(--forest); }
.buy-list .format small { display: block; font: .85rem var(--sans); color: var(--sage-deep); }
.buy-list .button { margin: 0; }

/* Brand family */
.family { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .9rem; font-family: var(--serif); font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--sage-deep); }
.family li:not(:last-child)::after { content: "\2192"; margin-left: .9rem; color: var(--brass-deep); }
.family li:last-child { color: var(--forest); font-style: italic; }

/* Footer */
.site-footer { background: var(--forest); color: var(--sage-light); font-size: .95rem; border-top: 1px solid rgba(199, 168, 103, .35); }
.site-footer .wrap { display: grid; gap: 2.5rem; padding-block: 3.5rem; }
@media (min-width: 46rem) { .site-footer .wrap { grid-template-columns: 1.4fr 1fr; } }
.site-footer a { color: var(--ivory); text-decoration-color: var(--brass); }
.site-footer p { margin: 0 0 .7em; }
.site-footer .wordmark { margin-bottom: .9rem; }
.footer-tagline { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--brass); }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.6rem; }
.footer-links a { display: inline-block; padding-block: .3rem; }
.footer-family { font-size: .84rem; letter-spacing: .06em; color: var(--sage-mute); }

@media (forced-colors: active) { .ed-radio:checked + .ed-tab { outline: 3px solid Highlight; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .skip-link { display: none; } body { background: #fff; } .ed-panel { display: block !important; } .ed-tab { display: none; } }

/* Ebook launch */
.ebook-art{display:block;width:100%;max-width:31rem;height:auto;margin-inline:auto;border:1px solid var(--hair);box-shadow:0 1.4rem 3rem -1.4rem #101c1655}.book-row .ebook-art{max-width:12rem}.ebook-price{font:600 2rem/1.2 var(--sans);color:var(--forest)}.ebook-price span{font-size:.8rem}.ebook-features{padding-left:1.2rem}.ebook-features li{margin-bottom:.7rem}.ebook-buy{border-top:1px solid var(--hair);padding-top:1.4rem;margin-top:1.4rem}.ebook-buy label{display:block;font:600 .9rem var(--sans);margin-bottom:.5rem}.ebook-buy select{display:block;width:100%;padding:.8rem;border:1px solid var(--sage-deep);background:var(--paper);color:var(--forest);font:inherit;margin-bottom:1rem}.ebook-buy .button:disabled{opacity:.55;cursor:not-allowed}.ebook-preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;margin-top:2rem}.ebook-preview-grid img{width:100%;height:auto;border:1px solid var(--hair)}.small{font-size:.9rem}.hero .ebook-art{max-width:27rem}@media(max-width:45rem){.ebook-preview-grid{grid-template-columns:1fr}.ebook-art{max-width:25rem}}
