/* ABDI Publishing storefront — shared stylesheet. Colors come from per-vertical tokens set inline on :root. */
:root {
  --bg: #F6F4EF; --ink: #1C1C1A; --accent: #1F4D3A; --rule: #C9C4B8; --muted: #5E5B55; --tile: #E9E5DB;
  --surface: #FFFFFF; --on-accent: #FFFFFF; --accent-hover: #173D2E; --focus: #1F4D3A; --notice: #FFF7E0; --notice-ink: #5A4300;
  --serif: "Caladea", Georgia, "Times New Roman", serif;
  --sans: "Carlito", Calibri, "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px; --gutter: clamp(16px, 4vw, 40px);
  --r: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141513; --ink: #ECE9E1; --accent: #7FB79A; --rule: #3A3C37; --muted: #A9A59B; --tile: #22241F;
    --surface: #1B1D1A; --on-accent: #0F1A14; --accent-hover: #9CCBB1; --focus: #9CCBB1; --notice: #2D2717; --notice-ink: #F1DFA6;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.125rem/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.eyebrow { font: 700 .82rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.bar { width: 72px; height: 6px; background: var(--accent); border: 0; margin: 0 0 1.4rem; }
.lede { font: italic 400 clamp(1.2rem, 2.2vw, 1.45rem)/1.45 var(--serif); color: var(--ink); max-width: 38em; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { font: 700 1.05rem/1 var(--serif); color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 14px; height: 14px; background: var(--accent); border-radius: 2px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 10px 12px; border-radius: var(--r); min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--tile); }
.site-footer { border-top: 1px solid var(--rule); margin-top: 96px; padding: 48px 0 64px; font-size: .95rem; color: var(--muted); }
.site-footer .cols { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h2 { font: 700 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); }

/* buttons & price */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: var(--r);
  font: 700 1.05rem/1 var(--sans); text-decoration: none; cursor: pointer; border: 2px solid var(--accent); transition: background-color .18s, color .18s; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-soon { background: var(--tile); color: var(--ink); border-color: var(--rule); cursor: default; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--tile); }
.price { font: 700 2rem/1 var(--serif); }
.price s { font-size: 1.1rem; color: var(--muted); font-weight: 400; margin-left: 8px; }
.buy-box { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 1.6rem 0 1rem; }
.buy-box form { margin: 0; }
.fine { font-size: .92rem; color: var(--muted); }

/* hero */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); }
.hero .wrap { display: grid; gap: clamp(32px, 6vw, 72px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.25fr .75fr; } }
.cover { box-shadow: 10px 12px 0 var(--tile), 0 1px 2px rgba(0,0,0,.08); border-radius: 2px; aspect-ratio: 2 / 3; background: var(--tile); }
.cover-wrap { max-width: 360px; justify-self: center; width: 100%; }
.cover-wrap a { display: block; }
.hero .wrap > *, .grid-2 > *, .grid-3 > * { min-width: 0; }

/* topic grid motif from the cover */
.topics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 2rem 0 0; max-width: 560px; }
.topics span { font: 700 .72rem/1 var(--sans); letter-spacing: .12em; color: var(--muted); padding-bottom: 8px; }
.topics i { display: block; height: 14px; background: var(--tile); border-radius: 2px; }
.topics i.on { background: var(--accent); }

/* sections */
section.band { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--rule); }
.grid-2 { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stat { border-top: 3px solid var(--accent); padding-top: 14px; }
.stat b { display: block; font: 700 2.4rem/1 var(--serif); margin-bottom: 6px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 24px; }
.parts { counter-reset: part; list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.parts > li { border-top: 1px solid var(--rule); padding: 18px 0; display: grid; grid-template-columns: 64px 1fr; gap: 12px; }
.parts > li .num { font: 700 .82rem/1.6 var(--sans); letter-spacing: .12em; color: var(--accent); }
.parts > li h3 { margin: 0 0 4px; font-size: 1.2rem; }
.parts > li p { margin: 0; color: var(--muted); font-size: 1rem; }
.check { list-style: none; padding: 0; margin: 0; }
.check li { padding: 10px 0 10px 32px; border-top: 1px solid var(--rule); position: relative; }
.check li::before { content: ""; position: absolute; left: 2px; top: 18px; width: 14px; height: 14px; background: var(--accent); border-radius: 2px; }
.check.no li::before { background: transparent; border: 2px solid var(--muted); }
.faq details { border-top: 1px solid var(--rule); padding: 6px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font: 700 1.15rem/1.4 var(--serif); padding: 14px 32px 14px 0; list-style: none; position: relative; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 1.5rem/1 var(--sans); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink); max-width: 46em; }
.notice { background: var(--notice); color: var(--notice-ink); border-left: 4px solid currentColor; padding: 14px 18px; border-radius: 4px; margin: 0 0 24px; }
.draft-banner { background: var(--notice); color: var(--notice-ink); text-align: center; font-weight: 700; padding: 10px var(--gutter); font-size: .95rem; }
.prose { max-width: 46em; }
.prose h2 { font-size: 1.6rem; margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose li { margin: 4px 0; }
.catalog { display: grid; gap: 32px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.catalog a.book { text-decoration: none; color: var(--ink); display: block; }
.catalog a.book img { margin-bottom: 14px; }
.catalog a.book:hover h2 { text-decoration: underline; }
.catalog h2 { font-size: 1.3rem; }
.toc-list { columns: 2 260px; column-gap: 40px; padding-left: 1.2em; }
.toc-list li { break-inside: avoid; margin: 4px 0; }

/* forms */
form.stack { display: grid; gap: 18px; max-width: 520px; }
label { font-weight: 700; display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--rule); border-radius: var(--r); padding: 12px 14px; min-height: 48px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { min-height: 160px; resize: vertical; }
.hint { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.error { color: #A1260D; font-weight: 700; font-size: .95rem; margin-top: 4px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* consent banner */
.consent { position: fixed; inset: auto 12px 12px 12px; max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--rule);
  border-radius: 10px; padding: 18px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.12); z-index: 20; font-size: .98rem; }
.consent p { margin-bottom: 12px; }
.consent .row { display: flex; flex-wrap: wrap; gap: 10px; }
.consent .btn { min-height: 44px; padding: 0 18px; font-size: .95rem; }
.consent[hidden] { display: none; }

/* admin */
.admin table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.admin th, .admin td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.admin th { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.admin .table-wrap { overflow-x: auto; }
.tag { display: inline-block; font: 700 .75rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 4px; background: var(--tile); color: var(--ink); }
.tag.ok { background: var(--accent); color: var(--on-accent); }
.tag.warn { background: var(--notice); color: var(--notice-ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .consent { display: none; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
