/* MeetingsCount participant app. Loaded after tokens.css and base.css.
   Phone first: 16px text so iOS never zooms an input, 48px tap targets,
   safe-area padding for notches, and a dark theme for evening meetings. */

:root { --nav-h: 64px; }

/* ---------- frame ---------- */
#app { min-height: 100dvh; }
.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.01em; margin-right: auto; }
.logo { width: 28px; height: 28px; display: block; }
main#view {
  max-width: 560px; margin: 0 auto; outline: none;
  padding: 6px max(16px, env(safe-area-inset-right)) calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; max-width: 190px; height: var(--nav-h); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600;
}
.tab .ic { width: 24px; height: 24px; }
.tab.on { color: var(--brand); }
.offline {
  display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
  background: var(--warn-bg); color: var(--warn); padding: 9px 16px;
}
.offline[hidden] { display: none; }

/* ---------- type ---------- */
.hello { padding: 8px 2px 2px; }
.hello h1, h1.page { font-size: 27px; line-height: 1.15; letter-spacing: -.02em; font-weight: 750; }
h1.page { padding: 8px 2px 0; }
.hello p { margin-top: 3px; }

.link-row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 15px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; box-shadow: var(--shadow);
}
.link-row > .ic:first-child { width: 24px; height: 24px; color: var(--brand); }
.link-row > span { flex: 1; line-height: 1.35; }

/* ---------- today ---------- */
.active { border-color: color-mix(in srgb, var(--ts) 40%, var(--line)); background:
  linear-gradient(180deg, var(--tbg), var(--surface) 70%); }
.active-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.active-name { font-size: 21px; line-height: 1.2; letter-spacing: -.01em; margin: 12px 0 12px; }
.active .btn { margin-top: 14px; }
.active .fine { margin-top: 10px; }
.meter { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; margin-bottom: 7px; }
.meter i { display: block; height: 100%; background: var(--ts, var(--brand)); border-radius: 99px; }
.meter.thin { height: 6px; margin-top: 10px; }
.meter.thin i { background: var(--ok-strong); }

