/**
 * Credora — Styles
 * Includes: dark/light theme variables, layout, components, responsive
 */

/* ── DARK THEME (default) ── */
:root, [data-theme="dark"] {
    --bg: #09090b;
    --surface: #18181b;
    --surface-2: #1f1f23;
    --surface-3: #27272a;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #818cf8;
    --accent-dim: rgba(129,140,248,0.12);
    --accent-glow: rgba(129,140,248,0.25);
    --green: #34d399;
    --green-dim: rgba(52,211,153,0.12);
    --orange: #fb923c;
    --orange-dim: rgba(251,146,60,0.12);
    --red: #f87171;
    --red-dim: rgba(248,113,113,0.12);
    --purple: #c084fc;
    --purple-dim: rgba(192,132,252,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3);
    --nav-bg: rgba(9,9,11,0.85);
    --seg-active-text: #fff;
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
    --bg: #f8f9fa;
    --surface: #ffffff;
    --surface-2: #f1f3f5;
    --surface-3: #e9ecef;
    --border: rgba(0,0,0,0.08);
    --border-hover: rgba(0,0,0,0.15);
    --text: #1a1a2e;
    --text-secondary: #495057;
    --text-muted: #868e96;
    --accent: #6366f1;
    --accent-dim: rgba(99,102,241,0.1);
    --accent-glow: rgba(99,102,241,0.2);
    --green: #059669;
    --green-dim: rgba(5,150,105,0.1);
    --orange: #ea580c;
    --orange-dim: rgba(234,88,12,0.1);
    --red: #dc2626;
    --red-dim: rgba(220,38,38,0.1);
    --purple: #9333ea;
    --purple-dim: rgba(147,51,234,0.1);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
    --nav-bg: rgba(248,249,250,0.9);
    --seg-active-text: #fff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
}
.nav-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 56px;
}
/* ── THEME TOGGLE ── */
.theme-toggle {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 100px; padding: 4px;
    cursor: pointer; user-select: none;
}
.theme-toggle-option {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    font-size: 14px; transition: all 0.2s;
    color: var(--text-muted);
}
.theme-toggle-option.active {
    background: var(--accent); color: #fff;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.nav-brand {
    font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text);
}
.nav-brand span { color: var(--accent); }
.nav-brand-link { color: inherit; text-decoration: none; display: flex; align-items: center; }

/* ── NAV MENU ── */
.nav-menu {
    display: flex; gap: 1.5rem; align-items: center;
    position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-link {
    font-size: 13px; font-weight: 500; color: var(--text-muted);
    text-decoration: none; transition: color 0.15s, background 0.15s;
    padding: 6px 12px; border-radius: 100px;
}
.nav-link:hover {
    color: var(--text); background: var(--surface-2);
}
.nav-link.active {
    color: var(--accent); background: var(--accent-dim);
}

@media (max-width: 640px) {
    .nav-menu {
        position: static; transform: none; gap: 0.5rem;
    }
    .nav-link {
        font-size: 12px; padding: 4px 8px;
    }
}

/* ── HERO ── */
.hero {
    position: relative;
    padding: 5rem 2rem 3rem;
    text-align: center;
    max-width: 720px; margin: 0 auto;
}
.hero::before {
    content: '';
    position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
    width: 600px; height: 400px;
    background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none; opacity: 0.4;
}
.hero-label {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 500;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 5px 14px; border-radius: 100px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(129,140,248,0.15);
}
.hero-label .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--green);
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 800; line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 1rem;
}
.hero h1 .gradient {
    background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
    -webkit-background-clip: text; -webkit-text-color: transparent;
    background-clip: text; color: transparent;
}
.hero-sub {
    font-size: 1.05rem; color: var(--text-secondary);
    line-height: 1.65; font-weight: 400;
    max-width: 500px; margin: 0 auto;
}

/* ── HOW IT WORKS ── */
.steps {
    max-width: 800px; margin: 0 auto 2rem;
    padding: 0 2rem;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    transition: border-color 0.2s;
}
.step:hover { border-color: var(--border-hover); }
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--accent-dim); color: var(--accent);
    font-size: 13px; font-weight: 700;
    margin-bottom: 0.75rem;
}
.step-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.step-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ── CALCULATOR ── */
.calc {
    max-width: 800px; margin: 0 auto 2rem;
    padding: 0 2rem;
}
.calc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
}
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.field label {
    display: block;
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 0.5rem;
}

