@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url(/fonts/space-grotesk-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* space-grotesk-latin-wght-normal */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url(/fonts/space-grotesk-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  color: #18181b;
  background: #f7faec;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --brand: #467235;
  --deep: #283f24;
  --tint: #f2f8ec;
  --surface: #f7faec;
  --paper: #fff;
  --line: #e4e4e7;
  --muted: #595b61;
  --amber: #704d06;
  --amber-bg: #fff4d5;
  --danger: #ac2918;
  --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--deep); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #5a8b38; outline-offset: 3px; }
::selection { background: #dfeecf; color: var(--deep); }
svg { flex: none; }
.shell { max-width: 580px; min-height: 100dvh; margin: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 20px 0; border-bottom: 1px solid #e3e9d6; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--deep); font-size: 17px; font-weight: 700; text-decoration: none; min-height: 44px; }
.brand-icon, .row-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #e8f0dc; color: var(--deep); flex: none; }
.brand-icon { background: var(--brand); color: white; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; background: transparent; color: var(--deep); border: 0; border-radius: 8px; }
.icon-button:hover, .nav-link:hover { background: #eaf1e0; }
main { padding: 24px 20px 104px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(27px, 6vw, 36px); letter-spacing: -.035em; line-height: 1.1; margin-bottom: 8px; }
h2 { font-size: 18px; letter-spacing: -.02em; margin: 24px 0 12px; }
p { line-height: 1.5; }
.lead, .muted, small { color: var(--muted); }
.lead { margin-bottom: 20px; font-size: 14px; }
.loading, .empty { color: var(--muted); padding: 20px 0; }
.heading { margin-bottom: 20px; }
.heading .lead { margin-bottom: 0; }
.back { display: inline-flex; align-items: center; min-height: 44px; gap: 6px; margin: -8px 0 8px; font-size: 14px; text-decoration: none; }
.card, .row, .notice, .offline { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.card { padding: 16px; }
.card + .card, .row + .row { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; padding: 12px; min-height: 66px; }
.row:hover { border-color: #aebea2; }
.row > .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row strong { display: block; font-size: 15px; margin-bottom: 2px; }
.row small, .badge { font-size: 12px; }
.badge { display: inline-block; width: fit-content; padding: 4px 8px; background: #edf1e7; color: var(--deep); font-weight: 700; border-radius: 999px; }
.badge.warn { background: var(--amber-bg); color: var(--amber); }
.badge.done { background: #e5f1dd; }
.record-row .badge { margin-top: 5px; }
.split, .tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
input, textarea, select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #d5d8d0; border-radius: 8px; background: #fff; color: #18181b; font-size: 16px; caret-color: var(--brand); }
textarea { resize: vertical; min-height: 84px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; padding: 8px 14px; color: white; border: 1px solid transparent; border-radius: 8px; background: var(--brand); font-size: 14px; font-weight: 700; text-decoration: none; }
.button:hover { background: #38592a; }
.button:disabled { opacity: .7; cursor: wait; }
.button.secondary { background: var(--paper); border-color: var(--line); color: var(--deep); }
.button.secondary:hover { background: #eef4dd; }
.filters { margin-bottom: 14px; }
.filter-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 8px; }
details summary { min-height: 44px; padding: 11px 0; cursor: pointer; font-weight: 700; }
.form-error { color: var(--danger); font-size: 14px; }
.notice, .offline { margin: 12px 20px 0; padding: 10px 12px; font-size: 14px; color: var(--deep); }
.offline { color: var(--amber); background: var(--amber-bg); border-color: #ecd99e; }
nav { position: fixed; z-index: 1; inset: auto 0 0; max-width: 580px; margin: auto; display: flex; gap: 4px; justify-content: center; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: #f7faec; border-top: 1px solid #e3e9d6; }
.nav-link { flex: 1; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 48px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 12px; }
.nav-link[aria-current="page"] { color: var(--deep); background: #e6eed9; font-weight: 700; }
.data { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1fr); margin: 0; }
.data dt, .data dd { padding: 9px 0; margin: 0; border-bottom: 1px solid #eee; overflow-wrap: anywhere; font-size: 14px; }
.data dt { color: var(--muted); padding-right: 8px; }
.data dd { font-variant-numeric: tabular-nums; }
.data dt:last-of-type, .data dd:last-of-type { border-bottom: 0; }
.route { display: block; width: 100%; max-height: 220px; background: var(--tint); border-radius: 8px; }
.route-caption { margin-top: 9px; }
.record-refresh { margin-top: 10px; }
.card + details.card, form.card + details.card { margin-top: 12px; }
.qr { width: min(100%, 230px); height: auto; display: block; margin: 8px auto; }
.account-name { overflow-wrap: anywhere; margin-bottom: 12px; }
.install { margin-top: 20px; }
@media (min-width: 620px) {
  .shell { border-inline: 1px solid #e3e9d6; }
}

/* The signed-out screen uses the full phone height and keeps the action within reach. */
.brand-icon { display: block; }
.sign-in-view { padding: 0; }
.sign-in {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: env(safe-area-inset-top) 24px max(30px, env(safe-area-inset-bottom));
}
.sign-in-brand {
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 36px 0 32px;
}
.sign-in-brand img { display: block; margin-bottom: 22px; }
.sign-in-brand h1 { color: var(--deep); font-size: clamp(30px, 8vw, 42px); }
.sign-in-brand p { color: var(--muted); font-size: 14px; }
.sign-in-form {
  width: min(100%, 390px);
  justify-self: center;
  padding: 20px;
  border: 1px solid #e3e9d6;
  border-radius: 16px;
  background: var(--paper);
}
.sign-in-form input { min-height: 49px; }
.sign-in-form .button { min-height: 52px; margin-top: 4px; }
.sign-in-form .form-error:not([hidden]) { margin: 0; }
.shell:has(.sign-in-view) { border-inline: 0; }
