/* Fragranote — Interactive Tool Page Styles */
/* Loaded on Climate Matcher, Clone Finder, and Compare pages. */

.fn-tool-page {
    padding-block: 3rem;
}

.fn-tool-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--fn-border);
}

.fn-tool-header h1 {
    font-size: clamp( 1.6rem, 3vw, 2.2rem );
    margin: 0 0 0.5rem;
}

#fn-tool-root {
    min-height: 400px;
}

/* ── Shared step UI ──────────────────────────────────────────────────────────── */

.fn-tool-step {
    background: var(--fn-surface-2);
    border: 1px solid var(--fn-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.fn-tool-step__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fn-gold);
    margin-bottom: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CLIMATE MATCHER
══════════════════════════════════════════════════════════════════════════════ */

.fn-cm {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* City input */
.fn-cm-city-wrap {
    margin-bottom: 0.85rem;
}

.fn-cm-city-input {
    width: 100%;
    background: var(--fn-surface);
    border: 1px solid var(--fn-border);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-family: var(--fn-font-body);
    font-size: 0.95rem;
    color: var(--fn-text);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.fn-cm-city-input:focus {
    border-color: var(--fn-gold-border);
}

.fn-cm-city-input::placeholder {
    color: var(--fn-text-muted);
}

.fn-cm-city-hint {
    font-size: 0.8rem;
    color: var(--fn-text-muted);
    margin: 0.35rem 0 0;
}

/* Popular city quick-pick buttons */
.fn-cm-popular {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

/* Zone selector grid */
.fn-cm-zones {
    display: grid;
    grid-template-columns: repeat( 5, 1fr );
    gap: 0.5rem;
}

.fn-cm-zone {
    background: var(--fn-surface);
    border: 1px solid var(--fn-border);
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.fn-cm-zone:hover {
    border-color: var(--fn-gold-border);
}

.fn-cm-zone--active {
    border-color: var(--fn-gold);
    background: var(--fn-gold-dim);
}

.fn-cm-zone__emoji { font-size: 1.4rem; line-height: 1; }
.fn-cm-zone__label { font-size: 0.78rem; font-weight: 600; color: var(--fn-text); }
.fn-cm-zone__desc  { font-size: 0.68rem; color: var(--fn-text-muted); }
.fn-cm-zone__cities { font-size: 0.62rem; color: var(--fn-text-muted); margin-top: 0.1rem; }

.fn-cm-zone-detected {
    margin: 0.85rem 0 0;
    font-size: 0.85rem;
    color: var(--fn-text-muted);
}

.fn-cm-zone-detected strong { color: var(--fn-text); }

/* Preferences */
.fn-cm-prefs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Search CTA */
.fn-cm-search-btn {
    margin: 1rem 0;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    align-self: flex-start;
}

.fn-cm-search-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Results */
.fn-cm-results {
    margin-top: 2rem;
}

.fn-cm-results__title {
    font-size: 1.1rem;
    margin: 0 0 1.25rem;
}

.fn-cm-grid {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 1rem;
}

/* Climate Matcher result card */
.fn-cm-card {
    display: block;
    background: var(--fn-surface-2);
    border: 1px solid var(--fn-border);
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    color: var(--fn-text);
    transition: border-color 0.15s, transform 0.15s;
}

.fn-cm-card:hover {
    border-color: var(--fn-gold-border);
    transform: translateY( -2px );
}

.fn-cm-card__title {
    font-family: var(--fn-font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--fn-text);
}

.fn-cm-card__climate {
    margin: 0.75rem 0 0.5rem;
}

.fn-cm-card__climate-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fn-text-muted);
    margin-bottom: 0.35rem;
}

.fn-cm-score-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fn-cm-score-bar__track {
    flex: 1;
    height: 6px;
    background: var(--fn-border);
    border-radius: 3px;
    overflow: hidden;
}

.fn-cm-score-bar__fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.fn-cm-score-bar__val {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.fn-cm-score-bar__val small {
    font-weight: 400;
    font-size: 0.68rem;
    opacity: 0.8;
}

.fn-cm-card__price {
    font-size: 0.82rem;
    color: var(--fn-text-muted);
    margin-top: 0.5rem;
}

.fn-cm-card__price strong { color: var(--fn-text); }

/* ═══════════════════════════════════════════════════════════════════════════════
   CLONE FINDER
══════════════════════════════════════════════════════════════════════════════ */

.fn-cf {
    max-width: 820px;
}

/* Search input with dropdown */
.fn-cf-search-wrap {
    position: relative;
    margin-bottom: 1.5rem;
}

.fn-cf-search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--fn-surface-2);
    border: 1px solid var(--fn-border);
    border-radius: 10px;
    padding: 0.25rem 0.75rem;
    transition: border-color 0.15s;
}

.fn-cf-search-input-wrap:focus-within {
    border-color: var(--fn-gold-border);
}

.fn-cf-search-icon {
    color: var(--fn-text-muted);
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.fn-cf-search-input {
    flex: 1;
    background: none;
    border: none;
    padding: 0.6rem 0.25rem;
    font-family: var(--fn-font-body);
    font-size: 0.95rem;
    color: var(--fn-text);
    outline: none;
}

.fn-cf-search-input::placeholder { color: var(--fn-text-muted); }

.fn-cf-clear-btn {
    background: none;
    border: none;
    color: var(--fn-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.85rem;
    line-height: 1;
}

.fn-cf-clear-btn:hover { color: var(--fn-danger); }

/* Dropdown */
.fn-cf-dropdown {
    position: absolute;
    top: calc( 100% + 4px );
    left: 0;
    right: 0;
    background: var(--fn-surface-2);
    border: 1px solid var(--fn-gold-border);
    border-radius: 10px;
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    max-height: 280px;
    overflow-y: auto;
}

.fn-cf-dropdown--empty {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    color: var(--fn-text-muted);
}

.fn-cf-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.1s;
}

.fn-cf-dropdown__item:hover,
.fn-cf-dropdown__item:focus {
    background: rgba( 255,255,255,0.05 );
    outline: none;
}

.fn-cf-dropdown__name { flex: 1; color: var(--fn-text); }

/* Selected fragrance banner */
.fn-cf-selected {
    background: var(--fn-surface-2);
    border: 1px solid var(--fn-border);
    border-left: 3px solid var(--fn-gold);
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 2rem;
}

.fn-cf-selected__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fn-gold);
    margin-bottom: 0.25rem;
}

.fn-cf-selected__name {
    font-family: var(--fn-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fn-text);
}

.fn-cf-selected__brand { color: var(--fn-gold); }

.fn-cf-selected__price {
    font-size: 0.85rem;
    color: var(--fn-text-muted);
    margin-top: 0.25rem;
}

.fn-cf-selected__price strong { color: var(--fn-text); }

/* Section headers */
.fn-cf-section {
    margin-bottom: 2.5rem;
}

.fn-cf-section__title {
    font-size: 1.1rem;
    font-family: var(--fn-font-heading);
    margin: 0 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.fn-cf-section__desc {
    font-size: 0.85rem;
    color: var(--fn-text-muted);
    margin: 0 0 1rem;
}

/* Clone cards grid */
.fn-cf-clones-grid {
    display: grid;
    grid-template-columns: repeat( 2, 1fr );
    gap: 0.75rem;
}

.fn-cf-clone-card {
    background: var(--fn-surface-2);
    border: 1px solid var(--fn-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    transition: border-color 0.15s;
}

.fn-cf-clone-card:hover { border-color: var(--fn-gold-border); }

.fn-cf-clone-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.fn-cf-clone-card__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--fn-text);
    flex: 1;
}

.fn-cf-clone-card__prices {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.fn-cf-price { font-size: 0.85rem; color: var(--fn-text); }
.fn-cf-price--dim { color: var(--fn-text-muted); }
.fn-cf-price strong { color: var(--fn-gold); }

.fn-cf-savings {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--fn-success);
    font-weight: 600;
}

.fn-cf-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    white-space: nowrap;
}

