/* ============================================================
   THE CARTOGRAPHER'S GUILD — Invisible City Press
   Heritage-artifact storefront. Design language + theming.
   ============================================================ */

/* ---- Palettes ---------------------------------------------- */
:root {
  /* Ink (dark) palette — warm near-black */
  --ink-bg:      oklch(0.185 0.014 64);
  --ink-bg-2:    oklch(0.228 0.016 64);
  --ink-bg-3:    oklch(0.272 0.018 62);
  --ink-line:    oklch(0.40 0.022 68);
  --ink-line-2:  oklch(0.33 0.020 66);
  --ink-text:    oklch(0.925 0.022 84);
  --ink-dim:     oklch(0.745 0.022 82);
  --ink-faint:   oklch(0.56 0.020 78);

  /* Paper (parchment) palette — aged warm */
  --paper-bg:    oklch(0.918 0.022 86);
  --paper-bg-2:  oklch(0.886 0.026 84);
  --paper-bg-3:  oklch(0.952 0.018 88);
  --paper-line:  oklch(0.74 0.030 72);
  --paper-line-2:oklch(0.82 0.026 78);
  --paper-text:  oklch(0.275 0.024 56);
  --paper-dim:   oklch(0.455 0.026 58);
  --paper-faint: oklch(0.60 0.026 62);

  /* Accents (shared) — set chroma/lightness equal, vary hue */
  --gold:        oklch(0.715 0.105 78);
  --gold-deep:   oklch(0.612 0.110 70);
  --rust:        oklch(0.545 0.130 38);
  --verdigris:   oklch(0.580 0.060 192);

  /* Active accent (tweakable) */
  --accent:      var(--gold);
  --accent-deep: var(--gold-deep);

  --texture-opacity: 0.5;

  --maxw: 1240px;
  --radius: 3px;
  --shadow-card: 0 1px 2px rgba(0,0,0,.10), 0 18px 40px -24px rgba(0,0,0,.45);

  --serif: "Cormorant Garamond", Georgia, serif;
  --body:  "EB Garamond", Georgia, serif;
  --mono:  "Space Mono", "Courier New", monospace;
}

/* Theme: which palette drives the page surfaces */
:root[data-theme="dark"] {
  --bg: var(--ink-bg); --surface: var(--ink-bg-2); --surface-2: var(--ink-bg-3);
  --line: var(--ink-line); --line-2: var(--ink-line-2);
  --text: var(--ink-text); --dim: var(--ink-dim); --faint: var(--ink-faint);
}
:root[data-theme="parchment"], :root[data-theme="balanced"] {
  --bg: var(--paper-bg); --surface: var(--paper-bg-3); --surface-2: var(--paper-bg-2);
  --line: var(--paper-line); --line-2: var(--paper-line-2);
  --text: var(--paper-text); --dim: var(--paper-dim); --faint: var(--paper-faint);
}

/* "band--ink" = a section that always renders on the ink palette
   (hero, section heads in balanced, footer). */
.band--ink {
  --surface: var(--ink-bg-2); --surface-2: var(--ink-bg-3);
  --line: var(--ink-line); --line-2: var(--ink-line-2);
  --text: var(--ink-text); --dim: var(--ink-dim); --faint: var(--ink-faint);
  background: var(--ink-bg);
  color: var(--ink-text);
}
/* In dark theme the page is already ink, so bands sink into it (no seam). */
:root[data-theme="dark"] .band--ink { background: transparent; }

/* ---- Reset / base ------------------------------------------ */
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  transition: background .4s ease, color .4s ease;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* Paper grain + vignette overlay */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  opacity: var(--texture-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9989; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, transparent 55%, rgba(0,0,0,.16) 100%);
  opacity: calc(var(--texture-opacity) * 1.1);
}

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

/* ---- Utility header ---------------------------------------- */
.util {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.util__row {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 32px;
  display: flex; align-items: center; gap: 24px;
}
.colophon { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.colophon__mark {
  width: 34px; height: 34px; border: 1px solid var(--accent);
  border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 17px;
  color: var(--accent); flex: none;
}
.colophon__name {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--dim); line-height: 1.4;
}
.colophon__name b { display: block; color: var(--text); font-weight: 700; letter-spacing: .18em; }
.util__spacer { flex: 1; }
.util__actions { display: flex; align-items: center; gap: 8px; }

.btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 10px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: transparent; color: var(--text); transition: all .18s ease;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost { border-color: transparent; color: var(--dim); }
.btn--ghost:hover { color: var(--text); border-color: var(--line); }
.btn--gold {
  background: var(--accent); color: var(--ink-bg); border-color: var(--accent);
  font-weight: 700;
}
.btn--gold:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--ink-bg); }
.btn--sm { padding: 7px 12px; font-size: 10px; }

