/* Blog pages: same colour tokens as the app (src/index.css), light and dark. */
:root {
  color-scheme: light;
  --page: #f8f7f4; --surface: #ffffff; --line: #e5e7eb; --muted: #4b5563; --text: #1f2937;
  --ink: #1d3461; --brand: #1d3461; --relief: #2d6a4f; --focus: #1d3461; --tint: #eef1f7;
}
:root.dark {
  color-scheme: dark;
  --page: #0f141c; --surface: #171e29; --line: #2e3846; --muted: #b4bcc8; --text: #e3e7ec;
  --ink: #a9c4f5; --brand: #2b4f8f; --relief: #5cc08f; --focus: #a9c4f5; --tint: #1d2531;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--page); color: var(--text); font: 18px/1.65 "Source Sans 3", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; color: var(--ink); line-height: 1.2; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 16px; border-radius: 8px; font-weight: 700; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

header.site { background: var(--brand); color: #fff; }
header.site a { color: #fff; }
.support { background: rgba(0,0,0,0.25); font-size: 15px; padding: 8px 0; }
.support a { font-weight: 700; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 26px; text-decoration: none; }
.bar ul { list-style: none; display: flex; gap: 6px; }
.bar nav a { display: inline-block; padding: 6px 12px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.bar nav a:hover, .bar nav a[aria-current="page"] { background: rgba(255,255,255,0.14); }

main { padding-top: 28px; padding-bottom: 40px; }
main:focus { outline: none; }
main > h1, article h1 { font-size: clamp(32px, 6vw, 44px); margin-bottom: 12px; }
.lede { font-size: 20px; color: var(--muted); margin-bottom: 24px; }
.meta { color: var(--muted); font-size: 16px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
article header { margin-bottom: 24px; }

.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 28px; margin-top: 1.6em; }
.prose h3 { font-size: 22px; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.35em; }
.prose strong { color: var(--ink); }
.prose blockquote { border-left: 4px solid var(--relief); padding: 4px 0 4px 16px; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); }
.prose code { background: var(--tint); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }
.prose pre { background: var(--tint); padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-size: 15px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; font-size: inherit; }

.cta { margin-top: 36px; background: var(--surface); border: 2px solid var(--relief); border-radius: 16px; padding: 20px; }
.cta-title { font-family: "Fraunces", Georgia, serif; font-size: 22px; font-weight: 700; color: var(--ink); }
.cta p + p { margin-top: 4px; color: var(--muted); }
.button { display: inline-block; margin-top: 14px; background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 700; text-decoration: none; }

.related { margin-top: 44px; }
.related > h2 { font-size: 26px; margin-bottom: 14px; }
.cards { list-style: none; display: grid; gap: 14px; }
.card { background: var(--surface); border-radius: 16px; padding: 18px 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.card h2 { font-size: 23px; margin-bottom: 4px; }
.card h2 a { text-decoration: none; }
.card h2 a:hover { text-decoration: underline; }
.card .meta { margin-bottom: 6px; }

.site-footer { border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: 40px; font-size: 15px; color: var(--muted); }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }

/* Running cost pages */
.live { margin: 24px 0 28px; background: var(--surface); border: 2px solid var(--relief); border-radius: 16px; padding: 20px; }
.live h2 { font-size: 22px; margin-bottom: 10px; }
.live label { display: block; font-size: 16px; color: var(--muted); margin-bottom: 14px; }
.live select { display: block; width: 100%; margin-top: 4px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.live-row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.live-row strong { font-family: "Fraunces", Georgia, serif; font-size: 24px; color: var(--relief); white-space: nowrap; }
.live .muted { color: var(--muted); font-size: 16px; margin: 6px 0; }
.live .button { margin-top: 10px; }

/* Worth a look (affiliate picks) */
.worth { margin-top: 28px; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.worth h2 { font-size: 22px; margin-bottom: 8px; }
.worth ul { list-style: none; }
.worth li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.worth .tile { flex: none; width: 56px; height: 56px; border-radius: 12px; background: rgba(139, 92, 246, 0.15); color: #8b5cf6; display: flex; align-items: center; justify-content: center; }
.worth li:first-child { border-top: 0; }
.worth li a { font-weight: 600; }
.worth li p { font-size: 16px; color: var(--muted); }
.worth .muted { font-size: 14px; color: var(--muted); margin-top: 8px; }