/* Similar fragrances grid */
.fn-cf-similar-grid {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 0.75rem;
}

.fn-cf-similar-card {
    display: block;
    background: var(--fn-surface-2);
    border: 1px solid var(--fn-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: var(--fn-text);
    transition: border-color 0.15s, transform 0.15s;
}

.fn-cf-similar-card:hover {
    border-color: var(--fn-gold-border);
    transform: translateY( -1px );
}

.fn-cf-similar-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.5rem;
}

.fn-cf-similar-card__title {
    font-weight: 600;
    font-size: 0.88rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media ( max-width: 900px ) {
    .fn-cm-zones { grid-template-columns: repeat( 3, 1fr ); }
    .fn-cm-grid  { grid-template-columns: repeat( 2, 1fr ); }
    .fn-cf-similar-grid { grid-template-columns: repeat( 2, 1fr ); }
}

@media ( max-width: 640px ) {
    .fn-cm-zones { grid-template-columns: repeat( 2, 1fr ); }
    .fn-cm-grid  { grid-template-columns: 1fr; }
    .fn-cf-clones-grid  { grid-template-columns: 1fr; }
    .fn-cf-similar-grid { grid-template-columns: 1fr; }
    .fn-cm-search-btn { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   COMPARATOR
══════════════════════════════════════════════════════════════════════════════ */

/* ── Selector mode ──────────────────────────────────────────────────────────── */

.fn-cmp-selector {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fn-cmp-slots {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 1rem;
}

.fn-cmp-slot {
    position: relative;
    background: var(--fn-surface-2);
    border: 1px solid var(--fn-border);
    border-radius: 12px;
    padding: 1rem;
    transition: border-color 0.2s;
}

.fn-cmp-slot--filled {
    border-color: var(--fn-gold-border);
}

.fn-cmp-slot__num {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fn-gold);
    margin-bottom: 0.5rem;
}

.fn-cmp-slot__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.fn-cmp-slot__input {
    width: 100%;
    background: var(--fn-surface);
    border: 1px solid var(--fn-border);
    border-radius: 8px;
    color: var(--fn-text);
    font-size: 0.9rem;
    padding: 0.55rem 2.25rem 0.55rem 0.75rem;
    outline: none;
    transition: border-color 0.2s;
}

.fn-cmp-slot__input:focus {
    border-color: var(--fn-gold-border);
}

.fn-cmp-slot__spinner {
    position: absolute;
    right: 0.6rem;
}

.fn-cmp-slot__remove {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--fn-text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem 0.35rem;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s;
}

.fn-cmp-slot__remove:hover { color: var(--fn-danger); }

.fn-cmp-dropdown {
    /* inherits .fn-cf-dropdown positioning — defined above */
}

.fn-cmp-selector__footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.fn-cmp-compare-btn {
    font-size: 1rem;
    padding: 0.7rem 2rem;
}

.fn-cmp-error {
    color: var(--fn-danger);
    font-size: 0.88rem;
    margin: 0;
    padding: 0.5rem 0.75rem;
    background: rgba( 224, 85, 85, 0.1 );
    border: 1px solid rgba( 224, 85, 85, 0.25 );
    border-radius: 8px;
}

/* ── Results mode ───────────────────────────────────────────────────────────── */

.fn-cmp-results {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Header row — one column per fragrance */
.fn-cmp-header {
    display: grid;
    grid-template-columns: repeat( var(--fn-cmp-cols, 2), 1fr );
    gap: 1px;
    background: var(--fn-border);
    border: 1px solid var(--fn-border);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    margin-bottom: 0;
}

.fn-cmp-header__col {
    background: var(--fn-surface-2);
    padding: 1.25rem 1.5rem;
}

.fn-cmp-header__brand {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--fn-gold);
    margin-bottom: 0.2rem;
}

.fn-cmp-header__title {
    font-family: var(--fn-font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fn-text);
    text-decoration: none;
    display: block;
    transition: color 0.15s;
}

.fn-cmp-header__title:hover { color: var(--fn-gold); }

/* Similarity band */
.fn-cmp-similarity {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba( 201, 168, 76, 0.08 );
    border: 1px solid var(--fn-gold-border);
    border-top: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.88rem;
}

.fn-cmp-similarity__label {
    color: var(--fn-text-muted);
    flex-shrink: 0;
}

.fn-cmp-similarity__score {
    font-family: var(--fn-font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--fn-gold);
}

.fn-cmp-similarity__desc { color: var(--fn-text-muted); }

/* Sections */
.fn-cmp-section {
    border: 1px solid var(--fn-border);
    border-top: none;
    padding: 1.5rem;
}

.fn-cmp-section:last-child {
    border-radius: 0 0 12px 12px;
}

.fn-cmp-section__title {
    font-family: var(--fn-font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fn-gold);
    margin: 0 0 1.1rem;
}

/* Comparison table */
.fn-cmp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.fn-cmp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 480px;
}

.fn-cmp-table thead th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--fn-text-muted);
    border-bottom: 1px solid var(--fn-border);
}

