/* Worker-facing styles.
   Built for a phone held in one gloved hand, outdoors, in direct sun. That drives every
   number here: 18px base text, 56px minimum touch targets, heavy borders instead of
   subtle shadows, and no low-contrast grey anywhere that carries meaning. */

:root {
  --bg: #ffffff;
  --surface: #f4f6f8;
  --surface-2: #e9edf1;
  --ink: #12161c;
  --ink-soft: #47525f;
  --line: #c3ccd6;
  --line-strong: #8b98a6;
  --accent: #b45309;          /* burnt amber: 5.4:1 on white, still reads in glare */
  --accent-ink: #ffffff;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --ok: #1b5e20;
  --ok-bg: #e8f5e9;
  --focus: #0b57d0;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --surface: #1b2027;
    --surface-2: #242b34;
    --ink: #f2f5f8;
    --ink-soft: #b3bdc9;
    --line: #39424e;
    --line-strong: #596574;
    --accent: #f5a524;
    --accent-ink: #1a1206;
    --danger: #ff8a80;
    --danger-bg: #3a1e1c;
    --ok: #a5d6a7;
    --ok-bg: #17301a;
    --focus: #8ab4f8;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- chrome ---- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 2px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-mark { width: 24px; height: 24px; color: var(--accent); flex: none; }

.lang-toggle {
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  padding: 10px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
}

.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }

.wrap { max-width: 640px; margin: 0 auto; padding: 22px 16px 40px; }

/* ---- hero ----
   Always dark with a hi-vis amber accent, in both colour schemes. It is a designed
   band rather than page furniture, and it is the thing that makes the site read as
   "this is the jobsite's safety line" in the half second before anyone reads a word. */

.hero {
  position: relative;
  background:
    radial-gradient(120% 140% at 12% 0%, #232c38 0%, rgba(35,44,56,0) 58%),
    linear-gradient(180deg, #171d26 0%, #11151c 100%);
  color: #f2f5f8;
  padding: 40px 16px 30px;
  overflow: hidden;
}

.hero-inner { max-width: 640px; margin: 0 auto; position: relative; z-index: 1; }

.hero-kicker {
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f5a524;
}

.hero-head {
  margin: 0 0 10px;
  font-size: clamp(34px, 9vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: #fff;
}

.hero-sub {
  margin: 0 0 24px;
  font-size: clamp(17px, 4.4vw, 19.5px);
  line-height: 1.45;
  color: #c3ccd7;
  max-width: 30em;
}

.trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 600;
  color: #dbe2ea;
}

.trust svg { width: 21px; height: 21px; flex: none; color: #f5a524; }

/* Caution-stripe band closing the hero. Pure CSS, prints and scales cleanly. */
.stripes {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    #f5a524 0 14px,
    #11151c 14px 28px
  );
  opacity: 0.9;
}

h1 { font-size: 27px; line-height: 1.25; margin: 8px 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 22px; margin: 22px 0 8px; }
h3 { font-size: 18px; margin: 22px 0 6px; }

.lede { font-size: 18px; color: var(--ink-soft); margin: 0 0 18px; }
.help { font-size: 15.5px; color: var(--ink-soft); margin: 0 0 10px; }
.req { color: var(--danger); font-style: normal; }

/* ---- notices ---- */

.note {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 15px;
  margin: 0 0 14px;
  font-size: 16px;
  background: var(--surface);
}
.note p { margin: 6px 0 0; }

.note-anon { border-color: var(--line-strong); }

.badge {
  display: inline-block;
  background: var(--ok-bg);
  color: var(--ok);
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.note-911 {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
  font-weight: 650;
}

.note-error {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
  font-weight: 650;
}

/* ---- form ---- */

.field {
  border: 0;
  padding: 0;
  margin: 0 0 26px;
}

.field legend {
  padding: 0;
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.input {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 56px;
}

textarea.input { line-height: 1.5; resize: vertical; min-height: 150px; }

.input::placeholder { color: var(--ink-soft); opacity: 0.75; }

.input:focus-visible,
.choice input:focus-visible + span,
.seg input:focus-visible + span,
.filebtn:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.subfield { margin-top: 12px; }

/* Big tappable category cards beat a dropdown on a jobsite. */
.choices { display: grid; gap: 10px; }

.choice { display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }

.choice span {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 12px 16px 12px 52px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 17px;
  font-weight: 600;
  position: relative;
}

.choice span::before {
  content: "";
  position: absolute;
  left: 16px;
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
}

.choice input:checked + span {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.choice input:checked + span::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--surface-2);
}

/* Three-way yes / no / not sure */
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.seg { cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }

.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 58px;
  padding: 8px 6px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 16px;
  font-weight: 650;
}

.seg input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.filebtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 62px;
  padding: 12px 16px;
  border: 2.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 16.5px;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
}

.cam { width: 26px; height: 26px; flex: none; color: var(--accent); }

.photolist {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 12px 0 0;
}

.photolist img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--line-strong);
  display: block;
}

/* Honeypot: off-screen, never announced, never tab-reachable. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.submit {
  width: 100%;
  min-height: 64px;
  font: inherit;
  font-size: 20px;
  font-weight: 750;
  color: var(--accent-ink);
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  margin-top: 6px;
}

.submit:disabled { opacity: 0.65; cursor: default; }

/* ---- confirmation ---- */

.done { text-align: center; padding: 12px 0 4px; }
.tick { width: 68px; height: 68px; color: var(--ok); }

.codecard {
  border: 3px solid var(--accent);
  border-radius: 16px;
  background: var(--surface);
  padding: 20px 18px;
  text-align: center;
  margin: 22px 0;
}

.codelabel {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}

.code {
  margin: 8px 0 12px;
  font-size: 46px;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.code-sm { font-size: 30px; margin: 4px 0 14px; }

.code-input {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 26px;
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lookup { display: grid; gap: 12px; margin-bottom: 20px; }

.actions { display: grid; gap: 10px; margin-top: 18px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  padding: 12px;
}

.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }

/* ---- status result ---- */

.result {
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
}

.kv { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0 0 8px; }
.kv dt { font-size: 14.5px; font-weight: 700; text-transform: uppercase;
         letter-spacing: 0.05em; color: var(--ink-soft); margin-top: 12px; }
.kv dd { margin: 2px 0 0; font-size: 17px; }

.pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  border: 2px solid currentColor;
}

.pill-new        { color: var(--danger); background: var(--danger-bg); }
.pill-triaged    { color: var(--accent); background: var(--surface-2); }
.pill-in_progress{ color: var(--accent); background: var(--surface-2); }
.pill-closed     { color: var(--ok); background: var(--ok-bg); }

.quote {
  margin: 8px 0 14px;
  padding: 12px 14px;
  border-left: 5px solid var(--accent);
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  white-space: pre-wrap;
  font-size: 17px;
}

/* ---- footer ---- */

.foot {
  border-top: 2px solid var(--line);
  background: var(--surface);
  padding: 24px 16px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  text-align: center;
  color: var(--ink-soft);
  font-size: 16px;
}

.foot-inner { max-width: 640px; margin: 0 auto; }
.foot p { margin: 0 0 10px; }
.foot-call { font-weight: 600; color: var(--ink); }
.foot-links a { color: var(--ink); font-weight: 650; }

.foot-brand {
  margin: 16px 0 0 !important;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
