/* Only Discovery layout; tokens and components are canonical imports. */
[hidden]{display:none!important}.hg-client-header{position:sticky;top:0;z-index:10;background:var(--hg-paper);gap:10px}.hg-client-brand small{display:block}.hg-client-shell{max-width:1000px}.hg-client-shell h1{font-size:clamp(34px,6vw,60px)}.hg-client-paper{margin-bottom:18px}.hg-client-paper h2{font-size:clamp(24px,4vw,36px);margin:8px 0 16px}.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0}.actions input{flex:1;min-width:180px}.hg-client-button{min-height:44px;padding:10px 14px;font-size:13px}.hg-client-button[disabled]{opacity:.5;cursor:not-allowed}.hg-client-shell textarea,.hg-client-shell input:not([type=checkbox]):not([type=radio]){box-sizing:border-box;width:100%;min-height:48px;padding:12px;border:1px solid var(--hg-ink);background:var(--hg-white);font:inherit;font-size:16px}.hg-client-shell .with-voice textarea{padding-right:58px;resize:vertical;min-height:110px}.hg-client-shell .with-voice input{padding-right:58px}.field{margin:12px 0}.field>label{display:block;font-size:13px;font-weight:750;margin:0 0 5px}.checkline{display:flex;align-items:center;gap:10px;min-height:44px;line-height:1.4}.checkline input{width:22px;height:22px;flex:none}.question{padding:12px 0;border-bottom:1px solid var(--hg-rule)}.question p{margin:0 0 8px;font-size:16px;line-height:1.45}.choices{display:flex;flex-wrap:wrap;gap:6px}.choice{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border:1px solid var(--hg-ink);background:var(--hg-white);padding:8px 12px;font-size:14px;cursor:pointer}.choice:has(input:checked){background:var(--hg-yellow);font-weight:800}.choice input{accent-color:var(--hg-ink)}.discovery-section{margin:12px 0;border:1.5px solid var(--hg-ink);background:var(--hg-paper)}.discovery-section>summary{cursor:pointer;min-height:52px;padding:15px;font:800 20px/1.2 var(--hg-font-display)}.section-body{padding:0 16px 16px}.evidence-item{padding:12px 0;border-bottom:1px solid var(--hg-rule)}.evidence-item:last-child{border-bottom:0}.hg-evidence-gallery img{max-height:180px}.evidence-item .hg-evidence-card a{overflow-wrap:anywhere}.evidence-item .hg-client-button{font-size:12px}.evidence-item progress{width:100%}.discovery-section textarea:focus-visible,summary:focus-visible{outline:3px solid var(--hg-focus);outline-offset:2px}#status{position:sticky;top:83px;z-index:5;background:var(--hg-paper);padding:8px 0;font-size:14px;color:var(--hg-muted);min-height:32px}#status[data-error=true]{color:var(--hg-action-dark);font-weight:700}#cases button{display:block;width:100%;text-align:left;margin:8px 0}#summary{flex-wrap:wrap}.hg-client-brand>img{width:48px;height:56px}.hg-client-brand span{font-size:11px}@media(max-width:520px){.hg-client-header{padding:8px 12px}.hg-client-brand span{display:none}.hg-client-shell{padding:12px}.section-body{padding:0 12px 12px}.choice{padding:8px}.hg-client-paper{padding:16px;box-shadow:none}.hg-client-shell .actions input{flex-basis:100%}}

/* Discovery-specific layout; shared controls and dialog classes remain canonical. */
.discovery-audio{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0}.discovery-audio .hg-client-button{flex:1 1 auto;min-height:44px;padding:8px}.discovery-audio .hg-evidence-time{flex-basis:100%}.discovery-pdf-dialog{max-height:94dvh;overflow:auto}.discovery-pdf-dialog .hg-wf-pdf-toolbar{position:sticky;top:0;z-index:2;background:var(--hg-paper)}.pdf-help{margin:8px 12px;color:var(--hg-muted);font-size:13px}#pdf-mail{padding:12px;border-bottom:1px solid var(--hg-ink);display:grid;gap:8px}#pdf-mail input[type=email]{width:100%;min-height:44px;padding:8px;border:1px solid var(--hg-ink);font:inherit}#pdf-mail label{font-size:14px}#pdf-mail .hg-client-button{min-height:44px}#mail-status{overflow-wrap:anywhere;font-size:14px;margin:4px 0}

