:root {
  --bg: #faf7f3;
  --panel: #ffffff;
  --ink: #201a14;
  --ink-soft: #6b6054;
  --line: #ece4d9;
  --brand: #dd5500;        /* interactive: buttons, links, active */
  --accent: #ff790e;       /* vivid identity accent */
  --brand-soft: #fff4e6;   /* cream tint */
  --brand-ink: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(80, 40, 10, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Honeypot: off-screen, hidden from real users. */
.hp { position: absolute !important; left: -9999px !important; top: -9999px !important; height: 0; overflow: hidden; }

.tf {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 860px;
  margin: 0 auto;
  background: var(--panel);
  box-shadow: var(--shadow);
}

/* --- Embeddable chat (/embed): fill the host iframe, drop the outer chrome --- */
.tf--embed {
  max-width: none;
  height: 100dvh;
  margin: 0;
  box-shadow: none;
}
.tf--embed .tf__top { padding: 12px 18px; }
/* Bubble panel (?widget=1): the loader's own header brands + closes it, so hide
   the in-frame logo and right-align the actions (incl. "Talk to a human"). */
.tf--widget .tf__brand { display: none; }
.tf--widget .tf__top { justify-content: flex-end; }

/* --- Header + progress --- */
.tf__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
}
.tf__brand { display: flex; align-items: center; }
.tf__logo { height: 26px; width: auto; display: block; }
.tf__logo--dark { display: none; }   /* shown only in dark mode */
.tf__restart {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
}
.tf__restart:hover { border-color: var(--brand); color: var(--brand); }
.tf__actions { display: flex; align-items: center; gap: 8px; }
.tf__human {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--brand-soft); border: 1px solid transparent;
  color: var(--brand); border-radius: 999px;
  padding: 6px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.tf__human:hover { border-color: var(--brand); }
.tf__human .cc__ic { width: 16px; height: 16px; }
@media (max-width: 520px) {
  /* On phones, pin "Talk to a human" to a thumb-friendly bar at the bottom
     instead of the top-right corner. It's the only .tf__human on the page (home
     only), so the fixed rule is naturally scoped. */
  .tf__human {
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    justify-content: center;
    padding: 13px 16px; font-size: 15px;
    background: var(--panel);
    border-color: var(--brand);
    box-shadow: 0 6px 20px rgba(80, 40, 10, 0.20);
  }
  /* Reserve room below so the bar never covers the footer or the chat input. */
  .tf--home { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .tf__top { padding-left: 14px; padding-right: 14px; }
  /* The embed keeps "Talk to a human" inline in its header (never the fixed
     bottom bar), so it can't overlap the chat input inside a small iframe. */
  .tf--embed .tf__human {
    position: static; left: auto; right: auto; bottom: auto; z-index: auto;
    padding: 6px 14px; font-size: 14px;
    background: var(--brand-soft); border-color: transparent; box-shadow: none;
  }
}

/* --- "Talk to a human" contact card (business-card modal) --- */
.cc {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(20, 12, 4, 0.55);
  animation: cc-fade 0.18s ease;
}
.cc[hidden] { display: none; }
.cc__card {
  position: relative; width: 100%; max-width: 360px;
  background: var(--panel); color: var(--ink);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(20, 12, 4, 0.55), 0 8px 20px rgba(20, 12, 4, 0.25);
  animation: cc-pop 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.cc__stripe { height: 6px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.cc__close {
  position: absolute; top: 10px; right: 12px; z-index: 1;
  width: 30px; height: 30px; line-height: 1; font-size: 22px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); cursor: pointer;
}
.cc__close:hover { background: var(--brand-soft); color: var(--brand); }
.cc__head { padding: 22px 24px 6px; }
.cc__logo { height: 24px; width: auto; display: block; }
.cc__logo--dark { display: none; }
.cc__tag { margin: 12px 0 0; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.cc__hours { margin: 8px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.cc__hours-label { color: var(--ink-soft); }
.cc__dot { display: inline-block; vertical-align: middle; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: #9aa0a6; }
.cc__dot--open { background: #22a06b; box-shadow: 0 0 0 3px rgba(34, 160, 107, 0.18); }
.cc__dot--closed { background: #c2410c; }
.cc__rows { list-style: none; margin: 12px 0 0; padding: 6px 12px; display: flex; flex-direction: column; }
.cc__rows li { border-top: 1px solid var(--line); }
.cc__rows li:first-child { border-top: 0; }
.cc__rows a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 12px; color: var(--ink); text-decoration: none; border-radius: 10px;
}
.cc__rows a:hover { background: var(--brand-soft); color: var(--brand); }
.cc__rows span { font-size: 0.95rem; word-break: break-word; }
.cc__ic { width: 20px; height: 20px; flex: none; color: var(--brand); }
.cc__actions { padding: 8px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.cc__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 16px; box-sizing: border-box;
  border-radius: 12px; font-size: 0.98rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent;
}
.cc__btn--primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 22px rgba(221, 85, 0, 0.28); }
.cc__btn--primary:hover { filter: brightness(1.05); color: var(--brand-ink); text-decoration: none; }
.cc__btn--primary .cc__ic { color: var(--brand-ink); }
.cc__btn--ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.cc__btn--ghost:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.cc__btn--ghost .cc__ic { color: inherit; }
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cc-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tf__progress { height: 3px; background: var(--line); }
.tf__progress-bar {
  display: block;
  height: 100%;
  width: 15%;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Stage + card --- */
.tf__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 32px 28px;
}
.tf__card {
  width: 100%;
  max-width: 620px;
  margin: auto;            /* vertically centre when short, scroll when tall */
  align-self: center;
  transition: opacity 0.38s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.tf__card.is-entering { opacity: 0; transform: translateY(18px); }
.tf__card.is-in { opacity: 1; transform: none; }

.tf__q {
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

/* Assistant prose on a result step (answer/ticket/error): calm, not a headline. */
.tf__say {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  margin: 2px 0 20px;
}

/* --- Article result cards --- */
.tf__articles { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.tf__article {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 13px 15px;
  background: #fffaf3;
}
.tf__article-title { margin: 0 0 5px; font-size: 1.02rem; font-weight: 700; line-height: 1.3; }
.tf__article-text { margin: 0 0 8px; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; }
.tf__article-foot { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tf__article-link { font-size: 0.9rem; color: var(--brand); font-weight: 600; text-decoration: none; }
.tf__article-link:hover { text-decoration: underline; }
.tf__article-host { font-size: 0.78rem; color: var(--ink-soft); }

/* --- Choice buttons --- */
.tf__choices { display: flex; flex-direction: column; gap: 10px; }
.tf__choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1.05rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.tf__choice:hover { border-color: var(--brand); background: var(--brand-soft); }
.tf__choice:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tf__choice:active { transform: translateY(1px); }
.tf__choice-key {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: none;
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 0.8rem; font-weight: 700; color: var(--ink-soft);
}
.tf__choice:hover .tf__choice-key { border-color: var(--brand); color: var(--brand); }

/* --- Free-text answer --- */
.tf__answer-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  border-bottom: 2px solid var(--line);
  transition: border-color 0.15s;
}
.tf__answer-row:focus-within { border-color: var(--brand); }
.tf__field {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 1.25rem;
  color: var(--ink);
  padding: 8px 2px;
  resize: none;
  max-height: 200px;
  line-height: 1.4;
}
.tf__field:focus { outline: none; }
.tf__field::placeholder { color: #a9b3ac; }
.tf__ok {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand); color: var(--brand-ink);
  border: none; border-radius: 10px;
  padding: 10px 18px; margin-bottom: 6px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
}
.tf__ok:hover { filter: brightness(1.05); }
.tf__ok-hint { font-size: 0.85rem; opacity: 0.85; }
.tf__hint { margin-top: 10px; font-size: 0.8rem; color: var(--ink-soft); }

/* Scenario offer button (AI-suggested guided form) — a prominent call to action */
.tf__scenario { margin: 6px 0 18px; }
.tf__scenario-btn {
  display: block; background: var(--brand); color: var(--brand-ink);
  border-radius: 12px; padding: 15px 18px; text-decoration: none;
  box-shadow: 0 8px 22px rgba(221, 85, 0, 0.30);
  transition: transform 0.06s, filter 0.12s;
}
.tf__scenario-btn:hover { filter: brightness(1.06); text-decoration: none; }
.tf__scenario-btn:active { transform: translateY(1px); }
.tf__scenario-btn-main { display: block; font-size: 1.08rem; font-weight: 700; }
.tf__scenario-btn-sub { display: block; font-size: 0.85rem; opacity: 0.92; margin-top: 3px; }

/* Secondary quick-replies beside a text input (e.g. Skip) */
.tf__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tf__chip {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
  border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; cursor: pointer;
}
.tf__chip:hover { border-color: var(--brand); color: var(--brand); }

/* --- Thinking --- */
.tf__thinking { display: inline-flex; gap: 12px; align-items: center; padding: 8px 0; }
.tf__thinking-text {
  font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 600; color: var(--ink);
  transition: opacity 0.2s ease;
}
.tf__thinking-dots { display: inline-flex; gap: 6px; align-items: center; }
.tf__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: 0.4; animation: blink 1.2s infinite ease-in-out; }
.tf__dot:nth-child(2) { animation-delay: 0.2s; }
.tf__dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* --- Footer --- */
.tf__foot { padding: 14px 22px; font-size: 0.8rem; color: var(--ink-soft); border-top: 1px solid var(--line); text-align: center; }

/* --- Scenario pages (confirm / steps / form / outcome) --- */
.scn { flex: 1; display: flex; justify-content: center; padding: 32px 22px; }
.scn__card { width: 100%; max-width: 560px; margin: auto 0; }
.scn__q { font-size: clamp(1.3rem, 3.4vw, 1.7rem); font-weight: 600; line-height: 1.3; margin: 0 0 12px; letter-spacing: -0.01em; }
.scn__intro { color: var(--ink-soft); font-size: 1rem; line-height: 1.55; margin: 0 0 22px; }
.scn__steps { background: var(--brand-soft); border-radius: 12px; padding: 16px 18px; line-height: 1.6; margin: 0 0 22px; }
/* Rendered Markdown */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h2 { font-size: 1.15rem; margin: 16px 0 8px; }
.md h3 { font-size: 1.02rem; margin: 14px 0 6px; }
.md h4 { font-size: 0.95rem; margin: 12px 0 6px; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md a { color: var(--brand); font-weight: 600; }
.md code { background: rgba(0,0,0,0.06); border-radius: 5px; padding: 1px 5px; font-size: 0.9em; }
.md pre { background: rgba(0,0,0,0.06); border-radius: 8px; padding: 10px 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.scn__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.scn__note { color: var(--ink-soft); font-size: 0.85rem; margin: 16px 0 0; }
.btn-lg {
  display: inline-block; border: 1.5px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 12px; padding: 13px 22px; font-size: 1.02rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-lg:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn-lg--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-lg--primary:hover { filter: brightness(1.05); color: var(--brand-ink); }
/* Submit-loading state (set by forms.js): spinner + no further clicks. */
.btn-lg.is-loading { pointer-events: none; opacity: 0.92; cursor: wait; }
.btn-lg--primary.is-loading:hover { filter: none; }
.btn-spin {
  display: inline-block; width: 15px; height: 15px; vertical-align: -2px; margin-right: 9px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: btnspin 0.6s linear infinite;
}
@keyframes btnspin { to { transform: rotate(360deg); } }

.scn__form { display: flex; flex-direction: column; gap: 16px; }
.scn__row { display: flex; flex-direction: column; gap: 6px; }
.scn__label { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.scn__req { color: var(--accent); }
.scn__field {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--panel);
}
.scn__field:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
textarea.scn__field { resize: vertical; }
.scn__radios { display: flex; gap: 18px; padding-top: 2px; }
.scn__radio { display: inline-flex; align-items: center; gap: 6px; font-size: 1rem; }
.scn__radio input { accent-color: var(--brand); width: 16px; height: 16px; }
.scn__submit { align-self: flex-start; margin-top: 4px; }
.scn__urgent {
  background: #fff6e5; color: #7a4b00; border: 1px solid #f2ddb4; border-radius: 10px;
  padding: 12px 14px; margin: 0 0 22px; font-size: 0.95rem; line-height: 1.5;
}
.scn__err { background: #fdeaea; color: #b3261e; border: 1px solid #f2c9c6; border-radius: 10px; padding: 12px 14px; margin: 0 0 18px; }
.scn__err ul { margin: 6px 0 0; padding-left: 18px; }
.scn__hp { position: absolute !important; left: -9999px !important; height: 0; overflow: hidden; }

/* --- Client landing page (/c/<slug>) --- */
.lp__client { color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 4px; }
.lp__title { font-size: clamp(1.4rem, 3.6vw, 1.8rem); font-weight: 600; line-height: 1.25; margin: 0 0 20px; letter-spacing: -0.01em; }
.lp__list { display: flex; flex-direction: column; gap: 10px; }
.lp__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: inherit; text-decoration: none; transition: border-color 0.12s, background 0.12s;
}
.lp__item:hover { border-color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.lp__item-title { font-size: 1.02rem; font-weight: 600; line-height: 1.35; }
.lp__item-go { color: var(--brand); font-weight: 600; white-space: nowrap; font-size: 0.95rem; }
.lp__chat { margin-top: 22px; }

/* --- Feedback / rating page (shared by the AI-chat + ticket feedback pages) --- */
.fb { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 28px 18px;
  background: radial-gradient(120% 90% at 50% -10%, var(--brand-soft) 0%, transparent 60%); }
.fb__card {
  position: relative; overflow: hidden;
  width: 100%; max-width: 460px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 18px 50px -20px rgba(30, 20, 10, 0.35); padding: 40px 30px 32px; text-align: center;
}
/* Gradient accent bar pinned to the very top edge (ignores the card padding). */
.fb__card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.fb__head { margin-bottom: 6px; }
.fb__brand { display: flex; justify-content: center; align-items: center; margin-bottom: 18px; }
.fb__logo { height: 26px; width: auto; display: block; }
.fb__logo--dark { display: none; }
.fb__body { text-align: center; }
.fb__body--center { padding: 8px 0 12px; }
.fb__title { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 8px; }
.fb__sub { color: var(--ink-soft); margin: 0 0 14px; line-height: 1.5; }
/* Preview banner (admin previewing a ticket type's survey) */
.fb__preview {
  background: var(--brand-soft); color: var(--brand); border: 1px dashed var(--brand);
  border-radius: 10px; padding: 9px 12px; margin: 0 0 16px; font-size: 0.82rem; font-weight: 600;
}
/* Ticket badge */
.fb__ticket {
  display: inline-block; background: var(--brand-soft); color: var(--brand);
  border-radius: 999px; padding: 4px 13px; font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.02em; margin: 2px 0 20px;
}
/* Per-request note (what this feedback is about), shown to the customer */
.fb__note {
  text-align: left; background: var(--brand-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--brand); border-radius: 10px; padding: 11px 14px;
  margin: 0 0 18px; color: var(--ink); font-size: 0.95rem; line-height: 1.5;
}
.fb__note-from {
  display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--brand); margin: 0 0 4px;
}
/* Public-review call-to-action on the thank-you page */
.fb__reviews { margin: 24px 0 2px; border-top: 1px solid var(--line); padding-top: 20px; }
.fb__reviews-prompt { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; margin: 0 0 14px; }
.fb__reviews-btns { display: flex; flex-direction: column; gap: 10px; }
.fb__review-btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 11px 18px; border-radius: 10px; border: 1.5px solid transparent;
}
.fb__review-btn--google { background: #ffffff; color: #1f1a15; border-color: #dadce0; }
.fb__review-btn--facebook { background: #1877f2; color: #ffffff; }
/* Testimonial-permission (consent) page: a website-style preview of the
   customer's own words, then the attribution choice (name vs anonymous). */
.fb__tprev {
  margin: 8px 0 20px; padding: 20px 20px 18px; text-align: left;
  background: var(--brand-soft); border: 1px solid var(--line); border-radius: 14px;
}
.fb__tprev-stars { color: #f5a623; font-size: 1.05rem; letter-spacing: 2px; margin-bottom: 8px; }
.fb__tprev-stars-off { color: var(--line); }
.fb__tprev-quote { margin: 0; font-size: 1.08rem; line-height: 1.5; color: var(--ink); font-style: italic; }
.fb__tprev-quote::before { content: "\201C"; }
.fb__tprev-quote::after { content: "\201D"; }
.fb__tprev-by { margin-top: 12px; font-weight: 700; font-size: 0.9rem; color: var(--ink-soft); }
.fb__consent { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.fb__consent-opt {
  display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; cursor: pointer; font-size: 0.92rem; line-height: 1.45;
}
.fb__consent-opt input { accent-color: var(--brand); margin-top: 3px; flex: 0 0 auto; }
.fb__consent-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.fb__consent-fields { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 0 8px; }
.fb__consent-fields .fb__qlabel { margin-bottom: 2px; font-size: 0.82rem; }
.fb__sub-inline { color: var(--ink-soft); font-weight: 400; }
.fb__consent-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.fb__consent-actions .fb__btn { width: 100%; }
/* Success check (thank-you state) */
.fb__check {
  width: 66px; height: 66px; margin: 6px auto 14px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center;
}
.fb__check svg { width: 34px; height: 34px; }
/* Radio-button star rating (no JS). Stars are laid out 5→1 in the DOM and
   reversed visually, so `input:checked ~ label` fills the checked star and the
   ones to its left. Nothing is recorded until the form is submitted. */
.fbrate { display: inline-flex; flex-direction: row-reverse; justify-content: center; margin: 2px 0 4px; }
.fbrate input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fbrate label {
  font-size: 3rem; line-height: 1; color: var(--line); cursor: pointer;
  padding: 0 4px; transition: color 0.12s, transform 0.12s;
}
.fbrate input:checked ~ label { color: #f5a623; }
.fbrate label:hover, .fbrate label:hover ~ label { color: #f5a623; }
.fbrate label:hover { transform: scale(1.12); }
.fbrate input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.fb__flash { color: var(--brand); font-weight: 600; margin: 0 0 14px; }
.fb__form { display: flex; flex-direction: column; gap: 18px; margin-top: 14px; text-align: left; }
.fb__q { text-align: left; }
.fb__q--rating { text-align: center; }
.fb__qlabel { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 8px; }
.fb__req { color: var(--brand); }
.fb__field, .fb__comment {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px;
  font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--bg);
}
.fb__comment { resize: vertical; }
.fb__field:focus, .fb__comment:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fb__choices { display: flex; flex-wrap: wrap; gap: 8px; }
.fb__choice {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 0.92rem; transition: all 0.12s;
}
.fb__choice input { accent-color: var(--brand); margin: 0; }
.fb__choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.fb__btn {
  width: 100%; background: var(--brand); color: var(--brand-ink); border: none;
  border-radius: 12px; padding: 14px 22px; font-size: 1.02rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 20px -8px var(--brand); transition: filter 0.12s, transform 0.06s;
}
.fb__btn:hover { filter: brightness(1.06); }
.fb__btn:active { transform: translateY(1px); }
.fb__foot { margin: 18px 0 0; font-size: 0.85rem; }
.fb__errors {
  text-align: left; margin: 0; padding: 11px 14px 11px 30px; list-style: disc;
  background: #fdeaea; border: 1px solid #f2c9c6; border-radius: 11px; color: #b3261e; font-size: 0.9rem;
}
.fb__errors li + li { margin-top: 3px; }

/* Paged (sectioned) survey: one step per section, Back / Next / Submit.
   Without JS every step shows (single scroll) and only Submit is offered; the
   .js-paged class (added by survey.js) turns it into a wizard. */
.fb__step { display: flex; flex-direction: column; gap: 18px; text-align: left; }
.fb__step + .fb__step { margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--line); }
.fb__form--paged.js-paged .fb__step { display: none; }
.fb__form--paged.js-paged .fb__step.is-active { display: flex; }
.fb__form--paged.js-paged .fb__step + .fb__step { margin-top: 0; padding-top: 0; border-top: none; }
.fb__step-title { font-size: 1.1rem; font-weight: 700; margin: 0; color: var(--ink); }
.fb__step-intro { font-size: 0.92rem; color: var(--muted, #6b6054); margin: -6px 0 0; }
.fb__nav { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.fb__nav .fb__btn { width: auto; flex: 0 0 auto; padding: 12px 22px; }
.fb__nav [data-nav="next"], .fb__nav [data-nav="submit"] { margin-left: auto; }
.fb__progress { flex: 1; text-align: center; font-size: 0.85rem; color: var(--muted, #6b6054); }
.fb__btn--ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
  box-shadow: none; font-weight: 600;
}
.fb__btn--ghost:hover { filter: none; background: var(--brand-soft); }
/* No-JS fallback: hide the wizard controls, keep only Submit. */
.fb__form--paged:not(.js-paged) [data-nav="prev"],
.fb__form--paged:not(.js-paged) [data-nav="next"],
.fb__form--paged:not(.js-paged) .fb__progress { display: none; }

@media (max-width: 520px) {
  html, body { font-size: 16px; }
  .tf__stage { padding: 20px 16px; }
  .tf__q { font-size: 1.2rem; margin-bottom: 18px; }
  .tf__say { font-size: 0.95rem; margin-bottom: 16px; }
  .tf__field { font-size: 1.05rem; }
  .tf__article-title { font-size: 0.98rem; }
  .tf__article-text { font-size: 0.85rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110d;
    --panel: #1d1813;
    --ink: #f3ece3;
    --ink-soft: #b3a596;
    --line: #342c22;
    --brand: #ff7a1f;
    --accent: #ff9c38;
    --brand-soft: #2a1d10;
    --brand-ink: #1a1206;
  }
  .tf__article { background: #221b13; }
  /* Swap the dark-on-light logo for the white one on dark backgrounds. */
  .tf__logo--light, .fb__logo--light, .cc__logo--light, .tstp__logo--light { display: none; }
  .tf__logo--dark, .fb__logo--dark, .cc__logo--dark, .tstp__logo--dark { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .tf__card, .tf__progress-bar { transition: none; }
  .cc, .cc__card { animation: none; }
  .tf__dot { animation: none; }
}

/* --- Public testimonials page (/testimonials) ----------------------------- */
.tstp { max-width: 1080px; margin: 0 auto; padding: 40px 20px 60px; }
.tstp__top { display: flex; justify-content: center; margin-bottom: 22px; }
.tstp__logo { height: 28px; width: auto; }
.tstp__logo--dark { display: none; }
.tstp__title { text-align: center; font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; color: var(--ink); }
.tstp__sub { text-align: center; color: var(--ink-soft); margin: 0 auto 28px; max-width: 40rem; line-height: 1.5; }
.tstp__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 26px; }
.tstp__card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 18px;
  box-shadow: 0 10px 30px -22px rgba(30, 20, 10, 0.4); }
.tstp__stars { color: #f5a623; font-size: 1.05rem; letter-spacing: 2px; margin-bottom: 10px; }
.tstp__stars-off { color: var(--line); }
.tstp__quote { margin: 0; font-size: 1.05rem; line-height: 1.55; font-style: italic; color: var(--ink); }
.tstp__quote::before { content: "\201C"; }
.tstp__quote::after { content: "\201D"; }
.tstp__by { margin-top: 14px; font-weight: 700; font-size: 0.9rem; color: var(--ink-soft); }
.tstp__empty { text-align: center; color: var(--ink-soft); padding: 48px 0; }
