:root {
  color-scheme: light;
  --ink: #332b40;
  --muted: #665e70;
  --accent: #6c437f;
  --line: #ded7e2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: #f7f4f8;
  font:
    16px/1.6 system-ui,
    -apple-system,
    sans-serif;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 48px 32px;
}
header {
  max-width: 1000px;
  margin-bottom: 32px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.15em;
  font-weight: 750;
  color: var(--accent);
}
h1 {
  font-size: clamp(36px, 4.5vw, 62px);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 14px 0;
}
.lede {
  font-size: 23px;
  color: var(--muted);
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 26px;
}
section {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
}
h2 {
  font-size: 22px;
  margin: 0 0 20px;
}
h3 {
  font-size: 18px;
  margin-top: 28px;
}
.config-heading {
  margin-top: 28px;
}
label {
  display: block;
  font-weight: 650;
  margin: 14px 0 8px;
}
textarea,
input,
button {
  font: inherit;
}
textarea,
input {
  width: 100%;
  border: 1px solid #96869f;
  border-radius: 6px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
}
textarea {
  font:
    13px/1.6 ui-monospace,
    SFMono-Regular,
    monospace;
  resize: vertical;
}
input {
  min-height: 48px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  min-width: 0;
}
legend {
  font-size: 14px;
  color: var(--muted);
  padding: 0 5px;
}
.ratios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.ratios label {
  font-size: 14px;
  margin-top: 0;
}
button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: #fff;
  padding: 12px 20px;
  min-height: 48px;
  font-weight: 650;
  cursor: pointer;
  margin-top: 18px;
}
button:disabled {
  background: #9b8aa4;
  cursor: wait;
}
.hint,
footer {
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
}
details p {
  font-size: 14px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 320px;
  overflow: auto;
  background: #f7f4f8;
  padding: 14px;
  font:
    13px/1.6 ui-monospace,
    monospace;
}
.placeholder {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.summary {
  font-weight: 650;
}
.notice {
  border-left: 4px solid var(--accent);
  background: #f2eaf6;
  padding: 14px;
}
.table-wrap {
  overflow: auto;
  max-height: 440px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
caption {
  text-align: left;
  padding: 10px 0;
  color: var(--muted);
}
th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  background: #f5eff7;
}
th:first-child,
td:first-child {
  padding-left: 4px;
}
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.downloads a {
  min-height: 48px;
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  overflow-wrap: anywhere;
}
#error {
  background: #fff0e8;
  border-left: 4px solid #a33e25;
  color: #843521;
  padding: 14px;
}
#warnings p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
footer {
  margin-top: 28px;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid #b57619;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 950px) {
  main {
    padding: 28px 18px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  section {
    padding: 20px;
  }
  .ratios {
    gap: 8px;
  }
  .ratios input {
    padding: 10px;
  }
}
