/* ═══════════════════════════════════════════════════════════════════════
   WATER (on Fuel) — styles. Loaded by ironlog.html as water.css?v=N.
   --water / --water-soft are only the identity mark (drop, ring, bars);
   actions use the accent, like the rest of Fuel. Sky blue by default; a cyan / teal
   where the accent is already blue. A new theme: check --water against its accent / --blue.
   ═══════════════════════════════════════════════════════════════════════ */
:root, [data-theme] { --water: #4fb3ff; --water-soft: rgba(79,179,255,.16); }
[data-theme="light"], [data-theme="orchid"], [data-theme="sandstone"], [data-theme="blush"], [data-theme="miami"],
[data-theme="maverick"], [data-theme="pulp"], [data-theme="bubblegum"] { --water: #1786d9; --water-soft: rgba(23,134,217,.12); }
[data-theme="midnight"] { --water: #5fd4f0; --water-soft: rgba(95,212,240,.16); }
[data-theme="glacier"] { --water: #0a97b5; --water-soft: rgba(10,151,181,.12); }

.wa-ic { width: 28px; height: 28px; border-radius: 14px; background: var(--water-soft); color: var(--water); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wa-link { background: none; border: none; padding: 6px 0; font: inherit; font-size: 12px; font-weight: 700; color: var(--accent); cursor: pointer; }

/* ── Chip (Fuel's chip line) ── */
.wa-chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 11px 0 5px; border-radius: 15px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.wa-chip b { font-weight: 700; font-variant-numeric: tabular-nums; }
.wa-chip .wa-of, .wa-chip .wa-u { color: var(--text2); }
.wa-chip.done b { color: var(--green); }
.wa-chip.open { border-color: var(--water); background: var(--water-soft); }
.wa-ring { flex-shrink: 0; }
.wa-ring-t { stroke: var(--fuel-track); }
.wa-ring-p { stroke: var(--water); transition: stroke-dashoffset .3s ease; }
.wa-ring-p.done { stroke: var(--green); }
.wa-ring-d { fill: var(--water); }
@media (prefers-reduced-motion: reduce) { .wa-ring-p { transition: none; } }
/* Weigh-in + supps + burned beside it: "48 oz" instead of "48 / 120 oz". */
.fu-chiprow:has(.bd-chip):has(.sp-chip-wrap):has(.fu-burn-wrap) .wa-of { display: none; }

/* ── Quick-add popover ── */
.wa-pop { width: 280px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.wa-pop[hidden] { display: none; }
.wa-pop-hd { display: flex; align-items: center; justify-content: space-between; margin: -6px 0 -8px; }
.wa-pop-hd > span { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text2); }
.wa-big { display: flex; align-items: baseline; gap: 6px; }
.wa-big b { font-size: 28px; font-weight: 800; letter-spacing: -.6px; line-height: 1; font-variant-numeric: tabular-nums; }
.wa-big span { font-size: 13px; color: var(--text2); }
.wa-big em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: var(--text2); }
.wa-big em.ok { color: var(--green); }
.wa-big-l b { font-size: 36px; letter-spacing: -1px; }
.wa-big-l span { font-size: 15px; font-weight: 600; }
.wa-bar { height: 6px; border-radius: 3px; background: var(--fuel-track); overflow: hidden; }
.wa-bar i { display: block; height: 100%; border-radius: 3px; background: var(--water); transition: width .3s ease; }
.wa-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wa-quick button, .wa-grid button { border-radius: 10px; border: none; background: var(--accent-soft); color: var(--accent); font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; padding: 0 4px; min-width: 0; }
.wa-quick button { height: 54px; }
.wa-quick b { font-size: 15px; white-space: nowrap; }
.wa-quick span, .wa-grid span { font-size: 11px; color: var(--text2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-quick button:active, .wa-grid button:active { transform: scale(.97); }
.wa-last { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text2); margin: -4px 0 -6px; min-height: 26px; }

/* ── Water log sheet ── */
.wa-sheet { height: auto; max-height: calc(100% - 40px - env(safe-area-inset-top)); }
.wa-sh { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.wa-sh-head { display: flex; align-items: center; gap: 8px; padding: 2px 16px 10px; }
.wa-sh-head h1 { font-size: 17px; }
.wa-sh-date { font-size: 13px; color: var(--text2); }
.wa-done { margin-left: auto; background: none; border: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--accent); padding: 10px 0 10px 12px; cursor: pointer; }
.wa-sh-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 16px max(30px, calc(env(safe-area-inset-bottom) + 16px)); display: flex; flex-direction: column; gap: 16px; }
.wa-sum { display: flex; flex-direction: column; gap: 10px; }
.wa-sum-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.wa-pace { font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 10px; white-space: nowrap; }
.wa-pace.warn { color: var(--fuel-warn); background: var(--fuel-warn-soft); }
.wa-pace.ok { color: var(--green); background: var(--green-soft); }
.wa-track { position: relative; height: 10px; border-radius: 5px; background: var(--fuel-track); }
.wa-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--water); transition: width .3s ease; }
.wa-track em { position: absolute; top: -3px; width: 2px; height: 16px; border-radius: 1px; background: var(--text); opacity: .55; transform: translateX(-1px); }
.wa-sub { font-size: 12px; color: var(--text2); }
.wa-sec { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: -8px; }
.wa-sec > span { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text2); }
.wa-sec > em { font-style: normal; font-size: 12px; color: var(--text3); }
.wa-sec .wa-link { padding: 0; }
.wa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wa-grid button { height: 64px; border-radius: 12px; }
.wa-grid b { font-size: 17px; white-space: nowrap; }
.wa-grid .wa-other { background: var(--bg3); border: 1px dashed var(--border); color: var(--text); }
.wa-rows { margin: 0 -16px; }
.wa-rows .fu-swipe:last-child { border-bottom: 1px solid var(--border); }
.wa-r { min-height: 48px; padding: 0 16px; cursor: default; }
.wa-r-t { width: 72px; flex-shrink: 0; font-size: 13px; color: var(--text2); font-variant-numeric: tabular-nums; }
.wa-r-n { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-r b { font-size: 15px; font-variant-numeric: tabular-nums; }
.wa-empty { padding: 12px 16px; font-size: 13px; color: var(--text3); border-top: 1px solid var(--border); }
.wa-tgtrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 12px; border: none; background: var(--bg3); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.wa-tgtrow > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wa-tgtrow b { font-size: 14px; }
.wa-tgtrow em { font-style: normal; font-size: 12px; color: var(--text2); }
.wa-tgtrow > svg { color: var(--text3); flex-shrink: 0; }
.wa-field { display: flex; align-items: center; gap: 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 14px; }
.wa-field:focus-within { border-color: var(--accent); }
.wa-field input { flex: 1; min-width: 0; background: none; border: none; outline: none; font: inherit; font-size: 28px; font-weight: 700; color: var(--text); padding: 12px 0; }
.wa-field span { font-size: 15px; color: var(--text2); }
.wa-field-s input { font-size: 22px; padding: 8px 0; }
.wa-cons { display: flex; flex-direction: column; gap: 8px; }
.wa-con { display: flex; align-items: center; gap: 8px; }
.wa-con > input, .wa-con label { min-height: 44px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: 15px; }
.wa-con > input { flex: 1; min-width: 0; padding: 0 12px; outline: none; }
.wa-con label { width: 110px; flex-shrink: 0; display: flex; align-items: center; gap: 4px; padding: 0 10px; }
.wa-con label input { flex: 1; min-width: 0; background: none; border: none; outline: none; font: inherit; color: var(--text); }
.wa-con label span { font-size: 13px; color: var(--text2); }
.wa-con > input:focus, .wa-con label:focus-within { border-color: var(--accent); }
.wa-x { width: 36px; height: 36px; flex-shrink: 0; border-radius: 18px; border: none; background: var(--bg3); color: var(--text2); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.wa-x svg { width: 14px; height: 14px; }
.wa-addcon { min-height: 44px; border-radius: var(--radius-sm); border: 1px dashed var(--border); background: var(--bg3); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.wa-reset { align-self: center; color: var(--text2); }

/* ── Targets: the Water card ── */
.wa-tgt { display: flex; flex-direction: column; gap: 12px; }
.wa-tgt .wa-tgt-ft { margin: -12px -16px 0; padding: 10px 16px 0; }
.wa-tgt-hd { display: flex; align-items: center; gap: 8px; }
.wa-tgt-hd .wa-ic { width: 24px; height: 24px; }
.wa-tgt-t { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text2); }
.wa-tgt-hd .wa-seg { margin-left: auto; }
.wa-big-l em { font-size: 13px; font-weight: 400; }
.wa-desc { font-size: 12px; line-height: 1.5; color: var(--text2); }
.wa-prof { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: none; background: var(--bg3); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.wa-prof > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.wa-prof b { font-size: 14px; }
.wa-prof em { font-style: normal; font-size: 12px; color: var(--text2); }
.wa-prof > svg { color: var(--text3); }
.wa-sw { display: flex; align-items: center; gap: 12px; margin: 0 -16px; padding: 12px 16px; border-top: 1px solid var(--border); cursor: pointer; }
.wa-sw > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wa-sw b { font-size: 15px; font-weight: 600; }
.wa-sw em { font-style: normal; font-size: 12px; line-height: 1.45; color: var(--text2); }

/* ── Progress › Fuel: the Water card ── */
.wa-tr-h { display: inline-flex; align-items: center; gap: 8px; }
.wa-tr-h .wa-ic { width: 22px; height: 22px; }
.wa-tr-h .wa-ic svg { width: 12px; height: 12px; }
.wa-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.wa-tiles > div { background: var(--bg3); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.wa-tiles span { font-size: 12px; color: var(--text2); }
.wa-tiles b { font-size: 20px; font-variant-numeric: tabular-nums; }
.wa-tiles small { font-size: 13px; font-weight: 400; color: var(--text2); }
.wa-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; height: 140px; border-bottom: 1px solid var(--border); }
.wa-col { position: relative; display: flex; align-items: flex-end; }
.wa-colbar { display: block; width: 100%; border-radius: 5px 5px 0 0; background: var(--water); min-height: 0; }
.wa-col.today .wa-colbar { opacity: .4; }
.wa-tick { position: absolute; left: -2px; right: -2px; height: 2px; border-radius: 1px; background: var(--text); opacity: .55; }
.wa-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 6px; text-align: center; font-size: 11px; color: var(--text2); }
.wa-days span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.wa-days span.today { color: var(--text); font-weight: 700; }
.wa-days i { width: 5px; height: 5px; border-radius: 3px; background: var(--bg4); }
.wa-days i.tr { background: var(--green); }
.wa-tr-rows { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.wa-tr-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.wa-tr-row > i { width: 8px; height: 8px; border-radius: 4px; background: var(--bg4); }
.wa-tr-row > i.tr { background: var(--green); }
.wa-tr-row > span { flex: 1; color: var(--text2); }
.wa-tr-row > em { font-style: normal; color: var(--text2); min-width: 86px; text-align: right; }
.wa-tr-row > em.warn { color: var(--fuel-warn); }
