/* ==========================================================================
   Testimonic - dashboard, auth, admin and marketing styles (on top of Bootstrap 5)
   ========================================================================== */

body { font-family: var(--font-sans); background: var(--surface-page); color: var(--text-primary); font-size: var(--fs-body); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { text-decoration: none; }
h1, h2, h3, h4, h5 { letter-spacing: var(--ls-snug); font-weight: var(--fw-semibold); line-height: var(--lh-heading); }
.btn { border-radius: var(--radius-sm); font-weight: 500; }
.btn-primary { --bs-btn-bg: var(--fr-primary); --bs-btn-border-color: var(--fr-primary); --bs-btn-hover-bg: var(--fr-primary-600); --bs-btn-hover-border-color: var(--fr-primary-600); --bs-btn-active-bg: var(--fr-primary-600); --bs-btn-active-border-color: var(--fr-primary-600); --bs-btn-disabled-bg: var(--fr-primary); --bs-btn-disabled-border-color: var(--fr-primary); }
.btn-outline-primary { --bs-btn-color: var(--fr-primary); --bs-btn-border-color: var(--fr-primary); --bs-btn-hover-bg: var(--fr-primary); --bs-btn-hover-border-color: var(--fr-primary); --bs-btn-active-bg: var(--fr-primary); --bs-btn-active-border-color: var(--fr-primary); }
/* Button system: five roles, one language. Primary = filled brand; Secondary = btn-light (bordered neutral);
   Ghost = btn-ghost (transparent, fills on hover); Danger = btn-danger; Link = btn-link. */
.btn-light, .btn-secondary { --bs-btn-bg: var(--surface); --bs-btn-color: var(--text-primary); --bs-btn-border-color: var(--border); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: var(--border-strong); --bs-btn-hover-color: var(--text-primary); --bs-btn-active-bg: var(--surface-3); --bs-btn-active-border-color: var(--border-strong); }
.btn-ghost { --bs-btn-bg: transparent; --bs-btn-color: var(--text-secondary); --bs-btn-border-color: transparent; --bs-btn-hover-bg: var(--surface-3); --bs-btn-hover-border-color: transparent; --bs-btn-hover-color: var(--text-primary); --bs-btn-active-bg: var(--surface-3); }
.btn-danger { --bs-btn-bg: var(--danger); --bs-btn-border-color: var(--danger); --bs-btn-hover-bg: var(--danger-ink); --bs-btn-hover-border-color: var(--danger-ink); --bs-btn-active-bg: var(--danger-ink); --bs-btn-active-border-color: var(--danger-ink); --bs-btn-disabled-bg: var(--danger); --bs-btn-disabled-border-color: var(--danger); }
.btn-outline-danger { --bs-btn-color: var(--danger); --bs-btn-border-color: var(--danger); --bs-btn-hover-bg: var(--danger); --bs-btn-hover-border-color: var(--danger); }
.btn-link { --bs-btn-color: var(--primary); --bs-btn-hover-color: var(--primary-hover); font-weight: var(--fw-medium); text-decoration: none; }
.btn-link:hover { text-decoration: underline; }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--fr-line); font-size: var(--fs-body); }
.form-control:focus, .form-select:focus { border-color: var(--fr-primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.form-label { font-weight: 500; font-size: var(--fs-small); color: var(--fr-ink-2); margin-bottom: 4px; }
.form-text { font-size: var(--fs-caption); }
.form-check-input:checked { background-color: var(--fr-primary); border-color: var(--fr-primary); }
.card { border: 1px solid var(--fr-line); border-radius: var(--fr-radius); box-shadow: var(--fr-shadow); background: var(--fr-card); }
.card-header { background: transparent; border-bottom: 1px solid var(--fr-line); font-weight: 600; padding: 14px 18px; }
.card-body { padding: 18px; }
.badge { font-weight: 500; border-radius: var(--radius-sm); padding: .35em .55em; font-size: var(--fs-caption); }
.badge-soft { background: var(--surface-3); color: var(--fr-ink-2); }
.badge-soft-success { background: var(--success-soft); color: var(--success-ink); }
.badge-soft-warning { background: var(--c-amber-100); color: var(--warning-ink); }
.badge-soft-danger { background: var(--danger-soft); color: var(--danger-ink); }
.badge-soft-info { background: var(--info-soft); color: var(--info-ink); }
.badge-soft-primary { background: var(--fr-primary-50); color: var(--fr-primary-600); }
.text-muted { color: var(--fr-muted) !important; }
.table { --bs-table-color: var(--fr-ink); font-size: var(--fs-body); margin-bottom: 0; }
.table th { font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: .04em; color: var(--fr-muted); font-weight: 600; border-bottom-width: 1px; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.modal-content { border-radius: var(--radius-md); border: 1px solid var(--fr-line); }
.modal-header { border-bottom: 1px solid var(--fr-line); }
.modal-footer { border-top: 1px solid var(--fr-line); }
.dropdown-menu { border-radius: var(--radius-md); border-color: var(--fr-line); box-shadow: var(--shadow-md); font-size: var(--fs-body); }
.nav-tabs .nav-link { color: var(--fr-muted); border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--fr-primary); border-bottom-color: var(--fr-primary); background: transparent; }
.nav-tabs { border-bottom: 1px solid var(--fr-line); }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- dashboard layout */
.fr-shell { display: flex; min-height: 100vh; }
/* Sidebar is pinned to the viewport; only the page column scrolls. */
.fr-sidebar { width: 240px; flex: 0 0 240px; background: var(--fr-sidebar); color: var(--fr-sidebar-ink); position: fixed; left: 0; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; z-index: var(--z-sticky); }
.fr-sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: var(--surface); font-weight: 700; font-size: var(--fs-h4); }
.fr-sidebar .brand .logo { width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--fr-primary); display: inline-flex; align-items: center; justify-content: center; }
.fr-sidebar .org { margin: 0 12px 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--hover-on-dark); font-size: var(--fs-small); }
.fr-sidebar .org .name { color: var(--surface); font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-sidebar .org .plan { color: var(--c-slate-400); font-size: var(--fs-caption); }
.fr-nav { list-style: none; margin: 0; padding: 4px 12px; }
.fr-nav .label { font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 12px 10px 4px; }
.fr-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--fr-sidebar-ink); font-size: var(--fs-body); }
.fr-nav a i { width: 18px; text-align: center; font-size: var(--fs-body); opacity: .85; }
.fr-nav a:hover { background: var(--hover-on-dark); color: var(--surface); }
.fr-nav a.active { background: var(--primary-veil); color: var(--surface); }
.fr-nav .count { margin-left: auto; font-size: var(--fs-caption); background: var(--danger); color: var(--surface); border-radius: var(--radius-pill); padding: 1px 7px; }
.fr-sidebar .foot { margin-top: auto; padding: 14px 18px; font-size: var(--fs-caption); color: var(--c-slate-400); }
.fr-sidebar .foot a, .sidebar-signout { color: var(--text-on-dark); text-decoration: underline; }
.fr-sidebar .foot a:hover { color: var(--surface); }
.fr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; margin-left: 240px; }
.fr-topbar { height: 58px; background: var(--surface); border-bottom: 1px solid var(--fr-line); display: flex; align-items: center; gap: 12px; padding: 0 20px; position: sticky; top: 0; z-index: 20; }
.fr-topbar .title { font-weight: 600; font-size: var(--fs-h4); }
.fr-topbar .spacer { flex: 1; }
.fr-topbar .user { display: flex; align-items: center; gap: 8px; color: var(--fr-ink); }
.fr-topbar .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--fr-primary-50); color: var(--fr-primary-600); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: var(--fs-small); }
.state-badge { font-size: var(--fs-caption); padding: .45em .7em; white-space: nowrap; }
.app-main, .fr-content { padding: 22px 24px 40px; width: 100%; }
.ob-concierge { background: var(--primary-soft); border-color: var(--primary-soft-2); }
.ob-concierge i { color: var(--primary); font-size: 20px; }
.home-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.home-num { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-sm); }
.home-num .k { font-size: var(--fs-small); color: var(--text-muted); font-weight: var(--fw-medium); }
.home-num .v { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); margin: 4px 0 2px; }
.home-num .v .star-ico { color: var(--star); font-size: .6em; margin-left: 4px; vertical-align: .15em; }
.home-num .d { font-size: var(--fs-caption); color: var(--text-muted); }
.home-numbers.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 991.98px) { .home-numbers.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .home-numbers, .home-numbers.four { grid-template-columns: 1fr; } }
.next-card { border-color: var(--primary-soft-2); background: var(--primary-soft); }
.next-ico { width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 44px; }
.home-recent .stars { color: var(--star); letter-spacing: 1px; }
.tp-head { display: flex; gap: var(--space-4); align-items: center; }
.tp-logo, .tp-mark { width: 72px; height: 72px; border-radius: var(--radius-lg); object-fit: cover; flex: 0 0 72px; }
.tp-mark { color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: var(--fw-bold); }
.tp-stars, .tp-card-stars { color: var(--star); letter-spacing: 1px; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); }
.tp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: var(--space-2); }
.tp-card-text { margin: 0; font-size: var(--fs-body-lg); line-height: var(--lh-body); flex: 1; }
.tp-card-meta { font-size: var(--fs-small); color: var(--text-muted); }
.tp-embed { padding: var(--space-4) 0; }
body.auth-body .tp-embed .container { max-width: none; padding: 0 var(--space-4); }
.tm-row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3); align-items: start; padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.tm-row.hidden-row { opacity: .55; }
.tm-text { margin: 4px 0; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-sm); }
.side-card ul li + li { margin-top: 6px; }
.script-quote { border-left: 4px solid var(--primary); background: var(--primary-soft); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: var(--fs-body-lg); margin: 0 0 var(--space-4); }
.sample-list { display: grid; gap: var(--space-3); margin: 0 0 var(--space-4); }
.sample-list .sample { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.sample-list .sample p { margin: 6px 0 0; }
.industry-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.industry-links a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text-primary); text-decoration: none; font-weight: var(--fw-medium); font-size: var(--fs-small); min-height: 40px; }
.industry-links a:hover { border-color: var(--primary); color: var(--primary); }
.industry-links i { color: var(--primary); width: 18px; text-align: center; }
.hub-card { text-decoration: none; color: inherit; transition: box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.hub-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); color: inherit; }
.hub-card .card-body { display: flex; flex-direction: column; gap: 6px; }
.hub-card i { font-size: 20px; color: var(--primary); }
.hub-card strong { font-size: var(--fs-h4); }
.hub-card span { font-size: var(--fs-small); color: var(--text-muted); line-height: var(--lh-body); }
.page-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 var(--space-4); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs button { border: 0; background: none; padding: 10px 14px; min-height: 40px; font: inherit; font-weight: var(--fw-semibold); color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; border-radius: var(--radius-sm) var(--radius-sm) 0 0; transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.page-tabs button:hover, .page-tabs .tab-link:hover { color: var(--text-primary); background: var(--surface-2); }
.page-tabs .tab-link { display: inline-flex; align-items: center; padding: 10px 14px; min-height: 40px; font-weight: var(--fw-semibold); color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.page-tabs .tab-link.active { color: var(--primary); border-bottom-color: var(--primary); }
.page-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.page-tabs button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.tab-badge { display: inline-block; font-size: var(--fs-caption); font-weight: var(--fw-semibold); padding: 2px 7px; border-radius: var(--radius-pill); background: var(--surface-3); color: var(--text-secondary); margin-left: 4px; vertical-align: 1px; }
.tab-badge.ok { background: var(--success-soft); color: var(--success-ink); }
.tab-badge.warn { background: var(--warning-soft); color: var(--warning-ink); }
.tab-badge.danger { background: var(--danger-soft); color: var(--danger-ink); }
.page-head, .fr-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1, .fr-page-head h1 { font-size: var(--fs-h1); margin: 0 0 2px; }
.page-head p, .fr-page-head p { margin: 0; color: var(--fr-muted); }
.page-head .actions, .fr-page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.verify-banner { display: flex; gap: 12px; align-items: flex-start; background: var(--warning-soft); border-bottom: 1px solid var(--c-amber-200); color: var(--warning-ink); padding: 12px 20px; font-size: var(--fs-body); line-height: 1.5; }
.verify-banner i { color: var(--warning); margin-top: 3px; }
.verify-banner a { color: var(--warning-ink); font-weight: 600; text-decoration: underline; margin-left: 6px; white-space: nowrap; }
.menu-toggle { display: none; }
@media (max-width: 991.98px) {
  .fr-sidebar { bottom: 0; z-index: 1045; transform: translateX(-100%); transition: transform var(--fr-med) var(--fr-ease); }
  .fr-main { margin-left: 0; }
  .fr-sidebar.open { transform: none; box-shadow: 0 0 0 100vmax var(--overlay); }
  .menu-toggle { display: inline-flex; }
  .app-main, .fr-content { padding: 16px 16px 32px; }
  .fr-topbar .state-badge { display: none; }
  body.nav-open { overflow: hidden; }
}

/* ---------------------------------------------------------------- KPIs & charts */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--fr-line); border-radius: var(--fr-radius); padding: 14px 16px; box-shadow: var(--fr-shadow); }
.kpi .k { font-size: var(--fs-caption); color: var(--fr-muted); font-weight: 500; }
.kpi .v { font-size: var(--fs-h1); font-weight: 600; letter-spacing: -.02em; margin-top: 2px; line-height: 1.2; }
.kpi .d { font-size: var(--fs-caption); color: var(--fr-muted); margin-top: 2px; }
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 200px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: var(--fs-small); margin: 6px 0; }
.bar-row .lbl { width: 120px; flex: 0 0 120px; color: var(--fr-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bar { flex: 1; height: 8px; background: var(--surface-3); border-radius: var(--radius-pill); overflow: hidden; }
.bar-row .bar > span { display: block; height: 100%; background: var(--fr-primary); border-radius: var(--radius-pill); }
.bar-row .bar > span.warn { background: var(--warning); }
.bar-row .n { width: 40px; text-align: right; color: var(--fr-muted); font-variant-numeric: tabular-nums; }
.stars-inline { color: var(--star); letter-spacing: 1px; font-size: var(--fs-small); white-space: nowrap; }

/* ---------------------------------------------------------------- account state card */
.state-card { border-radius: var(--fr-radius); border: 1px solid var(--fr-line); background: var(--surface); padding: 18px; box-shadow: var(--fr-shadow); }
.state-card.trial { border-left: 4px solid var(--info); }
.state-card.active { border-left: 4px solid var(--success); }
.state-card.expired { border-left: 4px solid var(--danger); }
.state-card .lead-line { font-size: var(--fs-h3); font-weight: 600; margin-bottom: 2px; }
.state-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--fr-line); font-size: var(--fs-body); }
.state-row:first-of-type { border-top: 0; }
.state-row i { width: 20px; text-align: center; }

