:root {
  --ink: #0b0907;
  --ink-2: #15110d;
  --panel: #1c1712;
  --line: rgba(214, 178, 110, 0.22);
  --gold: #d6b26e;
  --gold-2: #f1d9a4;
  --red: #c8102e;
  --red-2: #e0283f;
  --text: #f3ece2;
  --muted: #b6a993;
  --ok: #7fc8a0;
  --warn: #e8c26a;
  --err: #ef7a86;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #2a1d12 0%, transparent 60%), var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-2); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--serif); font-size: 20px; letter-spacing: 0.08em; color: var(--gold); text-decoration: none; text-transform: uppercase; }
.badge { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }

.hero { padding: 48px 0 32px; }
.hero .grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero .grid { grid-template-columns: 0.9fr 1.1fr; gap: 64px; } .hero { padding: 72px 0 56px; } }
.cover { width: 100%; height: auto; max-width: 440px; margin: 0 auto; display: block; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px var(--line); }
.eyebrow { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 7vw, 68px); line-height: 1.02; margin: 0 0 8px; letter-spacing: 0.01em; }
h1 .red { color: var(--red-2); }
.byline { font-family: var(--serif); font-size: 22px; color: var(--muted); margin: 0 0 24px; }
.tagline { font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.35; color: var(--gold-2); margin: 0 0 28px; }

.buy { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.price strong { font-family: var(--serif); font-size: 44px; color: var(--text); line-height: 1; }
.price span { color: var(--muted); font-size: 14px; }
.formats { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
input[type=email] { width: 100%; padding: 14px 14px; font: inherit; color: var(--text); background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; }
input[type=email]:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 18px; font-size: 14px; color: var(--muted); }
.check input { margin-top: 4px; accent-color: var(--red); }
.btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 15px 20px; font: 600 16px var(--sans); letter-spacing: 0.04em; color: #fff; background: linear-gradient(180deg, var(--red-2), var(--red)); border: 0; border-radius: 8px; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn.ghost { background: transparent; border: 1px solid var(--gold); color: var(--gold-2); }
.note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.msg { margin-top: 12px; font-size: 14px; min-height: 1.2em; }
.msg.err { color: var(--err); }

section.block { padding: 48px 0; border-top: 1px solid var(--line); }
section.block h2 { font-family: var(--serif); font-weight: 600; font-size: 34px; margin: 0 0 18px; color: var(--gold-2); }
.prose { max-width: 720px; font-size: 17px; }
.prose p { margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 8px; }
.fact { border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.fact b { display: block; font-family: var(--serif); font-size: 22px; color: var(--text); }
.fact span { font-size: 13px; color: var(--muted); }
blockquote.excerpt { margin: 0; max-width: 720px; font-family: var(--serif); font-size: 21px; line-height: 1.55; color: var(--text); border-left: 2px solid var(--gold); padding-left: 20px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }

/* Thank-you page */
.status { max-width: 620px; margin: 56px auto; text-align: center; }
.status img { width: 160px; height: auto; border-radius: 4px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); margin-bottom: 24px; }
.status h1 { font-size: clamp(32px, 6vw, 48px); }
.status .links { display: flex; flex-direction: column; gap: 12px; max-width: 360px; margin: 24px auto 0; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; margin: 18px auto; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.state-ok { color: var(--ok); } .state-warn { color: var(--warn); } .state-err { color: var(--err); }
[hidden] { display: none !important; }
@media (max-width: 480px) {
  .brand { font-size: 16px; }
  .badge { font-size: 10px; padding: 3px 8px; white-space: nowrap; max-width: 52%; overflow: hidden; text-overflow: ellipsis; }
}

/* Currency selector */
.currency-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 14px; }
.currency-btn { font: 500 14px var(--sans); color: var(--gold-2); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.currency-btn:hover { border-color: var(--gold); }
.currency-btn b { color: var(--text); font-weight: 600; }
.charge-note { font-size: 13px; color: var(--muted); }
.charge-note b { color: var(--text); }
.currency-dialog { width: min(520px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 48px)); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,0.7); }
.currency-dialog[open] { display: flex; flex-direction: column; }
.currency-dialog::backdrop { background: rgba(0,0,0,0.7); }
.cd-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.cd-head h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; margin: 0; color: var(--gold-2); }
.cd-close { font-size: 28px; line-height: 1; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.cd-intro { font-size: 13px; color: var(--muted); margin: 8px 20px 12px; }
.cd-intro b { color: var(--text); }
#currency-search { margin: 0 20px 10px; padding: 11px 12px; font: inherit; color: var(--text); background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; }
#currency-search:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.cd-list { list-style: none; margin: 0; padding: 0 8px; overflow-y: auto; flex: 1; min-height: 120px; }
.cd-list li { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.cd-list li:hover, .cd-list li:focus { background: rgba(214,178,110,0.10); outline: none; }
.cd-list li[aria-selected="true"] { background: rgba(200,16,46,0.18); }
.cd-code { font-weight: 600; color: var(--gold); letter-spacing: 0.04em; }
.cd-name { color: var(--text); }
.cd-price { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.cd-empty { color: var(--muted); cursor: default; }
.cd-foot { font-size: 12px; color: var(--muted); margin: 0; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
