/* Mileage Claim UK — no framework, no webfont, no external request.
   Core Web Vitals are a ranking input and this whole site is one CSS
   file plus one small script, so LCP is whatever the network costs. */

:root {
  --ink: #12233f;
  --ink-soft: #4a5a72;
  --navy: #22467f;
  --money: #1a8c5c;
  --bg: #f6f8fb;
  --surface: #fff;
  --line: #e2e8f2;
  --radius: 14px;
  --wrap: 46rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.62 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── header ─────────────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  align-items: center;
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  text-decoration: none;
  margin-right: auto;
}
.site-header nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
}
.site-header nav a:hover { color: var(--navy); text-decoration: underline; }

/* ── layout ─────────────────────────────────────────────────────── */
main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}
main > section { margin-bottom: 2.4rem; }

h1 {
  font-size: clamp(1.85rem, 5.2vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0.7rem;
}
h2 {
  font-size: 1.32rem;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.6rem;
}
.hero h2 { margin-top: 0; }
p { margin: 0 0 0.9rem; }
.lede { font-size: 1.08rem; color: var(--ink-soft); }
.lede strong { color: var(--ink); }

.flag {
  display: inline-block;
  background: #e8f5ee;
  color: var(--money);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  margin: 0 0 0.5rem;
}

a { color: var(--navy); }

ul { padding-left: 1.15rem; margin: 0 0 0.9rem; }
li { margin-bottom: 0.35rem; }
ul.links { list-style: none; padding: 0; }
ul.links li { margin-bottom: 0.55rem; }

/* ── tables ─────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 1rem;
  font-size: 0.96rem;
}
th, td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); }
th { background: #eef2f8; font-size: 0.86rem; letter-spacing: 0.01em; }
tbody tr:last-child td { border-bottom: 0; }

pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ── calculator ─────────────────────────────────────────────────── */
.calc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.calc h2 { margin-top: 0; }
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}
.calc label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.calc input, .calc select {
  font: inherit;
  padding: 0.62rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--ink);
  width: 100%;
}
.calc input:focus, .calc select:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.calc-out {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.calc-total { display: flex; flex-direction: column; gap: 0.15rem; }
.calc-total span {
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.calc-total small { font-size: 0.9rem; opacity: 0.82; }
.calc-detail {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.5;
}
.calc-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0.85rem 0 0; }

/* ── app CTA ────────────────────────────────────────────────────── */
.cta {
  background: linear-gradient(160deg, #1f406f, #22467f);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
}
.cta h2 { margin: 0 0 0.5rem; color: #fff; }
.cta p { opacity: 0.94; }
.btn {
  display: inline-block;
  background: var(--money);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  margin-top: 0.3rem;
}
.btn:hover { filter: brightness(1.07); }

/* ── footer ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.6rem 1.25rem 2.4rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-footer p { max-width: var(--wrap); margin: 0 auto 0.6rem; }

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eaf0f8;
    --ink-soft: #a4b3c8;
    --bg: #0e1725;
    --surface: #16223a;
    --line: #26344f;
  }
  th { background: #1c2a45; }
  .calc input, .calc select { background: #101a2c; }
  .flag { background: rgba(26, 140, 92, 0.18); color: #4ed398; }
  a { color: #7fa8ea; }
  .brand { color: #7fa8ea; }
}