/* ---------------------------------------------------------------- misc components */
.empty { text-align: center; padding: 40px 20px; color: var(--fr-muted); }
.empty i { font-size: 28px; color: var(--border-strong); margin-bottom: 10px; display: block; }
.empty h3 { font-size: var(--fs-h4); color: var(--fr-ink); margin-bottom: 4px; }
.app-flash { position: fixed; top: 14px; right: 14px; z-index: 2000; padding: 10px 14px; border-radius: var(--radius-sm); font-size: var(--fs-body); box-shadow: var(--shadow-lg); background: var(--surface); border: 1px solid var(--fr-line); max-width: min(92vw, 420px); animation: flashIn var(--dur-med) var(--fr-ease); }
.app-flash-success { border-left: 4px solid var(--success); }
.app-flash-danger { border-left: 4px solid var(--danger); }
.app-flash-warning { border-left: 4px solid var(--warning); }
.app-flash-info { border-left: 4px solid var(--info); }
@keyframes flashIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--radius-pill); border: 1px solid var(--fr-line); background: var(--surface); font-size: var(--fs-small); transition: background-color var(--fr-fast), border-color var(--fr-fast), transform var(--fr-fast); }
.chip.off { opacity: .5; text-decoration: line-through; }
.chip .x { cursor: pointer; color: var(--fr-muted); }
.chip:active { transform: scale(.97); }
.qr-thumb { width: 96px; height: 96px; border: 1px solid var(--fr-line); border-radius: var(--radius-sm); background: var(--surface); padding: 4px; }
.qr-thumb-link { flex: 0 0 96px; }
.qr-thumb-link img { transition: transform var(--fr-med) var(--fr-ease); }
.qr-thumb-link:hover img { transform: scale(1.04); }
.min-w-0 { min-width: 0 !important; }
.qr-link { display: flex; align-items: center; gap: 4px; min-width: 0; position: relative; }
.qr-link .code-pill { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; }
.qr-link .code-pill::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 5; background: var(--text-primary); color: var(--surface); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-caption); padding: 6px 10px; border-radius: var(--radius-sm); white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity var(--fr-fast) var(--fr-ease), transform var(--fr-fast) var(--fr-ease); }
.qr-link .code-pill:hover::after, .qr-link .code-pill:focus-visible::after { opacity: 1; transform: none; }
.code-pill { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-caption); background: var(--surface-3); padding: 2px 8px; border-radius: var(--radius-sm); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--fr-line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--fr-primary); }
.timeline li time { font-size: var(--fs-caption); color: var(--fr-muted); display: block; }
.color-swatch { width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--fr-line); }
.preview-phone { width: 100%; max-width: 320px; border: 8px solid var(--text-primary); border-radius: var(--radius-xl); overflow: hidden; background: var(--surface); aspect-ratio: 9/17; }
.preview-phone iframe { width: 100%; height: 100%; border: 0; }
.steps { display: flex; gap: 6px; margin-bottom: 20px; }
.steps span { flex: 1; height: 4px; border-radius: var(--radius-pill); background: var(--fr-line); }
.steps span.done { background: var(--fr-primary); }
.note-body { white-space: pre-wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.price-card { border: 1px solid var(--fr-line); border-radius: var(--radius-md); padding: 24px; background: var(--surface); height: 100%; }
.price-card.current { border-color: var(--fr-primary); box-shadow: 0 0 0 3px var(--primary-veil-soft); }
.price-card .price { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.price-card .price small { font-size: var(--fs-body); color: var(--fr-muted); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 16px 0; font-size: var(--fs-body); }
.price-card ul li { padding: 5px 0; display: flex; gap: 10px; }
.price-card ul li i { color: var(--fr-primary); margin-top: 3px; }
.channel-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.channel-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 1px solid var(--fr-line); border-radius: var(--radius-md); cursor: pointer; font-size: var(--fs-small); transition: border-color var(--fr-fast), background-color var(--fr-fast), transform var(--fr-fast); }
.channel-opt input { position: absolute; opacity: 0; pointer-events: none; }
.channel-opt i { font-size: var(--fs-h3); color: var(--fr-muted); transition: color var(--fr-fast); }
.channel-opt:has(input:checked) { border-color: var(--fr-primary); background: var(--fr-primary-50); }
.channel-opt:has(input:checked) i { color: var(--fr-primary-600); }
.channel-opt:active { transform: scale(.98); }
.placement { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--fr-line); border-radius: var(--radius-md); height: 100%; font-size: var(--fs-small); }
.placement i { font-size: var(--fs-h3); color: var(--fr-primary-600); margin-bottom: 4px; }
.placement span { color: var(--fr-muted); }
.step-pills { display: inline-flex; border: 1px solid var(--fr-line); border-radius: var(--radius-pill); padding: 3px; background: var(--surface); }
.step-pills button { border: 0; background: transparent; padding: 6px 12px; border-radius: var(--radius-pill); font: inherit; font-size: var(--fs-small); color: var(--fr-muted); transition: background-color var(--fr-fast), color var(--fr-fast); }
.step-pills button.active { background: var(--fr-ink); color: var(--surface); }
.log-pre { white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; font-size: var(--fs-caption); }

