/* ============================================================
   The Client Yes Kit — design tokens
   Fable (F), Handhold (H), Apple (A) references merged
   ============================================================ */
:root {
  /* surfaces — Fable + Handhold */
  --canvas: #f7f4ee;          /* F paper cream (page) */
  --canvas-2: #f2f1ed;        /* H warm cream (alt bands) */
  --card: #ffffff;
  --fog: #ededed;
  --fog-2: #e2e2e5;

  /* ink — Fable */
  --ink: #161015;
  --graphite: #3f383d;
  --muted: #737373;
  --line: #dbd7cd;

  /* chromatic bands — Fable */
  --forest: #064c37;
  --sky: #43a1d7;
  --char: #070607;

  /* accent — Apple signal blue (purchase / links only) */
  --blue: #0071e3;

  /* landing-page dark luxe */
  --luxe-gold: #c9a24b;
  --luxe-gold-soft: #e0c383;
  --luxe-gold-deep: #a17c2e;
  --luxe-ink: #1b1710;

  /* radius */
  --r-sm: 12px;
  --r-card: 28px;
  --r-full: 999px;

  /* type */
  --serif: "Fraunces", "Playfair Display", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;

  /* spacing */
  --g: 24px;
  --section: 104px;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.47; letter-spacing: -0.011em; color: var(--ink); background: var(--canvas); overflow-x: clip; }

