/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --ink: #18221f;
  --muted: #5f6f69;
  --page: #f6f7f5;
  --surface: #ffffff;
  --line: #dce3df;
  --deep-green: #16322f;
  --green: #1f7a5b;
  --red: #ba2f3a;
  --amber: #a86b18;
  --blue: #276a8c;
  --shadow: 0 18px 45px rgb(23 40 35 / 12%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  touch-action: manipulation;
}

.app-shell {
  display: grid;
  gap: 0;
  min-height: 100vh;
}

.workspace-shell {
  display: block;
  min-height: 100vh;
  background: var(--page);
}

.workspace-capture {
  background: var(--deep-green);
  color: #f8fbf8;
}

.workspace-frame {
  display: grid;
  align-content: start;
  width: min(100%, 880px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 5vw, 42px) calc(132px + env(safe-area-inset-bottom));
  gap: 16px;
}

.workspace-header h1 {
  max-width: none;
  font-size: clamp(1.9rem, 7vw, 3.2rem);
  line-height: 1;
}

.workspace-shell:not(.workspace-capture) .workspace-header .eyebrow {
  color: var(--green);
}

.workspace-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  padding: 8px max(10px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
  box-shadow: 0 -10px 26px rgb(23 40 35 / 12%);
}

.workspace-nav button {
  display: grid;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #41514b;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
}

.workspace-nav button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.workspace-nav button.is-active {
  background: var(--deep-green);
  color: #f8fbf8;
}

.workspace-nav em {
  min-width: 20px;
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  font-size: 0.68rem;
  font-style: normal;
  line-height: 1.45;
}

.workspace-nav button.is-active em {
  background: rgb(255 255 255 / 20%);
  color: #ffffff;
}

.workspace-panel {
  display: grid;
  gap: 16px;
}