.fn-cmp-table__label-col {
    width: 110px;
    color: var(--fn-text-muted);
}

.fn-cmp-row-label {
    padding: 0.6rem 0.75rem;
    color: var(--fn-text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    vertical-align: middle;
}

.fn-cmp-cell {
    padding: 0.55rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba( 255,255,255,0.04 );
}

.fn-cmp-cell--winner {
    background: rgba( 201, 168, 76, 0.06 );
}

/* Score bar inside cell */
.fn-cmp-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fn-cmp-score__bar-track {
    flex: 1;
    height: 6px;
    background: rgba( 255,255,255,0.08 );
    border-radius: 3px;
    overflow: hidden;
    min-width: 50px;
}

.fn-cmp-score__bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.fn-cmp-score__num {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 36px;
    text-align: right;
}

.fn-cmp-crown {
    font-size: 0.85rem;
    line-height: 1;
}

.fn-cmp-tie {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--fn-text-muted);
    border: 1px solid var(--fn-border);
    border-radius: 4px;
    padding: 0.1rem 0.3rem;
}

/* Price cell */
.fn-cmp-price {
    font-size: 0.88rem;
    color: var(--fn-text);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.fn-cmp-price strong { font-weight: 600; }

/* Shared notes */
.fn-note-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.fn-note-pill {
    background: var(--fn-surface-2);
    border: 1px solid var(--fn-border);
    border-radius: 20px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    color: var(--fn-text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.fn-cmp-shared-note { border-color: rgba( 201, 168, 76, 0.3 ); }

.fn-cmp-shared-note__badge {
    background: rgba( 201, 168, 76, 0.15 );
    color: var(--fn-gold);
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.1rem 0.4rem;
}

/* Notes profiles grid */
.fn-cmp-notes-grid {
    display: grid;
    grid-template-columns: repeat( var(--fn-cmp-cols, 2), 1fr );
    gap: 1rem;
}

.fn-cmp-notes-col {
    background: var(--fn-surface);
    border: 1px solid var(--fn-border);
    border-radius: 10px;
    padding: 1rem;
}

.fn-cmp-notes-col__name {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--fn-gold);
}

.fn-cmp-notes-layer {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    line-height: 1.4;
}

.fn-cmp-notes-layer__label {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--fn-text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 0.1rem;
    min-width: 36px;
}

.fn-cmp-notes-layer__notes { color: var(--fn-text); }

/* Verdict grid */
.fn-cmp-verdict { background: rgba( 201, 168, 76, 0.03 ); }

.fn-cmp-verdict-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 140px, 1fr ) );
    gap: 0.75rem;
}