.progress .row { margin-bottom: 12px; }
.req-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.big { font-size: 44px; font-weight: 780; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.of { font-size: 19px; font-weight: 650; color: var(--muted); }
.dots { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.dots i { width: 32px; height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.dots i.done { background: var(--ok-strong); }
.dots i.pend { background: repeating-linear-gradient(135deg, var(--warn-strong) 0 4px, color-mix(in srgb, var(--warn-strong) 35%, transparent) 4px 8px); }
.req-line { margin-top: 12px; font-weight: 600; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.req-line.short { color: var(--ink); }
.strip { display: flex; align-items: center; gap: 4px; margin-top: 14px; }
.strip span:not(.strip-label) { width: 18px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
.strip .met { background: var(--ok-strong) !important; }
.strip .short { background: var(--bad-strong) !important; opacity: .75; }
.strip .pend { background: var(--warn-strong) !important; }
.strip .now { outline: 1.5px dashed var(--muted); outline-offset: 1px; background: transparent !important; }
.strip-label { font-size: 12px; margin-left: 6px; }

.meeting { padding: 14px 16px; }
.m-head { display: flex; gap: 14px; }
.m-time { width: 76px; flex: none; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; line-height: 1.25; }
.m-time b { font-size: 15.5px; white-space: nowrap; }
.m-time span { font-size: 13px; }
.m-main { min-width: 0; flex: 1; }
.m-main h4 { font-size: 16.5px; line-height: 1.3; }
.m-main p { margin-top: 2px; }
.addr { display: inline-flex; gap: 5px; align-items: center; margin-top: 6px; color: var(--ink-2); text-decoration: none; }
.addr .ic { width: 16px; height: 16px; color: var(--brand); }
.meeting .btn { margin-top: 14px; }
.meeting .fine { margin-top: 7px; }
.meeting.late .fine { margin-top: 12px; }
.opens { margin-top: 12px; font-size: 14px; color: var(--ink-2); display: flex; gap: 6px; align-items: center;
  background: var(--surface-2); border-radius: 10px; padding: 9px 11px; }
.opens .ic { width: 17px; height: 17px; color: var(--muted); }

/* ---------- history ---------- */
.week .row { margin: 12px 2px 8px; }
.hist { list-style: none; margin: 0; }
.hist li + li { border-top: 1px solid var(--line); }
.hist-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px;
  background: none; border: 0; cursor: pointer; }
.hist-row:hover { background: var(--surface-2); }
.dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.dot .ic { width: 18px; height: 18px; }
.h-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.h-main b { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h-state { font-size: 13px; font-weight: 650; color: var(--t); text-align: right; max-width: 38%; }
.chev { width: 16px; height: 16px; }

/* Distance diagram: you, the meeting, the allowed circle, the phone's certainty. */
.diagram { margin: 6px auto 2px; width: 100%; max-width: 280px; }
.diagram svg { width: 100%; height: auto; display: block; }
.d-zone { fill: color-mix(in srgb, var(--ok-strong) 8%, transparent); stroke: var(--ok-strong); stroke-width: 1.5; stroke-dasharray: 5 5; }
.d-acc { fill: color-mix(in srgb, var(--brand) 14%, transparent); stroke: none; }
.d-acc.out { fill: color-mix(in srgb, var(--bad-strong) 14%, transparent); }
.d-line { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 2 3; }
.d-meet { fill: var(--ink); }
.d-you { fill: var(--brand); stroke: var(--surface); stroke-width: 3; }
.d-you.out { fill: var(--bad-strong); }
.d-lbl { font-size: 12px; fill: var(--muted); }
.d-lbl.strong { fill: var(--ink); font-weight: 700; }
.diagram figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.diagram figcaption i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.k-you { background: var(--brand); } .k-you.out { background: var(--bad-strong); }
.k-zone { border: 1.5px dashed var(--ok-strong); }
.k-acc { background: color-mix(in srgb, var(--brand) 25%, transparent); }

/* ---------- consent and full-screen states ---------- */
body.bare { background: var(--surface); }
.consent { max-width: 520px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom)); }
.consent.center { min-height: 100dvh; display: grid; align-content: center; justify-items: center; text-align: center; gap: 14px; }
.consent .logo { width: 44px; height: 44px; }
.consent-head { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.consent-head .logo { width: 34px; height: 34px; }
.consent h1 { text-wrap: balance; font-size: 30px; line-height: 1.12; letter-spacing: -.025em; font-weight: 780; }
.consent .lead { margin-top: 10px; }
.promises { list-style: none; padding: 0; margin: 26px 0 28px; display: grid; gap: 20px; }
.promises li { display: flex; gap: 14px; align-items: flex-start; }
.promises li > .ic { width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); }
.promises b { font-size: 16.5px; }
.promises p { color: var(--ink-2); margin-top: 3px; }
.consent .fine { margin-top: 14px; }

/* ---------- officer questions ---------- */
.question { border-color: color-mix(in srgb, var(--warn-strong) 45%, var(--line));
  background: linear-gradient(180deg, var(--warn-bg), var(--surface) 75%); display: grid; gap: 10px; }
.question .badge { justify-self: start; }
.q-text { font-size: 18px; font-weight: 600; line-height: 1.35; }
.thread { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; width: 100%; }
.thread li { border-radius: 14px; padding: 11px 13px; display: grid; gap: 4px; max-width: 92%; }
.thread li p { color: var(--ink-2); }
.thread .from-officer { background: var(--tbg); justify-self: start; border-bottom-left-radius: 4px; }
.thread .from-you { background: var(--brand-tint); justify-self: end; border-bottom-right-radius: 4px; }

/* ---------- signing in ---------- */
.signin { max-width: 440px; margin: 0 auto; display: grid; gap: 14px;
  padding: calc(40px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom)); }
.signin-head { display: flex; align-items: center; gap: 9px; font-weight: 700; margin-bottom: 14px; }
.signin-head .logo { width: 30px; height: 30px; }
.signin h1 { font-size: 30px; line-height: 1.12; letter-spacing: -.025em; font-weight: 780; }
.signin form { display: grid; gap: 8px; margin-top: 10px; }
.signin label { font-size: 14px; font-weight: 650; color: var(--ink-2); }
.signin .btn { margin-top: 8px; }
.signin .err { color: var(--bad); font-weight: 600; font-size: 14px; }
.signin .err[hidden] { display: none; }
.code-input { font-size: 30px; letter-spacing: .34em; text-align: center; font-variant-numeric: tabular-nums;
  padding: 14px 10px; font-weight: 700; }
b.code { font-size: 19px; letter-spacing: .1em; font-variant-numeric: tabular-nums; }

/* ---------- asking someone who was there ---------- */
.pick { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; width: 100%; }
.pick-row b { display: block; }
.pick-row .small { display: block; margin-top: 2px; font-weight: 500; }
.ask-form { display: grid; gap: 7px; width: 100%; text-align: left; }
.ask-form label { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.ask-form .check { display: flex; align-items: center; gap: 9px; font-weight: 500; color: var(--ink); margin: 4px 0 6px; }
.ask-form .check input { width: 20px; height: 20px; accent-color: var(--brand); }
.ask-form .btn { margin-top: 4px; }
.ask-form[hidden] { display: none; }
.vouch { display: flex; gap: 9px; align-items: flex-start; text-align: left; width: 100%;
  background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 6px 0; }
.vouch .ic { width: 20px; height: 20px; flex: none; color: var(--ts, var(--muted)); margin-top: 1px; }
.vouch + .btn { margin-top: 8px; }
.people-list { margin-top: 8px; }
.people-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.people-list li:first-child { border-top: 0; }
.people-list .who { flex: 1; display: flex; flex-direction: column; }
.people-list + .btn { margin-top: 10px; }

/* ---------- the town, and long lists ---------- */
.area { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px; font-size: 15px; color: var(--ink-2); }
.area > span { display: inline-flex; align-items: center; gap: 7px; }
.area .ic { width: 18px; height: 18px; color: var(--brand); }
.findbox input { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px; }
.day .muted { font-weight: 500; }
.btn.more { margin: 4px 0 10px; }
.town input[type="search"] { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; min-height: 48px; }
.places { max-height: 46vh; overflow: auto; }
.places .pick-row b { display: block; }
.places .pick-row .small { display: block; margin-top: 2px; font-weight: 500; }
