/*
 * Sized for one hand, in somebody else's hallway, standing up.
 *
 * Every control a thumb has to hit is at least 44px and the ones used on every
 * room are bigger. Type does not go below 16px anywhere: Safari zooms the page
 * when a smaller input is focused, and a page that zooms itself mid walk is a
 * page that loses the operator's place.
 */
:root {
  --ink: #16181a;
  --ink-soft: #545b61;
  --ink-faint: #656c72;
  --line: #e4e7ea;
  --line-strong: #cdd2d7;
  --wash: #f5f6f7;
  --accent: #0b6b5b;
  --flag: #b45309;
  --flag-wash: #fdf3e7;
  --radius: 10px;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-size: 17px;
  line-height: 1.45;
  /* Room for the home indicator, and for a thumb. */
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
}
header.bar {
  position: sticky; top: 0; z-index: 5; background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.bar h1 { font-size: 17px; margin: 0; font-weight: 650; }
.count { color: var(--ink-faint); font-size: 15px; font-variant-numeric: tabular-nums; }

label { display: block; font-size: 15px; font-weight: 600; margin: 18px 0 6px; }
input[type='text'], textarea, select {
  width: 100%; font: inherit; font-size: 17px; padding: 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff;
}
textarea { min-height: 72px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px;
}

/* Chips: the repeated answers, tappable rather than typed. Wall type and drops
   are the same handful of words in most houses, and typing "block" ninety times
   on a touchscreen is how a walk gets slow and then gets skipped. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 15px; padding: 10px 14px; min-height: 44px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--ink); cursor: pointer;
}
.chip[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* The reading. The hardest thing to enter on a touchscreen is a negative
   number, so it is never typed: a slider for the sweep and two buttons for the
   last decibel. The number itself is enormous because it is read at arm's
   length while holding a laptop. */
.reading { margin-top: 18px; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--wash); }
.reading-value { display: flex; align-items: baseline; gap: 10px; }
.reading-value b { font-size: 46px; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.reading-value span { color: var(--ink-soft); font-size: 16px; }
.reading input[type='range'] { width: 100%; margin: 14px 0 6px; height: 44px; }
.nudge { display: flex; gap: 10px; }
.nudge button { flex: 1; min-height: 48px; font-size: 20px; font-weight: 650; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.means { margin: 10px 0 0; font-size: 16px; font-weight: 600; }
.unmeasured { margin-top: 10px; font-size: 15px; color: var(--ink-faint); }

.actions { position: sticky; bottom: 0; background: #fff; padding: 14px 0 6px; border-top: 1px solid var(--line); margin-top: 22px; }
button.primary {
  width: 100%; min-height: 56px; font: inherit; font-size: 18px; font-weight: 650;
  background: var(--accent); color: #fff; border: 0; border-radius: var(--radius);
}
button.ghost { width: 100%; min-height: 48px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius); margin-top: 10px; }

.banner { margin: 12px 0; padding: 10px 12px; border-radius: var(--radius); font-size: 15px; }
.banner.offline { background: var(--flag-wash); color: var(--flag); }
.banner.ok { background: #e8f3f0; color: var(--accent); }

button.danger { width: 100%; min-height: 48px; font: inherit; font-size: 16px; background: #fff; color: #9b2c1f; border: 1px solid #e3b9b2; border-radius: var(--radius); margin-top: 18px; }

/* The review list. Each room is one big target that opens it for editing, with
   an Edit label on the right so nobody has to guess that a row is tappable. The
   first version only let the number be tapped, and nothing said so. */
.rooms { list-style: none; margin: 12px 0 0; padding: 0; }
.rooms li { border-bottom: 1px solid var(--line); }
.rooms button.row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  width: 100%; min-height: 64px; padding: 12px 4px; font: inherit; text-align: left;
  background: #fff; border: 0; color: var(--ink); cursor: pointer;
}
.rooms .where { color: var(--ink-faint); font-size: 15px; }
.rooms .notes { color: var(--ink-soft); font-size: 14px; }
.rooms .num { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rooms .edit { color: var(--accent); font-weight: 600; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 999px; }
.sent { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius); background: #e8f3f0; color: var(--accent); font-size: 15px; }
.sent.dirty { background: var(--flag-wash); color: var(--flag); }
.hidden { display: none; }
