/* FieldProof styles. Phone-first, high contrast for outdoor light, square-cut chrome.
   @author Thomas G. and Sophia, SOPHIA XT LLC (sophiaxt.com) */
   @sophia-mark sx1 df5ae605af70 d367fa545af3 eLdGpDCMyhG6XGKsFyJjKf9C1eyyCwSCQlgk7p-Bl1XDYylUGXinDCtWutnqQ9BC-G6siripSfhipEvmTE8_BA

/* fonts: self-hosted, same families as the marketing site */
@font-face { font-family: "Unbounded"; font-weight: 200 900; font-display: swap; src: url(/app/fonts/unbounded.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url(/app/fonts/instrument-400.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url(/app/fonts/instrument-600.woff2) format("woff2"); }
@font-face { font-family: "Azeret Mono"; font-weight: 500; font-display: swap; src: url(/app/fonts/azeret-500.woff2) format("woff2"); }

/* tokens: the site's genome palette, set dark for the phone */
:root {
  --bg: #05080d; --panel: #0e1724; --line: #1f2c3b; --ink: #e1e9ee; --dim: #9aa6ad;
  --accent: #ff7a1a; --ok: #5fd38a; --bad: #f2837b; --warn: #f0c053;
  --mono: "Azeret Mono", ui-monospace, Consolas, monospace;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", system-ui, sans-serif;
  --cut: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--sans); }
body { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; outline: none; }
a { color: var(--accent); }
h1 { font: 700 1.55rem/1.15 var(--display); margin: 8px 0 4px; letter-spacing: -.03em; }
h2 { font: 500 .75rem var(--mono); margin: 28px 0 10px; color: var(--accent); text-transform: uppercase; letter-spacing: .14em; }
p { margin: 6px 0; }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); }

/* top bar */
.bar { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; align-items: center; padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top)); background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 600 1.02rem var(--display); letter-spacing: -.02em; margin-right: auto; }
.mark { width: 22px; height: 22px; display: block; }
.foot a { color: var(--dim); }
.foot { text-align: center; color: var(--dim); font: 11px var(--mono); letter-spacing: .1em; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); }

/* tags: square status chips */
.tag { font: 12px var(--mono); padding: 3px 8px; border: 1px solid var(--line); color: var(--dim); text-decoration: none; border-radius: 2px; }
.tag.on { color: var(--ok); border-color: #1f5a3a; }
.tag.off, .tag.bad { color: var(--bad); border-color: #6b2a2a; }
.tag.warn { color: var(--warn); border-color: #6b5320; }
.tag.link { color: var(--ink); }

/* panels and lists */
.card { background: var(--panel); border: 1px solid var(--line); padding: 14px; margin: 10px 0; clip-path: var(--cut); }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list a.card { display: block; color: var(--ink); text-decoration: none; }
.list a.card:active { border-color: var(--accent); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* forms */
label { display: block; font-size: 13px; color: var(--dim); margin: 12px 0 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #0e1626; border: 1px solid var(--line);
  padding: 11px 12px; border-radius: 2px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* buttons: big targets for gloved hands */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px;
  font: 600 15px var(--sans); color: #140b06; background: var(--accent); border: 0; border-radius: 2px; cursor: pointer;
  text-decoration: none; clip-path: var(--cut); }
.btn.ghost { background: transparent; color: var(--ink); outline: 1px solid var(--line); outline-offset: -1px; }
.btn.danger { background: var(--bad); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* capture screen */
.cap { position: fixed; inset: 0; z-index: 10; background: #000; display: flex; flex-direction: column; }
.cap video { flex: 1; width: 100%; object-fit: cover; min-height: 0; background: #000; }
.cap .hud { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); background: linear-gradient(#000a, #0000); }
.cap .rec { font: 600 18px var(--mono); }
.cap .rec.live::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--bad); margin-right: 8px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cap .strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; background: #000; min-height: 72px; }
.cap .strip img { height: 56px; width: 56px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.cap .controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 16px;
  padding-bottom: max(14px, env(safe-area-inset-bottom)); background: #000; }
.shutter { width: 76px; height: 76px; border-radius: 50%; border: 4px solid var(--ink); background: transparent; padding: 6px; cursor: pointer; }
.shutter::after { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--ink); }
.shutter:active::after { background: var(--accent); }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .25s; }
.flash.go { opacity: .5; transition: none; }
.caption { position: absolute; left: 12px; right: 12px; bottom: 170px; font-size: 15px; text-shadow: 0 1px 3px #000; color: var(--ink); }

/* job list thumbnails and the empty state */
.thumb { width: 56px; height: 56px; object-fit: cover; flex: none; border: 1px solid var(--line); background: #0e0c0a; }
.thumb.empty { display: block; background: repeating-linear-gradient(45deg, #1f1b17 0 6px, #171411 6px 12px); }
.empty-state img { display: block; width: 100%; height: 180px; object-fit: cover; border: 1px solid var(--line); margin: 12px 0; }

/* report */
.score .num.small { font-size: 28px; }
.blank { flex: 1; background: #000; }
.bad-ink { color: var(--bad); }
.score { display: flex; align-items: baseline; gap: 12px; }
.score .num { font: 700 56px/1 var(--display); letter-spacing: -.04em; }
.score .num.good { color: var(--ok); } .score .num.mid { color: var(--warn); } .score .num.low { color: var(--bad); }
.bars { font: 13px var(--mono); color: var(--dim); }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; }
.mk { font: 700 14px var(--mono); text-align: center; padding-top: 2px; }
.mk.met { color: var(--ok); } .mk.missed { color: var(--bad); } .mk.no_evidence { color: var(--warn); }
.photo { display: grid; grid-template-columns: 1fr; gap: 10px; }
.photo img { width: 100%; height: 220px; object-fit: cover; border: 1px solid var(--line); background: #0e1626; }
@media (min-width: 620px) { .photo { grid-template-columns: 240px 1fr; } .photo img { height: 180px; } }
.said { font-style: italic; color: var(--dim); }
ul.bul { margin: 4px 0; padding-left: 18px; }
.progress { height: 4px; background: var(--line); overflow: hidden; margin-top: 10px; }
.progress::after { content: ""; display: block; height: 100%; width: 30%; background: var(--accent); animation: slide 1.4s linear infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--accent);
  padding: 10px 16px; z-index: 20; font-size: 14px; max-width: 90vw; }

@media print {
  .bar, .foot, .actions, .noprint { display: none !important; }
  html, body { background: #fff; color: #000; }
  .card { background: #fff; border-color: #bbb; clip-path: none; }
  .dim, .said, h2 { color: #444; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Demo mode banner (only /demo/ renders it). */
.demo-bar { background: #ef761c; color: #140b06; font: 600 13px/1.35 var(--sans, system-ui); padding: 8px 16px; text-align: center; }
.demo-bar a { color: #140b06; font-weight: 700; margin-left: 6px; }