.fn-cmp-verdict-card {
    background: var(--fn-surface);
    border: 1px solid var(--fn-border);
    border-radius: 10px;
    padding: 0.85rem;
}

.fn-cmp-verdict-card__cat {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--fn-text-muted);
    margin-bottom: 0.35rem;
}

.fn-cmp-verdict-card__winner {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--fn-text);
    line-height: 1.3;
}

.fn-cmp-verdict-card__winner--tie { color: var(--fn-text-muted); font-weight: 400; }

/* Actions bar */
.fn-cmp-actions {
    border: 1px solid var(--fn-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: var(--fn-surface-2);
}

.fn-cmp-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.fn-cmp-share__label {
    font-size: 0.82rem;
    color: var(--fn-text-muted);
    flex-shrink: 0;
}

.fn-cmp-share__url {
    flex: 1;
    min-width: 0;
    background: var(--fn-surface);
    border: 1px solid var(--fn-border);
    border-radius: 8px;
    color: var(--fn-text-muted);
    font-size: 0.82rem;
    padding: 0.4rem 0.75rem;
    outline: none;
    cursor: text;
}

.fn-cmp-share__url:focus { border-color: var(--fn-gold-border); }

/* ── Comparator responsive ──────────────────────────────────────────────────── */

@media ( max-width: 900px ) {
    .fn-cmp-slots { grid-template-columns: 1fr 1fr; }
    .fn-cmp-slots > :last-child { grid-column: 1 / -1; }
    .fn-cmp-notes-grid { grid-template-columns: 1fr 1fr; }
}

@media ( max-width: 640px ) {
    .fn-cmp-slots { grid-template-columns: 1fr; }
    .fn-cmp-slots > :last-child { grid-column: unset; }
    .fn-cmp-header { grid-template-columns: 1fr !important; }
    .fn-cmp-notes-grid { grid-template-columns: 1fr !important; }
    .fn-cmp-table { min-width: 360px; }
    .fn-cmp-actions { flex-direction: column; align-items: stretch; }
    .fn-cmp-share { flex-direction: column; align-items: stretch; }
    .fn-cmp-verdict-grid { grid-template-columns: repeat( 2, 1fr ); }
}

/* ── Vanilla JS tool shared styles ──────────────────────────────────────────── */

/* City input — Climate Matcher */
.fn-cm-city-row { margin-bottom: 1.25rem; }

.fn-cm-city-input {
    width: 100%;
    background: var(--fn-surface);
    border: 1px solid var(--fn-border);
    border-radius: var(--fn-radius);
    padding: 0.75rem 1.1rem;
    font-family: var(--fn-font-body);
    font-size: 0.95rem;
    color: var(--fn-text);
    outline: none;
    transition: border-color var(--fn-ease), box-shadow var(--fn-ease);
    box-shadow: var(--fn-shadow);
}
.fn-cm-city-input:focus {
    border-color: var(--fn-gold-border);
    box-shadow: 0 0 0 3px var(--fn-gold-dim);
}
.fn-cm-city-input::placeholder { color: var(--fn-text-dim); }

/* Zone selector grid */
.fn-cm-zones-grid {
    display: grid;
    grid-template-columns: repeat( 5, 1fr );
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.fn-cm-zone-card {
    background: var(--fn-surface);
    border: 2px solid var(--fn-border);
    border-radius: var(--fn-radius);
    padding: 1.25rem 0.75rem;
    cursor: pointer;
    text-align: center;
    transition: all var(--fn-ease);
    font-family: var(--fn-font-body);
}
.fn-cm-zone-card:hover {
    border-color: var(--fn-gold-border);
    transform: translateY( -2px );
    box-shadow: var(--fn-shadow);
}
.fn-cm-zone-card--active {
    border-color: var(--fn-gold);
    background: var(--fn-gold-dim);
    box-shadow: var(--fn-glow-gold);
}
.fn-cm-zone-card__label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--fn-text);
    margin-bottom: 0.35rem;
}
.fn-cm-zone-card--active .fn-cm-zone-card__label { color: var(--fn-gold); }
.fn-cm-zone-card__temp  { font-size: 0.72rem; color: var(--fn-text-muted); }
.fn-cm-zone-card__cities {
    font-size: 0.65rem;
    color: var(--fn-text-dim);
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Filters row */
.fn-cm-filters {
    background: var(--fn-surface);
    border: 1px solid var(--fn-border);
    border-radius: var(--fn-radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* Climate result cards */
.fn-cm-results-grid {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 1.25rem;
    margin-top: 1rem;
}

.fn-cm-card {
    background: var(--fn-surface);
    border: 1px solid var(--fn-border);
    border-radius: var(--fn-radius);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--fn-ease);
}
.fn-cm-card:hover {
    border-color: var(--fn-gold-border);
    transform: translateY( -2px );
    box-shadow: var(--fn-shadow);
    color: inherit;
}
.fn-cm-card__score {
    font-family: var(--fn-font-heading);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    width: 56px;
    text-align: center;
}
.fn-cm-card__score span { font-size: 0.75rem; opacity: 0.6; }
.fn-cm-card__info { flex: 1; min-width: 0; }
.fn-cm-card__brand {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fn-gold);
}
.fn-cm-card__name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--fn-text);
    margin-bottom: 0.35rem;
}
.fn-cm-card__meta { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.fn-cm-card__price { font-size: 0.78rem; color: var(--fn-text-muted); }
.fn-cm-card__price strong { color: var(--fn-success); }

/* ── Clone Finder ────────────────────────────────────────────────────────────── */

.fn-cf-source-card {
    background: var(--fn-surface);
    border: 1px solid var(--fn-gold-border);
    border-radius: var(--fn-radius-lg);
    padding: 1.5rem;
}
.fn-cf-source-card__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.fn-cf-source-brand {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fn-gold);
    margin-bottom: 0.25rem;
}
.fn-cf-source-name  { font-size: 1.25rem; font-weight: 700; color: var(--fn-text); margin-bottom: 0.5rem; }
.fn-cf-source-meta  { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.fn-cf-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fn-cf-clones-grid { display: grid; grid-template-columns: repeat( 2, 1fr ); gap: 1rem; }

.fn-cf-clone-card {
    background: var(--fn-surface);
    border: 1px solid var(--fn-border);
    border-radius: var(--fn-radius);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: border-color var(--fn-ease), box-shadow var(--fn-ease);
}
.fn-cf-clone-card:hover {
    border-color: var(--fn-gold-border);
    box-shadow: var(--fn-shadow);
}
.fn-cf-clone-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.fn-cf-clone-name   { font-weight: 600; font-size: 0.9rem; color: var(--fn-text); }
.fn-cf-clone-prices { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--fn-text-muted); }
.fn-cf-clone-prices strong { color: var(--fn-success); }
.fn-cf-savings { font-size: 0.75rem; font-weight: 600; color: var(--fn-success); }

