/* ============================================================
   TerritoryIQ — app.css
   Design: Light + technical flair. Grid texture, green glow,
   data-forward. Sharp, modern, small-business friendly.
   ============================================================ */

:root {
    --tiq-green:        #00B27A;
    --tiq-green-dim:    #008F62;
    --tiq-green-bright: #00D491;
    --tiq-green-light:  #E8F8F2;
    --tiq-green-glow:   rgba(0, 178, 122, 0.2);
    --tiq-green-glow-2: rgba(0, 178, 122, 0.08);

    --tiq-ink:          #0A1628;
    --tiq-ink-2:        #0F2040;
    --tiq-text:         #0F172A;
    --tiq-text-2:       #374151;
    --tiq-text-3:       #6B7280;
    --tiq-text-4:       #9CA3AF;

    --tiq-bg:           #F0F4F8;
    --tiq-surface:      #FFFFFF;
    --tiq-surface-2:    #F7F9FC;

    --tiq-border:       #E1E8F0;
    --tiq-border-2:     #C9D5E3;
    --tiq-border-green: rgba(0, 178, 122, 0.25);

    --tiq-red:          #EF4444;
    --tiq-amber:        #F59E0B;

    --tiq-radius:       8px;
    --tiq-radius-lg:    12px;
    --tiq-shadow-sm:    0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --tiq-shadow:       0 4px 20px rgba(0,0,0,0.08), 0 1px 6px rgba(0,0,0,0.04);
    --tiq-shadow-lg:    0 16px 48px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
    --tiq-shadow-green: 0 4px 20px rgba(0,178,122,0.25), 0 1px 6px rgba(0,178,122,0.15);
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Geist', 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--tiq-text);
    -webkit-font-smoothing: antialiased;
}

/* ---- Technical grid background ---- */
body {
    background-color: #EEF2F7;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(0,178,122,0.12) 1px, transparent 0);
    background-size: 28px 28px;
}

/* ---- App Shell ---- */
.fi-app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: transparent;
}

/* ---- Header ---- */
.fi-app-header {
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid var(--tiq-border);
    padding: 0 2rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 var(--tiq-border), 0 4px 12px rgba(0,0,0,0.06);
}

.fi-app-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--tiq-green) 0%, var(--tiq-green-bright) 50%, transparent 100%);
    opacity: 0.6;
}

.fi-app-header-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.fi-app-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.fi-app-logo-img {
    height: 30px;
    width: auto;
    display: block;
}

.fi-header-nav-link {
    color: var(--tiq-text-3);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
    letter-spacing: 0.01em;
}

.fi-header-nav-link:hover { color: var(--tiq-text); }

.fi-app-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.fi-header-link {
    color: var(--tiq-text-3);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.fi-header-link:hover { color: var(--tiq-text); }

.fi-header-btn {
    background: var(--tiq-green);
    color: #fff !important;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: all 0.15s;
    box-shadow: 0 1px 4px rgba(0,178,122,0.3);
}

.fi-header-btn:hover {
    background: var(--tiq-green-dim);
    transform: translateY(-1px);
    box-shadow: var(--tiq-shadow-green);
}

/* ---- Main ---- */
.fi-app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ---- Input Panel ---- */
.fi-input-panel {
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid var(--tiq-border);
    padding: 1.75rem 2rem 1.5rem;
    box-shadow: var(--tiq-shadow-sm);
    position: relative;
}

.fi-input-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--tiq-green) 0%, var(--tiq-green-bright) 100%);
    border-radius: 0 2px 2px 0;
}

.fi-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--tiq-text);
    margin: 0 0 0.2rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fi-title-icon {
    display: inline-flex;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.fi-subtitle {
    color: var(--tiq-text-3);
    margin: 0 0 1.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.fi-form-row {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.fi-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fi-form-group label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--tiq-text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.fi-optional {
    font-weight: 400;
    text-transform: none;
    color: var(--tiq-text-4);
    letter-spacing: 0;
}

.fi-address  { flex: 3; min-width: 240px; }
.fi-type     { flex: 2; min-width: 150px; }
.fi-brand    { flex: 1.5; min-width: 130px; }
.fi-radius   { flex: 1; min-width: 95px; }

.fi-input {
    padding: 0.6rem 0.85rem;
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius);
    font-size: 0.875rem;
    background: var(--tiq-surface);
    color: var(--tiq-text);
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    font-family: inherit;
}

.fi-input::placeholder { color: var(--tiq-text-4); }

.fi-input:focus {
    outline: none;
    border-color: var(--tiq-green);
    box-shadow: 0 0 0 3px var(--tiq-green-glow);
}

.fi-form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.25rem;
}

/* ---- Buttons ---- */
.fi-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    background: var(--tiq-green);
    color: #fff;
    border: none;
    border-radius: var(--tiq-radius);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(0,178,122,0.35);
    position: relative;
    overflow: hidden;
}

.fi-btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.fi-btn-primary:hover:not(:disabled) {
    background: var(--tiq-green-dim);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,178,122,0.45);
}

.fi-btn-primary:active:not(:disabled) { transform: translateY(0); }
.fi-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.fi-btn-secondary {
    padding: 0.65rem 1.1rem;
    background: var(--tiq-surface);
    color: var(--tiq-text-2);
    border: 1.5px solid var(--tiq-border-2);
    border-radius: var(--tiq-radius);
    font-size: 0.875rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: var(--tiq-shadow-sm);
}

.fi-btn-secondary:hover {
    border-color: var(--tiq-text-3);
    color: var(--tiq-text);
    background: var(--tiq-surface-2);
}

.fi-btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }

.fi-btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--tiq-surface);
    color: var(--tiq-text-2);
    border: 1.5px solid var(--tiq-border-2);
    border-radius: var(--tiq-radius);
    font-size: 0.86rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.fi-btn-upload:hover {
    border-color: var(--tiq-green);
    color: var(--tiq-green-dim);
    background: var(--tiq-green-light);
    box-shadow: 0 0 0 3px var(--tiq-green-glow-2);
}

/* ---- Error ---- */
.fi-error {
    margin-top: 0.75rem;
    padding: 0.6rem 0.85rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--tiq-radius);
    color: #B91C1C;
    font-size: 0.875rem;
}

/* ---- Spinner ---- */
.fi-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fi-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.fi-spinner--dark {
    border-color: rgba(30,41,59,0.15);
    border-top-color: var(--tiq-text-2);
}

.fi-spinner--green {
    border-color: rgba(0,178,122,0.2);
    border-top-color: var(--tiq-green);
}

@keyframes fi-spin { to { transform: rotate(360deg); } }

/* ---- Map ---- */
.fi-map-container {
    position: relative;
    width: 100%;
    height: 480px;
    flex-shrink: 0;
}

.fi-map { width: 100%; height: 100%; }

.fi-map-legend {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    background: rgba(255,255,255,0.96);
    border: 1px solid var(--tiq-border);
    border-radius: var(--tiq-radius);
    padding: 0.55rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.775rem;
    color: var(--tiq-text-2);
    backdrop-filter: blur(8px);
    z-index: 10;
    flex-wrap: wrap;
    box-shadow: var(--tiq-shadow);
}