.satchel { position: relative; }
.satchel__count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--accent); color: var(--ink-bg);
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
}
.member-chip { display: none; align-items: center; gap: 9px; }
.member-chip__av {
  width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2);
  border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 14px;
}
.member-chip__name { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.member-chip__name b { display: block; color: var(--text); font-size: 11px; letter-spacing:.08em; }
:root[data-signed-in="true"] .member-chip { display: flex; }
:root[data-signed-in="true"] .util__guest { display: none; }

/* ---- Hero -------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero__map {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(color-mix(in oklab, var(--accent) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--accent) 22%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(110% 90% at 78% 30%, #000 0%, transparent 62%);
          mask-image: radial-gradient(110% 90% at 78% 30%, #000 0%, transparent 62%);
}
.hero__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 96px 32px 84px;
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
  position: relative; z-index: 1;
}
.hero__eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 22px;
  display: flex; align-items: center; gap: 14px;
}
.hero__eyebrow::before { content: ""; width: 38px; height: 1px; background: var(--accent); }
.hero__title {
  font-family: var(--serif); font-weight: 600; font-size: clamp(54px, 9vw, 120px);
  line-height: .92; letter-spacing: -.01em; margin: 0; color: var(--text);
}
.hero__title em { font-style: italic; color: var(--accent); }
.hero__lede {
  font-size: 22px; line-height: 1.5; color: var(--dim); max-width: 56ch; margin: 28px 0 0;
}
.hero__byline {
  margin: 30px 0 36px; font-family: var(--mono); font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
}
.hero__byline b { color: var(--text); }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__cta .btn { padding: 14px 22px; font-size: 12px; }

/* compass — simple concentric geometry */
.compass { width: 240px; height: 240px; position: relative; opacity: .92; }
.compass__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line); }
.compass__ring--2 { inset: 26px; border-color: var(--line-2); }
.compass__ring--3 { inset: 64px; border-style: dashed; border-color: color-mix(in oklab, var(--accent) 50%, transparent); }
.compass__needle {
  position: absolute; left: 50%; top: 50%; width: 2px; height: 78px;
  background: linear-gradient(var(--accent), transparent);
  transform-origin: bottom center; transform: translate(-50%, -100%) rotate(28deg);
}
.compass__needle--s {
  height: 60px; background: linear-gradient(var(--faint), transparent);
  transform: translate(-50%, -100%) rotate(208deg);
}
.compass__hub {
  position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 20%, transparent);
}
.compass__tick {
  position: absolute; left: 50%; top: 50%; font-family: var(--mono); font-size: 12px;
  letter-spacing: .1em; color: var(--dim);
}
.compass__tick--n { transform: translate(-50%, -116px); color: var(--accent); }
.compass__tick--s { transform: translate(-50%, 104px); }
.compass__tick--e { transform: translate(104px, -50%); }
.compass__tick--w { transform: translate(-124px, -50%); }

