/* ==========================================================================
   Layout: after Müller-Brockmann, "Grid Systems in Graphic Design".
   12-column grid. Section label in columns 1–3, text in columns 4–10,
   flush left, ragged right. One family (Archivo); the condensed cut is kept
   for price numerals, the way a forecourt price sign sets them.
   ========================================================================== */
:root {
  --bg: #ffffff;
  --surface: #f4f5f7;
  --ink: #15171c;
  --ink-2: #5b606b;
  --rule: #d8dbe1;
  --accent: #1f3fd6;
  --accent-hover: #1832b4;
  --on-accent: #ffffff;
  --accent-soft: #e9edfd;
  --good: #0b7a4b;
  --error: #b42318;

  /* Forecourt price sign: a physical object, the same in both themes.
     Regular in amber, diesel in green (the US pump convention for diesel). */
  --sign-bg: #0e1013;
  --sign-rule: #2b2f37;
  --sign-fg: #a9aeb8;
  --sign-strong: #ffffff;
  --led-regular: #ffc933;
  --led-diesel: #39d98a;

  /* The one solid color field */
  --band-bg: #1f3fd6;
  --band-fg: #ffffff;
  --band-fg-2: #d3daff;

  /* Names kept for the dashboard stylesheet. */
  --primary: var(--ink);
  --on-primary: var(--bg);
  --on-primary-2: #b8bcc5;

  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Type scale, ratio about 4:3 */
  --fs-meta: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.375rem;
  --fs-h2: 2rem;
  --fs-h1: clamp(2.375rem, 1.4rem + 4vw, 4.25rem);
  --measure: 62ch;

  /* Space, 8px base */
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s5: 3rem;
  --s6: 4.5rem;

  --radius: 0;
  --wrap: 72rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114;
    --surface: #181b20;
    --ink: #e8e9ec;
    --ink-2: #9ba0aa;
    --rule: #2b2f37;
    --accent: #8ea2ff;
    --accent-hover: #aab8ff;
    --on-accent: #0f1114;
    --accent-soft: #182246;
    --good: #4cc38a;
    --error: #f0786c;
    --on-primary-2: #4b505a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1114;
  --surface: #181b20;
  --ink: #e8e9ec;
  --ink-2: #9ba0aa;
  --rule: #2b2f37;
  --accent: #8ea2ff;
  --accent-hover: #aab8ff;
  --on-accent: #0f1114;
  --accent-soft: #182246;
  --good: #4cc38a;
  --error: #f0786c;
  --on-primary-2: #4b505a;
  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

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

h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--display); text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 600; line-height: 1.04; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
h3 { font-size: var(--fs-body); font-weight: 650; line-height: 1.35; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 650; }

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[id] { scroll-margin-top: 2rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 16px; }
@media (min-width: 48rem) { .wrap { padding-inline: 2rem; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--bg); padding: var(--s1) var(--s2);
}
.skip-link:focus { top: 16px; }

.muted { color: var(--ink-2); }
.tbd { color: var(--ink-2); font-style: italic; }

/* The grid: label in columns 1–3, body in columns 4–10 */
.row { display: grid; gap: var(--s2); }
.row > * { min-width: 0; }
@media (min-width: 60rem) {
  .row { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s4); }
  .label { grid-column: 1 / span 3; }
  .body { grid-column: 4 / span 7; }
}
.label { font-size: var(--fs-meta); font-weight: 600; color: var(--ink); line-height: 1.5; }
.label .muted { font-weight: 400; }
.flow > * + * { margin-top: var(--s2); }
.body p { max-width: var(--measure); }

/* ==========================================================================
   Buttons and links
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.25rem;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none; text-align: center;
  border: 1px solid var(--ink); border-radius: var(--radius);
  background: transparent; color: var(--ink); cursor: pointer;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-secondary:hover { background: var(--surface); color: var(--ink); }
.btn-small { min-height: 40px; padding: 0.45rem 0.9rem; font-size: 0.9375rem; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

.text-link { font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { padding-block: var(--s3); }
.header-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s3); }
.logo { color: var(--ink); text-decoration: none; }
.logo-text { font-family: var(--display); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); list-style: none; }
.site-nav a { font-size: var(--fs-meta); font-weight: 500; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* ==========================================================================
   Hero and the example price sign
   ========================================================================== */
.hero { padding-block: var(--s5) var(--s6); }
@media (min-width: 60rem) { .hero { padding-block: var(--s6); } }
.hero h1 { max-width: 14em; margin-bottom: var(--s5); }
.lead { font-size: var(--fs-lead); line-height: 1.45; max-width: 32em; }