img { max-width: 100%; display: block; }
a { color: inherit; }
h1,h2,h3,h4 { font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

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

/* ---------- foreground / background bands ---------- */
.on-forest { background: var(--forest); color: #fff; }
.on-sky    { background: var(--sky); color: var(--ink); }
.on-char   { background: var(--char); color: #fff; }
.on-cream  { background: var(--canvas-2); }

/* ---------- type scale ---------- */
.display { font-family: var(--serif); font-weight: 400; line-height: 0.92; letter-spacing: -0.022em; }
.display.xl { font-size: clamp(48px, 7vw, 80px); }
.display.lg { font-size: clamp(40px, 5.5vw, 64px); }
.display.md { font-size: clamp(32px, 4vw, 48px); }
.lede { font-size: 19px; max-width: 34em; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.on-forest .lede { color: #e8e4da; }
.muted { color: var(--muted); }

/* ---------- buttons (Fable pills, Apple blue for purchase) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 16px/1 var(--sans); letter-spacing: -0.011em;
  padding: 16px 28px; border-radius: var(--r-full);
  border: 0; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .12s ease, color .12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: var(--fog); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #0077ea; }
.btn-ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn-lg { padding: 19px 34px; font-size: 17px; }
.btn-sm { padding: 12px 20px; font-size: 14px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(247,244,238,.85);
  border-bottom: 1px solid transparent;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-logo { font-family: var(--serif); font-size: 21px; letter-spacing: -0.02em; text-decoration: none; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.nav-logo .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--forest); display: grid; place-items: center; color: #fff; font-size: 15px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { padding: 8px 16px; border-radius: var(--r-full); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { background: var(--fog); }
.nav-links a[aria-current="page"] { background: var(--ink); color: #fff; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-soon-btn { background: transparent; border: 1.5px solid rgba(100,100,100,.3); border-radius: 20px; padding: 5px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; font: 500 15px/1 'Inter', sans-serif; letter-spacing: -0.01em; transition: background .15s ease, border-color .15s ease; }
.nav-soon-btn:hover { background: rgba(0,0,0,.04); }
.soon-chip { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; padding: 3px 8px; border-radius: 10px; }
.luxe .nav-soon-btn { color: #d4b973; border-color: rgba(196,160,75,.28); }
.luxe .nav-soon-btn:hover { background: rgba(196,160,75,.08); border-color: rgba(196,160,75,.45); }
.luxe .soon-chip { background: rgba(196,160,75,.14); color: #C4A04B; border: 1px solid rgba(196,160,75,.3); }
.hamburger { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; padding: 8px; }

@media (max-width: 820px) {
  .hamburger { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--canvas); padding: 16px 20px 24px; border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; font-size: 17px; }
}

/* ---------- hero (landing) ---------- */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 52px 0 72px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } }

.hero-stack { display: grid; gap: 22px; justify-items: start; }
.hero-stack .display { max-width: 12em; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--muted); }
.hero-full .eyebrow { color: var(--forest); }

/* layered poster cluster (flankers tucked behind main) */
.hero-visual { display: grid; gap: 14px; justify-items: center; }
.posters { position: relative; width: min(420px, 78vw); aspect-ratio: 0.9; }
.poster {
  position: absolute; background: linear-gradient(180deg, #fbf8f2, #ebe5d6);
  border-radius: 10px; padding: 8px 8px 18px; box-shadow: 0 22px 52px rgba(0,0,0,.5), 0 6px 16px rgba(0,0,0,.3);
}
.poster canvas { width: 100%; display: block; border-radius: 2px; }
.poster.main { left: 50%; top: 50%; translate: -50% -50%; z-index: 3; width: min(285px, 57vw); padding: 10px 10px 22px; box-shadow: 0 38px 84px rgba(0,0,0,.6), 0 10px 22px rgba(0,0,0,.4); }
.poster.small { z-index: 1; width: min(185px, 41vw); opacity: .85; }
.poster.small.p-l { left: 0; top: 50%; translate: -18% -52%; transform: rotate(-5deg); }
.poster.small.p-r { right: 0; top: 50%; translate: 18% -52%; transform: rotate(5deg); }
.poster-tag {
  position: absolute; top: -12px; right: -12px; background: var(--luxe-gold); color: #241a0d;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; box-shadow: 0 10px 24px rgba(0,0,0,.4);
}
.poster-caption { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #b8b09c; }
.poster-caption strong { color: #f4eee0; font-weight: 600; }

/* featured templates (what's inside — text left, document preview right) */
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; max-width: 980px; }
.feat-card { display: flex; flex-direction: row; gap: 24px; align-items: center; background: var(--card); border-radius: var(--r-card); padding: 24px 24px 24px 28px; text-decoration: none; color: inherit; box-shadow: 0 1px 0 rgba(0,0,0,.04); transition: transform .15s ease, box-shadow .15s ease; }
.feat-card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(22,16,21,.12); }
.feat-body { display: grid; gap: 12px; flex: 1 1 auto; min-width: 0; }
.feat-body .cat { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--forest); }
.feat-body h3 { font-size: 24px; line-height: 1.1; }
.feat-body p { font-size: 15px; line-height: 1.55; color: var(--graphite); }
.feat-link { font-size: 14px; font-weight: 600; color: var(--forest); }
.feat-more { margin: 28px 0 0; }

/* ---------- marquee / logo-ish strip ---------- */
.strip { display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; align-items: center; padding: 0 0 64px; opacity: .9; }
.strip span { font-family: var(--serif); font-size: 19px; letter-spacing: -0.01em; }

/* ---------- feature split (landing) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 40px; } }
.split .eyebrow { margin-bottom: 18px; }
.split .display { margin-bottom: 22px; }
.split-block { display: grid; gap: 18px; }

/* ---------- stat band ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; text-align: center; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; gap: 28px; } }
.stat .num { font-family: var(--serif); font-size: clamp(44px, 5vw, 64px); line-height: 1; display: block; }
.stat .label { margin-top: 8px; font-size: 14px; opacity: .85; }

/* ---------- template cards (templates page / landing rows) ---------- */
.grid-templates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }

/* template pack — one tidy, symmetric grid (4-col desktop so 8 cards sit 4×2) */
.tp-related .grid-templates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-addons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 28px; max-width: 760px; }
@media (max-width: 1020px) { .grid-templates, .grid-addons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-templates, .grid-addons { grid-template-columns: 1fr; } }
.tcard { display: flex; flex-direction: column; border-radius: var(--r-card); background: var(--card); overflow: hidden; box-shadow: 0 1px 0 rgba(0,0,0,.04); transition: transform .15s ease, box-shadow .15s ease; text-decoration: none; color: inherit; }
.tcard:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(22,16,21,.12); }
.tcard .cover { position: relative; }
.pdf-cover { aspect-ratio: 8.5/11; background: linear-gradient(150deg, #efeade, #e2ddcf); display: grid; place-items: center; position: relative; overflow: hidden; }
.pdf-cover::before, .pdf-cover::after { content: ""; position: absolute; background: #dbcfa8; border-radius: 6px; }
.pdf-cover::before { width: 44%; height: 10px; top: 14%; left: 11%; opacity: .55; }
.pdf-cover::after { width: 28%; height: 10px; top: 20%; left: 11%; opacity: .35; }
.pdf-cover.small { aspect-ratio: 8.5/11; }
.tcard .cover canvas, .rcard .pdf-cover canvas { width: 100%; display: block; }
.pdf-cover:has(canvas)::before, .pdf-cover:has(canvas)::after { display: none; }
.tp-related .rcard .pdf-cover canvas { box-shadow: 0 6px 18px rgba(22,16,21,.18); border-radius: 2px; }
.cover-fallback { aspect-ratio: 8.5/11; display: grid; place-content: center; gap: 10px; text-align: center; background: linear-gradient(150deg, #efeade, #e2ddcf); padding: 20px; }
.cover-fallback .cf-title { font-family: var(--serif); font-size: 15px; color: var(--ink); }
.cover-fallback .cf-link { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); text-decoration: underline; }
.badge-pop { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--blue); border-radius: 999px; padding: 4px 10px; }
.tcard .body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.grid-templates .tcard .body { display: flex; flex-direction: column; flex: 1; }
.grid-templates .tcard .body .row { margin-top: auto; }
.tcard .meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tcard .name { font-family: var(--serif); font-size: 16px; line-height: 1.18; }
.tcard .desc { font-size: 12px; line-height: 1.4; color: var(--graphite); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tcard .cat { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #5b5b5b; }
.tcard .muted { color: #575757; }
.tcard .row { display: flex; gap: 10px; }
.tcard .row .btn { flex: 1; justify-content: center; }
.tcard .price { font-weight: 600; font-size: 15px; }
.tcard .row .btn-blue { margin-top: 4px; }

/* ---------- page head (templates) ---------- */
.page-head { padding: 72px 0 8px; }
.page-head .display { max-width: 12em; }
.tint { color: var(--luxe-gold-soft); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0 8px; }
.fchip { border: 1px solid var(--line); background: var(--card); border-radius: var(--r-full); padding: 10px 18px; font: 500 14px/1 var(--sans); cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.fchip:hover { border-color: var(--muted); }
.fchip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr)); gap: 28px; align-items: stretch; justify-content: center; max-width: 900px; margin: 48px auto 0; }
@media (max-width: 960px) { .pricing-grid { grid-template-columns: 1fr; max-width: 430px; margin-inline: auto; } }
.ptier { border-radius: var(--r-card); background: var(--card); padding: 36px 32px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.ptier.single {
  background:
    radial-gradient(560px 320px at 100% -20%, rgba(224,150,58,.32), transparent 62%),
    linear-gradient(180deg, #0b503b, #073528);
  color: #fff;
}
.ptier.single .muted { color: #cfe3da; }
.ptier.single ul { color: inherit; }
.ptier.single li::before { color: #9fe0c4; }
.ptier.featured {
  background:
    radial-gradient(520px 320px at 100% 0%, rgba(201,162,75,.18), transparent 60%),
    linear-gradient(165deg, #1b2a21, #10201a);
  color: #f6f0e2;
  border: 1px solid rgba(201,162,75,.35);
}
.ptier.featured .muted { color: #c9c0ab; }
.ptier.featured .tname { color: var(--luxe-gold-soft); }
.ptier.featured .btn-dark { background: var(--luxe-gold); color: #241a0d; }
.ptier.featured .btn-dark:hover { background: #d8b85e; }
.ptier.featured li::before { color: #ddd1a3; }
.ptier .tname { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ptier .amount { font-family: var(--serif); font-size: clamp(40px, 4vw, 54px); line-height: 1; margin-top: 4px; }
.ptier .amount small { font-size: 16px; letter-spacing: 0; }
.ptier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 15px; flex: 1; }
.ptier li { display: flex; gap: 10px; align-items: flex-start; }
.ptier li::before { content: "✓"; font-weight: 700; color: var(--luxe-gold-deep); }
.ptier .btn { margin-top: 8px; }
.ptier.featured .btn-blue { background: #fff; color: var(--forest); }
.pop { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; }

/* ---------- faq ---------- */
.faq { max-width: 760px; margin: 56px auto 0; display: grid; gap: 14px; }
.faq details { background: var(--card); border-radius: var(--r-sm); border: 1px solid var(--line); }
.faq summary { padding: 20px 24px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 24px 22px; color: var(--graphite); }

/* ---------- settings ---------- */
.auth-card { max-width: 460px; margin: 40px auto; background: var(--card); border-radius: var(--r-card); padding: 36px 34px; display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.field input { border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; font: 400 16px/1.4 var(--sans); background: #fff; }
.field input:focus { outline: 2px solid var(--luxe-gold-deep); outline-offset: -1px; border-color: transparent; }
.auth-tabs { display: flex; gap: 8px; background: var(--fog); border-radius: var(--r-full); padding: 4px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: var(--r-full); font: 600 14px var(--sans); cursor: pointer; }
.auth-tabs button.active { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.alert { border-radius: 12px; padding: 14px 18px; font-size: 15px; display: none; }
.alert.show { display: block; }
.alert.err { background: #fdecec; color: #9a1515; }
.alert.ok { background: #e7f4ec; color: #0b5d36; }
.alert.info { background: var(--sky); color: var(--ink); }

.demo-note { font-size: 13px; color: var(--muted); }

/* ---------- settings: rich forest-tinted blocks (contrast on dark, keep inputs usable) ---------- */
body.luxe .block-signin,
body.luxe .block-profile {
  background:
    radial-gradient(560px 300px at 100% 0%, rgba(11,78,60,.28), transparent 62%),
    radial-gradient(420px 260px at 0% 100%, rgba(201,162,75,.1), transparent 55%),
    linear-gradient(165deg, #13231b, #0c1611);
  color: #f6f0e2;
  border: 1px solid rgba(201,162,75,.28);
  box-shadow: 0 18px 44px -22px rgba(10,18,14,.8);
}
body.luxe .block-prefs {
  background:
    radial-gradient(600px 280px at 100% 0%, rgba(11,78,60,.24), transparent 60%),
    radial-gradient(420px 240px at 0% 100%, rgba(201,162,75,.08), transparent 55%),
    linear-gradient(165deg, #101f18, #0b1410);
  color: #f6f0e2;
  border: 1px solid rgba(201,162,75,.24);
}
body.luxe .block-billing {
  background:
    radial-gradient(560px 260px at -10% 0%, rgba(11,78,60,.3), transparent 60%),
    radial-gradient(420px 240px at 110% 100%, rgba(201,162,75,.1), transparent 55%),
    linear-gradient(165deg, #122117, #0d1610);
  color: #f6f0e2;
  border: 1px solid rgba(201,162,75,.28);
}
body.luxe .block-signin h3,
body.luxe .block-profile h3,
body.luxe .block-prefs h3,
body.luxe .block-billing h3 { color: #f6f0e2; }
body.luxe .block-signin .card-desc,
body.luxe .block-profile .card-desc,
body.luxe .block-prefs .card-desc,
body.luxe .block-billing .card-desc { color: #cfc6b1; }
body.luxe .block-signin label,
body.luxe .block-profile label { color: #efe8d8; }
body.luxe .block-signin .field input,
body.luxe .block-profile .field input { border-color: rgba(246,241,228,.25); background: #fbf7ee; color: var(--ink); }
body.luxe .block-signin .field input:focus,
body.luxe .block-profile .field input:focus { outline-color: var(--luxe-gold); border-color: transparent; }
body.luxe .block-signin .demo-note { color: #c9c0ab; }
body.luxe .block-signin .auth-tabs { background: rgba(246,241,228,.1); }
body.luxe .block-signin .auth-tabs button { color: #d9d0bc; }
body.luxe .block-signin .auth-tabs button.active { background: var(--luxe-gold); color: #241a0d; box-shadow: none; }
body.luxe .block-profile .btn-dark,
body.luxe .block-signin .btn-dark { background: var(--luxe-gold); color: #241a0d; }
body.luxe .block-profile .btn-dark:hover,
body.luxe .block-signin .btn-dark:hover { background: #d8b85e; }
body.luxe .block-profile .btn-ghost,
body.luxe .block-signin .btn-ghost { color: #f4eee0; border-color: rgba(244,238,224,.45); }
body.luxe .block-prefs .pref { border-bottom-color: rgba(246,241,228,.14); }
body.luxe .block-prefs .pref-text span { color: #c9c0ab; }
body.luxe .block-prefs .switch .track { background: rgba(246,241,228,.28); }
body.luxe .block-billing table.settings th { color: #d9d0bc; }
body.luxe .block-billing table.settings th,
body.luxe .block-billing table.settings td { border-bottom-color: rgba(246,241,228,.14); color: #efe8d8; }
body.luxe .block-billing table.settings .empty-state { color: #c9c0ab; }
body.luxe .block-billing .hint { color: #c9c0ab; }

table.settings { width: 100%; border-collapse: collapse; }
table.settings th, table.settings td { text-align: left; padding: 14px 6px; border-bottom: 1px solid var(--line); font-size: 15px; }
table.settings th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- footer ---------- */
/* keep the footer continuous with the charcoal on-sky upper band — no near-black slab under the FAQ */
body.luxe footer.on-char { background: #18241c; }
body.luxe footer.on-char .footer-bottom { border-top-color: rgba(246,241,228,.12); }
body.luxe footer.on-char .footer-bottom { color: #b9b09b; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 64px 0 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand p { color: #b9b3a9; margin-top: 14px; max-width: 26em; font-size: 15px; }
.on-char a.footer-link { color: #d9d4c9; text-decoration: none; font-size: 15px; display: block; padding: 4px 0; }
.on-char a.footer-link:hover { color: #fff; }
.footer-grid h4 { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; color: #fff; }
.footer-bottom { border-top: 1px solid #1d1d1d; padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: #8f8a80; }

/* ---------- pdf.js modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(7,6,7,.8); backdrop-filter: blur(6px); display: none; align-items: stretch; justify-content: stretch; z-index: 100; padding: 24px; }
.modal-backdrop.open { display: flex; }

/* ---------- template page: breadcrumb, head, reader ---------- */
.crumb { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 30px; }
.crumb a { color: var(--luxe-gold-deep); text-decoration: none; font-weight: 500; }
.tp-head { display: grid; gap: 14px; padding-top: 10px; max-width: 760px; }
.tp-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
/* template page preview */
.luxe .reader {
  background: linear-gradient(180deg, #18241d, #0c150f);
}
.reader { background: var(--char); border-radius: var(--r-card); overflow: hidden; margin: 26px 0 8px; box-shadow: 0 24px 70px rgba(22,16,21,.22); }
.reader-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid rgba(245,239,225,.1); color: #fff; }
.reader-title { font-family: var(--serif); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e9e5dd; }
.reader-controls { display: flex; gap: 6px; align-items: center; }
.reader-controls button { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 17px; line-height: 1; }
.reader-controls button:disabled { opacity: .35; cursor: default; }
.reader-controls .pg { font-size: 13px; color: #cfccc4; min-width: 64px; text-align: center; }
/* stage: soft sage mist so the white pages read clearly */
.reader-stage {
  overflow: auto; overscroll-behavior: contain;
  display: grid; place-items: start center;
  padding: 28px;
  background:
    radial-gradient(680px 340px at 88% -12%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(160deg, #e6ece2, #c4cfc0);
  height: min(78vh, 860px);
}
.reader-stage canvas { background: #fff; border-radius: 4px; box-shadow: 0 18px 48px rgba(22,16,21,.30); }
.reader-stage .placeholder, .reader-fallback .placeholder { color: #5f6a58; }
.reader-fallback { align-self: center; display: grid; gap: 16px; justify-items: center; text-align: center; }
.reader-fallback .btn { min-width: 190px; justify-content: center; }
/* body of the template page: dark luxe surface that continues the hero band */
.luxe #tp {
  background:
    radial-gradient(1100px 560px at 92% -10%, rgba(224,150,58,.16), transparent 55%),
    radial-gradient(1100px 700px at -8% 130%, rgba(11,78,60,.85), transparent 60%),
    linear-gradient(180deg, #151308, #0c0e0b);
  color: #f4eee0;
  padding: 0 0 84px;
}
/* luxe gold strips — divider above the template preview */
.tp-strip { display: grid; gap: 8px; width: 100%; padding: 34px 0 6px; }
.tp-strip span { height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #c9a24b 14%, #e0c383 40%, #c9a24b 60%, #a17c2e 86%, transparent); }
.tp-strip span + span { height: 1px; width: 58%; margin-inline: auto; opacity: .5; background: linear-gradient(90deg, transparent, #c9a24b, transparent); }
.tp-about, .tp-related { margin: 56px 0 0; }
.tp-about { display: grid; grid-template-columns: minmax(170px, 250px) 1fr; gap: 40px; align-items: start; }
.tp-cover { aspect-ratio: 8.5 / 11; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid #d9c48a; box-shadow: 0 18px 44px rgba(22,16,21,.16); }
.tp-cover canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-about-body { display: grid; gap: 12px; max-width: 620px; }
.tp-about-body h2, .tp-related h2 { color: #f5efe1; }
.tp-about-body #tp-about { font-size: 16.5px; line-height: 1.65; max-width: 58ch; color: #cfc6b1; }
.tp-uses { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.tp-uses li { padding-left: 26px; position: relative; font-size: 15px; line-height: 1.55; color: #cfc6b1; }
.tp-uses li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--luxe-gold-deep); font-weight: 700; }
.tp-related h2 { margin-bottom: 4px; }
.tp-related .grid-templates { margin-top: 22px; }
/* related cards: clean white tiles with an illustrated cover (no PDF loads) */
.tp-related .rcard {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 14px 14px 16px; box-shadow: 0 1px 0 rgba(0,0,0,.04);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tp-related .rcard:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(22,16,21,.12); }
.tp-related .rcard .pdf-cover { border-radius: 12px; }
.tp-related .rcard-name { font-family: var(--serif); font-size: 16px; line-height: 1.2; color: var(--ink); }
.tp-related .rcard-cat { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #5c5c5c; }
.pdf-cover.cover-static { display: grid; place-content: center; gap: 8px; text-align: center; padding: 18px; }
.pdf-cover.cover-static .cf-title { font-family: var(--serif); font-size: 15px; line-height: 1.25; color: var(--ink); }
.pdf-cover.cover-static .cf-link { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #6b6b63; }
.pdf-cover .cf-static { display: grid; place-content: center; gap: 8px; text-align: center; padding: 18px; min-height: 100%; }
.pdf-cover .cf-static .cf-title { font-family: var(--serif); font-size: 15px; line-height: 1.25; color: var(--ink); }
.pdf-cover .cf-static .cf-link { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #6b6b63; }
.pdf-cover small .cf-static { display: grid; }
.cover-fallback.cf-static { text-align: center; }
.cover-fallback.cf-static .cf-link { text-decoration: none; color: #6b6b63; }
[hidden] { display: none !important; }
.rcard { display: grid; gap: 8px; text-decoration: none; color: inherit; border-radius: var(--r-sm); }
.rcard-name { font-family: var(--serif); font-size: 16px; line-height: 1.2; }
.rcard-cat { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- toast / bugs ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 14px 22px; border-radius: var(--r-full); font-size: 15px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* demo payment modal */
.pay-strip { display: grid; gap: 18px; }
.pay-opt { border: 2px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
.pay-opt:hover { border-color: var(--luxe-gold); }
.pay-opt small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }

::selection { background: var(--sky); color: #08131a; }

/* ============================================================
   Landing page — Dark Luxe (body.luxe only; other pages untouched)
   ============================================================ */
body.luxe { background: var(--luxe-ink); overflow-x: hidden; overflow-x: clip; }

/* nav over dark hero */
.luxe .nav { background: rgba(20,17,12,.9); border-bottom: 1px solid rgba(244,238,224,.08); }
.luxe .nav-logo, .luxe .nav-links a { color: #ece5d8; }
.luxe .nav-links a:hover { background: rgba(255,255,255,.08); }
.luxe .nav-links a[aria-current="page"] { background: rgba(244,238,224,.14); color: #fff; }
.luxe .nav-logo .mark { background: var(--luxe-gold); color: #241a0d; }
.luxe .nav-cta .btn-dark { background: var(--luxe-gold); color: #241a0d; }
.luxe .nav-cta .btn-dark:hover { background: #d8b85e; }
.luxe .hamburger { color: #ece5d8; }
.luxe .nav-links.open { background: var(--luxe-ink); border-bottom-color: rgba(244,238,224,.12); }
.luxe .nav-links a:focus-visible, .luxe .hamburger:focus-visible, .luxe .nav-logo:focus-visible { outline: 3px solid var(--luxe-gold); outline-offset: 2px; }

/* hero — deep green-charcoal, forest glow, clean top under the navbar */
.luxe .on-forest {
  background:
    radial-gradient(1050px 700px at -10% 115%, rgba(11,78,60,.9), transparent 60%),
    linear-gradient(180deg, #12100a, #0b0d09);
  color: #f4eee0;
}
.luxe .on-forest .eyebrow { color: var(--luxe-gold); }
.luxe .on-forest .lede { color: #cfc6b1; }
.luxe .hero-ctas .btn-white { background: var(--luxe-gold); color: #241a0d; }
.luxe .hero-ctas .btn-white:hover { background: #d8b85e; }
.luxe .hero-ctas .btn-ghost { color: #f4eee0; border-color: rgba(244,238,224,.4); }
.luxe .hero-ctas .btn-ghost:hover { border-color: var(--luxe-gold); color: var(--luxe-gold); }

/* how-it-works + stats — matched flat charcoal boxes, no gradients/glows/shadows */
.luxe .on-sky {
  background: #18241c;
  color: #efe8d8;
}
.luxe .on-sky .eyebrow { color: var(--luxe-gold); }
.luxe .on-sky .display, .luxe .on-sky .name { color: #f6f1e4; }
.luxe .on-sky .lede { color: #cfc6b1; }
.luxe .on-sky .tcard { background: rgba(246,241,228,.05); border: 1px solid rgba(246,241,228,.12); }
.luxe .on-sky .tcard .muted { color: #b9b09b; }

/* accents on light bands */
.luxe .on-cream .eyebrow { color: var(--forest); }
.luxe .stats .num { color: #f6f1e4; }
.luxe .stats .label { color: #cfc6b1; }

/* gold = the purchase/primary action sitewide */
.luxe .btn-blue { background: var(--luxe-gold); color: #241a0d; }
.luxe .btn-blue:hover { background: #d8b85e; }
.luxe .pop, .luxe .badge-pop { background: var(--luxe-gold); color: #241a0d; }

/* dark gradient header band — templates, pricing, settings, template pages */
.luxe .page-head,
.luxe .band-dark {
  background:
    radial-gradient(1000px 480px at 90% -20%, rgba(224,150,58,.24), transparent 55%),
    radial-gradient(1000px 620px at -10% 125%, rgba(11,78,60,.9), transparent 60%),
    linear-gradient(180deg, #131108, #0d0f0c);
  color: #f4eee0;
}
.luxe .page-head { padding: 64px 0 44px; }
.luxe .band-dark { padding: 64px 0 48px; }
.luxe .page-head .display, .luxe .band-dark .display { color: #f5efe1; }
.luxe .page-head .lede, .luxe .band-dark .lede { color: #cfc6b1; }
.luxe .page-head .eyebrow, .luxe .band-dark .eyebrow { color: var(--luxe-gold); }
.luxe .band-dark .btn-ghost { color: #f4eee0; border-color: rgba(244,238,224,.45); }
.luxe .band-dark .btn-ghost:hover { border-color: var(--luxe-gold); color: var(--luxe-gold); }

/* filters on dark template header */
.luxe .page-head .filters { margin-bottom: 4px; }
.luxe .page-head .fchip { background: rgba(245,239,225,.08); border-color: rgba(245,239,225,.25); color: #efe7d6; }
.luxe .page-head .fchip:hover { border-color: rgba(245,239,225,.65); }
.luxe .page-head .fchip.active { background: var(--luxe-gold); border-color: var(--luxe-gold); color: #241a0d; }

/* template page band (breadcrumb + head inside band-dark) */
.luxe .band-dark .crumb { color: #b8b09c; margin-top: 0; }
.luxe .band-dark .crumb a { color: var(--luxe-gold); }
.luxe .band-dark .tp-head .display { color: #f5efe1; }
.luxe .band-dark .tp-head .lede { color: #cfc6b1; }
.luxe .band-dark .tp-head .btn-blue { margin-top: 4px; }

/* landing hero — whole band dark: black base, green glow bottom-left, gold glow top-right */
.hero-full .hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 44px; padding: 34px 0 30px; }
.hero-full .hero-stack { gap: 16px; }
.hero-full .hero-stack .eyebrow { font-size: 12px; }
.hero-full .hero-stack .display { font-size: clamp(38px, 5vw, 58px); }
.hero-full .hero-stack .lede { font-size: 17px; }
.hero-full .hero-note { font-size: 13px; }
.hero-full .posters { width: min(400px, 62vw); aspect-ratio: 1; }
.hero-full .poster.main { width: min(260px, 46vw); }
.hero-full .poster.small { width: min(175px, 32vw); }
@media (max-width: 900px) {
  .hero-full .hero-grid { grid-template-columns: 1fr; gap: 26px; padding: 26px 0 18px; }
}

/* hero band colours (luxe page): black base + green bottom-left + gold top-right */
body.luxe .hero-full {
  background:
    radial-gradient(640px 500px at 92% 0%, rgba(224,150,58,.30), transparent 62%),
    radial-gradient(780px 640px at -4% 120%, rgba(11,78,60,.95), transparent 62%),
    linear-gradient(180deg, #100f0b, #0a0b08);
}
body.luxe .hero-full .eyebrow { color: var(--luxe-gold); }
body.luxe .hero-full .display { color: #f6f0e2; }
body.luxe .hero-full .lede { color: #cfc6b1; }
body.luxe .hero-note { color: #b8b09c; }
body.luxe .hero-full .btn-dark { background: var(--luxe-gold); color: #241a0d; }
body.luxe .hero-full .btn-dark:hover { background: #d8b85e; }
body.luxe .hero-full .btn-ghost { color: #f4eee0; border-color: rgba(244,238,224,.45); }
body.luxe .hero-full .btn-ghost:hover { border-color: var(--luxe-gold); color: var(--luxe-gold); }
body.luxe .hero-full .marquee-track span { color: #fff; opacity: .92; }
body.luxe .hero-full .marquee-track .dot { color: var(--luxe-gold); opacity: 1; }

/* side-to-side marquee -- seam-proof: gap lives only on the group, track has no gap so -50% lands exactly on the group boundary */
.marquee { overflow: hidden; padding: 14px 0 20px; }
.marquee-track { display: flex; align-items: center; gap: 0; width: max-content; will-change: transform; animation: marq 30s linear infinite; }
.marquee-group { display: flex; align-items: center; gap: clamp(90px, 8vw, 300px); padding-right: clamp(90px, 8vw, 300px); }
@keyframes marq { to { transform: translate3d(-50%, 0, 0); } }
.marquee-track span { font-family: var(--serif); font-size: 19px; letter-spacing: -0.01em; color: var(--ink); opacity: .8; white-space: nowrap; }
.marquee-track .dot { color: var(--luxe-gold-deep); opacity: 1; font-size: 24px; line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .hero-full .posters { animation: none; }
  html { scroll-behavior: auto; }
}

/* slow rise-in for the hero cluster */
@keyframes heroRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero-visual { animation: heroRise 1.7s cubic-bezier(.2,.7,.2,1) both; }

/* slow premium ambient float for the poster cluster (runs after the entrance rise) */
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-full .posters { animation: heroFloat 10s ease-in-out infinite; }

/* hover shadows on all boxes */
.ptier, .faq details, .auth-card { transition: transform .18s ease, box-shadow .18s ease; }
.ptier:hover, .faq details:hover, .auth-card:hover { box-shadow: 0 24px 50px rgba(22,16,21,.16); transform: translateY(-4px); }

/* pricing — featured tier gradient (dark gold palette on the $59 card after the single/featured swap) */

@media (max-width: 760px) {
  .reader-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .reader-controls { justify-content: space-between; }
  .reader-stage { padding: 10px; height: min(60vh, 560px); }
  .tp-ctas .btn { flex: 1; justify-content: center; }
  .tp-about, .tp-related { margin-top: 40px; }
  .tp-about { grid-template-columns: 1fr; }
  .tp-cover { max-width: 230px; }
  .feat { grid-template-columns: 1fr; }
  .feat-card { flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px; }
  .luxe .feat-card .feat-cover { flex: 0 0 auto; width: min(230px, 100%); max-height: 300px; }
  .feat-body { width: 100%; }
}

/* content boxes — the same kind gets the same colour */
.feat-card { border: 1px solid #cfe3d6; background: linear-gradient(180deg, #f3faf5, #e5f0e9); }
.feat-card .cat { color: #0a4e38; }
.feat-card:nth-child(2) { border-color: #e4cf9b; background: linear-gradient(180deg, #fbf6e6, #f3e9cf); }
.feat-card:nth-child(2) .cat { color: #8a6a1e; }

.faq details { border-left: 4px solid #c9a24b; background: #faf6ea; }

/* settings page upgrade */
.lib-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; margin-top: 26px; }
.lib-card { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; transition: transform .18s ease, box-shadow .18s ease; }
.lib-card:hover { box-shadow: 0 24px 50px rgba(22,16,21,.12); transform: translateY(-3px); }
.lib-card.own { border-color: #d9c48a; }
.lib-cover { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.lib-cover canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-info h3 { font-family: var(--serif); font-size: 19px; line-height: 1.2; }
.lib-status { font-size: 12px; font-weight: 600; letter-spacing: .04em; border-radius: 999px; padding: 4px 10px; display: inline-block; margin-top: 8px; text-transform: none; }
.lib-status.own { background: #e5f1e9; color: #0a4e38; }
.lib-status.no { background: #f4e9d4; color: #8a6a1e; }
.split[style*="align-items:stretch"] { align-items: stretch; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

@media (max-width: 760px) {
  .lib-card { grid-template-columns: 72px 1fr; }
  .lib-act { grid-column: 1 / -1; }
  .lib-act .btn { width: 100%; justify-content: center; }
  .lib-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- settings page — clean card layout ---------- */
.set-section { padding: 0 0 var(--section); }
.set-head { display: grid; gap: 6px; max-width: 560px; margin-bottom: 22px; }
.set-head .display { margin-top: 8px; }
.set-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 22px; }
.set-col-wide { grid-column: 1 / -1; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px 28px; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.card h3 { font-size: 22px; margin-bottom: 6px; }
.card .card-desc { font-size: 14.5px; color: var(--muted); line-height: 1.5; max-width: 46em; }
.card .field { margin-top: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; letter-spacing: .02em; margin-bottom: 7px; }
.field input, .field select {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font: inherit; font-size: 15.5px; color: var(--ink); background: #fff;
  transition: border-color .12s ease, box-shadow .12s ease;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder { color: var(--muted); }
.field select { background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23737373' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field input:focus, .field select:focus { outline: 2px solid var(--luxe-gold-deep); outline-offset: -1px; border-color: transparent; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.set-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.set-actions .btn { min-height: 44px; justify-content: center; }
.card-actions { margin-top: 18px; }

/* toggles */
.pref { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.pref:last-child { border-bottom: 0; padding-bottom: 2px; }
.pref-text { display: grid; gap: 3px; }
.pref-text strong { font-size: 15.5px; font-weight: 600; }
.pref-text span { font-size: 13.5px; color: var(--muted); }
.switch { position: relative; display: inline-block; width: 50px; height: 30px; flex: 0 0 auto; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .track { position: absolute; inset: 0; background: var(--fog-2); border-radius: 999px; transition: background .15s ease; }
.switch .track::before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.28); transition: transform .15s ease; }
.switch input:checked + .track { background: var(--forest); }
.switch input:checked + .track::before { transform: translateX(20px); }
.switch:focus-within .track, .switch input:focus-visible + .track { outline: 3px solid var(--luxe-gold-deep); outline-offset: 2px; }

/* auth panel inside card */
.auth-tabs { display: flex; gap: 6px; background: var(--fog); padding: 4px; border-radius: var(--r-sm); }
.auth-tabs button { flex: 1; padding: 10px 12px; border: 0; background: transparent; border-radius: 9px; font: 500 14.5px/1 var(--sans); color: var(--graphite); cursor: pointer; }
.auth-tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.demo-note { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 4px; }
#auth-shell { display: grid; gap: 14px; margin-top: 18px; }
#auth-done { display: none; gap: 12px; margin-top: 18px; }
#btns-cf .btn { min-height: 44px; }

/* mobile: nav cta + settings stacks */
@media (max-width: 420px) {
  .nav-cta { display: none; }
  .set-actions { flex-direction: column; }
  .set-actions .btn { width: 100%; }
  .card { padding: 22px 18px; }
  .set-cols { gap: 16px; }
}

/* ---------- mobile refinements ---------- */
@media (max-width: 820px) {
  .hamburger { min-width: 44px; min-height: 44px; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .posters { width: min(300px, 86vw); }
}

@media (max-width: 380px) {
  .nav-logo { font-size: 19px; }
  .nav-logo .mark { width: 26px; height: 26px; }
}

@media (max-width: 640px) {
  table.settings th, table.settings td { padding: 12px 4px; font-size: 14px; }
}
/* KITVIVID2 vivid lively colour kit for library + settings boxes */
:root{
--box-violet:linear-gradient(150deg,#ede9fe 0%,#ddd6fe 45%,#c4b5fd 100%);
--box-teal:linear-gradient(150deg,#ccfbf1 0%,#99f6e4 45%,#5eead4 100%);
--box-peach:linear-gradient(150deg,#ffedd5 0%,#fed7aa 45%,#fdba74 100%);
--box-rose:linear-gradient(150deg,#ffe4e6 0%,#fecdd3 45%,#fda4af 100%);
--box-sky:linear-gradient(150deg,#e0f2fe 0%,#bae6fd 45%,#7dd3fc 100%);
--box-ink:linear-gradient(150deg,#eef2ff 0%,#c7d2fe 100%);
--box-bd:rgba(30,41,59,.10);
--box-sh:0 12px 32px -18px rgba(30,41,59,.40);
--box-rr:18px;
}
#library-grid > *, #library-grid .box, .lib-item, .pkg-item, .feat-box {
border-radius:var(--box-rr); border:1px solid var(--box-bd);
box-shadow:var(--box-sh); transition:transform .25s ease, box-shadow .25s ease;
}
#library-grid > *:nth-child(6n+1), .lib-item:nth-child(6n+1){background:var(--box-violet)}
#library-grid > *:nth-child(6n+2), .lib-item:nth-child(6n+2){background:var(--box-teal)}
#library-grid > *:nth-child(6n+3), .lib-item:nth-child(6n+3){background:var(--box-peach)}
#library-grid > *:nth-child(6n+4), .lib-item:nth-child(6n+4){background:var(--box-rose)}
#library-grid > *:nth-child(6n+5), .lib-item:nth-child(6n+5){background:var(--box-sky)}
#library-grid > *:nth-child(6n),   .lib-item:nth-child(6n){background:var(--box-ink)}
#library-grid > *:hover, .lib-item:hover{transform:translateY(-5px);box-shadow:0 20px 38px -20px rgba(30,41,59,.5)}
#library-grid h2, .lib-item h2, #library-grid h3, .lib-item h3{color:#1f2937}
#library-grid p, .lib-item p, #library-grid span, .lib-item span{color:#374151}

/* ============================================================
   Forest system — templates gallery, library, pricing
   ============================================================ */

/* templates gallery — dark forest band */
.luxe .dark-forest {
  background:
    radial-gradient(900px 560px at 112% -12%, rgba(11,78,60,.55), transparent 62%),
    linear-gradient(180deg, #101a14, #0a120e);
  color: #efe8d8;
}
.luxe .dark-forest .display { color: #f6f1e4; }
.luxe .dark-forest .lede { color: #cfc6b1; }
/* cards inside the dark band keep their white card surface — restore ink text */
.luxe .dark-forest .tcard { color: var(--ink); }
.luxe .dark-forest .tcard .name { color: var(--ink); }

/* add-ons band on the templates pack */
.addons-band { margin-top: 16px; }
.pack-rule { border: 0; border-top: 1px solid rgba(245,239,225,.14); margin: 0; }
.addons-head { margin-top: 44px; }

/* landing "what's inside" — real document covers */
.luxe .feat-card .feat-cover {
  flex: 0 0 clamp(150px, 38%, 240px);
  aspect-ratio: 8.5 / 10;
  max-height: 250px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(150deg, #efeade, #e2ddcf);
  border: 1px solid rgba(22,16,21,.06);
  display: block;
}
.luxe .feat-card .feat-cover canvas { width: 100%; height: 100%; object-fit: cover; display: block; }

/* settings — Your Library: dark forest band, light clean cards */
.luxe .lib-band {
  background:
    radial-gradient(900px 560px at -12% 118%, rgba(11,78,60,.6), transparent 62%),
    linear-gradient(180deg, #101a14, #0a120e);
  color: #efe8d8;
}
.luxe .lib-band .set-head .display { color: #f6f1e4; }
.luxe .lib-band .set-head .muted { color: #cfc6b1; }
.luxe .lib-band #library-grid > * {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px -18px rgba(30,41,59,.4);
}
.luxe .lib-band .lib-card.own { border-color: #d9c48a; }
.luxe .lib-band .lib-status.own { background: #e5f1e9; color: #0a4e38; }
.luxe .lib-band .lib-status.no { background: #f4e9d4; color: #8a6a1e; }

/* pricing — dark luxe band matching the header above */
.luxe .on-dark {
  background:
    radial-gradient(1100px 560px at 92% -10%, rgba(224,150,58,.16), transparent 55%),
    radial-gradient(1100px 700px at -8% 130%, rgba(11,78,60,.85), transparent 60%),
    linear-gradient(180deg, #151308, #0c0e0b);
  color: #f4eee0;
}
.luxe .on-dark .eyebrow { color: var(--luxe-gold); }
.luxe .on-dark .display { color: #f5efe1; }
.luxe .on-dark .lede { color: #cfc6b1; }
.luxe .on-dark .muted { color: #b9b09b; }
.luxe .on-dark .ptier { border: 1px solid rgba(201,162,75,.18); }

/* pricing — keep `.lede` light only inside the dark panes */
.luxe .on-dark .ptier .lede { color: inherit; }
.luxe .on-dark .ptier.single .lede { color: #dde8e1; }
.luxe .on-dark .ptier.featured .lede { color: #d8cfbb; }

/* FAQ — panes match the Full Client Yes Kit cards above: dark forest + gold +
   light text so every row reads clearly */
.luxe .on-dark .faq details {
  background: linear-gradient(180deg, #0b503b, #073528);
  border-left: 4px solid #c9a24b;
  color: #f4eee0;
}
.luxe .on-dark .faq summary { color: #f4eee0; }
.luxe .on-dark .faq summary::after { color: #c9a24b; }
.luxe .on-dark .faq .a { color: #d7e2da; }
.luxe .on-dark .faq .a a, .luxe .on-dark .faq .a strong { color: #c9a24b; }

/* add-ons band — heading and cards share one clean centered column */
.addons-band .addons-head { max-width: 760px; margin-left: auto; margin-right: auto; }
.addons-band #addons-grid { margin-left: auto; margin-right: auto; }

/* settings — account/section description needs stronger contrast on cream */
body.luxe .section.on-cream .set-head .muted { color: #4f4e4b; }
#settings-account { scroll-margin-top: 110px; }
