/* Timothy Mukoba Books: shared stylesheet (budget 60 KB; tools/qa/phase2.py fails the build above it).
   The design brief of 13 Oct 2026: paper and ink, one serif, hairline gold. Every colour is a token below;
   the same names and values as the author's home site (tokens.css). Light = paper; dark = ink-based paper, never
   pure black. Page-only rules live in home.css, book.css, shop.css, tracker.css, community.css, blog.css,
   editor.css, about.css, account.css, admin.css and delivery-map.css, loaded only by their pages. */

/* ================================================================== tokens */
:root {
  --ink: #0e1626; --ink-soft: #1c2740; --paper: #f6f1e7; --paper-deep: #ebe3d3; --paper-light: #fcfaf5; --paper-muted: #b9b3a5;
  --gold: #c9a227; --gold-deep: #9c7b15; --gold-text: #7a5f0e; --oxblood: #8a1c1c; --oxblood-deep: #6e1515; --amber: #c96405; --amber-text: #9e4e03;
  --muted: #5b6476; --border: #d9d0bf; --success: #2f6f4e; --warning: #8f5712; --danger: #8a1c1c;
  --success-bg: #e3eee6; --warning-bg: #f5e6cf; --danger-bg: #f3dcdc; --info-bg: #e9e2d2;
  /* Roles: the header, footer and hero are always ink; the page is paper. */
  --head-bg: var(--ink); --head-fg: var(--paper); --head-muted: var(--paper-muted);
  --surface: var(--paper-light); --sunken: var(--paper-deep); --text: var(--ink); --text-soft: #2a3346; --on-gold: var(--ink);
  --primary: var(--oxblood); --primary-hover: var(--oxblood-deep); --on-primary: var(--paper);
  --shadow-cover: 22px 30px 48px -18px rgba(14, 22, 38, .5), 3px 5px 12px rgba(14, 22, 38, .22);
  --shadow-soft: 0 12px 30px -16px rgba(14, 22, 38, .35);
  --shadow-lg: 0 2px 6px rgba(14, 22, 38, .08), 0 28px 70px rgba(14, 22, 38, .28);
  --font-display: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: var(--font-display); --sans: var(--font-body);
  --measure: 68ch; --wrap: 1200px; --gutter: 16px; --radius: 2px; --radius-sm: 2px; --radius-lg: 3px;
  --appbar-h: 64px; --tabbar-h: 64px; --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease-out: cubic-bezier(.22, .61, .36, 1); --ease: var(--ease-out); --t-slow: 650ms; --t-mid: 450ms;
  /* Per-book colours (set inline on .book-world) are kept for the admin editor and the cover mock-up only. */
  --book: var(--ink); --book2: var(--gold); --on-book: var(--paper); --book-tint: var(--paper-deep);
  color-scheme: light dark; accent-color: var(--gold-deep);
}
@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --paper: #121a2b; --paper-deep: #0e1626; --paper-light: #1c2740; --paper-muted: #aaa493; --ink: #ece4d2; --ink-soft: #d8cfbb;
    --gold: #d9b545; --gold-deep: #e2c45c; --gold-text: #e2c45c; --amber-text: #f0a65a; --muted: #aaa493; --border: #2f3a55;
    --success: #7fcf9f; --warning: #e9b45a; --danger: #f0948a; --success-bg: #16281f; --warning-bg: #2b2212; --danger-bg: #311a18; --info-bg: #1a2438;
    --head-bg: #0e1626; --head-fg: #ece4d2; --head-muted: #aaa493; --surface: #1c2740; --sunken: #0e1626; --text: #ece4d2; --text-soft: #d8cfbb; --on-gold: #0e1626;
    --on-primary: #f6f1e7; --book: #ece4d2; --on-book: #0e1626; --book-tint: #1c2740;
    --shadow-cover: 22px 30px 48px -18px rgba(0, 0, 0, .7), 3px 5px 12px rgba(0, 0, 0, .4); --shadow-soft: 0 12px 30px -16px rgba(0, 0, 0, .6); --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 28px 70px rgba(0, 0, 0, .6);
  }
}
:root[data-scheme="dark"] {
  color-scheme: dark;
  --paper: #121a2b; --paper-deep: #0e1626; --paper-light: #1c2740; --paper-muted: #aaa493; --ink: #ece4d2; --ink-soft: #d8cfbb;
  --gold: #d9b545; --gold-deep: #e2c45c; --gold-text: #e2c45c; --amber-text: #f0a65a; --muted: #aaa493; --border: #2f3a55;
  --success: #7fcf9f; --warning: #e9b45a; --danger: #f0948a; --success-bg: #16281f; --warning-bg: #2b2212; --danger-bg: #311a18; --info-bg: #1a2438;
  --head-bg: #0e1626; --head-fg: #ece4d2; --head-muted: #aaa493; --surface: #1c2740; --sunken: #0e1626; --text: #ece4d2; --text-soft: #d8cfbb; --on-gold: #0e1626;
  --on-primary: #f6f1e7; --book: #ece4d2; --on-book: #0e1626; --book-tint: #1c2740;
  --shadow-cover: 22px 30px 48px -18px rgba(0, 0, 0, .7), 3px 5px 12px rgba(0, 0, 0, .4); --shadow-soft: 0 12px 30px -16px rgba(0, 0, 0, .6); --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 28px 70px rgba(0, 0, 0, .6);
}
:root[data-scheme="light"] { color-scheme: light; }