/* Autocomplete dropdown */
.fn-cf-dropdown {
    position: absolute;
    top: calc( 100% + 4px );
    left: 0;
    right: 0;
    background: var(--fn-surface);
    border: 1px solid var(--fn-border);
    border-radius: var(--fn-radius);
    box-shadow: var(--fn-shadow-lg);
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
}
.fn-cf-dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    font-family: var(--fn-font-body);
    font-size: 0.9rem;
    color: var(--fn-text);
    cursor: pointer;
    text-align: left;
    transition: background var(--fn-ease);
    border-bottom: 1px solid var(--fn-border);
    gap: 0.5rem;
}
.fn-cf-dropdown-item:last-child { border-bottom: none; }
.fn-cf-dropdown-item:hover { background: var(--fn-surface-2); }

/* ── Compare — vanilla JS override slots ─────────────────────────────────────── */

.fn-cmp-slot--filled {
    border-style: solid !important;
    border-color: var(--fn-gold-border) !important;
    background: var(--fn-gold-dim) !important;
}

/* ── Shared empty / loading ──────────────────────────────────────────────────── */

.fn-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--fn-text-muted);
    background: var(--fn-surface);
    border: 1px dashed var(--fn-border);
    border-radius: var(--fn-radius-lg);
}

.fn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem;
    color: var(--fn-text-muted);
    font-size: 0.9rem;
}

