.psc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

@media (min-width: 980px) {
  .psc-grid {
    grid-template-columns: 1fr 1fr;
  }
  .psc-span-2 {
    grid-column: 1 / -1;
  }
}

.psc-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 560px) {
  .psc-row {
    grid-template-columns: 1fr 1fr;
  }
}

.psc-inline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.psc-inline span {
  font-size: 0.92rem;
  font-weight: 650;
}

.psc-textarea {
  width: 100%;
  min-height: 190px;
  font: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #fff;
}

.psc-textarea:focus-visible {
  outline: 2px solid #0b57d0;
  outline-offset: 2px;
}

.psc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.psc-actions .button {
  flex: 1 1 180px;
}

.psc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.psc-tab {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(2, 6, 23, 0.02);
  cursor: pointer;
  user-select: none;
}

.psc-tab input {
  margin: 0;
}

.psc-tab[aria-checked="true"] {
  border-color: rgba(11, 87, 208, 0.65);
  background: rgba(11, 87, 208, 0.08);
}

:root.dark .psc-tab {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

:root.dark .psc-tab[aria-checked="true"] {
  border-color: rgba(96, 165, 250, 0.75);
  background: rgba(96, 165, 250, 0.14);
}

.psc-kpi {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

@media (min-width: 980px) {
  .psc-kpi {
    grid-template-columns: 1fr 1fr;
  }
}

.psc-kpi .kpi-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
}

.psc-kpi .kpi-value {
  font-weight: 750;
}

.psc-plot-host {
  width: 100%;
  min-height: 240px;
  position: relative;
}

.psc-plot-host svg {
  display: block;
  width: 100%;
  height: auto;
}

.psc-plot-host svg circle[data-key] {
  cursor: pointer;
}

.psc-plot-host svg circle:focus {
  stroke: var(--accent);
  stroke-opacity: 0.9;
  stroke-width: 2;
}

.psc-plot-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 8px 0 10px;
}

.psc-tooltip {
  position: absolute;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #334155;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}

:root.dark .psc-tooltip {
  background: rgba(2, 6, 23, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.28);
}

.psc-tooltip-line {
  display: block;
}

.psc-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.psc-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(0, 0, 0, 0.14);
  font-variant-numeric: tabular-nums;
}

.psc-table th,
.psc-table td {
  padding: 9px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  vertical-align: middle;
}

.psc-table thead th {
  background: rgba(2, 6, 23, 0.04);
  font-weight: 750;
}

.psc-table tbody tr:nth-child(even) td {
  background: rgba(2, 6, 23, 0.02);
}

:root.dark .psc-table {
  border-color: rgba(255, 255, 255, 0.14);
}

:root.dark .psc-table th,
:root.dark .psc-table td {
  border-color: rgba(255, 255, 255, 0.14);
}

:root.dark .psc-table thead th {
  background: rgba(255, 255, 255, 0.06);
}

:root.dark .psc-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.psc-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: rgba(2, 6, 23, 0.02);
  font-size: 12px;
  font-weight: 650;
}

.psc-pill--warn {
  border-color: rgba(255, 153, 0, 0.45);
  background: rgba(255, 153, 0, 0.12);
}

:root.dark .psc-pill {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.psc-status {
  min-height: 1.2em;
  margin-top: 8px;
}

.psc-msg {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
}

.psc-msg--error {
  border: 1px solid rgba(200, 0, 0, 0.25);
  background: rgba(200, 0, 0, 0.06);
}

.psc-msg--warn {
  border: 1px solid rgba(255, 153, 0, 0.35);
  background: rgba(255, 153, 0, 0.08);
}

.psc-muted {
  color: var(--muted);
}

.psc-small {
  font-size: 0.92rem;
}

.psc-inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.psc-checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .psc-plot-host svg * {
    transition: none !important;
  }
}

