/* ===== Design tokens ===== */
:root {
  --bg: #fbf7f1;
  --surface: #ffffff;
  --surface-2: #f4ede3;
  --ink: #1d1815;
  --muted: #6b6159;
  --line: #eadfd2;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #fde8dc;
  --radius: 1.25rem;
  --shadow: 0 1px 2px rgba(29, 24, 21, .05), 0 18px 40px -22px rgba(29, 24, 21, .28);
  --font-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-body-font-family: var(--font-body);
  --bs-body-font-size: 1rem;
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
  --bs-link-color: var(--accent);
  --bs-link-hover-color: var(--accent);
  --bs-border-radius: .85rem;
  --bs-emphasis-color: var(--ink);
}
[data-bs-theme="dark"] {
  --bg: #14110f;
  --surface: #1e1a17;
  --surface-2: #26211d;
  --ink: #f6efe7;
  --muted: #a89d92;
  --line: #342d28;
  --accent: #fb923c;
  --accent-ink: #1c0d05;
  --accent-soft: #3a2012;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -22px rgba(0, 0, 0, .7);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-secondary-bg: var(--surface-2);
  --bs-tertiary-bg: var(--surface-2);
}

/* Creator accents (class on <body> or on a swatch) */
.accent-amber  { --accent: #b45309; --accent-soft: #fdefd9; }
.accent-coral  { --accent: #d63a3f; --accent-soft: #fde4e4; }
.accent-rose   { --accent: #be2e8a; --accent-soft: #fbe3f2; }
.accent-indigo { --accent: #4f46e5; --accent-soft: #e6e5fd; }
.accent-teal   { --accent: #0b7a6f; --accent-soft: #d9f3ef; }
.accent-forest { --accent: #2a7048; --accent-soft: #dff1e6; }
[data-bs-theme="dark"] .accent-amber  { --accent: #fbbf6a; --accent-soft: #3a2a14; --accent-ink: #1c1205; }
[data-bs-theme="dark"] .accent-coral  { --accent: #ff8a8d; --accent-soft: #3b1c1d; --accent-ink: #2a0b0c; }
[data-bs-theme="dark"] .accent-rose   { --accent: #f58ccb; --accent-soft: #3a1c2f; --accent-ink: #2b0d20; }
[data-bs-theme="dark"] .accent-indigo { --accent: #a5a1ff; --accent-soft: #232246; --accent-ink: #111033; }
[data-bs-theme="dark"] .accent-teal   { --accent: #4fd1c1; --accent-soft: #11332f; --accent-ink: #04201c; }
[data-bs-theme="dark"] .accent-forest { --accent: #7fd39c; --accent-soft: #16301f; --accent-ink: #072012; }

/* ===== Base ===== */
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .display-title, .brand { font-family: var(--font-display); letter-spacing: -.02em; }
h1, h2 { font-weight: 800; }
h3, h4, h5, h6 { font-weight: 700; }
a { text-underline-offset: .2em; }
.min-w-0 { min-width: 0; }
.text-accent { color: var(--accent) !important; }
.container.narrow { max-width: 480px; }
.container.narrow-lg { max-width: 820px; }
.skip-link { position: absolute; left: .5rem; top: .5rem; z-index: 2000; background: var(--surface); padding: .5rem 1rem; border-radius: .5rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }

/* ===== Buttons & forms ===== */
.btn { border-radius: 999px; font-weight: 600; }
.btn-primary {
  --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-color: var(--accent-ink);
  --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--accent); --bs-btn-hover-color: var(--accent-ink);
  --bs-btn-active-bg: var(--accent); --bs-btn-active-border-color: var(--accent); --bs-btn-active-color: var(--accent-ink);
  --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent); --bs-btn-disabled-color: var(--accent-ink);
  box-shadow: 0 8px 20px -10px var(--accent);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary { transition: transform .15s ease, filter .15s ease; }
.btn-ghost {
  --bs-btn-color: var(--ink); --bs-btn-bg: transparent; --bs-btn-border-color: var(--line);
  --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: var(--line);
  --bs-btn-active-bg: var(--surface-2); --bs-btn-active-color: var(--ink); --bs-btn-active-border-color: var(--line);
}
.form-control, .form-select { background-color: var(--surface); border-color: var(--line); border-radius: .85rem; padding: .65rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--accent) 22%, transparent); background-color: var(--surface); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-label { font-weight: 600; font-size: .9rem; }
.input-group .form-control { border-radius: .85rem; }
.input-group > .btn { border-radius: 0 .85rem .85rem 0; }
.input-group-text { background: var(--surface-2); border-color: var(--line); }

/* ===== Chrome ===== */
.demo-bar { background: #fff3bf; color: #4d3b00; text-align: center; font-size: .85rem; padding: .35rem 1rem; font-weight: 600; }
[data-bs-theme="dark"] .demo-bar { background: #4a3b05; color: #ffe27a; }
.site-nav { position: sticky; top: 0; z-index: 1030; backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.35rem; color: var(--ink); text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: .7rem; background: var(--accent); color: var(--accent-ink); font-size: 1.15rem; }
.navbar .nav-link { color: var(--ink); font-weight: 500; }
.navbar .nav-link:hover { color: var(--accent); }
.theme-icon-dark { display: none; }
[data-bs-theme="dark"] .theme-icon-dark { display: inline; }
[data-bs-theme="dark"] .theme-icon-light { display: none; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); }
.site-footer a { color: var(--muted); text-decoration: none; display: inline-block; padding: .15rem 0; }
.site-footer a:hover { color: var(--accent); }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--font-body); font-weight: 700; }

/* ===== Home ===== */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); position: relative; overflow: hidden;
  background:
    radial-gradient(60rem 28rem at 85% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(40rem 22rem at -5% 30%, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 60%); }
.eyebrow { display: inline-flex; gap: .4rem; align-items: center; font-weight: 700; font-size: .85rem; color: var(--accent); background: var(--accent-soft); padding: .35rem .8rem; border-radius: 999px; }
.display-title { font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 1.02; font-weight: 800; margin: 1rem 0; }
.lead-lg { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 38rem; margin-bottom: 1.75rem; }
.lead-md { font-size: 1.15rem; color: var(--muted); }
.mock-card { background: var(--surface); border: 1px solid var(--line); border-radius: 1.75rem; padding: 1.5rem; box-shadow: var(--shadow); transform: rotate(1.5deg); max-width: 26rem; margin-inline: auto; }
.fake-input { border: 1px solid var(--line); border-radius: .85rem; padding: .65rem .9rem; color: var(--muted); font-size: .95rem; }
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-head.text-center { margin-inline: auto; }
.feature-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; color: var(--ink); transition: transform .18s ease, box-shadow .18s ease; }
a.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.feature-card h3, .feature-card h2 { font-size: 1.15rem; margin-top: .9rem; }
.feature-card p { color: var(--muted); margin-bottom: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 1rem; background: var(--accent-soft); color: var(--accent); font-size: 1.4rem; }
.step { padding: 1.5rem; }
.step-n { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: var(--font-display); font-weight: 800; }
.step h3 { margin-top: 1rem; font-size: 1.2rem; }
.step p { color: var(--muted); }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 1.75rem; padding: 2rem; box-shadow: var(--shadow); max-width: 26rem; margin-inline: auto; }
.price-big { font-family: var(--font-display); font-weight: 800; font-size: 4.5rem; line-height: 1; color: var(--accent); }
.price-big span { font-size: 2rem; }
.check-list { list-style: none; padding: 0; margin: 1rem 0; }
.check-list li { position: relative; padding-left: 1.75rem; margin-bottom: .55rem; }
.check-list li::before { content: "\eb7b"; font-family: remixicon; position: absolute; left: 0; top: 0; color: var(--accent); }
.cta-band { background: var(--ink); color: var(--bg); border-radius: 2rem; padding: clamp(2rem, 6vw, 4rem); text-align: center; }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cta-band p { opacity: .8; max-width: 34rem; margin: 0 auto 1.5rem; }

/* ===== Panels, auth ===== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.75rem); box-shadow: var(--shadow); }
.panel.p-0 { padding: 0; }
.alert { border-radius: 1rem; }

/* ===== Creator page ===== */
.creator-cover { height: 11rem; background:
  radial-gradient(30rem 14rem at 20% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%),
  linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent) 22%, var(--bg))); }
.creator-cover { position: relative; overflow: hidden; }
.btn-currency { font-size: .75em; font-weight: 700; letter-spacing: .04em; opacity: .85; }
.creator-cover.has-backdrop { height: clamp(11rem, 24vw, 20rem); }
.creator-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.creator-cover.has-backdrop + .creator-wrap { margin-top: -4.5rem; }
.creator-wrap { margin-top: -4.5rem; padding-bottom: 3rem; position: relative; }
.creator-head { display: flex; gap: 1.25rem; align-items: flex-end; margin-bottom: 1.5rem; }
.creator-name { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 0; }
.creator-tagline { color: var(--muted); margin: .25rem 0 .5rem; font-size: 1.1rem; }
.creator-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .92rem; color: var(--muted); margin: 0; }
.creator-meta a { color: var(--muted); }
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-weight: 800; }
.avatar-sm { width: 2.25rem; height: 2.25rem; font-size: 1rem; }
.avatar-lg { width: 4.5rem; height: 4.5rem; font-size: 1.6rem; }
.avatar-xl { width: 6.5rem; height: 6.5rem; font-size: 2.4rem; border: 4px solid var(--bg); box-shadow: var(--shadow); }
.onetime-note { display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 1rem; padding: .2rem .65rem; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: .8rem; font-weight: 600; }
.onetime-note i { color: var(--accent); }
.support-card { position: sticky; top: 5.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1.5rem; padding: 1.5rem; box-shadow: var(--shadow); }
.coffee-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; background: var(--accent-soft); border-radius: 1rem; padding: .75rem; }
.coffee-icon { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--surface); color: var(--accent); font-size: 1.4rem; }
.times { color: var(--muted); font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: .25rem; min-width: 2.6rem; justify-content: center; padding: .45rem .85rem; border-radius: 999px; background: var(--surface); border: 2px solid transparent; font-weight: 700; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.chip:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.chip-on, .btn-check:checked + .chip { border-color: var(--accent); background: var(--surface); color: var(--accent); }
.btn-check:focus-visible + .chip { outline: 3px solid var(--accent); outline-offset: 2px; }
.tier-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.tier-price { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; margin: 0 0 .5rem; color: var(--accent); }
.tier-price span { font-size: .95rem; color: var(--muted); font-weight: 500; }
.feed-item { display: flex; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; padding-bottom: 0; }
.bubble { background: var(--surface-2); border-radius: .25rem 1rem 1rem 1rem; padding: .55rem .85rem; margin-top: .4rem; font-size: .95rem; overflow-wrap: anywhere; white-space: pre-line; }
.bubble-reply { background: var(--accent-soft); border-radius: 1rem .25rem 1rem 1rem; }
.done-icon { font-size: 3rem; color: var(--accent); }
.thank-note { margin: 1rem auto 0; max-width: 28rem; padding: 1rem 1.25rem; background: var(--accent-soft); border-radius: 1rem; font-style: italic; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.25rem; margin: 1.25rem 0; }
.summary dt { color: var(--muted); font-weight: 500; }
.summary dd { margin: 0; text-align: right; }

/* ===== Dashboard ===== */
.dash-nav { display: flex; flex-direction: column; gap: .15rem; position: sticky; top: 5.25rem; }
.dash-link { display: flex; align-items: center; gap: .65rem; padding: .6rem .85rem; border-radius: .85rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.dash-link:hover { background: var(--surface-2); color: var(--ink); }
.dash-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.dash-link i { font-size: 1.2rem; }
@media (max-width: 991.98px) {
  .dash-nav { flex-direction: row; overflow-x: auto; position: static; padding-bottom: .5rem; gap: .35rem; }
  .dash-link { white-space: nowrap; padding: .5rem .75rem; border: 1px solid var(--line); }
  .dash-nav form { margin: 0 !important; }
}
.stat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; height: 100%; }
.stat-label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; line-height: 1.2; margin-top: .2rem; overflow-wrap: anywhere; }
.stat-sub { font-size: .82rem; color: var(--muted); margin-top: .15rem; }
.chart { width: 100%; height: auto; margin-top: .75rem; }
.chart .bar { fill: var(--accent); }
.chart .bar-empty { fill: var(--line); }
.chart .bar:hover { filter: brightness(1.15); }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart .chart-base { stroke: var(--line); stroke-width: 1; }
.checklist li { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; }
.checklist li.done { color: var(--muted); text-decoration: line-through; }
.checklist li.done i { color: var(--accent); }
.col-msg { min-width: 16rem; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line); }
.table > :not(caption) > * > * { padding: .85rem 1rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tier-row { border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.1rem; }
.tier-row.is-off { opacity: .7; }
details > summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: .75rem; }
.swatch { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); cursor: pointer; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatch-custom { background: conic-gradient(#d63a3f, #e8a317, #2a7048, #0b7a6f, #4f46e5, #be2e8a, #d63a3f); color: #fff; }
.swatch i { opacity: 0; }
.btn-check:checked + .swatch { box-shadow: 0 0 0 3px var(--accent); }
.btn-check:checked + .swatch i { opacity: 1; }
.btn-check:focus-visible + .swatch { outline: 3px solid var(--ink); outline-offset: 3px; }
.qr-img { background: #fff; padding: .75rem; border-radius: 1rem; border: 1px solid var(--line); }
.btn-sample { border: 1px solid var(--line); border-radius: 1rem; padding: 1rem; height: 100%; }
.btn-sample img { max-width: 100%; height: auto; }
.font-monospace { font-size: .8rem; }

/* ===== Content pages ===== */
.prose { font-size: 1.05rem; line-height: 1.75; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose code { background: var(--surface-2); padding: .1rem .35rem; border-radius: .35rem; }
.accordion { --bs-accordion-bg: var(--surface); --bs-accordion-border-color: var(--line); --bs-accordion-btn-bg: var(--surface); --bs-accordion-active-bg: var(--accent-soft); --bs-accordion-active-color: var(--ink); --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--accent) 25%, transparent); --bs-accordion-border-radius: 1rem; --bs-accordion-inner-border-radius: 1rem; }
.accordion-button { font-weight: 700; color: var(--ink); }
.accordion-item { margin-bottom: .6rem; border-radius: 1rem !important; overflow: hidden; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin: 0; }
.review blockquote { margin: .75rem 0 1rem; }
.stars { color: var(--accent); }
.pagination { --bs-pagination-bg: var(--surface); --bs-pagination-border-color: var(--line); --bs-pagination-color: var(--ink); --bs-pagination-active-bg: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.text-pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
a.stat { color: inherit; }
a.stat:hover { border-color: var(--accent); }
.backdrop-preview{max-height:8rem;width:100%;object-fit:cover}
.input-narrow{width:4.5rem}
