/* HTML-Elemente mit hidden zuverlässig ausblenden. */
[hidden] {
  display: none !important;
}

:root {
  --pc-brand: #98a028;
  --pc-brand-dark: #737a1d;
  --pc-text: #222;
  --pc-muted: #687078;
  --pc-border: #d9dde1;
  --pc-grid: #e8ebed;
  --pc-bg: #fff;
  --pc-soft: #f6f7f5;
  --pc-danger: #a12622;
  --pc-radius: 10px;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: transparent; color: var(--pc-text); }
body { min-width: 280px; }
button, select, input { font: inherit; }

.pc-shell { width: 100%; padding: 2px; }

.pc-card {
  width: 100%;
  background: var(--pc-bg);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  padding: 24px;
}

.pc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.pc-kicker {
  margin: 0 0 5px;
  color: var(--pc-brand-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pc-head h1 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 500;
  line-height: 1.2;
}

.pc-intro { margin: 8px 0 0; color: var(--pc-muted); line-height: 1.5; }
.pc-updated { flex: 0 0 auto; color: var(--pc-muted); font-size: 13px; text-align: right; white-space: nowrap; }

.pc-demo {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #e0bd62;
  border-radius: 7px;
  background: #fff8df;
  color: #654a00;
  line-height: 1.4;
}

.pc-controls {
  display: grid;
  grid-template-columns: minmax(170px, 0.85fr) minmax(170px, 0.85fr) minmax(260px, 1.4fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 12px;
}

.pc-field { position: relative; display: grid; gap: 6px; min-width: 0; }
.pc-field > span { font-size: 13px; font-weight: 700; }

.pc-field select,
.pc-product-button,
.pc-menu-tools input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #aeb4b8;
  border-radius: 6px;
  background: #fff;
  color: var(--pc-text);
  padding: 9px 12px;
  outline: none;
}

.pc-field select:focus,
.pc-product-button:focus,
.pc-menu-tools input:focus {
  border-color: var(--pc-brand);
  box-shadow: 0 0 0 3px rgba(152, 160, 40, 0.18);
}

.pc-product-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}

.pc-chevron { font-size: 20px; line-height: 1; transform: translateY(-2px); }

.pc-product-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  min-width: 320px;
  max-height: 420px;
  overflow: hidden;
  border: 1px solid #aeb4b8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.pc-menu-tools {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px;
  border-bottom: 1px solid var(--pc-border);
  background: #fff;
}

.pc-menu-tools input { min-height: 38px; padding: 7px 10px; }

.pc-menu-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.pc-menu-actions button {
  border: 0;
  background: transparent;
  color: var(--pc-brand-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 6px;
}

.pc-product-options { max-height: 310px; overflow: auto; padding: 6px 0 10px; }

.pc-group-title {
  margin: 10px 12px 4px;
  color: #4f5559;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pc-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  cursor: pointer;
}

.pc-option:hover { background: var(--pc-soft); }
.pc-option input { width: 17px; height: 17px; accent-color: var(--pc-brand); }

.pc-swatch {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.pc-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 0;
  margin: 0 0 8px;
}

.pc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  background: var(--pc-soft);
  color: #34393d;
  padding: 5px 8px 5px 9px;
  font-size: 12px;
}

.pc-chip button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #e5e8e9;
  cursor: pointer;
  line-height: 18px;
  padding: 0;
}

.pc-chart-title { margin: 12px 0 8px; text-align: center; }
.pc-chart-title h2 { margin: 0; font-size: clamp(17px, 1.6vw, 22px); font-weight: 500; }
.pc-chart-title p { min-height: 19px; margin: 4px 0 0; color: var(--pc-muted); font-size: 13px; }

.pc-chart-wrap {
  position: relative;
  width: 100%;
  height: 430px;
  min-height: 330px;
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

#pc-chart { display: block; width: 100%; height: 100%; touch-action: none; }
.pc-grid-line { stroke: var(--pc-grid); stroke-width: 1; shape-rendering: crispEdges; }
.pc-axis-line { stroke: #697076; stroke-width: 1; shape-rendering: crispEdges; }
.pc-axis-text { fill: #4f5559; font-size: 12px; }
.pc-axis-title { fill: #333; font-size: 12px; font-weight: 700; }

.pc-chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.pc-chart-point { vector-effect: non-scaling-stroke; }

.pc-crosshair {
  stroke: #8d959a;
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.pc-tooltip {
  position: absolute;
  z-index: 10;
  min-width: 185px;
  max-width: min(330px, calc(100% - 20px));
  border: 1px solid #73797d;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
  color: #222;
  padding: 9px 10px;
  pointer-events: none;
  font-size: 12px;
}

.pc-tooltip-title { margin-bottom: 6px; font-weight: 700; }

.pc-tooltip-row {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  margin: 4px 0;
}

.pc-tooltip-row span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-tooltip-row strong { white-space: nowrap; }

.pc-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 25px;
  color: var(--pc-muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
}

.pc-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  min-height: 20px;
  margin: 12px 0 0;
}

.pc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #333;
  cursor: pointer;
  font-size: 12px;
  padding: 3px 1px;
}

.pc-legend-item:hover { text-decoration: underline; }
.pc-legend-line { width: 22px; height: 3px; border-radius: 4px; }

.pc-note {
  margin-top: 17px;
  border-top: 1px solid var(--pc-border);
  padding-top: 12px;
  color: #555d62;
  font-size: 12px;
  line-height: 1.5;
}

.pc-error {
  margin-top: 14px;
  border: 1px solid #e1aaa7;
  border-radius: 6px;
  background: #fff2f1;
  color: var(--pc-danger);
  padding: 10px 12px;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .pc-card { padding: 16px 12px; border-radius: 7px; }
  .pc-head { display: block; }
  .pc-updated { margin-top: 8px; text-align: left; }
  .pc-controls { grid-template-columns: 1fr; gap: 10px; }
  .pc-product-menu { min-width: 0; }
  .pc-chart-wrap { height: 400px; }
  .pc-axis-text { font-size: 11px; }
}

@media (max-width: 430px) {
  .pc-chart-wrap { height: 370px; }
  .pc-head h1 { font-size: 22px; }
  .pc-intro { font-size: 13px; }
}
