/* The public form at observe.crce.io: the full card and the visitor card.
   Taken from the approved prototype. Keep the two in step. */

.topbar { background: #fff; border-bottom: 1px solid var(--border); padding: 12px 20px; }
.topbar-inner { max-width: 660px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-inner.wide { max-width: 1080px; }
.topbar img { height: 30px; width: auto; object-fit: contain; }
.topbar .title { font-family: 'Funnel Sans', sans-serif; font-size: 16px; font-weight: 600; color: var(--blueprint-blue); line-height: 1.2; }
.topbar .sub { font-size: 11px; color: var(--heritage-grey); }

.wrap { max-width: 660px; margin: 0 auto; padding: 16px 20px 60px; }
.flag-wrap { max-width: 660px; margin: 14px auto 0; padding: 0 20px; }
.q.pair .q { padding: 0; border-bottom: none; }
.loading { text-align: center; padding: 60px 0; font-size: 13px; color: var(--heritage-grey); }
.spinner { width: 28px; height: 28px; border: 2px solid var(--hero-red); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 12px; }
.spinner.sm { width: 14px; height: 14px; margin: 0; border-color: #fff; border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.send-error { border: 1px solid var(--border); border-left: 3px solid var(--readable-red); border-radius: 8px; background: #fff; padding: 12px 14px; font-size: 12.5px; font-weight: 600; color: var(--readable-red); margin-bottom: 12px; }
.select-trigger .chev { display: flex; }
.select-trigger .chev svg, .select-opt svg { width: 14px; height: 14px; }
.select-opt svg { color: var(--readable-red); }
.tile, .kind, .btn.lg, .select-trigger, .fld { min-height: 44px; }
.lang-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.lang-row .caps { margin-right: 4px; }

/* Prefilled facility, with a way to change it */
.prefill {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--page-bg); padding: 10px 12px;
}
.prefill .name { font-weight: 600; color: var(--blueprint-blue); }
.prefill .from { display: block; font-size: 11px; color: var(--heritage-grey); font-weight: 400; }

/* Hazard or good practice: two large tiles */
.kind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kind {
  position: relative; text-align: left; cursor: pointer;
  font-family: 'Montserrat', sans-serif; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; padding: 16px 16px 14px;
  transition: all 0.15s ease;
}
.kind:hover { border-color: var(--heritage-grey); }
.kind .k-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.kind .k-icon svg { width: 19px; height: 19px; }
.kind.good .k-icon { background: rgba(31, 154, 58, 0.08); color: var(--galvanizing-green); }
.kind.haz .k-icon { background: rgba(235, 28, 55, 0.06); color: var(--hero-red); }
.kind .k-name { display: block; font-family: 'Funnel Sans', sans-serif; font-size: 15px; font-weight: 600; color: var(--blueprint-blue); }
.kind .k-hint { display: block; font-size: 11.5px; color: var(--heritage-grey); line-height: 1.5; margin-top: 3px; }
.kind.on.good { border-color: var(--galvanizing-green); box-shadow: 0 0 0 2px rgba(31, 154, 58, 0.15); }
.kind.on.haz { border-color: var(--hero-red); box-shadow: 0 0 0 2px rgba(235, 28, 55, 0.12); }

/* One tap option tiles */
.tilegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tilegrid.two { grid-template-columns: 1fr 1fr; }
.tile {
  font-family: 'Montserrat', sans-serif; font-size: 13px; text-align: center;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 13px 10px; cursor: pointer; color: var(--text-grey); transition: all 0.12s ease;
}
.tile .hint { display: block; font-size: 11px; color: var(--heritage-grey); margin-top: 2px; }
.tile:hover { background: var(--page-bg); border-color: var(--heritage-grey); }
/* No bold when chosen: bolder text is wider, wraps differently and changes the tile's size. */
.tile.on { background: var(--hero-red-10); border-color: var(--hero-red-20); color: var(--readable-red); }
.tile.on .hint { color: var(--readable-red); font-weight: 400; }

/* Photo and voice */
.upload {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px dashed #C0C5CE; border-radius: 8px; padding: 12px 14px; background: #fff;
}
.upload input { display: none; }
.upload .fname { font-size: 11.5px; color: var(--heritage-grey); }
.voice-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.mic.on { background: var(--hero-red); border-color: var(--hero-red); color: #fff; }
.voice-status { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--heritage-grey); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--hero-red); animation: vpulse 1.1s ease-in-out infinite; }
@keyframes vpulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

.privacy { font-size: 11px; color: var(--heritage-grey); margin-top: 8px; }

.actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 4px 4px 0; }
.actions .note { font-size: 11.5px; color: var(--heritage-grey); }

/* Thank you, paused and invalid code screens share one shape */
.state-card {
  background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--galvanizing-green);
  border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); padding: 40px 32px; text-align: center;
}
.state-card.warn { border-top-color: var(--thin-yellow); }
.state-card.no { border-top-color: var(--readable-red); }
.state-icon {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(31, 154, 58, 0.08); color: var(--galvanizing-green);
}
.state-card.warn .state-icon { background: rgba(230, 161, 0, 0.08); color: #B38600; }
.state-card.no .state-icon { background: rgba(196, 0, 31, 0.06); color: var(--readable-red); }
.state-icon svg { width: 26px; height: 26px; }
.state-card h2 { font-family: 'Funnel Sans', sans-serif; font-size: 22px; font-weight: 600; color: var(--blueprint-blue); margin: 0 0 8px; }
.state-card p { font-size: 13px; margin: 0 auto 22px; max-width: 44ch; }
.kiosk-timer { font-size: 12px; color: var(--heritage-grey); }

.pagefoot { max-width: 660px; margin: 0 auto; padding: 0 20px 40px; font-size: 11px; color: var(--heritage-grey); text-align: center; }

/* ---------- Visitor tablet ---------- */
body.kiosk .wrap, body.kiosk .flag-wrap, body.kiosk .topbar-inner { max-width: 720px; }
.kiosk-intro { padding: 22px 0 4px; }
.kiosk-intro h2 { font-family: 'Funnel Sans', sans-serif; font-size: 22px; font-weight: 600; color: var(--blueprint-blue); margin: 0 0 8px; line-height: 1.25; }
.kiosk-intro p { font-size: 13.5px; margin: 0; }
body.kiosk .q-label { font-size: 15px; }
body.kiosk .fld { font-size: 15px; padding: 14px 16px; }
body.kiosk textarea.fld { min-height: 120px; }
body.kiosk .tile { font-size: 14px; padding: 16px 12px; }
/* Nine areas read best three across on a tablet. A phone keeps two. */
@media (min-width: 600px) { body.kiosk .tilegrid.two { grid-template-columns: repeat(3, 1fr); } }

@media (max-width: 520px) {
  .card { padding: 4px 16px 8px; }
  .topbar img { height: 26px; }
  .tilegrid { grid-template-columns: 1fr 1fr; }
  .tilegrid.keep { grid-template-columns: repeat(3, 1fr); }
  .two-up { grid-template-columns: 1fr; }
  .state-card { padding: 32px 20px; }
}
.q.pair .two-up { align-items: end; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.upload-pick { cursor: pointer; display: inline-flex; }
.upload .fname { display: inline-flex; align-items: center; gap: 8px; }
.spinner.sm.dark { border-color: var(--hero-red); border-top-color: transparent; }
.photo-error { font-size: 11.5px; font-weight: 600; color: var(--readable-red); margin-top: 7px; }