.sign { margin: var(--s6) 0 0; }
.sign-board { background: var(--sign-bg); color: var(--sign-fg); padding: var(--s2) var(--s3) var(--s1); max-width: 34rem; }
.sign-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sign-table th, .sign-table td { padding: var(--s1) 0; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--sign-rule); }
.sign-table tr:last-child th, .sign-table tr:last-child td { border-bottom: 0; }
.sign-table thead th { font-size: var(--fs-meta); font-weight: 500; color: var(--sign-fg); }
.sign-table tbody th { font-weight: 600; width: 34%; color: var(--sign-strong); }
.sign-table .num { text-align: right; }
.sign-table .posted { color: var(--sign-fg); }
.price {
  font-family: var(--display); font-stretch: 75%; font-weight: 700;
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); line-height: 1; letter-spacing: -0.01em;
  color: var(--accent);
}
.price.regular { color: var(--led-regular); }
.price.diesel { color: var(--led-diesel); }
.price sup { font-size: 0.45em; vertical-align: 0.95em; margin-left: 0.04em; }
.sign-note { margin-top: var(--s2); font-size: var(--fs-meta); color: var(--ink-2); max-width: 34rem; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--s5); }
@media (min-width: 60rem) { .section { padding-block: var(--s6); } }
.section > .row { border-top: 1px solid var(--ink); padding-top: var(--s3); }

.figure-line { font-size: var(--fs-lead); line-height: 1.45; max-width: 30em; }

/* A real sequence, so it is numbered */
.steps { list-style: none; counter-reset: step; display: grid; gap: var(--s3); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; max-width: var(--measure); }
.steps li::before { content: counter(step); font-weight: 600; font-variant-numeric: tabular-nums; }
.steps h3 { margin-bottom: 0.25rem; }


/* Commitments */
.commitments { display: grid; gap: var(--s4); }
.commitment h3 { font-size: var(--fs-lead); font-weight: 600; margin-bottom: var(--s1); }
.commitment p { max-width: var(--measure); }

/* About */
.owner { display: grid; gap: var(--s3); }
@media (min-width: 40rem) { .owner { grid-template-columns: 9rem 1fr; } }
.owner > * { min-width: 0; }
.owner .body-text > * + * { margin-top: var(--s2); }
.owner .body-text h3 + p { margin-top: 0.15rem; }
.contact-details { font-size: var(--fs-meta); line-height: 1.6; }
.photo-placeholder {
  aspect-ratio: 4 / 5; max-width: 100%; display: grid; place-items: center; padding: var(--s2);
  background: var(--surface); color: var(--ink-2); font-size: 0.75rem; text-align: center;
}

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: var(--s2) var(--s4) var(--s2) 0; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: var(--s2); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { max-width: var(--measure); padding-bottom: var(--s2); color: var(--ink); }

/* Lists of short facts */
.plain-list { list-style: none; display: grid; gap: var(--s1); max-width: var(--measure); }
.plain-list li { padding-left: 1rem; position: relative; }
.plain-list li::before { content: "\2013"; position: absolute; left: 0; color: var(--ink-2); }

/* ==========================================================================
   Form
   ========================================================================== */
.form { max-width: 36rem; }
.field { margin-bottom: var(--s3); }
.field-row { display: grid; gap: 0 var(--s3); }
@media (min-width: 40rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: var(--fs-meta); font-weight: 600; margin-bottom: 0.35rem; }
.hint { font-weight: 400; color: var(--ink-2); }
.field input, .field textarea, .field select {
  display: block; width: 100%; min-height: 48px;
  font: inherit; font-size: max(1rem, var(--fs-body)); color: var(--ink);
  background: var(--bg); border: 1px solid var(--ink-2); border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
}
.field textarea { resize: vertical; min-height: 6.5rem; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field-error { color: var(--error); font-weight: 600; font-size: var(--fs-meta); margin: 0.35rem 0 0; }
.field-error:empty { display: none; }
.field-help { color: var(--ink-2); font-size: var(--fs-meta); margin: 0.35rem 0 0; }

.form-errors { border-left: 3px solid var(--error); padding: var(--s1) var(--s2); margin-bottom: var(--s3); color: var(--error); font-weight: 600; }
.form-errors ul { margin: var(--s1) 0 0 1.25rem; }
.form-errors a { color: var(--error); }
.form-note { font-size: var(--fs-meta); color: var(--ink-2); margin-top: var(--s2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-success { border-left: 3px solid var(--accent); padding: var(--s1) var(--s2); max-width: 36rem; }
.form-success h3 { margin-bottom: var(--s1); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { padding-block: var(--s5) var(--s4); font-size: var(--fs-meta); color: var(--ink-2); }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--accent); }
.site-footer address { font-style: normal; }
.footer-legal { margin-top: var(--s4); }
.footer-legal p { font-size: var(--fs-meta); color: var(--ink-2); }

address { font-style: normal; }
.site-footer > .footer-legal:first-child { margin-top: 0; border-top: 1px solid var(--ink); padding-top: var(--s3); }

/* Color */
.hl { color: var(--accent); }
.steps li::before { color: var(--accent); }

.band { background: var(--band-bg); color: var(--band-fg); }
.band .row { border-top: 0; padding-top: 0; }
.band h2, .band h3, .band .label { color: var(--band-fg); }
.band p { color: var(--band-fg-2); }
.band a { color: var(--band-fg); }
.band :focus-visible { outline-color: var(--band-fg); }