/* custom select */
.sel-wrap { position: relative; }
.sel-face {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); cursor: pointer;
    transition: all 0.15s; min-height: 44px; user-select: none;
}
.sel-face:hover { border-color: var(--border-hover); }
.sel-face.open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.sel-icon { font-size: 16px; flex-shrink: 0; width: 24px; text-align: center; }
.sel-text { flex: 1; min-width: 0; }
.sel-name { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-arrow { font-size: 10px; color: var(--text-muted); transition: transform 0.2s; margin-left: 4px; }
.sel-face.open .sel-arrow { transform: rotate(180deg); }

.sel-drop {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--surface-2); border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm); box-shadow: var(--shadow);
    max-height: 280px; overflow-y: auto; z-index: 500; display: none;
}
.sel-drop.visible { display: block; }
.sel-drop::-webkit-scrollbar { width: 4px; }
.sel-drop::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }

.sel-opt {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}
.sel-opt:hover { background: var(--accent-dim); }
.sel-opt:last-child { border-bottom: none; }
.opt-icon { font-size: 15px; width: 22px; text-align: center; flex-shrink: 0; }
.opt-name { font-size: 13px; font-weight: 500; color: var(--text); }
.opt-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* input */
.pts-input {
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px; font-weight: 500;
    padding: 10px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text);
    outline: none; transition: all 0.15s;
}
.pts-input:hover { border-color: var(--border-hover); }
.pts-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.pts-input::placeholder { color: var(--text-muted); }

/* button */
.calc-btn {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 14px; font-weight: 600;
    padding: 12px 28px; border-radius: var(--radius-sm);
    border: none; cursor: pointer;
    background: var(--accent); color: #fff;
    transition: all 0.2s;
    letter-spacing: -0.01em;
}
.calc-btn:hover {
    background: #6366f1;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-1px);
}
.calc-btn:active { transform: translateY(0); }

/* ── RESULTS ── */
.results { max-width: 800px; margin: 0 auto 2rem; padding: 0 2rem; }

.res-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.75rem;
}
.res-header-left {
    display: flex; align-items: center; gap: 12px;
}
.res-card-name {
    font-size: 1.1rem; font-weight: 700; color: var(--text);
}
.res-partner-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; font-weight: 600;
    padding: 4px 12px; border-radius: 100px;
    background: var(--accent-dim); color: var(--accent);
    border: 1px solid rgba(129,140,248,0.2);
}
.res-header-chips {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.res-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; font-weight: 600;
    padding: 4px 10px; border-radius: 6px;
    background: var(--surface-2); color: var(--text-muted);
    border: 1px solid var(--border);
    display: flex; align-items: center; gap: 4px;
    cursor: default; position: relative;
}
.res-chip .chip-dot {
    width: 6px; height: 6px; border-radius: 50%;
}
.res-chip.green .chip-dot { background: var(--green); }
.res-chip.orange .chip-dot { background: var(--orange); }
.res-chip.purple .chip-dot { background: var(--purple); }
.res-chip.red .chip-dot { background: var(--red); }
.res-chip:hover { border-color: var(--border-hover); background: var(--surface-3); }

/* tab switcher */
.tabs {
    display: flex; gap: 4px; margin-bottom: 1rem;
    background: var(--surface); border-radius: var(--radius-sm);
    padding: 4px; border: 1px solid var(--border);
    width: fit-content;
}
.tab-btn {
    font-family: 'Inter', sans-serif;
    font-size: 12px; font-weight: 600;
    padding: 7px 18px; border-radius: 6px;
    border: none; cursor: pointer;
    background: transparent; color: var(--text-muted);
    transition: all 0.15s;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active {
    background: var(--accent-dim); color: var(--accent);
}
.tab-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; font-weight: 600;
    background: var(--surface-3); color: var(--text-muted);
    padding: 1px 6px; border-radius: 100px; margin-left: 5px;
}
.tab-btn.active .tab-count {
    background: var(--accent-dim); color: var(--accent);
}