/* ---- Filter bar -------------------------------------------- */
.filter {
  position: sticky; top: 59px; z-index: 50;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.filter__row {
  max-width: var(--maxw); margin: 0 auto; padding: 0 32px;
  display: flex; align-items: stretch; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.filter__row::-webkit-scrollbar { display: none; }
.filter__btn {
  position: relative; background: transparent; border: 0; color: var(--dim);
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  padding: 18px 16px; white-space: nowrap; transition: color .18s ease;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.filter__btn .n { color: var(--faint); margin-right: 8px; }
.filter__btn:hover { color: var(--text); }
.filter__btn[aria-current="true"] { color: var(--text); border-bottom-color: var(--accent); }
.filter__btn[aria-current="true"] .n { color: var(--accent); }

/* ---- Section ----------------------------------------------- */
.section { padding: 72px 0 8px; scroll-margin-top: 110px; }
.section__head { max-width: var(--maxw); margin: 0 auto; padding: 0 32px 40px; }
.section__rule {
  display: flex; align-items: center; gap: 18px; margin-bottom: 26px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--accent);
}
.section__rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section__rule .diamond { width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); flex: none; }
.section__title {
  font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 5vw, 62px);
  line-height: 1.04; letter-spacing: -.01em; margin: 0; color: var(--text); max-width: 18ch;
}
.section__tagline {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(20px, 2.1vw, 27px); line-height: 1.2;
  color: var(--accent); margin: 16px 0 0; max-width: 28ch;
}
.section__meta {
  display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 20px; align-items: baseline;
}
.section__desc { font-size: 19px; color: var(--dim); max-width: 92ch; line-height: 1.6; margin: 22px 0 0; }
.section__tags { display: flex; gap: 18px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.section__tags b { color: var(--text); }

/* ---- Grid + cards ------------------------------------------ */
.grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
@media (max-width: 1080px){ .grid { grid-template-columns: repeat(3, 1fr); } .hero__inner{grid-template-columns:1fr;} .compass{display:none;} }
@media (max-width: 760px){ .grid { grid-template-columns: repeat(2, 1fr); } .wrap,.util__row,.filter__row,.hero__inner,.section__head,.grid{padding-left:20px;padding-right:20px;} }
@media (max-width: 460px){ .grid { grid-template-columns: 1fr; } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  cursor: pointer;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 30px 60px -28px rgba(0,0,0,.6); }
.card--soon { cursor: default; opacity: .82; }
.card--soon:hover { transform: none; border-color: var(--line-2); box-shadow: var(--shadow-card); }

.card__plate { position: relative; padding: 16px 16px 0; }
.card__cover {
  width: 100%; aspect-ratio: 5 / 7; display: block;
  /* image-slot empty-state stays light in every theme — a tipped-in book plate */
  color: oklch(0.30 0.02 60);
  background: linear-gradient(135deg, oklch(0.93 0.02 86), oklch(0.88 0.028 82));
}
.card__cover::part(frame) {
  background:
    linear-gradient(135deg, oklch(0.93 0.02 86), oklch(0.88 0.028 82));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), inset 0 2px 14px rgba(0,0,0,.06);
}
/* badges + checkbox stamped over the cover */
.card__badge {
  position: absolute; left: 24px; top: 24px; z-index: 3;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; padding: 5px 8px; border-radius: 2px;
  background: var(--ink-bg); color: var(--ink-text);
  border: 1px solid color-mix(in oklab, var(--accent) 60%, transparent);
}
.card__badge[data-fmt="HTML"]  { color: var(--gold); }
.card__badge[data-fmt="PDF"]   { color: oklch(0.78 0.09 196); border-color: color-mix(in oklab, oklch(0.78 0.09 196) 55%, transparent); }
.card__badge[data-fmt="PRINT"] { color: oklch(0.74 0.10 38); border-color: color-mix(in oklab, oklch(0.74 0.10 38) 55%, transparent); }

.shortlist {
  position: absolute; right: 24px; top: 24px; z-index: 4;
  width: 30px; height: 30px; display: grid; place-items: center;
}
.shortlist input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.shortlist__stamp {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: color-mix(in oklab, var(--ink-bg) 60%, transparent);
  backdrop-filter: blur(4px);
  display: grid; place-items: center; color: var(--ink-text);
  font-family: var(--mono); font-size: 14px; transition: all .16s ease;
}
.shortlist__stamp::before { content: "+"; }
.shortlist input:hover + .shortlist__stamp { border-color: var(--accent); color: var(--accent); }
.shortlist input:checked + .shortlist__stamp {
  background: var(--accent); border-color: var(--accent); color: var(--ink-bg); transform: rotate(8deg);
}
.shortlist input:checked + .shortlist__stamp::before { content: "\2713"; }

.card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__series { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.card__title { font-family: var(--serif); font-weight: 600; font-size: 25px; line-height: 1.04; margin: 0; color: var(--text); text-wrap: balance; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--faint); margin-top: 2px; }
.card__meta span { display: inline-flex; gap: 5px; }
.card__meta b { color: var(--dim); font-weight: 400; }
.card__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__price { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--text); }
.card__price s { font-size: 16px; color: var(--faint); margin-left: 8px; }
.card__price--free { font-size: 14px; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }

