/* BATS static tool styles */
.sr-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #212529;
  line-height: 1.45;
}
.sr-breadcrumbs { margin-bottom: 0.85rem; }
.sr-breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
}
.sr-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #6c757d;
}
.sr-breadcrumb-item:not(:last-child)::after {
  content: "›";
  margin: 0 0.45rem;
  color: #adb5bd;
  font-weight: 600;
}
.sr-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #0b3d91;
  text-decoration: none;
  font-weight: 600;
}
.sr-breadcrumb-link:hover { color: #0d6efd; text-decoration: underline; }
.sr-breadcrumb-current {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #495057;
  font-weight: 600;
}
.sr-breadcrumb-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}
.sr-app, .sr-app * { box-sizing: border-box; }
.sr-app {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #212529;
  line-height: 1.45;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  overflow: hidden;
}
.sr-header {
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 1.25rem;
}
.sr-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b3d91;
}
.sr-title { margin: 0 0 0.35rem; font-size: 1.35rem; color: #0b3d91; }
.sr-subtitle { margin: 0; color: #6c757d; font-size: 0.92rem; max-width: 46rem; }
.sr-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin-top: 0.85rem;
}
.sr-field { flex: 1 1 220px; min-width: 0; }
.sr-label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.35rem; }
.sr-input-file {
  width: 100%;
  font: inherit;
  font-size: 0.92rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #ced4da;
  border-radius: 8px;
  background: #fff;
}
.sr-alert { margin-top: 0.75rem; padding: 0.65rem 0.85rem; border-radius: 8px; font-size: 0.9rem; }
.sr-alert.ok { background: #d1e7dd; color: #0f5132; }
.sr-alert.err { background: #f8d7da; color: #842029; }
.sr-meta {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #dee2e6;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem 1rem;
  font-size: 0.88rem;
}
.sr-muted { color: #6c757d; margin-right: 0.25rem; }
.sr-filter-row { display: flex; flex-wrap: wrap; gap: 0.45rem; grid-column: 1 / -1; }
.sr-input {
  flex: 1 1 180px;
  min-width: 0;
  font: inherit;
  font-size: 0.92rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #ced4da;
  border-radius: 8px;
}
.sr-btn {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.sr-btn-primary { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.sr-btn-secondary { background: #fff; color: #212529; border-color: #ced4da; }
.sr-table-wrap { max-height: 70vh; overflow: auto; background: #fff; }
.sr-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 0; }
.sr-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #cfe2ff;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #dee2e6;
}
.sr-table tbody td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #eef1f4;
  vertical-align: top;
}
.sr-table tbody tr.highlight { background: #fff3cd; box-shadow: inset 0 0 0 1px #ffc107; }
.sr-col-row { width: 4rem; white-space: nowrap; font-weight: 600; }
.sr-col-speaker { width: 11rem; }
.sr-speaker-shorthand { cursor: help; border-bottom: 1px dotted #6c757d; }
.sr-empty { padding: 2rem 1.25rem; text-align: center; color: #6c757d; }

/* Extraction viewer split layout */
.sr-shell {
  display: flex;
  min-height: 520px;
  height: min(70vh, calc(100vh - 12rem));
}
.sr-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 1rem 1.25rem 1.5rem;
  background: #f8f9fa;
}
.sr-side {
  width: 42%;
  min-width: 280px;
  min-height: 0;
  border-left: 1px solid #dee2e6;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.sr-side-header { padding: 0.85rem 1rem; border-bottom: 1px solid #dee2e6; background: #f1f3f5; flex-shrink: 0; }
.sr-side-header h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.sr-side-meta { margin: 0; color: #6c757d; font-size: 0.84rem; }
.sr-side-scroll { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }

.sr-result-tabs { display: flex; gap: 0.35rem; margin-bottom: 1rem; flex-wrap: wrap; }
.sr-tab-btn {
  background: #fff;
  color: #0d6efd;
  border: 1px solid #0d6efd;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}
.sr-tab-btn.active { background: #0d6efd; color: #fff; }
.sr-tab-panel { display: none; }
.sr-tab-panel.active { display: block; }

.sr-extraction-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.sr-meta-chip {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.84rem;
}
.sr-meta-chip-label { color: #6c757d; margin-right: 0.35rem; font-weight: 600; }

.sr-section {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.sr-section-universal { border-top: 4px solid #0d6efd; }
.sr-section-sector { border-top: 4px solid #6f42c1; }
.sr-section-header { padding: 0.85rem 1rem; background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%); border-bottom: 1px solid #eef1f4; }
.sr-section-header h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.sr-section-score {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b3d91;
}
.sr-section-desc { margin: 0; font-size: 0.85rem; color: #6c757d; line-height: 1.45; }
.sr-section-body { padding: 0.85rem; }

.sr-field-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.sr-field-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
  border-bottom: 1px solid #eef1f4;
}
.sr-field-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #495057;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.sr-field-card-header-stacked {
  border-bottom: none;
  padding-bottom: 0.45rem;
}
.sr-field-card-value-row {
  padding: 0 1rem 0.85rem;
  border-bottom: 1px solid #eef1f4;
  background: linear-gradient(180deg, #fff 0%, #fcfdff 100%);
}
.sr-field-value-checklist {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #343a40;
  word-break: break-word;
}
.sr-field-name-text { min-width: 0; line-height: 1.35; }
.sr-section-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  margin-top: 0.05rem;
  padding: 0;
  border-radius: 999px;
  flex-shrink: 0;
  font-size: 0.62rem;
  line-height: 1;
}
.sr-field-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0d6efd;
  background: #e7f1ff;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-field-value-plain { color: #212529; background: #f1f3f5; border-radius: 6px; white-space: normal; text-align: right; line-height: 1.35; }
.sr-explanation-block { padding: 0.7rem 1rem 0.9rem; background: #fcfdff; }
.sr-explanation-heading { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #868e96; margin-bottom: 0.55rem; }
.sr-explanation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8.5rem, 24%);
  gap: 1rem 1.25rem;
  align-items: start;
  padding: 0.6rem 0;
  border-top: 1px solid #eef1f4;
}
.sr-explanation-item:first-of-type { border-top: none; padding-top: 0; }
.sr-explanation-text { color: #343a40; line-height: 1.55; font-size: 0.92rem; }
.sr-sentence-item { padding: 0.75rem 0; border-top: 1px solid #eef1f4; }
.sr-sentence-item:first-child { border-top: none; padding-top: 0.35rem; }
.sr-sentence-text { font-size: 0.94rem; color: #212529; line-height: 1.5; margin-bottom: 0.35rem; }
.sr-sentence-cites { margin-bottom: 0.35rem; }

.sr-cite-link {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  background: #e7f1ff;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  color: #0d6efd;
  cursor: pointer;
  line-height: inherit;
  scroll-margin: 0;
}
.sr-cite-link:hover { background: #cfe2ff; text-decoration: underline; }
.sr-cite-link:focus { outline: 2px solid #0d6efd; outline-offset: 1px; }
.sr-cite-link:focus:not(:focus-visible) { outline: none; }

.sr-tweet-check {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.85rem 1rem 1rem;
  background: #fff;
}
.sr-v-shell {
  display: flex;
  min-height: 520px;
  height: min(78vh, calc(100vh - 10rem));
  border-top: 1px solid #dee2e6;
}
.sr-v-tweet-pane,
.sr-v-transcript-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.sr-v-tweet-pane {
  flex: 1 1 50%;
  border-right: 1px solid #dee2e6;
  background: #fff;
}
.sr-v-transcript-pane {
  flex: 1 1 50%;
  background: #fff;
}
.sr-v-pane-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #dee2e6;
  background: #f1f3f5;
  flex-shrink: 0;
}
.sr-v-pane-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #0b3d91;
}
.sr-v-pane-meta {
  margin: 0;
  color: #6c757d;
  font-size: 0.84rem;
  line-height: 1.45;
}
.sr-v-transcript-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1rem;
  margin-top: 0.55rem;
}
.sr-v-transcript-file-field {
  flex: 1 1 220px;
  min-width: 0;
}
.sr-v-upload-hint {
  margin: 0;
  flex: 1 1 160px;
  min-width: 0;
  font-size: 0.84rem;
  color: #6c757d;
  line-height: 1.35;
  padding-bottom: 0.45rem;
}
.sr-v-pane-blurb {
  margin: 0.35rem 0 0;
  color: #6c757d;
  font-size: 0.84rem;
  line-height: 1.45;
}
.sr-v-transcript-header .sr-alert {
  margin-top: 0.55rem;
}
.sr-v-transcript-header .sr-meta {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #dee2e6;
}
.sr-tweet-field {
  flex: 0 0 auto;
  min-height: 0;
}
.sr-v-transcript-pane .sr-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.sr-tweet-help {
  margin: 0 0 0.55rem;
  font-size: 0.84rem;
  color: #6c757d;
  line-height: 1.45;
}
.sr-tweet-input {
  width: 100%;
  min-height: 4.25rem;
  max-height: 8rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid #ced4da;
  border-radius: 8px;
  resize: vertical;
  background: #fff;
}
.sr-tweet-input:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 1px;
  border-color: #0d6efd;
}
.sr-tweet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
  flex-shrink: 0;
}
.sr-tweet-preview {
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #f8f9fa;
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #212529;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.sr-tweet-preview .sr-v-tweet-cite { margin: 0 0.05rem; }

@media (max-width: 960px) {
  .sr-v-shell { flex-direction: column; height: auto; min-height: 0; }
  .sr-v-tweet-pane {
    width: 100%;
    max-width: none;
    min-height: 320px;
    max-height: 50vh;
    border-right: none;
    border-bottom: 1px solid #dee2e6;
  }
  .sr-v-transcript-pane { min-height: 420px; max-height: 60vh; }
  .sr-shell { flex-direction: column; }
  .sr-side { width: 100%; min-width: 0; border-left: none; border-top: 1px solid #dee2e6; max-height: 50vh; }
  .sr-page-verifier {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .sr-page-verifier .sr-app {
    min-height: 0;
  }
}

/* BATS Verifier — fill viewport for side-by-side panes */
.sr-page-verifier {
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0.35rem 1rem 0.5rem;
  overflow: hidden;
}
.sr-page-verifier .sr-breadcrumbs {
  margin-bottom: 0.3rem;
  flex-shrink: 0;
}
.sr-page-verifier .sr-app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.sr-page-verifier .sr-v-app-header {
  padding: 0.4rem 1rem;
  flex-shrink: 0;
}
.sr-page-verifier .sr-v-app-header .sr-title {
  margin: 0;
  font-size: 1.1rem;
}
.sr-page-verifier .sr-v-shell {
  flex: 1;
  min-height: 0;
  height: auto;
}
.sr-page-verifier .sr-v-pane-header {
  padding: 0.6rem 0.85rem;
}
.sr-page-verifier .sr-tweet-check {
  padding: 0.65rem 0.85rem 0.75rem;
}
