/* Chart-specific styles ported from the original project's style.css.
   Generic body / heading / table styles intentionally omitted so they
   don't override the portfolio's design system. */

.crossing-label {
  font-size: 0.6rem;
  fill: #333;
  pointer-events: none;
}

.prelim-charts-row {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.prelim-charts-row > div {
  width: 100%;
}

#prelim-generation-lines svg,
#prelim-generation-bars svg {
  background: #f9fafb;
  border-radius: 6px;
  width: 100%;
}

#prelim-generation-lines strong,
#prelim-generation-bars strong {
  display: block;
  font-size: 0.95rem;
  color: rgb(var(--fg));
  margin-bottom: 0.25rem;
}

#prelim-generation-lines p,
#prelim-generation-bars p {
  font-size: 0.8rem;
  color: rgb(var(--fg) / 0.6);
  margin: 0 0 0.5rem 0;
}

#design1-container {
  position: relative;
  margin: 1.5rem 0;
  border: 1px solid rgb(var(--fg) / 0.12);
  border-radius: 0.75rem;
  padding: 1rem;
  background: #fff;
  color: #222;
}

#design1-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

#design1-controls label {
  font-size: 0.85rem;
  color: #555;
}

#design1-controls input[type="range"] {
  width: 200px;
}

#design1-toggle {
  padding: 0.4rem 1rem;
  border: 1px solid #999;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  color: #222;
}

#design1-toggle:hover {
  background: #eee;
}

#design1-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  z-index: 10;
}

#design1-year-display {
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 2.5rem;
}

.design1-legend {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: #555;
}

.design1-legend rect {
  stroke: #ccc;
  stroke-width: 0.5;
}

#design-container {
  position: relative;
  border-radius: 0.75rem;
  border: 1px solid rgb(var(--fg) / 0.12);
  padding: 1.5rem 1rem;
  background-color: #fff;
  color: #222;
  margin: 1.5rem 0;
}

#design2-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

#design2-controls input[type="range"] {
  width: 200px;
}

#design2-controls label {
  font-size: 0.85rem;
  color: #555;
}

#design2-controls button {
  padding: 0.4rem 1rem;
  border: 1px solid #999;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  color: #222;
}

#design2-controls button:hover {
  background: #eee;
}

#design2-year-display {
  font-weight: 600;
  font-size: 0.95rem;
}

#design2-views {
  display: grid;
  grid-template-columns: 200px 1fr 260px;
  grid-template-rows: auto;
  gap: 0.5rem;
  align-items: start;
}

@media (max-width: 720px) {
  #design2-views {
    grid-template-columns: 1fr;
  }
}

#design2-donut {
  justify-self: center;
}

#design2-map svg,
#design2-bars svg {
  background: #fff;
  border-radius: 4px;
  width: 100%;
}

#design2-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  z-index: 10;
}

#design2-bars .bar-label {
  font-size: 0.7rem;
  fill: #333;
}

#design2-bars .bar-value {
  font-size: 0.65rem;
  fill: #666;
}

.design2-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.design2-view-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #444;
}

.design2-dropdown {
  font-size: 0.7rem;
  padding: 0.15rem 0.3rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

#design2-legend {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.5rem 0 0 0;
}

#design2-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: #555;
}

#design2-legend .legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

#design3-container {
  position: relative;
  margin: 1.5rem 0;
  border: 1px solid rgb(var(--fg) / 0.12);
  padding: 1.5rem 1rem;
  background-color: #fff;
  color: #222;
  border-radius: 0.75rem;
}

#design3-container svg {
  background: #fff;
}

#design3-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

#design3-controls button {
  padding: 0.4rem 1rem;
  border: 1px solid #999;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  color: #222;
}

#design3-controls button:hover {
  background: #eee;
}

#design3-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  z-index: 10;
}
