:root {
  --paper: #fbfaf7;
  --ink: #243442;
  --muted: #53616c;
  --line: #d6d8d6;
  --accent: #294f80;
  --wash: #edf1f4;
  --note: #70480d;
  --note-wash: #f8eedb;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    17px / 1.5 Georgia,
    serif;
}
::selection {
  background: var(--accent);
  color: var(--paper);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
button {
  min-height: 44px;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 16px;
  cursor: pointer;
}
button:not(:disabled):hover {
  background: var(--wash);
}
button.primary {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.primary:not(:disabled):hover {
  filter: brightness(0.9);
  background: var(--accent);
}
button.link {
  border-color: transparent;
  padding: 8px;
}
.wrap {
  max-width: 1240px;
  padding: 0 32px;
  margin: auto;
}
.skip {
  position: absolute;
  top: -80px;
  left: 16px;
  background: var(--paper);
  padding: 12px;
  z-index: 1;
}
.skip:focus {
  top: 8px;
}
header {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding: 20px 0 12px;
  border-bottom: 1px solid var(--line);
}
header h1 {
  font:
    bold 26px Georgia,
    serif;
  letter-spacing: -0.025em;
  margin: 0;
}
header p {
  margin: 0;
  color: var(--muted);
}
header a {
  margin-left: auto;
  font-size: 15px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.preview-note {
  color: var(--muted);
  font-size: 15px;
  margin: 16px 0 24px;
  max-width: 75ch;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}
.workspace > * {
  min-width: 0;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-color: var(--line) var(--paper);
  scrollbar-width: thin;
}
.tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  font-size: 16px;
  white-space: nowrap;
  padding: 12px 16px;
}
.tabs button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  background: var(--wash);
  color: var(--accent);
}
.panehead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  min-height: 32px;
  margin: 20px 0 12px;
}
.panehead h2 {
  font:
    normal 18px Georgia,
    serif;
  margin: 0;
}
.panehead label {
  margin: 0;
  font: inherit;
}
.panehead code {
  font:
    14px ui-monospace,
    monospace;
  color: var(--muted);
}
textarea,
pre {
  font:
    15px / 1.7 ui-monospace,
    monospace;
  tab-size: 2;
  scrollbar-color: var(--line) var(--paper);
}
textarea {
  display: block;
  width: 100%;
  height: 320px;
  resize: vertical;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 12px;
  caret-color: var(--accent);
}
pre {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  white-space: pre;
  padding: 12px 0;
  color: var(--ink);
}
.hint {
  font-size: 15px;
  color: var(--muted);
  margin: 12px 0;
  max-width: 68ch;
}
.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.controls button {
  font-size: 15px;
}
.status {
  font-size: 15px;
  color: var(--muted);
  min-height: 24px;
  margin: 0;
}
label {
  display: block;
  font-size: 15px;
  margin: 12px 0 4px;
}
input {
  width: 100%;
  min-width: 0;
  font:
    16px / 1.4 Georgia,
    serif;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  min-height: 44px;
  padding: 8px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.form h3 {
  font-size: 16px;
  font-weight: normal;
  margin: 16px 0 0;
}
.review {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--wash);
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.review p {
  margin: 4px 0 0;
  line-height: 1.5;
}
details {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 8px;
  font-size: 15px;
}
summary {
  cursor: pointer;
  min-height: 44px;
  align-content: center;
}
details p {
  color: var(--muted);
  max-width: 68ch;
}
details code {
  font:
    14px ui-monospace,
    monospace;
}
footer {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding: 16px 0 24px;
  font-size: 15px;
  color: var(--muted);
}
footer p {
  margin: 0;
  max-width: 70ch;
}
.colophon {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.colophon-meta {
  display: flex;
  align-items: center;
  gap: 4px 20px;
  flex-wrap: wrap;
}
.colophon nav {
  display: flex;
  gap: 4px 20px;
  flex-wrap: wrap;
}
.colophon a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.colophon strong {
  font-size: 16px;
  font-weight: normal;
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #192229;
    --ink: #ecebe3;
    --muted: #b3bdc4;
    --line: #46525b;
    --accent: #b2ccf0;
    --wash: #283947;
    --note: #ffdc9f;
    --note-wash: #42351f;
    color-scheme: dark;
  }
}
@media (max-width: 800px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .wrap {
    padding: 0 24px;
  }
  header {
    flex-wrap: wrap;
    gap: 4px 16px;
  }
  header p {
    font-size: 15px;
  }
  header a {
    margin-left: auto;
  }
  .preview-note {
    margin: 12px 0 20px;
  }
  .tabs button {
    padding: 10px 12px;
  }
  textarea {
    height: 220px;
    font-size: 16px;
  }
  pre {
    max-height: 240px;
  }
  .controls {
    gap: 4px 8px;
  }
  footer {
    margin-top: 24px;
  }
}
@media (max-width: 400px) {
  .wrap {
    padding: 0 18px;
  }
  .tabs button {
    font-size: 15px;
    padding: 10px 9px;
  }
  .panehead {
    flex-wrap: wrap;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .review {
    padding: 8px 12px;
  }
  .review .name-parts {
    gap: 8px 20px;
  }
}

select {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  min-height: 44px;
  border: 1px solid var(--line);
  max-width: 100%;
  padding: 8px;
}
button:focus-visible,
a:focus-visible {
  outline-offset: 3px;
}
.author-row {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 4px;
}
.author-row legend {
  padding: 0 8px 0 0;
}
fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
#message {
  padding: 12px 0;
  min-height: 48px;
  max-width: 70ch;
}
#message[data-error="true"] {
  color: var(--note);
}
#review-fields .fields {
  margin-top: 12px;
}
.review input {
  background: var(--paper);
}
#notes {
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}
#notes li {
  margin: 8px 0;
}
#empty-result {
  padding: 32px 0;
  min-height: 240px;
  color: var(--muted);
}
#output-panel[data-stale="true"] pre {
  color: var(--muted);
}
.file-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.file-tools label {
  margin: 0;
}
.file-tools select {
  font-size: 15px;
}
.drop-active {
  outline: 3px dashed var(--accent);
  outline-offset: 4px;
}
#runtime {
  font-size: 15px;
  color: var(--muted);
  margin-top: 12px;
}
#retry {
  font-size: 15px;
}
.colophon nav {
  align-items: center;
}
#source-format {
  max-width: 200px;
}
#output {
  overflow-wrap: normal;
}
#result-title {
  font:
    normal 18px Georgia,
    serif;
  margin: 24px 0 12px;
}
.name-original {
  overflow-wrap: anywhere;
  margin-top: 16px;
}
#message {
  overflow-wrap: anywhere;
}
#version-label {
  font-size: 15px;
}
textarea[aria-invalid="true"] {
  border-color: var(--note);
}
@media (max-width: 800px) {
  #empty-result {
    min-height: 120px;
  }
  .file-tools {
    gap: 8px;
  }
  .panehead select {
    max-width: 100%;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
#message:empty {
  display: none;
}

