.quick-charts-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
}

.quick-charts-tab {
  appearance: none;
  border: 1px solid #d0d7de;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: #f6f8fa;
  color: #24292f;
  cursor: pointer;
  padding: 0.45rem 0.85rem;
  font-weight: 500;
}

.quick-charts-tab.active {
  background: #ffffff;
  font-weight: 600;
}

.quick-charts-tab:focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 2px;
}

.quick-charts-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.quick-charts-panel.hidden {
  display: none;
}

.quick-charts-panel label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 11rem;
}

.quick-charts-panel textarea {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

.quick-charts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.quick-charts-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 11rem;
}

.quick-charts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.quick-charts-actions button {
  cursor: pointer;
}

.quick-charts-actions .primary {
  background: #0b57d0;
  border: 1px solid #0b57d0;
  color: #ffffff;
}

#qc-chart {
  border: 1px dashed #d0d7de;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafbfc;
  padding: 0.5rem;
}

#qc-chart svg {
  max-width: 100%;
  height: auto;
}

#qc-stats {
  margin-top: 0.75rem;
  border-collapse: collapse;
  width: 100%;
  font-feature-settings: 'tnum';
}

#qc-stats th,
#qc-stats td {
  border-bottom: 1px dashed #d0d7de;
  padding: 0.35rem 0.5rem;
  text-align: right;
}

#qc-stats th {
  text-align: left;
  font-weight: 600;
}

#qc-error {
  color: #b00020;
  margin-top: 0.5rem;
}

#qc-share-status {
  margin-top: 0.5rem;
  color: #0b57d0;
}

#qc-share-status.error {
  color: #b00020;
}

.quick-charts-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
}

@media (max-width: 960px) {
  .quick-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .quick-charts-tabs,
  .quick-charts-panel,
  .quick-charts-row,
  .quick-charts-actions,
  #qc-error,
  #qc-share-status,
  header,
  footer,
  .lang-switch,
  #comments {
    display: none !important;
  }

  main.container {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  #qc-chart {
    border: none;
    background: #ffffff;
  }
}
