:root {
  /* Teal primary, navy panels, gold accent — matching the voice client
     (static/voice-client.html) and the logs dashboard. */
  --navy-900: #0E2647;
  --navy-800: #1B2E5A;
  --navy-700: #244073;
  --teal-600: #0D7377;
  --teal-500: #0F8286;
  --teal-400: #2AA9AD;
  --gold-500: #C8A000;
  --gold-400: #D9B52E;
  --gold-300: #E8CF71;
  --forest:   #2F7D5B;
  --forest-soft: #E4EFE8;
  --amber:    #C4861C;
  --amber-soft: #FAEFD7;
  --surface:  #FAFAF7;
  --paper:    #FFFFFF;
  --ink:      #1F2937;
  --mute:     #6B7280;
  --line:     rgba(11, 37, 69, 0.08);
  --line-strong: rgba(11, 37, 69, 0.16);
}

html, body {
  background: var(--surface);
  color: var(--ink);
  font-family: 'Geist', 'Manrope', system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display {
  font-family: 'Fraunces', 'Source Serif 4', Georgia, serif;
  font-feature-settings: "ss01";
}

.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Grain texture on navy panels ---------- */
.grain {
  position: relative;
  isolation: isolate;
}
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.85'/></svg>");
  z-index: 0;
}
.grain > * { position: relative; z-index: 1; }

/* ---------- Decorative hairline wave ---------- */
.hairline-wave {
  width: 100%;
  max-width: 340px;
  opacity: 0.35;
}

/* ---------- Inputs ---------- */
.field-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}
.field-input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 0;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.field-input:focus {
  outline: none;
  border-color: var(--navy-900);
}
.field-input::placeholder {
  color: #B7BEC7;
}

/* ---------- Primary button ---------- */
.btn-primary {
  background: var(--navy-900);
  color: #F9F6EE;
  padding: 14px 22px;
  border-radius: 2px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s ease, transform 0.15s ease;
  border: 1px solid var(--navy-900);
}
.btn-primary:hover { background: var(--navy-800); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

.btn-ghost {
  background: transparent;
  color: #F9F6EE;
  padding: 8px 16px;
  border: 1px solid rgba(249, 246, 238, 0.22);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-ghost:hover { background: rgba(249, 246, 238, 0.08); border-color: rgba(249, 246, 238, 0.4); }
.btn-ghost:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }


/* ---------- Staggered reveal ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 340px;
  min-width: 340px;
  border-right: 1px solid var(--line);
  background: var(--paper);
  height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}
.sidebar-header {
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.search-wrap {
  position: relative;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px 12px 10px 36px;
  border-radius: 2px;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.search-input:focus {
  outline: none;
  border-color: var(--navy-900);
  background: var(--paper);
}
.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mute);
}

.segmented {
  display: flex;
  gap: 4px;
  margin-top: 14px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.seg-btn {
  flex: 1;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--mute);
  border-radius: 1px;
  transition: background 0.2s ease, color 0.2s ease;
  letter-spacing: 0.02em;
}
.seg-btn[aria-pressed="true"] {
  background: var(--navy-900);
  color: #F9F6EE;
}
.seg-btn:hover:not([aria-pressed="true"]) { color: var(--ink); }

.call-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px 0;
}
.call-row {
  display: grid;
  grid-template-columns: 3px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 22px 14px 19px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}
.call-row:hover { background: #FCFBF7; }
.call-row[aria-selected="true"] {
  background: #FCFAF2;
}
.call-row[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold-500);
}
.call-row .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 0;
}
.call-row .name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.call-row .meta {
  font-size: 11px;
  color: var(--mute);
  margin-top: 2px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.call-row .score {
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.call-row .score small {
  color: var(--mute);
  font-weight: 400;
}

/* ---------- Main workspace ---------- */
.workspace {
  flex: 1;
  overflow-y: auto;
  padding: 40px 48px 72px;
  background:
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(212, 162, 76, 0.05), transparent 60%),
    var(--surface);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(11, 37, 69, 0.03),
    0 8px 24px -12px rgba(11, 37, 69, 0.08);
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
}
.category-badge.good { background: var(--forest-soft); color: #1E5A3F; border-color: transparent; }
.category-badge.bad  { background: #F4ECE0; color: #6B4A1A; border-color: transparent; }

/* ---------- Audio styling ---------- */
.audio-shell {
  padding: 26px 28px;
}
audio {
  width: 100%;
  height: 44px;
  filter: grayscale(0.05) contrast(1.02);
}
audio::-webkit-media-controls-panel {
  background: var(--surface);
}

/* ---------- Score strip ---------- */
.score-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
}
.score-big {
  font-size: 96px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--navy-900);
  font-weight: 400;
}
.score-big small {
  font-size: 28px;
  color: var(--mute);
  letter-spacing: -0.02em;
  margin-left: 6px;
  font-weight: 300;
}
.score-pct {
  font-size: 14px;
  color: var(--mute);
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.bar-track {
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  margin-top: 18px;
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-900), var(--navy-700));
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.stat-tile {
  border: 1px solid var(--line);
  padding: 18px 20px;
  border-radius: 2px;
  background: var(--surface);
}
.stat-tile .n {
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  line-height: 1;
}
.stat-tile .l {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mute);
  margin-top: 8px;
}