/* tables */
.table-wrap {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap thead tr { background: var(--surface-2); }
.table-wrap th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-muted); padding: 10px 16px; text-align: left;
    border-bottom: 1px solid var(--border); font-weight: 600;
}
.table-wrap th.r { text-align: right; }
.table-wrap td {
    padding: 10px 16px; border-bottom: 1px solid var(--border);
    vertical-align: middle; font-size: 13px;
}
.table-wrap td.r { text-align: right; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tbody tr { transition: background 0.1s; }
.table-wrap tbody tr:hover td { background: rgba(129,140,248,0.04); }

.al-name {
    font-weight: 500; font-size: 13px; color: var(--text);
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.al-prog { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* tags */
.tag {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; padding: 2px 7px;
    border-radius: 100px; letter-spacing: 0.03em;
    text-transform: uppercase; white-space: nowrap;
    font-weight: 600;
}
.t-india { background: var(--green-dim); color: var(--green); }
.t-best { background: var(--accent-dim); color: var(--accent); }
.t-hotel { background: var(--purple-dim); color: var(--purple); }

/* ratio badges */
.rb {
    display: inline-flex; align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; font-weight: 600;
    padding: 3px 10px; border-radius: 100px; white-space: nowrap;
}
.rb-bonus { background: var(--green-dim); color: var(--green); }
.rb-1 { background: rgba(52,211,153,0.08); color: #6ee7b7; }
.rb-2 { background: var(--orange-dim); color: var(--orange); }
.rb-3 { background: var(--red-dim); color: var(--red); }
.rb-6 { background: rgba(248,113,113,0.15); color: #fca5a5; }

.mv {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px; font-weight: 600; color: var(--text);
}
.speed-col { font-size: 13px; }

/* empty state */
.empty-state {
    text-align: center; padding: 3rem 2rem;
    color: var(--text-muted); font-size: 0.9rem;
    max-width: 800px; margin: 0 auto;
}
.empty-state .icon { font-size: 2rem; margin-bottom: 0.75rem; }

/* ── PARTNER SEARCH ── */
.partner-search {
    max-width: 800px; margin: 0 auto 2rem; padding: 0 2rem;
}
.ps-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius);
}
.ps-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}
.ps-title {
    font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px;
    display: flex; align-items: center; gap: 8px;
}
.ps-title-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--accent-dim); color: var(--accent); font-size: 14px;
}
.ps-subtitle { font-size: 12px; color: var(--text-muted); }
.ps-controls { padding: 1rem 1.5rem; }
.ps-filter-row {
    display: flex; gap: 10px; align-items: stretch;
}
.ps-type-toggle {
    display: flex; gap: 2px;
    background: var(--surface-2); border-radius: var(--radius-sm);
    padding: 3px; border: 1px solid var(--border);
    flex-shrink: 0;
}
.ps-toggle-btn {
    font-family: 'Inter', sans-serif;
    font-size: 12px; font-weight: 600;
    padding: 7px 14px; border-radius: 6px;
    border: none; cursor: pointer;
    background: transparent; color: var(--text-muted);
    transition: all 0.15s; white-space: nowrap;
}
.ps-toggle-btn:hover { color: var(--text-secondary); }
.ps-toggle-btn.active {
    background: var(--accent-dim); color: var(--accent);
}
.ps-select-wrap {
    flex: 1; position: relative;
}
.ps-select-face {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); cursor: pointer;
    transition: all 0.15s; min-height: 42px; user-select: none;
}
.ps-select-face:hover { border-color: var(--border-hover); }
.ps-select-face.open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.ps-select-text {
    font-size: 13px; font-weight: 500; color: var(--text);
}
.ps-select-text.placeholder { color: var(--text-muted); }
.ps-select-drop {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--surface-2); border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm); box-shadow: var(--shadow);
    z-index: 500; display: none;
}
.ps-select-drop.visible { display: block; }
.ps-drop-search-wrap { padding: 8px; border-bottom: 1px solid var(--border); }
.ps-drop-search {
    width: 100%; font-family: 'Inter', sans-serif;
    font-size: 13px; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: 6px;
    background: var(--surface-3); color: var(--text);
    outline: none; transition: all 0.15s;
}
.ps-drop-search:focus { border-color: var(--accent); }
.ps-drop-search::placeholder { color: var(--text-muted); }
.ps-drop-list {
    max-height: 240px; overflow-y: auto;
}
.ps-drop-list::-webkit-scrollbar { width: 4px; }
.ps-drop-list::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
.ps-drop-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 14px; cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}
.ps-drop-item:hover { background: var(--accent-dim); }
.ps-drop-item:last-child { border-bottom: none; }
.ps-drop-item-name {
    font-size: 13px; font-weight: 500; color: var(--text);
}
.ps-drop-item-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; font-weight: 600; padding: 2px 7px;
    border-radius: 100px; text-transform: uppercase;
}
.ps-drop-item-type.airline {
    background: var(--accent-dim); color: var(--accent);
}
.ps-drop-item-type.hotel {
    background: var(--purple-dim); color: var(--purple);
}
.speed-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; font-weight: 500;
    color: var(--text-muted);
}
.ps-results {
    border-top: 1px solid var(--border);
}
.ps-results table { width: 100%; border-collapse: collapse; }
.ps-results thead tr { background: var(--surface-2); }
.ps-results th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-muted); padding: 10px 16px; text-align: left;
    border-bottom: 1px solid var(--border); font-weight: 600;
}
.ps-results th.r { text-align: right; }
.ps-results td {
    padding: 10px 16px; border-bottom: 1px solid var(--border);
    vertical-align: middle; font-size: 13px;
}
.ps-results td.r { text-align: right; }
.ps-results tr:last-child td { border-bottom: none; }
.ps-results tbody tr { transition: background 0.1s; }
.ps-results tbody tr:hover td { background: rgba(129,140,248,0.04); }
.ps-empty {
    text-align: center; padding: 2rem 1rem;
    color: var(--text-muted); font-size: 13px;
}
.ps-card-name {
    font-weight: 600; font-size: 13px; color: var(--text);
}
.ps-card-sub {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
}
.ps-bank-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; font-weight: 600; padding: 2px 7px;
    border-radius: 100px; background: var(--surface-3);
    color: var(--text-secondary); white-space: nowrap;
}