/* ---------------------------------------------------------------- auth pages */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--fr-line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--fr-shadow); }
.auth-card .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--fs-h3); margin-bottom: 18px; color: var(--fr-ink); }
.auth-card .brand .logo { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--fr-primary); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; }
.auth-card h1 { font-size: var(--fs-h1); margin-bottom: 4px; }
.auth-or { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) 0 var(--space-4); color: var(--text-muted); font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------------------------------------------------------------- onboarding & place search */
.ob-enter { animation: obEnter var(--fr-med) var(--fr-ease); }
@keyframes obEnter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.qr-reveal { display: inline-block; animation: qrReveal var(--dur-slow) var(--fr-ease); }
@keyframes qrReveal { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.03); opacity: 1; } 100% { transform: scale(1); } }
.ps-box { position: relative; }
.ps-field { position: relative; }
.ps-field .ps-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--fr-muted); }
.ps-field .form-control { padding-left: 42px; padding-right: 40px; }
.ps-spinner { position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 2px solid var(--fr-line); border-top-color: var(--fr-primary); border-radius: 50%; opacity: 0; transition: opacity var(--fr-fast); animation: spin .8s linear infinite; }
.ps-box.is-searching .ps-spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.ps-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--fr-line); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); overflow: hidden; animation: obEnter var(--fr-fast) var(--fr-ease); }
.ps-item { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--surface); border: 0; border-bottom: 1px solid var(--fr-line); padding: 12px 14px; cursor: pointer; font: inherit; color: var(--fr-ink); transition: background-color var(--fr-fast); }
.ps-item:last-child { border-bottom: 0; }
.ps-item:hover, .ps-item.active { background: var(--surface-3); }
.ps-pin { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--fr-primary-50); color: var(--fr-primary-600); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; }
.ps-text { display: flex; flex-direction: column; min-width: 0; }
.ps-text small { color: var(--fr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-status { font-size: var(--fs-small); margin-top: 8px; color: var(--fr-ink-2); }
.ps-status.ps-muted { color: var(--fr-muted); }
.ps-status.ps-error { color: var(--danger-ink); }
.ps-manual-highlight { font-weight: 600; text-decoration: underline; }
.ob-place { display: flex; gap: 12px; align-items: center; border: 1px solid var(--fr-line); border-radius: var(--radius-md); padding: 12px 14px; background: var(--surface-2); transform: translateY(6px); opacity: 0; transition: transform var(--fr-med) var(--fr-ease), opacity var(--fr-med) var(--fr-ease), border-color var(--fr-med); }
.ob-place.locked { transform: none; opacity: 1; border-color: var(--fr-primary); }
.ob-place-pin { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--fr-line); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; font-size: var(--fs-h3); }
.ob-place-body { flex: 1; min-width: 0; }
/* Verify step: the recommended route gets a brand ring; sample reviews sit in a dashed box. */
.ob-verify-primary { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-veil-soft); }
.sample-card { border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-2); padding: var(--space-3) var(--space-4); }
.sample { margin: 0; padding: var(--space-3); border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-small); line-height: var(--lh-body); color: var(--text-secondary); }
.sample + .sample { margin-top: var(--space-2); }
.sample::before { content: "\2605\2605\2605\2605\2605"; display: block; color: var(--star); font-size: var(--fs-caption); letter-spacing: 1px; margin-bottom: 2px; }
/* Ready step: "See it as your customer" phone frame. */
.ob-try { border-top: 1px solid var(--border); padding-top: var(--space-5); }
.ob-try .preview-phone { max-width: 280px; margin: 0 auto; box-shadow: var(--shadow-md); }
/* Floating help button (owner pages only). 48px tall, bottom-right, clear of the top-right toasts. */
.help-fab { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: var(--z-dropdown); display: inline-flex; align-items: center; gap: var(--space-2); height: 48px; padding: 0 var(--space-5) 0 var(--space-4); border-radius: var(--radius-pill); background: var(--secondary); color: var(--on-secondary); font-weight: var(--fw-semibold); font-size: var(--fs-small); box-shadow: var(--shadow-lg); white-space: nowrap; transition: transform var(--fr-fast) var(--fr-ease), box-shadow var(--fr-fast) var(--fr-ease); }
.help-fab.wa { background: var(--success); }
.help-fab i { font-size: var(--fs-h3); }
.help-fab:hover, .help-fab:focus-visible { color: var(--on-secondary); transform: translateY(-2px); box-shadow: var(--shadow-xl); }
/* Leave room under the page content so the button never covers the last row or the footer link. */
body:has(.help-fab) .app-main, body:has(.help-fab) .auth-wrap { padding-bottom: 88px; }
@media (max-width: 575.98px) { .help-fab { right: var(--space-3); bottom: var(--space-3); } }
body.nav-open .help-fab { display: none; }
@media print { .help-fab { display: none !important; } }
/* Dashboard "Getting started" checklist (shown until the first five real scans). */
.gs-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.gs-head .h5 { margin: 0; }
.gs-count { font-size: var(--fs-small); color: var(--text-muted); white-space: nowrap; }
.gs-progress { height: 6px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; margin: var(--space-3) 0 var(--space-2); }
.gs-progress > span { display: block; height: 100%; background: var(--primary); border-radius: var(--radius-pill); transition: width var(--dur-slow) var(--ease); }
.gs-list { list-style: none; margin: 0; padding: 0; }
.gs-item { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.gs-item:first-child { border-top: 0; }
.gs-check { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; border: 2px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; color: transparent; font-size: var(--fs-caption); background: var(--surface); }
.gs-item.done .gs-check { background: var(--success); border-color: var(--success); color: var(--on-primary); }
.gs-item.done .gs-title { color: var(--text-muted); text-decoration: line-through; }
.gs-body { flex: 1 1 160px; min-width: 0; }
.gs-title { font-weight: var(--fw-medium); }
.gs-sub { font-size: var(--fs-caption); color: var(--text-muted); }
.gs-item .btn { flex: none; }
.state-compact .state-row { padding: 6px 0; font-size: var(--fs-small); }

/* ---------------------------------------------------------------- marketing site */
.site-nav { background: var(--surface); border-bottom: 1px solid var(--fr-line); }
.site-nav .navbar-brand { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.site-nav .navbar-brand .logo { width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--fr-primary); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; }
.site-nav .nav-link { color: var(--fr-ink-2); font-weight: 500; }
.site-nav .nav-link.active { color: var(--fr-primary); }
.hero { padding: 72px 0 48px; background: linear-gradient(180deg, var(--surface) 0%, var(--fr-bg) 100%); }
.hero h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.12; letter-spacing: -.02em; }
.hero .lead { font-size: var(--fs-h3); color: var(--fr-ink-2); }
.eyebrow { display: inline-block; font-size: var(--fs-caption); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fr-primary); margin-bottom: 10px; }
.section { padding: 56px 0; }
.section h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; }
.feature { padding: 22px; border: 1px solid var(--fr-line); border-radius: var(--radius-md); background: var(--surface); height: 100%; }
.feature .ic { width: 38px; height: 38px; border-radius: var(--radius-md); background: var(--fr-primary-50); color: var(--fr-primary-600); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-h4); margin-bottom: 12px; }
.feature h3 { font-size: var(--fs-h4); }
.feature p { color: var(--fr-muted); font-size: var(--fs-body); margin: 0; }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--fr-ink); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; margin-bottom: 10px; }
.mock-phone { border: 8px solid var(--text-primary); border-radius: var(--radius-xl); background: var(--surface); padding: 18px 16px; max-width: 320px; margin: 0 auto; box-shadow: var(--shadow-xl); }
.mock-phone .m-stars { display: flex; gap: 6px; margin: 10px 0; }
.mock-phone .m-stars span { flex: 1; aspect-ratio: 1; border-radius: var(--radius-md); background: var(--c-amber-100); display: flex; align-items: center; justify-content: center; color: var(--star); }
.mock-phone .m-chip { display: inline-block; font-size: var(--fs-caption); padding: 5px 10px; border-radius: var(--radius-pill); border: 1px solid var(--fr-line); margin: 3px 2px; }
.mock-phone .m-chip.on { background: var(--fr-primary); color: var(--surface); border-color: var(--fr-primary); }
.mock-phone .m-opt { border: 1px solid var(--fr-line); border-radius: var(--radius-md); padding: 8px 10px; font-size: var(--fs-caption); margin-top: 8px; line-height: 1.4; }
.mock-phone .m-opt.on { border-color: var(--fr-primary); box-shadow: 0 0 0 2px var(--primary-veil-soft); }
.mock-phone .m-btn { background: var(--fr-primary); color: var(--surface); border-radius: var(--radius-md); padding: 10px; text-align: center; font-size: var(--fs-small); font-weight: 600; margin-top: 10px; }
.faq details { border: 1px solid var(--fr-line); border-radius: var(--radius-md); padding: 14px 18px; background: var(--surface); margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--fr-ink-2); margin: 10px 0 0; font-size: var(--fs-body); }
.site-footer { border-top: 1px solid var(--fr-line); padding: 32px 0; color: var(--fr-muted); font-size: var(--fs-body); background: var(--surface); }
.site-footer a { color: var(--fr-ink-2); }
.cta-band { background: var(--fr-ink); color: var(--surface); border-radius: var(--radius-lg); padding: 40px 28px; }
.cta-band h2 { color: var(--surface); }
.legal h2 { font-size: var(--fs-h3); margin-top: 26px; }
.legal p, .legal li { color: var(--fr-ink-2); }