/* ================================================================== fonts, self-hosted (SIL OFL) */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-regular.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-medium.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-semibold.woff2") format("woff2"); }

/* ================================================================== base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--appbar-h) + var(--safe-top) + 24px); -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--text); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; color: var(--text); margin: 0 0 .5em; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.4rem + 3.2vw, 4rem); }
h2 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.65rem); }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
.prose p, .lede, .page-head p { max-width: var(--measure); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { color: var(--gold-text); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: var(--radius); }
::selection { background: var(--gold); color: #0e1626; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.display { font-family: var(--font-display); }
.nowrap { white-space: nowrap; }
.num, .price, time, .tabular { font-variant-numeric: lining-nums tabular-nums; }
.icon { display: inline-block; vertical-align: -.2em; width: 1.15em; height: 1.15em; flex: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 300; background: var(--gold); color: #0e1626; padding: .75rem 1rem; font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(var(--safe-top) + 8px); }
.env-banner { background: var(--warning-bg); color: var(--warning); border-bottom: 1px solid var(--gold); padding: .45rem 16px; font-size: .84rem; font-weight: 600; text-align: center; text-wrap: balance; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: calc(800px + 2 * var(--gutter)); }
.wrap-mid { max-width: calc(980px + 2 * var(--gutter)); }
.lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--text-soft); line-height: 1.55; }
.page { flex: 1 0 auto; }
.stack { min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899px) { .hide-phone { display: none !important; } }

/* Small caps captions, chapter numbers and the part-opening rule: the house signatures. */
.caps, .eyebrow { display: block; font-family: var(--font-display); font-weight: 600; font-variant-caps: small-caps; font-feature-settings: "smcp", "c2sc"; letter-spacing: .09em; font-size: 1rem; line-height: 1.3; margin: 0 0 .5rem; color: var(--muted); }
.caps-gold, .eyebrow { color: var(--gold-text); }
.chapter-num { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: .78rem; letter-spacing: .12em; color: var(--gold-text); margin-right: .75em; vertical-align: .15em; }
.part-rule { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.5rem; color: var(--gold-text); }
.part-rule::before, .part-rule::after { content: ""; flex: 1; height: 1px; background: var(--gold); opacity: .8; }
.part-rule__caption { font-family: var(--font-display); font-weight: 600; font-variant-caps: small-caps; font-feature-settings: "smcp", "c2sc"; letter-spacing: .1em; font-size: 1.1rem; text-align: center; max-width: 80%; }
.part-rule__num::after { content: "\00B7"; margin-inline: .5em; }
.section-head .part-rule { margin-bottom: 0; }

/* ================================================================== app bar (ink) */
.appbar { position: sticky; top: 0; z-index: 60; padding-top: var(--safe-top); background: var(--head-bg); color: var(--head-fg); border-bottom: 1px solid rgba(201, 162, 39, .45); view-transition-name: appbar; }
.appbar a { color: inherit; }
.appbar a:hover { color: var(--gold); }
.appbar-inner { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; height: var(--appbar-h); padding-inline: var(--gutter); display: flex; align-items: center; gap: 14px; }
.brandmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brandmark-icon { width: 40px; height: 40px; color: var(--gold); flex: none; }
.brandmark-icon svg { width: 40px; height: 40px; }
.brandmark-text { display: grid; line-height: 1.05; min-width: 0; }
.brandmark-name { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: .005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brandmark-tag { font-family: var(--font-display); font-weight: 600; font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .14em; font-size: .9rem; color: var(--gold); }
.appbar .appbar-back { display: none; }
.appbar-title { display: none; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: flex; gap: 2px; margin-left: auto; }
.topnav a { color: var(--head-fg); text-decoration: none; padding: 8px 12px; font-size: .95rem; font-weight: 500; border-bottom: 1px solid transparent; }
.topnav a:hover { color: var(--gold); }
.topnav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }
.appbar-tools { display: flex; align-items: center; gap: 2px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer; text-decoration: none; }
.icon-btn:hover { border-color: var(--gold); color: var(--gold); }
.icon-btn .icon { width: 21px; height: 21px; }
.dot-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #0e1626; font-size: .68rem; font-weight: 600; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.when-dark { display: none; }
:root[data-scheme="dark"] .when-dark { display: block; }
:root[data-scheme="dark"] .when-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-scheme="light"]) .when-dark { display: block; } :root:not([data-scheme="light"]) .when-light { display: none; } }
.avatar-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1rem; }

