/* Benchmark dashboard styles — Vibe Monitor */
* {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.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;
}

.sample-banner {
  background: linear-gradient(90deg, #382413, #2a1b11);
  border-bottom: 1px solid #734c1a;
  color: #ffd194;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 500;
  position: relative;
  z-index: 25;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.sample-banner[hidden] {
  display: none;
}

.benchmark-error-box {
  background: #2b1717;
  border: 1px solid #7a3131;
  color: #ffb8b8;
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 24px;
  margin-bottom: 24px;
}
.benchmark-error-box[hidden] {
  display: none;
}
.benchmark-error-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}
.benchmark-error-icon {
  font-size: 18px;
  color: #ff8888;
}
.sample-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  text-align: center;
  overflow-wrap: break-word;
  word-break: break-word;
}
.sample-badge {
  display: inline-block;
  background: #5e3a13;
  border: 1px solid #946020;
  color: #ffe0b3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
}
.sample-banner-text {
  color: #ffd194;
}

.benchmark-hero {
  padding-top: 56px;
  padding-bottom: 36px;
}
.benchmark-hero h1 {
  font: 600 clamp(30px, 4.5vw, 54px) / 1.1 var(--display);
  letter-spacing: -2px;
  margin: 12px 0 16px;
  overflow-wrap: break-word;
  word-break: break-word;
}
.benchmark-lead {
  color: #abb9b8;
  font-size: 17px;
  line-height: 1.85;
  max-width: 820px;
  margin: 0 0 28px;
  overflow-wrap: break-word;
  word-break: break-word;
}
.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  width: 100%;
  max-width: 100%;
}
.meta-item {
  background: #111822;
  border: 1px solid #25333e;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}
.meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--muted);
  text-transform: uppercase;
}
.meta-item strong {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

/* Stat Tiles */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
  width: 100%;
}
.stat-card {
  background: #111720;
  border: 1px solid #28343f;
  border-radius: 12px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s;
  min-width: 0;
}
.stat-card:hover {
  border-color: #3d5060;
}
.stat-tag {
  color: var(--accent);
  font: 700 11px var(--display);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}
.stat-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.stat-number {
  font: 700 clamp(26px, 3.2vw, 38px) / 1.1 var(--display);
  color: var(--text);
  letter-spacing: -1px;
}
.stat-ci {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.stat-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: #1a2926;
  border: 1px solid #30543e;
  margin-top: 4px;
  margin-bottom: 8px;
}
.stat-badge-nodiff {
  color: #8be58b;
}
.stat-badge-diff {
  color: #76e9d1;
}
.stat-desc {
  font-size: 12px;
  line-height: 1.6;
  color: #92a4a3;
  margin: auto 0 0;
  padding-top: 8px;
}

/* Sections */
.benchmark-section {
  padding-top: 80px;
  padding-bottom: 80px;
  border-top: 1px solid rgba(135, 163, 154, 0.12);
  position: relative;
}
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.section-header-row .section-heading {
  margin-bottom: 0;
  max-width: 760px;
}
.section-subtitle {
  color: #98abaa;
  font-size: 14px;
  line-height: 1.7;
  margin: 12px 0 0;
}
.view-toggle-btn {
  background: #141c24;
  border: 1px solid #2f3e49;
  color: #c4d4d1;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.view-toggle-btn:hover {
  background: #1c2732;
  border-color: #435967;
}

/* Coverage Summary */
.coverage-summary-card {
  background: #111720;
  border: 1px solid #28343f;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.65;
  color: #c2d2d0;
  width: 100%;
}
.coverage-summary-card strong {
  color: var(--accent);
  font-weight: 600;
}

/* Agent Table & CI Charts */
.agent-table-wrapper {
  background: #111720;
  border: 1px solid #28343f;
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}
.agent-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.agent-table th {
  background: #141d27;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  padding: 14px 20px;
  border-bottom: 1px solid #28343f;
  white-space: nowrap;
}
.agent-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(42, 52, 62, 0.6);
  vertical-align: middle;
  font-size: 14px;
}
.agent-table tr:last-child td {
  border-bottom: none;
}
.agent-row-published:hover {
  background: rgba(255, 255, 255, 0.02);
}
.agent-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.agent-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #18242b;
  border: 1px solid #364e52;
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.avatar-dimmed {
  opacity: 0.5;
}
.name-dimmed {
  opacity: 0.75;
}
.metric-empty-dash {
  color: #57676a;
}
.ci-no-data {
  color: var(--muted);
}
.agent-repos-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.agent-rate-cell {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}
.rate-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: block;
}
.rate-sub {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
.agent-vshuman-cell {
  vertical-align: middle;
}
.agent-density-cell {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}
.agent-row-insufficient {
  background: rgba(18, 23, 30, 0.55);
}
.agent-row-insufficient td {
  color: #718183;
}
.insufficient-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8c9ea0;
  font-size: 13px;
  font-style: normal;
}
.insufficient-tag {
  display: inline-block;
  background: #1c262a;
  border: 1px solid #324348;
  color: #8fa1a2;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.ci-pending-box {
  display: inline-flex;
  align-items: center;
}
.ci-pending-tag {
  color: #8c9ea0;
  font-size: 13px;
  font-style: normal;
}
.ci-chart-box {
  width: 100%;
  min-width: 260px;
  max-width: 440px;
}
.ci-svg {
  width: 100%;
  height: 48px;
  display: block;
}
.ci-axis-line {
  stroke: #25333d;
  stroke-width: 1;
}
.ci-ref-line,
.ci-zero-ref {
  stroke: #486161;
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}
.ci-ref-label,
.ci-zero-label {
  fill: #6e8485;
  font-size: 10px;
  font-family: var(--sans);
  text-anchor: middle;
}
.ci-interval-line {
  stroke: #2dd4bf;
  stroke-width: 3;
  stroke-linecap: round;
}
.ci-cap {
  stroke: #2dd4bf;
  stroke-width: 2.5;
}
.ci-median-point {
  fill: #5eead4;
  stroke: #090c13;
  stroke-width: 2;
  cursor: pointer;
}
.ci-median-point:hover {
  r: 6;
}
.ci-subtext {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}
.ci-nodiff-badge {
  display: inline-block;
  background: #142827;
  border: 1px solid #28544d;
  color: #7ee7d5;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  white-space: nowrap;
}

