/* ============================================================
   DESIGN TOKENS — map everything to Telegram theme vars
   ============================================================ */
:root {
    --bg:           var(--tg-theme-bg-color,           #ffffff);
    --bg2:          var(--tg-theme-secondary-bg-color, #f1f3f5);
    --text:         var(--tg-theme-text-color,         #1a1a1a);
    --hint:         var(--tg-theme-hint-color,         #8a9099);
    --link:         var(--tg-theme-link-color,         #2481cc);
    --accent:       var(--tg-theme-button-color,       #2481cc);
    --accent-text:  var(--tg-theme-button-text-color,  #ffffff);

    --radius-sm:  10px;
    --radius-md:  16px;
    --radius-lg:  20px;
    --radius-xl:  26px;

    --shadow-sm:  0 2px 8px  rgba(0,0,0,.06);
    --shadow-md:  0 6px 24px rgba(0,0,0,.09);
    --shadow-lg:  0 12px 40px rgba(0,0,0,.12);

    --gap:   16px;
    --gap-sm: 10px;
    --gap-xs: 6px;

    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease:   cubic-bezier(0.4,  0,    0.2,  1);

    /* hero gradient — matches Telegram blue palette */
    --hero-from: #3a8fd1;
    --hero-to:   #1a4fa0;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg2);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    touch-action: pan-y;            /* vertical scroll only — no pinch / double-tap zoom */
    -webkit-text-size-adjust: 100%; /* stop iOS auto text scaling */
    /* safe area for iPhone notch/home-bar */
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background: linear-gradient(145deg, var(--hero-from) 0%, var(--hero-to) 100%);
    background-size: 200% 200%;
    animation: heroShimmer 8s var(--ease) infinite;
    padding: 22px 20px 28px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(255,255,255,.12) 0%, transparent 60%);
    pointer-events: none;
}
.hero-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hero-title {
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.5px;
    line-height: 1.1;
}
.hero-dot { opacity: .7; font-weight: 500; }
.hero-sub {
    color: rgba(255,255,255,.80);
    font-size: 13px;
    font-weight: 500;
    margin-top: 5px;
}

@keyframes heroShimmer {
    0%,100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* plan badge in hero */
.plan-badge {
    border-radius: 20px;
    padding: 4px 11px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-top: 4px;
}
.plan-free    { background: rgba(255,255,255,.18); color: rgba(255,255,255,.9); }
.plan-pro     { background: rgba(159,122,234,.9);  color: #fff; }
.plan-superpro{ background: rgba(255,159,28,.9);   color: #fff; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px 14px 160px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ============================================================
   CARD (form wrapper)
   ============================================================ */
.card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 18px 16px 20px;
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   SECTION
   ============================================================ */
.section { display: flex; flex-direction: column; gap: 10px; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px;
}
.section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}
.filter-counter {
    font-size: 13px;
    font-weight: 600;
    color: var(--hint);
    background: var(--bg2);
    border-radius: 20px;
    padding: 2px 9px;
}

/* ============================================================
   FORM INTERNALS
   ============================================================ */
.form-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .9px;
    color: var(--hint);
    margin-bottom: 8px;
    margin-top: 16px;
}
.form-section-label:first-child { margin-top: 0; }

.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }

/* ============================================================
   CHOICES.JS overrides
   ============================================================ */
.choices { margin: 0; }
.choices__inner {
    min-height: 46px !important;
    padding: 0 12px !important;
    border-radius: var(--radius-md) !important;
    background: var(--bg2) !important;
    border: 1.5px solid transparent !important;
    color: var(--text) !important;
    font-size: 15px;
    display: flex !important;
    align-items: center !important;
    transition: border-color .2s var(--ease), background .2s var(--ease);
}
.choices.is-focused .choices__inner,
.choices.is-open    .choices__inner {
    border-color: var(--accent) !important;
    background: var(--bg) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent) !important;
}
.choices[data-type*="select-one"] .choices__list--single {
    padding: 0 !important;
    display: flex;
    align-items: center;
    width: 100%;
}
.choices__list--single .choices__item { line-height: 1.2; }
.choices__placeholder, .is-placeholder {
    color: var(--hint) !important;
    opacity: 1 !important;
}
.choices[data-type*="select-one"]::after {
    border-color: var(--hint) transparent transparent !important;
    right: 14px !important;
}
.choices.is-open[data-type*="select-one"]::after {
    border-color: transparent transparent var(--accent) !important;
}
.choices__list--dropdown {
    background: var(--bg) !important;
    border: 1.5px solid var(--bg2) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    margin-top: 6px !important;
    overflow: hidden;
    z-index: 999 !important;
}
.choices__list--dropdown .choices__item {
    font-size: 15px;
    padding: 12px 16px !important;
    color: var(--text) !important;
}
.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background: var(--bg2) !important;
    color: var(--text) !important;
}
.choices__input {
    background: var(--bg2) !important;
    color: var(--text) !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    border: none !important;
    font-size: 14px !important;
}
.choices__group .choices__heading {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 10px 16px 6px !important;
    border-bottom: 1px solid var(--bg2);
}
.choices.is-disabled .choices__inner {
    opacity: .55;
    cursor: not-allowed;
}

/* ============================================================
   SLIDERS
   ============================================================ */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.slider-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--hint);
    text-transform: uppercase;
    letter-spacing: .7px;
    font-size: 11px;
}
.slider-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    padding: 2px 9px;
    border-radius: 20px;
}
.slider-wrap { padding: 4px 6px; }

.noUi-target {
    background: var(--bg2);
    border: none;
    box-shadow: none;
    border-radius: 4px;
    height: 5px;
    touch-action: none;
}
.noUi-connect { background: var(--accent); }
.noUi-horizontal .noUi-handle {
    width: 24px; height: 24px;
    right: -12px; top: -10px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    cursor: grab;
    transition: transform .15s var(--spring), box-shadow .15s var(--ease);
}
.noUi-horizontal .noUi-handle:active { cursor: grabbing; transform: scale(1.15); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }
.noUi-handle::before, .noUi-handle::after { display: none; }

/* ============================================================
   CHIPS (fuel, transmission, body type)
   ============================================================ */
.chips-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-xs);
    margin-bottom: 14px;
}
.chips-group:last-child { margin-bottom: 0; }
.chip input { display: none; }
.chip span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--bg2);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .12s var(--spring);
    user-select: none;
}
.chip span:active { transform: scale(.93); }
.chip input:checked + span {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}
.chip input:disabled + span { opacity: .4; cursor: not-allowed; }