.fi-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.fi-legend-title {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--tiq-text-4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fi-legend-divider {
    width: 1px;
    height: 14px;
    background: var(--tiq-border);
    flex-shrink: 0;
}

.fi-legend-zone {
    display: inline-block;
    width: 26px;
    height: 9px;
    border-radius: 2px;
    border: 1.5px dashed;
    flex-shrink: 0;
}

.fi-zone-inner  { background: rgba(0,178,122,0.1); border-color: var(--tiq-green); }
.fi-zone-outer  { background: rgba(0,178,122,0.04); border-color: rgba(0,178,122,0.4); }

.fi-heatmap-swatch {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 2px;
    flex-shrink: 0;
}

.fi-heatmap-green  { background: #16A34A; }
.fi-heatmap-yellow { background: #D97706; }
.fi-heatmap-red    { background: #DC2626; }

.fi-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fi-dot.red    { background: #EF4444; }
.fi-dot.orange { background: #F97316; }
.fi-dot.yellow { background: #EAB308; }

/* ---- Map markers ---- */
.home-marker {
    font-size: 26px;
    color: var(--tiq-green);
    filter: drop-shadow(0 2px 6px rgba(0,178,122,0.5));
    cursor: pointer;
    line-height: 1;
}

.competitor-marker {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0,0,0,0.3);
    transition: transform 0.1s;
}

.competitor-marker:hover { transform: scale(1.4); }

/* ---- Results Panel ---- */
.fi-results-panel {
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: transparent;
}

/* ---- Stat cards ---- */
.fi-stats-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.fi-stat-card {
    background: var(--tiq-surface);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius-lg);
    padding: 1.25rem 1.5rem;
    text-align: center;
    min-width: 110px;
    box-shadow: var(--tiq-shadow-sm);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.fi-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--tiq-border);
}

.fi-stat-card:hover {
    border-color: var(--tiq-border-green);
    box-shadow: var(--tiq-shadow), 0 0 0 1px var(--tiq-border-green);
    transform: translateY(-1px);
}

.fi-stat-card:hover::before {
    background: linear-gradient(90deg, var(--tiq-green), var(--tiq-green-bright));
}

.fi-stat-card--highlight {
    border-color: var(--tiq-border-green);
    background: var(--tiq-green-light);
}

.fi-stat-card--highlight::before {
    background: linear-gradient(90deg, var(--tiq-green), var(--tiq-green-bright));
}

.fi-stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--tiq-green);
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.fi-stat-label {
    font-size: 0.66rem;
    color: var(--tiq-text-4);
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

/* ---- Panel base ---- */
.fi-demo-panel,
.fi-narrative-panel,
.fi-competitor-list,
.fi-heatmap-panel,
.fi-agent-panel {
    background: var(--tiq-surface);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--tiq-shadow-sm);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.fi-demo-panel::before,
.fi-narrative-panel::before,
.fi-competitor-list::before,
.fi-heatmap-panel::before,
.fi-agent-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--tiq-border);
    transition: background 0.2s;
}

.fi-demo-panel:hover,
.fi-narrative-panel:hover,
.fi-competitor-list:hover,
.fi-heatmap-panel:hover,
.fi-agent-panel:hover {
    box-shadow: var(--tiq-shadow);
    border-color: rgba(0,178,122,0.2);
}

.fi-demo-panel:hover::before,
.fi-narrative-panel:hover::before,
.fi-competitor-list:hover::before,
.fi-heatmap-panel:hover::before,
.fi-agent-panel:hover::before {
    background: linear-gradient(90deg, var(--tiq-green) 0%, var(--tiq-green-bright) 60%, transparent 100%);
}

/* ---- Panel headings ---- */
.fi-demo-panel h3,
.fi-narrative-panel h3,
.fi-competitor-list h3,
.fi-heatmap-panel h3,
.fi-agent-panel h3,
.fi-agent-header h3 {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--tiq-text);
    letter-spacing: -0.01em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.72rem;
    color: var(--tiq-text-3);
}

/* ---- Demographics ---- */
.fi-demo-radius {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--tiq-text-4);
    margin-left: 0.25rem;
    text-transform: none;
    letter-spacing: 0;
}

.fi-demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}

.fi-demo-card {
    background: var(--tiq-surface-2);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius);
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.fi-demo-card::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.2s;
}

.fi-demo-card:hover {
    border-color: var(--tiq-border-green);
    background: var(--tiq-surface);
    transform: translateY(-1px);
    box-shadow: var(--tiq-shadow-sm);
}

.fi-demo-card:hover::before {
    background: var(--tiq-green);
}

.fi-demo-card--income {
    border-color: rgba(0,178,122,0.2);
    background: var(--tiq-green-light);
}

.fi-demo-icon {
    font-size: 1.1rem;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.fi-demo-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--tiq-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.fi-demo-label {
    font-size: 0.64rem;
    color: var(--tiq-text-4);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 0.25rem;
    font-weight: 700;
}

.fi-demo-tier {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--tiq-green-dim);
    background: var(--tiq-green-light);
    border: 1px solid rgba(0,178,122,0.25);
    border-radius: 20px;
    padding: 0.12rem 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fi-demo-loading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--tiq-text-3);
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

/* ---- Narrative ---- */
.fi-narrative-loading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--tiq-text-3);
    font-size: 0.875rem;
}

.fi-narrative-text {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--tiq-text-2);
}

.fi-narrative-text p { margin: 0 0 0.85rem; }
.fi-narrative-text p:last-child { margin-bottom: 0; }

/* ---- Competitor table ---- */
.fi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.fi-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: var(--tiq-surface-2);
    color: var(--tiq-text-4);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    border-bottom: 1.5px solid var(--tiq-border);
}

.fi-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--tiq-border);
    color: var(--tiq-text-2);
    vertical-align: middle;
}

.fi-table tr:last-child td { border-bottom: none; }
.fi-table tr:hover td { background: var(--tiq-surface-2); }
.fi-table td:first-child {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--tiq-text);
}

.fi-chain-tag {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--tiq-text-4);
    background: var(--tiq-surface-2);
    border: 1px solid var(--tiq-border);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
}

.fi-empty {
    color: var(--tiq-text-4);
    font-style: italic;
    font-size: 0.9rem;
    margin: 0;
}

/* ---- Heatmap Panel ---- */
.fi-heatmap-panel h3 { margin-bottom: 0.5rem; }

.fi-optional-badge {
    font-size: 0.63rem;
    font-weight: 700;
    color: var(--tiq-text-4);
    background: var(--tiq-surface-2);
    border: 1px solid var(--tiq-border);
    border-radius: 20px;
    padding: 0.12rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.3rem;
}

.fi-heatmap-desc {
    color: var(--tiq-text-3);
    font-size: 0.875rem;
    margin: 0.25rem 0 0.25rem;
    line-height: 1.6;
}

.fi-heatmap-learn-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    padding: 0;
    margin: 0.25rem 0 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--tiq-green);
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}

.fi-heatmap-learn-toggle:hover { text-decoration: underline; }

.fi-heatmap-explainer {
    background: var(--tiq-surface-2);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.86rem;
    color: var(--tiq-text-2);
    line-height: 1.7;
}

.fi-heatmap-explainer p { margin: 0 0 0.75rem; }
.fi-heatmap-explainer p:last-child { margin-bottom: 0; }

.fi-heatmap-explainer ul {
    margin: 0 0 0.75rem;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.fi-heatmap-explainer-note { color: var(--tiq-text-4); font-size: 0.82rem; }

.fi-heatmap-explainer-note code,
.fi-heatmap-explainer-format code {
    font-family: 'Cascadia Code', 'Consolas', monospace;
    background: var(--tiq-surface-2);
    border: 1px solid var(--tiq-border);
    border-radius: 3px;
    padding: 0.1rem 0.35rem;
    font-size: 0.78rem;
    color: var(--tiq-green-dim);
}

.fi-heatmap-explainer-format {
    background: var(--tiq-green-light);
    border: 1px solid rgba(0,178,122,0.2);
    border-radius: 6px;
    padding: 0.65rem 0.9rem;
    font-size: 0.82rem;
    color: var(--tiq-text-2);
    margin-top: 0.5rem;
}

/* Thresholds */
.fi-threshold-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
    padding: 0.6rem 0.85rem;
    background: var(--tiq-surface-2);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius);
}

.fi-threshold-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tiq-text-4);
    flex-shrink: 0;
}

.fi-threshold-field {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    color: var(--tiq-text-2);
}

.fi-threshold-input {
    width: 60px !important;
    padding: 0.3rem 0.45rem !important;
    font-size: 0.86rem !important;
    text-align: center;
}

.fi-threshold-error { margin-top: 0; margin-bottom: 0.5rem; }

/* Upload row */
.fi-upload-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fi-file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.fi-file-name {
    font-size: 0.84rem;
    color: var(--tiq-text-2);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Progress */
.fi-heatmap-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    flex-wrap: wrap;
}

.fi-heatmap-progress span:last-of-type {
    font-size: 0.86rem;
    color: var(--tiq-text-3);
}

.fi-progress-bar {
    flex: 1;
    min-width: 120px;
    height: 4px;
    background: var(--tiq-border);
    border-radius: 2px;
    overflow: hidden;
}

.fi-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tiq-green), var(--tiq-green-bright));
    border-radius: 2px;
    transition: width 0.4s ease;
    box-shadow: 0 0 8px rgba(0,178,122,0.4);
}

/* Heatmap stats */
.fi-heatmap-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.fi-heatmap-stat {
    flex: 1;
    min-width: 90px;
    text-align: center;
    background: var(--tiq-surface-2);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius);
    padding: 0.85rem 0.5rem;
}

