:root {
    --bg: #f7f9fb;
    --card: #ffffff;
    --border: #e5eaef;
    --text: #0e1a24;
    --muted: #64748b;
    --primary: #0891b2;
    --primary-dark: #0e7490;
    --primary-light: #e0f2fe;
    --success: #059669;
    --success-bg: #d1fae5;
    --danger: #b91c1c;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.06);
    --radius: 12px;
}

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

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 640px; }

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
    backdrop-filter: saturate(160%) blur(6px);
}
.site-header .container { padding-top: 14px; padding-bottom: 14px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; display: flex; align-items: center; justify-content: center;
}
.brand-name { font-weight: 700; font-size: 16px; }
.brand-sub { font-size: 12px; color: var(--muted); }

.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-shrink: 1; min-width: 0; }
.status #statusText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (max-width: 500px) { .status { display: none; } }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.dot.ok { background: var(--success); }
.dot.warn { background: #f59e0b; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Hero */
.hero {
    display: grid; grid-template-columns: 1.35fr 1fr;
    gap: 24px; margin-top: 32px;
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero-copy .pill {
    display: inline-block; font-size: 12px; letter-spacing: .05em; text-transform: uppercase;
    color: var(--primary-dark); background: var(--primary-light); padding: 5px 10px; border-radius: 999px;
    font-weight: 600;
}
.hero-copy h1 { font-size: 34px; line-height: 1.15; margin: 12px 0 12px; font-weight: 800; letter-spacing: -0.02em; }
.hero-copy p { color: var(--muted); margin: 0 0 20px; max-width: 60ch; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 480px; }
.hero-stats > div {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
}
.hero-stats span { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-stats small { color: var(--muted); font-size: 12px; }

/* Card */
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px;
}
.hero-form h3 { margin: 0 0 4px; font-size: 18px; }
.hero-form .muted { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.hero-form label { display: block; font-size: 13px; margin-bottom: 12px; color: #334155; font-weight: 500; }
.hero-form input[type=email], .hero-form input[type=text], .hero-form input[type=number],
.filters input, .filters select {
    display: block; width: 100%; margin-top: 6px; padding: 9px 12px;
    background: #fff; border: 1px solid #d1d9e0; border-radius: 8px;
    font: inherit; color: inherit;
}
.hero-form input:focus, .filters input:focus, .filters select:focus {
    outline: 2px solid var(--primary-light); border-color: var(--primary);
}
.hero-form button {
    display: inline-block; width: 100%; margin-top: 4px; padding: 11px 16px;
    background: var(--primary); color: #fff; border: 0; border-radius: 8px;
    font: 600 14px/1 inherit; cursor: pointer; transition: background .15s;
}
.hero-form button:hover { background: var(--primary-dark); }

/* Filters */
.filters { margin-top: 32px; padding: 16px; }
.filters-row { display: grid; grid-template-columns: 2fr 1fr 1fr 90px 90px auto; gap: 10px; align-items: center; }
@media (max-width: 900px) { .filters-row { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 500px) { .filters-row { grid-template-columns: 1fr 1fr; } }
.filters input[type=number] { -moz-appearance: textfield; }
.filters input[type=number]::-webkit-outer-spin-button,
.filters input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.price-range { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.price-range input { flex: 1; }
.price-range span { color: var(--muted); font-size: 13px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #334155; white-space: nowrap; padding: 0 4px; }
.checkbox input { width: 16px; height: 16px; }

/* Table */
.table-wrap { margin-top: 20px; padding: 0; overflow-x: auto; }
.offers-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.offers-table th {
    text-align: left; padding: 12px 16px; background: #f1f5f9;
    font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #475569;
    border-bottom: 1px solid var(--border);
}
.offers-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.offers-table tr:last-child td { border-bottom: 0; }
.offers-table tr:hover td { background: #fafcfe; }

.name-cell { display: flex; align-items: flex-start; gap: 10px; }
.name-cell .indicator {
    width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: #cbd5e1; flex-shrink: 0;
}
.name-cell .indicator.on { background: var(--success); box-shadow: 0 0 0 3px rgba(5,150,105,.15); }
.name-cell b { display: block; font-weight: 600; font-size: 14px; color: var(--text); }
.name-cell small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.name-cell .notes { display: block; font-size: 11px; color: var(--muted); font-style: italic; margin-top: 3px; }
.name-cell .delivery { display: inline-block; margin-top: 4px; padding: 2px 6px; border-radius: 4px; background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 500; }

.perf { font-variant-numeric: tabular-nums; font-size: 13px; }
.perf small { display: block; color: var(--muted); font-size: 11px; }

.best-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.best-price.on { color: var(--success); }
.best-price.off { color: var(--muted); font-weight: 500; }

.retailers { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 500;
    background: #f1f5f9; color: #64748b; text-decoration: none;
    border: 1px solid transparent;
    transition: background .12s, transform .12s;
}
.tag.on {
    background: var(--success-bg); color: #065f46; border-color: rgba(6,95,70,.2);
}
.tag.delayed {
    background: #fef3c7; color: #92400e; border-color: rgba(146,64,14,.25);
}
.tag.off {
    background: #fee2e2; color: #991b1b; border-color: rgba(153,27,27,.2); opacity: .7;
}
.tag.err { background: #fef3c7; color: #92400e; }
.tag:hover { transform: translateY(-1px); }
.tag .price { margin-left: 4px; font-variant-numeric: tabular-nums; }

.rel-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Events */
.events { margin-top: 20px; }
.events h3 { margin: 0 0 12px; font-size: 16px; }
.events-list { display: flex; flex-direction: column; gap: 8px; }
.event {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; text-decoration: none; color: inherit;
    transition: border-color .12s, background .12s;
}
.event:hover { border-color: var(--primary); background: #fafcfe; }
.event .icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--success-bg); color: var(--success);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.event .info { flex: 1; min-width: 0; }
.event .info b { display: block; font-size: 14px; font-weight: 600; }
.event .info small { display: block; font-size: 12px; color: var(--muted); }
.event .price { font-weight: 700; color: var(--success); font-variant-numeric: tabular-nums; text-align: right; }
.event .price small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }

/* Empty */
.center { text-align: center; }
.muted { color: var(--muted); }

/* Footer */
.site-footer { margin: 48px 0 32px; text-align: center; font-size: 13px; color: var(--muted); }
.site-footer p { margin: 6px 0; }

/* Simple info-page (subscribe/confirm/unsub) */
.back { display: inline-block; margin: 20px 0; color: var(--primary-dark); text-decoration: none; font-size: 14px; }
.alert { padding: 14px 18px; border-radius: 8px; margin-top: 12px; font-size: 14px; }
.alert.ok { background: var(--success-bg); color: #065f46; }
.alert.error { background: #fee2e2; color: #991b1b; }
h1 { font-size: 24px; margin-top: 4px; }
