/*
 * PriceWarden public site. One stylesheet for every page; no build step,
 * no web fonts, no scripts. Colours are tokens on :root with a dark set
 * under prefers-color-scheme, so each page renders in the reader's theme.
 */
:root {
  --ink: #1a1c1e;
  --muted: #46484b;
  --brand: #14684a;
  --brand-ink: #ffffff;
  --brand-soft: #eef6f2;
  --line: #d7dade;
  --page: #f7f9fc;
  --surface: #ffffff;
  --warn: #b07a0a;
  --warn-soft: #fdf3dc;
  --focus: #14684a;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e3e2e6;
    --muted: #c3c6cf;
    --brand: #8fd9b6;
    --brand-ink: #0c3b2a;
    --brand-soft: #16241e;
    --line: #43474e;
    --page: #111418;
    --surface: #1a1e23;
    --warn: #e7b54a;
    --warn-soft: #2e2615;
    --focus: #8fd9b6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

/* Keyboard users land on the content first. */
.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: .5rem .8rem;
  background: var(--brand);
  color: var(--brand-ink);
  border-radius: .3rem;
  z-index: 10;
}
.skip:focus { top: .75rem; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

/* Header: brand on the left, a short nav that wraps under it on phones. */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header .bar {
  max-width: 60rem;
  margin: 0 auto;
  padding: .75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }
.brand .tag { fill: var(--brand); }
.brand .hole { fill: var(--surface); }
.brand .mark { fill: none; stroke: var(--brand-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.site-header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
}
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--brand); text-decoration: underline; }
.site-header nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Content column. Legal pages keep a narrow reading width; the landing page widens. */
main {
  display: block;
  flex: 1 0 auto;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}
main.wide { max-width: 60rem; }
main.wide > p, .hero p { max-width: 44rem; }
h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; line-height: 1.35; margin: 2.2rem 0 .5rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 .25rem; }
p, li, dd { color: var(--muted); }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1rem; }
li { margin-bottom: .35rem; }
a { color: var(--brand); }
strong { color: var(--ink); }
code {
  font: .9em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--brand-soft);
  padding: .05rem .3rem;
  border-radius: .25rem;
  color: var(--ink);
}
.meta { color: var(--muted); font-size: .9rem; margin: 0 0 2rem; }
.lead { font-size: 1.15rem; color: var(--ink); }

/* Tables scroll inside their own box on narrow screens instead of the page. */
.table-wrap { overflow-x: auto; margin: .5rem 0 1rem; }
table { border-collapse: collapse; width: 100%; }
caption { text-align: left; font-weight: 600; padding: 0 0 .4rem; color: var(--ink); }
th, td {
  text-align: left;
  vertical-align: top;
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
th { color: var(--ink); font-weight: 600; }
td { color: var(--muted); }
td ul { margin: 0; padding-left: 1.1rem; }

/* Callouts. */
.note { border-left: 3px solid var(--brand); padding: .1rem 0 .1rem 1rem; margin: 1.5rem 0; }
.warn { border-left: 3px solid var(--warn); padding: .1rem 0 .1rem 1rem; margin: 1.5rem 0; }
.note p:last-child, .warn p:last-child { margin-bottom: 0; }
.draft {
  border: 1px solid var(--warn);
  border-left-width: 6px;
  background: var(--warn-soft);
  border-radius: .3rem;
  padding: .75rem 1rem;
  margin: 0 0 1.5rem;
}
.draft p { margin: 0; color: var(--ink); }

/* Landing page. */
.hero { padding: 1rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin-bottom: .75rem; }
.status {
  display: inline-block;
  margin: 0 0 1rem;
  padding: .2rem .6rem;
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--brand);
  font-size: .85rem;
  font-weight: 600;
}
.cards {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 36rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .cards { grid-template-columns: repeat(4, 1fr); } }
.cards > li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: 1rem 1.1rem;
}
.cards h3 { margin-top: 0; }
.cards p { margin: 0; }
.formula {
  background: var(--brand-soft);
  border-radius: .5rem;
  padding: .75rem 1rem;
  color: var(--ink);
  font-weight: 600;
}

/* Question-and-answer blocks on the support page. */
details {
  border-bottom: 1px solid var(--line);
  padding: .6rem 0;
}
summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details > *:not(summary) { margin-top: .6rem; }

/* Footer: the legal links every store listing points at, on every page. */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.site-footer .bar {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
  font-size: .9rem;
  color: var(--muted);
}
.site-footer ul {
  list-style: none;
  margin: 0 0 .75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
}
.site-footer p { margin: 0; }

@media (max-width: 30rem) {
  main { padding-top: 1.75rem; }
  h1 { font-size: 1.6rem; }
}

@media print {
  .skip, .site-header nav, .site-footer ul { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
  .draft { border-color: #000; background: none; }
}