.card__action {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--accent);
  background: var(--accent); color: var(--ink-bg); font-weight: 700; transition: all .16s ease; white-space: nowrap;
}
.card__action:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.card__action--owned { background: transparent; color: var(--accent); }
.card__action--owned:hover { background: var(--accent); color: var(--ink-bg); }
.card__action--soon { background: transparent; color: var(--faint); border-color: var(--line); cursor: default; }
.card__action--soon:hover { background: transparent; color: var(--faint); border-color: var(--line); }

.owned-tag {
  position: absolute; left: 24px; top: 24px; z-index: 3;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 2px; background: var(--accent); color: var(--ink-bg);
  display: none;
}
.card[data-owned="true"] .owned-tag { display: block; }
.card[data-owned="true"] .card__badge { display: none; }

/* ---- Overlays / modals ------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: color-mix(in oklab, var(--ink-bg) 72%, transparent);
  backdrop-filter: blur(6px); padding: 32px; overflow-y: auto;
}
.overlay[data-open="true"] { display: grid; place-items: center; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 460px; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.7); position: relative; animation: rise .26s cubic-bezier(.2,.7,.3,1);
}
.modal--wide { max-width: 940px; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.modal__x { position: absolute; right: 14px; top: 12px; background: transparent; border: 0; color: var(--dim); font-size: 22px; line-height: 1; padding: 6px; }
.modal__x:hover { color: var(--accent); }
.modal__pad { padding: 40px; }
.modal__brandmark { width: 44px; height: 44px; border: 1px solid var(--accent); color: var(--accent); border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 0 auto 18px; }
.modal__eyebrow { text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.modal__title { text-align: center; font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.05; margin: 0 0 6px; }
.modal__sub { text-align: center; color: var(--dim); font-size: 17px; margin: 0 0 26px; }

.tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: var(--radius); padding: 4px; margin-bottom: 22px; }
.tabs button { flex: 1; background: transparent; border: 0; color: var(--dim); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 10px; border-radius: 2px; }
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.2); }

.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 13px 14px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); font-family: var(--body); font-size: 17px;
}
.field input:focus { outline: none; border-color: var(--accent); }
.btn--block { width: 100%; justify-content: center; padding: 15px; font-size: 12px; }
.modal__note { text-align: center; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--faint); margin: 16px 0 0; line-height: 1.7; }
.modal__note .auth0 { color: var(--accent); }
.divider-or { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--faint); font-family: var(--mono); font-size: 10px; letter-spacing: .2em; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Quick look */
.ql { display: grid; grid-template-columns: 420px 1fr; gap: 0; }
.ql__cover { background: var(--surface-2); padding: 26px; display: grid; place-items: center; }
.ql__cover image-slot { width: 100%; height: 540px; color: oklch(0.30 0.02 60); background: linear-gradient(135deg, oklch(0.93 0.02 86), oklch(0.88 0.028 82)); }
.ql__cover image-slot::part(frame){ background: linear-gradient(135deg, oklch(0.93 0.02 86), oklch(0.88 0.028 82)); }
.ql__body { padding: 36px; }
.ql__series { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.ql__title { font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1; margin: 0 0 16px; }
.ql__desc { color: var(--dim); font-size: 18px; line-height: 1.55; margin: 0 0 22px; white-space: pre-line; }
.ql__specs { list-style: none; padding: 0; margin: 0 0 26px; border-top: 1px solid var(--line-2); }
.ql__specs li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--faint); }
.ql__specs li b { color: var(--text); font-weight: 400; }
.ql__buy { display: flex; align-items: center; gap: 18px; }
.ql__buy .card__price { font-size: 34px; }
@media (max-width: 620px){ .ql { grid-template-columns: 1fr; } .ql__cover{ padding: 24px 24px 0; } .ql__cover image-slot { height: 70vh; max-height: 460px; } .modal__pad{padding:28px;} }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(140%);
  z-index: 120; background: var(--ink-bg-2); color: var(--ink-text);
  border: 1px solid var(--accent); border-radius: var(--radius); padding: 16px 22px;
  display: flex; align-items: center; gap: 16px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.7);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; max-width: 90vw;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.toast[data-show="true"] { transform: translateX(-50%) translateY(0); }