/* ================================================================== tab bar (bottom, phones) */
.tabbar { display: none; }
@media (max-width: 899px) {
  :root { --appbar-h: 58px; }
  body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); }
  .topnav, .appbar .hide-phone { display: none; }
  .appbar-tools { margin-left: auto; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + var(--safe-bottom)); padding: 6px 4px calc(6px + var(--safe-bottom)); background: var(--head-bg); color: var(--head-fg); border-top: 1px solid rgba(201, 162, 39, .45); view-transition-name: tabbar; }
  .tabbar a { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; text-decoration: none; color: var(--head-muted); font-size: .68rem; font-weight: 500; letter-spacing: .02em; }
  .tabbar a .icon { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--gold); }
  .tab-ico { display: grid; place-items: center; width: 44px; height: 28px; border-bottom: 1px solid transparent; }
  .tabbar a[aria-current="page"] .tab-ico { border-bottom-color: var(--gold); }
  .tabbar .dot-count { top: 0; left: calc(50% + 6px); right: auto; }
  .has-back .appbar-back { display: inline-grid; margin-left: -10px; }
  .has-back .brandmark { display: none; }
  .has-back .appbar-title { display: block; flex: 1; }
  .toasts { bottom: calc(var(--tabbar-h) + 14px + var(--safe-bottom)) !important; }
  .pwa-update { bottom: calc(var(--tabbar-h) + 12px + var(--safe-bottom)) !important; }
}
@media (max-width: 380px) { .brandmark-tag { display: none; } .brandmark-name { font-size: 1.15rem; } .icon-btn { width: 40px; } }