.fn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--fn-border-strong);
    border-top-color: var(--fn-gold);
    border-radius: 50%;
    animation: fn-spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes fn-spin { to { transform: rotate(360deg); } }

/* Results header */
.fn-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.fn-results-count {
    font-size: 0.85rem;
    color: var(--fn-text-muted);
    font-weight: 500;
}

/* Pagination */
.fn-react-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.fn-react-pagination__btn {
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--fn-border);
    border-radius: var(--fn-radius);
    background: var(--fn-surface);
    color: var(--fn-text-muted);
    font-family: var(--fn-font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--fn-ease);
}
.fn-react-pagination__btn:hover { border-color: var(--fn-gold-border); color: var(--fn-gold); }
.fn-react-pagination__btn--active {
    background: var(--fn-gold);
    border-color: var(--fn-gold);
    color: #13111a;
    font-weight: 700;
}

/* Vanilla tool responsive */
@media ( max-width: 900px ) {
    .fn-cm-zones-grid    { grid-template-columns: repeat( 3, 1fr ); }
    .fn-cm-results-grid  { grid-template-columns: repeat( 2, 1fr ); }
    .fn-cf-clones-grid   { grid-template-columns: 1fr; }
}
@media ( max-width: 640px ) {
    .fn-cm-zones-grid    { grid-template-columns: repeat( 2, 1fr ); }
    .fn-cm-results-grid  { grid-template-columns: 1fr; }
    .fn-cm-filters       { padding: 1rem; }
}
