:root { --accent: #2f5fae; }
* { box-sizing: border-box; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f4f5f8;
    color: #1b1f2b;
    margin: 0;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 3rem 1.5rem; }
.wrap.wide { max-width: 880px; }
.brandbar { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 2.5rem; }
.brandbar img { height: 40px; }
.brandbar span { font-weight: 600; font-size: 1.1rem; }
h1 { font-size: 1.5rem; margin: 0 0 1.5rem; }
.card { background: #fff; border: 1px solid #dde0e8; border-radius: 8px; padding: 2rem; box-shadow: 0 1px 2px rgba(20,24,38,.04); }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
input[type=email], input[type=text] {
    width: 100%; padding: 0.7rem 0.9rem; border: 1px solid #c5c9d6; border-radius: 6px;
    font-size: 1rem; margin-bottom: 1.2rem;
}
button {
    background: var(--accent); color: #fff; border: none; border-radius: 6px;
    padding: 0.7rem 1.4rem; font-size: 1rem; font-weight: 600; cursor: pointer;
}
button:hover { opacity: 0.92; }
.error { background: #f8e3dd; border-left: 3px solid #a5402a; padding: 0.8rem 1rem; border-radius: 4px; margin-bottom: 1.2rem; font-size: 0.9rem; }
.muted { color: #7a8095; font-size: 0.85rem; }
.site-block { margin-bottom: 2.5rem; }
.site-block h2 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.report-row { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid #eceef3; }
.report-row:last-child { border-bottom: none; }
.report-row a { color: var(--accent); text-decoration: none; font-weight: 500; }
.report-row a.pdf { margin-left: 1rem; font-size: 0.85rem; color: #7a8095; }
/* Trend chart — categorical palette validated via the dataviz skill
   (scripts/validate_palette.js): worst adjacent ΔE 24.7 CVD / 33.6
   normal-vision, well clear of the 8/15 targets. Series identity only —
   deliberately not tied to the per-brand --accent, which stays for UI chrome. */
.trend-chart-wrap {
    --chart-grid: #e1e0d9;
    --chart-axis: #c3c2b7;
    --chart-ink-muted: #898781;
    --chart-ink-secondary: #52514e;
    --chart-surface: #fff;
    --series-impressions: #2a78d6;
    --series-clicks: #eb6834;
    margin-top: 1.4rem;
}
.trend-legend { display: flex; gap: 1.4rem; margin-bottom: 0.6rem; }
.legend-item { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--chart-ink-secondary); }
.legend-key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.legend-key.chart-series-impressions { background: var(--series-impressions); }
.legend-key.chart-series-clicks { background: var(--series-clicks); }
.trend-chart-svg-wrap { position: relative; }
.trend-chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-axis-label { fill: var(--chart-ink-muted); font-size: 10px; font-family: inherit; }
.chart-line { stroke-width: 2; }
.chart-line.chart-series-impressions { stroke: var(--series-impressions); }
.chart-line.chart-series-clicks { stroke: var(--series-clicks); }
.chart-dot { stroke: var(--chart-surface); stroke-width: 2; }
.chart-dot.chart-series-impressions { fill: var(--series-impressions); }
.chart-dot.chart-series-clicks { fill: var(--series-clicks); }
.chart-end-label { font-size: 11px; font-weight: 600; fill: var(--chart-ink-secondary); font-family: inherit; }
.chart-crosshair { stroke: var(--chart-axis); stroke-width: 1; }
.chart-tooltip {
    position: absolute; top: 6px; transform: translateX(-50%);
    background: #1b1f2b; color: #fff; border-radius: 6px; padding: 0.6rem 0.75rem;
    font-size: 0.8rem; pointer-events: none; white-space: nowrap; z-index: 2;
    box-shadow: 0 4px 14px rgba(20,24,38,.2);
}
.chart-tooltip-title { font-weight: 600; margin-bottom: 0.35rem; color: #fff; }
.chart-tooltip-row { display: flex; align-items: center; gap: 0.4rem; padding: 0.1rem 0; }
.chart-tooltip-row .legend-key { flex-shrink: 0; }
.chart-tooltip-row strong { color: #fff; }
.chart-tooltip-name { color: #c3c2b7; }
.report-content { background: #fff; border: 1px solid #dde0e8; border-radius: 8px; padding: 2.5rem; line-height: 1.7; }
.report-content h1, .report-content h2, .report-content h3 { margin-top: 1.6em; }
.report-branding { text-align: right; padding-top: 3em; }
.report-branding img { width: 80px; border-radius: 40px; }
.pagebreak { border-top: 1px dashed #c5c9d6; margin: 2em 0; page-break-before: always; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.topbar a { color: #7a8095; font-size: 0.85rem; text-decoration: none; }
.otp-code { font-family: monospace; font-size: 1.4rem; letter-spacing: 0.2em; }
table.devlist { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.devlist th, table.devlist td { text-align: left; padding: 0.5rem 0.7rem; border-bottom: 1px solid #eceef3; }