#output-choice { display: flex; gap: 12px; align-items: center; margin: 16px 0; }
#output-choice label { margin: 0; flex: none; }
#output-file { min-width: 0; width: 100%; }
#template-warning { border-top: 1px solid var(--line); }
#template-warning details { margin: 0 0 12px; }
#template-notes { padding-left: 20px; color: var(--muted); overflow-wrap: anywhere; }
.use { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; }
.use h2 { font: normal 22px Georgia, serif; margin: 0; }
.use p { font-size: 15px; color: var(--muted); max-width: 70ch; }
.use pre { font-size: 15px; }
.usage-docs { font-size: 15px; display: inline-flex; min-height: 44px; align-items: center; margin-left: 16px; }

.code-block { position: relative; border: 1px solid var(--line); background: var(--wash); }
.code-block pre { padding: 16px; padding-right: 64px; }
.code-copy { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 44px; padding: 8px; background: var(--paper); }
.code-copy svg { pointer-events: none; }
#name-review { background: transparent; padding: 0; margin: 12px 0; font-size: 15px; }
#name-review[open] { padding-bottom: 16px; }
#snippet-status:empty { display: none; }
#template-notes:empty { display: none; }

@media (forced-colors: active) {
  button.primary {
    forced-color-adjust: none;
    background: ButtonText;
    color: ButtonFace;
    border-color: ButtonText;
  }
  button.primary:not(:disabled):hover {
    background: ButtonText;
    filter: none;
  }
}

#output { height: 320px; max-height: none; }
#details-notes, #template-warning, #filename-note {
  color: var(--note);
  background: var(--note-wash);
  border: 1px solid var(--line);
  padding: 8px 12px;
}
#template-warning { margin-top: 16px; font-size: 15px; }
#details-notes summary { font-weight: bold; }
#notes, #template-notes, #template-warning .hint { color: inherit; }
@media (max-width: 800px) {
  #output { height: 240px; }
}

#message[data-notice="true"], #status[data-notice="true"] {
  color: var(--note);
  background: var(--note-wash);
  border: 1px solid var(--line);
  padding: 8px 12px;
}
#status:empty { display: none; }
#exports { padding-bottom: 8px; }
#details-notes { margin-top: 12px; }
.field-hint { margin: 2px 0 6px; font-size: 15px; }
.field-help { margin: 4px 0 12px; padding: 0; border: 0; }
.field-help summary { color: var(--accent); }
.field-help p { margin: 0 0 12px; }