/* ---------- Scoring grid ---------- */
.scoring-table {
  width: 100%;
  border-collapse: collapse;
}
.scoring-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
}
.scoring-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
  border-left: 3px solid transparent;
}
.scoring-table tbody tr.achieved {
  border-left-color: var(--forest);
}
.scoring-table tbody tr:hover { background: #FCFBF7; }
.scoring-table tbody td {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--ink);
  vertical-align: top;
}
.scoring-table .col-id {
  color: var(--mute);
  font-variant-numeric: tabular-nums;
  width: 48px;
  font-size: 12px;
}
.scoring-table .col-score {
  text-align: right;
  font-variant-numeric: tabular-nums;
  width: 110px;
  font-weight: 500;
}
.scoring-table .col-score small { color: var(--mute); font-weight: 400; }
.scoring-table .col-status {
  width: 140px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.pill-achieved { background: var(--forest-soft); color: #1E5A3F; }
.pill-missed   { background: #F2F2EF; color: var(--mute); }

/* ---------- Transcript ---------- */
.transcript-body {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  line-height: 1.75;
  color: #2A3544;
  font-feature-settings: "ss01";
  white-space: pre-wrap;
  word-break: break-word;
}

.transcript-collapsed {
  max-height: 8.5em;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--mute);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); background: var(--paper); }

/* ---------- Skeletons ---------- */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #EEEEEA 0%, #F7F6F1 50%, #EEEEEA 100%);
  background-size: 800px 100%;
  animation: shimmer 1.8s infinite linear;
  border-radius: 2px;
}

/* ---------- Empty state waveform ---------- */
.wave-empty {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 56px;
}
.wave-empty span {
  display: block;
  width: 3px;
  background: var(--line-strong);
  border-radius: 2px;
  animation: waveRise 2.6s ease-in-out infinite;
}
@keyframes waveRise {
  0%, 100% { transform: scaleY(0.2); }
  50%      { transform: scaleY(1); }
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-900);
  color: #F9F6EE;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid rgba(249, 246, 238, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .middle {
  flex: 1;
  text-align: center;
  color: rgba(249, 246, 238, 0.85);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.topbar .middle .subtle { color: rgba(249, 246, 238, 0.45); letter-spacing: 0.14em; font-size: 10px; text-transform: uppercase; display: block; margin-bottom: 2px; }

/* ---------- Scrollbar restraint ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #DDD7C9; border-radius: 999px; border: 2px solid var(--surface); }
::-webkit-scrollbar-thumb:hover { background: #C9C1AF; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Focus outline for a11y ---------- */
:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}
button, a, input { outline-offset: 2px; }

/* hide app until Alpine is ready */
[x-cloak] { display: none !important; }

