﻿:root {
  --bg: #0b3d2e;
  --bg-soft: #0f4d3a;
  --ink: #ffffff;
  --ink-dim: #c9e0d6;
  --accent: #ffd34d;
  --focus: #ffd34d;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.screen {
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 24px;
}
/* Color = PRICE DIRECTION (red hike · green rollback · gray flat/unknown), matching
   Konteksto. The ACTION lives in the Taglish words; the ▲/▼/— arrow carries it for
   color-blind users so color is never the only signal. */
:root {
  --up: #ff6b6b;     /* hike coming  */
  --down: #5fe39b;   /* rollback coming */
  --flat: #c9e0d6;   /* flat / no signal yet */
}

.brand h1 { font-size: 2rem; margin: 0; letter-spacing: -0.02em; }
.tagline { margin: 4px 0 0; color: var(--ink-dim); font-size: 1rem; }
.asof { margin: 10px 0 0; color: var(--ink-dim); font-size: 0.85rem; }

.fuels { display: flex; flex-direction: column; gap: 16px; }
.loading { color: var(--ink-dim); }

.fuel-card {
  background: var(--bg-soft);
  border-radius: 18px;
  padding: 18px 18px 16px;
  border-left: 5px solid var(--flat);
}
.fuel-card.light-red { border-left-color: var(--up); }
.fuel-card.light-green { border-left-color: var(--down); }

.fc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fc-fuel { font-size: 1.1rem; margin: 0; font-weight: 700; }
.fc-sub { color: var(--ink-dim); font-weight: 400; font-size: 0.8rem; }

.v-light { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; background: var(--flat); }
.v-light-red { background: var(--up); }
.v-light-green { background: var(--down); }

/* Von Restorff: the Taglish verdict line is the one bold thing per card. */
.v-line { font-size: 1.35rem; font-weight: 700; line-height: 1.3; margin: 12px 0 2px; }
.v-arrow { font-weight: 700; }
.arr-red { color: var(--up); }
.arr-green { color: var(--down); }
.arr-gray { color: var(--flat); }
.v-en { margin: 0 0 12px; color: var(--ink-dim); font-size: 0.9rem; }

.v-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.14); padding: 2px 7px; border-radius: 999px; vertical-align: middle;
}

.v-price { margin: 0; font-size: 1.5rem; font-weight: 700; }
.v-unit { font-size: 0.9rem; font-weight: 400; color: var(--ink-dim); }
.v-asof { display: block; font-size: 0.78rem; font-weight: 400; color: var(--ink-dim); margin-top: 2px; }