.fi-heatmap-stat-green  { border-color: #86EFAC; background: #F0FDF4; }
.fi-heatmap-stat-yellow { border-color: #FDE68A; background: #FFFBEB; }
.fi-heatmap-stat-red    { border-color: #FECACA; background: #FEF2F2; }

.fi-heatmap-stat .fi-stat-number { font-size: 1.6rem; }
.fi-heatmap-stat-green  .fi-stat-number { color: #16A34A; }
.fi-heatmap-stat-yellow .fi-stat-number { color: #D97706; }
.fi-heatmap-stat-red    .fi-stat-number { color: #DC2626; }
.fi-heatmap-stat .fi-stat-label { color: var(--tiq-text-4); }
.fi-heatmap-stat::before { display: none; }

.fi-heatmap-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Heatmap agent section */
.fi-heatmap-agent {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1.5px solid var(--tiq-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fi-heatmap-agent-title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tiq-text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fi-heatmap-error { margin-top: 0.75rem; }

/* ---- Agent Panel ---- */
.fi-agent-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fi-agent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.fi-agent-header h3 { margin-bottom: 0; }

.fi-agent-counter {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--tiq-text-4);
    background: var(--tiq-surface-2);
    border: 1px solid var(--tiq-border);
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fi-agent-thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fi-agent-msg {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.fi-agent-msg--user { align-self: flex-end; align-items: flex-end; }
.fi-agent-msg--assistant { align-self: flex-start; align-items: flex-start; }

.fi-agent-msg--user::before {
    content: "You";
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--tiq-green-dim);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.25rem;
}

.fi-agent-msg--assistant::before {
    content: "TerritoryIQ Agent";
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--tiq-text-4);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.25rem;
}

.fi-agent-bubble {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.7;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.fi-agent-msg--user .fi-agent-bubble {
    background: var(--tiq-green-light);
    border: 1.5px solid rgba(0,178,122,0.2);
    color: var(--tiq-text);
    border-bottom-right-radius: 3px;
}

.fi-agent-msg--assistant .fi-agent-bubble {
    background: var(--tiq-surface-2);
    border: 1.5px solid var(--tiq-border);
    color: var(--tiq-text-2);
    border-bottom-left-radius: 3px;
}

.fi-agent-bubble--streaming:not(:has(p)) {
    min-width: 80px;
    min-height: 42px;
    display: flex;
    align-items: center;
}

.fi-agent-bubble--streaming:has(p) { display: block; }

.fi-agent-bubble p { margin: 0 0 0.6rem; }
.fi-agent-bubble p:last-child { margin-bottom: 0; }

.fi-agent-bubble--streaming .fi-spinner {
    border-color: rgba(30,41,59,0.12);
    border-top-color: var(--tiq-text-3);
}

.fi-agent-input-row { display: flex; gap: 0.6rem; align-items: center; }
.fi-agent-input { flex: 1; }
.fi-btn-agent-send { padding: 0.6rem 1.25rem; white-space: nowrap; flex-shrink: 0; }

.fi-agent-limit-msg {
    font-size: 0.86rem;
    color: var(--tiq-text-3);
    background: var(--tiq-surface-2);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius);
    padding: 0.75rem 1rem;
    text-align: center;
}

.fi-agent-limit-msg a { color: var(--tiq-green); font-weight: 600; text-decoration: none; }
.fi-agent-limit-msg a:hover { text-decoration: underline; }
.fi-agent-error { margin-top: 0; }

/* ---- Payment Modal ---- */
.fi-payment-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,22,40,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    backdrop-filter: blur(6px);
    padding: 1rem;
}

.fi-payment-modal {
    background: var(--tiq-surface);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius-lg);
    box-shadow: var(--tiq-shadow-lg);
    padding: 2rem;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    position: relative;
}

.fi-payment-modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tiq-green), var(--tiq-green-bright));
    border-radius: var(--tiq-radius-lg) var(--tiq-radius-lg) 0 0;
}

.fi-payment-modal h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tiq-text);
    letter-spacing: -0.02em;
}

.fi-payment-desc {
    color: var(--tiq-text-3);
    font-size: 0.875rem;
    margin: 0 0 1.25rem;
    line-height: 1.6;
}

.fi-stripe-element {
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius);
    padding: 0.85rem;
    min-height: 60px;
    margin-bottom: 1.25rem;
    background: var(--tiq-surface-2);
}

.fi-payment-error { margin-top: 0; margin-bottom: 1rem; }

.fi-payment-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.fi-payment-actions .fi-btn-primary { flex: 1; justify-content: center; min-width: 180px; }
.fi-payment-actions .fi-btn-secondary { min-width: 80px; }

/* ---- Blazor error UI ---- */
#blazor-error-ui {
    color-scheme: light only;
    background: #FEF2F2;
    border-top: 1px solid #FECACA;
    color: #B91C1C;
    display: none;
    font-size: 0.875rem;
    padding: 0.6rem 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss { cursor: pointer; float: right; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .fi-input-panel { padding: 1.25rem 1rem; }
    .fi-results-panel { padding: 1.25rem 1rem; }
    .fi-form-row { flex-direction: column; }
    .fi-address, .fi-type, .fi-brand, .fi-radius { min-width: 100%; }
    .fi-map-container { height: 340px; }
    .fi-app-header { padding: 0 1rem; }
    .fi-demo-grid { grid-template-columns: repeat(2, 1fr); }
    .fi-map-legend { flex-wrap: wrap; gap: 0.5rem; font-size: 0.72rem; }
    .fi-heatmap-stats { gap: 0.5rem; }
    .fi-agent-msg { max-width: 95%; }
    .fi-app-logo-img { height: 26px; }
    .fi-app-header-inner { gap: 1.25rem; }
}

/* ============================================================
   AUTH PAGES
   ============================================================ */

.fi-auth-page {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: transparent;
}

.fi-auth-card {
    background: var(--tiq-surface);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius-lg);
    box-shadow: var(--tiq-shadow);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

.fi-auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tiq-green), var(--tiq-green-bright));
}

.fi-auth-card--centered { text-align: center; }

.fi-auth-header { text-align: center; margin-bottom: 2rem; }

.fi-auth-logo { font-size: 2.25rem; display: block; margin-bottom: 0.75rem; }

.fi-auth-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--tiq-text);
    margin: 0 0 0.4rem;
    letter-spacing: -0.03em;
}

.fi-auth-subtitle {
    color: var(--tiq-text-3);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

.fi-auth-form { display: flex; flex-direction: column; gap: 1.1rem; }

.fi-auth-field { display: flex; flex-direction: column; gap: 0.4rem; }

.fi-auth-field label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--tiq-text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fi-auth-input {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius);
    font-size: 0.9rem;
    color: var(--tiq-text);
    background: var(--tiq-surface);
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    width: 100%;
}

.fi-auth-input::placeholder { color: var(--tiq-text-4); }

.fi-auth-input:focus {
    border-color: var(--tiq-green);
    box-shadow: 0 0 0 3px var(--tiq-green-glow);
}

.fi-auth-input-error { border-color: var(--tiq-red) !important; }
.fi-auth-field-error { font-size: 0.78rem; color: #DC2626; }

.fi-auth-hint {
    font-weight: 400;
    text-transform: none;
    color: var(--tiq-text-4);
    font-size: 0.75rem;
    letter-spacing: 0;
}

.fi-auth-forgot {
    font-size: 0.75rem;
    color: var(--tiq-green);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.fi-auth-forgot:hover { text-decoration: underline; }

.fi-auth-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    color: var(--tiq-text-2);
}

.fi-auth-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--tiq-green);
    color: #fff;
    border: none;
    border-radius: var(--tiq-radius);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: all 0.15s;
    width: 100%;
    margin-top: 0.25rem;
    box-shadow: 0 2px 8px rgba(0,178,122,0.35);
    position: relative;
    overflow: hidden;
}

.fi-auth-btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.fi-auth-btn-primary:hover:not(:disabled) {
    background: var(--tiq-green-dim);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,178,122,0.45);
}

.fi-auth-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.fi-auth-btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--tiq-green);
    color: #fff !important;
    border-radius: var(--tiq-radius);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s;
    margin-top: 0.5rem;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0,178,122,0.35);
}

.fi-auth-btn-link:hover { background: var(--tiq-green-dim); }

.fi-auth-switch {
    text-align: center;
    font-size: 0.86rem;
    color: var(--tiq-text-3);
    margin: 0;
}

.fi-auth-switch a { color: var(--tiq-green); font-weight: 600; text-decoration: none; }
.fi-auth-switch a:hover { text-decoration: underline; }

.fi-auth-link { color: var(--tiq-green); font-weight: 600; text-decoration: none; }
.fi-auth-link:hover { text-decoration: underline; }

