/* The trailhead check-in page (/checkin/). From the phone prototype (prototypes/phone-pages/tbr-phone.html),
   the Check in view only: phone-first single column, max 430px. */
:root {
  --bg: #eef1f3; --page: #ffffff; --fg: #1d2529; --muted: #5d6a71; --line: #d7dde0; --soft: #f4f6f7;
  --water: #cfe1ec; --land: #e9edef; --accent: #1d4ed8; --accent-fg: #ffffff; --ok: #1f7a46;
  --proto: #fde68a; --proto-fg: #3b2f00;
  --display: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --mono: "Overpass Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1417; --page: #1b2226; --fg: #e6ebee; --muted: #9aa8b0; --line: #2e383d; --soft: #222b30;
  --water: #1d3442; --land: #232c31; --accent: #5aa6ee; --accent-fg: #0b1a2a; --ok: #4cc283;
  --proto: #6b5500; --proto-fg: #fff3c2; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0f1417; --page: #1b2226; --fg: #e6ebee; --muted: #9aa8b0; --line: #2e383d; --soft: #222b30;
  --water: #1d3442; --land: #232c31; --accent: #5aa6ee; --accent-fg: #0b1a2a; --ok: #4cc283;
  --proto: #6b5500; --proto-fg: #fff3c2; color-scheme: dark }

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--fg); font-family: var(--display); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
.proto { background: var(--proto); color: var(--proto-fg); font-size: .78rem; padding-block: 6px; text-align: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.phone { max-width: 430px; margin: 0 auto; background: var(--page); min-height: 100vh;
  padding-block: 14px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.org { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 { font-size: 1.45rem; font-weight: 800; line-height: 1.15; margin: 2px 0 10px; text-wrap: balance; }
h2 { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 26px 0 8px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
h2 .ex { font-size: .66rem; letter-spacing: .05em; border: 1px solid var(--muted); border-radius: 4px; padding: 0 5px; text-transform: uppercase; }
h3 { font-size: 1rem; font-weight: 800; margin: 0 0 6px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); font-size: .88rem; }
label.block { display: block; font-weight: 600; margin: 14px 0 6px; }
.help { color: var(--muted); font-size: .84rem; font-weight: 400; }
select, input[type=email], textarea { width: 100%; font: inherit; font-size: 1rem; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); color: var(--fg); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
textarea { min-height: 80px; resize: vertical; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.primary { display: block; width: 100%; font: inherit; font-size: 1.1rem; font-weight: 800; padding: 15px; border-radius: 12px; border: 0; background: var(--accent); color: var(--accent-fg); margin-top: 18px; cursor: pointer; }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.links a { font-size: .82rem; color: var(--accent); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.tip { border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: .86rem; color: var(--muted); }
.tip a { color: var(--accent); font-weight: 600; }
.tip strong { display: block; color: var(--fg); font-size: 1.05rem; margin-top: 2px; }
.tip-hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tip-hd button { font: inherit; font-size: .78rem; color: var(--accent); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; cursor: pointer; }
a.tap { display: block; color: inherit; text-decoration: none; border-radius: 10px; }
a.tap:active { background: var(--soft); }
.more { display: block; margin-top: 10px; color: var(--accent); font-weight: 600; font-size: .9rem; }
.sign-cap a.inl { color: var(--accent); font-weight: 600; white-space: nowrap; }
h2.form-h { font-size: 1.35rem; font-weight: 800; color: var(--fg); text-transform: none; letter-spacing: 0;
  margin-top: 32px; padding-top: 20px; border-top: 3px solid var(--fg); }
.txtfc { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 600; font-size: .9rem; }
.checks { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 2px; }
.checks legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.checks label, label.one { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; }
label.one { margin-top: 8px; font-weight: 600; }
.checks input, label.one input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--accent); }
.auto { font-size: .84rem; margin-top: 14px; }
.done { border: 1px solid var(--ok); border-radius: 10px; padding: 12px 14px; margin-top: 14px; }
/* Sign graphic: fixed sign colours, same in both themes */
.sign { display: block; width: 100%; height: auto; border-radius: 10px; margin: 6px 0 4px; }
.sign-cap { font-size: .84rem; color: var(--muted); }

/* Danger by elevation */
.danger { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; }
.danger svg { width: 112px; height: auto; display: block; }
.bands { display: grid; gap: 6px; }
.band { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; align-items: center; }
.band svg { width: 38px; height: 38px; }
.band .bn { font-size: .76rem; color: var(--muted); line-height: 1.1; }
.band .lv { font-weight: 800; line-height: 1.15; }
.advice { border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: .92rem; font-weight: 600; }
.issued { font-size: .8rem; color: var(--muted); margin-top: 6px; }

/* Avalanche problem */
.problem { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; }
.problem .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.pcell { min-width: 0; }
.pcell .lab { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: 2px; margin-bottom: 6px; text-align: center; }
.pcell svg { display: block; width: 100%; height: auto; max-width: 150px; margin: 0 auto; }
.pcell svg text { font-family: var(--display); }

/* Weather */
.wx { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.wx table { border-collapse: collapse; width: 100%; font-size: .86rem; font-variant-numeric: tabular-nums; }
.wx th, .wx td { padding: 7px 6px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.wx th { font-size: .68rem; font-weight: 600; color: var(--muted); line-height: 1.15; vertical-align: bottom; }
.wx th small { display: block; font-weight: 400; }
.wx th:first-child, .wx td:first-child { text-align: left; }
.wx tr:last-child td { border-bottom: 0; }
.wx tbody tr:first-child td { font-weight: 800; }
.dir { display: inline-flex; align-items: center; gap: 4px; }
.dir svg { width: 12px; height: 12px; }
.stn { font-size: .84rem; color: var(--muted); margin-bottom: 6px; }
.now { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.now div { min-width: 0; }
.now b { display: block; font-family: var(--mono); font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.now span { font-size: .78rem; color: var(--muted); }

.fc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fc > div { border: 1px solid var(--line); border-radius: 10px; padding: 9px; min-width: 0; font-size: .84rem; }
.fc .per { font-weight: 800; font-size: .86rem; }
.fc .sky { color: var(--muted); margin-bottom: 4px; }
.fc .snow { font-family: var(--mono); font-weight: 600; font-size: 1.05rem; }
.fc .t { font-family: var(--mono); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 14px; margin: 8px 0 0; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.proto[hidden] { display: none; }
.primary:disabled { opacity: .6; cursor: progress; }
.done.bad { border-color: #c8201b; }
.done.wait { border-color: var(--muted); }
.done button { font: inherit; font-size: .9rem; font-weight: 600; color: var(--accent); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-top: 8px; cursor: pointer; }
/* The honeypot: a field no person sees or reaches; a bot that fills it is ignored. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
