/* Milepost — milepostapp.co.uk. Plain CSS, no build step.
   Colours follow the app: AccentColor #008F66 (dark #33C785). Text on the accent uses the deeper
   greens from the app icon so it meets WCAG AA contrast. */

:root {
  color-scheme: light dark;
  --accent: #008f66;
  --accent-ink: #00704f;        /* links and accent text on light surfaces: 6.1:1 on white */
  --accent-soft: #e3f3ec;
  --bg: #ffffff;
  --bg-soft: #f2f6f4;
  --card: #ffffff;
  --text: #121715;
  --text-2: #4a5550;            /* 7.5:1 on white */
  --border: #d9e2de;
  --hero-from: #005c42;
  --hero-to: #00785a;
  --hero-text: #ffffff;
  --hero-text-2: #dcefe7;
  --button-bg: #ffffff;
  --button-text: #004d37;
  --button-solid-bg: #00704f;
  --button-solid-text: #ffffff;
  --focus: #0a63d1;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px rgb(0 40 28 / 0.08);
  --radius: 16px;
  --radius-small: 10px;
  --max: 1080px;
  --gutter: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #33c785;
    --accent-ink: #4fd395;
    --accent-soft: #10291f;
    --bg: #0c0f0e;
    --bg-soft: #141917;
    --card: #1a201d;
    --text: #edf2ef;
    --text-2: #a9b5af;
    --border: #2b3430;
    --hero-from: #08291f;
    --hero-to: #0d4232;
    --hero-text: #ffffff;
    --hero-text-2: #c4ddd2;
    --button-bg: #33c785;
    --button-text: #04190f;
    --button-solid-bg: #33c785;
    --button-solid-text: #04190f;
    --focus: #7fb8ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 10;
  background: var(--card); color: var(--text); padding: 10px 14px; border-radius: var(--radius-small);
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 10px 8px; color: var(--text); text-decoration: none; font-size: 0.95rem; border-radius: 8px; }
.site-nav a:hover { color: var(--accent-ink); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--accent-ink); font-weight: 650; }
@media (min-width: 720px) { .site-nav ul { gap: 12px; } }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: var(--hero-text);
  padding: 44px 0 52px;
}
.hero .wrap { display: grid; gap: 36px; align-items: center; }
.hero h1 { color: var(--hero-text); max-width: 16ch; }
.hero .lede { font-size: 1.15rem; color: var(--hero-text-2); max-width: 36rem; }
.hero .lede strong { color: var(--hero-text); }
.hero a:not(.button) { color: var(--hero-text); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 24px; }
.price-note { color: var(--hero-text-2); font-size: 0.95rem; margin: 0; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 80px; }
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
}

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px; border-radius: 14px;
  background: var(--button-bg); color: var(--button-text);
  font-weight: 700; font-size: 1.05rem; text-decoration: none; line-height: 1.2;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.15);
}
.button:hover { text-decoration: underline; }
.button svg { width: 20px; height: 20px; flex: none; }
.button.solid { background: var(--button-solid-bg); color: var(--button-solid-text); }
.button small { display: block; font-weight: 500; font-size: 0.8rem; opacity: 0.85; }