/* ---------------------------------------------------------------- landing: mockups */
.mockups { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; align-items: flex-end; }
.mock { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--surface); border: 1px solid var(--fr-line); box-shadow: var(--shadow-md); color: var(--fr-muted); font-size: var(--fs-caption); }
.mock-qr { width: 54px; height: 54px; background: repeating-linear-gradient(90deg, var(--text-primary) 0 6px, transparent 6px 12px), repeating-linear-gradient(0deg, var(--text-primary) 0 6px, transparent 6px 12px); border: 2px solid var(--text-primary); border-radius: 4px; opacity: .85; }
.mock-qr.small { width: 36px; height: 36px; }
.mock.tent { width: 120px; height: 150px; border-radius: var(--radius-sm); clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); }
.mock.card-m { width: 150px; height: 120px; border-radius: var(--radius-md); }
.mock.sticker { width: 110px; height: 110px; border-radius: 50%; border: 3px dashed var(--fr-primary); }
.mock.nfc { width: 160px; height: 100px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--text-primary), var(--c-slate-900)); color: var(--border-strong); } .mock.nfc i { font-size: var(--fs-h1); transform: rotate(90deg); color: var(--surface); }
.mock.receipt { width: 100px; height: 170px; border-radius: 4px; justify-content: flex-start; padding-top: 14px; } .mock.receipt .lines { width: 70%; height: 40px; background: repeating-linear-gradient(0deg, var(--border) 0 3px, transparent 3px 9px); }

