/* AHOPE volunteer sign-in, in Homeward Bound's colors.
 *
 * Palette from HomewardBound/HomewardBound-Website-Formatting-Style-Guide.md
 * (pulled from homewardboundwnc.org's computed styles, 2026-06-17): Brand Red
 * #BC2926, Dark Teal #093344, Cream #F9F2E5, logo Gold ~#E0A526. Logo: the
 * site's own header badge (hb-logo.png, 140x193).
 *
 * Dark on every phone, whatever its light/dark setting (the user, 2026-10-01).
 * Until then the page followed the phone: these colors in dark mode, cream
 * (#F9F2E5) in light mode. The light set is in git history before build
 * 2026-10-01-dark. Red text on dark teal is only 2.8:1, so headings are gold.
 *
 * Contrast (WCAG), computed 2026-10-01: cream on the page 15.3:1, on a card
 * 12.2:1; grey (muted) on the page 9.8:1, on a card 7.8:1; gold on the page
 * 7.8:1, on a card 6.2:1; cream on the red button 5.4:1; error text 9.5:1;
 * teal on a chosen cream chip 12.0:1.
 */
:root {
  color-scheme: dark;
  --bg: #041f29; --card: #0b3242; --ink: #F9F2E5; --muted: #b9c7cc; --line: #1f4d5f;
  --red: #BC2926; --on-red: #F9F2E5; --heading: #E0A526; --link: #E0A526;
  --soft: #0f3a4c; --notice-bg: #12404f; --err: #ffb4ae; --err-bg: #3a1614;
  --chip-on: #F9F2E5; --on-chip: #093344; --outline: #F9F2E5; --focus: #E0A526;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.45 "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 30rem; margin: 0 auto; padding: 10px 16px 48px; }
a { color: var(--link); }
h1 {
  font-family: "Trade Gothic Next", "Oswald", "Arial Narrow", system-ui, sans-serif;
  font-size: 1.6rem; line-height: 1.1; font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.01em; color: var(--heading); margin: 10px 0 6px;
}
p { margin: 0 0 12px; }
.lede { color: var(--muted); margin-bottom: 16px; }
.muted { color: var(--muted); }
.sm { font-size: 0.86rem; }
.center { text-align: center; }

/* Header: the Homeward Bound badge, then the program name, large. */
.top { display: flex; align-items: center; gap: 12px;
  padding: 4px 0 10px; margin: 0 0 14px; border-bottom: 3px solid var(--red); }
.top .logo { display: block; width: 44px; height: 61px; flex: none; }
.top .id { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.top .org { font-family: "Trade Gothic Next", "Oswald", "Arial Narrow", system-ui, sans-serif;
  font-size: 1.35rem; line-height: 1.1; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.02em; color: var(--ink); }
.top .hi { font-size: 0.95rem; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.top .help { flex: none; font-size: 0.95rem; font-weight: 700; color: var(--link); padding: 6px 12px;
  border: 2px solid var(--outline); border-radius: 999px; text-decoration: none; }

/* Help page */
.help h2 { font-size: 1.15rem; margin: 0 0 8px; color: var(--heading); }
.help h3 { font-size: 1em; margin: 14px 0 6px; color: var(--heading); }
.help ul { padding-left: 1.1em; margin: 0; }
.help ol { padding-left: 1.4em; margin: 0 0 12px; }
.help li { margin-bottom: 8px; }
.shot { margin: 12px 0; text-align: center; }
.shot img { width: 100%; max-width: 300px; height: auto; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 2px 10px rgba(9, 51, 68, 0.12); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin: 0 0 14px; }
.card.state { border-top: 4px solid var(--red); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line); }
.lbl { color: var(--muted); font-size: 0.95rem; }
.val { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.leave { display: flex; align-items: center; gap: 6px; }
.leave select { width: auto; min-width: 7.2em; font-weight: 700; }

.eyebrow { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem;
  color: var(--heading); font-weight: 800; margin-bottom: 6px; }
.times { font-size: 1.45rem; font-weight: 700; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.total { font-weight: 700; }

.record { background: var(--soft); border-left: 4px solid var(--red); border-radius: 6px;
  padding: 10px 12px; margin: 14px 0; font-variant-numeric: tabular-nums; }
.notice { background: var(--notice-bg); border-radius: 8px; padding: 10px 12px; }
.err { background: var(--err-bg); color: var(--err); border-radius: 8px; padding: 10px 12px; font-weight: 600; }

button, .button { font: inherit; cursor: pointer; }
/* Block, not flex: a button whose label holds a live time (a <span>) must wrap as one line of text. */
.primary, .secondary, .button {
  display: block; width: 100%; min-height: 56px; border-radius: 6px; padding: 14px 16px;
  line-height: 1.3; text-align: center; text-decoration: none;
}
.primary { border: 0; background: var(--red); color: var(--on-red); font-size: 1.15rem; font-weight: 700; }
.secondary { border: 2px solid var(--outline); background: transparent; color: var(--outline);
  font-weight: 700; margin-top: 10px; }
button:disabled, .busy { opacity: 0.6; }
.linkbtn { background: none; border: 0; color: var(--link); text-decoration: underline;
  padding: 8px 2px; font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.actions form { display: inline; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  min-width: 52px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink); font-size: 0.95rem; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:has(input:checked) { border-color: var(--chip-on); background: var(--chip-on); color: var(--on-chip); font-weight: 700; }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.adj { font-weight: 700; padding: 6px 10px; }

/* "I got here earlier" sits on the right, just under the arrival time it changes
   (the user, 2026-10-01); its choices open on the right too. */
.row.arrive { border-bottom: 0; padding-bottom: 0; }
details.earlier { border-bottom: 1px solid var(--line); padding: 2px 0 8px; }
details.earlier summary { color: var(--link); cursor: pointer; padding: 4px 0; font-weight: 600; text-align: right; }
details.earlier .chips { justify-content: flex-end; }
#assignment { width: auto; min-width: 9em; font-weight: 700; }

label.f { display: block; margin: 0 0 14px; }
label.f span { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 4px; }
input[type=text], input[type=password], input[type=time], select {
  font: inherit; font-size: 1.15rem; width: 100%; min-height: 50px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}
.custom { margin-top: 4px; }
.js .custom { display: none; }
.js .custom.show { display: block; }

.visits { list-style: none; padding: 0; margin: 0 0 8px; }
.visits li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0;
  border-bottom: 1px solid var(--line); }
.visits li .t { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.visits li .muted { grid-column: 1; }
.visits li a { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.visits li .acts { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex;
  flex-direction: column; align-items: flex-end; gap: 2px; }
.visits li .acts form { display: inline; }
.visits li .acts .linkbtn { padding: 4px 2px; }

.foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 18px;
  margin-top: 22px; font-size: 0.95rem; }
.foot form { display: inline; }
/* "Not (name)? Switch person" with a 60-letter name and no space wraps instead
   of pushing the page sideways (browser harness, 2026-10-01). */
.foot .linkbtn { overflow-wrap: anywhere; max-width: 100%; }

.js-only { display: none !important; }
.js .js-only { display: inline-flex !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
