/* Phone first: one column, large tap targets, safe-area padding for the home-screen app. */
:root {
  --ink: #1f1a24;
  --paper: #faf7f2;
  --muted: #6b6470;
  --accent: #b5338a;
  --line: #e4ddd3;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}
.nav {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
}
.nav a {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  color: var(--muted);
  text-decoration: none;
  min-height: 48px;
}
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -3px var(--accent); }
.main { max-width: 640px; margin: 0 auto; padding: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
label { display: block; font-weight: 600; margin: 12px 0 6px; }
input { width: 100%; font-size: 17px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
button.primary {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 10px;
}
button.link { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 15px; padding: 12px; }
.message { color: var(--accent); min-height: 1.5em; }
.footer { text-align: center; padding: 24px 16px; }
.muted { color: var(--muted); font-size: 15px; }
.status { font-weight: 600; }
.card h2 { margin-top: 0; font-size: 20px; }
.card + .card { margin-top: 12px; }
.items, .health { list-style: none; margin: 0; padding: 0; }
.item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.item { flex-wrap: wrap; }
.item .decide { flex-basis: 100%; }
.item .decide button.primary { margin-top: 12px; }
.item a { color: var(--ink); font-weight: 600; min-height: 24px; }
.minutes { color: var(--muted); font-size: 15px; white-space: nowrap; }
.empty { font-weight: 600; }
.meter { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 6px 0 10px; }
.meter span { display: block; height: 100%; background: var(--green); }
.meter.level-amber span { background: var(--amber); }
.meter.level-red span { background: var(--red); }
.spend-line { margin: 12px 0 0; }
.health li { padding: 8px 0; border-top: 1px solid var(--line); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; background: var(--line); vertical-align: middle; }
.level-green .dot { background: var(--green); }
.level-amber .dot { background: var(--amber); }
.level-red .dot { background: var(--red); }
.status.level-red { color: var(--red); }
button.primary.danger { background: var(--red); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:root { --green: #2e7d4f; --amber: #b7791f; --red: #c0392b; }
.cap, .cost, .ask-type { padding: 4px 0 8px; border-top: 1px solid var(--line); }
.cap p, .cost p, .ask-type p { margin: 8px 0 0; }
details summary { min-height: 48px; padding: 12px 0; color: var(--accent); cursor: pointer; }
.item .cap-hit { flex-basis: 100%; }
.spenders { margin: 0 0 8px; padding-left: 20px; }
.spenders li { padding: 4px 0; }
a.button.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border-radius: 10px;
  text-decoration: none;
}
.entries { list-style: none; margin: 0; padding: 0; }
.entry { padding: 12px 0; border-top: 1px solid var(--line); }
.entry p { margin: 4px 0 0; overflow-wrap: anywhere; }
.entry-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.flag-mark { color: var(--red, #b3261e); font-weight: 600; font-size: 15px; }
.flag summary { color: var(--muted); font-size: 15px; padding: 12px 0 4px; min-height: 44px; cursor: pointer; }
.older { display: inline-block; padding: 12px 0; color: var(--ink); font-weight: 600; }
