:root {
  --bg: #f3f7fb;
  --surface: #ffffff;
  --surface-2: #e8f1f9;
  --text: #102a43;
  --muted: #5b7083;
  --accent: #0b84d8;
  --accent-strong: #0866a8;
  --accent-soft: #d6ebfa;
  --ok: #1a9a64;
  --warn: #c2410c;
  --danger: #c0392b;
  --border: #d8e3ec;
  --ring-track: #dbe8f3;
  --shadow: 0 1px 2px rgb(16 42 67 / 6%), 0 4px 16px rgb(16 42 67 / 6%);
  --radius: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1620;
    --surface: #13212e;
    --surface-2: #1a2c3c;
    --text: #e6eef5;
    --muted: #93a8bb;
    --accent: #3aa5ef;
    --accent-strong: #6cbcf4;
    --accent-soft: #163a55;
    --ok: #3ccf8e;
    --warn: #fb923c;
    --danger: #f87171;
    --border: #23384a;
    --ring-track: #1d3243;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.view {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px calc(96px + env(safe-area-inset-bottom));
}

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; margin-bottom: 12px; }
h3 { font-size: 0.95rem; }

p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > .grow { flex: 1; }
.spacer { height: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

/* ---------- botões e formulários ---------- */

button, .btn {
  font: inherit;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  min-height: 44px;
}
button:hover { background: var(--accent-strong); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
button.secondary:hover { background: var(--accent-soft); }
button.link { background: none; color: var(--accent); padding: 4px 0; min-height: 0; font-weight: 600; }
button.icon { background: none; color: var(--muted); padding: 8px; min-height: 0; border-radius: 8px; line-height: 1; }
button.icon:hover { background: var(--surface-2); color: var(--danger); }
button.block { width: 100%; }

label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }

input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
textarea { resize: vertical; min-height: 64px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field + .field { margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.switch label { margin: 0; color: var(--text); font-size: 1rem; font-weight: 500; }
.switch input { width: 48px; height: 28px; min-height: 0; accent-color: var(--accent); }

.error { color: var(--danger); font-size: 0.9rem; min-height: 1.2em; }

/* ---------- login ---------- */

.auth { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
.auth .logo { width: 72px; height: 72px; margin: 0 auto 12px; display: block; }
.auth h1 { text-align: center; font-size: 2rem; }
.auth .tagline { text-align: center; margin: 4px 0 24px; }

/* ---------- hoje ---------- */

.today-head { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 16px; }

.ring-wrap { position: relative; width: 220px; height: 220px; margin: 4px auto 8px; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--ring-track); stroke-width: 16; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 16; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.ring-fill.done { stroke: var(--ok); }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-label .pct { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; }
.ring-label .amount { font-size: 0.95rem; color: var(--muted); }

.goal-note { text-align: center; font-size: 0.85rem; color: var(--muted); }
.goal-note strong { color: var(--text); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.chips.suggest { flex-wrap: wrap; overflow: visible; }
.chips.suggest .chip { white-space: normal; text-align: left; }
.chip {
  flex: none;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 500;
  min-height: 40px;
}
.chip:hover { background: var(--accent-soft); }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

.containers { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.container-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 8px;
  border-radius: 14px;
  min-height: 84px;
}
.container-btn:hover { background: var(--accent); color: #fff; }
.container-btn .ml { font-size: 1.15rem; font-weight: 800; }
.container-btn .name { font-size: 0.8rem; font-weight: 500; }

.custom-add { margin-top: 12px; }

.entries { list-style: none; padding: 0; margin: 0; }
.entries li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.entries li:first-child { border-top: 0; }
.entries .emoji { font-size: 1.4rem; width: 32px; text-align: center; }
.entries .what { flex: 1; }
.entries .time { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

.notice { background: var(--accent-soft); border-radius: 12px; padding: 12px; font-size: 0.9rem; }
.notice a { color: var(--accent-strong); font-weight: 600; }

/* ---------- histórico ---------- */

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); padding: 4px; border-radius: 12px; gap: 4px; margin-bottom: 16px; }
.segmented button { background: none; color: var(--text); min-height: 38px; padding: 6px; font-weight: 600; }
.segmented button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); color: var(--accent-strong); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; text-align: center; }
.stat .v { font-size: 1.3rem; font-weight: 800; }
.stat .k { font-size: 0.75rem; color: var(--muted); }

.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--accent); }
.chart .bar.met { fill: var(--ok); }
.chart .goal-tick { stroke: var(--text); stroke-width: 2; opacity: 0.55; }
.chart .axis { fill: var(--muted); font-size: 10px; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.legend { display: flex; gap: 16px; font-size: 0.8rem; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

.breakdown { list-style: none; margin: 0; padding: 0; }
.breakdown li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; }
.breakdown .track { grid-column: 2 / 4; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.breakdown .track span { display: block; height: 100%; background: var(--accent); }

/* ---------- ajustes ---------- */

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; }

.geo-results { list-style: none; margin: 8px 0 0; padding: 0; }
.geo-results button { width: 100%; text-align: left; background: var(--surface-2); color: var(--text); margin-top: 6px; font-weight: 500; }

/* ---------- análise das bebidas ---------- */

.stats.mini { margin-bottom: 12px; }
.stats.mini .stat { padding: 10px 6px; background: var(--surface-2); border-color: transparent; }
.stats.mini .v { font-size: 1.05rem; }
.stats.mini .v small { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.stat.warn .v { color: var(--warn); }
.stat.alert .v { color: var(--danger); }

.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.insight { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--accent); }
.insight .ic { font-size: 1.3rem; line-height: 1.3; }
.insight p { margin: 2px 0 0; font-size: 0.9rem; color: var(--muted); }
.insight.alert { border-left-color: var(--danger); }
.insight.alert strong { color: var(--danger); }
.insight.warn { border-left-color: var(--warn); }
.insight.good { border-left-color: var(--ok); }

.bev-list li { display: block; }
.bev-main { align-items: center; }
.bev-extra { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 6px 0 2px 26px; }
.bev-extra label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.bev-extra select, .bev-extra input { width: auto; min-height: 34px; padding: 4px 8px; font-size: 0.85rem; }
.bev-extra input { width: 64px; }
.bev-extra .unit { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }

/* ---------- guia ---------- */

.guide-link { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.guide-link > span:first-child { font-size: 1.6rem; }
.guide-link > span:nth-child(2) { flex: 1; }
.guide-link > span:last-child { font-size: 1.5rem; color: var(--muted); }
.goal-note a, .card .small a { color: var(--accent-strong); font-weight: 600; }

.guide-sec { padding: 0; }
.guide-sec summary { cursor: pointer; padding: 16px; font-weight: 700; font-size: 1.02rem; list-style: none; display: flex; gap: 10px; align-items: center; }
.guide-sec summary::-webkit-details-marker { display: none; }
.guide-sec summary::after { content: "›"; margin-left: auto; color: var(--muted); font-size: 1.4rem; transition: transform 0.15s; }
.guide-sec[open] summary::after { transform: rotate(90deg); }
.guide-body { padding: 0 16px 16px; line-height: 1.5; }
.guide-body p, .guide-body ul, .guide-body ol { margin: 0 0 10px; }
.guide-body ul, .guide-body ol { padding-left: 20px; }
.guide-body li + li { margin-top: 6px; }
.guide-body h3 { font-size: 0.98rem; margin: 14px 0 6px; }
.guide-body h3:first-child { margin-top: 0; }
.guide-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: 0.92rem; }
.guide-table th { text-align: left; vertical-align: top; padding: 6px 10px 6px 0; color: var(--muted); white-space: nowrap; }
.guide-table td { padding: 6px 0; }
.guide-table tr + tr { border-top: 1px solid var(--border); }
.legend-insights { margin-bottom: 10px; }
.legend-insights p { margin: 0; }
.drink { padding: 12px 0; border-top: 1px solid var(--border); }
.drink:first-child { border-top: 0; padding-top: 0; }
.drink p { margin: 0 0 6px; font-size: 0.92rem; }
.tag { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-right: 4px; background: var(--surface-2); }
.tag.good { color: var(--ok); }
.tag.warn { color: var(--warn); }
.tag.info { color: var(--accent-strong); }
.urine { display: flex; border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.urine span { flex: 1; text-align: center; font-size: 0.7rem; font-weight: 600; padding: 8px 2px; color: #3b3b1f; }

/* ---------- saúde ---------- */

a.btn, label.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; margin: 0; }
.btn.secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); font-weight: 600; }
.btn.secondary:hover { background: var(--accent-soft); }
.btn.small { min-height: 36px; padding: 6px 10px; font-size: 0.85rem; }

.stats.four { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats.four .stat { padding: 10px 4px; }
.stats.four .v { font-size: 1.15rem; }
.stat.good .v { color: var(--ok); }

.urine-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.swatch { min-height: 44px; padding: 0; border-radius: 10px; border: 1px solid rgb(0 0 0 / 12%); color: #4a4220; font-weight: 700; font-size: 0.85rem; }
.swatch.dark { color: #fff; }
.swatch:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.urine-groups { display: grid; grid-template-columns: 3fr 2fr 3fr; gap: 4px; margin-top: 4px; text-align: center; color: var(--muted); }
.urine-groups span { border-top: 2px solid var(--ok); padding-top: 2px; }
.urine-groups span:nth-child(2) { border-color: var(--warn); }
.urine-groups span:nth-child(3) { border-color: var(--danger); }
.urine-logs { margin-top: 8px; }
.udot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgb(0 0 0 / 15%); }

.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.strip li { position: relative; aspect-ratio: 1; border-radius: 6px; display: flex; align-items: flex-start; justify-content: flex-start; padding: 2px 4px; font-size: 0.65rem; font-weight: 700; color: #fff; background: var(--surface-2); }
.strip li.met { background: var(--ok); }
.strip li.mid { background: var(--accent); }
.strip li.low { background: var(--warn); }
.strip li.off { color: var(--muted); background: transparent; border: 1px dashed var(--border); }
.strip li.now { color: var(--text); background: transparent; border: 2px solid var(--accent); }
.strip li i { position: absolute; right: 3px; bottom: 3px; width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgb(0 0 0 / 25%); }
.legend i.met { background: var(--ok); }
.legend i.mid { background: var(--accent); }
.legend i.low { background: var(--warn); }
.legend i.dotl { background: #e6cc4c; border-radius: 50%; }

.chart .ref-band { fill: var(--ok); opacity: 0.12; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }

.report { padding: 0; }
.report > summary { cursor: pointer; padding: 16px; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.report > summary::-webkit-details-marker { display: none; }
.report[open] > summary { padding-bottom: 8px; }
.report > :not(summary) { margin-left: 16px; margin-right: 16px; }
.report > :last-child { margin-bottom: 16px; }
.report .off { color: var(--danger); font-weight: 600; }
.res-group { margin: 14px 0 4px; font-size: 0.9rem; color: var(--muted); }
.results { list-style: none; margin: 0; padding: 0; }
.res { border-top: 1px solid var(--border); }
.res:first-child { border-top: 0; }
.res summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: 1fr auto 64px; gap: 8px; align-items: center; padding: 8px 0; }
.res summary::-webkit-details-marker { display: none; }
.res .val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.res .val small { display: block; font-size: 0.7rem; font-weight: 500; color: var(--muted); }
.res.high .val, .res.low .val, .res.altered .val { color: var(--danger); }
.res p { padding: 0 0 10px; }
.chip-status { font-size: 0.7rem; font-weight: 700; text-align: center; padding: 2px 6px; border-radius: 999px; }
.chip-status.normal { color: var(--ok); background: var(--surface-2); }
.chip-status.high, .chip-status.low, .chip-status.altered { color: #fff; background: var(--danger); }
.report-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.file-btn { position: relative; cursor: pointer; }
/* Invisível, mas não display:none: no iPhone, o toque no rótulo só abre o seletor assim. */
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

.lab-group { border-top: 1px solid var(--border); padding: 4px 0; }
.lab-group > summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.lab-group[open] > summary { margin-bottom: 4px; }
.lab-row { padding: 6px 0 8px; }
.lab-row label { color: var(--text); }
.lab-row .unit { min-width: 56px; }
.lab-row.custom { border-top: 1px dashed var(--border); padding-top: 10px; }
.lab-row.custom .row + .row { margin-top: 6px; }
.lab-row.custom .row input { min-width: 0; }
.ref-edit { margin-top: 4px; }
.ref-edit summary { cursor: pointer; }
.ref-edit .row { margin-top: 6px; }
.ref-edit input { min-width: 0; min-height: 38px; padding: 6px 8px; font-size: 0.9rem; }
.lab-form .field { margin-top: 12px; }

/* ---------- módulos, demonstração e termos ---------- */

a.btn.block { display: flex; width: 100%; }
.demo-banner { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; background: var(--accent-soft); border: 1px dashed var(--accent); border-radius: 12px; padding: 12px; margin-bottom: 16px; font-size: 0.9rem; }
.demo-banner p { flex: 1 1 220px; }
.demo-peek { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.demo-peek > summary { cursor: pointer; font-weight: 600; color: var(--accent-strong); margin-bottom: 10px; }
.demo-peek .demo-banner { margin-bottom: 12px; }

.consent { display: grid; gap: 10px; text-align: left; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; font-weight: 400; color: var(--text); margin: 0; }
.check input { width: 22px; min-height: 22px; height: 22px; margin-top: 1px; flex: none; }
.check.strong { background: var(--accent-soft); border-radius: 10px; padding: 10px; }
.check a { color: var(--accent-strong); font-weight: 600; }

.legal h1 { margin-bottom: 4px; }
.legal h2 { font-size: 1rem; margin: 18px 0 6px; }
.legal p, .legal ul { margin: 0 0 8px; line-height: 1.5; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 4px; }

.pkg-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pkg-row label { margin: 0; }
.pkg-row select { width: auto; min-height: 36px; padding: 4px 8px; font-size: 0.9rem; }
.mods { margin-top: 6px; }
.mods > summary { cursor: pointer; color: var(--muted); }
.mod-grid { display: grid; gap: 6px; margin: 8px 0; }
.mod-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; font-weight: 500; color: var(--text); font-size: 0.9rem; }
.mod-row select { width: auto; min-width: 170px; min-height: 36px; padding: 4px 8px; font-size: 0.85rem; }
.pkg h2 { display: flex; gap: 8px; align-items: center; }

/* ---------- IA ---------- */

.ai-card h2 { margin-bottom: 6px; }
.ai-note { background: var(--accent-soft); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.ai-note p { margin-top: 4px; }
.lab-row.flag { background: color-mix(in srgb, var(--warn) 10%, transparent); border-radius: 10px; padding: 8px; margin: 4px -8px; }
.flag-note { font-size: 0.82rem; color: var(--warn); font-weight: 600; margin: 2px 0 6px; }
.ai-wait { padding: 32px 16px; }
.ai-wait h2 { margin-top: 12px; }
.spinner { width: 40px; height: 40px; margin: 0 auto; border-radius: 50%; border: 4px solid var(--surface-2); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.ai-h { margin: 18px 0 8px; font-size: 1rem; }
.usage-total { font-size: 1.2rem; margin-bottom: 6px; }
.track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.track span { display: block; height: 100%; background: var(--accent); }
.guide-table.usage td:nth-child(n+2), .guide-table.usage th:nth-child(n+2) { text-align: right; }

/* ---------- usuários ---------- */

button.danger { background: none; color: var(--danger); border-color: var(--border); }
button.danger:hover { background: var(--surface-2); }
button.small { min-height: 36px; padding: 6px 10px; font-size: 0.85rem; }

.users { list-style: none; margin: 0; padding: 0; }
.users li { display: block; padding: 12px 0; border-top: 1px solid var(--border); }
.users li:first-child { border-top: 0; }
.users .who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.users .email { font-weight: 600; overflow-wrap: anywhere; }
.users .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.users li.off .email { color: var(--muted); text-decoration: line-through; }

.badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.admin { background: var(--accent-soft); color: var(--accent-strong); }
.badge.off { color: var(--danger); }

.temp-pass { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.temp-pass code { flex: 1; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.04em; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; overflow-wrap: anywhere; }

/* ---------- navegação e avisos ---------- */

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 10;
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 10px;
  color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 600;
}
.tabs a span { font-size: 1.3rem; }
.tabs a[aria-current="page"] { color: var(--accent); }
.tabs a[hidden] { display: none; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(84px + env(safe-area-inset-bottom));
  background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 12px;
  display: flex; gap: 12px; align-items: center;
  max-width: calc(100% - 32px); z-index: 20;
}
.toast button { background: none; color: var(--accent-soft); padding: 0; min-height: 0; text-decoration: underline; }
@media (prefers-color-scheme: dark) { .toast button { color: var(--accent); } }

.banner {
  position: sticky; top: 0; z-index: 15;
  background: var(--accent); color: #fff;
  padding: 12px 16px; text-align: center; font-weight: 600;
  display: flex; gap: 12px; justify-content: center; align-items: center;
}
.banner button { background: #fff; color: var(--accent-strong); min-height: 36px; padding: 6px 12px; }

/* ---------- apresentação (#/conhecer) ---------- */

.intro-on .view { max-width: none; padding: 0; }
.intro { --deep: #04213a; --sea: #0b84d8; overflow-x: clip; }
.intro a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.i-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px; color: #fff;
}
.i-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -0.01em; }
.i-brand img { width: 28px; height: 28px; }
.i-top a { color: #fff; font-weight: 600; text-decoration: none; padding: 8px 14px; border: 1px solid rgb(255 255 255 / 45%); border-radius: 999px; }

.i-hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, #0a3a63 0%, var(--deep) 70%);
  color: #fff; display: flex; flex-direction: column;
}
.i-tank { position: absolute; inset: 0; }
.i-water {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  background: linear-gradient(180deg, rgb(58 165 239 / 75%), rgb(11 132 216 / 95%) 40%, #075a96);
  transition: height 1.8s cubic-bezier(.2,.7,.2,1);
}
.i-water.full { height: 60%; }
.i-wave { position: absolute; left: 0; bottom: 100%; width: 200%; height: 28px; fill: rgb(58 165 239 / 75%); animation: i-wave 6s linear infinite; }
.i-level {
  position: absolute; left: 24px; top: 12px; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.02em;
  opacity: 0; transition: opacity 0.6s 1.6s; color: rgb(255 255 255 / 85%);
}
.i-water.full .i-level { opacity: 1; }
@keyframes i-wave { to { transform: translateX(-50%); } }

.i-hero-text, .i-question { position: relative; z-index: 2; width: 100%; max-width: 520px; margin: 0 auto; padding: 0 24px; text-shadow: 0 1px 12px rgb(4 33 58 / 45%); }
.i-hero-text { padding-top: calc(84px + env(safe-area-inset-top)); }
.i-kicker { font-size: 1.15rem; line-height: 1.35; color: rgb(255 255 255 / 88%); }
.i-big { font-size: clamp(3.4rem, 19vw, 6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 8px 0; font-variant-numeric: tabular-nums; }
.i-big small { font-size: 0.35em; letter-spacing: 0; font-weight: 700; }
.i-question { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; margin-top: auto; margin-bottom: calc(110px + env(safe-area-inset-bottom)); }
.i-next {
  position: absolute; z-index: 2; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: 48px; height: 48px; border-radius: 50%; padding: 0; font-size: 1.3rem;
  background: rgb(255 255 255 / 18%); border: 1px solid rgb(255 255 255 / 40%); color: #fff;
  animation: i-bob 2s ease-in-out infinite;
}
.i-next:hover { background: rgb(255 255 255 / 28%); }
@keyframes i-bob { 50% { transform: translate(-50%, 6px); } }

.i-sec { padding: 56px 24px; max-width: 560px; margin: 0 auto; }
.i-alt { max-width: none; background: var(--surface-2); }
.i-alt > * { max-width: 512px; margin-left: auto; margin-right: auto; }
.i-eyebrow { color: var(--accent); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.i-title { font-size: clamp(1.7rem, 7.5vw, 2.3rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; margin-bottom: 20px; }
.i-text { font-size: 1.1rem; line-height: 1.5; }
.i-text + .i-text { margin-top: 12px; }

.i-meter { margin: 28px 0 32px; }
.i-meter-bar { position: relative; height: 14px; border-radius: 999px; background: linear-gradient(90deg, var(--ok), #eab308 40%, var(--warn) 65%, var(--danger)); }
.i-meter-bar span { position: absolute; top: -4px; width: 4px; height: 22px; margin-left: -2px; border-radius: 2px; background: var(--text); }
.i-meter-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.i-meter-steps li { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: baseline; }
.i-meter-steps b { font-size: 1.15rem; }

.i-body-wrap { display: grid; grid-template-columns: 44% 1fr; gap: 16px; align-items: center; }
.i-figure { position: relative; aspect-ratio: 200 / 360; }
.i-figure svg { width: 100%; height: 100%; display: block; }
.i-fig-dry { fill: var(--border); }
.i-fig-wet { fill: var(--accent); opacity: 0.85; }
.i-dot {
  position: absolute; width: 16px; height: 16px; min-height: 0; padding: 0; margin: -8px 0 0 -8px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); box-shadow: 0 0 0 0 rgb(11 132 216 / 50%);
  animation: i-pulse 2.2s ease-out infinite;
}
.i-dot::after { content: ""; position: absolute; inset: -12px; } /* área de toque de 40px */
.i-dot[aria-pressed="true"] { background: var(--accent); border-color: #fff; transform: scale(1.4); animation: none; box-shadow: 0 0 0 3px var(--accent); }
@keyframes i-pulse { 70%, 100% { box-shadow: 0 0 0 12px rgb(11 132 216 / 0%); } 0% { box-shadow: 0 0 0 0 rgb(11 132 216 / 50%); } }
.i-organ { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-height: 176px; }
.i-organ strong { font-size: 1.15rem; display: block; margin-bottom: 6px; }
.i-organ p { line-height: 1.45; }
.i-organ-count { display: block; margin-top: 10px; font-size: 0.8rem; color: var(--muted); }

.i-quote {
  margin: 28px 0 0; padding: 20px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--deep), #0a4f86); color: #fff;
  font-size: 1.3rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em;
}
.i-quote span { display: block; margin-top: 12px; font-size: 1rem; font-weight: 500; color: rgb(255 255 255 / 85%); line-height: 1.45; }

.i-demo { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 16px; text-align: center; }
.i-ring { width: 190px; height: 190px; }
.i-ring .ring-label .pct { font-size: 2.2rem; }
.i-cups { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.i-cups button { flex: 1; max-width: 160px; display: flex; flex-direction: column; font-weight: 500; color: var(--muted); }
.i-cups b { font-size: 1.15rem; color: var(--text); }
.i-cups button:active { transform: scale(0.96); }
.i-demo-msg { margin-top: 12px; min-height: 2.9em; color: var(--muted); }

.i-features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.i-features li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; }
.i-features li > span { font-size: 1.6rem; line-height: 1.2; }
.i-features strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.i-features p { color: var(--muted); line-height: 1.45; }

.i-end { text-align: center; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
.i-cta { width: 100%; max-width: 360px; min-height: 54px; font-size: 1.1rem; border-radius: 14px; margin-top: 24px; }
.i-small { font-size: 0.9rem; color: var(--muted); margin-top: 14px; }
.i-small a, .i-sources a { color: var(--accent); font-weight: 600; }
.i-disclaimer { margin-top: 28px; }
.i-sources { text-align: left; margin-top: 16px; font-size: 0.85rem; color: var(--muted); }
.i-sources summary { cursor: pointer; text-align: center; font-weight: 600; color: var(--text); padding: 8px; }
.i-sources ul { padding-left: 18px; margin: 8px 0; }
.i-sources li + li { margin-top: 6px; }

.i-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; text-align: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.i-bar .i-cta { margin: 0; min-height: 50px; }
.intro:has(.i-bar:not([hidden])) .i-end { padding-bottom: 120px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- entrevista inicial (#/entrevista) ---------- */

.ob-on .view { padding-bottom: 0; }
.ob { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
.ob-top { display: flex; align-items: center; gap: 12px; padding: 8px 0 16px; }
.ob-back { background: none; color: var(--text); font-size: 2rem; line-height: 1; padding: 0 8px; min-height: 44px; min-width: 44px; }
.ob-back:hover { background: var(--surface-2); }
.ob-progress { flex: 1; height: 8px; border-radius: 999px; background: var(--ring-track); overflow: hidden; }
.ob-progress span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width 0.3s ease; }
.ob-body { flex: 1; }
.ob-title { font-size: clamp(1.6rem, 7vw, 2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 8px 0 8px; }
.ob-title em { font-style: normal; color: var(--accent); }
.ob-sub { color: var(--muted); font-size: 1.05rem; margin-bottom: 20px; }
.ob-foot { position: sticky; bottom: 0; padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.ob-next { min-height: 54px; font-size: 1.1rem; border-radius: 14px; }

.ob-choices { display: grid; gap: 10px; margin-top: 16px; }
.ob-choice {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: var(--surface); color: var(--text); border: 2px solid var(--border); border-radius: 16px; padding: 14px 16px; font-weight: 500;
}
.ob-choice:hover { background: var(--surface); border-color: var(--accent); }
.ob-choice[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ob-ico { font-size: 1.5rem; line-height: 1; width: 30px; text-align: center; }
.ob-choice-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ob-choice-text strong { font-size: 1.05rem; font-weight: 600; }
.ob-choice-text small { color: var(--muted); font-size: 0.9rem; }
.ob-mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); flex: none; }
.ob-choice[role="checkbox"] .ob-mark { border-radius: 7px; }
.ob-choice[aria-checked="true"] .ob-mark { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); }
.ob-choice[role="checkbox"][aria-checked="true"] .ob-mark { box-shadow: none; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }

.ob-text { font-size: 1.2rem; min-height: 56px; border-radius: 14px; margin-top: 16px; }
.ob-date { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; gap: 10px; margin-top: 24px; }
.ob-date label, .ob-times label { font-size: 0.85rem; }
.ob-date select, .ob-times input { min-height: 54px; font-size: 1.1rem; border-radius: 14px; margin-top: 4px; }
.ob-times { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.ob-feedback { margin-top: 16px; font-size: 1.05rem; text-align: center; color: var(--muted); min-height: 1.5em; }
.ob-feedback strong { color: var(--text); }
.ob-warn { color: var(--warn); font-weight: 600; text-align: center; }

.ob-dial { margin-top: 28px; text-align: center; }
.ob-big { display: inline-flex; align-items: baseline; gap: 6px; margin: 0; color: var(--text); }
.ob-big input {
  width: 3.4ch; border: none; background: none; padding: 0; min-height: 0; text-align: center;
  font-size: clamp(3.4rem, 17vw, 4.6rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--text);
  -moz-appearance: textfield;
}
.ob-big input::-webkit-inner-spin-button, .ob-big input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ob-big input:focus-visible { outline: none; border-bottom: 3px solid var(--accent); }
.ob-big span { font-size: 1.4rem; font-weight: 700; color: var(--muted); }
.ob-hint { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.ob-range { width: 100%; margin: 24px 0 4px; min-height: 36px; padding: 0; border: none; background: none; accent-color: var(--accent); }
.ob-range-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.85rem; }

.ob-bmi { margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.ob-bmi-row { display: flex; justify-content: space-between; align-items: center; }
.ob-bmi-row span { display: flex; flex-direction: column; }
.ob-bmi-row small { color: var(--muted); font-weight: 700; font-size: 0.8rem; }
.ob-bmi-row strong { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.ob-bmi-row em { font-style: normal; font-weight: 700; color: var(--accent); }
.ob-bmi-bar { position: relative; height: 8px; border-radius: 999px; margin: 14px 0 12px; background: linear-gradient(90deg, #eab308 0 14%, var(--ok) 14% 40%, #eab308 40% 60%, var(--warn) 60% 80%, var(--danger) 80%); }
.ob-bmi-bar i { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); }
.ob-bmi p { color: var(--muted); font-size: 0.85rem; }
.ob-delta { margin-top: 28px; text-align: center; display: flex; flex-direction: column; }
.ob-delta strong { font-size: 2.6rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.ob-delta span { color: var(--muted); font-size: 1.05rem; }

.ob-hello { text-align: center; padding-top: 6vh; }
.ob-hello-ico { width: 88px; height: 88px; margin: 0 auto 20px; border-radius: 24px; background: var(--accent-soft); display: grid; place-items: center; font-size: 2.8rem; }
.ob-hello h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.ob-hello p { font-size: 1.1rem; color: var(--muted); }
.ob-hello-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; text-align: left; }
.ob-hello-list li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; font-weight: 500; }

.ob-building { justify-content: center; }
.ob-checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.ob-checklist li { display: flex; gap: 14px; align-items: center; opacity: 0.45; transition: opacity 0.3s; }
.ob-checklist li.done { opacity: 1; }
.ob-checklist strong { display: block; font-size: 1.05rem; }
.ob-checklist small { color: var(--muted); }
.ob-check { width: 36px; height: 36px; flex: none; border-radius: 10px; border: 2px solid var(--border); }
.ob-checklist li.done .ob-check { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/22px no-repeat; }

.ob-plan { padding-top: 20px; gap: 14px; }
.ob-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.ob-card h2 { font-size: 1.1rem; margin-bottom: 12px; }
.ob-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.ob-tile { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 14px; padding: 12px; }
.ob-tile small { display: block; color: var(--muted); font-size: 0.85rem; }
.ob-tile strong { font-size: 1.5rem; font-weight: 800; }
.ob-tile-ico { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 1.3rem; }
.ob-tile.hot { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.ob-tile.water { background: var(--accent-soft); }
.ob-small { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.ob-timeline { display: flex; align-items: center; justify-content: space-around; text-align: center; }
.ob-timeline small { display: block; color: var(--muted); }
.ob-timeline strong { font-size: 1.5rem; font-weight: 800; }
.ob-timeline > span { font-size: 1.6rem; color: var(--accent); }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 12px 0 14px; }
.plan-grid div { background: var(--surface-2); border-radius: 12px; padding: 10px; text-align: center; }
.plan-grid strong { display: block; font-size: 1.15rem; }
.plan-grid span { color: var(--muted); font-size: 0.8rem; }
a.btn.secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); text-decoration: none; display: block; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .ring-fill { transition: none; }
  .ob-progress span, .ob-checklist li { transition: none; }
  .i-water, .i-level, .reveal { transition: none; }
  .i-wave, .i-next, .i-dot { animation: none; }
}