.v-next { margin: 12px 0 0; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.v-next-label { color: var(--ink-dim); font-size: 0.85rem; }
.v-next-val { font-weight: 700; text-align: right; }
.v-delta { font-weight: 700; margin-left: 6px; white-space: nowrap; }
.v-next-tbd .v-next-val { font-weight: 400; color: var(--ink-dim); }

.v-foot {
  margin: 14px 0 0; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 0.8rem; color: var(--ink-dim);
}
.v-source { color: var(--accent); text-decoration: none; font-weight: 600; }
.v-source:hover { text-decoration: underline; }

.disclaimer { margin: 4px 0 0; color: var(--ink-dim); font-size: 0.8rem; line-height: 1.5; }
.feed-state { margin: 0; color: var(--accent); font-size: 0.9rem; min-height: 1em; }

/* ---- Phase 2: personalisation ------------------------------------------- */
.brand-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.icon-btn {
  background: var(--bg-soft); color: var(--ink); border: 0; border-radius: 12px;
  min-width: 44px; min-height: 44px; font-size: 1.2rem; cursor: pointer; flex: 0 0 auto;
}
.profile-chip {
  margin: 10px 0 0; background: var(--bg-soft); color: var(--ink-dim);
  border-radius: 999px; padding: 6px 12px; font-size: 0.82rem; display: inline-block;
}

.onboarding { background: var(--bg-soft); border-radius: 18px; padding: 18px; }
.ob-title { margin: 0; font-size: 1.2rem; }
.ob-sub { margin: 4px 0 14px; color: var(--ink-dim); font-size: 0.85rem; line-height: 1.4; }
.ob-group { border: 0; padding: 0; margin: 0 0 16px; }
.ob-group legend { padding: 0; font-size: 0.8rem; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.ob-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; font-size: 0.85rem; color: var(--ink-dim); }
.onboarding input, .onboarding select {
  width: 100%; min-height: 48px; font-size: 16px; /* 16px: stops iOS zoom-on-focus */
  background: var(--bg); color: var(--ink); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px; padding: 0 12px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 14px; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px;
  cursor: pointer; font-size: 0.92rem; user-select: none;
}
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:has(input:checked) { background: var(--accent); color: #1a1300; border-color: var(--accent); font-weight: 700; }
.chip:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.ob-loc {
  margin-top: 10px; min-height: 44px; width: 100%; background: transparent; color: var(--accent);
  border: 1px dashed rgba(255,211,77,0.6); border-radius: 10px; font-size: 0.92rem; cursor: pointer;
}
.ob-loc-status { display: block; margin-top: 6px; font-size: 0.82rem; color: var(--ink-dim); min-height: 1em; }
.ob-save { width: 100%; margin-top: 4px; }
.ob-skip { display: block; width: 100%; margin-top: 10px; background: none; border: 0; color: var(--ink-dim); font-size: 0.9rem; min-height: 44px; cursor: pointer; }

/* The driver's own fuel leads and is ringed; "Ikaw" tag names it without color alone. */
.fuel-card.is-yours { box-shadow: 0 0 0 2px var(--accent); }
.fc-you { background: var(--accent); color: #1a1300; font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; letter-spacing: 0.03em; }

/* The peso payoff — the personalised number, made prominent. */
.v-peso {
  margin: 10px 0 0; background: rgba(255,211,77,0.12); border-radius: 10px;
  padding: 10px 12px; font-size: 0.95rem; line-height: 1.4;
}
.v-peso strong { color: var(--accent); }

/* ---- Phase 4: crowdsourced price reports -------------------------------- */
.report-open {
  width: 100%; min-height: 48px; border: 1px solid rgba(255,255,255,0.25);
  background: transparent; color: var(--ink); border-radius: 12px; font-size: 0.98rem; cursor: pointer;
}
.report-helped { margin: 10px 0 0; color: var(--down); font-size: 0.9rem; }
.report-form { margin-top: 12px; background: var(--bg-soft); border-radius: 16px; padding: 16px; }
.rf-title { margin: 0; font-size: 1.1rem; }
.rf-sub { margin: 4px 0 14px; color: var(--ink-dim); font-size: 0.82rem; }
.report-doe {
  width: 100%; min-height: 44px; margin-top: 10px; background: transparent; color: var(--accent);
  border: 1px dashed rgba(255,211,77,0.6); border-radius: 10px; font-size: 0.9rem; cursor: pointer;
}
.report-status { margin: 8px 0 0; font-size: 0.85rem; color: var(--down); min-height: 1em; }

/* Per-station local estimate on a verdict card. */
.v-local { margin: 8px 0 0; font-size: 0.92rem; }
.v-local strong { color: var(--accent); }
.v-local-conf { color: var(--ink-dim); font-size: 0.8rem; }

/* ---- Phase 5: fuel-efficiency tracker ----------------------------------- */
.mileage-open {
  width: 100%; min-height: 48px; border: 1px solid rgba(255,255,255,0.25);
  background: transparent; color: var(--ink); border-radius: 12px; font-size: 0.98rem; cursor: pointer;
}
.mileage-body { margin-top: 12px; background: var(--bg-soft); border-radius: 16px; padding: 16px; }
.mi-empty { margin: 0 0 12px; color: var(--ink-dim); font-size: 0.9rem; line-height: 1.45; }
.mi-big { margin: 0; font-size: 2.2rem; font-weight: 700; }
.mi-unit { font-size: 1rem; font-weight: 400; color: var(--ink-dim); }
.mi-sub { font-size: 0.8rem; color: var(--ink-dim); font-weight: 400; }
.mi-avg { margin: 2px 0 14px; color: var(--ink-dim); font-size: 0.9rem; }
.mileage-history { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mileage-history li { font-size: 0.85rem; color: var(--ink-dim); border-top: 1px solid rgba(255,255,255,0.08); padding-top: 6px; }
.mileage-history strong { color: var(--ink); }

/* ---- Phase 3: push opt-in ----------------------------------------------- */
.notify { background: var(--bg-soft); border-radius: 16px; padding: 16px; }
.notify-text { margin: 0 0 12px; font-size: 0.92rem; line-height: 1.45; color: var(--ink-dim); }
.notify-btn {
  width: 100%; min-height: 48px; border: 0; border-radius: 12px;
  background: var(--accent); color: #1a1300; font-size: 1rem; font-weight: 700; cursor: pointer;
}
.notify-btn[data-mode="off"] { background: transparent; color: var(--ink-dim); border: 1px solid rgba(255,255,255,0.25); }
.notify-btn:disabled { opacity: 0.6; cursor: default; }
.notify-status { margin: 8px 0 0; font-size: 0.85rem; color: var(--down); min-height: 1em; }

/* Reserved ad slot (bottom only, never the verdict). Empty until enabled. */
.ad-slot {
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); border-radius: 12px; color: var(--ink-dim); font-size: 0.8rem;
}
.ad-slot[hidden] { display: none; }

/* Fitts: big primary target in the bottom thumb zone. >=48px touch target. */
.install-btn {
  margin-top: auto;
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #1a1300;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}
.install-btn:focus-visible,
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .fuel-card { transition: border-color 200ms ease; }
}