.fi-auth-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    border-radius: var(--tiq-radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.fi-auth-success { text-align: center; padding: 0.5rem 0; }

.fi-auth-success h2 {
    font-size: 1.2rem;
    color: var(--tiq-text);
    margin: 0.5rem 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.fi-auth-success p { color: var(--tiq-text-2); font-size: 0.9rem; margin: 0.4rem 0; }
.fi-auth-success-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }

.fi-auth-success-inline {
    background: #F0FDF4;
    border: 1px solid #86EFAC;
    color: #15803D;
    border-radius: var(--tiq-radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.fi-auth-resend { font-size: 0.84rem; color: var(--tiq-text-3); margin-top: 1rem !important; }

.fi-auth-link-btn {
    background: none;
    border: none;
    color: var(--tiq-green);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    text-decoration: underline;
    font-family: inherit;
}

.fi-auth-link-btn:disabled { color: var(--tiq-text-4); cursor: default; text-decoration: none; }

.fi-auth-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0;
    gap: 0.5rem;
}

/* ============================================================
   BUSINESS SETUP PAGE
   ============================================================ */

.tiq-setup-shell {
    display: flex;
    min-height: calc(100vh - 56px);
}

/* ---- Left Info Panel ---- */
.tiq-setup-panel-left {
    width: 36%;
    flex-shrink: 0;
    background: #0A1628;
    background-image: radial-gradient(circle at 1px 1px, rgba(0,178,122,0.07) 1px, transparent 0);
    background-size: 24px 24px;
    padding: 3.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tiq-setup-panel-left::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00B27A 0%, #00D491 60%, transparent 100%);
}

.tiq-setup-left-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #00B27A;
    margin-bottom: 1.1rem;
}

.tiq-setup-left-heading {
    font-size: 2rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin: 0 0 1.1rem;
}

.tiq-setup-left-heading em {
    color: #00D491;
    font-style: normal;
}

.tiq-setup-left-desc {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.65;
    margin: 0 0 2.5rem;
}

.tiq-setup-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tiq-setup-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.tiq-setup-feature-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: rgba(0,178,122,0.1);
    border: 1px solid rgba(0,178,122,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00D491;
}

.tiq-setup-feature-name {
    display: block;
    color: rgba(255,255,255,0.88);
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.tiq-setup-feature-desc {
    display: block;
    color: rgba(255,255,255,0.38);
    font-size: 0.78rem;
    line-height: 1.45;
}

/* ---- Right Form Panel ---- */
.tiq-setup-panel-right {
    flex: 1;
    background: #EEF2F7;
    background-image: radial-gradient(circle at 1px 1px, rgba(0,178,122,0.08) 1px, transparent 0);
    background-size: 28px 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2.5rem 4rem;
}

.tiq-setup-form-wrap {
    width: 100%;
    max-width: 500px;
}

.tiq-setup-form-header {
    margin-bottom: 1.5rem;
}

.tiq-setup-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.03em;
    margin: 0 0 0.375rem;
}

.tiq-setup-subtitle {
    font-size: 0.875rem;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

/* ---- Form Card ---- */
.tiq-setup-card {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E1E8F0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
    padding: 1.75rem 2rem;
}

/* ---- Active Business Switcher ---- */
.tiq-setup-switcher {
    background: #F0FAF6;
    border: 1.5px solid rgba(0,178,122,0.25);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
}

.tiq-setup-switcher .tiq-setup-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #00B27A;
}

/* ---- Section Labels ---- */
.tiq-setup-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9CA3AF;
    padding-top: 1.5rem;
    margin: 0 0 0.875rem;
    border-top: 1px solid #E1E8F0;
}

.tiq-setup-section-label--first {
    padding-top: 0;
    border-top: none;
}

/* ---- Fields ---- */
.tiq-setup-field { margin-bottom: 1rem; }
.tiq-setup-field:last-of-type { margin-bottom: 0; }

.tiq-setup-label {
    display: block;
    font-size: 0.775rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}

.tiq-setup-required { color: #00B27A; margin-left: 2px; }
.tiq-setup-optional { color: #9CA3AF; font-weight: 400; font-size: 0.74rem; margin-left: 4px; }
.tiq-setup-input { width: 100%; }
.tiq-setup-label--checkbox { display: flex; align-items: center; cursor: pointer; font-size: 0.825rem; }
.tiq-setup-field-hint { display: block; font-size: 0.74rem; color: #9CA3AF; margin-top: 4px; }

/* ---- Actions ---- */
.tiq-setup-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E1E8F0;
}

.tiq-setup-btn {
    width: 100%;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    font-size: 0.925rem;
    font-weight: 700;
    gap: 0.5rem;
}

.tiq-setup-error { margin-top: 0.875rem; border-radius: 8px; }

/* ---- Footer link ---- */
.tiq-setup-tc-link {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.84rem;
    color: #9CA3AF;
}

.tiq-setup-tc-link a { color: #00B27A; text-decoration: none; font-weight: 600; }
.tiq-setup-tc-link a:hover { color: #008F62; text-decoration: underline; }

@media (max-width: 820px) {
    .tiq-setup-panel-left { display: none; }
    .tiq-setup-panel-right { padding: 2rem 1rem 3rem; }
}

.fi-auth-status h1 { font-size: 1.3rem; margin: 0; color: var(--tiq-text); font-weight: 800; }
.fi-auth-status p { color: var(--tiq-text-2); font-size: 0.9rem; margin: 0; }
.fi-auth-status-icon { font-size: 2.5rem; }
.fi-auth-status--error h1 { color: #B91C1C; }

/* ============================================================
   PROFILE DROPDOWN
   ============================================================ */

.fi-profile-wrap { position: relative; }

.fi-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 1.5px solid var(--tiq-border-2);
    border-radius: 999px;
    padding: 0.2rem 0.55rem 0.2rem 0.2rem;
    cursor: pointer;
    transition: all 0.15s;
}

.fi-profile-btn:hover {
    border-color: var(--tiq-green);
    background: var(--tiq-green-light);
    box-shadow: 0 0 0 3px var(--tiq-green-glow-2);
}

.fi-profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--tiq-green);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 4px rgba(0,178,122,0.3);
}

.fi-profile-chevron {
    color: var(--tiq-text-4);
    font-size: 0.9rem;
    line-height: 1;
    transition: transform 0.2s;
    display: inline-block;
}

.fi-profile-chevron--up { transform: rotate(180deg); }

.fi-profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    background: var(--tiq-surface);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius-lg);
    box-shadow: var(--tiq-shadow-lg);
    z-index: 1000;
    overflow: hidden;
}

.fi-profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.75rem;
    background: var(--tiq-surface-2);
    border-bottom: 1px solid var(--tiq-border);
}

.fi-profile-dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tiq-green);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,178,122,0.3);
}

.fi-profile-dropdown-identity { min-width: 0; }

.fi-profile-dropdown-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--tiq-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fi-profile-dropdown-email {
    font-size: 0.75rem;
    color: var(--tiq-text-4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fi-profile-divider { height: 1px; background: var(--tiq-border); margin: 0.5rem 0; }

.fi-profile-section-label {
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tiq-text-4);
    padding: 0 1rem 0.4rem;
}

.fi-profile-sub { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.5rem 1rem 0.75rem; }

.fi-profile-sub-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.fi-profile-sub--active .fi-profile-sub-dot   { background: var(--tiq-green); box-shadow: 0 0 6px rgba(0,178,122,0.4); }
.fi-profile-sub--pastdue .fi-profile-sub-dot  { background: var(--tiq-amber); }
.fi-profile-sub--none .fi-profile-sub-dot     { display: none; }

.fi-profile-sub-title { font-size: 0.84rem; font-weight: 600; color: var(--tiq-text-2); }
.fi-profile-sub--active .fi-profile-sub-title  { color: var(--tiq-green-dim); }
.fi-profile-sub--pastdue .fi-profile-sub-title { color: var(--tiq-amber); }
.fi-profile-sub--none .fi-profile-sub-title    { color: var(--tiq-text-4); }

.fi-profile-sub-detail { font-size: 0.73rem; color: var(--tiq-text-4); margin-top: 0.1rem; }

.fi-profile-subscribe-btn {
    display: block;
    margin: 0 1rem 0.75rem;
    padding: 0.55rem 1rem;
    background: var(--tiq-green);
    color: #fff;
    border-radius: var(--tiq-radius);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(0,178,122,0.25);
}

.fi-profile-subscribe-btn:hover { background: var(--tiq-green-dim); }

.fi-profile-manage-btn {
    display: block;
    margin: 0 1rem 0.75rem;
    padding: 0.45rem 1rem;
    background: transparent;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: border-color 0.15s, color 0.15s;
}

.fi-profile-manage-btn:hover {
    border-color: #00B27A;
    color: #00B27A;
}

.fi-profile-manage-btn--urgent {
    border-color: #f59e0b;
    color: #f59e0b;
}

.fi-profile-manage-btn--urgent:hover {
    border-color: #fbbf24;
    color: #fbbf24;
}

.fi-profile-readonly { padding: 0 1rem 0.5rem; }

.fi-profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    gap: 0.5rem;
}

