/* ═══ tokens.css ═══ */
/* isreallyamazing.com — Design Tokens (single source of truth).
   Mirrors docs/design/brand-kit/tokens.css. Consumed by:
   - Worker renderers (imported as text, inlined per page)
   - scripts/build-css.mjs -> public/assets/styles.css (static pages) */

:root {
  /* ── Color · brand ──────────────────────────────────────── */
  --ira-cream:        #fbf6e9;  /* primary background */
  --ira-parchment:    #f4ead0;  /* certificate background */
  --ira-ink:          #1a1410;  /* text, borders, hard accents */
  --ira-gold:         #c9a14a;  /* seal core, primary accent */
  --ira-gold-deep:    #9a7626;  /* seal shadow, kicker text */
  --ira-gold-light:   #f4d77a;  /* seal highlight, dark-bg accent */
  --ira-crimson:      #a32424;  /* "really" + key italics */
  --ira-crimson-deep: #6e1818;  /* crimson shadow */
  --ira-forest:       #2d5a3d;  /* "REALLY AMAZING" wordmark in cert */
  --ira-rose:         #e8a8c4;  /* tertiary accent */
  --ira-navy:         #0f2240;

  /* ── Color · theme: Neon ────────────────────────────────── */
  --ira-neon-bg:      #0a0414;
  --ira-neon-pink:    #ff2bd6;
  --ira-neon-cyan:    #00f0ff;
  --ira-neon-yellow:  #f8e63e;

  /* ── Color · theme: Medieval ────────────────────────────── */
  --ira-aged:         #d9c08a;
  --ira-aged-edge:    #6b4d1f;
  --ira-illumination: #6e1818;

  /* ── Color · theme: Unicorn ─────────────────────────────── */
  --ira-pastel-pink:  #ffd6f0;
  --ira-pastel-blue:  #c9d8ff;
  --ira-pastel-yellow:#fff1c4;
  --ira-lavender:     #b59ce6;
  --ira-pink-name:    #d6478a;

  /* ── Type ───────────────────────────────────────────────── */
  --ira-font-display: 'Fraunces', Georgia, serif;
  --ira-font-body:    'Fraunces', Georgia, serif;
  --ira-font-script:  'Caveat', cursive;
  --ira-font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --ira-font-medieval:'UnifrakturCook', 'Fraunces', serif;
  --ira-font-pixel:   'Press Start 2P', 'JetBrains Mono', monospace;

  /* ── Radii ──────────────────────────────────────────────── */
  --ira-radius-sm: 8px;
  --ira-radius-md: 12px;
  --ira-radius-lg: 16px;
  --ira-radius-pill: 999px;

  /* ── Shadows (the "stamped" effect — 2-stack: ink + soft) ── */
  --ira-shadow-card: 0 4px 0 var(--ira-ink), 0 8px 24px rgba(60,40,10,0.18);
  --ira-shadow-deep: 0 5px 0 var(--ira-ink), 0 12px 40px rgba(60,40,10,0.25);
  --ira-shadow-btn:
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -2px 6px rgba(154,118,38,0.4),
    0 4px 0 var(--ira-ink),
    0 6px 16px rgba(0,0,0,0.18);

  /* ── Borders ────────────────────────────────────────────── */
  --ira-border-hard: 2.5px solid var(--ira-ink);
  --ira-border-soft: 1.5px solid var(--ira-gold-deep);
  --ira-border-double: 3px double var(--ira-ink);

  /* ── Animation tokens ───────────────────────────────────── */
  --ira-spin-seal: 18s;
  --ira-press-fast: 60ms;
}

/* ═══ base.css ═══ */
/* Base: reset + self-hosted fonts + shared helpers.
   /assets/fonts is replaced at build/render time:
   - Worker renderers -> `${PUBLIC_BASE_URL}/assets/fonts` (absolute — cert pages
     live on subdomains and fetch fonts cross-origin from the root domain; the
     _headers ACAO:* rule on /assets/fonts/* is what permits this)
   - build-css.mjs   -> `/assets/fonts` (same-origin on apex/staging) */

@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/fraunces-400.woff2) format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/fraunces-400i.woff2) format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/fraunces-700.woff2) format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: italic; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/fraunces-700i.woff2) format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 900; font-display: swap;
  src: url(/assets/fonts/fraunces-900.woff2) format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: italic; font-weight: 900; font-display: swap;
  src: url(/assets/fonts/fraunces-900i.woff2) format('woff2');
}
@font-face {
  font-family: 'Caveat'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/caveat-700.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-400.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-700.woff2) format('woff2');
}
@font-face {
  font-family: 'UnifrakturCook'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/unifrakturcook-700.woff2) format('woff2');
}
@font-face {
  font-family: 'Press Start 2P'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/press-start-2p-400.woff2) format('woff2');
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--ira-font-body);
  color: var(--ira-ink);
  background: var(--ira-cream);
  -webkit-font-smoothing: antialiased;
}