/* ============================================================
   TOGGLE ADVANCED BUTTON
   ============================================================ */
.toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: var(--bg2);
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    padding: 11px 14px;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .12s var(--spring);
    margin-top: 6px;
}
.toggle-btn:active { transform: scale(.97); }
.toggle-btn[aria-expanded="true"] {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.toggle-icon { width: 18px; height: 18px; flex-shrink: 0; }
.chevron-icon {
    width: 20px; height: 20px;
    margin-left: auto;
    flex-shrink: 0;
    transition: transform .3s var(--ease);
}
.toggle-btn[aria-expanded="true"] .chevron-icon { transform: rotate(180deg); }

.advanced-panel {
    margin-top: 16px;
    border-top: 1px solid var(--bg2);
    padding-top: 4px;
}

/* ============================================================
   FALLBACK SAVE BUTTON (shown outside Telegram)
   ============================================================ */
.save-btn-fallback {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent);
    transition: transform .15s var(--spring), opacity .15s;
}
.save-btn-fallback:active { transform: scale(.97); }
.save-btn-fallback:disabled { opacity: .5; cursor: not-allowed; }
body.tg-webapp-active .save-btn-fallback { display: none; }

/* ============================================================
   EDIT BANNER
   ============================================================ */
.edit-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    animation: fadeUp .3s var(--spring) both;
}
.cancel-edit-btn {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--hint);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color .2s, background .2s;
}
.cancel-edit-btn:hover { color: var(--text); background: var(--bg2); }