/* R4: compact interview, accessible native seek and canonical media dialog. */
.discovery-audio .discovery-seek{position:relative;width:100%;height:48px;display:grid;align-items:center}.discovery-wave{width:100%;height:42px;pointer-events:none}.discovery-audio .discovery-range{position:absolute;inset:0;width:100%;height:48px;padding:0!important;margin:0;min-height:0!important;appearance:none;background:transparent!important;border:0!important;cursor:pointer;touch-action:pan-y}.discovery-range::-webkit-slider-runnable-track{height:4px;background:transparent}.discovery-range::-webkit-slider-thumb{appearance:none;width:16px;height:32px;background:var(--hg-ink);border:2px solid var(--hg-white);margin-top:-14px;border-radius:0}.discovery-range::-moz-range-track{background:transparent}.discovery-range::-moz-range-thumb{width:12px;height:28px;background:var(--hg-ink);border:2px solid var(--hg-white)}.discovery-range:disabled{opacity:.45;cursor:default}.discovery-audio .hg-client-button{font-size:11px;padding:6px;flex:1 1 auto}.discovery-audio .hg-client-button[aria-pressed=true]{background:var(--hg-yellow);color:var(--hg-ink)}.discovery-video-dialog video{display:block;width:100%;max-height:70dvh;background:var(--hg-ink)}.discovery-video-dialog .hg-client-modal-top{flex-wrap:wrap}.discovery-video-dialog strong{overflow-wrap:anywhere}

.hg-evidence-gallery .hg-evidence-card:has(.discovery-audio){grid-column:1/-1}.discovery-audio .discovery-range:focus-visible{outline:3px solid var(--hg-focus);outline-offset:2px}

/* R5: flexible PDF viewport, same canonical dialog/gallery controls. */
.discovery-pdf-dialog[open]{display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;max-height:94dvh}.discovery-pdf-dialog .hg-wf-pdf-toolbar,.discovery-pdf-dialog .pdf-help{flex:0 0 auto;position:static}.discovery-pdf-dialog #pdf-frame{flex:1 1 0;min-height:0;height:auto;width:100%;display:block}.discovery-pdf-dialog #pdf-mail:not([hidden]){flex:0 1 auto;max-height:44%;min-height:0;overflow:auto}.discovery-photo-trigger{padding:0;cursor:zoom-in}.discovery-photo-trigger:focus-visible{outline:3px solid var(--hg-cobalt);outline-offset:2px}.discovery-photo-dialog .hg-client-modal-top strong{overflow-wrap:anywhere;min-width:0}.discovery-photo-dialog #photo-viewport{overflow:auto;max-height:70dvh}.discovery-photo-dialog #photo-player{max-height:70dvh;max-width:100%;object-fit:contain}.discovery-photo-dialog #photo-viewport.zoomed #photo-player{width:200%;max-width:none;max-height:none;height:auto;margin:0}
@media(max-width:750px){.discovery-pdf-dialog[open]{height:94dvh;width:98vw}.discovery-pdf-dialog #pdf-mail:not([hidden]){max-height:50%}}

/* Priority is informational, never validation. Canonical dialog components. */
.discovery-priority-label{display:inline-block;background:var(--hg-yellow);color:var(--hg-ink);font-size:10px;font-weight:750;padding:2px 5px;letter-spacing:.02em;vertical-align:middle}.discovery-notice-dialog{width:min(calc(100% - 24px),480px)}.discovery-notice-dialog form{display:grid;gap:9px}.discovery-notice-dialog input{width:100%;min-height:44px;padding:10px;border:1px solid var(--hg-ink);font:inherit;box-sizing:border-box}.discovery-notice-dialog #notice-text{white-space:pre-wrap;overflow-wrap:anywhere}.discovery-notice-dialog #login-status{font-size:14px;color:var(--hg-action-dark)}
#auth-proof:not([hidden]){margin-top:18px;border-top:1px solid var(--hg-rule);padding-top:14px}#auth-proof h3{margin:0 0 8px;font-size:1rem;font-weight:700}

#directory select,#template-dialog textarea{width:100%;box-sizing:border-box;min-height:44px;border:1px solid var(--hg-ink);background:white;color:var(--hg-ink);font:inherit;padding:10px}#template-dialog textarea{resize:vertical;min-height:160px}#directory .field{margin-bottom:14px}

/* R10: fine waveform and real MediaRecorder recording state. */
.discovery-wave{height:34px;display:block}
.discovery-audio .discovery-seek{height:44px}
.discovery-audio .discovery-range{height:44px}
.discovery-range::-webkit-slider-thumb{width:4px;height:26px;border:0;background:var(--hg-cobalt);margin-top:-11px;border-radius:2px}
.discovery-range::-moz-range-thumb{width:4px;height:26px;border:0;background:var(--hg-cobalt);border-radius:2px}
.discovery-audio .hg-client-button{font-size:12px;min-height:44px}
.evidence-item .hg-client-button.discovery-recording{display:inline-flex;align-items:center;justify-content:center;gap:9px;background:var(--hg-action-dark);color:var(--hg-white);border-color:var(--hg-action-dark);font-variant-numeric:tabular-nums}
.discovery-recording::before{content:"";display:inline-block;flex:none;width:11px;height:11px;border:1px solid var(--hg-white);border-radius:50%;background:var(--hg-white);animation:discovery-recording-pulse 1.35s ease-out infinite}
@keyframes discovery-recording-pulse{0%{box-shadow:0 0 0 0 rgba(255,255,255,.65)}70%,100%{box-shadow:0 0 0 6px rgba(255,255,255,0)}}
@media(prefers-reduced-motion:reduce){.discovery-recording::before{animation:none}}
