.permutations-page .site-shell {
  min-height: 100vh;
}

.permutations {
  color-scheme: dark;
  --muted: #b1aeaa;
  --border: #393633;
  --accent: #ff6549;
  max-width: 66rem;
  margin: clamp(2.25rem, 8vw, 6rem) auto 0;
  padding-bottom: 4rem;
}

.permutations [hidden] { display: none !important; }

.permutations h1 {
  font: 400 clamp(2.85rem, 7.9vw, 6.25rem)/.98 "DX Burst Smooth", Arial, sans-serif;
  display: block;
  margin: 0;
}

.permutations .intro {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  margin: 1.2rem 0 2rem;
}

.permutations .workspace {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  border: 1px solid var(--border);
  background: #111010;
}

.permutations form, .permutations .results {
  min-width: 0;
  padding: clamp(1rem, 3vw, 2rem);
}

.permutations form {
  display: grid;
  align-content: start;
  gap: 1.15rem;
  border-right: 1px solid var(--border);
}

.permutations .name-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.permutations label {
  display: grid;
  gap: .5rem;
  font-size: .875rem;
  font-weight: 600;
}

.permutations input, .permutations textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #0a0909;
  color: inherit;
}

.permutations input {
  padding: .8rem .7rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
}

.permutations input::placeholder { color: #96918c; }

.permutations button {
  min-height: 2.75rem;
  padding: .65rem 1rem;
  border: 1px solid transparent;
  border-radius: 0;
  font: 700 .9375rem/1.2 Arial, sans-serif;
  cursor: pointer;
}

.permutations :where(button, input, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.permutations .generate {
  background: var(--accent);
  color: #110b09;
}

.permutations .generate:hover { background: #ff8068; }

.permutations .results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.permutations h2 { font-size: 1.125rem; margin: 0; }

.permutations .copy {
  border-color: #645e59;
  background: transparent;
  color: inherit;
  flex: none;
}

.permutations .copy:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.permutations .copy:disabled { color: #8e8883; cursor: default; }

.permutations .copy-hint, .permutations .status {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.45;
}

.permutations .copy-hint { margin: .5rem 0 1rem; }

.permutations .result-area {
  display: grid;
  min-height: 15rem;
}

.permutations #empty-results {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  background: #0a0909;
  border: 1px solid var(--border);
  text-align: center;
}

.permutations textarea {
  display: block;
  height: 21rem;
  padding: .85rem;
  resize: vertical;
  font: .9375rem/1.65 ui-monospace, monospace;
}

.permutations .status { margin: .75rem 0 0; }
.permutations .status:empty { margin: 0; }

@media (max-width: 50rem) {
  .permutations .workspace { grid-template-columns: minmax(0, 1fr); }
  .permutations form {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .permutations .result-area { min-height: 10rem; }
  .permutations textarea { height: 18rem; }
}

@media (max-width: 22rem) {
  .permutations .name-fields { grid-template-columns: minmax(0, 1fr); }
}