/* Problem Category Distribution */
.family-chart-card {
  background: #111720;
  border: 1px solid #28343f;
  border-radius: 12px;
  padding: 28px 24px;
  width: 100%;
}
.family-bar-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.family-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.family-bar-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.family-name {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.family-slug {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.family-percentage {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.family-track {
  height: 20px;
  background: #162029;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid #24323c;
}
.family-fill {
  height: 100%;
  background: linear-gradient(90deg, #4d8727, #5fa32f);
  border-radius: 5px;
  min-width: 2px;
  transition: width 0.3s ease;
}
.family-fill:hover {
  background: linear-gradient(90deg, #5fa32f, #76c53d);
}
.family-axis {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #25333e;
  padding-top: 10px;
  margin-top: 16px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.family-table-container[hidden] {
  display: none;
}

/* Language Coverage */
.language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  width: 100%;
}
.language-card {
  background: #111720;
  border: 1px solid #28343f;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s;
}
.language-card:hover {
  border-color: #3b4e5c;
}
.language-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-transform: capitalize;
}
.language-repos {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* How to Read This Card */
.how-to-read-card {
  background: #111720;
  border: 1px solid #28343f;
  border-radius: 12px;
  padding: 24px 22px;
  margin-top: 24px;
  width: 100%;
}
.how-to-read-header {
  margin-bottom: 10px;
}
.how-to-read-tag {
  color: var(--accent);
  font: 700 11px var(--display);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.how-to-read-callout {
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

/* Caveats & Methodology */
.caveats-card {
  background: #111720;
  border: 1px solid #28343f;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
}
.association-callout {
  background: #14251f;
  border: 1px solid #2b543b;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.association-callout strong {
  display: block;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.association-callout p {
  font-size: 13px;
  line-height: 1.7;
  color: #c7dec9;
  margin: 0;
}
.caveats-list {
  margin: 0;
  padding-left: 20px;
  color: #9cb1af;
  font-size: 13px;
  line-height: 1.85;
}
.caveats-list li {
  margin-bottom: 8px;
}
.caveats-footer-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #23313b;
  font-size: 12px;
  color: var(--muted);
}
.caveats-footer-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Vendor Feedback */
.vendor-card {
  background: linear-gradient(145deg, #162423, #10191e);
  border: 1px solid #344d47;
  border-radius: 14px;
  padding: 32px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
}
.vendor-card h3 {
  font: 600 22px / 1.25 var(--display);
  margin: 0 0 10px;
  color: var(--text);
  letter-spacing: -0.5px;
}
.vendor-card p {
  color: #a6b9b5;
  font-size: 13px;
  line-height: 1.75;
  margin: 0;
  max-width: 720px;
}
.vendor-cta {
  flex-shrink: 0;
}

/* Tooltip */
.benchmark-tooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  background: #141e25;
  border: 1px solid #3c545b;
  border-radius: 6px;
  padding: 8px 12px;
  color: #f1f6f0;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  max-width: 300px;
}
.benchmark-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}
.tooltip-title {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 3px;
}
.tooltip-line {
  margin-top: 2px;
}

/* Accessible Table Views */
.accessible-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}
.accessible-table th {
  background: #141d27;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid #28343f;
  text-align: left;
}
.accessible-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #212c36;
  color: var(--text);
}

.footer-links {
  flex-wrap: wrap;
  gap: 12px 20px;
}

/* Responsive adjustments */
@media (max-width: 1050px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .vendor-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .vendor-cta {
    width: 100%;
  }
  .vendor-cta .button {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .container {
    width: 100%;
    max-width: calc(100% - 24px);
  }
  .benchmark-hero {
    padding-top: 36px;
    padding-bottom: 24px;
  }
  .benchmark-hero h1 {
    font-size: clamp(24px, 7vw, 36px);
    letter-spacing: -1px;
  }
  .benchmark-lead {
    font-size: 15px;
    line-height: 1.7;
  }
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stat-card {
    padding: 18px 16px;
  }
  .benchmark-section {
    padding-top: 52px;
    padding-bottom: 52px;
  }
  .section-header-row {
    margin-bottom: 20px;
  }
  .meta-strip {
    flex-direction: column;
    gap: 8px;
  }
  .meta-item {
    min-width: 0;
    width: 100%;
  }
  .agent-table th,
  .agent-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
  .ci-chart-box {
    min-width: 200px;
  }
  .language-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .caveats-card {
    padding: 20px 16px;
  }
  .vendor-card {
    padding: 22px 18px;
  }
}

@media (max-width: 420px) {
  .language-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .container {
    max-width: calc(100% - 16px);
  }
  .family-bar-labels {
    flex-wrap: wrap;
    gap: 4px;
  }
  .stat-number {
    font-size: 26px;
  }
}