/* ================================================================== buttons, chips, controls (one primary per view) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: .6rem 1.5rem; border-radius: var(--radius); border: 1.5px solid transparent; font-family: var(--font-body); font-weight: 500; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; max-width: 100%; text-align: center; text-wrap: balance; transition: background-color var(--t-mid) var(--ease-out), color var(--t-mid) var(--ease-out), border-color var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out); }
.btn:hover { transform: translateY(-1px); }
.btn-primary, .btn-book { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-primary:hover, .btn-book:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn-gold { background: var(--gold); color: #0e1626; border-color: var(--gold); }
.btn-gold:hover { background: var(--paper); border-color: var(--paper); color: #0e1626; }
.btn-quiet, .btn-soft { background: transparent; color: var(--text); border-color: var(--text); }
.btn-quiet:hover, .btn-soft:hover { background: var(--text); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); padding-inline: 1rem; }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--paper); }
.btn-danger-solid { background: var(--danger); color: #f6f1e7; border-color: var(--danger); }
.btn-sm { min-height: 38px; padding: .4rem 1rem; font-size: .9rem; }
.btn-lg { min-height: 52px; padding: .8rem 2rem; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--gold); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--gold); }
.link-more:hover { color: var(--gold-text); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: transparent; color: var(--text); font-weight: 500; font-size: .9rem; text-decoration: none; white-space: nowrap; cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--text); }
.chip[aria-current="page"], .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
:root[data-scheme="dark"] .chip[aria-current="page"], :root[data-scheme="dark"] .chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #0e1626; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); height: 46px; }
.qty button { width: 44px; height: 44px; border: 0; background: none; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.qty button:hover { color: var(--gold-text); }
.qty input { width: 44px; border: 0; background: none; text-align: center; font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 40px; } .qty-sm button { width: 38px; height: 38px; } .qty-sm input { width: 34px; }
.stars { display: inline-flex; gap: 2px; vertical-align: -2px; }
.star { width: 15px; height: 15px; background: linear-gradient(90deg, var(--gold) var(--fill), var(--border) var(--fill)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.2 6.8.8-5 4.7 1.3 6.7L12 17.6l-6 3.3 1.3-6.7-5-4.7 6.8-.8z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.2 6.8.8-5 4.7 1.3 6.7L12 17.6l-6 3.3 1.3-6.7-5-4.7 6.8-.8z'/%3E%3C/svg%3E") center/contain no-repeat; }
.stars-lg .star { width: 22px; height: 22px; }
.rating-line { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); text-decoration: none; }
.rating-line strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ================================================================== badges, notes, toasts */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--radius); font-family: var(--font-display); font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .08em; font-size: .95rem; font-weight: 600; line-height: 1.4; white-space: nowrap; border: 1px solid var(--border); color: var(--text-soft); }
.badge-success { color: var(--success); border-color: var(--success); }
.badge-warning { color: var(--warning); border-color: var(--warning); }
.badge-danger { color: var(--danger); border-color: var(--danger); }
.badge-info { color: var(--gold-text); border-color: var(--gold); }
.badge-book { color: var(--gold-text); border-color: var(--gold); }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--info-bg); color: var(--text); border-left: 2px solid var(--gold); }
.note .icon { color: var(--gold-text); margin-top: 3px; }
.note p:last-child { margin: 0; }
.note-ok { background: var(--success-bg); border-left-color: var(--success); } .note-ok .icon { color: var(--success); }
.note-warn { background: var(--warning-bg); border-left-color: var(--warning); } .note-warn .icon { color: var(--warning); }
.note-bad { background: var(--danger-bg); border-left-color: var(--danger); } .note-bad .icon { color: var(--danger); }
.toasts { position: fixed; z-index: 400; left: 50%; transform: translateX(-50%); bottom: calc(18px + var(--safe-bottom)); display: grid; gap: 8px; width: min(460px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: #0e1626; color: #f6f1e7; border-left: 2px solid var(--gold); box-shadow: var(--shadow-lg); font-size: .94rem; animation: toast-in var(--t-mid) var(--ease-out); }
.toast a { color: inherit; }
.toast .icon { margin-top: 2px; color: var(--gold); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ================================================================== sections, heads, crumbs */
.section { padding: clamp(44px, 7vw, 96px) 0; }
.section-tight { padding: clamp(26px, 5vw, 48px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: clamp(22px, 3.5vw, 36px); }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: var(--measure); }
.alt { background: var(--paper-deep); }
.tinted { background: var(--paper-deep); }
.page-head { padding: clamp(28px, 5vw, 56px) 0 22px; }
.page-head h1 { margin-bottom: 8px; }
.page-head p { color: var(--muted); margin: 0; }
.crumbs { font-size: .86rem; color: var(--muted); margin: 18px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }

/* ================================================================== covers as objects: perspective, long shadow, a paper edge */
.cover { display: block; position: relative; }
.cover img, .cover-typeset { border-radius: 2px 5px 5px 2px; box-shadow: var(--shadow-cover); background: var(--paper-deep); }
.cover img { width: 100%; }
.cover::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 5%; border-radius: 2px 0 0 2px; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(255, 255, 255, .14) 45%, transparent); }
.cover::before { content: ""; position: absolute; top: 2%; bottom: -1.5%; right: -2px; width: 3px; border-radius: 0 2px 2px 0; background: linear-gradient(90deg, #efe8d9, #d9d0bf); pointer-events: none; }
.cover-obj { perspective: 1200px; }
.cover-obj .cover { transform: rotateY(-9deg) rotateX(1.5deg); transform-origin: left center; transition: transform var(--t-slow) var(--ease-out); }
.cover-obj:hover .cover { transform: rotateY(-4deg) translateY(-4px); }
.cover-typeset { aspect-ratio: 2 / 3; width: 100%; padding: 12% 11%; display: flex; flex-direction: column; justify-content: flex-start; gap: 10px; background: linear-gradient(160deg, #1c2740, #0e1626 70%); color: #f6f1e7; overflow: hidden; container-type: inline-size; }
.ct-author { font-family: var(--font-body); font-size: max(9px, 6.4cqi); letter-spacing: .22em; text-transform: uppercase; color: #c9a227; font-weight: 500; }
.ct-title { font-family: var(--font-display); font-size: max(15px, 11.5cqi); line-height: 1.08; font-weight: 600; margin-top: auto; text-wrap: balance; }
.ct-sub { font-family: var(--font-display); font-style: italic; font-size: max(10px, 6cqi); color: #d9cdb4; line-height: 1.3; }
.ct-rule { display: block; height: 1px; width: 34%; background: #c9a227; margin-top: 6px; }
@container (max-width: 120px) { .ct-author, .ct-sub { display: none; } .ct-title { font-size: 15cqi; } }

/* ================================================================== product cards, prices, the set */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: clamp(20px, 3vw, 36px); }
.pcard { position: relative; display: grid; grid-template-rows: auto 1fr; min-width: 0; border-top: 1px solid var(--gold); padding-top: clamp(20px, 3vw, 30px); }
.pcard-art { position: relative; display: grid; grid-template-rows: minmax(0, 1fr); place-items: end center; height: 300px; padding: 10px 28px 0; text-decoration: none; perspective: 1200px; }
.pcard-art .cover { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; transform: rotateY(-9deg) rotateX(1.5deg); transform-origin: center; transition: transform var(--t-slow) var(--ease-out); }
.pcard:hover .pcard-art .cover { transform: rotateY(-3deg) translateY(-6px); }
.pcard-art .cover img { width: auto; max-height: 100%; max-width: 100%; }
.pcard-art .cover-typeset { width: auto; height: 100%; }
.pcard > .badge { position: absolute; top: 14px; left: 0; z-index: 2; }
.pcard-fav { position: absolute; top: 10px; right: 0; z-index: 3; }
.pcard-body { padding: 24px 0 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; text-align: center; align-items: center; }
.pcard-body h3 { font-size: 1.5rem; margin: 0; }
.pcard-body h3 a { color: inherit; text-decoration: none; }
.pcard-body h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard-sub { color: var(--muted); font-size: .92rem; margin: 0; font-family: var(--font-display); font-style: italic; font-size: 1.05rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-buy { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; width: 100%; }
.pcard-buy form, .pcard-buy .btn { position: relative; z-index: 2; }
.price { font-family: var(--font-body); font-size: 1.25rem; font-weight: 500; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.price-was { font-size: .86rem; color: var(--muted); text-decoration: line-through; margin-left: 6px; }
.price-pending { font-size: .9rem; font-weight: 500; color: var(--muted); }
.price-other { font-size: .9rem; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.stock-tag { font-size: .8rem; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.stock-tag .icon { color: var(--gold-text); }
.fav-form { display: inline-flex; margin: 0; }
.fav-btn[aria-pressed="true"] .icon { fill: var(--oxblood); color: var(--oxblood); }
.buy-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.buy-row .btn { flex: 1 1 150px; white-space: nowrap; }
.buy-row:has(.qty) .btn[name="buy"] { flex-basis: 100%; }
.buy-note { font-size: .88rem; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.buy-note .icon { margin-top: 3px; color: var(--gold-text); }
.buy-note strong { color: var(--text); }
.tier-note { display: flex; gap: 8px; align-items: center; font-size: .88rem; color: var(--success); font-weight: 500; margin: 2px 0 0; }
.fbt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(16px, 3vw, 28px); align-items: center; padding: clamp(18px, 3vw, 28px); border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }
.fbt-covers { display: flex; align-items: center; gap: 14px; }
.fbt-covers .cover { width: 84px; }
.fbt-plus { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; color: var(--gold-text); }
.fbt h3 { margin: 0 0 4px; }
.fbt p { margin: 0; color: var(--muted); font-size: .92rem; }
.fbt-buy { display: grid; justify-items: end; gap: 8px; }
.save-tag { font-size: .84rem; font-weight: 500; color: var(--success); }
.fbt-wrap { container-type: inline-size; }
@container (max-width: 760px) { .fbt { grid-template-columns: auto minmax(0, 1fr); } .fbt-buy { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 14px; border-top: 1px solid var(--border); } .fbt-buy form { margin-left: auto; } }
@container (max-width: 470px) { .fbt { grid-template-columns: minmax(0, 1fr); } .fbt-buy form { margin-left: 0; } }
.said { margin: 0; padding: 20px 0 0; border-top: 1px solid var(--gold); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.said blockquote { margin: 0; position: relative; padding-left: 34px; }
.said blockquote::before { content: "\201C"; position: absolute; left: 0; top: -.05em; font-family: var(--font-display); font-size: 3.2rem; line-height: 1; color: var(--gold); }
.said blockquote p { margin: 0; font-family: var(--font-display); font-size: 1.22rem; line-height: 1.45; color: var(--text); }
.said figcaption { padding-left: 34px; font-size: .86rem; color: var(--muted); display: grid; gap: 2px; }
.said figcaption strong { color: var(--text); font-size: .95rem; font-weight: 500; }
.said figcaption a { color: var(--gold-text); text-decoration: none; }
.said figcaption a:hover { text-decoration: underline; }
.said-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(22px, 3vw, 40px) clamp(24px, 3vw, 44px); }
@media (max-width: 960px) { .said-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .said-grid { grid-template-columns: minmax(0, 1fr); } }
.initials, .avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-text); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1rem; flex: none; }
.avatar { width: 44px; height: 44px; }
.avatar-author { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.avatar-sm { width: 34px; height: 34px; font-size: .85rem; }
.threads { display: grid; gap: 0; border-top: 1px solid var(--border); }
.thread-card { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--border); }
.thread-card h3 { font-size: 1.3rem; margin: 0 0 4px; line-height: 1.25; }
.thread-card h3 a { color: inherit; text-decoration: none; }
.thread-card h3 a::after { content: ""; position: absolute; inset: 0; }
.thread-card:hover h3 { color: var(--gold-text); }
.thread-card p { margin: 0; font-size: .92rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 8px; font-size: .8rem; color: var(--muted); }
.thread-stats { display: grid; justify-items: center; gap: 2px; min-width: 50px; font-size: .74rem; color: var(--muted); }
.thread-stats strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--text); font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-soft); font-size: .76rem; font-weight: 500; }
.tag-author { border-color: var(--gold); color: var(--gold-text); }
.tag-pin { border-color: var(--warning); color: var(--warning); }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { display: flex; gap: 22px; align-items: flex-start; padding: 22px 0; border-bottom: 1px solid var(--border); }
.post-row-text { flex: 1; min-width: 0; }
.post-row h3 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 6px; }
.post-row h3 a { color: var(--text); text-decoration: none; }
.post-row h3 a:hover { color: var(--gold-text); }
.post-row p { margin: 0; color: var(--text-soft); }
.post-row-cover { flex: none; width: 200px; }
.post-row-cover img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); display: block; }
.post-list.compact .post-row h3 { font-size: 1.3rem; }
.post-list.compact .post-row-cover { width: 140px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 8px; font-size: .82rem; color: var(--muted); }
.post-meta a { color: var(--gold-text); font-weight: 500; text-decoration: none; }
.post-meta a:hover { text-decoration: underline; }
@media (max-width: 760px) { .post-row { gap: 14px; } .post-row-cover, .post-list.compact .post-row-cover { width: 104px; } .post-row h3 { font-size: 1.25rem; } .post-row p:not(.post-meta) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.card, .panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.card { padding: 24px; }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card h3 .icon { color: var(--gold-text); width: 22px; height: 22px; }
.card p { color: var(--text-soft); margin: 0; font-size: .95rem; }
.acct-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: inherit; }
.acct-card:hover { border-color: var(--gold); }
.acct-card .ai, .ti { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; color: var(--gold-text); flex: none; }
.acct-card .ai .icon, .ti .icon { width: 22px; height: 22px; }
.acct-card strong { display: block; }
.acct-card span { font-size: .84rem; color: var(--muted); }
.promise { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.promise li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--text-soft); }
.promise li::before { content: ""; width: 8px; height: 8px; margin: 10px 0 0 6px; border-radius: 50%; background: var(--gold); }
@media (max-width: 720px) { .promise { grid-template-columns: minmax(0, 1fr); } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--text-soft); }
.ticks li::before { content: ""; width: 8px; height: 8px; margin: 10px 0 0 6px; border-radius: 50%; background: var(--gold); }
.meta-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 24px; margin: 0; font-size: .95rem; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin-top: 18px; }
:has(> .facts) { container-type: inline-size; }
@container (min-width: 680px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts > div { padding: 12px 0 0; border-top: 1px solid var(--gold); min-width: 0; }
.facts strong { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.facts span { color: var(--muted); font-size: .84rem; line-height: 1.35; display: block; margin-top: 4px; }
.portrait { width: clamp(120px, 18vw, 180px); aspect-ratio: 265 / 340; object-fit: cover; border: 6px solid var(--paper); box-shadow: 0 0 0 1px var(--gold), var(--shadow-cover); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; font-size: .95rem; }
.timeline li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; border: 1px solid var(--gold); background: var(--gold); }
.timeline time { display: block; color: var(--muted); font-size: .82rem; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-icon { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--gold); }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.prose { max-width: var(--measure); }
.prose p { color: var(--text-soft); }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.list > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.list .cover { width: 46px; }
.list strong { display: block; }
.list .sub { font-size: .86rem; color: var(--muted); }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 6px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: grid; }
.menu-list button, .menu-list a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 0; background: none; color: var(--text); font: inherit; font-size: .92rem; text-align: left; cursor: pointer; text-decoration: none; }
.menu-list button:hover, .menu-list a:hover { background: var(--paper-deep); color: var(--text); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 18px; }
.kv h3 { font-family: var(--font-display); font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .08em; font-size: 1rem; color: var(--gold-text); margin-bottom: 6px; }
.kv p { margin: 0; }
.panel { margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 1.35rem; margin: 0; }
.panel-body { padding: 18px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.panel .table-wrap { border: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-family: var(--font-display); font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .06em; font-size: 1rem; color: var(--gold-text); font-weight: 600; background: var(--paper-deep); }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table a.row-link { color: var(--text); font-weight: 500; }
.cell-sub { display: block; font-size: .83rem; color: var(--muted); }
.band { position: relative; overflow: hidden; background: var(--head-bg); color: var(--head-fg); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }
.band h2 { color: inherit; margin-bottom: 8px; }
.band p { margin: 0; color: var(--head-muted); max-width: 58ch; }
.band .btn { position: relative; z-index: 1; background: var(--gold); color: #0e1626; border-color: var(--gold); }
.band .btn:hover { background: var(--paper); border-color: var(--paper); color: #0e1626; }
@media (max-width: 700px) { .band { grid-template-columns: minmax(0, 1fr); } }

/* ================================================================== dialogs, sheets, viewer */
dialog { border: 1px solid var(--gold); padding: 0; border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); max-width: min(560px, calc(100vw - 24px)); width: 100%; }
dialog::backdrop { background: rgba(14, 22, 38, .66); }
.dlg-body { padding: 24px; }
.dlg-body h2 { font-size: 1.5rem; margin-bottom: 8px; }
.dlg-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 0 24px 22px; }
@media (max-width: 640px) { dialog.sheet { margin: auto 0 0; max-width: 100vw; border-radius: 0; padding-bottom: var(--safe-bottom); animation: sheet-in var(--t-mid) var(--ease-out); } }
@keyframes sheet-in { from { transform: translateY(100%); } }
.viewer { max-width: min(900px, calc(100vw - 16px)); background: #0e1626; color: #f6f1e7; }
.viewer-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.viewer-bar .grow { flex: 1; font-size: .9rem; }
.viewer-bar .icon-btn { color: #f6f1e7; }
.viewer-page { display: grid; place-items: center; padding: 0 12px 14px; }
.viewer-page img { max-height: calc(100dvh - 120px); width: auto; background: #fff; border-radius: 2px; }

/* ================================================================== forms: large inputs, labels above, inline errors in words */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label, .label { font-weight: 500; font-size: .95rem; color: var(--text); }
.field .opt { font-weight: 400; color: var(--muted); font-size: .86rem; }
.input, .select, .textarea { width: 100%; min-height: 52px; padding: 13px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--paper-light); color: var(--text); font: inherit; font-size: 1.0625rem; transition: border-color var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 23px, calc(100% - 15px) 23px; background-size: 5px 5px; background-repeat: no-repeat; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .35); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.hint { font-size: .86rem; color: var(--muted); margin: 0; }
.err { font-size: .9rem; color: var(--danger); margin: 0; font-weight: 500; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; padding: 0; margin-bottom: 12px; }
.legend-sm { font-family: var(--font-body); font-weight: 500; font-size: 1rem; margin-bottom: 8px; padding: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.check.consent { align-items: flex-start; font-size: .9rem; line-height: 1.45; color: var(--text-soft); }
.check.consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.check.span-2 { grid-column: 1 / -1; }
.switch { display: flex; gap: 12px; align-items: center; justify-content: space-between; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--border); position: relative; cursor: pointer; flex: none; transition: background var(--t-mid); margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-light); box-shadow: var(--shadow-soft); transition: transform var(--t-mid) var(--ease-out); }
.switch input:checked { background: var(--success); }
.switch input:checked::after { transform: translateX(20px); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.otp { display: flex; gap: 8px; }
.otp-input { letter-spacing: .5em; font-size: 1.6rem !important; font-weight: 500; text-align: center; font-variant-numeric: tabular-nums; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper-light); }
.segmented label { position: relative; display: grid; gap: 2px; padding: 12px 14px; cursor: pointer; text-align: left; min-width: 0; }
.segmented label + label { border-left: 1px solid var(--border); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented .seg-name { font-weight: 500; font-size: .95rem; }
.segmented .seg-sub { font-size: .82rem; color: var(--muted); }
.segmented label:has(input:checked) { background: var(--paper-deep); box-shadow: inset 0 -2px 0 var(--gold); }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: -3px; }
.segmented label.is-soon { cursor: default; }

/* ================================================================== footer (ink colophon) */
.colophon { margin-top: auto; background: var(--head-bg); color: var(--head-fg); border-top: 1px solid var(--gold); }
.colophon a { color: inherit; }
.colophon a:hover { color: var(--gold); }
.colophon-inner { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding: 52px var(--gutter) 30px; display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.colophon p { color: var(--head-muted); font-size: .92rem; max-width: 40ch; }
.colophon h2 { font-family: var(--font-display); font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .1em; font-size: 1.05rem; font-weight: 600; color: var(--gold); margin: 4px 0 14px; }
.colophon-links { display: grid; gap: 10px; align-content: start; }
.colophon-links a { text-decoration: none; font-size: .95rem; }
.colophon-links a:hover { text-decoration: underline; }
.colophon-contact { display: grid; gap: 8px; }
.colophon-contact a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.install-slot { border: 1px solid rgba(201, 162, 39, .45); padding: 14px; display: grid; gap: 10px; justify-items: start; margin-top: 14px; }
.install-slot p { margin: 0; }
.colophon .btn-quiet { color: var(--head-fg); border-color: var(--gold); }
.colophon .btn-quiet:hover { background: var(--gold); color: #0e1626; }
.colophon-base { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding: 18px var(--gutter) 24px; border-top: 1px solid rgba(201, 162, 39, .3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .84rem; color: var(--head-muted); }
@media (max-width: 900px) { .colophon-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .colophon-brand { grid-column: 1 / -1; } }
@media (max-width: 460px) { .colophon-inner { grid-template-columns: minmax(0, 1fr); } }
.colophon-legal { display: flex; gap: 16px; } .colophon-legal a { text-decoration: none; } .colophon-legal a:hover { text-decoration: underline; }
.is-standalone .colophon-base span:last-child { display: none; }

/* ================================================================== PWA prompts, cookie notice, Google sign-in */
.pwa-update { position: fixed; z-index: 380; left: 50%; transform: translateX(-50%); bottom: calc(16px + var(--safe-bottom)); width: min(540px, calc(100vw - 24px)); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--gold); box-shadow: var(--shadow-lg); }
.pwa-update strong { display: block; }
.pwa-update span { font-size: .88rem; color: var(--muted); }
.pwa-update-actions { display: flex; gap: 6px; margin-left: auto; }
.ios-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ios-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
.ios-steps p { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
.ios-step-icon { width: 44px; height: 44px; border-radius: var(--radius); display: grid; place-items: center; border: 1px solid var(--border); color: var(--gold-text); }
.ios-step-icon img { width: 44px; height: 44px; }
.cookie-notice { position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); z-index: 60; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 2px solid var(--gold); box-shadow: var(--shadow-lg); }
.cookie-notice p { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; line-height: 1.45; color: var(--text-soft); }
.cookie-notice p .icon { flex: none; margin-top: 2px; color: var(--gold-text); }
.cookie-notice a { color: inherit; text-decoration: underline; }
@media (max-width: 899px) { .cookie-notice { bottom: calc(var(--tabbar-h) + 10px + var(--safe-bottom)); } }
body:has(.pwa-update) .cookie-notice { display: none; }
.gsi-slot { min-height: 44px; display: grid; justify-items: center; }
.gsi-button { width: 100%; max-width: 400px; display: flex; justify-content: center; }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .86rem; margin: 16px 0; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.gsi-sheet .gsi-form { display: grid; gap: 14px; }
.gsi-sheet h2 { margin: 0; font-size: 1.5rem; }

/* ================================================================== the staff strip on public pages, notifications, currency switch */
.admin-bar { display: flex; align-items: center; gap: 12px; padding: 6px var(--gutter); padding-top: calc(6px + var(--safe-top)); background: #1c2740; color: #f6f1e7; font-size: .84rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid rgba(201, 162, 39, .3); }
.admin-bar::-webkit-scrollbar { display: none; }
.admin-bar-who { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: #b9b3a5; }
.admin-bar nav { display: flex; gap: 4px; margin-left: auto; }
.admin-bar a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; min-height: 32px; color: inherit; text-decoration: none; white-space: nowrap; border-bottom: 1px solid transparent; }
.admin-bar a:hover, .admin-bar a:focus-visible { color: var(--gold); }
.admin-bar a.is-key { color: var(--gold); border-bottom-color: var(--gold); }
.admin-bar .icon { width: 16px; height: 16px; }
.admin-bar + .appbar { padding-top: 0; }
.admin-bar-bell { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; position: relative; }
.admin-bar-bell .icon { width: 18px; height: 18px; }
.admin-bar-bell .dot-count { top: -2px; right: -4px; }
.notify-bell { position: relative; }
.notify-bell .dot-count { background: var(--oxblood); color: #f6f1e7; }
.notify-panel { position: absolute; z-index: 400; width: min(380px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 100px)); overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.np-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 8px; position: sticky; top: 0; background: var(--surface); }
.np-head h2 { margin: 0; font-size: 1.3rem; }
.np-list { list-style: none; margin: 0; padding: 0 6px; }
.np-item a { display: grid; gap: 2px; padding: 10px 10px 10px 18px; text-decoration: none; color: inherit; position: relative; border-radius: var(--radius); }
.np-item a:hover, .np-item a:focus-visible { background: var(--paper-deep); }
.np-item.unread a::before { content: ""; position: absolute; left: 6px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.np-item strong { font-size: .92rem; }
.np-item span { font-size: .86rem; color: var(--text-soft); }
.np-item small { font-size: .76rem; color: var(--muted); }
.np-empty { padding: 18px 16px; color: var(--muted); font-size: .9rem; }
.np-device { display: grid; gap: 8px; margin: 8px 12px; padding: 12px; background: var(--paper-deep); font-size: .86rem; }
.np-device p { margin: 0; }
.np-device .btn { justify-self: start; }
.np-sound { font-size: .86rem; }
.np-all { display: block; padding: 12px 16px 14px; font-size: .88rem; }
@media (max-width: 640px) { .notify-panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(var(--tabbar-h) + 12px + var(--safe-bottom)); width: auto; max-height: 70vh; } }
.notify-toast { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; cursor: pointer; max-width: min(420px, calc(100vw - 32px)); }
.notify-toast strong { display: block; }
.notify-toast span span { display: block; font-size: .85rem; opacity: .85; }
.notify-toast .nt-icon { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold); }
.notify-toast .nt-icon .icon { width: 16px; height: 16px; }
.notify-toast.out { opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; }
.notify-page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.notify-side { display: grid; gap: 18px; }
.np-page { padding: 6px; }
@media (max-width: 900px) { .notify-page { grid-template-columns: 1fr; } }
/* The KES | USD switch: a refined segmented control. */
.cur-switch { display: inline-flex; border: 1px solid var(--gold); border-radius: var(--radius); padding: 0; vertical-align: middle; height: 28px; }
.cur-switch button { border: 0; background: transparent; color: inherit; font: inherit; font-family: var(--font-body); font-weight: 500; font-size: .74rem; letter-spacing: .08em; padding: 0 9px; cursor: pointer; min-height: 0; line-height: 26px; }
.cur-switch button + button { border-left: 1px solid var(--gold); }
.cur-switch button[aria-pressed="true"] { background: var(--gold); color: #0e1626; }
.cur-switch button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.appbar .cur-switch { margin-right: 8px; }
.cur-inline { margin-left: 8px; }
.amazon-note strong { color: var(--text); }
@media (max-width: 400px) { .appbar .cur-switch button { padding: 0 7px; } .appbar .cur-switch { margin-right: 2px; } }

/* ================================================================== motion, print */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: .16s var(--ease-out) both vt-out; }
  ::view-transition-new(root) { animation: .22s var(--ease-out) both vt-in; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn:hover, .cover-obj:hover .cover, .pcard:hover .pcard-art .cover { transform: none; }
}
@media print {
  .appbar, .tabbar, .colophon, .admin-side, .admin-topbar, .no-print, .toasts, .pwa-update, .sticky-buy, .fab, .cookie-notice { display: none !important; }
  body { background: #fff; color: #000; padding: 0 !important; }
}
details > summary.btn { list-style: none; }
details > summary.btn::-webkit-details-marker { display: none; }
.steps a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; font-size: .9rem; }
.pager a { display: inline-flex; align-items: center; gap: 6px; }