/* ---------------------------------------------------------------- landing: interactive demo */
.demo { max-width: 460px; margin: 0 auto; }
.demo-dots { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 12px; }
.demo-dots span { flex: 1; text-align: center; font-size: var(--fs-caption); color: var(--fr-muted); padding-top: 10px; position: relative; }
.demo-dots span::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: var(--radius-pill); background: var(--fr-line); transition: background-color var(--fr-med); }
.demo-dots span.active::before, .demo-dots span.done::before { background: var(--fr-primary); }
.demo-dots span.active { color: var(--fr-ink); font-weight: 600; }
.demo-shell { background: var(--surface); border: 8px solid var(--text-primary); border-radius: var(--radius-xl); padding: 16px; box-shadow: var(--shadow-xl); min-height: 420px; }
.demo-phone-top { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--fr-line); padding-bottom: 8px; margin-bottom: 12px; }
.demo-phone-name { font-weight: 700; } .demo-phone-city { font-size: var(--fs-caption); color: var(--fr-muted); }
.demo-pane h3 { font-size: var(--fs-h3); margin-bottom: 10px; }
.demo-enter { animation: obEnter var(--fr-med) var(--fr-ease); }
.demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.demo-cat { display: flex; align-items: center; gap: 10px; border: 1px solid var(--fr-line); background: var(--surface); border-radius: var(--radius-md); padding: 10px 12px; font: inherit; font-size: var(--fs-body); cursor: pointer; text-align: left; transition: border-color var(--fr-fast), background-color var(--fr-fast), transform var(--fr-fast); }
.demo-cat i { width: 20px; text-align: center; color: var(--fr-primary-600); } .demo-cat.on { border-color: var(--fr-primary); background: var(--fr-primary-50); } .demo-cat:active { transform: scale(.98); }
.demo-stars { display: flex; gap: 6px; }
.demo-star { flex: 1; aspect-ratio: 1; border: 1px solid var(--fr-line); background: var(--surface); border-radius: var(--radius-md); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color var(--fr-fast), background-color var(--fr-fast), transform var(--fr-fast); }
.demo-star svg { width: 58%; fill: var(--border-strong); transition: fill var(--fr-fast); } .demo-star.on { border-color: var(--fr-primary); background: var(--primary-soft-2); } .demo-star.on svg { fill: var(--star); }
.demo-star.bump { animation: bump var(--dur-slow) var(--fr-ease); } @keyframes bump { 40% { transform: scale(1.12); } }
.demo-star-label { text-align: center; color: var(--fr-muted); font-size: var(--fs-body); min-height: 22px; margin-top: 8px; }
.demo-note { background: var(--warning-soft); border: 1px solid var(--c-amber-200); border-radius: var(--radius-md); padding: 10px 12px; font-size: var(--fs-small); margin-top: 10px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; } .demo-chips .chip { cursor: pointer; } .demo-chips .chip.on { background: var(--fr-primary); color: var(--surface); border-color: var(--fr-primary); }
.demo-options { display: flex; flex-direction: column; gap: 8px; }
.demo-opt { text-align: left; border: 1px solid var(--fr-line); background: var(--surface); border-radius: var(--radius-md); padding: 10px 12px; font: inherit; font-size: var(--fs-small); line-height: 1.45; cursor: pointer; transition: border-color var(--fr-fast), box-shadow var(--fr-fast); }
.demo-opt.on { border-color: var(--fr-primary); box-shadow: 0 0 0 2px var(--primary-veil-soft); }
.demo-back { background: none; border: 0; color: var(--fr-muted); font-size: var(--fs-small); margin-top: 12px; padding: 0; cursor: pointer; }
.demo-dest { border: 1px solid var(--fr-line); border-radius: var(--radius-md); overflow: hidden; }
.demo-dest-bar { display: flex; align-items: center; gap: 5px; background: var(--surface-3); padding: 8px 10px; font-size: var(--fs-caption); color: var(--fr-muted); } .demo-dest-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); } .demo-dest-bar .url { margin-left: 6px; background: var(--surface); border-radius: var(--radius-pill); padding: 2px 10px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-dest-body { padding: 14px; font-size: var(--fs-small); } .demo-dest-stars { color: var(--star); letter-spacing: 2px; margin: 4px 0; } .demo-dest-text { border: 1px dashed var(--fr-line); border-radius: var(--radius-sm); padding: 10px; background: var(--surface-2); line-height: 1.5; }
.demo-error { color: var(--danger-ink); font-size: var(--fs-small); margin-top: 8px; }

/* ---------------------------------------------------------------- platform admin */
body.admin .fr-sidebar { background: var(--surface-admin); }
body.admin .fr-nav a.active { background: var(--admin-nav-active); }
body.admin .fr-sidebar .brand .logo { background: var(--c-indigo-500); }

/* Buttons never inherit link colour, whatever container they sit in. */
a.btn { color: var(--bs-btn-color); }
a.btn:hover { color: var(--bs-btn-hover-color, var(--bs-btn-color)); }

/* ---------------------------------------------------------------- microinteractions */
.btn { transition: background-color var(--fr-fast) var(--fr-ease), border-color var(--fr-fast) var(--fr-ease), transform var(--fr-fast) var(--fr-ease), box-shadow var(--fr-fast) var(--fr-ease), opacity var(--fr-fast) var(--fr-ease); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible, a:focus-visible, .chip:focus-within, .ps-item:focus-visible { outline: 2px solid var(--fr-primary); outline-offset: 2px; }
.btn.is-success { background: var(--success) !important; border-color: var(--success) !important; color: var(--surface) !important; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.copy-btn.copied, [data-copy].copied { color: var(--success); }
.copy-btn.copied .fa-copy::before, [data-copy].copied .fa-copy::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; }
.card, .kpi, .feature, .price-card { transition: box-shadow var(--fr-med) var(--fr-ease), transform var(--fr-med) var(--fr-ease); }
a.feature:hover, a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.table-hover tbody tr { transition: background-color var(--fr-fast); }

@media print {
  .fr-sidebar, .fr-topbar, .verify-banner, .no-print { display: none !important; }
  .app-main, .fr-content { padding: 0; max-width: none; }
  body { background: var(--surface); }
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- marketing: SEO pages, footer, CTAs */
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--fr-primary); color: var(--surface); padding: 8px 12px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; }
.site-cta { background: var(--fr-primary); color: var(--surface); padding: 56px 0; }
.site-cta h2 { color: var(--surface); font-size: clamp(24px, 3.4vw, 34px); }
.site-cta .lead { color: var(--text-on-primary-muted); max-width: 720px; margin: 12px auto 22px; }
.site-cta .btn-light { color: var(--fr-primary-600); }
.site-cta .btn-outline-secondary { color: var(--surface); border-color: var(--border-on-primary); }
.site-cta .btn-outline-secondary:hover { background: var(--hover-on-primary); color: var(--surface); }
.site-footer { padding: 44px 0 28px; }
.site-footer .navbar-brand { font-weight: 700; display: inline-flex; align-items: center; gap: 10px; color: var(--fr-ink); text-decoration: none; }
.site-footer .navbar-brand .logo { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--fr-primary); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; }
.footer-title { font-size: var(--fs-small); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fr-ink); margin-bottom: 10px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 6px 0; }
.footer-links a:not(.btn) { text-decoration: none; }
.footer-links a:hover { color: var(--fr-primary); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--fr-line); margin-top: 28px; padding-top: 16px; }
.breadcrumb-nav { font-size: var(--fs-small); color: var(--fr-muted); margin-bottom: 14px; }
.breadcrumb-nav a:not(.btn) { color: var(--fr-ink-2); text-decoration: none; }
.breadcrumb-nav a:hover { color: var(--link); }
.breadcrumb-nav span + span::before { content: "/"; margin: 0 8px; color: var(--fr-line); }
.page-hero { padding: 56px 0 32px; background: linear-gradient(180deg, var(--surface) 0%, var(--fr-bg) 100%); }
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; letter-spacing: -.02em; max-width: 820px; }
.page-hero .lead { font-size: var(--fs-h3); color: var(--fr-ink-2); max-width: 760px; }
.prose { max-width: 780px; }
.prose h2 { font-size: clamp(22px, 2.6vw, 28px); margin-top: 40px; margin-bottom: 12px; letter-spacing: -.01em; }
.prose h3 { font-size: var(--fs-h3); margin-top: 26px; margin-bottom: 8px; }
.prose p, .prose li { font-size: var(--fs-h4); line-height: 1.7; color: var(--fr-ink-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose a:not(.btn) { color: var(--link); }
.prose .callout { border-left: 4px solid var(--fr-primary); background: var(--fr-primary-50); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 22px 0; }
.prose .callout p { margin: 0; color: var(--fr-ink); }
.mid-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--fr-line); background: var(--surface); border-radius: var(--radius-lg); padding: 20px 22px; margin: 32px 0; }
.mid-cta strong { display: block; font-size: var(--fs-h3); color: var(--fr-ink); }
.mid-cta span { color: var(--fr-muted); font-size: var(--fs-body); }
.steps-grid { counter-reset: step; }
.step-card { position: relative; padding: 22px 22px 22px 64px; border: 1px solid var(--fr-line); border-radius: var(--radius-md); background: var(--surface); height: 100%; }
.step-card::before { counter-increment: step; content: counter(step); position: absolute; left: 20px; top: 20px; width: 32px; height: 32px; border-radius: 50%; background: var(--fr-primary); color: var(--surface); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-card h3 { font-size: var(--fs-h4); margin-bottom: 6px; }
.step-card p { color: var(--fr-muted); font-size: var(--fs-body); margin: 0; }
.stat-tile { border: 1px solid var(--fr-line); border-radius: var(--radius-md); padding: 18px; background: var(--surface); }
.stat-tile .num { font-size: 26px; font-weight: 700; color: var(--fr-primary-600); letter-spacing: -.02em; }
.stat-tile .lbl { font-size: var(--fs-small); color: var(--fr-muted); }
.post-card { border: 1px solid var(--fr-line); border-radius: var(--radius-md); padding: 22px; background: var(--surface); height: 100%; display: flex; flex-direction: column; transition: transform var(--fr-fast) var(--fr-ease), box-shadow var(--fr-fast) var(--fr-ease); }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.post-card h2 { font-size: var(--fs-h3); }
.post-card h2 a { color: var(--fr-ink); text-decoration: none; }
.post-card .meta { font-size: var(--fs-small); color: var(--fr-muted); margin-bottom: 8px; }
.post-card p { color: var(--fr-ink-2); font-size: var(--fs-body); flex: 1; }
.article-body { max-width: 760px; }
.article-body h2 { font-size: var(--fs-h1); margin-top: 36px; }
.article-body h3 { font-size: var(--fs-h3); margin-top: 24px; }
.article-body p, .article-body li { font-size: var(--fs-h3); line-height: 1.75; color: var(--fr-ink-2); }
.article-body img { border-radius: var(--radius-md); }
.use-case { border: 1px solid var(--fr-line); border-radius: var(--radius-md); padding: 18px; background: var(--surface); height: 100%; }
.use-case h3 { font-size: var(--fs-h4); margin-bottom: 6px; }
.use-case p { font-size: var(--fs-body); color: var(--fr-muted); margin: 0; }
.toc { border: 1px solid var(--fr-line); border-radius: var(--radius-md); padding: 16px 18px; background: var(--surface); font-size: var(--fs-body); }
.toc a { display: block; padding: 3px 0; color: var(--fr-ink-2); text-decoration: none; }
.toc a:hover { color: var(--fr-primary); }
@media (min-width: 992px) { .toc { position: sticky; top: 20px; } }

/* ---------------------------------------------------------------- marketing: microinteractions (restrained, reduced-motion aware) */
/* Scroll reveal: elements marked .reveal fade and rise once, when they enter the viewport. JS adds .in. */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--fr-ease), transform var(--dur-slow) var(--fr-ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-slow) var(--fr-ease), transform var(--dur-slow) var(--fr-ease); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .05s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .1s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .15s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .2s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .25s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .3s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: .35s; }

