:root {
    --bg: #f6f9ff;
    --surface: #ffffff;
    --surface-2: #eef5ff;
    --text: #102033;
    --muted: #64748b;
    --primary: #1457d9;
    --primary-2: #00a7d8;
    --accent: #1dd3b0;
    --line: #dbe7f5;
    --danger: #e5484d;
    --warning: #f59e0b;
    --success: #0f9f6e;
    --shadow: 0 24px 70px rgba(16, 32, 51, .10);
    --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, #e4f2ff 0, transparent 38%), linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(255,255,255,.78);
    border-bottom: 1px solid rgba(219,231,245,.8);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; letter-spacing: -.02em; }
.brand-mark {
    width: 42px; height: 42px; border-radius: 14px;
    display: inline-grid; place-items: center;
    color: #fff; font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 28px rgba(20,87,217,.26);
}
.nav-links { display: flex; gap: 22px; color: var(--muted); font-weight: 650; font-size: 14px; }
.nav-links a:hover { color: var(--primary); }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 999px; padding: 13px 20px; cursor: pointer;
    font-weight: 800; font-size: 14px; transition: .2s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 18px 34px rgba(20,87,217,.22); }
.btn-secondary { background: #e8f1ff; color: var(--primary); }
.btn-light { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-small { padding: 9px 14px; font-size: 13px; }
.hero { padding: 74px 0 42px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.eyebrow { margin: 0 0 10px; color: var(--primary); font-weight: 900; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
h1, h2, h3 { letter-spacing: -.04em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(42px, 6vw, 74px); }
h2 { font-size: clamp(30px, 4vw, 48px); }
h3 { font-size: 22px; }
.lead { color: var(--muted); font-size: 18px; max-width: 660px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.stat-card, .panel, .product-card, .filter-card, .table-card, .admin-card {
    background: rgba(255,255,255,.9); border: 1px solid rgba(219,231,245,.95); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat-card { padding: 18px; }
.stat-card strong { display: block; font-size: 28px; letter-spacing: -.04em; }
.stat-card span, .muted { color: var(--muted); }
.hero-visual { position: relative; }
.insurance-orb {
    min-height: 520px; border-radius: 38px; padding: 28px;
    background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(226,242,255,.82));
    border: 1px solid rgba(219,231,245,.9); box-shadow: var(--shadow); overflow: hidden;
}
.insurance-orb::before { content: ""; position: absolute; inset: 70px 20px auto auto; width: 220px; height: 220px; border-radius: 999px; background: radial-gradient(circle, rgba(29,211,176,.35), transparent 70%); }
.floating-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 22px; margin-bottom: 18px; box-shadow: 0 18px 42px rgba(16,32,51,.09); }
.floating-card:nth-child(2) { margin-left: 70px; }
.floating-card:nth-child(3) { margin-right: 50px; }
.progress-line { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 14px 0; }
.progress-line span { display:block; height:100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; }
.section { padding: 76px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head p { max-width: 620px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.category-card { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 48px rgba(16,32,51,.06); }
.category-icon { width: 54px; height: 54px; border-radius: 18px; background: linear-gradient(135deg, #e7f1ff, #dcfff7); display:grid; place-items:center; color: var(--primary); font-weight: 900; margin-bottom: 18px; }
.compare-wrap { display: grid; grid-template-columns: .92fr 1.08fr; gap: 24px; align-items: start; }
.filter-card { padding: 26px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-row { margin-bottom: 14px; }
label { display: block; color: #334155; font-weight: 800; margin-bottom: 7px; font-size: 13px; }
input, select, textarea {
    width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 13px 14px; font: inherit; color: var(--text); outline: none;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(20,87,217,.55); box-shadow: 0 0 0 4px rgba(20,87,217,.08); }
.product-card { padding: 22px; display: flex; flex-direction: column; min-height: 100%; }
.card-topline { display:flex; align-items:center; justify-content:space-between; gap: 10px; margin-bottom: 14px; }
.pill, .badge { display:inline-flex; align-items:center; border-radius:999px; padding: 6px 11px; font-size: 12px; font-weight: 850; background:#e8f1ff; color:var(--primary); }
.rating { color: #b7791f; font-weight: 850; }
.price-block { padding: 16px; border-radius: 18px; background: linear-gradient(135deg, #f0f7ff, #f4fffb); margin: 14px 0; }
.price-block span { display:block; font-size: 24px; font-weight: 950; letter-spacing: -.03em; }
.price-block small { color: var(--muted); font-weight: 700; }
.clean-list { padding: 0; margin: 0 0 18px; list-style: none; }
.clean-list li { position: relative; padding-left: 24px; margin: 8px 0; color: #334155; }
.clean-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 9px; height: 9px; border-radius:999px; background: var(--accent); box-shadow: 0 0 0 4px rgba(29,211,176,.16); }
.card-actions { display:flex; gap:10px; margin-top:auto; flex-wrap: wrap; }
.value-panel { padding: 26px; background: linear-gradient(135deg, #102033, #174aa6); color:#fff; border-radius: 34px; box-shadow: var(--shadow); }
.value-panel .muted { color: rgba(255,255,255,.74); }
.value-list { display:grid; gap: 16px; margin-top: 22px; }
.value-item { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); padding: 18px; border-radius: 22px; }
.table-card { overflow: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f8fbff; color:#334155; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.compare-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.detail-grid { display:grid; grid-template-columns: .78fr 1.22fr; gap: 24px; align-items:start; }
.site-footer { padding: 54px 0 28px; background: #0f2036; color:#dbeafe; }
.footer-grid { display:grid; grid-template-columns: 1.5fr .8fr 1fr; gap: 40px; }
.footer-grid a, .footer-grid p { display:block; color:#c8d7ea; margin: 8px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 20px; color:#9fb3c8; font-size: 13px; }
.footer-brand { color:#fff; }
.empty-state { padding: 38px; text-align:center; color: var(--muted); }
.alert { padding: 14px 16px; border-radius: 16px; margin-bottom: 18px; font-weight: 750; }
.alert-success { background:#e7fff6; color:#087653; border:1px solid #b9f5df; }
.alert-error, .alert-danger { background:#fff1f2; color:#be123c; border:1px solid #fecdd3; }
.admin-body { background: #f2f6fb; }
.admin-shell { min-height: 100vh; display:grid; grid-template-columns: 270px 1fr; }
.admin-sidebar { background:#0f2036; color:#dbeafe; padding: 24px; position: sticky; top: 0; height: 100vh; }
.admin-brand { color:#fff; margin-bottom: 26px; }
.admin-menu { display:grid; gap: 8px; }
.admin-menu a { padding: 12px 14px; border-radius: 14px; color:#c8d7ea; font-weight: 750; }
.admin-menu a:hover { background: rgba(255,255,255,.1); color:#fff; }
.admin-main { padding: 26px; overflow: auto; }
.admin-topbar { display:flex; align-items:center; justify-content:space-between; gap: 20px; margin-bottom: 22px; }
.admin-topbar h1 { font-size: 34px; }
.admin-user { display:flex; align-items:center; gap: 12px; }
.admin-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.admin-card { padding: 22px; }
.admin-card strong { display:block; font-size: 32px; letter-spacing:-.04em; }
.admin-actions { display:flex; gap: 10px; align-items:center; flex-wrap:wrap; margin-bottom:18px; }
.admin-form { background:#fff; border:1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.form-admin-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-admin-grid .full { grid-column: 1 / -1; }
.badge-info { background:#e8f1ff; color:var(--primary); }
.badge-warning { background:#fff7ed; color:#b45309; }
.badge-success { background:#e7fff6; color:#087653; }
.badge-danger { background:#fff1f2; color:#be123c; }
.login-page { min-height:100vh; display:grid; place-items:center; padding: 24px; }
.login-card { width:min(430px,100%); background:#fff; border:1px solid var(--line); border-radius: 30px; padding: 30px; box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 24px; }
@media (max-width: 980px) {
    .hero-grid, .compare-wrap, .detail-grid, .footer-grid { grid-template-columns: 1fr; }
    .grid-3, .compare-results { grid-template-columns: repeat(2, 1fr); }
    .grid-4, .admin-grid { grid-template-columns: repeat(2, 1fr); }
    .insurance-orb { min-height: auto; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: relative; height: auto; }
}
@media (max-width: 720px) {
    .nav-links { display: none; }
    .stats, .grid-3, .grid-4, .compare-results, .form-grid, .form-admin-grid { grid-template-columns: 1fr; }
    .section-head, .admin-topbar { align-items:flex-start; flex-direction:column; }
    .hero { padding-top: 46px; }
    .floating-card:nth-child(2), .floating-card:nth-child(3) { margin-left: 0; margin-right: 0; }
    .admin-main { padding: 18px; }
}

/* Comparison matrix v2 */
.compare-page-section { padding-top: 48px; }
.compare-wide-container { width: min(1360px, calc(100% - 24px)); }
.compare-title-head { align-items: flex-start; }
.data-warning {
    background: linear-gradient(135deg, #fff8e7, #fffefe);
    border: 1px solid #f7ddb0;
    border-radius: 18px;
    padding: 14px 16px;
    margin: 0 0 18px;
    color: #71470b;
    font-weight: 650;
}
.data-warning code { background: rgba(255,255,255,.72); border: 1px solid #f7ddb0; border-radius: 8px; padding: 2px 6px; }
.compare-filter-card { margin-bottom: 22px; }
.compare-filter-grid { grid-template-columns: repeat(7, minmax(120px, 1fr)); }
.compare-matrix-form { margin-top: 18px; }
.compare-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    padding: 14px 16px;
    box-shadow: 0 16px 44px rgba(16,32,51,.06);
}
.compare-toolbar-actions { display: flex; gap: 10px; align-items: center; }
.compare-scroll-shell {
    overflow: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 22px 22px;
    box-shadow: var(--shadow);
}
.spec-compare-table {
    min-width: 1060px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: #fff;
}
.spec-compare-table th,
.spec-compare-table td {
    border-bottom: 1px solid #e8eef7;
    border-right: 1px solid #e8eef7;
    padding: 13px 14px;
    vertical-align: top;
    background: #fff;
}
.spec-compare-table thead th {
    background: linear-gradient(180deg, #fbfdff, #f5f8fc);
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 5;
}
.spec-compare-table .top-corner {
    z-index: 8;
    background: #f4f8ff;
}
.spec-label-col {
    width: 205px;
    min-width: 205px;
    position: sticky;
    left: 0;
    z-index: 4;
    background: #f8fbff !important;
    color: #334155;
    font-weight: 900;
}
.product-compare-col { width: calc((100% - 205px) / 3); min-width: 285px; }
.compare-with-box {
    background: #f8fafc;
    border: 1px solid #dce6f3;
    border-radius: 14px;
    padding: 10px;
    margin-bottom: 16px;
}
.compare-with-box label {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 11px;
    color: #475569;
}
.compare-with-box select {
    border-radius: 10px;
    padding: 10px 12px;
    min-height: 42px;
    background: #fff;
}
.compare-product-hero {
    min-height: 148px;
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 15px;
    align-items: center;
}
.compare-logo {
    width: 76px;
    height: 96px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 950;
    letter-spacing: -.04em;
    background:
        radial-gradient(circle at 75% 20%, rgba(255,255,255,.34), transparent 32%),
        linear-gradient(145deg, var(--primary), var(--primary-2));
    box-shadow: 0 18px 34px rgba(20,87,217,.22);
}
.compare-product-info span {
    display: inline-flex;
    background: #e8f1ff;
    color: var(--primary);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 8px;
}
.compare-product-info h3 {
    font-size: 21px;
    margin-bottom: 7px;
}
.compare-product-info p {
    color: var(--muted);
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}
.compare-product-price {
    border-radius: 16px;
    padding: 13px 14px;
    margin: 8px 0 12px;
    background: linear-gradient(135deg, #f0f7ff, #f4fffb);
}
.compare-product-price strong { display: block; font-size: 22px; letter-spacing: -.04em; }
.compare-product-price span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.compare-product-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.compare-placeholder-phone {
    width: 110px;
    height: 154px;
    border-radius: 28px;
    background: #eef0f3;
    margin: 34px auto;
    position: relative;
}
.compare-placeholder-phone::before {
    content: "";
    position: absolute;
    inset: 22px 18px 34px;
    background: #fff;
    border-radius: 4px;
}
.compare-placeholder-phone span {
    position: absolute;
    bottom: 16px;
    left: 42px;
    width: 26px;
    height: 7px;
    border-radius: 999px;
    background: #fff;
}
.spec-group-row td {
    position: sticky;
    left: 0;
    z-index: 3;
    background: linear-gradient(90deg, #102033, #174aa6) !important;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
    font-weight: 950;
    padding: 10px 14px;
}
.spec-compare-table tbody td small { color: var(--muted); font-weight: 750; }
.compare-check,
.compare-no,
.compare-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 900;
}
.compare-check { background: #e7fff6; color: #087653; }
.compare-no { background: #fff1f2; color: #be123c; }
.compare-score { background: #e8f1ff; color: var(--primary); }
.compare-empty-text { color: #94a3b8; font-weight: 700; }
.compare-mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 7px;
}
.compare-mini-list li {
    position: relative;
    padding-left: 18px;
    color: #334155;
    line-height: 1.45;
}
.compare-mini-list li::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
}
.muted-list li { color: var(--muted); }
.muted-list li::before { background: #cbd5e1; }
@media (max-width: 1180px) {
    .compare-filter-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .compare-wide-container { width: min(100% - 16px, 1360px); }
    .compare-filter-grid { grid-template-columns: 1fr; }
    .compare-toolbar { align-items: flex-start; flex-direction: column; }
    .spec-label-col { width: 160px; min-width: 160px; }
    .product-compare-col { min-width: 250px; }
    .compare-product-hero { grid-template-columns: 1fr; text-align: center; }
    .compare-logo { margin: 0 auto; }
    .compare-product-actions { justify-content: center; }
}


/* Affiliate mirroring */
.brand-text { display: inline-grid; gap: 1px; line-height: 1.05; }
.brand-text small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0; }
.footer-brand .brand-text small { color: #c8d7ea; }
.agent-strip { border-top: 1px solid rgba(219,231,245,.75); background: rgba(232,241,255,.86); }
.agent-strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13px; color: #334155; }
.agent-strip a { color: var(--primary); font-weight: 900; }
.agent-hero-card,
.agent-card-public {
    background: rgba(255,255,255,.92);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 18px 46px rgba(16,32,51,.08);
    padding: 18px 20px;
    margin: 20px 0 0;
}
.agent-hero-card strong { display:block; font-size: 26px; letter-spacing: -.03em; margin-top: 8px; }
.agent-hero-card small { color: var(--muted); font-weight: 750; }
@media (max-width: 720px) {
    .agent-strip-inner { align-items: flex-start; flex-direction: column; }
}

/* Brand logo v5 */
.brand-image { align-items: center; gap: 10px; position: relative; }
.brand-logo { display: block; width: 188px; max-width: 42vw; height: auto; }
.admin-brand .brand-logo,
.login-card .brand-logo { width: 206px; max-width: 100%; filter: drop-shadow(0 14px 24px rgba(20,87,217,.14)); }
.admin-sidebar .brand-logo { filter: brightness(0) invert(1) drop-shadow(0 10px 22px rgba(0,0,0,.18)); opacity: .96; }
.footer-brand .brand-logo { filter: brightness(0) invert(1); opacity: .95; }
.brand-subline {
    display: inline-flex;
    position: absolute;
    left: 74px;
    bottom: -10px;
    font-size: 11px;
    font-weight: 900;
    color: var(--muted);
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(219,231,245,.9);
    border-radius: 999px;
    padding: 2px 8px;
    box-shadow: 0 8px 18px rgba(16,32,51,.08);
    white-space: nowrap;
}
.admin-sidebar .brand-subline,
.footer-brand .brand-subline { background: rgba(255,255,255,.12); color: #dbeafe; border-color: rgba(255,255,255,.18); }
.login-card .brand-subline { left: 78px; }
.agent-summary-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.agent-summary-card { background:#fff; border:1px solid var(--line); border-radius:20px; padding:18px; box-shadow:0 14px 36px rgba(16,32,51,.06); }
.agent-summary-card strong { display:block; font-size:28px; letter-spacing:-.04em; }
.agent-admin-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px; }
.agent-admin-head p { max-width:780px; }
.agent-form-card { margin-bottom:22px; }
.agent-link-input { min-width:280px; font-size:13px; }
.agent-table-avatar { width:42px; height:42px; border-radius:14px; display:inline-grid; place-items:center; background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; font-weight:950; margin-right:10px; vertical-align:middle; overflow:hidden; }
.agent-table-avatar img { width:100%; height:100%; object-fit:cover; }
.agent-name-cell { display:flex; align-items:flex-start; gap:10px; }
.agent-status-active { color:#087653; font-weight:900; }
.agent-status-inactive { color:#b45309; font-weight:900; }
.copy-ok { font-size:12px; color:#087653; font-weight:900; display:none; }
.copy-ok.show { display:inline; }
@media (max-width: 980px) { .agent-summary-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
    .brand-logo { width: 154px; max-width: 52vw; }
    .brand-subline { left: 58px; bottom: -12px; max-width: 70vw; overflow:hidden; text-overflow:ellipsis; }
    .agent-summary-grid { grid-template-columns: 1fr; }
    .agent-admin-head { flex-direction:column; }
    .agent-link-input { min-width:220px; }
}