/* ── FOOTER ── */
.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.footer-inner {
    max-width: 800px; margin: 0 auto;
    padding: 2.5rem 2rem 1.5rem;
}
.footer-top {
    display: flex; gap: 3rem; margin-bottom: 2rem;
}
.footer-brand { flex: 1.2; }
.footer-logo {
    font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem;
}
.footer-logo span { color: var(--accent); }
.footer-tagline {
    font-size: 12px; color: var(--text-muted); line-height: 1.6; max-width: 300px;
}
.footer-links { display: flex; gap: 2.5rem; flex: 1; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col-title {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-secondary); margin-bottom: 4px;
}
.footer-col-text { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.footer-link {
    font-size: 12px; color: var(--text-muted); text-decoration: none;
    transition: color 0.15s;
}
.footer-link:hover { color: var(--accent); }
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 1.25rem; border-top: 1px solid var(--border);
}
.footer-copy { font-size: 11px; color: var(--text-muted); }
.footer-updated {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; color: var(--text-muted);
    background: var(--surface-2); padding: 4px 10px;
    border-radius: 100px; border: 1px solid var(--border);
}
@media (max-width: 640px) {
    .footer-top { flex-direction: column; gap: 1.5rem; }
    .footer-links { flex-direction: column; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
    .footer-inner { padding: 2rem 1rem 1.25rem; }
}

/* ── SEGMENT SWITCHER ── */
.segment-bar {
    max-width: 800px; margin: 0 auto 1.5rem; padding: 0 2rem;
}
.segment-toggle {
    display: inline-flex; gap: 2px;
    background: var(--surface); border-radius: var(--radius-sm);
    padding: 4px; border: 1px solid var(--border);
}
.segment-btn {
    font-family: 'Inter', sans-serif;
    font-size: 13px; font-weight: 600;
    padding: 9px 24px; border-radius: 6px;
    border: none; cursor: pointer;
    background: transparent; color: var(--text-muted);
    transition: all 0.15s; white-space: nowrap;
}
.segment-btn:hover { color: var(--text-secondary); }
.segment-btn.active {
    background: var(--accent); color: var(--seg-active-text);
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .calc-grid { grid-template-columns: 1fr; }
    .res-header { flex-direction: column; }
    .steps { grid-template-columns: 1fr; }
    .segment-toggle { flex-direction: column; width: 100%; }
    .segment-btn { text-align: center; }
}
@media (max-width: 640px) {
    .hero { padding: 3rem 1.2rem 2rem; }
    .calc { padding: 0 1rem; }
    .results { padding: 0 1rem; }
    .partner-search { padding: 0 1rem; }
    .segment-bar { padding: 0 1rem; }
    .calc-card { padding: 1.25rem; }
    td:nth-child(4), th:nth-child(4) { display: none; }
}

/* animations */
.fade-in {
    opacity: 0; transform: translateY(12px);
    animation: fadeIn 0.5s ease forwards;
}
.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }
