/* Shared chrome for the standalone Heimdall pages (pricing, refund, toc, privacy, checkout).
 *
 * Deliberately a SEPARATE file rather than copied <style> blocks: four pages that each
 * inlined the palette would drift the moment one was edited, and the landing page's own
 * CSS is ~370 lines of hero/feature/countdown machinery none of these pages use.
 *
 * The palette below is copied verbatim from index.html so the pages read as the same site.
 * IF YOU CHANGE A COLOUR IN index.html, CHANGE IT HERE TOO — they are intentionally
 * duplicated rather than extracted, because index.html is a single self-contained file by
 * design and pulling its <style> out into a shared asset would be a much larger change
 * than these pages justify.
 */
:root {
  --bg: #0e0d0b;
  --bg-raise: #14120f;
  --bg-frame: #181612;
  --line: rgba(236, 231, 223, 0.07);
  --line-strong: rgba(236, 231, 223, 0.14);
  --text: #ece7df;
  --text-muted: #9c958b;
  --text-faint: #5f5a53;
  --accent: #d2a965;
  --accent-soft: rgba(210, 169, 101, 0.12);
  --accent-line: rgba(210, 169, 101, 0.35);
  --ok: #8fbf9f;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
/* `hidden` must always win. The UA stylesheet's `[hidden] { display: none }` has the lowest
 * possible priority, so ANY component rule that sets `display` (e.g. `.checkout-loading
 * { display: flex }`) silently un-hides the element and JS that toggles `.hidden` stops
 * working. `!important` restores the attribute's meaning everywhere on these pages. */
[hidden] { display: none !important; }

/* Matches index.html's vignette so the pages do not read as a flat slab next to it. */
.vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(210,169,101,.05) 0%, transparent 55%);
}
main { position: relative; z-index: 1; }

.wrap { width: min(1320px, calc(100% - 48px)); margin: 0 auto; }
/* Legal and pricing copy is read, not scanned — hold the measure near 70ch. */
.wrap.narrow { width: min(760px, calc(100% - 48px)); }

.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
}

/* ---------- nav (mirrors index.html) ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 28px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: .01em; }
.brand svg { width: 22px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 13px; }
.nav-links a { color: var(--text-muted); transition: color .3s; }
.nav-links a:hover { color: var(--text); }
.nav-mail { font-family: var(--font-mono); }
@media (max-width: 560px) { .nav-mail { display: none; } }

/* ---------- page header ---------- */
.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 {
  margin-top: 16px;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 500; line-height: 1.1; letter-spacing: -0.025em;
}
.page-head p.lede { margin-top: 18px; max-width: 58ch; color: var(--text-muted); font-size: 17px; }
.updated { margin-top: 20px; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }

/* ---------- prose ---------- */
.prose { padding: 44px 0 72px; }
.prose h2 {
  margin-top: 44px; margin-bottom: 12px;
  font-size: 20px; font-weight: 500; letter-spacing: -0.01em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; margin-bottom: 8px; font-size: 16px; font-weight: 600; color: var(--text); }
.prose p { margin-bottom: 16px; color: var(--text-muted); }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: var(--text-muted); }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose code { font-family: var(--font-mono); font-size: 13.5px; color: var(--text); }

/* ---------- callout ---------- */
.callout {
  margin: 24px 0; padding: 20px 22px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 10px;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- pricing card ---------- */
.price-card {
  margin: 36px 0 8px; padding: 36px;
  background: var(--bg-raise);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}
.price-amount { display: flex; align-items: baseline; gap: 8px; }
.price-amount .num { font-size: clamp(40px, 7vw, 56px); font-weight: 500; letter-spacing: -0.03em; }
.price-amount .per { color: var(--text-muted); font-size: 16px; }
.price-list { margin: 26px 0 0; padding: 0; list-style: none; }
.price-list li {
  position: relative; padding-left: 26px; margin-bottom: 12px; color: var(--text-muted);
}
.price-list li::before {
  content: ''; position: absolute; left: 4px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.price-list li:last-child { margin-bottom: 0; }

.btn {
  display: inline-block; margin-top: 30px; padding: 13px 24px;
  font-size: 14px; font-weight: 500;
  color: var(--bg); background: var(--accent);
  border-radius: 8px; transition: opacity .3s var(--ease);
}
.btn:hover { opacity: .88; }
/* A .btn inside .prose would otherwise lose to `.prose a` / `.prose a:hover` (more
 * specific than .btn) and render gold-on-gold with a link underline. Must stay after them. */
.prose a.btn { color: var(--bg); border-bottom: 0; }

/* ---------- checkout (checkout.html only) ----------
 *
 * .checkout-container is where Paddle.js renders its iframe. It is targeted BY CLASS NAME
 * from assets/checkout.js (`frameTarget: 'checkout-container'`), which is Paddle's own API
 * shape - so this class is load-bearing markup, not just styling. Rename it in both places
 * or in neither. Its height is driven by Paddle (frameInitialHeight, then live resizes), so
 * nothing here sets one.
 */
.checkout-panel { margin: 32px 0 8px; }

/* Two-plan comparison on the no-payment-link state. auto-fit + minmax rather than a media
 * query so it collapses to one column whenever the cards would be narrower than ~260px -
 * which is the right breakpoint inside .wrap.narrow (760px) without hardcoding one. */
.plan-grid {
  display: grid; gap: 18px; margin: 28px 0 8px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
/* The shared .price-card has a 36px pad and a 36px top margin tuned for one card on the
 * pricing page; inside the grid the gap provides the separation. */
.plan-card { margin: 0; padding: 28px; display: flex; flex-direction: column; }
/* Pin the action to the bottom so two cards of unequal copy still line their buttons up. */
.plan-card .btn { margin-top: auto; align-self: flex-start; }

.plan-note { margin: 18px 0 20px; font-size: 13.5px; color: var(--text-faint); }

/* Purchase context shown above Paddle's iframe on the happy path. */
.plan-context {
  display: flex; flex-wrap: wrap; gap: 18px 32px;
  align-items: center; justify-content: space-between;
  padding: 22px 24px; margin-bottom: 18px;
  background: var(--bg-raise);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
.plan-context-name { margin-top: 6px; font-size: 20px; font-weight: 500; }
.plan-context-name .per { color: var(--text-muted); font-size: 14px; }
.plan-context-list { margin-top: 0; }

.checkout-loading {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 24px; margin-bottom: 20px;
  background: var(--bg-raise);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text-muted); font-size: 14px;
}

.checkout-spinner {
  flex: none; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--accent-line);
  border-top-color: var(--accent);
  animation: checkout-spin .9s linear infinite;
}
@keyframes checkout-spin { to { transform: rotate(360deg); } }

/* Honour a reduced-motion preference: the spinner is decorative, and the adjacent text
 * already says what is happening, so it simply stops rather than becoming a static ring. */
@media (prefers-reduced-motion: reduce) {
  .checkout-spinner { animation: none; border-top-color: var(--accent-line); }
}

/* ---------- footer (mirrors index.html, plus the page cross-links) ---------- */
footer {
  border-top: 1px solid var(--line); padding: 36px 0 48px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-faint);
}
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: var(--text-muted); font-family: var(--font-mono); }
footer a:hover { color: var(--text); }
footer a[aria-current="page"] { color: var(--accent); }

@media (max-width: 560px) {
  .page-head { padding: 36px 0 28px; }
  .price-card { padding: 26px; }
}
