.taylor-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.taylor-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.taylor-inputs label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  flex: 1 1 200px;
  font-size: 0.95rem;
}

.taylor-inputs textarea {
  min-height: 72px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  resize: vertical;
}

.taylor-inputs input[type="number"],
.taylor-inputs input[type="text"] {
  font-variant-numeric: tabular-nums;
}

.taylor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#err {
  color: #b00020;
  min-height: 1.2rem;
}

.taylor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
}

.taylor-grid canvas {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 8px;
  width: 100%;
  height: auto;
  min-height: 280px;
}

.kv {
  display: grid;
  grid-template-columns: 8rem auto;
  gap: 4px 8px;
  align-items: baseline;
  margin-bottom: 8px;
}

.kv strong {
  font-weight: 600;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  word-break: break-word;
}

.taylor-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}

.taylor-table th,
.taylor-table td {
  border: 1px solid var(--border-color, #d1d5db);
  padding: 0.4rem 0.5rem;
  text-align: right;
}

.taylor-table th:first-child,
.taylor-table td:first-child {
  text-align: center;
}

.taylor-table caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 4px;
}

#steps {
  display: grid;
  gap: 6px;
}

#steps li {
  line-height: 1.4;
}

.lang-switch {
  margin-top: 12px;
}

.examples-panel {
  position: relative;
}

.examples-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  margin-top: 8px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  min-width: 240px;
}

.examples-popover h3 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
}

.examples-popover ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.examples-popover button {
  width: 100%;
  text-align: left;
}

.teacher-notes-list {
  display: grid;
  gap: 6px;
  padding-left: 1.25rem;
}

.ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cbd5f5;
  border-radius: 8px;
  color: #6b7280;
  min-height: 200px;
}

@media (max-width: 1024px) {
  .taylor-grid {
    grid-template-columns: 1fr;
  }

  .examples-popover {
    position: static;
    box-shadow: none;
  }
}