.fi-profile-row-label { font-size: 0.75rem; color: var(--tiq-text-4); flex-shrink: 0; }

.fi-profile-row-value {
    font-size: 0.8rem;
    color: var(--tiq-text-2);
    text-align: right;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-profile-edit-btn {
    display: block;
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.45rem;
    background: transparent;
    border: 1.5px solid var(--tiq-border);
    border-radius: 6px;
    color: var(--tiq-text-3);
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.fi-profile-edit-btn:hover { border-color: var(--tiq-green); color: var(--tiq-green-dim); }

.fi-profile-form { padding: 0 1rem 0.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.fi-profile-field { display: flex; flex-direction: column; gap: 0.25rem; }

.fi-profile-field label {
    font-size: 0.65rem;
    color: var(--tiq-text-4);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.fi-profile-input {
    padding: 0.45rem 0.65rem;
    background: var(--tiq-surface-2);
    border: 1.5px solid var(--tiq-border);
    border-radius: 6px;
    color: var(--tiq-text);
    font-size: 0.84rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
}

.fi-profile-input:focus { border-color: var(--tiq-green); }

.fi-profile-actions { display: flex; gap: 0.5rem; margin-top: 0.25rem; }

.fi-profile-save-btn {
    flex: 1;
    padding: 0.45rem;
    background: var(--tiq-green);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.fi-profile-save-btn:hover:not(:disabled) { background: var(--tiq-green-dim); }
.fi-profile-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.fi-profile-cancel-btn {
    padding: 0.45rem 0.75rem;
    background: transparent;
    color: var(--tiq-text-3);
    border: 1.5px solid var(--tiq-border);
    border-radius: 6px;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.fi-profile-cancel-btn:hover { border-color: var(--tiq-border-2); }
.fi-profile-save-error { font-size: 0.76rem; color: #DC2626; }

.fi-profile-signout-form { padding: 0.5rem 1rem 1rem; }

.fi-profile-signout-btn {
    width: 100%;
    padding: 0.5rem;
    background: transparent;
    border: 1.5px solid var(--tiq-border);
    border-radius: 6px;
    color: var(--tiq-text-3);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.fi-profile-signout-btn:hover {
    border-color: #FECACA;
    color: #DC2626;
    background: #FEF2F2;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */

.fi-about-page { display: flex; flex-direction: column; }

.fi-about-hero {
    background: var(--tiq-ink);
    background-image:
        radial-gradient(circle at 1px 1px, rgba(0,178,122,0.08) 1px, transparent 0);
    background-size: 28px 28px;
    padding: 5rem 2rem 4.5rem;
    position: relative;
    overflow: hidden;
}

.fi-about-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--tiq-green) 0%, transparent 60%);
}

.fi-about-hero-inner { max-width: 760px; margin: 0 auto; }

.fi-about-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tiq-green);
    margin-bottom: 1rem;
}

.fi-about-headline {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #F1F5F9;
    line-height: 1.15;
    margin: 0 0 1.25rem;
    letter-spacing: -0.03em;
}

.fi-about-headline-accent { color: var(--tiq-green-bright); display: block; }

.fi-about-lead {
    font-size: 1.05rem;
    color: #64748B;
    line-height: 1.75;
    margin: 0 0 2rem;
    max-width: 640px;
}

.fi-about-cta {
    display: inline-block;
    background: var(--tiq-green);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.85rem 2rem;
    border-radius: var(--tiq-radius);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: all 0.15s;
    box-shadow: 0 4px 16px rgba(0,178,122,0.4);
}

.fi-about-cta:hover { background: var(--tiq-green-dim); transform: translateY(-1px); }

.fi-about-hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.fi-about-cta-secondary {
    display: inline-block;
    color: rgba(255,255,255,0.65);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.15s;
    padding: 0.85rem 0;
}

.fi-about-cta-secondary:hover { color: rgba(255,255,255,0.95); }

.fi-about-section {
    padding: 4rem 2rem;
    background: var(--tiq-surface);
    border-bottom: 1px solid var(--tiq-border);
}

.fi-about-section--alt { background: var(--tiq-surface-2); }

.fi-about-inner { max-width: 960px; margin: 0 auto; }
.fi-about-inner--narrow { max-width: 680px; }

.fi-about-pricing-intro {
    font-size: 0.95rem;
    color: var(--tiq-text-3);
    line-height: 1.7;
    margin: -0.75rem 0 1.75rem;
    max-width: 540px;
}

/* Three-step workflow */
.fi-about-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.fi-about-step {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.fi-about-step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--tiq-green);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,178,122,0.35);
    margin-top: 2px;
}

.fi-about-step-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tiq-text);
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

.fi-about-step-body p {
    font-size: 0.875rem;
    color: var(--tiq-text-3);
    line-height: 1.7;
    margin: 0;
}

.fi-about-step-connector {
    width: 40px;
    min-width: 40px;
    height: 2px;
    background: var(--tiq-border-2);
    margin-top: 21px;
    flex-shrink: 0;
    position: relative;
}

.fi-about-step-connector::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--tiq-border-2);
    border-right: 2px solid var(--tiq-border-2);
    transform: rotate(45deg);
}

@media (max-width: 768px) {
    .fi-about-steps {
        flex-direction: column;
        gap: 1.5rem;
    }
    .fi-about-step-connector {
        width: 2px;
        height: 24px;
        min-width: 2px;
        margin-top: 0;
        margin-left: 19px;
    }
    .fi-about-step-connector::after {
        right: -3px;
        top: auto;
        bottom: -4px;
        transform: rotate(135deg);
    }
}

.fi-about-section-title {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 800;
    color: var(--tiq-text);
    margin: 0 0 1.75rem;
    letter-spacing: -0.03em;
}

.fi-about-section p {
    font-size: 0.975rem;
    color: var(--tiq-text-2);
    line-height: 1.8;
    margin: 0 0 1rem;
}

.fi-about-section p:last-child { margin-bottom: 0; }

.fi-about-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }

.fi-about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.fi-about-feature {
    background: var(--tiq-surface);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--tiq-shadow-sm);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.fi-about-feature::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--tiq-border);
    transition: background 0.2s;
}

.fi-about-feature:hover {
    border-color: rgba(0,178,122,0.25);
    box-shadow: var(--tiq-shadow);
    transform: translateY(-2px);
}

.fi-about-feature:hover::before {
    background: linear-gradient(90deg, var(--tiq-green), var(--tiq-green-bright));
}

.fi-about-feature-icon { font-size: 1.75rem; margin-bottom: 0.75rem; line-height: 1; }

.fi-about-feature h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tiq-text);
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

.fi-about-feature p {
    font-size: 0.875rem;
    color: var(--tiq-text-3);
    line-height: 1.65;
    margin: 0;
}

.fi-about-pricing { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.5rem; }

.fi-about-price-card {
    background: var(--tiq-surface);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius-lg);
    padding: 2rem 1.75rem;
    flex: 1;
    min-width: 240px;
    max-width: 320px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: var(--tiq-shadow-sm);
    overflow: hidden;
}

.fi-about-price-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--tiq-border);
}

.fi-about-price-card--featured {
    border-color: rgba(0,178,122,0.3);
    box-shadow: 0 0 0 3px rgba(0,178,122,0.1), var(--tiq-shadow);
    overflow: visible;
    padding-top: 2.5rem;
}

.fi-about-price-card--featured::before {
    background: linear-gradient(90deg, var(--tiq-green), var(--tiq-green-bright));
}

.fi-about-price-badge {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tiq-green);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,178,122,0.3);
}

.fi-about-price-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tiq-text-4);
    margin-bottom: 0.25rem;
}

.fi-about-price-amount {
    font-size: 3.25rem;
    font-weight: 800;
    color: var(--tiq-text);
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.fi-about-price-per { font-size: 0.84rem; color: var(--tiq-text-4); margin-bottom: 1.25rem; }

.fi-about-price-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.fi-about-price-list li {
    font-size: 0.875rem;
    color: var(--tiq-text-2);
    padding-left: 1.4rem;
    position: relative;
    line-height: 1.5;
}

.fi-about-price-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--tiq-green);
    font-weight: 700;
}

.fi-about-price-btn {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    background: var(--tiq-green);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    border-radius: var(--tiq-radius);
    text-decoration: none;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(0,178,122,0.25);
}

.fi-about-price-btn:hover { background: var(--tiq-green-dim); }

.fi-about-pricing-note { text-align: center; font-size: 0.86rem; color: var(--tiq-text-4); margin: 0; }

.fi-about-footer-cta {
    background: var(--tiq-ink);
    background-image:
        radial-gradient(circle at 1px 1px, rgba(0,178,122,0.07) 1px, transparent 0);
    background-size: 28px 28px;
    padding: 5rem 2rem;
}

.fi-about-footer-cta-inner { text-align: center; }

.fi-about-footer-cta h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: #F1F5F9;
    margin: 0 0 0.75rem;
    letter-spacing: -0.03em;
}

.fi-about-footer-cta p { color: #64748B; font-size: 1rem; margin: 0 0 2rem; }

.fi-about-callout {
    background-color: var(--tiq-ink);
    background-image:
        linear-gradient(135deg, var(--tiq-ink) 0%, var(--tiq-ink-2) 100%),
        radial-gradient(circle at 1px 1px, rgba(0,178,122,0.1) 1px, transparent 0);
    background-size: cover, 28px 28px;
    padding: 4rem 2rem;
    border-top: 1px solid rgba(0,178,122,0.2);
    border-bottom: 1px solid rgba(0,178,122,0.2);
    text-align: center;
    position: relative;
    isolation: isolate;
}

.fi-about-callout-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.fi-about-callout-text {
    font-size: clamp(1.25rem, 2.5vw, 1.85rem);
    font-weight: 700;
    color: #F1F5F9;
    line-height: 1.5;
    letter-spacing: -0.02em;
    margin: 0;
    max-width: 600px;
    position: relative;
    padding: 0 0.5rem;
}

.fi-about-callout-text::before {
    content: '\201C';
    position: absolute;
    left: -0.5rem;
    top: -0.25rem;
    font-size: 3.5rem;
    color: var(--tiq-green);
    line-height: 1;
    opacity: 0.4;
    font-family: Georgia, serif;
}

@media (max-width: 768px) {
    .fi-about-hero { padding: 3rem 1.25rem 2.5rem; }
    .fi-about-section { padding: 2.5rem 1.25rem; }
    .fi-about-footer-cta { padding: 3rem 1.25rem; }
    .fi-about-callout { padding: 3rem 1.25rem; }
    .fi-about-two-col { grid-template-columns: 1fr; gap: 0; }
    .fi-about-features { grid-template-columns: 1fr; }
    .fi-about-pricing { flex-direction: column; align-items: center; }
    .fi-about-price-card { max-width: 100%; width: 100%; }
}

/* ============================================================
   SUBSCRIBE RESULT PAGE
   ============================================================ */

.fi-subscribe-result {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: transparent;
}

.fi-subscribe-card {
    background: var(--tiq-surface);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius-lg);
    padding: 3rem 2.5rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--tiq-shadow);
    position: relative;
    overflow: hidden;
}

.fi-subscribe-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--tiq-border);
}

.fi-subscribe-card--success::before {
    background: linear-gradient(90deg, var(--tiq-green), var(--tiq-green-bright));
}

.fi-subscribe-card--success { border-color: rgba(0,178,122,0.25); }
.fi-subscribe-card--cancel  { border-color: var(--tiq-border-2); }

.fi-subscribe-icon { font-size: 3rem; margin-bottom: 1rem; }

.fi-subscribe-card h2 {
    color: var(--tiq-text);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 1rem;
    letter-spacing: -0.03em;
}

.fi-subscribe-card p { color: var(--tiq-text-3); font-size: 0.95rem; line-height: 1.7; margin: 0 0 2rem; }
.fi-subscribe-cta { display: inline-block; text-decoration: none; }

/* ============================================================
   MANUAL COMPETITOR MAP MARKER
   ============================================================ */

.manual-competitor-marker {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: #7C3AED;
    border: 2px solid rgba(255,255,255,0.9);
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(124,58,237,0.5);
    transition: transform 0.1s;
    transform: rotate(45deg);
}

.manual-competitor-marker:hover { transform: rotate(45deg) scale(1.4); }

/* ============================================================
   MANUAL COMPETITOR PANEL (in results panel)
   ============================================================ */

.fi-manual-comp-panel {
    background: var(--tiq-surface);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--tiq-shadow-sm);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fi-manual-comp-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: #7C3AED;
}

.fi-manual-comp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fi-manual-comp-title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tiq-text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fi-manual-comp-title-count {
    font-size: 0.66rem;
    font-weight: 600;
    color: #7C3AED;
    background: #F5F3FF;
    border: 1px solid #DDD6FE;
    border-radius: 20px;
    padding: 0.1rem 0.5rem;
    margin-left: 0.4rem;
}

.fi-manual-comp-desc {
    font-size: 0.84rem;
    color: var(--tiq-text-3);
    margin: 0;
    line-height: 1.6;
}

.fi-manual-comp-add {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--tiq-surface-2);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius);
    padding: 1rem;
}

.fi-manual-comp-add-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--tiq-text-4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.fi-manual-comp-fields {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.fi-manual-comp-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    min-width: 130px;
}

.fi-manual-comp-field label {
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--tiq-text-4);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.fi-manual-comp-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.fi-btn-purple {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: #7C3AED;
    color: #fff;
    border: none;
    border-radius: var(--tiq-radius);
    font-size: 0.84rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(124,58,237,0.3);
}

.fi-btn-purple:hover:not(:disabled) {
    background: #6D28D9;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(124,58,237,0.4);
}

.fi-btn-purple:disabled { opacity: 0.5; cursor: not-allowed; }

.fi-btn-purple-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: transparent;
    color: #7C3AED;
    border: 1.5px solid #DDD6FE;
    border-radius: var(--tiq-radius);
    font-size: 0.84rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.fi-btn-purple-outline:hover:not(:disabled) {
    background: #F5F3FF;
    border-color: #7C3AED;
}

.fi-btn-purple-outline--active {
    background: #F5F3FF;
    border-color: #7C3AED;
    animation: fi-pulse-border 1.5s ease-in-out infinite;
}

@keyframes fi-pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.3); }
    50%       { box-shadow: 0 0 0 4px rgba(124,58,237,0.1); }
}

.fi-btn-purple-outline:disabled { opacity: 0.5; cursor: not-allowed; }

.fi-manual-comp-map-hint {
    font-size: 0.78rem;
    color: #7C3AED;
    font-style: italic;
}

.fi-manual-comp-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.fi-manual-comp-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--tiq-border);
    font-size: 0.875rem;
}

.fi-manual-comp-row:last-child { border-bottom: none; }

.fi-manual-comp-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: #7C3AED;
    flex-shrink: 0;
    transform: rotate(45deg);
}