/* Marketing buttons: a small lift on hover, settle on press (dashboard buttons keep their existing feel). */
.site-body .btn-primary, .site-body .btn-light, .site-cta .btn { transition: background-color var(--fr-fast) var(--fr-ease), border-color var(--fr-fast) var(--fr-ease), transform var(--fr-fast) var(--fr-ease), box-shadow var(--fr-med) var(--fr-ease); }
.site-body .btn-lg:hover:not(:disabled), .site-cta .btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.site-cta .btn-primary:hover:not(:disabled) { box-shadow: 0 10px 24px var(--focus-ring); }

/* Marketing cards lift gently on hover (works for links and plain divs). */
.site-body .feature, .site-body .use-case, .site-body .step-card, .site-body .stat-tile, .site-body .price-card, .site-body .post-card { transition: transform var(--fr-med) var(--fr-ease), box-shadow var(--fr-med) var(--fr-ease), border-color var(--fr-med) var(--fr-ease); }
.site-body .feature:hover, .site-body .use-case:hover, .site-body .step-card:hover, .site-body .stat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--fr-primary-50); }
.site-body a.feature:hover { border-color: var(--fr-primary); }
.site-body .feature .ic { transition: transform var(--fr-med) var(--fr-ease); }
.site-body a.feature:hover .ic { transform: scale(1.08) rotate(-3deg); }

