/* Chargewise website — colours and type follow the app (chargewise/public/styles.css, default palette).
   No script, no motion, no cookies. Dark mode follows the device setting. */
:root {
  --bg:#f3f6fb; --card:#fff; --ink:#1c2433; --muted:#5f6b7d; --accent:#3b5bdb; --line:#e3e8f2; --ghost:#e7ecfb;
  --chipbg:#dff5e6; --chipink:#1e6b3c;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#121722; --card:#1b2230; --ink:#e6eaf2; --muted:#a3adbe; --accent:#8da2ff; --line:#2a3447; --ghost:#273150;
          --chipbg:#1f3a2b; --chipink:#9fe0b3; }
}
* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }          /* 18px at the default phone setting */
body { margin:0; background:var(--bg); color:var(--ink); font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position:absolute; left:-999px; top:8px; background:var(--card); padding:8px 12px; }
.skip:focus { left:8px; z-index:10; }

.top { max-width: 640px; margin: 0 auto; padding: 16px 16px 8px; display:flex; flex-wrap:wrap; align-items:center; gap: 12px 20px; }
.brand { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--ink); font-weight:700; font-size:1.25rem; }
.mark { width:36px; height:36px; border-radius:8px; }
nav { display:flex; gap: 4px 18px; flex-wrap:wrap; margin-left:auto; }
nav a { padding: 6px 0; min-height: 44px; display:inline-flex; align-items:center; }
nav a[aria-current] { color: var(--ink); font-weight:600; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }

main { max-width: 640px; margin: 0 auto; padding: 8px 16px 40px; }
section { margin: 32px 0; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 16px 0 12px; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 0 0 12px; }
h3 { font-size: 1.05rem; margin: 20px 0 4px; }
p { margin: 0 0 14px; max-width: 36em; }
.lead { font-size: 1.15rem; color: var(--ink); }
.pilot { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: 10px; padding: 14px 16px; }

.what { display:grid; gap: 24px; }
@media (min-width: 600px) { .what { grid-template-columns: 1fr 220px; align-items:start; } }
.shot { margin:0; }
.shot img { width:100%; height:auto; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.shot figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 6px; text-align:center; }

.calm { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 18px 8px; }
.legal { color: var(--muted); font-size: 0.95rem; }

.facts ul { padding-left: 1.2em; margin: 0 0 16px; }
.facts li { margin: 0 0 10px; }
.more { font-weight: 600; }

footer { max-width: 640px; margin: 0 auto; padding: 24px 16px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
footer p { margin: 0 0 10px; }
.links { display:flex; flex-wrap:wrap; gap: 8px 20px; }
.links a { min-height: 44px; display:inline-flex; align-items:center; }

/* FAQ page */
.faq section { margin: 40px 0; padding-top: 8px; border-top: 1px solid var(--line); }
.faq h3 { font-size: 1.1rem; margin: 28px 0 6px; }
.faq ul { padding-left: 1.2em; margin: 0 0 14px; }
.faq li { margin: 0 0 10px; max-width: 36em; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px 6px; margin: 20px 0 8px; }
.toc .toc-title { font-size: 1rem; margin: 0 0 6px; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; }
.with-pic { display: grid; gap: 16px; }
@media (min-width: 600px) { .with-pic { grid-template-columns: 1fr 180px; align-items: start; } }
.face { margin: 0; max-width: 200px; }
.face img { width: 100%; height: auto; }
.face figcaption { color: var(--muted); font-size: 0.95rem; text-align: center; margin-top: 4px; }
:target { scroll-margin-top: 12px; }

/* Back to top: fixed, bottom right; shown by top.js after one screen of scrolling. No animation. */
.totop { position: fixed; right: 16px; bottom: 16px; z-index: 5; display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; padding: 0 16px; border-radius: 999px; background: var(--card); color: var(--accent);
  border: 2px solid var(--accent); font-weight: 600; text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.totop[hidden] { display: none; }
.totop span { font-size: 1.2em; line-height: 1; }
html { scroll-padding-bottom: 80px; }   /* WCAG 2.4.11: a focused link never sits under the Top button */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
footer { padding-bottom: 88px; }       /* the last footer link stays clear of the Top button */

/* Setup steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 24px 0; }
.steps > li { counter-increment: step; position: relative; padding: 4px 0 8px 56px; margin: 0 0 20px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--bg); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps h2 { font-size: 1.15rem; margin: 6px 0 6px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--ink); }

/* Guide pages: numbered sub-steps, screenshots, stop points */
.guide ol { padding-left: 1.4em; margin: 0 0 14px; }
.guide ol li { margin: 0 0 10px; max-width: 36em; padding-left: 4px; }
.pause { color: var(--muted); font-style: italic; }
.shot-wide, .shot-round { margin: 8px 0 18px; }
.shot-wide img { width: 100%; max-width: 420px; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
.shot-round img { width: 100%; max-width: 220px; height: auto; display: block; }
.diagram img { max-width: 100%; background: #fff; }
.shot-wide figcaption, .shot-round figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 6px; }
.pics { display: grid; gap: 8px; }
@media (min-width: 600px) { .pics { grid-template-columns: 220px 1fr; align-items: start; gap: 20px; } }