.fi-manual-comp-name {
    font-weight: 600;
    color: var(--tiq-text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-manual-comp-addr {
    color: var(--tiq-text-4);
    font-size: 0.8rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-manual-comp-source {
    font-size: 0.66rem;
    font-weight: 600;
    color: #7C3AED;
    background: #F5F3FF;
    border: 1px solid #DDD6FE;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fi-manual-comp-bg {
    font-size: 0.66rem;
    font-weight: 600;
    color: #374151;
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    flex-shrink: 0;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    white-space: nowrap;
}

.fi-manual-comp-bg--pending {
    color: var(--tiq-text-4);
    background: transparent;
    border-color: transparent;
    font-family: inherit;
    animation: fi-spin 1s linear infinite;
    display: inline-block;
}

.fi-manual-comp-remove {
    background: none;
    border: none;
    color: var(--tiq-text-4);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.15s;
    flex-shrink: 0;
}

.fi-manual-comp-remove:hover { color: var(--tiq-red); background: #FEF2F2; }

.fi-manual-comp-geocoding {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--tiq-text-3);
    padding: 0.25rem 0;
}

.fi-manual-comp-error { margin-top: 0; }

/* Home services empty state */
.fi-empty-home-services {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.25rem 0;
}

.fi-empty-home-services-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.fi-empty-home-services-msg {
    font-size: 0.875rem;
    color: var(--tiq-text-3);
    margin: 0;
    line-height: 1.65;
}

.fi-empty-home-services-hint {
    font-size: 0.875rem;
    color: var(--tiq-text-2);
    margin: 0;
    line-height: 1.65;
    padding: 0.65rem 0.9rem;
    background: #F5F3FF;
    border: 1.5px solid #DDD6FE;
    border-radius: var(--tiq-radius);
}

.fi-empty-home-services-hint strong { color: #6D28D9; }

@media (max-width: 768px) {
    .fi-manual-comp-fields { flex-direction: column; }
    .fi-manual-comp-field { min-width: 100%; }
}

/* ============================================================
   INSIGHT CARDS
   Plain-English callout cards shown above the results panel.
   Generated from analysis + heatmap data — no AI calls.
   ============================================================ */

.fi-insight-cards {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.25rem 2rem 0;
}

.fi-insight-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    background: var(--tiq-surface);
    border: 1.5px solid var(--tiq-border);
    border-radius: var(--tiq-radius-lg);
    padding: 1rem 1.15rem;
    box-shadow: var(--tiq-shadow-sm);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    animation: fi-insight-slide-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fi-insight-slide-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fi-insight-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
}

.fi-insight-card:hover {
    box-shadow: var(--tiq-shadow);
    transform: translateY(-1px);
}

.fi-insight-card--green  { border-color: #86EFAC; background: #F0FDF4; }
.fi-insight-card--green::before  { background: #16A34A; }

.fi-insight-card--red    { border-color: #FECACA; background: #FEF2F2; }
.fi-insight-card--red::before    { background: #DC2626; }

.fi-insight-card--amber  { border-color: #FDE68A; background: #FFFBEB; }
.fi-insight-card--amber::before  { background: #D97706; }

.fi-insight-card--blue   { border-color: #BAE6FD; background: #F0F9FF; }
.fi-insight-card--blue::before   { background: #0284C7; }

.fi-insight-icon {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.fi-insight-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.fi-insight-headline {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--tiq-text);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.fi-insight-card--green  .fi-insight-headline { color: #15803D; }
.fi-insight-card--red    .fi-insight-headline { color: #B91C1C; }
.fi-insight-card--amber  .fi-insight-headline { color: #92400E; }
.fi-insight-card--blue   .fi-insight-headline { color: #0369A1; }

.fi-insight-detail {
    font-size: 0.84rem;
    color: var(--tiq-text-3);
    line-height: 1.55;
}

@media (max-width: 768px) {
    .fi-insight-cards { padding: 1rem 1rem 0; }
}

/* ============================================================
   Home page
   ============================================================ */

.tiq-home-shell {
    max-width: 860px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.tiq-home-hero {
    padding: 2.5rem 0 1rem;
}

.tiq-home-eyebrow {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--tiq-green);
    margin-bottom: 0.75rem;
}

.tiq-home-brand-logo {
    height: 72px;
    width: auto;
    display: block;
    margin: 0 auto 1.25rem;
}

.tiq-home-hero-animation {
    display: block;
    width: 50vw;
    height: auto;
    margin: 0 auto 2rem;
}

.tiq-home-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--tiq-text);
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin: 0 0 1rem;
    text-align: center;
}

.tiq-home-subtitle {
    font-size: 1rem;
    color: var(--tiq-text-3);
    line-height: 1.75;
    max-width: 560px;
    margin: 0 auto 1.75rem;
    text-align: center;
}

.tiq-home-cta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.tiq-home-cta {
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
}

/* Hero split layout — image left, text right */
.tiq-home-hero-inner--split {
    display: flex;
    align-items: center;
    gap: 2.75rem;
}

.tiq-home-hero-visual {
    flex: 0 0 38%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tiq-home-hero-inner--split .tiq-home-brand-logo {
    margin: 0 0 1.25rem;
}

.tiq-home-hero-inner--split .tiq-home-hero-animation {
    width: 100%;
    margin: 0;
}

.tiq-home-hero-text {
    flex: 1 1 auto;
    min-width: 0;
}

.tiq-home-hero-inner--split .tiq-home-title,
.tiq-home-hero-inner--split .tiq-home-subtitle {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.tiq-home-hero-inner--split .tiq-home-cta-row {
    justify-content: flex-start;
}

@media (max-width: 700px) {
    .tiq-home-hero-inner--split {
        flex-direction: column;
        gap: 1.5rem;
    }
    .tiq-home-hero-visual {
        flex-basis: auto;
        width: 70%;
    }
    .tiq-home-hero-inner--split .tiq-home-title,
    .tiq-home-hero-inner--split .tiq-home-subtitle {
        text-align: center;
    }
    .tiq-home-hero-inner--split .tiq-home-cta-row {
        justify-content: center;
    }
}

/* Section label */
.tiq-home-section-label {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tiq-text-4);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--tiq-border);
}

/* Video grid */
.tiq-home-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 700px) {
    .tiq-home-video-grid { grid-template-columns: 1fr; }
}

.tiq-home-video-card {
    border: 1px solid var(--tiq-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--tiq-surface);
}

.tiq-home-video-thumb {
    aspect-ratio: 16/9;
    background: var(--tiq-surface-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.tiq-home-video-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0,178,122,0.12);
    border: 1.5px solid rgba(0,178,122,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tiq-green-dim);
}

.tiq-home-video-coming {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--tiq-text-4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tiq-home-video-info {
    padding: 12px 14px 14px;
}

.tiq-home-video-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tiq-text);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.tiq-home-video-desc {
    font-size: 0.78rem;
    color: var(--tiq-text-4);
    line-height: 1.55;
}

/* ── Getting-started checklist ──────────────────────────────────────── */
.tiq-home-setup-logo {
    display: flex;
    justify-content: center;
    padding: 48px 20px 28px;
}

.tiq-home-setup-anim {
    display: flex;
    justify-content: center;
    padding: 16px 20px 0;
}

.tiq-home-checklist {
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.tiq-home-checklist-heading {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tiq-text-4);
    margin-bottom: 10px;
}

.tiq-home-checklist-items {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tiq-border);
    border-radius: 10px;
    overflow: hidden;
}

.tiq-home-check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 16px;
    background: var(--tiq-surface);
    border-bottom: 1px solid var(--tiq-border);
    transition: background 0.15s;
}

.tiq-home-check-item:last-child {
    border-bottom: none;
}

.tiq-home-check-item--done {
    background: rgba(0, 178, 122, 0.04);
}

.tiq-home-check-item--locked {
    opacity: 0.45;
    pointer-events: none;
}

.tiq-home-check-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.tiq-home-check-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tiq-home-check-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--tiq-text-1);
}

.tiq-home-check-item--done .tiq-home-check-label {
    color: var(--tiq-text-3);
    text-decoration: line-through;
    text-decoration-color: rgba(0, 178, 122, 0.5);
}

.tiq-home-check-desc {
    font-size: 0.76rem;
    line-height: 1.55;
    color: var(--tiq-text-4);
    margin-top: 3px;
}

.tiq-home-check-action {
    flex-shrink: 0;
    align-self: flex-start;
    font-size: 0.76rem;
    font-weight: 600;
    color: #00B27A;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid rgba(0, 178, 122, 0.35);
    border-radius: 6px;
    transition: background 0.15s, border-color 0.15s;
}

.tiq-home-check-action:hover {
    background: rgba(0, 178, 122, 0.08);
    border-color: rgba(0, 178, 122, 0.6);
}

/* News feed */
.tiq-home-news-feed {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border: 1px solid var(--tiq-border);
    border-radius: 10px;
    overflow: hidden;
}

.tiq-home-news-item {
    padding: 16px 18px;
    background: var(--tiq-surface);
    border-bottom: 1px solid var(--tiq-border);
}

.tiq-home-news-item:last-child {
    border-bottom: none;
}

.tiq-home-news-date {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tiq-green-dim);
    margin-bottom: 4px;
}

.tiq-home-news-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--tiq-text);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.tiq-home-news-body {
    font-size: 0.82rem;
    color: var(--tiq-text-3);
    line-height: 1.65;
}

/* Home content sections — guide, competitors, ask, marketing */
.tiq-home-section-text {
    font-size: 0.88rem;
    color: var(--tiq-text-3);
    line-height: 1.7;
    margin: 0 0 1rem;
    max-width: 680px;
}

.tiq-home-section-cta {
    display: inline-block;
    margin-top: 0.25rem;
}

.tiq-home-here-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.25rem;
}

.tiq-home-text-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: #00B27A;
    text-decoration: none;
}

.tiq-home-text-link:hover {
    text-decoration: underline;
}

.tiq-home-ask-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tiq-border);
    border-radius: 10px;
    overflow: hidden;
}

.tiq-home-ask-list li {
    padding: 12px 16px;
    background: var(--tiq-surface);
    border-bottom: 1px solid var(--tiq-border);
    font-size: 0.86rem;
    color: var(--tiq-text);
    line-height: 1.5;
}

.tiq-home-ask-list li:last-child {
    border-bottom: none;
}

/* ── Instruments section (existing-user home) ───────────────────────────── */

.tiq-home-instruments {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tiq-home-instruments-eyebrow {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tiq-text-4);
    margin: 0;
}

.tiq-home-instruments-intro {
    font-size: 0.9rem;
    color: var(--tiq-text-3);
    line-height: 1.7;
    margin: 0;
    max-width: 600px;
}

.tiq-home-instruments-intro strong {
    color: var(--tiq-text-2);
    font-weight: 600;
}

.tiq-home-instruments-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tiq-home-instrument-card {
    background: var(--tiq-surface);
    border: 1px solid var(--tiq-border);
    border-top-width: 3px;
    border-radius: var(--tiq-radius-lg);
    padding: 1.35rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.tiq-home-instrument-card:hover {
    box-shadow: var(--tiq-shadow);
}

.tiq-home-instrument-card--command {
    border-top-color: var(--tiq-green);
}

.tiq-home-instrument-card--chat {
    border-top-color: #7C3AED;
}

.tiq-home-instrument-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tiq-home-instrument-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--tiq-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tiq-home-instrument-icon--command {
    background: var(--tiq-green-light);
    color: var(--tiq-green-dim);
}

.tiq-home-instrument-icon--chat {
    background: #F5F3FF;
    color: #6D28D9;
}

.tiq-home-instrument-sublabel {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--tiq-text-4);
    margin: 0 0 2px;
}

.tiq-home-instrument-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tiq-text);
    letter-spacing: -0.02em;
    margin: 0;
}

.tiq-home-instrument-role {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 9px;
    border-radius: 20px;
    align-self: flex-start;
}

.tiq-home-instrument-role--command {
    background: var(--tiq-green-light);
    color: var(--tiq-green-dim);
    border: 1px solid rgba(0, 178, 122, 0.25);
}

.tiq-home-instrument-role--chat {
    background: #F5F3FF;
    color: #6D28D9;
    border: 1px solid #DDD6FE;
}

.tiq-home-instrument-desc {
    font-size: 0.85rem;
    color: var(--tiq-text-3);
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

.tiq-home-instrument-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 2px;
    border-top: 1px solid var(--tiq-border);
}

.tiq-home-instrument-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--tiq-text-3);
    background: var(--tiq-surface-2);
    border: 1px solid var(--tiq-border);
    border-radius: 20px;
    padding: 3px 9px;
    white-space: nowrap;
}

