/*
  Shared design system for LocalDeals (PRD §8: markets vary only by
  configuration/assets/data, never by branching product logic — so this
  file is the *only* place visual structure lives; per-market identity is
  two CSS custom properties set inline by base.html from MARKET_PRIMARY_COLOR
  / MARKET_ON_PRIMARY_COLOR, never hardcoded here).

  No build step: plain CSS, custom properties, color-mix() for derived
  tints. Every browser members actually carry a phone with supports this.
*/

:root {
  /* Neutrals — fixed across every market; only --primary/--on-primary
     (declared inline in base.html <head>) are brand-specific. */
  --ink: #17140f;
  --ink-soft: #6b6558;
  --paper: #f7f6f3;
  --surface: #ffffff;
  --line: rgba(23, 20, 15, 0.10);
  --shadow-sm: 0 1px 2px rgba(23, 20, 15, 0.05);
  --shadow-md: 0 2px 4px rgba(23, 20, 15, 0.05), 0 8px 16px rgba(23, 20, 15, 0.06);

  /* Semantic colors are UI convention, not brand identity — a market never
     re-tints "this offer is active" or "this action is destructive". */
  --success-bg: #dff5e8;
  --success-ink: #1e8e5a;
  --danger: #b91c1c;
  --danger-bg: #fbdede;
  --danger-line: #f3b4b4;

  /* Derived from the two per-market values — this is the entire "re-skin
     the app" surface. See templates/base.html for where --primary and
     --on-primary are actually set. */
  --primary-soft: color-mix(in srgb, var(--primary) 10%, #fff);
  --primary-line: color-mix(in srgb, var(--primary) 45%, #fff);

  /* Accent for interactive text (links, focus rings). Decoupled from
     --primary so a market with a low-contrast brand color still gets
     legible links and an accessible focus indicator — WCAG AA isn't
     guaranteed by an arbitrary brand hex. Defaults to --primary; a market
     can override --accent inline in base.html alongside --primary if needed. */
  --accent: var(--primary);
  --focus-ring: color-mix(in srgb, var(--accent) 55%, #000);

  /* Dark chrome for the bottom tab bar — intentionally not --ink (the text
     color); a tab bar is fixed-dark chrome by design (iOS/Android pattern). */
  --bar: #17140f;
  --bar-fg: #a8a297;

  --radius: 12px;
  --radius-sm: 8px;
}

/* Self-hosted display face (OFL-licensed, core/static/fonts/) — used
   sparingly, for hero/marketing headlines only. Body copy stays system-ui. */
@font-face {
  font-family: "Archivo Black";
  src: url("../fonts/ArchivoBlack-Regular.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}
.display {
  font-family: "Archivo Black", "Arial Black", -apple-system, sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
  text-wrap: balance;
}

/* --- Reset & base type -------------------------------------------------- */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0 0 0.6rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; margin-top: 2rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--accent); }
small { color: var(--ink-soft); }

/* --- Global focus + reduced-motion (a11y polish) ----------------------------
   A single visible focus ring for keyboard users across every interactive
   element (links, buttons, chips, nav). Mouse users keep the default —
   :focus-visible suppresses the ring for click/tap. */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Honor prefers-reduced-motion everywhere: kill the FAQ +/rotation, the
   lightbox, the :active scale, and any per-element animations declared
   later (the redemption screen's pulse/breathe already handle this locally). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

/* --- Forms --------------------------------------------------------------- */

label { display: block; margin-top: 0.9rem; font-size: 0.9rem; font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
textarea, select {
  display: block; width: 100%; box-sizing: border-box;
  padding: 0.6rem 0.7rem; margin-top: 0.3rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font: inherit;
}
textarea { min-height: 5rem; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.errorlist { color: var(--danger); list-style: none; padding: 0; font-size: 0.85rem; }
.helptext { display: block; color: var(--ink-soft); font-size: 0.8rem; margin-top: 0.25rem; }

/* --- Buttons --------------------------------------------------------------- */

/* Primary form submit buttons are full-width on mobile — the thumb-friendly
   primary-action pattern. Explicit .btn links and .btn--sm row actions keep
   their natural (inline) width via the .btn rules below. */
button[type="submit"]:not([name="action"]),
form button:not([name="action"]) {
  display: flex; width: 100%;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 1.1rem; padding: 0.7rem 1.4rem;
  background: var(--primary); color: var(--on-primary);
  border: none; border-radius: 999px; font-weight: 700; font-size: 0.92rem;
  cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
/* Form submit buttons share the .btn look but are block (above). */
button[type="submit"]:not([name="action"]),
form button:not([name="action"]) {
  margin-top: 1.1rem; padding: 0.7rem 1.4rem;
  background: var(--primary); color: var(--on-primary);
  border: none; border-radius: 999px; font-weight: 700; font-size: 0.92rem;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn:active, button[type="submit"]:active { transform: scale(0.98); }
.btn--ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
/* Secondary action: a filled neutral button — clearly visible and tappable,
   but visually subordinate to the primary brand-color .btn so two stacked
   CTAs (e.g. "Browse all deals" under a directory) keep clear hierarchy. */
.btn--secondary {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
}
.btn--danger { background: var(--danger); color: #fff; }
.btn--block { display: flex; width: 100%; }
.btn--sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; margin-top: 0; }

/* Back link — a tappable ghost pill with a real left chevron, replacing the
   bare “‹ Back” text links. Sits above a card stack. */
.back-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin: 0 0 1rem; padding: 0.45rem 0.9rem;
  background: var(--surface); color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; -webkit-tap-highlight-color: transparent;
}
.back-link svg { width: 1rem; height: 1rem; flex-shrink: 0; }

/* Secondary action under a primary form (Log in / Forgot password). A
   centered block, not a buried inline text link. */
.alt-action {
  text-align: center; margin: 1.1rem 0 0; font-size: 0.9rem; color: var(--ink-soft);
}
.alt-action a { color: var(--accent); font-weight: 700; text-decoration: none; }
.alt-action a:hover { text-decoration: underline; }

/* A card that’s just a stack of tappable rows (profile nav, staff nav) —
   tighter padding than a content card. */
.link-list { padding: 0.3rem 1.1rem; }

/* Horizontal scroll wrapper for wide tables on phones. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* A long public URL that must wrap, not overflow, on mobile. */
.public-url { word-break: break-all; }

/* Staff link list — whole row tappable (stretched link), with Edit/Pause
   actions kept outside the stretched area so they stay independently clickable. */
.link-row { position: relative; }
.link-row .stretched-link strong { text-decoration: none; }
.link-row-actions { gap: 1rem; border-bottom: none; }
.link-row-btns { display: flex; gap: 0.5rem; white-space: nowrap; }
.inline-form { display: inline; }
.empty-state { text-align: center; }
.confirm-meta { margin-top: 0.6rem; }

/* --- Cards & lists --------------------------------------------------------- */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1.1rem; margin-bottom: 0.9rem;
}
.card + .card { margin-top: 0; }
.card h2, .card h3 { margin-top: 0; }
.card-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem;
  text-decoration: none; color: inherit;
}
.card-row:last-child { border-bottom: none; }
.card-row .chevron { color: var(--ink-soft); }

/* --- Pills & badges -------------------------------------------------------- */

.pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  border-radius: 999px; padding: 0.2rem 0.65rem;
  font-size: 0.78rem; font-weight: 700; line-height: 1.6;
}
.pill--primary { background: var(--primary-soft); color: var(--ink); border: 1px solid var(--primary-line); }
.pill--success { background: var(--success-bg); color: var(--success-ink); }
.pill--neutral { background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line); }

/* --- Business listing --------------------------------------------------------
   Used by templates/_business_card.html on both the member dashboard and the
   public landing page. The name is a "stretched link" (PRD-friendly a11y
   pattern): its ::after covers the whole .biz-card-main box, so the entire
   row is tappable while gallery thumbnails and the directions link — both
   outside .biz-card-main — stay independently tappable with no nested
   <a> elements and no click-handler gymnastics. */

.biz-card-main { position: relative; display: flex; gap: 0.85rem; align-items: center; }
.biz-logo {
  width: 3rem; height: 3rem; border-radius: var(--radius-sm); object-fit: contain;
  background: var(--paper); flex-shrink: 0; border: 1px solid var(--line);
}
.biz-card-main h3 { margin: 0 0 0.15rem; font-size: 1rem; }
.biz-card-main .category { display: block; margin-bottom: 0.35rem; }
.biz-card-main .chevron { color: var(--ink-soft); font-size: 1.2rem; flex-shrink: 0; }
.stretched-link { color: inherit; text-decoration: none; }
.stretched-link::after { content: ""; position: absolute; inset: 0; }

/* Description: muted, clamped to 2 lines so a long blurb never blows up
   the compact card. The whole .biz-card-main is the redeem tap target,
   so the text is readable but not independently interactive. */
.biz-desc {
  margin: 0 0 0.4rem; font-size: 0.84rem; line-height: 1.45; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Deal callout: replaces the fully-rounded .pill for the promo. A 999px
   radius pill wraps into an ugly rounded blob on multi-line deals (e.g.
   "Mega Tea + Cake Pop for $10 (15% off); or free add-on with…"). This
   block uses a normal corner radius + a left accent border so it reads
   as "the deal" at any length, short or long, while keeping the green
   success coloring. */
.deal-callout {
  background: var(--success-bg); color: var(--success-ink);
  border-left: 3px solid var(--success-ink);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem; font-size: 0.82rem; font-weight: 600; line-height: 1.5;
}
.biz-card-main .deal-callout { margin-top: 0.1rem; }

.biz-card-footer {
  display: flex; flex-direction: column; gap: 0.6rem;
  margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--line);
}
.biz-card-links { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; }
.biz-link {
  font-size: 0.82rem; font-weight: 600; color: var(--accent);
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.biz-link:hover { text-decoration: underline; }
.gallery-strip { display: flex; gap: 0.4rem; overflow-x: auto; }
.gallery-thumb {
  padding: 0; border: none; background: none; cursor: pointer; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.gallery-thumb img {
  width: 2.75rem; height: 2.75rem; object-fit: cover; border-radius: var(--radius-sm);
  display: block; border: 1px solid var(--line);
}
.nav-btn {
  display: inline-flex; align-items: center; gap: 0.3rem; flex-shrink: 0;
  font-size: 0.78rem; font-weight: 700; color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.75rem;
  -webkit-tap-highlight-color: transparent;
}
.nav-btn svg { width: 0.95rem; height: 0.95rem; flex-shrink: 0; }

/* --- Lightbox (business photo "tap to expand") --------------------------------
   A native <dialog>, opened by the small script in base.html — no JS
   framework, no external lightbox library. */

.lightbox { position: relative; border: none; padding: 2.75rem 0 0; background: transparent; max-width: 92vw; }
.lightbox::backdrop { background: rgba(10, 9, 6, 0.85); }
.lightbox img { max-width: 92vw; max-height: 82vh; display: block; border-radius: var(--radius); margin: 0 auto; }
.lightbox-close {
  position: absolute; top: 0; right: 0; background: rgba(0, 0, 0, 0.55); border: none;
  color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* --- Search (member dashboard) ------------------------------------------------ */

.search-input { margin-bottom: 1rem; }

/* --- Category chips (dashboard filter) ------------------------------------- */
.chip-row {
  display: flex; gap: 0.5rem; overflow-x: auto; margin-bottom: 1rem;
  padding-bottom: 0.2rem; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 0.65rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 0.85rem; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  /* Min 44px tap target for thumb safety (WCAG 2.5.5). */
  min-height: 2.75rem;
}
.chip--active {
  background: var(--primary); color: var(--on-primary);
  border-color: var(--primary);
}
.search-empty { display: none; color: var(--ink-soft); }

/* --- Header / nav ----------------------------------------------------------- */

header.site-header {
  background: var(--primary); color: var(--on-primary);
  padding: 0.85rem 1rem; display: flex; justify-content: space-between;
  align-items: center; gap: 1rem;
}
header.site-header a { color: var(--on-primary); text-decoration: none; }
.brand { display: flex; align-items: center; font-weight: 800; font-size: 1.05rem; }
.brand img { height: 1.75rem; display: block; }
.site-nav { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.header-btn {
  padding: 0.5rem 1.2rem; border-radius: 999px;
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3);
  font-weight: 700; font-size: 0.88rem;
  -webkit-tap-highlight-color: transparent;
}
.header-btn:hover { background: rgba(255,255,255,0.28); }

/* --- Bottom tab bar ---------------------------------------------------------
   The primary nav for authenticated pages (mobile-first: thumb reach beats
   a top header on a phone). Fixed, so `main` gets matching bottom padding
   via body.has-tabbar below, and env(safe-area-inset-bottom) keeps it clear
   of the home-indicator area on notched phones. */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; gap: 0.4rem;
  background: var(--bar);
  padding: 0.45rem 0.9rem calc(0.5rem + env(safe-area-inset-bottom));
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  color: var(--bar-fg); text-decoration: none;
  font-size: 0.68rem; font-weight: 600;
  padding: 0.4rem 0.4rem 0.35rem; border-radius: 0.85rem;
  -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 1.4rem; height: 1.4rem; }
.tab.active { background: var(--primary); color: var(--on-primary); }
body.has-tabbar main { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }

/* --- Sticky landing CTA -------------------------------------------------------
   One persistent bottom action for anonymous marketing pages — the mobile
   equivalent of a always-visible "Get access" button, without repeating a
   full button after every section. */

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
}
.sticky-cta .btn { margin-top: 0; }
body.has-sticky-cta main { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }

/* --- Stat strip ---------------------------------------------------------------- */

.stat-strip {
  display: flex; justify-content: space-around; text-align: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1rem 0; margin: 1.4rem 0;
}
.stat-strip .stat-value {
  font-family: "Archivo Black", "Arial Black", -apple-system, sans-serif;
  font-size: 1.3rem; color: var(--primary); font-variant-numeric: tabular-nums;
}
.stat-strip .stat-label { font-size: 0.68rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }

/* --- Landing hero -------------------------------------------------------------
   A contained, rounded hero band (no full-bleed gymnastics — keeps the
   no-build-step layout simple and avoids horizontal-scroll traps on mobile).
   Background image is a per-market asset (MARKET_HERO_IMAGE_PATH); the
   dark gradient overlay guarantees legible headline/CTA text over any
   photo, and falls back to a solid brand tint when no image is set. */
.hero {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 15rem; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.6rem 1.3rem; margin: 0 0 1.4rem;
  background: var(--primary);
  background-size: cover; background-position: center;
  color: var(--on-primary);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.25) 45%,
    rgba(0, 0, 0, 0.05) 100%
  );
}
.hero > * { position: relative; z-index: 1; }
.hero .display { font-size: 1.85rem; color: #fff; margin: 0 0 0.4rem; }
.hero .hero-sub { color: rgba(255, 255, 255, 0.9); margin: 0 0 1rem; max-width: 32rem; }
.hero .hero-sub strong { color: #fff; }
.hero .btn { margin-top: 0; }

/* --- How it works (3-step strip) ------------------------------------------- */
.how-it-works {
  display: grid; gap: 0.8rem; margin: 1.6rem 0 0;
}
.how-step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; display: flex; gap: 0.9rem; align-items: flex-start;
}
.how-step-num {
  flex-shrink: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-family: "Archivo Black", "Arial Black", -apple-system, sans-serif; font-size: 0.9rem;
}
.how-step h3 { margin: 0 0 0.2rem; font-size: 0.98rem; }
.how-step p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

/* --- Landing compact directory --------------------------------------------
   A scannable preview of participating businesses on the landing: one row
   per business (small logo + name + category + deal promo), featured picks
   first with a "Featured" tag + a primary left-accent stripe. Capped at a
   few rows so the FAQ / business CTA / footer stay within reach. The full
   directory with chips/search/cards lives on /deals/. */
.compact-biz {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.6rem 0.8rem; margin-bottom: 0.5rem;
}
/* Featured row: a 3px primary stripe on the leading edge marks curated
   picks without a separate, redundant section. */
.compact-biz--featured { border-left: 3px solid var(--primary); }
.compact-biz-main { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.compact-logo {
  width: 2.2rem; height: 2.2rem; border-radius: var(--radius-sm);
  object-fit: contain; background: var(--paper); flex-shrink: 0;
  border: 1px solid var(--line);
}
.compact-biz-info { flex: 1; min-width: 0; }
.compact-biz-info h3 { margin: 0; font-size: 0.95rem; }
.compact-biz-info .category { display: block; font-size: 0.76rem; margin-top: 0.05rem; }
.featured-tag {
  display: inline-block; margin-right: 0.35rem; padding: 0.05rem 0.4rem;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary);
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; vertical-align: 1px;
}
.compact-promo {
  flex-shrink: 0; max-width: 45%; font-size: 0.78rem; font-weight: 600;
  color: var(--success-ink); text-align: right; line-height: 1.4;
  /* Clamp a long promo to 2 lines so one verbose deal never blows up the row. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.browse-all { margin-top: 1rem; }

/* --- Testimonials ---------------------------------------------------------- */
.testimonials { margin: 1.6rem 0 0; }
.testimonial {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; margin-bottom: 0.8rem;
}
.testimonial .quote { font-size: 0.98rem; margin: 0 0 0.5rem; }
.testimonial .attribution { font-size: 0.82rem; color: var(--ink-soft); }
.testimonial .attribution::before { content: "— "; }

/* --- Business-inquiry CTA band (landing) -----------------------------------
   Supply-side pitch to local businesses — distinct from the member CTA. A
   tinted band so it reads as its own call, not just more body copy. */
.biz-cta {
  margin-top: 2rem; padding: 1.4rem 1.3rem; text-align: center;
  background: var(--primary-soft); border: 1px solid var(--primary-line);
  border-radius: var(--radius);
}
.biz-cta h2 { margin: 0 0 0.4rem; }
.biz-cta p { margin: 0 0 1rem; font-size: 0.92rem; color: var(--ink-soft); }
.biz-cta .btn { margin-top: 0; }

/* --- Flash messages ---------------------------------------------------------- */

.message {
  background: var(--primary-soft); border: 1px solid var(--primary-line);
  border-radius: var(--radius-sm); padding: 0.6rem 0.8rem; margin-bottom: 0.9rem;
  font-size: 0.9rem;
}

/* --- Tables (admin-facing stats) --------------------------------------------- */

table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
table :is(th, td) { text-align: left; padding: 0.45rem 0.75rem 0.45rem 0; border-bottom: 1px solid var(--line); }
table th { color: var(--ink-soft); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.02em; }
table .num { text-align: right; }

.muted { color: var(--ink-soft); font-size: 0.85rem; }

/* --- FAQ accordion (landing) --------------------------------------------- */
.faq-accordion {
  margin-bottom: 1rem;
}
.faq-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 0.6rem; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; padding: 0.85rem 1.1rem; font-weight: 600; font-size: 0.95rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--ink-soft);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer {
  padding: 0 1.1rem 0.85rem; font-size: 0.92rem; line-height: 1.6; color: var(--ink-soft);
}

/* --- Profile avatar (tappable photo) --------------------------------------- */
.profile-avatar-wrap { display: flex; justify-content: center; margin-bottom: 1rem; }
.profile-avatar {
  position: relative; display: inline-block; cursor: pointer;
  width: 88px; height: 88px; border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.profile-avatar img,
.profile-avatar-placeholder {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--line); background: var(--paper); color: var(--ink-soft);
}
.profile-avatar-cam {
  position: absolute; bottom: 0; right: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}

/* --- Business gallery management ------------------------------------------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.6rem; margin-bottom: 1rem;
}
.gallery-item { position: relative; }
.gallery-item img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--line); display: block;
}
.gallery-delete {
  position: absolute; top: 0.2rem; right: 0.2rem;
  width: 1.6rem; height: 1.6rem; padding: 0; border-radius: 50%;
  font-size: 0.75rem; display: flex; align-items: center; justify-content: center;
  margin: 0;
}
.gallery-upload { margin-top: 0.5rem; }

/* --- Footer (landing) ----------------------------------------------------- */
.site-footer {
  margin-top: 2.5rem; padding: 1.5rem 0 2rem; text-align: center;
  display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap;
  border-top: 1px solid var(--line);
}
.site-footer a {
  color: var(--ink-soft); display: inline-flex; align-items: center;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.site-footer a:hover { color: var(--ink); }
.site-footer svg { display: block; }

@media (max-width: 30rem) {
  main { padding-left: 0.85rem; padding-right: 0.85rem; }
}

/* --- Referral share block (profile) ---------------------------------------- */
.referral-share { margin-top: 0.6rem; }
.referral-url {
  display: block; word-break: break-all; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem; font-size: 0.82rem; color: var(--ink-soft);
}
.referral-actions { display: flex; gap: 0.6rem; margin-top: 0.6rem; }
.referral-copied { margin: 0.5rem 0 0; font-size: 0.82rem; color: var(--success-ink); font-weight: 700; }

/* --- Pricing cards (plans page) ------------------------------------------- */
.plan-card { position: relative; overflow: hidden; }
.plan-card--featured {
  border-color: var(--primary-line);
  box-shadow: var(--shadow-md);
}
/* Header band sits at the very top of a featured card, inside the card's
   radius (overflow:hidden on .plan-card clips it). */
.plan-flag {
  background: var(--primary); color: var(--on-primary);
  margin: -1.1rem -1.1rem 1rem; padding: 0.45rem 1.1rem;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  text-align: center;
}
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.plan-head h2 { margin: 0; font-size: 1.1rem; }
.plan-shape { flex-shrink: 0; }
.plan-desc { margin: 0.4rem 0 0.8rem; font-size: 0.9rem; color: var(--ink-soft); }

/* Big pricing display: display-weight numeral with the cadence as a small
   subscript, so the price reads at a glance instead of inside a sentence. */
.plan-price { display: flex; align-items: baseline; gap: 0.35rem; margin: 0.2rem 0 0.1rem; }
.plan-price-amount {
  font-family: "Archivo Black", "Arial Black", -apple-system, sans-serif;
  font-size: 2rem; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums;
}
.plan-price-cadence { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }
.plan-price-detail { margin: 0 0 0.4rem; font-size: 0.85rem; color: var(--ink-soft); }

.plan-trust {
  margin: 0.6rem 0 0; font-size: 0.74rem; color: var(--ink-soft); text-align: center;
}

/* Referral-aware plans page: a callout above the one-time cards explaining
   the credit, and a visually separated section below for recurring plans
   (which can't use the credit) so the "continue without credit" path is
   obvious rather than hidden. */
.referral-note {
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  border: 1px solid var(--primary-line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem; font-size: 0.9rem;
}
.referral-note a { font-weight: 700; }
.recurring-section {
  margin-top: 2.2rem; padding-top: 1.4rem;
  border-top: 1px solid var(--hairline);
}
.recurring-section h2 {
  margin: 0 0 0.3rem; font-size: 1.15rem;
}
.recurring-section h2 small {
  font-size: 0.8rem; font-weight: 600; color: var(--ink-soft);
}
.recurring-section > .muted { margin: 0 0 1.1rem; }
