/* Bottled Water Data. One stylesheet; light and dark from the same tokens. Started from Pet Nutrition Data's. */
:root {
  --bg: #f5f8fb;
  --surface: #ffffff;
  --surface-2: #eaf0f6;
  --text: #1e2125;
  --muted: #5b626c;
  --border: #d9e2ec;
  --accent: #1f5fa8;
  --accent-strong: #174a85;
  --accent-soft: #e4eef9;
  --warn: #8a3b12;
  --warn-soft: #fbefe4;
  --protein: #3d6ad6;
  --fat: #d98a1f;
  --carb: #3f9a6e;
  --focus: #2b6fd6;
  --shadow: 0 1px 2px rgba(30, 33, 37, .06), 0 4px 16px rgba(30, 33, 37, .05);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111315;
    --surface: #191c1f;
    --surface-2: #20242a;
    --text: #e8e6e1;
    --muted: #a3a9b2;
    --border: #2d3238;
    --accent: #7fb2ec;
    --accent-strong: #a6cbf3;
    --accent-soft: #16263a;
    --warn: #f0a56f;
    --warn-soft: #33231a;
    --protein: #7d9ff0;
    --fat: #f0b25a;
    --carb: #6cc597;
    --focus: #7fb0ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111315; --surface: #191c1f; --surface-2: #20242a; --text: #e8e6e1; --muted: #a3a9b2; --border: #2d3238;
  --accent: #7fb2ec; --accent-strong: #a6cbf3; --accent-soft: #16263a; --warn: #f0a56f; --warn-soft: #33231a;
  --protein: #7d9ff0; --fat: #f0b25a; --carb: #6cc597; --focus: #7fb0ff; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--font); font-feature-settings: "kern";
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); margin-top: .4em; letter-spacing: -.025em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.12rem; }
p, ul, ol { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.n, .num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.prose { max-width: 70ch; }
.prose li { margin-bottom: .35em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header and footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; font-size: 1.15rem;
  color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.logo:hover { color: var(--text); }
.logo-mark { width: 28px; height: 28px; color: var(--accent); }
.main-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: .95rem; }
.main-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
@media (max-width: 760px) {
  .site-header .wrap { gap: 4px; padding-top: 8px; }
  .main-nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .main-nav a { white-space: nowrap; }
}
.site-footer { margin-top: 64px; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: .9rem; padding: 24px 0 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0; }
.footer-note { max-width: 70ch; color: var(--text); }
.footer-small { font-size: .82rem; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 20px 0 0; font-size: .88rem; }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Home */
.hero { padding: 40px 0 8px; }
.hero h1 { max-width: 20ch; margin-bottom: .3em; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 3px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
a.card:hover { border-color: var(--accent); color: var(--text); }
.card h2, .card h3 { margin: 0; font-size: 1.15rem; }
.card .big { font-size: 2rem; font-weight: 750; letter-spacing: -.03em; color: var(--accent); line-height: 1.1; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--muted); margin: 8px 0 0; padding: 0; list-style: none; }
.stats strong { color: var(--text); font-size: 1.1rem; }
.columns { columns: 3 220px; column-gap: 24px; padding: 0; list-style: none; }
.columns li { break-inside: avoid; margin-bottom: 4px; }

/* Buttons and filters */
.button { display: inline-block; background: var(--accent); color: var(--surface); padding: 10px 18px; border-radius: 999px;
  text-decoration: none; font: inherit; font-weight: 600; border: 0; cursor: pointer; }
.button:hover { background: var(--accent-strong); color: var(--surface); }
.button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.button.ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 16px 0 10px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips .label { color: var(--muted); font-size: .9rem; margin-right: 2px; }
.chip { font: inherit; font-size: .9rem; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.count { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }

/* Data tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); margin: 8px 0 24px; }
table.data { border-collapse: collapse; width: 100%; font-size: .93rem; }
table.data th, table.data td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data thead th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; font-size: .84rem;
  color: var(--muted); white-space: nowrap; z-index: 1; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--accent-soft); }
table.data td.n, table.data th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data td.food { min-width: 260px; }
table.data td.food a { font-weight: 550; }
table.data td.food .sub { display: block; color: var(--muted); font-size: .82rem; }
th button.sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
th button.sort:focus-visible { outline: 3px solid var(--focus); border-radius: 4px; }
th button.sort::after { content: "↕"; opacity: .35; font-size: .8em; }
th[aria-sort="ascending"] button.sort::after { content: "↑"; opacity: 1; }
th[aria-sort="descending"] button.sort::after { content: "↓"; opacity: 1; }
.q { color: var(--muted); margin-right: 1px; cursor: help; }
.none { color: var(--muted); }
.badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn); white-space: nowrap; vertical-align: 1px; }
.badge.plain { background: var(--surface-2); color: var(--muted); }
table.facts { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.facts th, table.facts td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
table.facts td.n, table.facts th.n { text-align: right; }
table.facts thead th { color: var(--muted); font-weight: 600; font-size: .84rem; }

/* Food page */
.food-head { margin: 8px 0 20px; }
.food-head h1 { margin-bottom: .25em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { background: var(--surface-2); border-radius: 999px; padding: 2px 10px; font-size: .88rem; color: var(--muted); }
.tags li.vet { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
@media (max-width: 520px) {
  .keys { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .key { padding: 12px; }
  .key .value { font-size: 1.35rem; }
  .panel { padding: 14px; }
}
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.scroll table.facts { min-width: 540px; }
.key { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow); }
.key .label { color: var(--muted); font-size: .85rem; display: block; }
.key .value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.key .unit { color: var(--muted); font-size: .85rem; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); margin: 0 0 20px; }
.panel h2 { margin-top: 0; font-size: 1.2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

.split { display: flex; height: 28px; border-radius: 8px; overflow: hidden; margin: 6px 0 10px; }
.split span { display: block; height: 100%; }
.split .p { background: var(--protein); } .split .f { background: var(--fat); } .split .c { background: var(--carb); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0; list-style: none; font-size: .92rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.legend .p i { background: var(--protein); } .legend .f i { background: var(--fat); } .legend .c i { background: var(--carb); }

.ranks { list-style: none; padding: 0; margin: 0; }
.ranks li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 10px; align-items: center; padding: 6px 0; }
.ranks .what { font-size: .92rem; }
.meter { position: relative; height: 8px; background: linear-gradient(90deg, var(--accent-soft), var(--surface-2));
  border-radius: 99px; border: 1px solid var(--border); }
.meter b { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--accent); }
.ranks .say { grid-column: 2; color: var(--muted); font-size: .85rem; margin-top: -2px; }
@media (max-width: 520px) { .ranks li { grid-template-columns: 1fr; } .ranks .say { grid-column: 1; } }

.note { background: var(--warn-soft); border-radius: 10px; padding: 12px 16px; margin: 0 0 16px; font-size: .95rem; }
.note.calm { background: var(--accent-soft); }
.note > :last-child { margin-bottom: 0; }
.ingredients { font-size: .95rem; }
.sources { font-size: .92rem; padding-left: 1.1em; }
.on-lists { margin: -4px 0 20px; line-height: 1.8; }
.alike { list-style: none; padding: 0; margin: 0; }
.alike li { padding: 6px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; }
.alike li:last-child { border-bottom: 0; }
.alike .n { color: var(--muted); white-space: nowrap; }

/* Finder and calculator */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); margin: 16px 0 20px; }
.tool .row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.field > span { color: var(--muted); }
.field input, .field select { font: inherit; font-size: .95rem; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text); min-width: 0; }
.field input[type="number"] { width: 7.5rem; }
.field input[type="search"] { width: 15rem; max-width: 100%; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { color: var(--muted); padding: 0; margin-bottom: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.checks label { display: inline-flex; gap: 5px; align-items: center; font-size: .95rem; }
.result { font-size: 1.05rem; margin: 14px 0 0; }
.result strong { font-size: 1.25rem; }
.more { margin: 0 0 24px; }
noscript p { background: var(--warn-soft); padding: 10px 14px; border-radius: 8px; }

/* Guides */
.byline { color: var(--muted); font-size: .9rem; margin: -6px 0 18px; }
.guide .prose { max-width: none; }  /* tables and charts take the page's width; the text keeps a readable one */
.guide .prose > :is(p, ul, ol, h2, h3, dl, .note) { max-width: 74ch; }
.guide-list { list-style: none; padding: 0; margin: 0 0 24px; max-width: 74ch; }
.card-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.card-row:last-child { border-bottom: 0; }
.more-guides ul { margin: 0; padding-left: 1.1em; }
.chart { margin: 20px 0 24px; max-width: 74ch; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .tick, .chart .axis { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart .bar-a { fill: var(--accent); }
.chart .bar-b { fill: var(--fat); }
.chart figcaption { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.chart-legend { margin-bottom: 4px; }
.chart-legend .a i { background: var(--accent); }
.chart-legend .b i { background: var(--fat); }
.chart details { margin-top: 8px; font-size: .9rem; }
.chart details summary { cursor: pointer; color: var(--accent); }
.footer-lists { font-size: .86rem; }

.toc { font-size: .95rem; }
.faq dt { font-weight: 650; margin-top: 1em; }
.faq dd { margin: .25em 0 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

/* Phones: keep the list's filters to one swipeable row per group, so the table starts on the first screen */
@media (max-width: 560px) {
  .filters { gap: 6px; margin: 10px 0 6px; }
  .chips { display: flex; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  .chips .label, .chip { flex: 0 0 auto; white-space: nowrap; }
  .chip { padding: 4px 10px; font-size: .85rem; }
  .note { padding: 10px 12px; font-size: .9rem; }
  h2#list { margin-top: 18px; font-size: 1.3rem; }
  .sort-hint { display: none; }
}

/* Water site */
.logo-mark { width: 26px; height: 26px; }
table.data td.water { min-width: 230px; }
table.data td.water a { font-weight: 550; }
table.data td.water .sub { display: block; color: var(--muted); font-size: .82rem; }
table.data td.water .rank { display: inline-block; min-width: 2.1em; color: var(--muted); font-variant-numeric: tabular-nums; }
table.data td.fit { color: var(--muted); font-size: .88rem; min-width: 220px; }
table.data td.verdict { font-size: .88rem; white-space: nowrap; }
.v-friendly { color: var(--accent-strong); font-weight: 600; }
.v-scale-or-corrosion-risk { color: var(--warn); }
table.minerals th[scope="row"] { font-weight: 550; white-space: nowrap; }
table.minerals td.unit { color: var(--muted); font-size: .85rem; white-space: nowrap; }
table.minerals td.src { font-size: .88rem; }
table.minerals tr.derived th, table.minerals tr.derived td { color: var(--muted); font-style: italic; }
.badge.k-report, .badge.k-page { background: var(--accent-soft); color: var(--accent-strong); }
.badge.k-mirror, .badge.k-lab, .badge.k-study, .badge.k-dataset { background: var(--surface-2); color: var(--muted); }
.water-head { margin: 8px 0 18px; }
.water-head h1 { margin-bottom: .3em; }
.detail { font-size: .92rem; margin: 8px 0 0; }
.key .from { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.verdict-line { font-weight: 650; margin-bottom: .5em; }
.checks-list, .facts-list { list-style: none; padding: 0; margin: 0 0 10px; font-size: .93rem; }
.checks-list li { display: flex; flex-wrap: wrap; gap: 2px 8px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.checks-list li:last-child { border-bottom: 0; }
.checks-list li > span:first-child { min-width: 8.5rem; }
.checks-list .target { color: var(--muted); font-size: .85rem; }
.checks-list .state { margin-left: auto; font-size: .85rem; }
.state.s-ok { color: var(--accent-strong); font-weight: 600; }
.state.s-off { color: var(--warn); }
.facts-list li { padding: 3px 0; }
.facts-list li::before { content: "•"; color: var(--accent); margin-right: 8px; }
.card .count-line { color: var(--accent); font-weight: 650; font-size: .9rem; margin-top: auto; }
.cards { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.tool-link { margin: 4px 0 8px; }
.field.wide select { min-width: 16rem; max-width: 100%; }
.field.grow { flex: 1 1 320px; }
.field input[type="range"] { width: 100%; padding: 0; accent-color: var(--accent); }
.filters .search input { width: 16rem; max-width: 100%; }
.result .ok { color: var(--accent-strong); font-weight: 650; }
.result .off { color: var(--warn); font-weight: 650; }
.other-lists { margin-top: 28px; line-height: 1.9; }
abbr[title] { text-decoration: none; cursor: help; }