/* Example summary card in the hero (illustrative) */
.preview {
  background: var(--card); color: var(--text);
  border-radius: 24px; padding: 20px; box-shadow: 0 20px 50px rgb(0 0 0 / 0.25);
  max-width: 380px; width: 100%; justify-self: center;
}
.preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.preview-head strong { font-size: 1.05rem; }
.preview-head span { color: var(--text-2); font-size: 0.85rem; }
.preview-total { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.preview-sub { color: var(--text-2); font-size: 0.9rem; margin: 2px 0 12px; }
.meter { height: 8px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.meter span { display: block; height: 100%; width: 32%; background: var(--accent); border-radius: 99px; }
.preview-meter-label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-2); margin: 6px 0 16px; }
.trip { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 0; border-top: 1px solid var(--border); font-size: 0.92rem; }
.trip .route { font-weight: 600; }
.trip .meta { color: var(--text-2); font-size: 0.82rem; grid-column: 1; }
.trip .miles { grid-row: 1; grid-column: 2; text-align: right; font-variant-numeric: tabular-nums; }
.tag { grid-column: 2; justify-self: end; font-size: 0.75rem; font-weight: 650; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); }
.tag.personal { background: #ecebfa; color: #3f3a9e; }
.tag.todo { background: var(--bg-soft); color: var(--text-2); }
@media (prefers-color-scheme: dark) { .tag.personal { background: #24223f; color: #b9b5ff; } }
.preview-caption { font-size: 0.78rem; color: var(--text-2); margin: 10px 0 0; text-align: center; }

/* Sections */
.section { padding: 56px 0; }
.section.soft { background: var(--bg-soft); }
.section-intro { max-width: 40rem; color: var(--text-2); font-size: 1.08rem; }
@media (min-width: 900px) { .section { padding: 80px 0; } }

.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; counter-reset: step; }
.steps li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; counter-increment: step; }
.steps li::before {
  content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 750; margin-bottom: 10px;
}
.steps p { color: var(--text-2); margin: 0; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.features { display: grid; gap: 16px; margin-top: 28px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature .icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 12px; }
.feature .icon svg { width: 22px; height: 22px; }
.feature p { color: var(--text-2); margin: 0; }
.feature p + p { margin-top: 0.6em; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }

/* Tables */
.table-scroll { overflow-x: auto; margin: 20px 0; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; padding: 12px 14px 0; color: var(--text-2); font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { font-size: 0.85rem; color: var(--text-2); font-weight: 650; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
thead th.num { white-space: normal; min-width: 5.5em; }

/* Privacy band */
.privacy-points { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 12px; }
.privacy-points li { display: flex; gap: 12px; align-items: flex-start; }
.privacy-points svg { width: 22px; height: 22px; flex: none; color: var(--accent-ink); margin-top: 3px; }
@media (min-width: 720px) { .privacy-points { grid-template-columns: repeat(2, 1fr); gap: 16px 32px; } }
.note { color: var(--text-2); font-size: 0.95rem; }

/* Pricing */
.pricing { display: grid; gap: 24px; align-items: start; }
.price-card { background: var(--card); border: 2px solid var(--accent); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.price-card .price { font-family: var(--font-display); font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 6px 0 4px; }
.price-card .price span { display: block; margin-top: 8px; font-size: 1.05rem; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.checklist { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 0.3em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft);
}
.checklist li::after {
  content: ""; position: absolute; left: 8.5px; top: calc(0.3em + 3.5px); width: 5px; height: 9px;
  border: solid var(--accent-ink); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg);
}
.free-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; background: var(--card); }
.free-box p:last-child { margin-bottom: 0; }
@media (min-width: 900px) { .pricing { grid-template-columns: 1fr 1fr; gap: 32px; } }

/* FAQ */
.faq { margin-top: 24px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 650; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 0 18px; color: var(--text-2); max-width: 46rem; }
.faq .answer p:last-child, .faq .answer ul:last-child, .faq .answer ol:last-child { margin-bottom: 0; }
.faq h2 { margin-top: 40px; }

/* Long-form pages (privacy, terms, support) */
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 40px 0 32px; }
.page-head p { color: var(--text-2); margin: 0; max-width: 42rem; }
.prose { max-width: 46rem; padding-top: 32px; padding-bottom: 64px; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose .summary-box { background: var(--accent-soft); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 8px; }
.prose .summary-box h2 { margin-top: 0; font-size: 1.2rem; }
.prose .summary-box ul { margin-bottom: 0; }
.updated { font-size: 0.95rem; color: var(--text-2); }
.toc { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0 0; }
.toc h2 { font-size: 1rem; margin: 0 0 8px; }
.toc ul { margin: 0; padding-left: 1.2em; columns: 1; }
@media (min-width: 720px) { .toc ul { columns: 2; column-gap: 32px; } }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin: 24px 0; }
.contact-card p:last-child { margin-bottom: 0; }
kbd, .ui { font-family: inherit; font-weight: 650; }

/* 404 */
.not-found { text-align: center; padding: 80px 0 96px; }
.not-found img { margin: 0 auto 24px; width: 96px; height: 96px; border-radius: 22px; }
.not-found p { color: var(--text-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 32px 0 40px; font-size: 0.92rem; color: var(--text-2); }
.site-footer .made-by { color: var(--text); font-weight: 650; margin-bottom: 8px; }
.footer-links { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { display: inline-block; padding: 6px 0; }
.company { margin: 0; }
.after-faq { margin-top: 24px; }
@media (max-width: 400px) {
  .site-header .wrap { gap: 8px; }
  .brand { gap: 8px; font-size: 1.05rem; }
  .brand img { width: 28px; height: 28px; }
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 10px 6px; font-size: 0.875rem; }
}
.hero :focus-visible { outline-color: #ffffff; }
