/* Stonewise's calm surfaces and controls, with AgAR's own field identity. */
:root {
  --forest:#173f2c; --deep:#102d20; --lime:#e0efce;
  --paper:#f6f5f1; --surface:#fff; --ink:#28352b; --muted:#667066;
  --line:#e1e4db; --input-line:#7d8d79; --soft:#edf2e9;
  --warn:#795017; --warn-surface:#f9efda; --error:#a03930; --error-surface:#faebe7;
  --focus:#387747; --radius:16px; --tray:#f6f5f1f5;
  color-scheme:light; font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
:root[data-theme="dark"] {
  --forest:#c4e3b9; --deep:#d2ecc8; --lime:#1c3224;
  --paper:#1c211d; --surface:#252c26; --ink:#e2e7dc; --muted:#abb5a9;
  --line:#3c463c; --input-line:#84927f; --soft:#2d392d;
  --warn:#ecc887; --warn-surface:#3b3426; --error:#ffb8ac; --error-surface:#422c29;
  --focus:#c4e3b9; --tray:#1c211df5; color-scheme:dark;
}
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--paper); font-size:17px; line-height:1.5; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; touch-action:manipulation; }
button:disabled { cursor:wait; opacity:.6; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
a { color:var(--forest); text-underline-offset:3px; }
h1,h2,h3,p { margin:0; }
h1,h2 { font-family:ui-serif,"New York","Iowan Old Style",Georgia,serif; font-weight:500; letter-spacing:-.025em; line-height:1.14; }
h3 { font-size:18px; font-weight:650; line-height:1.3; }
[hidden] { display:none!important; }
.skip-link { position:fixed; top:-100px; left:12px; z-index:10; padding:12px; color:var(--ink); background:var(--surface); }
.skip-link:focus { top:12px; }
.masthead { padding:16px max(24px,calc((100vw - 880px)/2)); display:flex; gap:12px; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:9px; text-decoration:none; font-size:25px; font-weight:750; letter-spacing:-.04em; }
.brand img { border-radius:9px; }
.brand span { font-size:12px; font-weight:500; letter-spacing:0; color:var(--muted); margin-left:5px; }
.masthead-tools { display:flex; align-items:center; gap:20px; }
.network { font-size:10px; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); }
.network.offline { color:var(--warn); }
.theme-control { font-size:10px; color:var(--muted); display:flex; align-items:center; gap:8px; }
.theme-control select { color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:999px; min-height:44px; padding:8px 10px; font-size:12px; max-width:98px; }
.workspace { max-width:780px; margin:auto; padding:0 24px 140px; }
.intro { padding:30px 0 26px; }
.eyebrow { font-size:10px; font-weight:650; letter-spacing:.1em; color:var(--muted); }
.intro .eyebrow { display:flex; gap:8px; align-items:center; }
.signal-dot { width:6px; height:6px; border-radius:50%; background:var(--forest); }
.intro h1 { font-size:38px; margin:10px 0 9px; }
.intro>p:not(.eyebrow) { font-size:16px; color:var(--muted); }
.intro .build-boundary { font-size:12px!important; margin-top:9px; max-width:570px; }
.farm-overview { padding:20px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.farm-overview h2 { margin:6px 0 12px; font-size:25px; }
.farm-overview[data-empty="true"] { padding:14px 17px; }
.farm-overview[data-empty="true"]>.eyebrow { display:none; }
.farm-overview[data-empty="true"] h2 { font-size:19px; margin:0 0 6px; }
.empty-state { color:var(--muted); font-size:14px; max-width:500px; }
.farm-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:18px 0; }
.farm-metrics>div { padding-left:12px; border-left:2px solid var(--forest); }
.metric-label { display:block; color:var(--muted); font-size:12px; margin-bottom:6px; }
.farm-metrics strong { font-size:18px; font-weight:600; display:block; line-height:1.4; }
#farm-detail { font-size:13px; }
#farm-detail>p { color:var(--muted); }
#farm-detail summary { padding:10px 0; }
#farm-detail details>p { margin:8px 0; }
.farm-overview p,.operation-section li { overflow-wrap:anywhere; }
.resume-bar { display:flex; align-items:end; gap:8px; padding:22px 0 8px; flex-wrap:wrap; }
.resume-field { min-width:0; flex:1; }
.resume-field label { display:block; font-size:12px; font-weight:600; margin-bottom:7px; }
.resume-field select { min-height:44px; padding:9px 30px 9px 12px; background:var(--surface); border:1px solid var(--input-line); border-radius:12px; color:var(--ink); font-size:14px; width:100%; }
.storage-note { font-size:12px; color:var(--muted); margin:4px 0 22px; }
#appearance-status { display:block; margin-top:6px; color:var(--warn); }
.quiet-button { min-height:44px; background:transparent; border:1px solid var(--line); border-radius:999px; padding:10px 15px; font-size:13px; font-weight:600; color:var(--ink); white-space:nowrap; }
.quiet-button:hover { background:var(--soft); }
.notice { border:1px solid var(--input-line); background:var(--soft); padding:14px 16px; border-radius:12px; font-size:14px; margin:0 0 18px; overflow-wrap:anywhere; }
.notice.error { background:var(--error-surface); border-color:var(--error); color:var(--error); }
.steps { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; padding:4px; margin:0 0 18px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.steps button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; border:2px solid transparent; border-radius:12px; background:transparent; padding:10px 3px; min-height:65px; color:var(--muted); font-size:12px; font-weight:600; }
.steps svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.steps button[aria-current=step] { background:var(--soft); color:var(--forest); border-color:var(--forest); }
.steps button:hover:not([aria-current]) { background:var(--paper); }
.panel { padding:28px; border:1px solid var(--line); background:var(--surface); border-radius:var(--radius); }
.section-heading { margin-bottom:24px; }
.section-heading h2 { font-size:30px; margin:9px 0 12px; }
.section-heading>p:last-child { color:var(--muted); font-size:14px; max-width:560px; }
.field { margin-bottom:20px; min-width:0; }
.field label { display:block; font-size:14px; font-weight:600; margin-bottom:7px; }
.field label span { font-weight:400; color:var(--muted); font-size:12px; }
.field input,.field select,.field textarea { display:block; width:100%; min-height:48px; border:1px solid var(--input-line); border-radius:12px; background:var(--surface); color:var(--ink); padding:12px; font-size:17px; line-height:1.45; }
.field textarea { resize:vertical; }
.field input::placeholder,.field textarea::placeholder { color:var(--muted); opacity:1; font-size:14px; }
.field-hint { color:var(--muted); font-size:12px; margin-top:8px; line-height:1.55; }
.field-row { display:grid; grid-template-columns:1fr 1.3fr; gap:14px; }
.task-picker { padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:var(--paper); margin-bottom:24px; }
summary { cursor:pointer; min-height:44px; align-content:center; font-size:14px; font-weight:600; }
.task-picker[open]>.field-hint { margin-bottom:18px; }
.task-picker .field-row { margin-top:18px; }
.task-picker .field { margin-bottom:12px; }
.task-review { padding:18px; margin-bottom:22px; border:1px solid var(--input-line); border-radius:12px; background:var(--soft); }
.task-review h3 { margin:8px 0 12px; }
.task-review>p:not(.eyebrow),.task-review ul { font-size:13px; }
.task-review ul { padding-left:19px; margin:14px 0; }
.task-review li+li { margin-top:10px; }
.task-review .quiet-button { margin-top:15px; white-space:normal; }
.note-button { margin-top:8px; }
.notes-list { padding:0; list-style:none; margin:0 0 24px; display:grid; gap:8px; }
.notes-list li { border-left:2px solid var(--forest); padding:10px 13px; background:var(--soft); white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; }
.minor-heading { display:flex; align-items:center; gap:12px; justify-content:space-between; }
.minor-heading>span { color:var(--muted); font-size:12px; flex-shrink:0; }
.evidence-section { padding-top:23px; border-top:1px solid var(--line); }
.capture-buttons { display:flex; flex-wrap:wrap; gap:8px; margin:17px 0; }
.secondary-button,.primary-button,.save-button { border-radius:999px; min-height:48px; padding:12px 18px; font-size:14px; font-weight:600; line-height:1.4; }
.secondary-button { background:var(--soft); border:1px solid var(--line); color:var(--forest); }
.secondary-button:hover { border-color:var(--forest); }
.primary-button { background:var(--forest); border:1px solid var(--forest); color:var(--lime); }
.primary-button:hover { background:var(--deep); }
.recording-status { color:var(--error); padding:10px 12px; background:var(--error-surface); border-radius:9px; font-size:14px; }
.evidence-list { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.evidence-card { min-width:0; padding:10px; background:var(--paper); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.evidence-card img { width:100%; height:135px; object-fit:cover; border-radius:8px; background:var(--soft); }
.evidence-card audio { display:block; width:100%; max-width:100%; margin:10px 0; }
.evidence-card p { font-size:12px; overflow-wrap:anywhere; margin:8px 0; }
.evidence-card .quiet-button { min-height:44px; padding:8px 12px; font-size:12px; white-space:normal; }
.evidence-card .missing-evidence { color:var(--warn); }
.assessment { margin:21px 0; padding:18px; border:1px solid var(--input-line); border-radius:12px; background:var(--soft); }
.result-label { font-size:10px; font-weight:650; letter-spacing:.07em; text-transform:uppercase; margin-bottom:6px; }
.assessment h3 { font-size:20px; }
.assessment ul { padding-left:19px; margin:12px 0 0; font-size:14px; }
.assessment li+li { margin-top:7px; }
.source-list { display:grid; gap:12px; margin-top:17px; }
.source-group-title { font-size:18px; margin:15px 0 0; }
.source-card { border:1px solid var(--line); border-radius:12px; padding:18px; background:var(--surface); }
.source-card.selected { border:2px solid var(--forest); padding:17px; }
.source-card .source-type { font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); margin-bottom:7px; }
.source-card h3 { font-size:18px; margin-bottom:11px; }
.source-card p { font-size:13px; color:var(--muted); margin-bottom:9px; overflow-wrap:anywhere; }
.source-card .source-purpose { border-left:2px solid var(--forest); padding-left:10px; }
.source-card .source-match { display:inline-block; padding:5px 9px; border-radius:7px; background:var(--soft); font-size:11px; color:var(--forest); margin:0 0 12px; }
.source-card.background .source-match { color:var(--warn); background:var(--warn-surface); }
.source-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:16px; }
.source-actions>a { font-size:13px; font-weight:600; min-height:44px; display:flex; align-items:center; max-width:100%; overflow-wrap:anywhere; }
.source-boundary { font-size:12px; color:var(--muted); border-top:1px solid var(--line); padding-top:18px; margin-top:25px; }
.preview-label { display:block; font-size:14px; font-weight:600; margin:22px 0 8px; }
.handoff-preview { resize:vertical; min-height:280px; background:var(--paper); border:1px solid var(--input-line); border-radius:12px; padding:16px; width:100%; font:14px/1.6 system-ui,sans-serif; color:var(--ink); }
.export-buttons { display:flex; flex-wrap:wrap; gap:8px; margin:15px 0 25px; }
.attachments-title { margin-bottom:8px; }
.evidence-export { display:grid; gap:8px; margin-top:15px; }
.evidence-export button { width:100%; text-align:left; overflow-wrap:anywhere; }
.operation-section { margin:18px 0; border-top:1px solid var(--line); padding-top:6px; }
.operation-section summary { padding:12px 0; }
.operation-section form { padding:16px 0; border-bottom:1px solid var(--line); }
.operation-status { padding:16px; background:var(--soft); font-weight:600; border-radius:12px; }
#operations-next { font-size:14px; margin-top:12px; }
#discard-operation-drafts { margin:12px 0; white-space:normal; }
.check-label { display:flex; gap:10px; align-items:flex-start; font-size:14px; }
.check-label input { width:20px; height:20px; min-width:20px; margin-top:2px; accent-color:var(--forest); }
#operations-ledger { padding-left:20px; }
#operations-ledger li { margin-bottom:12px; font-size:13px; }
.operation-section input,.operation-section select { max-width:100%; }
.workspace-footer { color:var(--muted); font-size:12px; padding:24px 4px; }
.workspace-footer p+p { margin-top:8px; }
.action-tray { position:fixed; bottom:0; left:0; right:0; z-index:5; background:var(--tray); border-top:1px solid var(--line); backdrop-filter:blur(12px); padding:12px 24px calc(12px + env(safe-area-inset-bottom)); }
.action-inner { max-width:724px; margin:auto; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.save-group { min-width:0; display:flex; flex-direction:column; gap:4px; }
.save-button { background:var(--surface); color:var(--ink); border:1px solid var(--input-line); min-height:44px; padding:10px 14px; font-size:13px; white-space:nowrap; }
.save-group>span { font-size:11px; color:var(--muted); padding-left:3px; }
.next-button { min-width:150px; }
.next-button span { margin-left:5px; }
@media(min-width:900px) { .intro { padding-top:38px; } .steps button { flex-direction:row; gap:9px; min-height:54px; font-size:13px; } .evidence-list { grid-template-columns:repeat(3,1fr); } }
@media(max-width:540px) {
  .masthead { padding:12px 16px; } .brand { font-size:23px; } .brand span { display:none; }
  .masthead-tools { gap:12px; } .theme-control { font-size:0; gap:0; } .theme-control select { font-size:12px; }
  .workspace { padding:0 16px 145px; } .intro { padding:24px 2px 22px; } .intro h1 { font-size:31px; }
  .farm-overview { padding:17px; } .farm-overview h2 { font-size:24px; }
  .farm-metrics { grid-template-columns:1fr; gap:16px; }
  .resume-field { flex-basis:100%; } .resume-bar { gap:9px; padding-top:20px; }
  .panel { padding:22px 18px; } .section-heading h2 { font-size:28px; }
  .steps button { font-size:11px; padding:10px 2px; } .steps svg { width:20px; height:20px; }
  .field-row { gap:10px; } .capture-buttons .secondary-button { flex-grow:1; flex-basis:calc(50% - 8px); }
  .capture-buttons .secondary-button:last-child { flex-basis:100%; }
  .action-tray { padding-left:16px; padding-right:16px; } .action-inner { gap:8px; }
  .next-button { min-width:0; padding:12px 13px; font-size:12px; } .save-button { font-size:12px; padding:10px 11px; }
  .evidence-card img { height:110px; } .export-buttons>* { flex:1 1 100%; } .source-card { padding:15px; }
  .source-card.selected { padding:14px; }
}
@media(max-width:350px) { .network { max-width:72px; font-size:9px; } .action-inner { align-items:stretch; } .save-button { max-width:144px; white-space:normal; } .next-button { max-width:132px; } }
@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; } }