/* ============================================================
   FILTER CARDS
   ============================================================ */
.filters-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border-left: 4px solid var(--accent);
    animation: fadeUp .38s var(--spring) both;
    transition: box-shadow .2s, transform .15s var(--spring);
}
.filter-card:active { transform: scale(.99); box-shadow: var(--shadow-md); }
.filter-card.paused { border-left-color: var(--hint); opacity: .75; }

.filter-card-body {
    padding: 14px 14px 10px;
}
.filter-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.filter-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #34c759;
    flex-shrink: 0;
    transition: background .3s;
}
.filter-card.paused .filter-status-dot { background: var(--hint); }

/* criterion pills */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}
.pill {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--hint);
    background: var(--bg2);
    border-radius: 20px;
    padding: 3px 9px;
    white-space: nowrap;
}

/* stats row */
.filter-card-stats {
    padding: 8px 14px;
    border-top: 1px solid var(--bg2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.filter-stat-label {
    font-size: 12px;
    color: var(--hint);
    font-weight: 500;
}
.filter-stat-label.has-activity { color: var(--accent); font-weight: 600; }

.filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.icon-btn {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform .15s var(--spring), background .18s;
}
.icon-btn:active { transform: scale(.88); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

.btn-edit   { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.btn-delete { background: rgba(255,59,48,.1); color: #ff3b30; }
.btn-edit:hover   { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.btn-delete:hover { background: rgba(255,59,48,.18); }

/* iOS-style toggle */
.tg-switch { position: relative; display: inline-flex; align-items: center; width: 44px; height: 26px; flex-shrink: 0; cursor: pointer; }
.tg-switch input { opacity: 0; width: 0; height: 0; }
.tg-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 13px;
    background: #c7c7cc;
    transition: background .3s var(--ease);
}
input:checked ~ .tg-switch-track { background: #34c759; }
.tg-switch-thumb {
    position: absolute;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #fff;
    left: 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,.22);
    transition: transform .3s var(--spring);
    z-index: 1;
}
input:checked ~ .tg-switch-thumb { transform: translateX(18px); }

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton-card {
    height: 88px;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, var(--bg2) 25%, color-mix(in srgb, var(--bg2) 60%, var(--bg)) 50%, var(--bg2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s var(--ease) infinite;
    margin-bottom: 10px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 36px 24px 32px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.empty-illustration svg { width: 80px; height: 60px; margin-bottom: 16px; }
.empty-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.empty-sub {
    font-size: 14px;
    color: var(--hint);
    line-height: 1.55;
}

/* ============================================================
   PLANS
   ============================================================ */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.plan-tile {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 14px 10px 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1.5px solid transparent;
    position: relative;
    overflow: hidden;
}
.plan-free-tile  { border-color: var(--bg2); }
.plan-pro-tile   { border-color: rgba(130,100,220,.35); background: linear-gradient(160deg, rgba(130,100,220,.06), transparent); }
.plan-superpro-tile { border-color: rgba(255,160,30,.4); background: linear-gradient(160deg, rgba(255,160,30,.07), transparent); }

.plan-badge-chip {
    position: absolute;
    top: 8px; right: 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .8px;
    padding: 2px 6px;
    border-radius: 20px;
}
.plan-pro-tile   .plan-badge-chip { background: rgba(130,100,220,.15); color: #7c5cbf; }
.plan-superpro-tile .plan-badge-chip { background: rgba(255,160,30,.18); color: #d4720a; }

.plan-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    margin-top: 2px;
}
.plan-price-row {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
}
.plan-star { font-size: 14px; }
.plan-period { font-size: 11px; font-weight: 500; color: var(--hint); }
.plan-perks {
    list-style: none;
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.plan-perks li {
    font-size: 11px;
    color: var(--hint);
    padding-left: 10px;
    position: relative;
}
.plan-perks li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.buy-btn {
    position: relative;
    overflow: hidden;
    margin-top: 6px;
    padding: 10px 6px;
    background: linear-gradient(135deg, #3a8fd1, #1f5fb0);
    color: #fff;
    border: none;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 12px rgba(31,95,176,.32);
    transition: transform .15s var(--spring), box-shadow .2s, opacity .15s;
}
/* gloss sweep across buy buttons */
.buy-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-20deg);
    animation: buyGloss 4.5s var(--ease) infinite;
}
.plan-superpro-tile .buy-btn {
    background: linear-gradient(135deg, #f6a623, #e6731a);
    box-shadow: 0 4px 12px rgba(230,115,26,.35);
}
.buy-btn:active { transform: scale(.96); box-shadow: 0 2px 6px rgba(31,95,176,.3); }
.buy-btn:disabled { opacity: .5; cursor: not-allowed; }
@keyframes buyGloss {
    0%   { left: -120%; }
    30%  { left: 130%; }
    100% { left: 130%; }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
    background: var(--bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    gap: 8px;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
    content: '';
    width: 20px; height: 20px;
    flex-shrink: 0;
    background: var(--hint);
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z' fill='currentColor'/%3E%3C/svg%3E") center/cover no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z' fill='currentColor'/%3E%3C/svg%3E") center/cover no-repeat;
    transition: transform .25s var(--ease);
}
details[open] .faq-q::after { transform: rotate(180deg); }
.faq-a {
    padding: 0 16px 14px;
    font-size: 14px;
    color: var(--hint);
    line-height: 1.55;
}

/* ============================================================
   GLOBAL LOADING OVERLAY
   ============================================================ */
.global-loading {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
}
.loading-ring {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.25);
    border-top-color: #fff;
    animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   DARK THEME TWEAKS
   ============================================================ */
body.dark-theme {
    --bg2: #1c1c1e;
}
body.dark-theme .card,
body.dark-theme .filter-card,
body.dark-theme .plan-tile,
body.dark-theme .faq-item,
body.dark-theme .empty-state {
    box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
body.dark-theme .hero { --hero-from: #2a6baa; --hero-to: #10316a; }

/* ============================================================
   HERO BRAND + ANIMATED SCANNER LOGO  (the signature "wow")
   ============================================================ */
.hero-inner { align-items: center; }
.hero-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.hero-logo {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    /* Blue glow halo (matches the brand mark) + soft depth shadow */
    filter: drop-shadow(0 0 9px rgba(124,199,245,.55))
            drop-shadow(0 2px 6px rgba(0,0,0,.28));
}

/* heartbeat pulse: draws itself, then fades — looping, alive */
.logo-pulse {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: pulseDraw 2.8s var(--ease) infinite;
}
@keyframes pulseDraw {
    0%   { stroke-dashoffset: 100; opacity: .35; }
    35%  { stroke-dashoffset: 0;   opacity: 1; }
    70%  { stroke-dashoffset: 0;   opacity: 1; }
    100% { stroke-dashoffset: 0;   opacity: .35; }
}

/* scan beam: a light bar sweeps left→right across the (now wider) car body */
.logo-scan {
    animation: scanSweep 2.8s var(--ease) infinite;
}
@keyframes scanSweep {
    0%   { transform: translateX(22px); opacity: 0; }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { transform: translateX(68px); opacity: 0; }
}

/* radar sweep: a glowing wedge rotates around the dial */
.logo-radar-sweep {
    transform-box: view-box;
    transform-origin: 32px 32px;
    animation: radarSweep 3.4s linear infinite;
}
@keyframes radarSweep { to { transform: rotate(360deg); } }

/* ============================================================
   PRO TAG on additional filter cards
   ============================================================ */
.pro-tag {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .7px;
    color: #fff;
    background: linear-gradient(135deg, #8a6ce0, #6244b8);
    padding: 2px 7px;
    border-radius: 7px;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(98,68,184,.35);
}

/* ============================================================
   COLLAPSIBLE SECTION (filters)
   ============================================================ */
.section-toggle {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font: inherit;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}
.section-toggle-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-chevron {
    width: 22px;
    height: 22px;
    color: var(--hint);
    transition: transform .3s var(--ease);
}
.section-toggle[aria-expanded="false"] .section-chevron {
    transform: rotate(-90deg);
}
.section-collapse {
    display: grid;
    grid-template-rows: 1fr;
    margin-top: 10px;
    transition: grid-template-rows .38s var(--ease), opacity .3s var(--ease), margin-top .38s var(--ease);
}
.section-collapse > * {
    overflow: hidden;
    min-height: 0;
}
.section-collapse.collapsed {
    grid-template-rows: 0fr;
    opacity: 0;
    margin-top: 0;
}

/* ============================================================
   HERO GLANCING SHEEN + TITLE SHIMMER
   ============================================================ */
/* diagonal light streak sweeping across the whole header */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.20), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 1;
    animation: heroSheen 6.5s var(--ease) infinite;
}
@keyframes heroSheen {
    0%   { left: -60%; }
    35%  { left: 160%; }
    100% { left: 160%; }
}
.hero-inner, .hero-brand { position: relative; z-index: 2; }

/* glossy shine travelling across the AutoScanner wordmark */
.hero-title {
    background: linear-gradient(100deg,
        #ffffff 0%, #ffffff 38%, #dff0ff 48%, #ffffff 58%, #ffffff 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleShine 6.5s var(--ease) infinite;
}
.hero-dot { -webkit-text-fill-color: rgba(255,255,255,.65); }
@keyframes titleShine {
    0%   { background-position: 130% 0; }
    35%  { background-position: -30% 0; }
    100% { background-position: -30% 0; }
}

/* ============================================================
   CONTACT / SUPPORT BUTTON (in FAQ)
   ============================================================ */
.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 9px 16px;
    background: linear-gradient(135deg, #3a8fd1, #1f5fb0);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 11px;
    box-shadow: 0 3px 10px rgba(31,95,176,.28);
    transition: transform .15s var(--spring);
}
.contact-btn:active { transform: scale(.96); }

/* ============================================================
   FORM PRO HINT (shown when next saved filter will be locked)
   ============================================================ */
.pro-hint {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 6px 10px;
    padding: 11px 13px;
    background: linear-gradient(135deg, rgba(138,108,224,.12), rgba(98,68,184,.12));
    border: 1px solid rgba(138,108,224,.3);
    border-radius: 13px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text);
}
.pro-hint .pro-tag { flex-shrink: 0; }

/* ============================================================
   ACTIVE-FILTER RADAR PING ("we're scanning now")
   ============================================================ */
.filter-status-dot { position: relative; }
.filter-card:not(.paused) .filter-status-dot {
    background: #2e9bff;
}
.filter-card:not(.paused) .filter-status-dot::before,
.filter-card:not(.paused) .filter-status-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid #2e9bff;
    animation: radarPing 2.4s var(--ease) infinite;
}
.filter-card:not(.paused) .filter-status-dot::after { animation-delay: 1.2s; }
@keyframes radarPing {
    0%   { transform: scale(1);   opacity: .7; }
    80%  { transform: scale(3.4); opacity: 0; }
    100% { transform: scale(3.4); opacity: 0; }
}

/* ============================================================
   EMPTY STATE — selling copy
   ============================================================ */
.empty-steps {
    list-style: none;
    margin: 16px auto 4px;
    padding: 0;
    max-width: 300px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.empty-steps li {
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.4;
    padding: 10px 12px;
    background: var(--secondary-bg);
    border-radius: 12px;
}
.empty-cta {
    margin-top: 18px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
    .logo-pulse { stroke-dashoffset: 0; opacity: 1; }
    .logo-scan { opacity: 0; }
    .logo-radar-sweep { display: none; }
    .filter-card:not(.paused) .filter-status-dot::before,
    .filter-card:not(.paused) .filter-status-dot::after { display: none; }
}