/* ---------- Nav Tabs ---------- */
.nav-tabs { display: flex; gap: 2px; }
.nav-tab {
  padding: 8px 18px; font-size: 13px; font-weight: 500;
  color: rgba(249,246,238,0.55); letter-spacing: 0.02em;
  border-bottom: 2px solid transparent; transition: all 0.2s ease;
}
.nav-tab:hover { color: rgba(249,246,238,0.8); }
.nav-tab.active { color: #F9F6EE; border-bottom-color: var(--gold-500); }

/* ---------- Diarized Transcript ---------- */
.diarized-transcript { display: flex; flex-direction: column; gap: 6px; }
.segment-bubble {
  max-width: 85%; padding: 12px 16px; border-radius: 12px;
  font-size: 14px; line-height: 1.6; position: relative;
  cursor: pointer; transition: all 0.2s ease; border: 2px solid transparent;
}
.segment-bubble:hover { filter: brightness(0.97); }
.segment-bubble.agent {
  align-self: flex-start; background: #EEF2F7;
  border-radius: 12px 12px 12px 2px; color: var(--navy-900);
}
.segment-bubble.customer {
  align-self: flex-end; background: #FDF8EE;
  border-radius: 12px 12px 2px 12px; color: #4A3B1F;
}
.segment-bubble.active { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(212,162,76,0.15); }
.segment-speaker {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 4px; display: flex;
  align-items: center; gap: 8px;
}
.segment-speaker .ts { font-weight: 400; opacity: 0.5; font-size: 10px; letter-spacing: 0.02em; }
.segment-translation {
  margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 13px; color: var(--mute); font-style: italic;
}
.segment-sentiment-dot {
  width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-left: 6px;
}
.sentiment-positive { background: var(--forest); }
.sentiment-negative { background: #C0392B; }
.sentiment-neutral  { background: #B5B0A3; }

/* ---------- Transcript Toggle ---------- */
.transcript-toggle { display: flex; gap: 6px; }
.transcript-toggle .toggle-btn {
  padding: 4px 12px; font-size: 12px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--mute); transition: all 0.15s ease;
}
.transcript-toggle .toggle-btn.active { background: var(--navy-900); color: #F9F6EE; border-color: var(--navy-900); }

/* ---------- Summary Card ---------- */
.summary-card { padding: 28px; }
.summary-text { font-size: 15px; line-height: 1.7; color: #2A3544; margin-top: 12px; }
.topic-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.topic-tag {
  padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 500;
  background: #EEF2F7; color: var(--navy-800); letter-spacing: 0.02em;
  border: 1px solid var(--line);
}
.entity-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.entity-chip {
  padding: 3px 10px; border-radius: 4px; font-size: 11px;
  background: #FAEFD7; color: #6B4A1A; font-weight: 500;
}
.sentiment-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px;
  border-radius: 999px; font-size: 12px; font-weight: 500;
}
.sentiment-badge.positive { background: var(--forest-soft); color: #1E5A3F; }
.sentiment-badge.negative { background: #FDECEA; color: #9A2B2B; }
.sentiment-badge.neutral  { background: #F2F2EF; color: var(--mute); }

/* ---------- Analytics Dashboard ---------- */
.dashboard-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-top: 20px;
}
.dash-stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px;
  padding: 22px 20px; text-align: center;
}
.dash-stat .value {
  font-size: 36px; font-weight: 400; color: var(--navy-900);
  letter-spacing: -0.02em; line-height: 1;
}
.dash-stat .label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--mute); margin-top: 8px;
}
.chart-container {
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px;
  padding: 24px; margin-top: 20px;
}
.chart-container .chart-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--mute); font-weight: 500; margin-bottom: 16px;
}
.chart-bar-row {
  display: flex; align-items: center; gap: 12px; padding: 6px 0;
  font-size: 13px;
}
.chart-bar-label { width: 160px; color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-bar-track { flex: 1; height: 22px; background: #F2F2EF; border-radius: 2px; overflow: hidden; position: relative; }
.chart-bar-fill { height: 100%; border-radius: 2px; transition: width 0.6s cubic-bezier(0.2,0.7,0.2,1); }
.chart-bar-value { width: 48px; text-align: right; font-variant-numeric: tabular-nums; color: var(--mute); font-size: 12px; }

/* ---------- Agent Table ---------- */
.agent-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.agent-table thead th {
  text-align: left; font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute);
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.agent-table tbody td {
  padding: 14px 16px; font-size: 14px; color: var(--ink);
  border-bottom: 1px solid var(--line); vertical-align: middle;
}
.agent-table tbody tr:hover { background: #FCFBF7; }
.agent-rank {
  width: 20px; height: 20px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: 600;
}
.agent-rank.top { background: var(--gold-500); color: #fff; }
.agent-rank.other { background: #F2F2EF; color: var(--mute); }

/* ---------- Insight Cards ---------- */
.insights-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.insight-card {
  padding: 16px 20px; border-radius: 4px; border-left: 4px solid;
  background: var(--paper); border-color: var(--line);
}
.insight-card.critical { border-left-color: #C0392B; background: #FFF5F5; }
.insight-card.warning  { border-left-color: var(--amber); background: #FFFBF0; }
.insight-card.info     { border-left-color: var(--navy-700); background: #F0F4F8; }
.insight-card.positive { border-left-color: var(--forest); background: #F0F8F4; }
.insight-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.insight-detail { font-size: 13px; color: var(--mute); margin-top: 4px; line-height: 1.5; }
.insight-rec { font-size: 12px; color: var(--navy-800); margin-top: 8px; font-weight: 500; }

/* ---------- Score Comparison Mini Bar ---------- */
.mini-score-bar {
  width: 60px; height: 6px; background: #F2F2EF; border-radius: 3px;
  overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 8px;
}
.mini-score-bar .fill { height: 100%; border-radius: 3px; }

/* ---------- Empty dashboard ---------- */
.dash-empty {
  text-align: center; padding: 60px 20px; color: var(--mute);
}
.dash-empty h3 { font-size: 22px; font-weight: 400; color: var(--navy-900); margin-bottom: 8px; }
.dash-empty p { font-size: 14px; line-height: 1.6; max-width: 400px; margin: 0 auto; }

/* ---------- Upload ---------- */
/* The dropzone is the console's entry point, so it gets the one piece of
   brand teal in the sidebar — everything else there stays monochrome. */
.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--paper);
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--teal-400);
  background: rgba(13, 115, 119, 0.03);
}
.dropzone.is-dragging {
  border-color: var(--teal-600);
  border-style: solid;
  background: rgba(13, 115, 119, 0.07);
}
.dropzone-title { font-weight: 650; font-size: 13px; color: var(--ink); }
.dropzone-hint  { font-size: 11.5px; color: var(--mute); margin-top: 3px; }

.upload-report {
  margin-top: 10px;
  font-size: 11.5px;
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--forest-soft);
  color: #245c43;
}
.upload-report.has-skips { background: var(--amber-soft); color: #7a5410; }
.upload-report ul { margin: 4px 0 0; padding-left: 14px; }

/* Status pills for the evaluation lifecycle. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill-pending { background: rgba(107,114,128,.12); color: var(--mute); }
.pill-running { background: rgba(13,115,119,.12); color: var(--teal-600); }
.pill-done    { background: var(--forest-soft);   color: #245c43; }
.pill-failed  { background: rgba(196,32,32,.10);  color: #a12222; }

/* Indeterminate bar shown while a recording is being scored. */
@keyframes qa-sweep { 0% { left: -40% } 100% { left: 100% } }
.sweep {
  position: relative;
  height: 2px;
  border-radius: 2px;
  background: rgba(13,115,119,.14);
  overflow: hidden;
  margin-top: 6px;
}
.sweep::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  background: var(--teal-500);
  animation: qa-sweep 1.1s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .sweep::after { animation: none; left: 0; width: 100%; opacity: .5; }
}

/* Visually hidden but still reachable by the file picker and screen readers. */
.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;
}

/* .btn-ghost is used on an <a> for the cross-app link, which would otherwise
   carry the default underline. */
a.btn-ghost { text-decoration: none; }