.capture-workspace {
  min-height: calc(100vh - 310px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  align-content: center;
  justify-items: center;
  gap: 20px;
}

.capture-section-heading {
  width: 100%;
}

.current-visit-summary {
  display: grid;
  width: 100%;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 14px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.current-visit-summary.is-dark {
  width: min(100%, 480px);
  border-color: rgb(255 255 255 / 18%);
  background: rgb(255 255 255 / 9%);
  color: #f8fbf8;
  box-shadow: none;
}

.visit-context-bar {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.visit-context-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.visit-context-copy span {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.visit-context-copy strong {
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.15;
}

.visit-context-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
}

.visit-context-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.visit-context-side > span {
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  padding: 6px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.summary-heading h2,
.current-visit-summary p {
  margin: 0;
}

.summary-heading h2 {
  overflow-wrap: anywhere;
  font-size: clamp(1.15rem, 5vw, 1.8rem);
  line-height: 1.05;
}

.current-visit-summary p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.current-visit-summary.is-dark p {
  color: #d2e5df;
}

.summary-badges,
.summary-meta,
.summary-actions,
.capture-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-badges {
  justify-content: flex-end;
}

.summary-meta span {
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  padding: 6px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.current-visit-summary.is-dark .summary-meta span {
  background: rgb(255 255 255 / 14%);
  color: #f8fbf8;
}

.summary-meta .summary-alert {
  background: #ffe2dd;
  color: var(--red);
}

.capture-quick-actions {
  justify-content: center;
}

.photo-capture-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.recording-empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.capture-band {
  display: grid;
  align-content: start;
  gap: 28px;
  padding: max(20px, env(safe-area-inset-top)) clamp(18px, 5vw, 56px) 34px;
  background: var(--deep-green);
  color: #f8fbf8;
}

.recordings-band {
  display: grid;
  gap: 18px;
  padding: 26px clamp(18px, 5vw, 56px) max(36px, env(safe-area-inset-bottom));
}

.app-header,
.section-heading,
.recording-row,
.recording-details,
.recording-actions,
.toolbar,
.visit-heading {
  display: flex;
  align-items: center;
}

.app-header,
.section-heading,
.recording-row,
.visit-heading {
  justify-content: space-between;
  gap: 18px;
}

.app-header h1,
.section-heading h2,
.recording-card h3,
.visit-heading h2,
.app-header p,
.recording-card p {
  margin: 0;
}

.app-header h1 {
  max-width: 11ch;
  font-size: clamp(2.1rem, 10vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.workspace-header h1 {
  max-width: none;
  font-size: clamp(1.9rem, 7vw, 3.2rem);
  line-height: 1;
}

.eyebrow {
  color: #bdd8ce;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.connection-pill,
.status-pill,
.visit-sync-badge {
  display: inline-grid;
  min-width: max-content;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
}

.connection-pill {
  background: #dff6e8;
  color: #123f2b;
}

.connection-pill.is-offline {
  background: #ffe2dd;
  color: #7b1720;
}

.current-visit {
  display: grid;
  gap: 14px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  background: rgb(255 255 255 / 8%);
  padding: 16px;
}

.visits-workspace .current-visit,
.recordings-workspace .current-visit {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.visit-heading h2 {
  font-size: 1.15rem;
  line-height: 1.15;
}

.visit-sync-badge {
  background: #dff6e8;
  color: #123f2b;
}

.visit-sync-no_visit {
  background: #edf1ee;
  color: #41514b;
}

.visit-sync-sync_failed {
  background: #ffe2dd;
  color: #7b1720;
}

.visit-sync-pending_sync {
  background: #fff0d9;
  color: #6d4210;
}

.visit-sync-syncing {
  background: #def3ff;
  color: #1e5678;
}

.visit-sync-synced {
  background: #dff6e8;
  color: #123f2b;
}

.visit-field {
  display: grid;
  gap: 6px;
}

.visit-field label {
  color: #d2e5df;
  font-size: 0.78rem;
  font-weight: 800;
}

.visits-workspace .visit-field label,
.recordings-workspace .visit-field label {
  color: var(--muted);
}

.current-visit-summary:not(.is-dark) .eyebrow,
.visit-editor .eyebrow,
.visits-workspace .visit-details summary {
  color: var(--green);
}

.visit-field input,
.visit-field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 8px;
  background: rgb(255 255 255 / 94%);
  color: var(--ink);
  padding: 9px 11px;
  font-weight: 700;
}

.visit-field textarea {
  min-height: 78px;
  resize: vertical;
}

.visits-workspace .visit-field input,
.visits-workspace .visit-field textarea {
  border-color: #bccbc4;
  background: #fbfdfc;
  box-shadow: inset 0 1px 0 rgb(23 40 35 / 4%);
}

.visits-workspace .visit-field input:focus,
.visits-workspace .visit-field textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgb(31 122 91 / 16%);
}

.visit-grid {
  display: grid;
  gap: 12px;
}

.visit-details {
  display: grid;
  gap: 12px;
}

.visit-details[open] {
  gap: 14px;
}

.visit-details summary {
  cursor: pointer;
  color: #f8fbf8;
  font-weight: 800;
}

.visit-details > * + * {
  margin-top: 12px;
}

.visit-new-button {
  justify-self: start;
}

.visit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.record-surface {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 20px 0 4px;
}

.active-visit-summary {
  display: grid;
  width: min(100%, 440px);
  gap: 4px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  background: rgb(255 255 255 / 9%);
  padding: 12px 14px;
  text-align: center;
}

.active-visit-summary span,
.active-visit-summary em {
  color: #d2e5df;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 750;
}

.active-visit-summary strong {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.2;
}

.record-button {
  display: grid;
  width: clamp(152px, 48vw, 190px);
  aspect-ratio: 1;
  place-items: center;
  border: 8px solid #dcece6;
  border-radius: 50%;
  background: #f5fbf8;
  color: var(--deep-green);
  cursor: pointer;
  font-size: 1.18rem;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.record-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.record-button.is-recording {
  border-color: #ffd9dc;
  background: var(--red);
  color: #ffffff;
}

.record-meta {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 62px;
}

.timer {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 11vw, 4.25rem);
  font-weight: 800;
  line-height: 1;
}

.capture-status {
  color: #d2e5df;
  font-size: 0.98rem;
  font-weight: 700;
}

.capture-limit,
.capture-limit-warning {
  font-size: 0.84rem;
  font-weight: 800;
}

.capture-limit {
  color: #a9c5bb;
}

.capture-limit-warning {
  border-radius: 999px;
  background: #fff0d9;
  color: var(--amber);
  padding: 6px 10px;
}

.toolbar {
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
}

.primary-button:disabled,
.secondary-button:disabled,
.text-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.primary-button svg,
.secondary-button svg,
.text-button svg {
  flex: 0 0 auto;
}

.primary-button {
  border-color: var(--deep-green);
  border-radius: 8px;
  background: var(--deep-green);
  color: #f8fbf8;
  padding: 0 16px;
}

.secondary-button {
  border-color: #90ada4;
  border-radius: 8px;
  background: transparent;
  color: #f8fbf8;
  padding: 0 16px;
}

.workspace-shell:not(.workspace-capture) .secondary-button {
  border-color: #9eb6ae;
  color: var(--deep-green);
}

.text-button {
  border-radius: 8px;
  background: #eef7f3;
  color: var(--green);
  padding: 0 14px;
}

.error-message,
.photo-message,
.wake-message,
.recording-error {
  margin: 0;
  border-radius: 8px;
  font-weight: 700;
}

.error-message {
  background: #ffe9e5;
  color: #7b1720;
  padding: 12px 14px;
}

.wake-message {
  background: #fff0d9;
  color: #6d4210;
  padding: 12px 14px;
}

.photo-message {
  background: #e9f7f0;
  color: #123f2b;
  padding: 12px 14px;
}

.recording-error {
  background: #ffe9e5;
  color: #7b1720;
  padding: 10px 12px;
}

.section-heading h2 {
  font-size: clamp(1.35rem, 5vw, 2.25rem);
  line-height: 1;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.recording-list {
  display: grid;
  gap: 14px;
}

.photo-evidence-strip {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  justify-self: center;
  padding-top: 8px;
}

.photo-evidence-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.photo-evidence-heading p,
.photo-evidence-heading h3 {
  margin: 0;
}

.photo-evidence-heading .eyebrow {
  color: #a9c5bb;
  font-size: 0.72rem;
}

.photo-evidence-heading h3 {
  color: #f8fbf8;
  font-size: 1.05rem;
  line-height: 1.15;
}

.photo-evidence-heading > span {
  color: #d2e5df;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.photo-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.photo-evidence-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  background: rgb(255 255 255 / 9%);
  padding: 8px;
}

.photo-thumb {
  display: grid;
  width: 54px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgb(255 255 255 / 14%);
  color: #d2e5df;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-evidence-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.photo-evidence-copy strong,
.photo-evidence-copy span,
.photo-evidence-copy em {
  overflow-wrap: anywhere;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.photo-evidence-copy strong {
  color: #f8fbf8;
}

.photo-evidence-copy span {
  color: #d2e5df;
}

.photo-evidence-copy em {
  color: #a9c5bb;
}

.recent-visits {
  display: grid;
  gap: 14px;
}

.visit-list {
  display: grid;
  gap: 12px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.visit-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.visit-card.is-active {
  border-color: #64aa90;
  box-shadow: 0 0 0 3px rgb(31 122 91 / 14%), 0 8px 22px rgb(23 40 35 / 7%);
}

.visit-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.visit-card-main:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.visit-card-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #eef7f3;
  color: var(--green);
}

.visit-card-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.visit-card-copy strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.2;
}

.visit-card-copy span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}

.visit-life-badge {
  display: inline-grid;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 850;
}

.visit-life-open {
  background: #dff6e8;
  color: #123f2b;
}

.visit-life-completed {
  background: #edf1ee;
  color: #41514b;
}

.visit-card-meta,
.visit-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visit-card-meta span {
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  padding: 6px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.visit-card-meta .visit-card-alert {
  background: #ffe2dd;
  color: var(--red);
}

.visit-card-meta .visit-sync-local_only,
.visit-card-meta .visit-sync-needs_context,
.visit-card-meta .visit-sync-no_visit {
  background: #edf1ee;
  color: #41514b;
}

.visit-card-meta .visit-sync-pending_sync {
  background: #fff0d9;
  color: #6d4210;
}

.visit-card-meta .visit-sync-syncing {
  background: #def3ff;
  color: #1e5678;
}

.visit-card-meta .visit-sync-synced {
  background: #dff6e8;
  color: #123f2b;
}

.visit-card-meta .visit-sync-sync_failed {
  background: #ffe2dd;
  color: #7b1720;
}

.visit-card-actions .text-button:disabled {
  cursor: not-allowed;
}

.recording-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.recording-card h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.recording-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.recording-card .recording-visit {
  color: #41514b;
}

.recording-card audio {
  width: 100%;
  min-height: 42px;
}

.recording-details,
.recording-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.recording-details span {
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.note-readiness {
  display: grid;
  gap: 8px;
  border: 1px solid #dce6e1;
  border-radius: 8px;
  background: #f7faf8;
  padding: 12px;
}

.note-readiness-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.note-status-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.note-readiness-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.note-status-group em,
.note-readiness-heading strong {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  line-height: 1;
}

.note-status-group em {
  background: #edf1ee;
  color: #41514b;
  font-style: normal;
  font-weight: 800;
}

.note-readiness-queued .note-readiness-heading strong,
.note-readiness-processing .note-readiness-heading strong {
  background: #fff0d9;
  color: var(--amber);
}

.note-readiness-ready .note-readiness-heading strong {
  background: #dff6e8;
  color: var(--green);
}

.note-readiness-no_speech .note-readiness-heading strong {
  background: #edf1ee;
  color: #41514b;
}

.note-readiness-failed .note-readiness-heading strong {
  background: #ffe2dd;
  color: var(--red);
}

.note-preview,
.note-error,
.note-empty {
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

.recording-card .note-preview {
  color: #24352f;
  background: #fff;
}

.recording-card .note-error {
  color: #7b1720;
  background: #ffe9e5;
}

.recording-card .note-empty {
  color: #41514b;
  background: #edf1ee;
}

.findings-review {
  display: grid;
  gap: 14px;
}

.quote-review,
.quote-draft-review,
.quote-line-list {
  display: grid;
  gap: 14px;
}

.findings-toolbar,
.quote-toolbar,
.finding-empty-actions,
.finding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.findings-toolbar,
.quote-toolbar {
  justify-content: center;
}

.finding-alert {
  border-radius: 8px;
  background: #fff0d9;
  color: #6d4210;
  padding: 12px 14px;
  font-weight: 700;
}

.photo-match-status {
  border: 1px solid #d8e5dc;
  border-radius: 8px;
  background: #f6fbf8;
  color: #183c32;
  padding: 12px 14px;
}

.photo-match-status-content {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.photo-match-status-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #e8f7ed;
  color: var(--green);
}

.photo-match-status strong {
  display: block;
  color: var(--deep-green);
  font-size: 0.95rem;
  line-height: 1.2;
}

.photo-match-status p {
  margin: 4px 0 0;
  color: #52625c;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
}

.photo-match-status-active .photo-match-status-icon {
  animation: pulse-photo-match 1.35s ease-in-out infinite;
}

.photo-match-status-no_suggestions {
  border-color: #e0e5e2;
  background: #f7f8f7;
}

.photo-match-status-failed {
  border-color: #ffd2cb;
  background: #fff0ee;
}

.photo-match-status-failed .photo-match-status-icon {
  background: #ffe2dd;
  color: var(--red);
}

.quote-draft-status {
  border: 1px solid #d8e5dc;
  border-radius: 8px;
  background: #f7faf7;
  color: #183c32;
  padding: 12px 14px;
}

.quote-draft-status-content {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.quote-draft-status-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #e8f7ed;
  color: var(--green);
}

.quote-draft-status strong {
  display: block;
  color: var(--deep-green);
  font-size: 0.95rem;
  line-height: 1.2;
}

.quote-draft-status p {
  margin: 4px 0 0;
  color: #52625c;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
}

.quote-draft-status-active .quote-draft-status-icon {
  animation: pulse-photo-match 1.35s ease-in-out infinite;
}

.quote-draft-status-ready {
  border-color: #cfe8d8;
  background: #f3fbf5;
}

.quote-draft-status-failed {
  border-color: #ffd2cb;
  background: #fff0ee;
}

.quote-draft-status-failed .quote-draft-status-icon {
  background: #ffe2dd;
  color: var(--red);
}

@keyframes pulse-photo-match {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(38 166 91 / 20%);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 7px rgb(38 166 91 / 0%);
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-match-status-active .photo-match-status-icon,
  .quote-draft-status-active .quote-draft-status-icon {
    animation: none;
  }
}

.finding-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.finding-summary-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.finding-summary-card span,
.finding-section-heading span,
.finding-source span,
.finding-field span,
.finding-edit-field span,
.finding-photo-heading > span,
.finding-missing span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.finding-summary-card strong {
  color: var(--deep-green);
  font-size: 1.35rem;
  line-height: 1;
}

.finding-section,
.finding-list,
.extraction-list {
  display: grid;
  gap: 12px;
}

.finding-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finding-section-heading h3,
.finding-card h3,
.finding-card p,
.finding-source p,
.finding-field p,
.finding-missing ul,
.extraction-row p {
  margin: 0;
}

.finding-section-heading h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.extraction-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.extraction-row > div {
  display: grid;
  gap: 4px;
}

.extraction-row strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.extraction-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.extraction-row em,
.finding-source-meta em {
  width: max-content;
  border-radius: 999px;
  background: #fff0d9;
  color: #6d4210;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

.extraction-row p,
.finding-error {
  border-radius: 8px;
  background: #ffe9e5;
  color: #7b1720;
  padding: 9px 10px;
  font-size: 0.84rem;
  font-weight: 700;
}

.extraction-no_findings {
  background: #f7faf8;
}

.extraction-failed {
  border-color: #ffc7bf;
}

.finding-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.finding-card-reviewed {
  border-color: #b9d7ca;
}

.finding-card-dismissed {
  background: #f8faf8;
}

.finding-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.finding-card h3 {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
  line-height: 1.15;
}

.finding-card-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.finding-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.finding-badge {
  min-height: 28px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 850;
}

.finding-review-draft,
.finding-severity-unknown,
.finding-confidence-low {
  background: #fff0d9;
  color: #6d4210;
}

.finding-review-reviewed,
.finding-confidence-high {
  background: #dff6e8;
  color: #123f2b;
}

.finding-review-dismissed {
  background: #edf1ee;
  color: #41514b;
}

.finding-severity-low {
  background: #def3ff;
  color: #1e5678;
}

.finding-severity-medium,
.finding-confidence-medium {
  background: #e8f0ff;
  color: #214d7a;
}

.finding-severity-high,
.finding-severity-urgent {
  background: #ffe2dd;
  color: #7b1720;
}

.finding-source {
  display: grid;
  gap: 8px;
  border-left: 3px solid #9eb6ae;
  padding-left: 12px;
}

.finding-source p {
  color: #24352f;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.finding-source-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.finding-source-meta span {
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: none;
}

.finding-field-grid,
.finding-editor {
  display: grid;
  gap: 12px;
}

.finding-field {
  display: grid;
  gap: 4px;
}

.finding-field p {
  color: #24352f;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.42;
}

.finding-missing {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  background: #fff0d9;
  padding: 12px;
}

.finding-missing ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.finding-missing li {
  color: #52320c;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.finding-photo-evidence {
  display: grid;
  gap: 10px;
  border-radius: 8px;
  background: #f7faf8;
  padding: 12px;
}

.finding-photo-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.finding-photo-grid,
.finding-photo-picker {
  display: grid;
  gap: 10px;
}

.finding-photo-suggestions {
  display: grid;
  gap: 8px;
}

.finding-photo-suggestions-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.finding-photo-suggestion {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  border: 1px solid rgba(21, 128, 91, 0.28);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 8px;
}

.finding-photo-suggestion .finding-photo-image {
  width: 72px;
}

.finding-photo-suggestion-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.finding-photo-suggestion-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.finding-photo-suggestion-title strong {
  min-width: 0;
  overflow: hidden;
  color: #16241f;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finding-photo-suggestion-copy p {
  margin: 0;
  color: #53615c;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.finding-photo-suggestion-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finding-photo-match-badge {
  flex: 0 0 auto;
  border: 0;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.finding-photo-match-high {
  background: #dff7e8;
  color: var(--deep-green);
}

.finding-photo-match-medium {
  background: #fff1d6;
  color: #6a4109;
}

.finding-photo-match-low {
  background: #eef2f0;
  color: #53615c;
}

.finding-photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
}

.finding-photo-picker {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.finding-photo-option {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 6px;
}

.finding-photo-thumb {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
}

.finding-photo-thumb-quote {
  border-color: rgba(21, 128, 91, 0.4);
  box-shadow: inset 0 0 0 1px rgba(21, 128, 91, 0.12);
}

.finding-photo-option {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.finding-photo-option:disabled,
.finding-photo-thumb button:disabled {
  opacity: 0.55;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--deep-green);
}

.finding-photo-image {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #edf1ee;
  color: var(--muted);
}

.finding-photo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.finding-photo-thumb > div {
  min-width: 0;
}

.finding-photo-thumb strong,
.finding-photo-option span,
.finding-photo-thumb span,
.finding-photo-empty {
  color: #24352f;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.finding-photo-thumb strong,
.finding-photo-option span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finding-photo-thumb span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.finding-photo-quote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 6px;
}

.finding-photo-quote-toggle {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  color: #24352f;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
}

.finding-photo-quote-toggle input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: var(--deep-green);
}

.finding-photo-quote-toggle span {
  display: inline;
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  color: #24352f;
  font-size: inherit;
  line-height: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finding-photo-quote-badge {
  flex: 0 0 auto;
  min-width: 0;
  border: 0;
  background: #dff7e8;
  color: var(--deep-green);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.finding-photo-thumb .icon-button {
  position: absolute;
  top: 8px;
  right: 8px;
  border-color: rgba(217, 224, 220, 0.9);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 16px rgba(5, 32, 24, 0.14);
}

.finding-photo-empty {
  margin: 0;
  color: var(--muted);
}

.finding-photo-status {
  margin: 0;
  color: var(--deep-green);
  font-size: 0.8rem;
  font-weight: 800;
}

.finding-editor {
  grid-template-columns: minmax(0, 1fr);
}

.finding-edit-field {
  display: grid;
  gap: 6px;
}

.finding-edit-field input,
.finding-edit-field textarea,
.finding-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #bccbc4;
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  padding: 9px 11px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgb(23 40 35 / 4%);
}

.finding-edit-field textarea {
  min-height: 92px;
  resize: vertical;
}

.finding-edit-field input:focus,
.finding-edit-field textarea:focus,
.finding-select:focus {
  border-color: var(--green);
  outline: 3px solid rgb(31 122 91 / 16%);
}

.finding-error {
  margin: 0;
}

.finding-empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.quote-empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.finding-empty-state h3,
.finding-empty-state p,
.quote-empty-state h3,
.quote-empty-state p {
  margin: 0;
}

.finding-empty-state h3,
.quote-empty-state h3 {
  font-size: 1.06rem;
  line-height: 1.2;
}

.finding-empty-state p,
.quote-empty-state p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

.quote-draft-review {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.quote-draft-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quote-draft-header h3,
.quote-draft-header p,
.quote-draft-header span,
.quote-customer-summary p,
.quote-blocker-note p,
.quote-line-card h4,
.quote-line-description,
.quote-line-missing ul,
.quote-source-context p {
  margin: 0;
}

.quote-draft-header h3 {
  overflow-wrap: anywhere;
  font-size: 1.35rem;
  line-height: 1.08;
}

.quote-draft-header > div > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.quote-status-badge,
.quote-pricing-badge,
.quote-manual-badge {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 850;
}

.quote-status-draft,
.quote-pricing-priced,
.quote-pricing-not_applicable {
  background: #dff6e8;
  color: #123f2b;
}

.quote-status-approved {
  background: #def3ff;
  color: #1e5678;
}

.quote-status-voided {
  background: #edf1ee;
  color: #41514b;
}

.quote-pricing-needs_pricing {
  background: #fff0d9;
  color: #6d4210;
}

.quote-manual-badge {
  background: #edf1ee;
  color: #41514b;
}

.quote-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-summary-card {
  display: grid;
  gap: 4px;
  border: 1px solid #dce6e1;
  border-radius: 8px;
  background: #f7faf8;
  padding: 12px;
}

.quote-summary-card span,
.quote-customer-summary span,
.quote-line-header span,
.quote-line-facts span,
.quote-line-missing span,
.quote-photo-evidence > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quote-summary-card strong {
  color: var(--deep-green);
  font-size: 1.35rem;
  line-height: 1;
}

.quote-summary-total {
  grid-column: 1 / -1;
}

.quote-customer-summary {
  display: grid;
  gap: 8px;
  border-left: 3px solid #9eb6ae;
  padding-left: 12px;
}

.quote-customer-summary p,
.quote-line-description,
.quote-source-context p {
  color: #24352f;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.45;
}

.quote-blocker-note,
.quote-line-missing {
  display: grid;
  gap: 6px;
  border-radius: 8px;
  background: #fff0d9;
  color: #52320c;
  padding: 12px;
}

.quote-blocker-note strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

.quote-blocker-note p,
.quote-line-missing li {
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.quote-line-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dce6e1;
  border-radius: 8px;
  background: #fbfdfc;
  padding: 14px;
}

.quote-line-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quote-line-badges {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.quote-line-card h4 {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.15;
}

.quote-line-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-line-facts div {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  background: #edf1ee;
  padding: 10px;
}

.quote-line-facts strong {
  color: var(--deep-green);
  font-size: 0.92rem;
  line-height: 1.25;
}

.quote-line-missing ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.quote-edit-panel {
  border: 1px solid #dce6e1;
  border-radius: 8px;
  background: #f7faf8;
  padding: 0;
}

.quote-edit-panel summary {
  cursor: pointer;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 850;
  padding: 12px;
}

.quote-edit-panel-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid #dce6e1;
  padding: 12px;
}

.quote-line-edit-panel {
  background: #fff;
}

.quote-form-field {
  display: grid;
  gap: 6px;
}

.quote-form-field label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quote-form-field textarea {
  min-height: 92px;
  resize: vertical;
}

.quote-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-select {
  min-height: 40px;
  width: 100%;
  border: 1px solid #cbd8d2;
  border-radius: 8px;
  background: var(--surface);
  color: var(--deep-green);
  padding: 0 10px;
  font-weight: 750;
}

.quote-edit-actions,
.quote-line-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.quote-line-toolbar {
  justify-content: space-between;
}

.quote-line-toolbar h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.quote-save-state {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.quote-save-error {
  margin: 0;
  border-radius: 8px;
  background: #ffe7e7;
  color: #9b1c1c;
  padding: 10px;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.quote-photo-evidence {
  display: grid;
  gap: 10px;
}

.quote-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.quote-photo-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
}

.quote-photo-image {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #edf1ee;
  color: var(--muted);
}

.quote-photo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quote-photo-card div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.quote-photo-card strong,
.quote-photo-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-photo-card strong {
  color: #24352f;
  font-size: 0.82rem;
  font-weight: 850;
}

.quote-photo-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.quote-source-context {
  border-top: 1px solid #dce6e1;
  padding-top: 10px;
}

.quote-source-context summary {
  cursor: pointer;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 850;
}

.quote-source-context div {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.quote-source-context strong {
  color: var(--deep-green);
  font-size: 0.9rem;
}

.note-editor {
  display: grid;
  gap: 10px;
}

.note-editor textarea {
  min-height: 112px;
  resize: vertical;
}

.status-saved_locally {
  background: #e8f0ff;
  color: #214d7a;
}

.status-pending_upload {
  background: #fff0d9;
  color: var(--amber);
}

.status-uploading {
  background: #def3ff;
  color: var(--blue);
}

.status-uploaded {
  background: #dff6e8;
  color: var(--green);
}

.status-sync_failed {
  background: #ffe2dd;
  color: var(--red);
}

@media (min-width: 860px) {
  .app-shell:not(.workspace-shell) {
    grid-template-columns: minmax(360px, 0.85fr) minmax(460px, 1.15fr);
  }

  .workspace-shell {
    display: block;
  }

  .workspace-frame {
    max-width: 980px;
    padding-bottom: 48px;
  }

  .workspace-nav {
    position: sticky;
    top: 12px;
    bottom: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 10px 24px rgb(23 40 35 / 9%);
  }

  .workspace-nav button {
    min-height: 46px;
    grid-auto-flow: column;
    justify-content: center;
  }

  .capture-workspace {
    min-height: calc(100vh - 330px);
  }

  .visit-context-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .visit-context-side {
    justify-content: flex-end;
  }

  .app-shell:not(.workspace-shell) .capture-band,
  .app-shell:not(.workspace-shell) .recordings-band {
    min-height: 100vh;
  }

  .app-shell:not(.workspace-shell) .capture-band {
    position: sticky;
    top: 0;
  }

  .app-header h1 {
    font-size: clamp(3.5rem, 6vw, 5.2rem);
  }

  .workspace-header h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
  }

  .app-shell:not(.workspace-shell) .recordings-band {
    align-content: start;
    padding-top: 46px;
  }

  .visit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finding-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .quote-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .finding-field-grid,
  .finding-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finding-field:first-child,
  .finding-edit-full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .app-header {
    align-items: flex-start;
  }

  .connection-pill {
    min-height: 30px;
    padding: 0 10px;
  }

  .recording-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .visit-card-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .visit-life-badge {
    grid-column: 2;
    justify-self: start;
  }

  .finding-card-header,
  .extraction-row {
    align-items: stretch;
    flex-direction: column;
  }

  .finding-badges {
    justify-content: flex-start;
  }
}