/* Nav links: an underline that grows from the centre on hover / for the active page. */
.site-nav .nav-link { position: relative; }
.site-nav .nav-link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--fr-primary); border-radius: 2px; transform: scaleX(0); transform-origin: center; transition: transform var(--fr-med) var(--fr-ease); }
.site-nav .nav-link:hover::after, .site-nav .nav-link.active::after { transform: scaleX(1); }

/* FAQ: a chevron that rotates when the item opens. */
.faq details { position: relative; }
.faq summary { list-style: none; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; right: 18px; top: 16px; font-size: var(--fs-caption); color: var(--fr-muted); transition: transform var(--fr-med) var(--fr-ease); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details { transition: border-color var(--fr-fast) var(--fr-ease), box-shadow var(--fr-fast) var(--fr-ease); }
.faq details[open] { border-color: var(--fr-primary-50); box-shadow: var(--shadow-md); }

/* Hero mockup: a slow, barely-there float so the page feels alive without being busy. */
.hero .mock-phone { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero .mock-phone .m-chip.on { animation: chipIn var(--dur-slow) var(--fr-ease) both; }

/* Mid-content CTA lifts as a whole on hover. */
.mid-cta { transition: transform var(--fr-med) var(--fr-ease), box-shadow var(--fr-med) var(--fr-ease); }
.mid-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Breadcrumb and footer links: a quick colour ease. */
.footer-links a, .breadcrumb-nav a, .prose a { transition: color var(--fr-fast) var(--fr-ease); }

@keyframes chipIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  .hero .mock-phone { animation: none !important; }
}

/* ---------------------------------------------------------------- smooth scroll + Swup page transitions (marketing) */
html { scroll-behavior: smooth; }
.site-body #swup { will-change: opacity; }
html.is-changing .transition-fade { transition: opacity var(--dur-med) var(--ease); opacity: 1; }
html.is-animating .transition-fade { opacity: 0; }
.swup-progress-bar { position: fixed; top: 0; left: 0; height: 3px; background: var(--primary); z-index: var(--z-flash); transition: width var(--dur-med) var(--ease); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.is-changing .transition-fade { transition: none; opacity: 1; }
}

/* ---------------------------------------------------------------- accessibility: comfortable tap targets (WCAG 2.5.8) */
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-sm { min-height: 34px; }
.btn-lg { min-height: 48px; }
.site-nav .nav-link { padding-top: 10px; padding-bottom: 10px; }
.footer-links a { display: inline-block; padding: 3px 0; }
.faq summary { min-height: 44px; display: flex; align-items: center; }
/* Status is never conveyed by colour alone: pair every state dot/badge with a label or icon. */
.state-card .state-row i, .app-flash::before { flex: none; }

/* ---------------------------------------------------------------- CLS: reserve icon + hero space so late webfont load does not shift layout */
.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands, [class^="fa-"], [class*=" fa-"] { display: inline-block; min-width: 1em; }
@media (min-width: 992px) { .hero .row { min-height: 460px; } }
.mock-phone { contain: layout paint; }

/* link accent (darker green) on card-level links */
a.feature h3 { color: var(--link); }
.post-card h2 a:hover { color: var(--link); }
.eyebrow, .t-eyebrow { color: var(--primary); }

/* ---------------------------------------------------------------- preloader: first-visit splash + top progress bar */
#tm-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 3001; pointer-events: none; opacity: 0; transition: opacity var(--dur-fast) linear; }
#tm-bar.on { opacity: 1; }
#tm-bar span { display: block; height: 100%; width: 100%; background: var(--primary); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform 400ms var(--ease); }
#fr-preloader { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; background: var(--surface-page); transition: opacity 400ms var(--ease), visibility 0s linear 400ms; }
#fr-preloader.is-done { opacity: 0; visibility: hidden; }
.fr-pre-stage { display: flex; align-items: center; gap: 12px; animation: frPreIn 500ms var(--ease) both; }
.fr-pre-mark { display: block; animation: frPreBob 1.1s var(--ease) infinite; }
.fr-pre-word { font-size: 1.375rem; font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); color: var(--text-primary); }
@keyframes frPreIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes frPreBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  .fr-pre-stage, .fr-pre-mark { animation: none !important; }
  #fr-preloader { transition: opacity var(--dur-fast) linear, visibility 0s linear var(--dur-fast); }
  #tm-bar span { transition: none; }
}

/* ---------------------------------------------------------------- mobile-first hardening */
/* Large row gutters (g-4/g-5) overflow the container on narrow screens; tame them on phones. */
@media (max-width: 575.98px) {
  .row.g-5 { --bs-gutter-x: 1.5rem; }
  .row.g-4 { --bs-gutter-x: 1.25rem; }
  .site-cta, .section { padding-left: 0; padding-right: 0; }
}
/* Never let the decorative phone/demo/mockups force horizontal scroll. */
.mock-phone, .demo, .demo-shell, .preview-phone { max-width: 100%; }
.mockups { max-width: 100%; }
/* Long unbroken strings (URLs, place ids) wrap instead of pushing the layout. */
.prose a, .code-pill, .article-body a, .demo-dest-bar .url { overflow-wrap: anywhere; word-break: break-word; }
/* Belt and suspenders: clip any residual sub-pixel overflow at the root. */
html { overflow-x: clip; }
/* Comfortable checkbox/radio touch size on forms. */
.form-check-input { width: 1.15em; height: 1.15em; margin-top: .15em; }
