/* Evidence panel: photographs first, crops drawn on originals, records one tap away. */
.ev { --ev-accent: #c8641e; --ev-accent-soft: #f6e3d2; --ev-ink: #24302b; --ev-muted: #6b756f; --ev-line: #d9ddd4; --ev-card: #ffffff; }
.ev-header { display: block; position: sticky; top: 0; z-index: 2; background: #faf9f5; padding-bottom: 6px; }
.ev-header h2 { display: block; font-size: 22px; font-weight: 600; line-height: 1.15; margin: 0; padding-right: 36px; letter-spacing: -.2px; }
.ev-status { margin: 4px 0 10px; font-size: 12px; line-height: 1.45; color: var(--ev-muted); }
.ev-toolbar { display: flex; flex-direction: column; gap: 8px; }
.ev-appearance { display: inline-flex; border: 1px solid var(--ev-line); border-radius: 6px; overflow: hidden; width: max-content; }
.ev-appearance button { border: 0; border-radius: 0; padding: 6px 10px; font-size: 12px; background: #fff; color: var(--ev-ink); }
.ev-appearance button + button { border-left: 1px solid var(--ev-line); }
.ev-appearance button[aria-pressed=true] { background: #28594e; color: #fff; }
.ev-appearance button:disabled { opacity: .45; }
.ev-tabs { display: flex; border-bottom: 1px solid var(--ev-line); }
.ev-tabs button { flex: 1; border: 0; border-radius: 0; background: none; padding: 9px 4px 8px; font-size: 13px; color: var(--ev-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ev-tabs button[aria-selected=true] { color: var(--ev-ink); font-weight: 600; border-bottom-color: #28594e; }
.ev-body { padding-top: 4px; }
.ev-section { padding: 14px 0 6px; }
.ev-section + .ev-section { border-top: 1px solid var(--ev-line); }
.ev-section h3 { margin: 0 0 6px; font-size: 14px; font-weight: 650; }
.ev-section h4 { margin: 10px 0 4px; font-size: 12px; font-weight: 600; color: var(--ev-muted); }
.ev-count { font-weight: 400; color: var(--ev-muted); font-size: 12px; margin-left: 4px; }
.ev-hint { margin: 0 0 8px; font-size: 12px; line-height: 1.45; color: var(--ev-muted); }
.ev-empty { font-size: 13px; color: var(--ev-muted); margin: 8px 0; }
.ev-loading { font-size: 13px; color: var(--ev-muted); padding: 14px 0; }
.ev-warning { background: #fff0d9; padding: 9px; border-left: 3px solid #a96525; font-size: 13px; }

/* Horizontal strips of textures / originals */
.ev-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.ev-strip > * { scroll-snap-align: start; flex: 0 0 auto; }
.ev-texture, .ev-thumb { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 118px; padding: 5px; background: var(--ev-card); border: 1px solid var(--ev-line); border-radius: 6px; text-align: left; font-size: 11px; line-height: 1.3; color: var(--ev-ink); text-decoration: none; cursor: pointer; }
.ev-strip-small .ev-thumb { width: 92px; padding: 4px; }
.ev-texture img, .ev-thumb img { display: block; width: 100%; height: 76px; object-fit: contain; background: #e8e7df; border-radius: 3px; }
.ev-strip-small .ev-thumb img { height: 60px; }
.ev-texture:hover, .ev-thumb:hover { border-color: #8faaa3; }
.ev-texture.is-selected { border-color: var(--ev-accent); box-shadow: 0 0 0 2px var(--ev-accent-soft); }
.ev-thumb.is-current { border-color: #28594e; box-shadow: 0 0 0 2px #dbe7e0; }
.ev-thumb.is-used::after { content: 'used'; font-size: 9px; text-transform: uppercase; letter-spacing: .6px; color: var(--ev-accent); font-weight: 700; }
.ev-texture-name, .ev-thumb span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-texture-name { font-weight: 600; }
.ev-texture-from { color: var(--ev-muted); font-size: 10px; }

/* Large photograph with crop overlays */
.ev-photo-figure { margin: 0 0 8px; }
.ev-photo-frame { background: #1f2321; border-radius: 6px; overflow: hidden; }
.ev-photo-stage { position: relative; width: 100%; max-height: 58vh; }
.ev-photo-stage img { display: block; width: 100%; height: 100%; max-height: 58vh; object-fit: contain; }
.ev-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.ev-crop { fill: rgba(200, 100, 30, .10); stroke: #ffb066; stroke-width: 1.5; cursor: pointer; pointer-events: all; transition: fill .15s; }
.ev-crop:hover, .ev-crop.is-hover { fill: rgba(255, 176, 102, .32); stroke: #ffd2a8; }
.ev-crop.is-emphasized { stroke: #ff8c2a; stroke-width: 2.5; fill: rgba(255, 140, 42, .18); }
.ev-photo-caption { margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--ev-muted); }
.ev-photo-caption a, .ev-link-button { color: #28594e; font-size: 12px; }
.ev-link-button { border: 0; background: none; padding: 0; text-decoration: underline; cursor: pointer; }

/* Grids, facts, records */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 8px; }
.ev-grid .ev-thumb { width: auto; }
.ev-more { border-top: 1px solid var(--ev-line); padding: 10px 0; }
.ev-more > summary { font-size: 13px; font-weight: 600; cursor: pointer; }
.ev-facts { margin: 4px 0 0; padding-left: 16px; font-size: 12.5px; line-height: 1.55; }
.ev-facts li { margin: 2px 0; }
.ev-links { margin: 6px 0 0; padding-left: 16px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.ev-links a { color: #28594e; }
.ev-dl { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2px 10px; font-size: 12px; margin: 4px 0 0; }
.ev-dl dt { color: var(--ev-muted); overflow-wrap: anywhere; }
.ev-dl dd { margin: 0; font-variant-numeric: tabular-nums; }
.ev-sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; color: var(--ev-muted); overflow-wrap: anywhere; }
.ev-footprint { width: 100%; max-height: 220px; background: #fff; border: 1px solid var(--ev-line); border-radius: 6px; }
.ev-footprint polygon { fill: #dbe7e0; stroke: #28594e; stroke-width: .4; }
.ev-footprint text { fill: #24302b; font-family: system-ui, sans-serif; }
.ev-revision { margin-top: 6px; }

/* Report form */
.ev-report { background: #eaf0e9; border: 1px solid #c7d6cc; border-radius: 8px; padding: 12px; margin: 12px 0; }
.ev-report h3 { margin: 0 0 6px; font-size: 14px; }
.ev-report label { display: block; font-size: 13px; }
.ev-report textarea { display: block; width: 100%; box-sizing: border-box; resize: vertical; min-height: 75px; margin: 7px 0; padding: 9px; border: 1px solid #9cafa4; border-radius: 5px; background: #fff; font: inherit; }
.ev-report button[type=submit] { border: 1px solid #8faaa3; border-radius: 6px; padding: 8px 11px; background: #f4f7f3; color: #23473e; }
.ev-report-status { font-size: 13px; margin: 8px 0 0; }
.ev-report-status:empty { display: none; }
.ev button:focus-visible, .ev a:focus-visible, .ev summary:focus-visible { outline: 3px solid #bd7026; outline-offset: 2px; }
@media (max-width: 700px) { .ev-header h2 { font-size: 18px; } .ev-photo-stage, .ev-photo-stage img { max-height: 34vh; } .ev-texture { width: 100px; } }
.ev-toolbar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ev-explode { border: 1px solid var(--ev-accent); border-radius: 6px; padding: 6px 12px; font-size: 12px; background: #fff; color: var(--ev-accent); font-weight: 600; }
.ev-explode[aria-pressed=true] { background: var(--ev-accent); color: #fff; }
.ev-explode:disabled { opacity: .45; }
.ev-crop.is-estimate { stroke-dasharray: 6 4; }
