/* Stay phone app. Field density (design canon 6 and 6a): one decision per screen,
   big type, thumb-first, touch targets 56 px tall (above the 48 dp floor).
   Classification colours are their true colours; red means danger and nothing else. */
:root {
  --teal: #1A5F5F;
  --teal-dark: #134646;
  --teal-pale: #E6F0F0;
  --ink: #142222;
  --muted: #4A5A5A;
  --line: #C9D6D6;
  --bg: #F4F7F7;
  --card: #FFFFFF;
  --note: #FFF6DA;      /* a notice or a problem: pale and calm, never red */
  --note-line: #8A6D00;
  --green: #2E7D32;
  --yellow: #F9A825;
  --orange: #EF6C00;
  --red: #C62828;
  --darkred: #7B1E1E;
  --preg: #4A5A6A;
  --tap: 56px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* header: the face's title, then the site and the Accra day (canon 6c) */
header.bar {
  position: sticky; top: 0; z-index: 5; background: var(--teal); color: #fff;
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 64px;
}
header.bar .back {
  min-width: var(--tap); min-height: var(--tap); border: 0; border-radius: 12px;
  background: rgba(255,255,255,.14); color: #fff; font-size: 26px; font-weight: 800;
}
header.bar .titles { flex: 1; min-width: 0; }
header.bar h1 { margin: 0; font-size: 21px; line-height: 1.2; }
header.bar .sub { font-size: 14px; opacity: .9; }
.pill {
  border: 0; border-radius: 999px; padding: 6px 12px; min-height: 40px; font-size: 14px; font-weight: 700;
  background: #fff; color: var(--teal-dark); white-space: nowrap;
}
.pill.wait { background: #FFE9A8; color: #3D3000; }
.pill.off { background: #DDE3E3; color: #233; }

main { padding: 16px; max-width: 560px; margin: 0 auto; }
h2 { font-size: 24px; line-height: 1.25; margin: 4px 0 12px; }
h3 { font-size: 19px; margin: 18px 0 8px; }
p { margin: 8px 0; }
.hint { color: var(--muted); font-size: 16px; }
.step { font-size: 15px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }

/* buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: var(--tap); padding: 12px 16px; margin: 10px 0; border-radius: 14px;
  border: 2px solid var(--teal); background: var(--card); color: var(--teal-dark);
  font-weight: 800; font-size: 19px; text-align: center; text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--teal); color: #fff; }
.btn.big { min-height: 84px; font-size: 23px; }
.btn.quiet { border-color: var(--line); color: var(--ink); font-weight: 700; }
.btn:disabled { opacity: .5; }
.btn:focus-visible, .chip:focus-visible, input:focus-visible { outline: 3px solid #0B8F8F; outline-offset: 2px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

/* choice chips: one tap answers */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.chip {
  min-height: var(--tap); padding: 10px 16px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--card); font-weight: 700; font-size: 18px; cursor: pointer; flex: 1 1 auto;
}
.chip.on { border-color: var(--teal); background: var(--teal); color: #fff; }
.chips.col { flex-direction: column; }
.chips.col .chip { text-align: left; }

/* tick list for danger signs */
.tick {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--tap); text-align: left;
  padding: 10px 14px; margin: 8px 0; border-radius: 14px; border: 2px solid var(--line); background: var(--card);
  font-weight: 600; cursor: pointer;
}
.tick .box {
  flex: 0 0 30px; height: 30px; border-radius: 8px; border: 2px solid var(--muted);
  display: flex; align-items: center; justify-content: center; font-weight: 900;
}
.tick.on { border-color: var(--darkred); background: #FBEDED; }
.tick.on .box { background: var(--darkred); border-color: var(--darkred); color: #fff; }
.tick small { display: block; font-weight: 400; color: var(--muted); font-size: 15px; }

/* fields */
label.f { display: block; font-weight: 700; margin: 12px 0 4px; }
label.f small { font-weight: 400; color: var(--muted); }
input.in {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border-radius: 12px;
  border: 2px solid var(--line); background: #fff; font-size: 20px;
}
input.in.num { font-size: 30px; font-weight: 800; text-align: center; letter-spacing: 1px; }
input.in:focus { border-color: var(--teal); }

/* cards and notices */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 12px 0; }
.note {
  background: var(--note); border: 2px solid var(--note-line); border-radius: 12px; padding: 10px 14px; margin: 10px 0;
  font-weight: 600;
}
.ok { background: var(--teal-pale); border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-weight: 600; color: var(--teal-dark); }
.danger-bar { background: var(--darkred); color: #fff; font-weight: 800; padding: 10px 14px; border-radius: 12px; margin: 0 0 10px; }

/* the result */
.result { border-radius: 18px; padding: 18px 16px; color: #fff; margin-bottom: 12px; }
.result .colour { font-size: 40px; font-weight: 900; line-height: 1.1; }
.result .bp { font-size: 18px; margin-top: 4px; font-weight: 600; }
.result .mean { font-size: 19px; margin-top: 8px; font-weight: 700; }
.c-GREEN { background: var(--green); }
.c-YELLOW { background: var(--yellow); color: var(--ink); }
.c-ORANGE { background: var(--orange); }
.c-RED { background: var(--red); }
.c-DARKRED { background: var(--darkred); }
.c-PREG { background: var(--preg); }
.emergency { background: var(--darkred); color: #fff; border-radius: 16px; padding: 16px; margin: 12px 0; }
.emergency h3 { margin: 0 0 6px; font-size: 22px; }
.emergency p { font-size: 20px; font-weight: 700; }
.cardcode { font-size: 30px; font-weight: 900; letter-spacing: 1px; color: var(--teal-dark); }
.urgency { font-size: 22px; font-weight: 900; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 72px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 8px 0; cursor: pointer;
}
.item .who { flex: 1; min-width: 0; }
.item .name { display: block; font-weight: 800; font-size: 19px; }
.item .meta { display: block; color: var(--muted); font-size: 15px; }
.item .go { font-size: 28px; color: var(--teal); font-weight: 800; }
.dot { flex: 0 0 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0,0,0,.15); }
.dot.c-GREEN, .dot.c-YELLOW, .dot.c-ORANGE, .dot.c-RED, .dot.c-DARKRED, .dot.c-PREG { padding: 0; }
.tag { display: inline-block; font-size: 13px; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: #FFE9A8; color: #3D3000; }
.tag.late { background: var(--ink); color: #fff; }
.section-h { font-size: 16px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 18px 0 4px; }

.counts { display: flex; gap: 10px; }
.counts .card { flex: 1; text-align: center; margin: 8px 0; }
.counts b { display: block; font-size: 30px; }
.foot { display: flex; gap: 10px; margin-top: 18px; }
.foot .btn { font-size: 17px; }
.toast {
  position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 9; max-width: 536px; margin: 0 auto;
  background: var(--ink); color: #fff; padding: 14px 16px; border-radius: 14px; font-weight: 700;
}
.gap { margin-top: 8px; }
.who-big { font-size: 22px; font-weight: 900; }