/* ── Wordmark ─────────────────────────────────────────────── */
.wordmark {
  font-family: var(--ira-font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  line-height: 1;
  text-decoration: none;
}
.wordmark .is { color: var(--ira-ink); }
.wordmark .really { font-style: italic; color: var(--ira-crimson); }
.wordmark .amazing { color: var(--ira-ink); }
.wordmark .dotcom {
  font-family: var(--ira-font-mono);
  font-weight: 700;
  font-size: 0.42em;
  color: var(--ira-gold-deep);
  margin-left: 0.15em;
  align-self: center;
  letter-spacing: 0;
  font-style: normal;
}
.wordmark .sparkle {
  color: var(--ira-gold);
  font-size: 0.6em;
  margin-left: 0.05em;
  display: inline-block;
  animation: sparkle-spin 4s linear infinite;
}
@keyframes sparkle-spin {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ── Big shiny button ─────────────────────────────────────── */
.shiny-btn {
  font-family: var(--ira-font-body);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  border: 2.5px solid var(--ira-ink);
  border-radius: var(--ira-radius-pill);
  background: linear-gradient(180deg, #ffe79a 0%, var(--ira-gold) 50%, var(--ira-gold-deep) 100%);
  color: var(--ira-ink);
  cursor: pointer;
  box-shadow: var(--ira-shadow-btn);
  transition: transform var(--ira-press-fast), box-shadow var(--ira-press-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.shiny-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 -2px 6px rgba(154,118,38,0.4),
    0 5px 0 var(--ira-ink),
    0 8px 20px rgba(0,0,0,0.22);
}
.shiny-btn:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 4px rgba(154,118,38,0.5), 0 1px 0 var(--ira-ink);
}
.shiny-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.shiny-btn.ghost {
  background: var(--ira-cream);
  color: var(--ira-ink);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 4px 0 var(--ira-ink),
    0 6px 16px rgba(0,0,0,0.10);
}
.shiny-btn.ghost:hover { background: #fff; }

/* ── Generic helpers ──────────────────────────────────────── */
.kicker {
  font-family: var(--ira-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ira-gold-deep);
}
.script { font-family: var(--ira-font-script); font-weight: 700; }

/* ── Shared keyframes ─────────────────────────────────────── */
@keyframes float-up {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-200px) rotate(360deg); opacity: 0; }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1.2); }
}
@keyframes seal-spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
@keyframes cert-enter {
  from { transform: scale(0.5) rotate(-6deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes neon-flicker {
  0%, 100% { opacity: 1; }
  48% { opacity: 1; }
  50% { opacity: 0.85; }
  52% { opacity: 1; }
}

/* Motion accessibility: freeze the fanfare, keep everything visible. */
@media (prefers-reduced-motion: reduce) {
  .gold-seal-rays,
  .wordmark .sparkle,
  .sparkle-field i,
  .cert-frame,
  .ticker-track,
  .confetti i,
  .geo-blink,
  .neon-name { animation: none !important; }
  .sparkle-field i { opacity: 0.5; }
}

/* ═══ seal.css ═══ */
/* GoldSeal — the most important detail. Three layers:
   rays (conic wedges masked to a ring, spinning 18s) over
   disc (radial gold gradient + tiny uppercase text) over
   static crimson ribbon tails. Markup in src/lib/seal.ts. */

.gold-seal {
  position: relative;
  width: 110px;
  height: 110px;
  display: inline-block;
}
.gold-seal-disc {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #ffeaa0 0%, var(--ira-gold) 40%, var(--ira-gold-deep) 80%, #6b4f1a 100%);
  box-shadow:
    inset 0 -4px 8px rgba(0,0,0,0.3),
    inset 0 2px 4px rgba(255,255,255,0.5),
    0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--ira-font-body);
  font-weight: 900;
  font-size: 9px;
  color: #4a360e;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
  z-index: 2;
}
.gold-seal-rays {
  position: absolute;
  inset: 0;
  animation: seal-spin var(--ira-spin-seal) linear infinite;
}
.gold-seal-rays::before,
.gold-seal-rays::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 0deg,
    var(--ira-gold) 0 8deg, transparent 8deg 30deg,
    var(--ira-gold) 30deg 38deg, transparent 38deg 60deg,
    var(--ira-gold) 60deg 68deg, transparent 68deg 90deg,
    var(--ira-gold) 90deg 98deg, transparent 98deg 120deg,
    var(--ira-gold) 120deg 128deg, transparent 128deg 150deg,
    var(--ira-gold) 150deg 158deg, transparent 158deg 180deg,
    var(--ira-gold) 180deg 188deg, transparent 188deg 210deg,
    var(--ira-gold) 210deg 218deg, transparent 218deg 240deg,
    var(--ira-gold) 240deg 248deg, transparent 248deg 270deg,
    var(--ira-gold) 270deg 278deg, transparent 278deg 300deg,
    var(--ira-gold) 300deg 308deg, transparent 308deg 330deg,
    var(--ira-gold) 330deg 338deg, transparent 338deg 360deg
  );
  -webkit-mask: radial-gradient(circle, transparent 38%, #000 38%, #000 50%, transparent 50%);
          mask: radial-gradient(circle, transparent 38%, #000 38%, #000 50%, transparent 50%);
}
.gold-seal-ribbon {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  z-index: 1;
}
.gold-seal-ribbon svg { display: block; width: 100%; }

/* ═══ certificate.css ═══ */
/* Certificate anatomy — Classic Gold base (theme-agnostic classes).
   Markup produced by src/lib/renderer.ts; mirrors docs/design/Certificate.jsx
   with responsive clamps for real devices. */

.cert-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: clamp(16px, 4vw, 48px);
  background: radial-gradient(ellipse at center, #2a1a0c 0%, #0a0608 85%);
}

.cert-frame {
  position: relative;
  width: 100%;
  max-width: 760px;
  background: var(--ira-parchment);
  background-image:
    radial-gradient(ellipse at center, transparent 30%, rgba(154,118,38,0.08) 100%),
    repeating-linear-gradient(45deg, transparent 0, transparent 2px, rgba(154,118,38,0.025) 2px, rgba(154,118,38,0.025) 3px);
  border: 3px double var(--ira-ink);
  padding: 8px;
  box-shadow: var(--ira-shadow-deep);
  animation: cert-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cert-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1.5px solid var(--ira-gold-deep);
  pointer-events: none;
}
.cert-inner {
  border: 1px solid rgba(154,118,38,0.4);
  padding: clamp(22px, 5vw, 36px) clamp(18px, 6vw, 48px);
  text-align: center;
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, rgba(201,161,74,0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(201,161,74,0.08) 0%, transparent 50%);
}

/* corner flourishes */
.cert-corner {
  position: absolute;
  width: 36px;
  height: 36px;
  color: var(--ira-gold-deep);
  pointer-events: none;
}
.cert-corner.tl { top: 6px; left: 6px; }
.cert-corner.tr { top: 6px; right: 6px; transform: scaleX(-1); }
.cert-corner.bl { bottom: 6px; left: 6px; transform: scaleY(-1); }
.cert-corner.br { bottom: 6px; right: 6px; transform: scale(-1, -1); }

/* content stack (above the sparkle field) */
.cert-content { position: relative; z-index: 2; }

.cert-issuer {
  font-family: var(--ira-font-body);
  font-size: 14px;
  font-style: italic;
  color: var(--ira-aged-edge);
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.cert-rule {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ira-gold-deep) 30%, var(--ira-gold-deep) 70%, transparent);
  margin: 18px auto 14px;
  width: 70%;
}
.cert-preamble {
  font-family: var(--ira-font-body);
  font-size: clamp(17px, 3vw, 22px);
  font-style: italic;
  color: var(--ira-ink);
}
.cert-name {
  font-family: var(--ira-font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(56px, 13vw, 124px);
  margin: 12px 0 6px;
  color: var(--ira-crimson);
  text-shadow: 2px 2px 0 rgba(110, 24, 24, 0.18);
  line-height: 0.95;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.cert-name--md { font-size: clamp(44px, 10vw, 88px); }
.cert-name--sm { font-size: clamp(32px, 8vw, 56px); }
.cert-tagline {
  font-family: var(--ira-font-body);
  font-size: clamp(18px, 3.2vw, 24px);
  color: var(--ira-ink);
  margin-top: 8px;
}
.cert-amazing {
  font-family: var(--ira-font-body);
  font-weight: 900;
  font-size: clamp(22px, 5.8vw, 44px);
  color: var(--ira-forest);
  margin-top: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.cert-body {
  font-family: var(--ira-font-body);
  font-size: 15px;
  font-style: italic;
  color: #3a2d1c;
  max-width: 440px;
  margin: 14px auto 0;
  line-height: 1.5;
}

/* signature row */
.cert-sig-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}
.cert-sig, .cert-date { text-align: center; flex: 0 0 auto; max-width: 32%; }
.cert-sig .script-line {
  font-family: var(--ira-font-script);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 36px);
  color: var(--ira-ink);
  line-height: 1;
  transform: rotate(-4deg);
  margin-bottom: 2px;
  white-space: nowrap;
}
.cert-date .script-line {
  font-family: var(--ira-font-script);
  font-weight: 700;
  font-size: clamp(20px, 3.4vw, 30px);
  color: var(--ira-ink);
  line-height: 1;
  transform: rotate(2deg);
  margin-bottom: 2px;
  white-space: nowrap;
}
.cert-sig-role {
  border-top: 1px solid var(--ira-gold-deep);
  padding-top: 4px;
  font-size: 10px;
  font-family: var(--ira-font-mono);
  color: var(--ira-aged-edge);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* basic-tier credit */
.cert-credit {
  margin-top: 20px;
  font-size: 10px;
  font-family: var(--ira-font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(26,20,16,0.45);
}

/* ── Floating sparkles ────────────────────────────────────── */
.sparkle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.sparkle-field i {
  position: absolute;
  display: block;
  font-style: normal;
  color: var(--ira-gold);
  animation: float-up 6s ease-in infinite, twinkle 1.5s ease-in-out infinite;
}

/* ── Below-the-cert CTA (the viral loop) ──────────────────── */
.cert-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cert-cta .note {
  font-family: var(--ira-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(251,246,233,0.65);
}

/* small-screen signature row stacks */
@media (max-width: 560px) {
  .cert-sig-row { flex-direction: column; align-items: center; gap: 20px; }
  .cert-sig, .cert-date { max-width: none; }
  /* "R E A L L Y  A M A Z I N G" is literal spaces — on a phone it must shrink
     to stay on ONE line, not break mid-word (white-space:normal did that). */
  .cert-amazing { white-space: nowrap; font-size: clamp(15px, 4.6vw, 26px); letter-spacing: 0; }
  /* The viral CTA button below the card must fit the viewport. */
  .cert-cta { max-width: 100%; }
  .cert-cta .shiny-btn { white-space: normal; max-width: 100%; font-size: 15px; padding: 12px 20px; }
}

/* ═══ theme-neon.css ═══ */
/* Theme: Neon Fever — CRT terminal fanfare (docs/design/Themes.jsx NeonFeverCert). */

.cert-page.theme-neon { background: var(--ira-neon-bg); }

.neon-cert {
  position: relative;
  width: 100%;
  max-width: 760px;
  background: radial-gradient(ellipse at center, #1a0830 0%, #0a0414 70%);
  padding: clamp(18px, 4vw, 32px);
  border: 2px solid var(--ira-neon-pink);
  border-radius: 6px;
  box-shadow: 0 0 0 4px #0a0414, 0 0 0 6px var(--ira-neon-cyan), 0 0 80px rgba(255,43,214,0.4);
  font-family: var(--ira-font-mono);
  color: #fff;
  overflow: hidden;
  animation: cert-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.neon-grid {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(var(--ira-neon-pink) 1px, transparent 1px),
    linear-gradient(90deg, var(--ira-neon-pink) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%);
          mask-image: linear-gradient(180deg, transparent, #000 60%);
}
.neon-content { position: relative; text-align: center; padding: 16px; z-index: 2; }
.neon-kicker {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--ira-neon-cyan);
  margin-bottom: 8px;
  text-shadow: 0 0 8px var(--ira-neon-cyan);
}
.neon-sub {
  font-size: 14px;
  color: var(--ira-neon-yellow);
  font-style: italic;
  margin-bottom: 8px;
  text-shadow: 0 0 8px var(--ira-neon-yellow);
}
.neon-init { font-size: clamp(13px, 2.4vw, 18px); color: #fff; margin-bottom: 4px; }
.neon-name {
  font-family: var(--ira-font-pixel);
  font-size: clamp(26px, 7vw, 56px);
  margin: 24px 0 16px;
  color: var(--ira-neon-pink);
  text-shadow: 0 0 8px var(--ira-neon-pink), 0 0 22px var(--ira-neon-pink), 0 0 44px var(--ira-neon-pink);
  animation: neon-flicker 4s infinite;
  letter-spacing: 0.04em;
  word-break: break-word;
  line-height: 1.25;
}
.neon-amazing {
  font-size: clamp(16px, 3vw, 22px);
  color: var(--ira-neon-cyan);
  margin-bottom: 8px;
  text-shadow: 0 0 8px var(--ira-neon-cyan), 0 0 18px var(--ira-neon-cyan);
  font-weight: 700;
}
.neon-status {
  font-size: 12px;
  color: var(--ira-neon-yellow);
  text-shadow: 0 0 8px var(--ira-neon-yellow);
  margin-bottom: 24px;
  overflow-wrap: break-word;
}
.neon-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  border-top: 1px dashed var(--ira-neon-pink);
  padding-top: 12px;
}
.neon-footer .dots { color: var(--ira-neon-cyan); }

/* ═══ theme-wanted.css ═══ */
/* Theme: Wanted Poster — an old-west bounty poster nailed to a saloon wall. */

.cert-page.theme-wanted {
  background:
    repeating-linear-gradient(90deg, #3a2416 0 22px, #33200f 22px 44px),
    #2e1d0e;
}

.wnt-cert {
  position: relative;
  width: 100%;
  max-width: 620px;
  background: radial-gradient(ellipse at 50% 0%, #f2e5c2, #e6d19f 58%, #d9be84 100%);
  color: #3a2410;
  font-family: var(--ira-font-body);
  padding: clamp(28px, 5vw, 48px) clamp(22px, 5vw, 44px);
  border: 3px solid #6b4d1f;
  box-shadow: inset 0 0 44px rgba(107,77,31,0.35), 0 0 0 2px #d9be84, 0 18px 44px rgba(0,0,0,0.55);
  text-align: center;
  overflow: hidden;
  animation: cert-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wnt-inner { position: relative; z-index: 2; }
.wnt-nail {
  position: absolute; top: 16px; width: 15px; height: 15px; border-radius: 50%; z-index: 3;
  background: radial-gradient(circle at 35% 30%, #9aa2ab, #3d444b 72%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.45);
}
.wnt-nail-l { left: 18px; } .wnt-nail-r { right: 18px; }

.wnt-top { font-family: var(--ira-font-mono); font-size: clamp(10px, 2vw, 12px); letter-spacing: 0.22em; color: #7a5a2a; }
.wnt-wanted {
  font-family: var(--ira-font-display); font-weight: 900;
  font-size: clamp(48px, 13vw, 104px); line-height: 0.9; letter-spacing: 0.04em;
  margin: 4px 0 2px; color: #241408; text-shadow: 2px 2px 0 rgba(107,77,31,0.3);
}
.wnt-forby { font-style: italic; font-size: clamp(14px, 2.8vw, 19px); color: #5a3d18; letter-spacing: 0.03em; }
.wnt-photo {
  width: clamp(118px, 30vw, 164px); height: clamp(118px, 30vw, 164px); margin: 20px auto 6px;
  border: 4px solid #4a3113; background: rgba(58,36,16,0.07);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 26px rgba(74,49,19,0.32);
}
.wnt-photo span { font-family: var(--ira-font-display); font-weight: 900; font-size: clamp(60px, 15vw, 92px); color: #4a3113; opacity: 0.5; }
.wnt-photocap { font-family: var(--ira-font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #8a6a34; margin-bottom: 12px; }
.wnt-name {
  font-family: var(--ira-font-display); font-weight: 900; font-size: clamp(32px, 9vw, 64px);
  line-height: 0.98; margin: 6px 0 4px; color: #241408; text-transform: uppercase;
  letter-spacing: 0.01em; word-break: break-word;
}
.wnt-alias { font-style: italic; font-size: clamp(14px, 2.6vw, 18px); color: #5a3d18; margin-bottom: 14px; }
.wnt-reward {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  border-top: 3px double #6b4d1f; border-bottom: 3px double #6b4d1f; padding: 8px 34px; margin: 4px 0 14px;
}
.wnt-reward-lbl { font-family: var(--ira-font-mono); font-size: 11px; letter-spacing: 0.3em; color: #7a5a2a; }
.wnt-reward-amt { font-family: var(--ira-font-display); font-weight: 900; font-size: clamp(30px, 7vw, 46px); color: #6e1818; line-height: 1; }
.wnt-body { font-size: 13.5px; font-style: italic; color: #5a3d18; max-width: 440px; margin: 0 auto; line-height: 1.6; }
.wnt-body strong { color: #6e1818; font-style: normal; letter-spacing: 0.04em; }

.wnt-sig-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 26px; }
.wnt-sig, .wnt-date { flex: 1; font-family: var(--ira-font-script); font-weight: 700; font-size: clamp(20px, 3.6vw, 27px); color: #3a2410; }
.wnt-role {
  font-family: var(--ira-font-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #8a6a34; border-top: 1px solid #a98a4c; padding-top: 3px; margin-top: 3px;
}
.wnt-stamp {
  flex: 0 0 auto; width: clamp(70px, 12vw, 90px); height: clamp(70px, 12vw, 90px);
  display: flex; align-items: center; justify-content: center; font-size: clamp(32px, 7vw, 46px);
  color: #6e1818; border: 3px solid #6e1818; border-radius: 50%;
  transform: rotate(-11deg); opacity: 0.82; box-shadow: 0 0 0 3px rgba(110,24,24,0.18);
}
@media (max-width: 560px) {
  .wnt-sig-row { flex-direction: column; align-items: center; gap: 16px; }
}

/* ═══ theme-geo.css ═══ */
/* Theme: GeoCities Era — 1998 homepage energy (docs/design/Themes.jsx GeoCitiesCert). */

.cert-page.theme-geo { background: #1a1f5a; }

.geo-cert {
  position: relative;
  width: 100%;
  max-width: 760px;
  background: #1a1f5a;
  padding: clamp(14px, 3.4vw, 24px);
  font-family: "Comic Sans MS", "Marker Felt", var(--ira-font-script), cursive;
  color: #fff;
  border: 6px ridge #ffd400;
  animation: cert-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.geo-tiles {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image:
    radial-gradient(circle at 20px 20px, #ff52a0 4px, transparent 5px),
    radial-gradient(circle at 60px 60px, #00ffff 3px, transparent 4px);
  background-size: 80px 80px;
}
.geo-content { position: relative; text-align: center; z-index: 2; }
.geo-marquee {
  background: #000;
  border: 2px outset #c8cdd6;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 16px;
  padding: 4px 0;
}
.geo-marquee-track {
  display: inline-block;
  animation: geo-marquee 16s linear infinite;
  color: #ffd400;
  font-size: 14px;
  font-weight: 700;
}
@keyframes geo-marquee {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}
.geo-kaomoji { font-size: 16px; color: #ffd400; text-shadow: 2px 2px 0 #000; margin-bottom: 4px; }
.geo-welcome { font-size: 13px; color: #00ffff; font-weight: 700; margin-bottom: 8px; overflow-wrap: break-word; }
.geo-blink { animation: blink 1s steps(1) infinite; }
.geo-panel {
  background: #c8cdd6;
  border: 4px ridge #fff;
  padding: clamp(16px, 3.4vw, 24px);
  margin: 8px 0;
  color: #1a1f5a;
}
.geo-certifies { font-size: 18px; margin-bottom: 6px; font-weight: 700; }
.geo-name {
  font-size: clamp(36px, 9vw, 64px);
  color: #ff52a0;
  margin: 4px 0 6px;
  text-shadow: 3px 3px 0 #ffd400, 6px 6px 0 #1a1f5a;
  font-weight: 700;
  line-height: 1;
  word-break: break-word;
}
.geo-totally { font-size: clamp(17px, 3vw, 22px); color: #1a1f5a; margin-bottom: 6px; }
.geo-rainbow {
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 700;
  background: linear-gradient(90deg, #ff52a0, #ffd400, #00aa00, #00aaff, #ff52a0);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  letter-spacing: 0.04em;
}
.geo-hearts { font-size: 14px; margin-top: 8px; color: #1a1f5a; }
.geo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 11px;
  color: #c8cdd6;
}
.geo-counter {
  background: #000;
  color: #0f0;
  padding: 2px 8px;
  font-family: var(--ira-font-mono);
  border: 1px inset #c8cdd6;
}

/* ═══ theme-vaporwave.css ═══ */
/* Theme: Vaporwave — 80s sunset, perspective grid, chrome name. Only vibes. */

.cert-page.theme-vaporwave { background: linear-gradient(180deg, #1a0b2e 0%, #2a1150 45%, #0a0618 100%); }

.vap-cert {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: linear-gradient(180deg, #2b1a5c 0%, #3d1f6e 42%, #180d38 100%);
  border: 2px solid #ff5aa5;
  border-radius: 8px;
  box-shadow: 0 0 0 4px #0a0618, 0 0 0 6px #5ac8ff, 0 0 80px rgba(255,90,165,0.4);
  padding: clamp(22px, 4vw, 40px);
  overflow: hidden;
  color: #fff;
  font-family: var(--ira-font-mono);
  animation: cert-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Sunset disc, top-centre, sitting behind the name. */
.vap-sun {
  position: absolute; top: 12%; left: 50%; transform: translateX(-50%);
  width: min(300px, 60%); aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(180deg, #ffe14d 0%, #ff9a4f 46%, #ff5aa5 100%);
  box-shadow: 0 0 90px rgba(255,143,94,0.55);
  z-index: 0;
}
/* Neon perspective grid floor. */
.vap-grid {
  position: absolute; left: -30%; right: -30%; bottom: -8%; height: 46%;
  background-image:
    linear-gradient(rgba(255,90,165,0.9) 2px, transparent 2px),
    linear-gradient(90deg, rgba(90,200,255,0.55) 1px, transparent 1px);
  background-size: 100% 28px, 40px 100%;
  transform: perspective(300px) rotateX(64deg);
  transform-origin: bottom center;
  opacity: 0.55; z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%);
          mask-image: linear-gradient(180deg, transparent, #000 45%);
}
.vap-scan {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0.13) 0 2px, transparent 2px 4px);
}
.vap-content { position: relative; z-index: 2; text-align: center; }

.vap-kicker { font-size: clamp(12px, 2.6vw, 16px); letter-spacing: 0.42em; color: #5ac8ff; text-shadow: 0 0 8px #5ac8ff; }
.vap-issuer { font-size: 12px; color: #ffd43b; text-shadow: 0 0 8px #ffd43b; margin: 6px 0 8px; letter-spacing: 0.08em; }
.vap-preamble { font-size: 13px; color: #ffb3e0; letter-spacing: 0.04em; margin-bottom: 4px; }
.vap-name {
  font-family: var(--ira-font-display); font-weight: 900; font-style: italic;
  font-size: clamp(38px, 10vw, 78px); line-height: 1; margin: 24px 0 8px;
  letter-spacing: 0.02em; word-break: break-word;
  background: linear-gradient(180deg, #ffffff 0%, #bfeaff 42%, #5ac8ff 56%, #ff5aa5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #ff2bd6) drop-shadow(0 0 22px rgba(90,200,255,0.5));
}
.vap-bust { font-size: clamp(38px, 9vw, 60px); margin: 2px 0; filter: drop-shadow(0 0 14px rgba(255,90,165,0.6)); }
.vap-amazing {
  font-size: clamp(15px, 3vw, 22px); color: #5ac8ff; font-weight: 700; margin: 4px 0 6px;
  letter-spacing: 0.06em; text-shadow: 0 0 8px #5ac8ff, 0 0 18px #5ac8ff;
}
.vap-body { font-size: 12.5px; color: #dccbff; max-width: 460px; margin: 6px auto 0; line-height: 1.6; letter-spacing: 0.02em; }
.vap-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11px; color: rgba(255,255,255,0.55); border-top: 1px dashed #ff5aa5; padding-top: 12px; margin-top: 20px;
}
.vap-dots { color: #5ac8ff; }

/* ═══ theme-tradingcard.css ═══ */
/* Theme: Trading Card — a holographic ★ LEGENDARY ★ collectible with stats. */

.cert-page.theme-tradingcard { background: radial-gradient(ellipse at 50% 30%, #241a3a, #0d0a18 75%); perspective: 1100px; }

.tc-card {
  position: relative; width: 100%; max-width: 480px;
  border-radius: 18px; padding: 13px;
  background: linear-gradient(135deg, #ffd94f, #ff7ac2 25%, #7ac2ff 50%, #7bffb0 75%, #ffd94f);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 2px rgba(255,255,255,0.3);
  overflow: hidden; font-family: var(--ira-font-body);
  animation: cert-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Pointer-tilt (certInteract.ts sets --rx/--ry/--sc). is-live applies the
   3D transform once the entrance keyframe has finished (the running keyframe
   naturally overrides these until then); is-settling eases back on leave. */
.tc-card.is-live {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1));
  transition: transform 0.1s ease-out;
  box-shadow: 0 30px 60px rgba(0,0,0,0.65), 0 0 0 2px rgba(255,255,255,0.45);
}
.tc-card.is-settling { transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease; }

.tc-holo {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0.5;
  border-radius: 18px;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,0.7) 46%, transparent 60%);
  background-size: 300% 300%; animation: tc-shine 5s ease-in-out infinite;
}
/* Interactive holo: a prismatic foil + a specular highlight that both track
   the cursor. Replaces the passive diagonal sweep while the pointer is over. */
.tc-card.is-live .tc-holo {
  animation: none; opacity: 0.55; transition: opacity 0.3s ease;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.82), rgba(255,255,255,0) 40%),
    conic-gradient(from calc(var(--ry, 0deg) * 6) at var(--mx, 50%) var(--my, 50%),
      #ff4db8, #ffd94f 18%, #7bffb0 38%, #6ec8ff 58%, #c77dff 78%, #ff4db8);
  background-blend-mode: color-dodge;
}
@keyframes tc-shine { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }
@media (prefers-reduced-motion: reduce) {
  .tc-card { animation: none; }
  .tc-holo { animation: none; }
}
.tc-inner {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, #1c1730, #120e22);
  border: 2px solid rgba(255,255,255,0.25); border-radius: 12px;
  padding: clamp(15px, 4vw, 22px); color: #f3ecff; text-align: center;
}
.tc-top { display: flex; justify-content: space-between; align-items: center; }
.tc-rarity { font-family: var(--ira-font-mono); font-size: clamp(11px, 2.4vw, 14px); letter-spacing: 0.12em; color: #ffd94f; text-shadow: 0 0 8px rgba(255,217,79,0.7); }
.tc-hp { font-family: var(--ira-font-mono); font-weight: 700; font-size: clamp(13px, 2.6vw, 16px); color: #ff7ac2; }
.tc-name {
  font-family: var(--ira-font-display); font-weight: 900; font-style: italic;
  font-size: clamp(30px, 8vw, 50px); line-height: 1; margin: 6px 0 10px; color: #fff;
  word-break: break-word; text-shadow: 0 2px 12px rgba(122,194,255,0.5);
}
.tc-art {
  position: relative; border: 3px solid #ffd94f; border-radius: 8px; overflow: hidden;
  aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(122,194,255,0.4), transparent 62%),
    conic-gradient(from 0deg, #2a1f4a, #3a2a5e, #241a3a, #2a1f4a);
}
.tc-art-initial { font-family: var(--ira-font-display); font-weight: 900; font-size: clamp(60px, 20vw, 116px); color: rgba(255,255,255,0.85); text-shadow: 0 0 30px rgba(122,194,255,0.9); }
.tc-art-type { position: absolute; bottom: 6px; font-family: var(--ira-font-mono); font-size: 10px; letter-spacing: 0.18em; color: #7bffb0; }
.tc-move {
  border: 2px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 10px 12px; margin: 12px 0; text-align: left;
  background: rgba(255,255,255,0.04);
}
.tc-move-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tc-move-name { font-family: var(--ira-font-display); font-weight: 900; font-size: clamp(17px, 4vw, 22px); color: #ffd94f; }
.tc-move-dmg { font-family: var(--ira-font-display); font-weight: 900; font-size: clamp(22px, 5vw, 30px); color: #ff7ac2; }
.tc-move-desc { font-size: 12.5px; font-style: italic; color: #cfc3e8; line-height: 1.5; margin-top: 4px; }
.tc-stats {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  font-family: var(--ira-font-mono); font-size: 10px; letter-spacing: 0.04em; color: #9db8ff;
  border-top: 1px dashed rgba(255,255,255,0.2); border-bottom: 1px dashed rgba(255,255,255,0.2); padding: 8px 0;
}
.tc-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-family: var(--ira-font-mono); font-size: 9px; color: rgba(243,236,255,0.5); margin-top: 10px; }

/* ═══ theme-birthday.css ═══ */
/* Theme: Birthday Bash — confetti, cake, party colours on cream. */

.cert-page.theme-birthday {
  background: linear-gradient(135deg, #fff3d6 0%, #ffe0ec 45%, #dcefff 100%);
}

.bday-cert {
  position: relative;
  width: 100%;
  max-width: 760px;
  background: #fffaf0;
  padding: clamp(26px, 6vw, 44px) clamp(22px, 6vw, 44px);
  border: 4px dashed var(--ira-crimson);
  border-radius: 22px;
  text-align: center;
  font-family: var(--ira-font-body);
  color: #3a2d1c;
  box-shadow: 0 12px 40px rgba(163,36,36,0.18);
  overflow: hidden;
  animation: cert-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bday-inner { position: relative; z-index: 2; }
/* Falling confetti (confettiFieldHtml). */
.confetti-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.confetti-field i {
  position: absolute; top: -26px; display: block; opacity: 0;
  animation-name: confetti-fall; animation-timing-function: linear; animation-iteration-count: infinite;
}
@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.95; }
  100% { transform: translate(var(--drift, 0), 780px) rotate(560deg); opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) { .confetti-field { display: none; } }
.bday-kicker {
  font-family: var(--ira-font-mono);
  font-weight: 700;
  font-size: clamp(11px, 2.2vw, 13px);
  letter-spacing: 0.14em;
  color: var(--ira-crimson);
}
.bday-issuer { font-style: italic; font-size: clamp(13px, 2.4vw, 15px); color: #8a5a2a; margin: 8px 0 18px; }
.bday-preamble { font-style: italic; font-size: clamp(15px, 2.7vw, 19px); color: #5a4632; }
.bday-name {
  font-family: var(--ira-font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(52px, 13vw, 118px);
  line-height: 0.95;
  margin: 8px 0 4px;
  background: linear-gradient(90deg, #e8467a, #f5a623 45%, #3aa3d8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 3px 3px 0 rgba(255,224,140,0.5);
  word-break: break-word;
}
.bday-tagline { font-style: italic; font-size: clamp(15px, 2.8vw, 20px); color: #5a4632; }
.bday-amazing {
  font-family: var(--ira-font-display);
  font-weight: 900;
  font-size: clamp(24px, 5vw, 40px);
  letter-spacing: 0.05em;
  color: var(--ira-crimson);
  margin: 8px 0 16px;
}
.bday-body { font-size: 13px; font-style: italic; color: #6a5642; max-width: 460px; margin: 0 auto; line-height: 1.6; }
.bday-sig-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 26px; }
.bday-sig, .bday-date { flex: 1; }
.bday-sig .script-line, .bday-date .script-line {
  font-family: var(--ira-font-script); font-weight: 700; font-size: clamp(20px, 3.4vw, 28px); color: var(--ira-crimson);
}
.bday-role {
  font-family: var(--ira-font-mono); font-size: 9px; letter-spacing: 0.15em; color: #8a5a2a;
  text-transform: uppercase; border-top: 1px dashed var(--ira-crimson); padding-top: 3px; margin-top: 3px;
}
.bday-seal {
  flex: 0 0 auto; width: clamp(72px, 11vw, 92px); height: clamp(72px, 11vw, 92px);
  position: relative; display: flex; align-items: center; justify-content: center;
}
.bday-seal .disc {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #ffe7f3, #e8467a 78%);
  border: 3px solid #fff; box-shadow: 0 0 20px rgba(232,70,122,0.5);
}
.bday-seal .glyph { position: relative; font-size: 34px; }
@media (max-width: 560px) {
  .bday-sig-row { flex-direction: column; align-items: center; gap: 16px; }
  .bday-amazing { white-space: nowrap; font-size: clamp(15px, 4.6vw, 28px); letter-spacing: 0; }
}

/* ═══ theme-comic.css ═══ */
/* Theme: Comic Book — pop-art halftone, bold outlines, a REALLY AMAZING! burst. */

.cert-page.theme-comic { background: #ffd23f; }

.cmc-cert {
  position: relative; width: 100%; max-width: 680px;
  background: #fff8e6;
  border: 5px solid #101010; border-radius: 4px;
  box-shadow: 10px 10px 0 #101010;
  padding: clamp(24px, 5vw, 44px) clamp(20px, 5vw, 40px);
  overflow: hidden; text-align: center; font-family: var(--ira-font-body);
  animation: cert-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cmc-dots {
  position: absolute; inset: 0; z-index: 0; opacity: 0.5;
  background-image: radial-gradient(#ff3b6b 26%, transparent 27%); background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(135deg, #000, transparent 55%);
          mask-image: linear-gradient(135deg, #000, transparent 55%);
}
.cmc-rays {
  position: absolute; inset: -20%; z-index: 0; opacity: 0.13;
  background: repeating-conic-gradient(from 0deg at 50% 42%, #1560ff 0deg 7deg, transparent 7deg 14deg);
}
.cmc-inner { position: relative; z-index: 1; }
.cmc-banner {
  display: inline-block; background: #1560ff; color: #fff;
  font-family: var(--ira-font-display); font-weight: 900; font-size: clamp(13px, 2.8vw, 18px);
  letter-spacing: 0.03em; padding: 4px 16px; border: 3px solid #101010;
  transform: rotate(-2deg); box-shadow: 3px 3px 0 #101010;
}
.cmc-bubble {
  position: relative; display: inline-block; background: #fff; border: 3px solid #101010; border-radius: 16px;
  padding: 8px 18px; margin: 20px 0 6px; font-weight: 700; font-size: clamp(14px, 2.8vw, 18px); box-shadow: 3px 3px 0 #101010;
}
.cmc-bubble::after { content: ""; position: absolute; left: 32px; bottom: -14px; width: 0; height: 0; border: 11px solid transparent; border-top-color: #101010; }
.cmc-name {
  font-family: var(--ira-font-display); font-weight: 900; font-size: clamp(36px, 10vw, 74px);
  line-height: 0.98; margin: 10px 0 6px; color: #101010; text-transform: uppercase; letter-spacing: -0.01em;
  word-break: break-word; text-shadow: 3px 3px 0 #ff3b6b;
}
.cmc-burst {
  display: inline-flex; align-items: center; justify-content: center; margin: 8px 0 12px;
  width: clamp(190px, 48vw, 264px); aspect-ratio: 1; background: #ffe14d;
  clip-path: polygon(50% 0%, 61% 15%, 79% 8%, 76% 28%, 96% 30%, 82% 45%, 100% 55%, 80% 62%, 90% 82%, 68% 76%, 66% 97%, 50% 84%, 34% 97%, 32% 76%, 10% 82%, 20% 62%, 0% 55%, 18% 45%, 4% 30%, 24% 28%, 21% 8%, 39% 15%);
}
.cmc-burst span {
  font-family: var(--ira-font-display); font-weight: 900; font-size: clamp(19px, 5.2vw, 33px); line-height: 0.92;
  color: #d81e5b; text-transform: uppercase; transform: rotate(-6deg); -webkit-text-stroke: 1px #101010;
}
.cmc-body { font-size: 14px; color: #2a2a2a; max-width: 460px; margin: 4px auto 0; line-height: 1.55; font-weight: 500; }
.cmc-body strong { color: #d81e5b; font-family: var(--ira-font-display); font-weight: 900; font-size: 1.35em; }

.cmc-sig-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 24px; }
.cmc-sig, .cmc-date { flex: 1; font-family: var(--ira-font-script); font-weight: 700; font-size: clamp(20px, 3.6vw, 28px); color: #101010; }
.cmc-role { font-family: var(--ira-font-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: #666; border-top: 2px solid #101010; padding-top: 3px; margin-top: 3px; }
.cmc-stamp {
  flex: 0 0 auto; font-family: var(--ira-font-display); font-weight: 900; font-size: clamp(13px, 2.6vw, 16px);
  color: #1560ff; border: 3px solid #1560ff; border-radius: 6px; padding: 8px 10px; transform: rotate(-8deg); letter-spacing: 0.05em;
}
@media (max-width: 560px) {
  .cmc-sig-row { flex-direction: column; align-items: center; gap: 16px; }
}

/* ═══ theme-sweetheart.css ═══ */
/* Theme: With All My Heart — blush + crimson, hearts, romance. */

.cert-page.theme-sweetheart {
  background: linear-gradient(150deg, #ffe4ec 0%, #ffd3de 50%, #ffe9d6 100%);
}

.heart-cert {
  position: relative;
  width: 100%;
  max-width: 760px;
  background: #fff6f4;
  padding: clamp(28px, 6vw, 48px) clamp(24px, 6vw, 46px);
  border: 2px solid var(--ira-rose);
  border-radius: 20px;
  text-align: center;
  font-family: var(--ira-font-body);
  color: #5a2a34;
  box-shadow: 0 0 0 6px rgba(232,168,196,0.3), 0 16px 44px rgba(163,36,36,0.2);
  overflow: hidden;
  animation: cert-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.heart-inner { position: relative; z-index: 2; }
/* Floating hearts (heartFieldHtml). */
.heart-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.heart-field i {
  position: absolute; bottom: -30px; display: block; color: #e57ea0; line-height: 1; opacity: 0;
  animation-name: heart-float; animation-timing-function: ease-in; animation-iteration-count: infinite;
}
@keyframes heart-float {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
  15% { opacity: var(--op, 0.7); }
  100% { transform: translate(var(--sway, 0), -700px) scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .heart-field { display: none; } }
.heart-kicker {
  font-family: var(--ira-font-script);
  font-weight: 700;
  font-size: clamp(18px, 3.2vw, 24px);
  color: #d16a86;
}
.heart-issuer {
  font-style: italic; font-size: clamp(13px, 2.4vw, 15px); color: #a35a6a;
  letter-spacing: 0.08em; margin: 4px 0 20px;
}
.heart-preamble { font-style: italic; font-size: clamp(15px, 2.7vw, 19px); color: #7a3a48; }
.heart-name {
  font-family: var(--ira-font-script);
  font-weight: 700;
  font-size: clamp(58px, 15vw, 132px);
  color: var(--ira-crimson);
  margin: 6px 0 2px;
  line-height: 0.92;
  text-shadow: 2px 2px 0 var(--ira-rose), 4px 4px 0 rgba(255,255,255,0.6);
  word-break: break-word;
}
.heart-tagline { font-style: italic; font-size: clamp(15px, 2.8vw, 20px); color: #7a3a48; }
.heart-amazing {
  font-family: var(--ira-font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(28px, 5.6vw, 44px);
  color: #c9293a;
  margin: 6px 0 16px;
  letter-spacing: 0.02em;
}
.heart-body { font-size: 13px; font-style: italic; color: #8a4a58; max-width: 470px; margin: 0 auto; line-height: 1.65; }
.heart-sig-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 28px; }
.heart-sig, .heart-date { flex: 1; }
.heart-sig .script-line, .heart-date .script-line {
  font-family: var(--ira-font-script); font-weight: 700; font-size: clamp(22px, 3.6vw, 30px); color: var(--ira-crimson);
}
.heart-role {
  font-family: var(--ira-font-mono); font-size: 9px; letter-spacing: 0.14em; color: #a35a6a;
  text-transform: uppercase; border-top: 1px solid var(--ira-rose); padding-top: 3px; margin-top: 3px;
}
.heart-seal {
  flex: 0 0 auto; width: clamp(72px, 11vw, 92px); height: clamp(72px, 11vw, 92px);
  position: relative; display: flex; align-items: center; justify-content: center;
}
.heart-seal .disc {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #ff9db2, var(--ira-crimson) 80%);
  border: 3px solid #fff; box-shadow: 0 0 22px rgba(201,41,58,0.5);
}
.heart-seal .glyph { position: relative; font-size: 34px; color: #fff; text-shadow: 0 2px 3px rgba(0,0,0,0.2); }
@media (max-width: 560px) { .heart-sig-row { flex-direction: column; align-items: center; gap: 16px; } }

/* ═══ theme-terminal.css ═══ */
/* Theme: Hacker Terminal — green-on-black CRT, ACCESS GRANTED, blinking cursor. */

.cert-page.theme-terminal { background: #05080a; }

.trm-cert {
  position: relative; width: 100%; max-width: 680px; font-family: var(--ira-font-mono);
  animation: cert-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.trm-scan {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: 10px;
  background: repeating-linear-gradient(180deg, rgba(0,255,90,0.06) 0 2px, transparent 2px 4px);
}
.trm-window {
  position: relative; z-index: 1;
  background: #0a1410; border: 1px solid #1f6b3a; border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 3px #05080a, 0 0 60px rgba(51,255,120,0.22), inset 0 0 60px rgba(0,40,10,0.6);
}
.trm-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #0d1c14; border-bottom: 1px solid #1f6b3a; }
.trm-dot { width: 11px; height: 11px; border-radius: 50%; }
.trm-dot.r { background: #ff5f56; } .trm-dot.y { background: #ffbd2e; } .trm-dot.g { background: #27c93f; }
.trm-title { margin-left: 8px; font-size: 12px; color: #4ade80; opacity: 0.7; }
.trm-body {
  padding: clamp(18px, 4vw, 30px); color: #4ade80; font-size: clamp(12px, 2.4vw, 15px); line-height: 1.85;
  text-shadow: 0 0 6px rgba(74,222,128,0.5); text-align: left;
}
.trm-line { word-break: break-word; }
.trm-p { color: #7bffb0; }
.trm-dim { color: #2f8f52; text-shadow: none; }
.trm-ok { color: #7bffb0; font-weight: 700; }
.trm-grant {
  display: inline-block; margin: 14px 0; padding: 8px 18px;
  font-family: var(--ira-font-display); font-weight: 900; font-size: clamp(22px, 6vw, 40px); letter-spacing: 0.06em;
  color: #d6ffe4; background: rgba(39,201,63,0.12); border: 2px solid #33ff78;
  text-shadow: 0 0 12px rgba(51,255,120,0.9); box-shadow: 0 0 24px rgba(51,255,120,0.35);
  animation: trm-flicker 3s infinite;
}
@keyframes trm-flicker { 0%, 92%, 100% { opacity: 1; } 94% { opacity: 0.5; } 96% { opacity: 1; } 98% { opacity: 0.6; } }
.trm-name { color: #d6ffe4; font-weight: 700; font-size: 1.35em; text-shadow: 0 0 10px rgba(214,255,228,0.8); }
.trm-hi { color: #7bffb0; font-weight: 700; }
.trm-cursor { animation: trm-blink 1s step-end infinite; }
@keyframes trm-blink { 50% { opacity: 0; } }

/* ═══ marketing.css ═══ */
/* Marketing components — landing / success / legal pages.
   Translated from docs/design/LandingPage2.jsx + styles.css. */

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4.4vw, 56px) 56px;
  position: relative;
}
body.marketing {
  background: var(--ira-cream);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(201,161,74,0.12), transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(163,36,36,0.06), transparent 40%),
    repeating-linear-gradient(45deg, transparent 0 6px, rgba(154,118,38,0.025) 6px 7px);
  overflow-x: hidden;
}

/* ── Top bar ──────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}
.topbar nav { display: flex; gap: clamp(14px, 2.4vw, 28px); align-items: center; font-size: 15px; flex-wrap: wrap; }
.topbar nav a { color: var(--ira-ink); text-decoration: none; }
.topbar nav a:hover { color: var(--ira-crimson); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 545px);
  gap: 48px;
  align-items: start;
  padding-top: 36px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid var(--ira-ink);
  border-radius: var(--ira-radius-pill);
  padding: 6px 14px;
  box-shadow: 0 3px 0 var(--ira-ink);
  font-size: 12px;
  font-family: var(--ira-font-mono);
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.hero-badge .s { color: var(--ira-gold-deep); }
.hero h1 {
  font-family: var(--ira-font-display);
  font-weight: 900;
  font-size: clamp(44px, 6.8vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 22px 0 8px;
  color: var(--ira-ink);
}
.hero h1 .really { font-style: italic; color: var(--ira-crimson); }
.hero h1 .underlined { position: relative; display: inline-block; }
.hero h1 .underlined svg { position: absolute; left: 0; right: 0; bottom: -8px; width: 100%; }
.hero-pitch {
  font-size: clamp(17px, 2vw, 20px);
  color: #3a2d1c;
  max-width: 540px;
  line-height: 1.45;
  margin-top: 26px;
  font-style: italic;
}

/* search */
.search-wrap { margin-top: 32px; }
.search-shell {
  background: #fff;
  border: 2.5px solid var(--ira-ink);
  border-radius: 14px;
  padding: 6px;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  box-shadow: 0 6px 0 var(--ira-ink), 0 10px 30px rgba(60,40,10,0.18);
  font-family: var(--ira-font-body);
}
.search-shell input {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: clamp(20px, 3vw, 28px);
  padding: 12px 14px;
  background: transparent;
  color: var(--ira-ink);
  min-width: 0;
}
.search-shell input::placeholder { color: rgba(26,20,16,0.35); font-style: italic; }
.search-shell input:focus-visible { outline: 2px solid var(--ira-gold-deep); outline-offset: 2px; border-radius: 8px; }
.search-shell .suffix {
  display: flex;
  align-items: center;
  font-family: var(--ira-font-mono);
  font-size: clamp(13px, 1.8vw, 18px);
  color: var(--ira-gold-deep);
  padding: 0 10px 0 4px;
  font-weight: 700;
}
.search-shell .shiny-btn { border-radius: 10px; margin-left: 6px; }

.avail-row { margin-top: 12px; display: flex; align-items: center; gap: 12px; min-height: 28px; flex-wrap: wrap; }
.avail-note { font-size: 14px; color: #3a2d1c; font-style: italic; }
.avail-note a { color: var(--ira-crimson); }

.avail-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--ira-radius-pill);
  font-family: var(--ira-font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.avail-pill[hidden] { display: none; }
.avail-pill.ok { background: #e7f4d7; color: #3a5a14; border: 1.5px solid #6b8c2a; }
.avail-pill.no { background: #fbe1d6; color: #7a2410; border: 1.5px solid #b04020; }
.avail-pill.checking { background: #fff5d0; color: #6a4f10; border: 1.5px solid #b8902a; }
.avail-pill.premium { background: #fdf0cf; color: #7a5c00; border: 1.5px solid var(--ira-gold-deep); }

.chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chips .lbl { font-size: 12px; color: var(--ira-aged-edge); font-family: var(--ira-font-mono); letter-spacing: 0.1em; }
.chip {
  background: #fff;
  border: 1.5px solid var(--ira-ink);
  border-radius: var(--ira-radius-pill);
  padding: 4px 12px;
  font-size: 13px;
  font-family: var(--ira-font-mono);
  cursor: pointer;
  color: var(--ira-ink);
  box-shadow: 0 2px 0 var(--ira-ink);
}
.chip:hover { background: var(--ira-cream); }

/* hero right: live preview */
.hero-preview { position: relative; padding-top: 34px; }
.hero-preview .annot {
  position: absolute;
  top: -6px;
  left: 10px;
  z-index: 2;
  font-family: var(--ira-font-script);
  font-weight: 700;
  font-size: 25px;
  color: var(--ira-crimson);
  transform: rotate(-4deg);
  white-space: nowrap;
}
.hero-preview .tilt { transform: rotate(1.4deg); }
.hero-preview .caption {
  margin-top: 16px;
  text-align: center;
  font-family: var(--ira-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ira-aged-edge);
}

.browser-frame {
  background: #fff;
  border: 2.5px solid var(--ira-ink);
  border-radius: 16px;
  box-shadow: 0 8px 0 var(--ira-ink), 0 20px 44px rgba(60,40,10,0.24);
  overflow: hidden;
}
.browser-frame .chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--ira-ink);
  background: var(--ira-cream);
}
.browser-frame .dots { display: flex; gap: 5px; }
.browser-frame .dots span {
  width: 11px; height: 11px; border-radius: 99px;
  border: 1.5px solid rgba(26,20,16,0.5);
}
.browser-frame .dots span:nth-child(1) { background: #e8907e; }
.browser-frame .dots span:nth-child(2) { background: #f4d77a; }
.browser-frame .dots span:nth-child(3) { background: #9dc49a; }
.browser-frame .urlbar {
  flex: 1;
  background: #fff;
  border: 1.5px solid rgba(26,20,16,0.3);
  border-radius: 99px;
  padding: 5px 14px;
  font-family: var(--ira-font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ira-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-frame .urlbar .scheme { color: rgba(26,20,16,0.35); font-weight: 400; }
.browser-frame .stage {
  background: radial-gradient(ellipse at center, #2a1a0c 0%, #0a0608 85%);
  display: flex;
  justify-content: center;
  overflow: hidden;
  height: 430px;
  padding-top: 26px;
}
.browser-frame .stage .scaler {
  width: 700px;
  flex-shrink: 0;
  transform: scale(0.72);
  transform-origin: top center;
}

/* ── Ticker ───────────────────────────────────────────────── */
.ticker {
  margin: 48px calc(-1 * clamp(18px, 4.4vw, 56px)) 0;
  border-top: 2px solid var(--ira-ink);
  border-bottom: 2px solid var(--ira-ink);
  background: #fff;
  padding: 11px 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--ira-font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ira-ink);
}
.ticker-track { display: inline-flex; animation: ticker-scroll 46s linear infinite; }
.ticker-track .s { padding: 0 18px; color: var(--ira-gold); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Section headings ─────────────────────────────────────── */
.section { margin-top: 88px; }
.section h2 {
  font-family: var(--ira-font-display);
  font-weight: 900;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  margin: 6px 0 32px;
  letter-spacing: -0.02em;
}
.section h2 em { color: var(--ira-crimson); }
.section .lede {
  margin: 0;
  max-width: 360px;
  font-size: 15px;
  font-style: italic;
  color: #3a2d1c;
  line-height: 1.5;
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 0; flex: 1; }

/* ── How it works ─────────────────────────────────────────── */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.how-card {
  background: #fff;
  border: 2.5px solid var(--ira-ink);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 5px 0 var(--ira-ink);
}
.how-card .num {
  font-family: var(--ira-font-display);
  font-style: italic;
  font-weight: 900;
  font-size: 64px;
  color: var(--ira-gold);
  line-height: 0.9;
}
.how-card .t { font-family: var(--ira-font-display); font-weight: 900; font-size: 24px; margin-top: 4px; }
.how-card p { font-size: 16px; line-height: 1.5; color: #3a2d1c; margin-top: 8px; }

/* ── Themes showcase ──────────────────────────────────────── */
.theme-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.theme-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ira-ink);
  border: 2px solid var(--ira-ink);
  border-radius: var(--ira-radius-pill);
  padding: 8px 16px;
  cursor: pointer;
  font-family: var(--ira-font-body);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 3px 0 var(--ira-ink);
}
.theme-tab[aria-selected="true"] {
  background: var(--ira-ink);
  color: var(--ira-cream);
  box-shadow: 0 3px 0 var(--ira-gold-deep);
}
.theme-tab .dot { width: 10px; height: 10px; border-radius: 99px; border: 1px solid rgba(0,0,0,0.3); }
.theme-stage {
  border: 2.5px solid var(--ira-ink);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 0 var(--ira-ink), 0 14px 36px rgba(60,40,10,0.2);
  position: relative;
}
.theme-stage .viewport {
  height: 560px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
/* center-center origin: the viewport centers the unscaled (often taller-than-
   viewport) panel, so a top-center origin pins that overflowing top above the
   frame and clips it. Center origin keeps every panel visually centred. */
.theme-stage .scaler { width: 760px; flex-shrink: 0; transform: scale(0.64); transform-origin: center center; }
.theme-stage .tag {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-family: var(--ira-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
}
.theme-stage.on-light .tag { color: rgba(90,58,106,0.7); }
.theme-panel[hidden] { display: none; }

/* ── Pricing ──────────────────────────────────────────────── */
.billing-toggle {
  display: inline-flex;
  background: #fff;
  border: 2.5px solid var(--ira-ink);
  border-radius: var(--ira-radius-pill);
  padding: 4px;
  box-shadow: 0 4px 0 var(--ira-ink);
  font-size: 14px;
  font-family: var(--ira-font-body);
  font-weight: 700;
}
.billing-toggle button {
  background: transparent;
  color: var(--ira-ink);
  border: 0;
  padding: 8px 18px;
  border-radius: var(--ira-radius-pill);
  cursor: pointer;
  font: inherit;
}
.billing-toggle button[aria-pressed="true"] { background: var(--ira-ink); color: var(--ira-cream); }

.pricing-grid { display: flex; gap: 24px; align-items: stretch; flex-wrap: wrap; }
.pricing-card {
  background: var(--ira-cream);
  border: 2.5px solid var(--ira-ink);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  box-shadow: 0 5px 0 var(--ira-ink), 0 10px 24px rgba(60,40,10,0.12);
  font-family: var(--ira-font-body);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-width: 240px;
}
.pricing-card.featured {
  background: linear-gradient(180deg, #fff5d0 0%, var(--ira-cream) 100%);
  transform: translateY(-8px);
}
.pricing-card .ribbon {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  background: var(--ira-crimson);
  color: var(--ira-cream);
  font-family: var(--ira-font-body);
  font-style: italic;
  font-weight: 900;
  font-size: 14px;
  padding: 6px 18px;
  border-radius: 4px;
  box-shadow: 0 3px 0 var(--ira-crimson-deep);
  white-space: nowrap;
}
.pricing-card .price-line { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.pricing-card .price {
  font-family: var(--ira-font-display);
  font-weight: 900;
  font-size: 52px;
  color: var(--ira-ink);
  line-height: 1;
}
.pricing-card .per { font-size: 14px; color: var(--ira-aged-edge); font-family: var(--ira-font-mono); }
.pricing-card .was {
  font-size: 13px;
  color: rgba(26,20,16,0.45);
  font-family: var(--ira-font-mono);
  text-decoration: line-through;
}
.pricing-card .sub { font-size: 14px; font-style: italic; color: #3a2d1c; }
.pricing-card hr { border: 0; border-top: 1.5px dashed var(--ira-gold); margin: 0; }
.pricing-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pricing-card li { font-size: 15px; color: var(--ira-ink); display: flex; gap: 10px; align-items: flex-start; }
.pricing-card li .s { color: var(--ira-gold-deep); font-weight: 900; margin-top: 1px; }
.pricing-card .shiny-btn { width: 100%; margin-top: 8px; font-size: 16px; }
.pricing-note {
  margin-top: 18px;
  font-size: 13px;
  font-family: var(--ira-font-mono);
  color: var(--ira-aged-edge);
  letter-spacing: 0.05em;
}
.premium-banner {
  margin: 0 0 22px;
  background: #fdf0cf;
  border: 2px solid var(--ira-gold-deep);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px;
  box-shadow: 0 3px 0 var(--ira-gold-deep);
}
.premium-banner[hidden] { display: none; }

/* ── Testimonials ─────────────────────────────────────────── */
.quotes { display: flex; gap: 28px; justify-content: center; align-items: stretch; margin-top: 22px; padding: 0 12px; flex-wrap: wrap; }
.quote-note {
  background: #fff;
  border: 2px solid var(--ira-ink);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 4px 0 var(--ira-ink), 0 8px 18px rgba(60,40,10,0.18);
  font-family: var(--ira-font-body);
  flex: 1;
  min-width: 240px;
  max-width: 380px;
}
.quote-note .q { font-size: 17px; font-style: italic; color: var(--ira-ink); line-height: 1.45; }
.quote-note .who {
  margin-top: 14px;
  font-family: var(--ira-font-script);
  font-weight: 700;
  font-size: 24px;
  color: var(--ira-crimson);
  line-height: 1;
}
.quote-note .role {
  margin-top: 2px;
  font-family: var(--ira-font-mono);
  font-size: 10px;
  color: var(--ira-aged-edge);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.quote-note.t1 { transform: rotate(-2deg); background: #fff5d0; }
.quote-note.t2 { transform: rotate(1.5deg); }
.quote-note.t3 { transform: rotate(-1deg); background: #fbe7c2; }

/* ── Gift banner ──────────────────────────────────────────── */
.gift-banner {
  margin-top: 88px;
  background: var(--ira-ink);
  color: var(--ira-cream);
  border-radius: 18px;
  padding: clamp(24px, 4.4vw, 48px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 0 var(--ira-gold-deep), 0 12px 36px rgba(0,0,0,0.3);
}
.gift-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 50%, rgba(201,161,74,0.25), transparent 50%);
  pointer-events: none;
}
.gift-banner .inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.gift-banner .kicker { color: var(--ira-gold-light); }
.gift-banner h2 {
  font-family: var(--ira-font-display);
  font-weight: 900;
  font-size: clamp(32px, 4.4vw, 56px);
  margin: 6px 0 12px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ira-cream);
}
.gift-banner h2 em { color: var(--ira-gold-light); }
.gift-banner p { font-size: 18px; line-height: 1.5; max-width: 580px; color: rgba(251,246,233,0.85); font-style: italic; }
.gift-letter {
  flex: 0 0 320px;
  background: var(--ira-cream);
  color: var(--ira-ink);
  border-radius: 8px;
  padding: 20px;
  transform: rotate(3deg);
  box-shadow: 0 14px 30px rgba(0,0,0,0.4);
  border: 2px solid var(--ira-gold-deep);
}
.gift-letter .head {
  font-family: var(--ira-font-mono);
  font-size: 11px;
  color: var(--ira-aged-edge);
  border-bottom: 1px dashed var(--ira-gold);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.gift-letter .body { font-family: var(--ira-font-body); font-size: 15px; font-style: italic; line-height: 1.5; }
.gift-letter .body strong { font-style: normal; color: var(--ira-crimson); }
.gift-letter .body .url { color: var(--ira-gold-deep); }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.faq-grid details {
  background: #fff;
  border: 2px solid var(--ira-ink);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 0 var(--ira-ink);
}
.faq-grid summary {
  font-family: var(--ira-font-display);
  font-weight: 900;
  font-size: 18px;
  color: var(--ira-ink);
  cursor: pointer;
  list-style: none;
}
.faq-grid summary::-webkit-details-marker { display: none; }
.faq-grid summary .s { color: var(--ira-gold-deep); margin-right: 6px; }
.faq-grid details p { font-size: 15px; line-height: 1.5; color: #3a2d1c; margin: 8px 0 0; }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  margin-top: 88px;
  padding-top: 32px;
  border-top: 2px solid var(--ira-ink);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}
.footer .est {
  font-family: var(--ira-font-mono);
  font-size: 11px;
  color: var(--ira-aged-edge);
  margin-top: 8px;
  letter-spacing: 0.1em;
}
.footer .cols { display: flex; gap: 36px; font-size: 14px; flex-wrap: wrap; }
.footer .cols a { display: block; color: var(--ira-ink); text-decoration: none; margin-top: 2px; }
.footer .cols a:hover { color: var(--ira-crimson); }
.footer .disclaimer {
  width: 100%;
  font-size: 12px;
  font-style: italic;
  color: rgba(26,20,16,0.55);
  padding: 18px 0 0;
}

/* ── Checkout modal ───────────────────────────────────────── */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,20,16,0.65);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 16px;
  z-index: 50;
  overflow-y: auto;
}
.checkout-overlay[hidden] { display: none; }
.checkout-modal {
  background: var(--ira-cream);
  border: 2.5px solid var(--ira-ink);
  border-radius: 16px;
  box-shadow: 0 8px 0 var(--ira-ink), 0 24px 60px rgba(0,0,0,0.4);
  width: min(520px, 100%);
  padding: 20px;
}
.checkout-modal .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.checkout-modal .title { font-family: var(--ira-font-display); font-weight: 900; font-size: 20px; }
.checkout-modal .close {
  background: #fff;
  border: 2px solid var(--ira-ink);
  border-radius: 99px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 2px 0 var(--ira-ink);
}
.checkout-modal .summary {
  font-family: var(--ira-font-mono);
  font-size: 12px;
  color: var(--ira-aged-edge);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
#checkout-mount { min-height: 320px; }
.checkout-error {
  background: #fbe1d6;
  border: 2px solid #b04020;
  color: #7a2410;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 10px;
}
.checkout-error[hidden] { display: none; }

/* ── Legal / prose pages ──────────────────────────────────── */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 {
  font-family: var(--ira-font-display);
  font-weight: 900;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.02em;
  margin: 18px 0 6px;
}
.prose h1 em { color: var(--ira-crimson); }
.prose h2 { font-family: var(--ira-font-display); font-weight: 900; font-size: 24px; margin: 34px 0 10px; }
.prose p, .prose li { font-size: 16px; line-height: 1.6; color: #3a2d1c; margin: 10px 0; }
.prose ul { padding-left: 22px; }
.prose a { color: var(--ira-crimson); }
.prose .updated { font-family: var(--ira-font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ira-aged-edge); text-transform: uppercase; }
.prose .card {
  background: #fff;
  border: 2px solid var(--ira-ink);
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 4px 0 var(--ira-ink);
  margin: 22px 0;
}

/* ── Confetti (success page) ──────────────────────────────── */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i {
  position: absolute;
  top: -5vh;
  font-style: normal;
  animation: confetti-fall var(--dur, 3s) ease-in var(--delay, 0s) 1 forwards;
  opacity: 0;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0.9; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; }
  .hero-preview { max-width: 620px; }
  .how-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* Top bar: wordmark on its own row, nav wraps below (5 links don't fit beside it). */
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 0; }
  .topbar nav { width: 100%; gap: 12px 18px; font-size: 14px; }

  /* Hero: single column that may shrink BELOW the preview's intrinsic width
     (minmax(0,…)); without this the ~620px browser-frame blows the page out. */
  .hero { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 18px; }

  /* The live-preview subtree must never force the page wider than the viewport. */
  .hero-preview { padding-top: 40px; }
  .hero-preview .tilt { transform: none; max-width: 100%; }
  .browser-frame { max-width: 100%; }
  .browser-frame .urlbar { min-width: 0; }
  .browser-frame .stage { height: 300px; }
  .browser-frame .stage .scaler { transform: scale(0.46); }

  /* Bureau badge: wrap + shrink instead of running off the edge. */
  .hero-badge { white-space: normal; font-size: 10px; letter-spacing: 0.04em; line-height: 1.4; }

  .hero-pitch { max-width: 100%; margin-top: 20px; }

  /* Search: input takes the full row, suffix + button stack under it. */
  .search-shell input { flex: 1 1 100%; font-size: 22px; }
  .search-shell .suffix { padding-left: 14px; }
  .search-shell .shiny-btn { width: 100%; margin: 6px 0 0; }

  .pricing-card.featured { transform: none; }
  .gift-letter { flex: 1 1 auto; transform: rotate(1deg); }
  .theme-stage .viewport { height: 420px; }
  .theme-stage .scaler { transform: scale(0.44); }
}

/* ═══ portal.css ═══ */
/* Dashboard + admin portal — deliberately utilitarian (the joy lives on the
   cert). Worker-rendered pages on the apex link /assets/styles.css. */

.portal {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 32px) 64px;
}
.portal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 24px;
  border-bottom: 2px solid var(--ira-ink);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.portal-bar .who { font-family: var(--ira-font-mono); font-size: 12px; color: var(--ira-aged-edge); }
.portal h1 {
  font-family: var(--ira-font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(28px, 5vw, 44px);
  color: var(--ira-crimson);
  margin: 0 0 6px;
}
.portal .sub { font-style: italic; color: #3a2d1c; margin-bottom: 24px; }

.card {
  background: #fff;
  border: 2px solid var(--ira-ink);
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--ira-ink);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.card h2 { font-family: var(--ira-font-display); font-weight: 900; font-size: 20px; margin: 0 0 4px; }
.card .meta { font-family: var(--ira-font-mono); font-size: 12px; color: var(--ira-aged-edge); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--ira-radius-pill);
  font-family: var(--ira-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pill.active { background: #e7f4d7; color: #3a5a14; border: 1.5px solid #6b8c2a; }
.pill.grace { background: #fff5d0; color: #6a4f10; border: 1.5px solid #b8902a; }
.pill.lapsed { background: #fbe1d6; color: #7a2410; border: 1.5px solid #b04020; }
.pill.awaiting { background: #fbe1d6; color: #7a2410; border: 1.5px solid #b04020; }
.pill.closed { background: #eee; color: #555; border: 1.5px solid #bbb; }

.field { margin: 14px 0; }
.field label { display: block; font-family: var(--ira-font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ira-aged-edge); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 2px solid var(--ira-ink);
  border-radius: 8px;
  background: #fff;
  color: var(--ira-ink);
}
.field textarea { min-height: 90px; resize: vertical; }
.field .locked { font-size: 12px; color: var(--ira-aged-edge); font-style: italic; }
.field.disabled input, .field.disabled select, .field.disabled textarea { opacity: 0.5; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn-sm {
  font-family: var(--ira-font-body);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border: 2px solid var(--ira-ink);
  border-radius: 8px;
  background: var(--ira-gold);
  color: var(--ira-ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 3px 0 var(--ira-ink);
}
.btn-sm.ghost { background: #fff; }
.btn-sm:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ira-ink); }

.notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.notice.ok { background: #e7f4d7; border: 2px solid #6b8c2a; color: #2f4a10; }
.notice.err { background: #fbe1d6; border: 2px solid #b04020; color: #7a2410; }
.notice.info { background: #fdf0cf; border: 2px solid var(--ira-gold-deep); color: #6a4f10; }

.login-box { max-width: 440px; margin: 8vh auto 0; text-align: center; }
.login-box .seal-wrap { display: flex; justify-content: center; margin-bottom: 18px; }

/* admin inbox */
.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--ira-ink);
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fff;
  box-shadow: 0 3px 0 var(--ira-ink);
}
.thread-list a { text-decoration: none; color: var(--ira-ink); font-weight: 700; }
.thread-list .cp { font-family: var(--ira-font-mono); font-size: 12px; color: var(--ira-aged-edge); }
.msg {
  border: 2px solid var(--ira-ink);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
}
.msg.outbound { background: #fbf6e9; margin-left: 32px; }
.msg .hdr { font-family: var(--ira-font-mono); font-size: 11px; color: var(--ira-aged-edge); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
.msg pre { white-space: pre-wrap; word-wrap: break-word; font-family: var(--ira-font-body); font-size: 15px; margin: 0; line-height: 1.5; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { font-family: var(--ira-font-mono); font-size: 12px; padding: 6px 12px; border: 2px solid var(--ira-ink); border-radius: 999px; text-decoration: none; color: var(--ira-ink); }
.tabs a.on { background: var(--ira-ink); color: var(--ira-cream); }
.kpis { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.kpi { background: #fff; border: 2px solid var(--ira-ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ira-ink); padding: 16px 20px; min-width: 130px; }
.kpi .n { font-family: var(--ira-font-display); font-weight: 900; font-size: 34px; line-height: 1; }
.kpi .l { font-family: var(--ira-font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ira-aged-edge); margin-top: 4px; }