.toast__spin { width: 16px; height: 16px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast b { color: var(--gold); }

/* ---- Footer ------------------------------------------------ */
.foot { margin-top: 84px; padding: 72px 0 44px; }
.foot__grid { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.foot__title { font-family: var(--serif); font-weight: 600; font-size: 32px; margin: 0 0 12px; }
.foot__p { color: var(--dim); max-width: 42ch; line-height: 1.6; }
.foot h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 10px; }
.foot a { color: var(--dim); text-decoration: none; font-size: 16px; }
.foot a:hover { color: var(--text); }
.foot__base { max-width: var(--maxw); margin: 48px auto 0; padding: 26px 32px 0; border-top: 1px solid var(--line-2);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

@media (max-width: 760px){ .foot__grid{ grid-template-columns: 1fr; gap: 32px; } .hero__inner{padding:64px 20px 56px;} }

.hidden { display: none !important; }

/* ============================================================
   Footer page modals — About / Formats / Library / Contact
   ============================================================ */

/* Shared: a left-aligned heading block (vs the centered auth heads) */
.sheet__head { margin-bottom: 26px; }
.sheet__eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; display: flex; align-items: center; gap: 12px; }
.sheet__eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--accent); }
.sheet__title { font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1.02; margin: 0; letter-spacing: -.01em; }

/* ---- About ------------------------------------------------- */
.about { display: grid; grid-template-columns: 1.55fr 1fr; gap: 40px; align-items: start; }
.about__lead { font-family: var(--serif); font-style: italic; font-size: 25px; line-height: 1.35; color: var(--text); margin: 0 0 20px; }
.about__p { color: var(--dim); font-size: 18px; line-height: 1.62; margin: 0 0 16px; max-width: 54ch; }
.about__ledger { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px 22px; background: var(--surface-2); }
.about__ledger dl { margin: 0; }
.about__row { display: flex; flex-direction: column; gap: 3px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.about__row:last-child { border-bottom: 0; }
.about__row dt { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin: 0; }
.about__row dd { margin: 0; font-family: var(--serif); font-size: 19px; color: var(--text); line-height: 1.2; }
@media (max-width: 720px){ .about { grid-template-columns: 1fr; gap: 28px; } }

/* ---- Reading Formats --------------------------------------- */
.formats { list-style: none; margin: 0; padding: 0; }
.format { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line-2); }
.format:last-of-type { border-bottom: 0; }
.format__badge { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; padding: 7px 11px; border-radius: var(--radius); background: var(--ink-bg-2); color: var(--gold); border: 1px solid var(--line); white-space: nowrap; margin-top: 3px; }
.format__name { font-family: var(--serif); font-weight: 600; font-size: 24px; margin: 0 0 6px; line-height: 1.1; }
.format__what { color: var(--dim); font-size: 17px; line-height: 1.55; margin: 0 0 10px; }
.format__how { font-family: var(--mono); font-size: 12px; letter-spacing: .03em; color: var(--faint); line-height: 1.7; margin: 0; }
.format__how b { color: var(--text); font-weight: 400; }

/* ---- Member Library ---------------------------------------- */
.lib__intro { color: var(--dim); font-size: 18px; line-height: 1.55; margin: -10px 0 22px; max-width: 56ch; }
.lib__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); max-height: 50vh; overflow: auto; }
.lib__item { display: flex; align-items: center; gap: 18px; padding: 16px 2px; border-bottom: 1px solid var(--line-2); }
.lib__cover { width: 46px; height: 60px; flex: none; border-radius: 2px; background: var(--surface-2); border: 1px solid var(--line-2); overflow: hidden; }
.lib__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib__meta { flex: 1; min-width: 0; }
.lib__series { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 3px; }
.lib__name { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.05; margin: 0; }
.lib__fmt { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--faint); margin-top: 2px; }
.lib__empty { text-align: center; padding: 10px 0 6px; }
.lib__empty .modal__brandmark { margin: 0 auto 16px; }
.lib__cta { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }

/* ---- Contact ----------------------------------------------- */
.contact__direct { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface-2); padding: 16px 20px; margin: -8px 0 24px; }
.contact__direct span { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.contact__direct a { font-family: var(--serif); font-size: 22px; color: var(--accent); text-decoration: none; }
.contact__direct a:hover { color: var(--text); }
.field textarea {
  width: 100%; padding: 13px 14px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); font-family: var(--body); font-size: 17px;
  resize: vertical; min-height: 110px; line-height: 1.5;
}
.field textarea:focus { outline: none; border-color: var(--accent); }