.tiq-home-instrument-cta {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--tiq-radius);
    text-decoration: none;
    border: 1.5px solid;
    transition: background 0.15s;
    align-self: flex-start;
    margin-top: auto;
}

.tiq-home-instrument-cta--command {
    border-color: rgba(0, 178, 122, 0.4);
    color: var(--tiq-green-dim);
}

.tiq-home-instrument-cta--command:hover {
    background: var(--tiq-green-light);
}

.tiq-home-instrument-cta--chat {
    border-color: #DDD6FE;
    color: #6D28D9;
}

.tiq-home-instrument-cta--chat:hover {
    background: #F5F3FF;
}

.tiq-home-instruments-flow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tiq-home-instruments-flow-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--tiq-radius);
    background: var(--tiq-surface-2);
    border: 1px solid var(--tiq-border);
}

.tiq-home-instruments-flow-step--chat {
    color: #6D28D9;
}

.tiq-home-instruments-flow-step--command {
    color: var(--tiq-green-dim);
}

.tiq-home-instruments-flow-arrow {
    color: var(--tiq-text-4);
    display: flex;
    align-items: center;
}

@media (max-width: 640px) {
    .tiq-home-instruments-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Guide page
   ============================================================ */

.tiq-guide-shell {
    min-height: 100vh;
}

.tiq-guide-hero {
    background: var(--tiq-surface);
    border-bottom: 1px solid var(--tiq-border);
    padding: 28px 24px 24px;
}

.tiq-guide-hero-inner {
    max-width: 680px;
    margin: 0 auto;
}

.tiq-guide-hero-eyebrow {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #00B27A;
    margin-bottom: 8px;
}

.tiq-guide-hero-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--tiq-text-1);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 10px;
}

.tiq-guide-hero-sub {
    font-size: 0.88rem;
    color: var(--tiq-text-3);
    line-height: 1.55;
    margin: 0;
    max-width: 560px;
}

.tiq-guide-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.tiq-guide-section-label {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tiq-text-4);
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--tiq-border);
}

.tiq-guide-section-intro {
    font-size: 0.88rem;
    color: var(--tiq-text-3);
    line-height: 1.65;
    margin: -8px 0 24px;
}

.tiq-guide-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.tiq-guide-card {
    background: var(--tiq-surface);
    border: 1px solid var(--tiq-border);
    border-radius: 12px;
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tiq-guide-card--coming-soon {
    opacity: 0.6;
}

.tiq-guide-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: rgba(0, 178, 122, 0.1);
    color: #00B27A;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tiq-guide-card-icon--meta  { background: rgba(24, 119, 242, 0.1); color: #1877F2; }
.tiq-guide-card-icon--mail  { background: rgba(234, 88, 12, 0.1);  color: #EA580C; }
.tiq-guide-card-icon--sms   { background: rgba(124, 58, 237, 0.1); color: #7C3AED; }
.tiq-guide-card-icon--email { background: rgba(2, 132, 199, 0.1);  color: #0284C7; }
.tiq-guide-card-icon--app   { background: rgba(0, 178, 122, 0.1);  color: #00B27A; }

.tiq-guide-card-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tiq-text-4);
    background: var(--tiq-bg);
    border: 1px solid var(--tiq-border);
    border-radius: 4px;
    padding: 2px 7px;
    align-self: flex-start;
}

.tiq-guide-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tiq-text-1);
    letter-spacing: -0.01em;
}

.tiq-guide-card-body {
    font-size: 0.82rem;
    color: var(--tiq-text-3);
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.tiq-guide-card-body p { margin: 0; }
.tiq-guide-card-body strong { color: var(--tiq-text-2); font-weight: 600; }

.tiq-guide-card-list {
    margin: 2px 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tiq-guide-card-meta {
    font-size: 0.72rem;
    color: var(--tiq-text-4);
    border-top: 1px solid var(--tiq-border);
    padding-top: 10px;
    margin-top: 4px;
}

.tiq-guide-card-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: #00B27A;
    text-decoration: none;
    margin-top: 4px;
    align-self: flex-start;
}

.tiq-guide-card-link:hover { text-decoration: underline; }

/* Guide index list */
.tiq-guide-index-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tiq-border);
    border-radius: 10px;
    overflow: hidden;
}

.tiq-guide-index-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    align-items: baseline;
    padding: 14px 18px;
    border-bottom: 1px solid var(--tiq-border);
    text-decoration: none;
    background: var(--tiq-surface);
    transition: background 0.15s;
}

.tiq-guide-index-row:last-child {
    border-bottom: none;
}

.tiq-guide-index-row:hover {
    background: rgba(0, 178, 122, 0.04);
}

.tiq-guide-index-row--soon {
    opacity: 0.55;
    pointer-events: none;
}

.tiq-guide-index-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #00B27A;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tiq-guide-index-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tiq-text-4);
    background: var(--tiq-bg);
    border: 1px solid var(--tiq-border);
    border-radius: 4px;
    padding: 1px 6px;
}

.tiq-guide-index-desc {
    font-size: 0.82rem;
    color: var(--tiq-text-3);
    line-height: 1.55;
}

@media (max-width: 640px) {
    .tiq-guide-card-grid { grid-template-columns: 1fr; }
    .tiq-guide-hero-title { font-size: 1.5rem; }
    .tiq-guide-index-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ── Address autocomplete dropdown ─────────────────────────────────────── */
.tiq-address-suggestions {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 240px;
    overflow-y: auto;
}

.tiq-address-suggestion-item {
    padding: 9px 14px;
    font-size: 0.84rem;
    color: #1a1a1a;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    line-height: 1.45;
}

.tiq-address-suggestion-item:last-child { border-bottom: none; }
.tiq-address-suggestion-item:hover { background: rgba(0, 178, 122, 0.08); }

/* Competitor map popup — Remove button */
.tiq-comp-popup-remove {
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.tiq-comp-popup-remove:hover { text-decoration: underline; }

/* Mapbox icon tooltip — pointer-events:none prevents popup DOM triggering mouseleave loop */
.tiq-hover-tooltip,
.tiq-hover-tooltip * {
    pointer-events: none !important;
}