/* A deliberate fictional workspace, separate from real local incident totals. */
.demo-entry {margin:0 0 24px;font-size:14px;line-height:1.6;}
.demo-entry span {display:block;color:var(--muted);}
.demo-workspace {background:var(--surface);border:2px solid var(--forest);border-radius:16px;padding:24px;margin:0 0 24px;}
.demo-workspace h2 {margin:0 0 12px;font-size:25px;}
.demo-workspace p {line-height:1.5;}
.demo-workspace button {white-space:normal;}

/* Capture is the task entry; record administration stays available below it. */
.camera-workspace {padding:22px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);margin:0 0 22px;}
.camera-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px;}
.camera-heading h2 {font-size:26px;}
.camera-demo-label {font-size:10px;font-weight:700;color:var(--warn);}
.camera-entry-actions,.live-camera-actions {display:flex;flex-wrap:wrap;gap:9px;}
.camera-entry-actions>* {flex:1;min-width:0;}
.live-camera-actions:has(button:not([hidden])) {margin-top:12px;}
.live-camera-region {position:relative;margin-top:17px;border-radius:12px;overflow:hidden;background:#101610;}
.live-camera-region video {display:block;width:100%;height:auto;min-height:160px;max-height:360px;object-fit:contain;}
.camera-live-label {position:absolute;top:12px;left:12px;background:#173f2ce8;color:#fff;border-radius:999px;padding:6px 12px;font-size:12px;}
.camera-photo-figure {margin:17px 0 0;}
.camera-photo-figure img {display:block;width:100%;max-height:320px;object-fit:contain;background:var(--paper);border-radius:12px;}
.camera-photo-figure figcaption {margin-top:7px;color:var(--muted);font-size:12px;overflow-wrap:anywhere;}
.camera-status {margin-top:12px;font-size:13px;color:var(--forest);}
.camera-identification-status {margin:7px 0 12px;font-size:13px;color:var(--muted);}
.camera-purpose {margin:17px 0 0;}
.photo-context-details {border-top:1px solid var(--line);margin-top:16px;padding-top:3px;}
.photo-context-details>.field {margin-top:12px;}
.photo-context-details .field {margin-bottom:14px;}
.camera-attachments {margin-top:18px;border-top:1px solid var(--line);}
.camera-attachments summary {display:flex;justify-content:space-between;gap:12px;}
.camera-attachments .evidence-list {margin-top:12px;}
.camera-storage-note {margin-top:14px;font-size:12px;color:var(--muted);}
.workspace-records {margin-top:22px;border-top:1px solid var(--line);padding-top:6px;}
.workspace-records>summary {margin-bottom:12px;}
.voice-note {padding-top:16px;border-top:1px solid var(--line);}
@media(max-width:540px) {
 .intro {padding:20px 2px 17px;}
 .camera-workspace {padding:18px;}
 .camera-heading h2 {font-size:24px;}
 .camera-entry-actions>* {padding:12px 10px;font-size:14px;}
 .camera-heading {flex-wrap:wrap;}
}

.visual-assistance { margin-block: 1rem; padding: 1rem; border: 1px solid var(--border, #758b8140); border-radius: 14px; }
.visual-assistance:has(select[hidden]):not(:has(#use-vision-card)) { display: none; }
.visual-assistance h3 { margin: .5rem 0; }
.visual-assistance p { overflow-wrap: anywhere; }
.visual-assistance select, .visual-assistance input:not([type=checkbox]) { width: 100%; min-height: 44px; margin-block: .5rem; }
.visual-assistance label { display: block; margin-block: .7rem; }
.visual-assistance button { margin: .4rem .4rem .4rem 0; }
.guidance-figure { width: 100%; height: auto; border-radius: 12px; }

.visual-assistance select, .visual-assistance input:not([type=checkbox]) { border: 1px solid var(--input-line); border-radius: 12px; background: var(--surface); color: var(--ink); padding: 12px; font-size: 17px; line-height: 1.45; }
.visual-assistance .quiet-button { white-space: normal; }
