/* SalaryWise.co.uk — Clean, Fast, SEO-Optimised CSS */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --text: #1a1a2e;
    --text-light: #555;
    --text-muted: #888;
    --bg: #fff;
    --bg-alt: #f7f8fa;
    --border: #e5e7eb;
    --accent: #1a56db;
    --accent-hover: #1240a8;
    --accent-light: #eff4ff;
    --green: #059669;
    --green-light: #ecfdf5;
    --red: #dc2626;
    --max-w: 960px;
    --radius: 6px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* ─── Header ─────────────────────────────────────────────── */
header { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-size: 1.25rem; text-decoration: none; color: var(--text); letter-spacing: -0.02em; }
.logo strong { color: var(--accent); }
.logo-uk { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }
header nav { display: flex; gap: 1.25rem; }
header nav a { text-decoration: none; color: var(--text-light); font-size: 0.88rem; font-weight: 500; transition: color 0.15s; }
header nav a:hover, header nav a.active { color: var(--accent); }

/* ─── Main ───────────────────────────────────────────────── */
main { padding: 2rem 1.25rem 3rem; max-width: var(--max-w); margin: 0 auto; }

h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.25; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
h2 { font-size: 1.3rem; font-weight: 600; margin: 2rem 0 0.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
p { margin-bottom: 1rem; color: var(--text-light); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Breadcrumbs ────────────────────────────────────────── */
.breadcrumbs { margin-bottom: 1.5rem; font-size: 0.85rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.breadcrumbs li::after { content: "›"; margin-left: 0.4rem; color: var(--text-muted); }
.breadcrumbs li:last-child::after { display: none; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs li:last-child span { color: var(--text-light); }

/* ─── Stat Cards ─────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.stat-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.125rem 1.25rem; }
.stat-card .label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.25rem; }
.stat-card .value { font-size: 1.5rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.stat-card .sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ─── Data Table ─────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; margin: 1rem 0 2rem; -webkit-overflow-scrolling: touch; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data-table th { text-align: left; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 0.625rem 0.75rem; border-bottom: 2px solid var(--border); white-space: nowrap; }
table.data-table td { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data-table tr:hover td { background: var(--bg-alt); }
table.data-table tr.highlight td { background: var(--accent-light); }
table.data-table .rank { color: var(--text-muted); font-weight: 600; width: 2rem; }
table.data-table .salary { font-weight: 600; white-space: nowrap; }
table.data-table .salary.high { color: var(--green); }
table.data-table .salary.low { color: var(--red); }
table.data-table a { font-weight: 500; }

/* ─── Salary Range Bar ───────────────────────────────────── */
.salary-range-bar { background: var(--bg-alt); border-radius: 999px; height: 10px; position: relative; margin: 0.5rem 0; border: 1px solid var(--border); }
.salary-range-bar .fill { position: absolute; height: 100%; background: var(--accent); border-radius: 999px; opacity: 0.3; }
.salary-range-bar .median-mark { position: absolute; width: 3px; height: 18px; top: -4px; background: var(--accent); border-radius: 2px; }
.range-labels { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; flex-wrap: wrap; gap: 0.25rem; }

/* ─── VS Comparison ──────────────────────────────────────── */
.vs-verdict {
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 1rem;
    text-align: center;
}
.vs-winner { font-weight: 700; color: var(--accent); }

.vs-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin: 1.5rem 0 2rem;
}
.vs-col {
    text-align: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
}
.vs-col h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.vs-col h3 a { color: var(--text); }
.vs-salary { font-size: 1.75rem; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
.vs-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.25rem; }
.vs-divider { font-size: 1.25rem; font-weight: 700; color: var(--text-muted); text-align: center; }

/* ─── Insight Box ────────────────────────────────────────── */
.insights { background: var(--accent-light); border-left: 3px solid var(--accent); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.insights p { color: var(--text); margin-bottom: 0.5rem; }
.insights p:last-child { margin-bottom: 0; }

/* ─── FAQ ────────────────────────────────────────────────── */
.faq { margin: 2rem 0; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { padding: 0.875rem 0; font-weight: 600; cursor: pointer; font-size: 0.95rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: "+"; font-size: 1.2rem; color: var(--text-muted); }
.faq details[open] summary::after { content: "−"; }
.faq .faq-answer { padding: 0 0 1rem; color: var(--text-light); font-size: 0.92rem; line-height: 1.6; }

/* ─── Chips ──────────────────────────────────────────────── */
.chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 2rem; }
.chip { display: inline-block; padding: 0.375rem 0.875rem; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; color: var(--text-light); text-decoration: none; transition: all 0.15s; }
.chip:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ─── Link Grid ──────────────────────────────────────────── */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; margin: 1rem 0 2rem; }
.link-grid a { display: block; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.88rem; color: var(--text); transition: border-color 0.15s; }
.link-grid a:hover { border-color: var(--accent); text-decoration: none; color: var(--accent); }
.link-grid .sub { color: var(--text-muted); font-size: 0.8rem; display: block; }

/* ─── Prose ──────────────────────────────────────────────── */
.prose { max-width: 700px; }
.prose h1 { margin-bottom: 1rem; }
.prose h2 { margin-top: 2.5rem; }
.prose p { margin-bottom: 1rem; line-height: 1.7; }
.prose ul, .prose ol { margin: 0.75rem 0 1.25rem 1.5rem; color: var(--text-light); }
.prose li { margin-bottom: 0.4rem; line-height: 1.6; }

/* ─── Ad Slot ────────────────────────────────────────────── */
.ad-slot { background: var(--bg-alt); border: 1px dashed var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; color: var(--text-muted); font-size: 0.78rem; margin: 2rem 0; }

/* ─── Footer ─────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 3rem; font-size: 0.83rem; color: var(--text-muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0.75rem 0; }
footer nav a { color: var(--text-muted); }
footer nav a:hover { color: var(--accent); }
.source-note { font-size: 0.82rem; }
.source-note a { color: var(--text-muted); text-decoration: underline; }

/* ─── Contact Form ───────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.35rem; }
.form-group .req { color: var(--red); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 0.88rem; font-family: inherit; background: var(--bg); color: var(--text);
    outline: none; transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; line-height: 1.65; }
.contact-btn {
    display: inline-block; padding: 0.75rem 1.5rem; background: var(--accent); color: #fff;
    border: none; border-radius: var(--radius); font-size: 0.88rem; font-weight: 700;
    font-family: inherit; cursor: pointer; transition: background 0.15s; align-self: flex-start;
    text-decoration: none;
}
.contact-btn:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }
.contact-success { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; text-align: center; }
.contact-success h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.contact-success p { font-size: 0.88rem; color: var(--text-light); margin-bottom: 1.5rem; }
.contact-error { background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius); padding: 0.85rem 1.1rem; margin-bottom: 1.5rem; font-size: 0.85rem; color: var(--red); }

.contact-sidebar .sidebar-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.contact-sidebar .sidebar-card h2 { font-size: 1rem; font-weight: 700; margin: 0 0 0.75rem; }
.contact-sidebar .sidebar-card p { font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.75rem; }
.contact-sidebar .email-link { display: block; padding: 0.6rem 0.85rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.82rem; font-weight: 600; color: var(--accent); text-align: center; }
.contact-sidebar .email-link:hover { text-decoration: none; border-color: var(--accent); }
.contact-sidebar .help-item { display: flex; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.82rem; }
.contact-sidebar .help-item:last-child { border-bottom: none; }
.contact-sidebar .help-item span { font-size: 1rem; flex-shrink: 0; }
.contact-sidebar .help-item small { color: var(--text-muted); font-size: 0.72rem; }
.contact-sidebar .sidebar-note { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; font-size: 0.82rem; }
.contact-sidebar .sidebar-note strong { display: block; margin-bottom: 0.35rem; }
.contact-sidebar .sidebar-note p { font-size: 0.78rem; color: var(--text-light); margin: 0; line-height: 1.6; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.15rem; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .stat-card .value { font-size: 1.25rem; }
    header nav { gap: 0.6rem; font-size: 0.8rem; }
    .vs-grid { grid-template-columns: 1fr; }
    .vs-divider { padding: 0.5rem 0; }
    .vs-salary { font-size: 1.5rem; }
    table.data-table { font-size: 0.82rem; }
    table.data-table th, table.data-table td { padding: 0.5rem; }
    .link-grid { grid-template-columns: 1fr; }
    .range-labels { font-size: 0.7rem; }
    .contact-grid { grid-template-columns: 1fr; }
}
