/* UK Exit Planner — exit.ss75.net */

:root {
    --bg: #f7f5f2;
    --surface: #ffffff;
    --ink: #1a1a1a;
    --muted: #5a5a5a;
    --rule: #d8d4cd;
    --accent: #1f4068;
    --accent-light: #e0e6ee;
    --warn: #b8500c;
    --warn-bg: #fcebd9;
    --good: #2b6e3f;
    --net: #1f4068;
    --tax: #b8500c;
    --ni: #8b6e1f;
    --pension: #2b6e3f;
    --baseline: #888;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: ui-serif, Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.55;
}

.site-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--rule);
    background: var(--surface);
}
.site-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--ink);
    text-decoration: none;
}
.site-header nav a {
    color: var(--accent);
    text-decoration: none;
    margin-left: 1rem;
}

.disclaimer {
    background: var(--accent-light);
    padding: 0.75rem 1.5rem;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--rule);
}

.container {
    max-width: 880px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

h1 { font-size: 1.9rem; margin: 0 0 1rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1rem; }
a { color: var(--accent); }

.intro p, .lede {
    font-size: 1.05rem;
    color: var(--muted);
}

/* ---- form ---- */
.planner-form fieldset {
    border: 1px solid var(--rule);
    background: var(--surface);
    border-radius: 4px;
    margin: 0 0 1.5rem;
    padding: 1rem 1.5rem 1.5rem;
}
.planner-form legend {
    font-weight: 700;
    padding: 0 0.5rem;
    color: var(--accent);
}
.planner-form label {
    display: block;
    margin: 1rem 0;
}
.planner-form label > span {
    display: block;
    font-weight: 500;
    margin-bottom: 0.3rem;
}
.planner-form input[type="number"],
.planner-form select {
    width: 100%;
    max-width: 320px;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
}
.planner-form small {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    margin-top: 0.25rem;
}
.planner-form button {
    background: var(--accent);
    color: white;
    border: 0;
    padding: 0.7rem 1.4rem;
    font-size: 1rem;
    font-family: inherit;
    border-radius: 3px;
    cursor: pointer;
}
.planner-form button:hover { background: #15314f; }

/* ---- notice ---- */
.notice {
    padding: 0.7rem 1rem;
    margin: 0 0 1rem;
    border-radius: 3px;
    border-left: 4px solid var(--accent);
    background: var(--accent-light);
}
.notice-warning {
    border-left-color: var(--warn);
    background: var(--warn-bg);
}

/* ---- results table ---- */
.scenario-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 2rem;
    font-size: 0.95rem;
    background: var(--surface);
    border: 1px solid var(--rule);
}
.scenario-table th, .scenario-table td {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--rule);
    text-align: right;
}
.scenario-table thead th {
    background: var(--accent-light);
    text-align: center;
    vertical-align: bottom;
    font-size: 0.9rem;
}
.scenario-table tbody th {
    text-align: left;
    font-weight: 500;
    color: var(--muted);
}
.scenario-table td.warn { background: var(--warn-bg); color: var(--warn); }

/* ---- charts ---- */
.chart {
    width: 100%;
    height: auto;
    background: var(--surface);
    border: 1px solid var(--rule);
    margin: 0 0 2rem;
}
.chart .bar { fill: var(--tax); }
.chart .bar.baseline { fill: var(--baseline); }
.chart .gridline { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .axis-label { fill: var(--muted); font: 11px ui-sans-serif, system-ui, sans-serif; }
.chart .bar-value { fill: var(--ink); font: 600 11px ui-sans-serif, system-ui, sans-serif; }
.chart .legend { fill: var(--muted); font: 12px ui-sans-serif, system-ui, sans-serif; }
.chart .seg-net     { fill: var(--net); }
.chart .seg-tax     { fill: var(--tax); }
.chart .seg-ni      { fill: var(--ni); }
.chart .seg-pension { fill: var(--pension); }

/* ---- model notes ---- */
.model-notes {
    background: var(--accent-light);
    padding: 0.75rem 1.5rem;
    border-radius: 3px;
    list-style: square;
}
.back { color: var(--muted); margin: 1.5rem 0; }

.edit-form { margin-top: 3rem; }

/* ---- about ---- */
.about ul { padding-left: 1.5rem; }

/* ---- footer ---- */
.site-footer {
    border-top: 1px solid var(--rule);
    padding: 1.5rem;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
    background: var(--surface);
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .scenario-table { font-size: 0.82rem; display: block; overflow-x: auto; }
}
