
:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --bg-surface: #16161f;
    --border: #1e1e2a;
    --border-hover: #2a2a3a;
    --text: #e4e4ef;
    --text-muted: #8888a0;
    --text-dim: #5a5a70;
    --accent: #1D9E75;
    --accent-light: #5DCAA5;
    --accent-glow: rgba(29, 158, 117, 0.15);
    --green: #00cec9;
    --green-dim: rgba(0, 206, 201, 0.12);
    --red: #fd79a8;
    --red-dim: rgba(253, 121, 168, 0.12);
    --orange: #fdcb6e;
    --orange-dim: rgba(253, 203, 110, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Nav */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.nav-logo {
    display: flex; align-items: center; gap: 0.75rem;
    font-weight: 700; font-size: 1.15rem; color: var(--text);
    text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo svg { flex-shrink: 0; }
.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-links a {
    padding: 0.5rem 0.85rem; border-radius: var(--radius-xs);
    color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
    transition: all 0.2s; text-decoration: none;
}
.nav-links a:hover { color: var(--text); background: var(--bg-card); text-decoration: none; }

/* Hero */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero h1 span {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Search */
.search-box {
    max-width: 560px; margin: 0 auto;
    position: relative;
}
.search-box input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 1.05rem;
    outline: none;
    transition: all 0.3s;
}
.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}
.search-box input::placeholder { color: var(--text-dim); }
.search-icon {
    position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%);
    color: var(--text-dim); pointer-events: none;
}
.search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 400px; overflow-y: auto;
    display: none; z-index: 50;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.search-results.active { display: block; }
.search-result-item {
    padding: 0.85rem 1.25rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-card-hover); }
.search-result-item .city-name { font-weight: 600; }
.search-result-item .city-state { color: var(--text-muted); font-size: 0.85rem; }
.search-result-item .city-index {
    font-size: 0.8rem; font-weight: 600;
    padding: 0.2rem 0.6rem; border-radius: 20px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all 0.3s;
}
.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Stats */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.stat {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    text-align: center;
}
.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Cost Index Badge */
.cost-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
}
.cost-low { background: var(--green-dim); color: var(--green); }
.cost-mid { background: var(--orange-dim); color: var(--orange); }
.cost-high { background: var(--red-dim); color: var(--red); }

/* Compare Bar */
.compare-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.compare-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-surface);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.compare-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.compare-bar-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 120px;
}
.compare-bar-value {
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 80px;
    text-align: right;
}

/* Compare layout */
.compare-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    text-align: center;
    padding: 3rem 0;
}
.compare-vs {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: 2px solid var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem; color: var(--accent-light);
}
.compare-city h2 {
    font-size: 1.5rem;
    font-weight: 700;
}
.compare-city .state {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.compare-row {
    display: grid;
    grid-template-columns: 1fr 120px 1fr;
    gap: 0;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.compare-row:last-child { border-bottom: none; }
.compare-cell {
    font-size: 1.5rem;
    font-weight: 700;
}
.compare-cell-left { text-align: right; padding-right: 2rem; }
.compare-cell-right { text-align: left; padding-left: 2rem; }
.compare-label {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.compare-diff {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 600;
}
.diff-lower { color: var(--green); }
.diff-higher { color: var(--red); }

/* Rankings table */
.rankings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.rankings-table th {
    text-align: left;
    padding: 0.85rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.rankings-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}
.rankings-table tr:hover td { background: var(--bg-card-hover); }
.rank-num {
    font-weight: 800;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Section */
section { padding: 4rem 0; }
section h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}
section .section-sub {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 0.5rem;
}
.mobile-menu {
    display: none;
    border-top: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1rem;
}
.mobile-menu a {
    display: block;
    padding: 0.65rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--text); }
.mobile-menu.active { display: block; }

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-light); text-decoration: underline; }
.breadcrumb-sep { color: var(--text-dim); }

/* FAQ Accordion */
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] summary svg { transform: rotate(180deg); }
details summary:hover { background: var(--bg-card-hover); }

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .hero { padding: 3rem 0 2.5rem; }
    .compare-header { grid-template-columns: 1fr; gap: 1rem; }
    .compare-row { grid-template-columns: 1fr; gap: 0.5rem; text-align: center; }
    .compare-cell-left, .compare-cell-right { text-align: center; padding: 0; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
