:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: #f5f7f9;
  color: #17202a;
  margin: 0;
}

.app {
  min-height: 100vh;
  padding: 24px;
}

.workspace {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(260px, 380px) minmax(280px, 1fr) minmax(240px, 340px);
  margin: 0 auto;
  max-width: 1280px;
}

.controls,
.diagnostics {
  align-self: start;
}

.eyebrow {
  color: #586579;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: 1.8rem;
  line-height: 1.15;
}

h2 {
  font-size: 1.1rem;
  margin-bottom: 14px;
}

h3 {
  font-size: 0.95rem;
  margin-top: 24px;
}

.diagnostics h2:not(:first-child) {
  margin-top: 24px;
}

label {
  display: grid;
  font-size: 0.86rem;
  font-weight: 700;
  gap: 8px;
  margin-top: 20px;
}

textarea,
select,
input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #17202a;
  font: inherit;
  min-width: 0;
  padding: 10px 12px;
}

textarea {
  min-height: 138px;
  resize: vertical;
}

.control-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.button {
  align-items: center;
  background: #0f766e;
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 700;
  min-height: 40px;
  padding: 0 16px;
  text-decoration: none;
}

.button--small {
  font-size: 0.82rem;
  min-height: 34px;
  padding: 0 12px;
}

.button[aria-disabled="true"] {
  background: #94a3b8;
  pointer-events: none;
}

.preview-area {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe3ea;
  display: grid;
  min-height: min(72vh, 720px);
  padding: 24px;
}

.preview {
  display: grid;
  gap: 18px;
  justify-content: center;
  overflow: auto;
}

.preview svg {
  height: auto;
  max-height: min(66vh, 680px);
  max-width: 100%;
  width: min(62vw, 680px);
}

.preview--set {
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  justify-content: stretch;
  width: 100%;
}

.preview-card {
  border: 1px solid #dbe3ea;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.preview-card h2 {
  font-size: 0.98rem;
  line-height: 1.2;
}

.symbol-image {
  display: grid;
  justify-content: center;
  min-height: 180px;
  overflow: auto;
}

.symbol-image svg {
  max-height: 260px;
  width: min(100%, 260px);
}

.symbol-meta {
  font-size: 0.82rem;
  gap: 7px;
}

.symbol-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 6px;
  color: #9f1239;
  font-weight: 700;
  padding: 12px;
}

.diagnostics {
  background: #ffffff;
  border: 1px solid #dbe3ea;
  padding: 18px;
}

dl {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  margin: 0;
}

dt {
  color: #586579;
  font-size: 0.84rem;
}

dd {
  font-weight: 700;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
}

li {
  color: #475569;
  font-size: 0.9rem;
}

[hidden] {
  display: none !important;
}

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

  .preview-area {
    min-height: 360px;
  }

  .preview svg {
    width: min(86vw, 520px);
  }
}
