@import url("style.css");

.playground {
  padding: 20px;
  max-width: 1100px;
}

.playground-intro {
  padding-top: 5%;
  padding-bottom: 20px;
}

.playground-intro h1 {
  padding-bottom: 20px;
  font-size: 2rem;
}

.playground-intro p {
  max-width: 60ch;
}

.tool-breadcrumb {
  margin-bottom: 12px;
}

.tool-breadcrumb a {
  color: var(--image-lightcolor);
  font-weight: 600;
}

.tool-breadcrumb a:hover {
  color: var(--link-hover);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  padding-bottom: 40px;
}

.tool-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.tool-card {
  background-color: rgba(96, 152, 122, 0.1);
  border: 1px solid rgba(96, 152, 122, 0.18);
  border-radius: 16px;
  padding: 24px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.tool-card h3 {
  margin-bottom: 0.6rem;
  color: var(--text-color);
}

.tool-card p {
  line-height: 1.6;
  color: var(--text-color);
  flex-grow: 1;
}

.tool-tag {
  font-size: 0.8rem;
  color: var(--image-lightcolor);
  margin-top: 0.8rem;
}

.playground-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.playground-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: rgba(96, 152, 122, 0.1);
  border: 1px solid rgba(96, 152, 122, 0.18);
  border-radius: 16px;
  padding: 20px;
}

.playground-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.playground-form fieldset[hidden] {
  display: none;
}

.playground-form legend {
  width: 100%;
  font-weight: 700;
  margin-bottom: 8px;
  padding: 0;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.playground-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
}

.playground-form input,
.playground-form select {
  background-color: var(--img-bg);
  color: var(--text-color);
  border: 1px solid rgba(128, 195, 183, 0.35);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-family: inherit;
}

.playground-form button {
  align-self: flex-start;
  border: none;
  cursor: pointer;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  background-color: var(--image-accentcolor);
  color: var(--bg-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.playground-form button:hover,
.playground-form button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.12);
}

.playground-results {
  min-height: 120px;
}

.playground-placeholder,
.playground-error {
  color: var(--text-color);
  opacity: 0.8;
}

.playground-error {
  color: var(--link-hover);
}

.diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 1.5rem;
}

.chart-panel {
  background-color: rgba(96, 152, 122, 0.1);
  border: 1px solid rgba(96, 152, 122, 0.18);
  border-radius: 12px;
  padding: 8px 8px 4px;
}

.chart-svg {
  width: 100%;
  height: auto;
}

.chart-title {
  fill: var(--text-color);
  font-size: 9px;
  font-weight: 700;
}

.chart-tick {
  fill: var(--text-color);
  opacity: 0.75;
  font-size: 7px;
}

.chart-tick-y {
  text-anchor: end;
  dominant-baseline: middle;
}

.chart-tick-x {
  text-anchor: middle;
}

.chart-axis {
  stroke: var(--text-color);
  opacity: 0.4;
  stroke-width: 1;
}

.chart-gridline {
  stroke: var(--text-color);
  opacity: 0.12;
  stroke-width: 1;
}

.chart-zeroline {
  stroke: var(--text-color);
  opacity: 0.35;
  stroke-width: 1;
}

.chart-refline {
  stroke: var(--link-hover);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-line {
  fill: none;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.chart-line-ink {
  stroke: var(--text-color);
}

.chart-line-accent {
  stroke: var(--image-accentcolor);
}

.chart-marker {
  fill: var(--image-accentcolor);
}

.chart-caption {
  font-size: 0.75rem;
  opacity: 0.7;
  text-align: center;
  margin: 2px 0 6px;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 0.75rem;
  opacity: 0.85;
  margin-bottom: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 12px;
  height: 2px;
  border-radius: 1px;
}

.swatch-ink {
  background-color: var(--text-color);
}

.swatch-accent {
  background-color: var(--image-accentcolor);
}

.metrics-table {
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.metrics-table th,
.metrics-table td {
  text-align: left;
  padding: 0.35rem 1rem 0.35rem 0;
}

.metrics-table th {
  font-weight: 600;
  color: var(--image-lightcolor);
}
