:root {
  --ink: #172725;
  --muted: #65716b;
  --line: #dce2dc;
  --green: #25634c;
  --error: #a12d28;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #f5f6f3;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, input, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #75a18a; outline-offset: 3px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.page { width: min(100%, 624px); margin: 36px auto; padding: 28px 32px; background: white; border: 1px solid var(--line); border-radius: 10px; }
h1 { font-size: 25px; font-weight: 600; letter-spacing: -.6px; margin: 0 0 28px; }
.finding-form { display: flex; flex-direction: column; gap: 24px; }
.field { width: 100%; min-width: 0; }
.field label, .field h2 { font-size: 14px; font-weight: 600; display: block; margin: 0 0 9px; }
.required { color: var(--green); }
.field input, .field select { width: 100%; min-width: 0; min-height: 48px; padding: 11px 12px; border: 1px solid #cfd7cf; border-radius: 6px; background: white; color: var(--ink); font-size: 16px; color-scheme: light; }
.field input::placeholder { color: #7b857e; }
.field select { cursor: pointer; padding-right: 28px; }
.field input:focus, .field select:focus { outline: 2px solid #a4c1a6; outline-offset: 1px; border-color: #679977; }
.field input:user-invalid, .field select:user-invalid { border-color: var(--error); }
.field small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 7px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.label-row label, .label-row h2 { margin: 0; }
.lookup { position: relative; }
.lookup input { padding-right: 48px; }
.lookup-toggle { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--muted); }
.lookup-toggle:hover { color: var(--green); background: #f0f4ed; }
.lookup-options { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 10; max-height: 230px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; margin: 0; padding: 4px; list-style: none; border: 1px solid var(--line); border-radius: 6px; background: white; box-shadow: 0 5px 16px #17272518; }
.lookup-options [role="option"] { min-height: 44px; padding: 12px; font-size: 14px; border-radius: 4px; cursor: pointer; overflow-wrap: anywhere; }
.lookup-options [role="option"]:hover, .lookup-options [aria-selected="true"] { background: #eaf2e4; color: var(--green); }
.lookup-empty { padding: 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.optional { font-size: 12px; font-weight: 400; color: var(--muted); }
#photo-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dropzone { border: 1px dashed #c5d2c2; border-radius: 6px; padding: 18px; background: #fafcf8; }
.dropzone.is-dragging { background: #edf5e5; border-color: var(--green); }
.photo-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dropzone small { margin-top: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 6px; min-height: 46px; padding: 11px 15px; font-size: 14px; font-weight: 600; }
.button-outline { background: white; border-color: #cfd7cf; color: var(--ink); }
.button-outline:hover { background: #f0f4ed; border-color: #a8b79f; }
.button-primary { background: var(--green); color: white; }
.button-primary:hover { background: #194f3b; }
.submit-button { width: 100%; margin-top: 2px; }
.demo-disclaimer { font-size: 12px; line-height: 1.6; color: var(--muted); text-align: center; margin: -12px 0 0; }
.attachments-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 12px; color: var(--muted); }
.attachments-heading h3 { font-size: 12px; font-weight: 600; color: var(--ink); margin: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photo-tile { position: relative; min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #f7f8f3; }
.photo-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-tile figcaption { padding: 9px; font-size: 11px; }
.photo-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-meta { display: flex; justify-content: space-between; gap: 4px; color: var(--muted); font-size: 10px; margin-top: 5px; }
.photo-source { color: var(--green); }
.remove-photo { position: absolute; right: 5px; top: 5px; border: 0; border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; background: white; color: var(--ink); box-shadow: 0 2px 8px #0002; }
.remove-photo:hover { background: #ffe9e5; color: var(--error); }
.error-message { font-size: 13px; color: var(--error); background: #fff1ed; border: 1px solid #f3d3cb; border-radius: 6px; padding: 12px; line-height: 1.6; white-space: pre-line; }
.modal { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); border: 1px solid var(--line); border-radius: 10px; padding: 22px; color: var(--ink); background: white; box-shadow: 0 20px 60px #17272540; }
.modal::backdrop { background: #10231dbb; }
.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-heading h2 { font-size: 20px; font-weight: 600; margin: 0; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--ink); flex-shrink: 0; }
.icon-button:hover { background: #f0f4ed; }
.viewfinder { position: relative; background: var(--ink); border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.viewfinder video, .viewfinder img { width: 100%; height: 100%; object-fit: contain; position: absolute; }
.camera-loading { color: #d2dec8; font-size: 13px; text-align: center; padding: 20px; z-index: 1; }
.modal-caption, .submission-modal p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.camera-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-footnote { font-size: 12px; line-height: 1.6; color: var(--muted); margin-bottom: 0; }
.submission-modal { max-width: 450px; }
.submission-modal .inline-note { padding: 12px; background: #f0f5eb; border-radius: 6px; color: var(--green); }
.submission-modal > .button { width: 100%; margin-top: 12px; }
@media (max-width: 640px) {
  .page { margin: 0; border: 0; border-radius: 0; padding: 24px 18px; min-height: 100dvh; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-actions > .button { flex: 1; }
  .modal { padding: 18px; }
  .viewfinder { aspect-ratio: 3 / 4; max-height: 44dvh; }
  .camera-controls .button { flex: 1; }
  #native-camera-button { flex-basis: 100%; order: 3; }
}
@media (max-width: 360px) {
  .photo-actions { flex-direction: column; }
}
.site-nav { max-width: 1150px; padding: 16px 18px; margin: 0 auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.site-nav a, .pagination a { color: var(--green); }
.signed-in { margin-left: auto; color: var(--muted); }
.wide-page { width: min(100%, 1150px); }
.validation-errors { color: var(--error); font-size: 14px; line-height: 1.7; }
.validation-summary-valid { display: none; }
.filter-form { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.filter-form .field { width: 220px; }
.table-scroll { width: 100%; overflow-x: auto; margin: 20px 0; }
.findings-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.findings-table th, .findings-table td { border-bottom: 1px solid var(--line); padding: 12px 10px; vertical-align: top; }
.findings-table th { background: #f0f5eb; }
.pagination { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.details-list { display: grid; grid-template-columns: 160px 1fr; gap: 12px; font-size: 14px; }
.details-list dt { color: var(--muted); }
.details-list dd { margin: 0; overflow-wrap: anywhere; }
.success-message { color: var(--green); background: #edf5e7; padding: 12px; border-radius: 6px; }
.saved-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.saved-photos figure { margin: 0; min-width: 0; }
.saved-photos img { width: 100%; border-radius: 6px; }
.saved-photos figcaption { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.7; margin-top: 8px; }
@media (max-width: 640px) {
  .filter-form .field { width: 100%; }
  .details-list { grid-template-columns: 1fr; gap: 6px; }
  .details-list dd { margin-bottom: 12px; }
  .saved-photos { grid-template-columns: 1fr; }
}
