:root {
  color-scheme: light dark;
  --bg: #f8f9fb;
  --surface: #fff;
  --text: #111827;
  --muted: #4b5563;
  --line: #d1d5db;
  --brand: #047857;
  --tint: #ecfdf5;
  --error: #b91c1c;
  --warn-bg: #fffbeb;
  --warn-line: #b45309;
  font:
    16px/1.6 'Geist',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e14;
    --surface: #151821;
    --text: #f0f2f5;
    --muted: #c9cdd5;
    --line: #414754;
    --brand: #6ee7b7;
    --tint: #15362e;
    --error: #fca5a5;
    --warn-bg: #2d2412;
    --warn-line: #fbbf24;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--brand);
  text-underline-offset: 3px;
}
a,
button,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
  scroll-margin: 1rem;
}
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  min-height: 44px;
  color: var(--text);
  background: var(--surface);
  touch-action: manipulation;
}
button:hover {
  border-color: var(--brand);
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  top: -6rem;
  left: 1rem;
  background: var(--surface);
  padding: 1rem;
  z-index: 1;
}
.skip:focus {
  top: 0;
}
.site-nav {
  border-bottom: 1px solid var(--line);
  padding: 1rem max(1rem, calc((100vw - 1080px) / 2));
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  background: var(--surface);
}
.brand {
  font-weight: 750;
  text-decoration: none;
  color: var(--text);
}
main {
  max-width: 1080px;
  margin: auto;
  padding: 2.5rem 1rem 4rem;
}
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0.5rem 0 1rem;
  text-wrap: balance;
}
h2 {
  font-size: 1.4rem;
  line-height: 1.3;
}
h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}
p {
  max-width: 76ch;
}
code {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}
.intro {
  color: var(--muted);
  margin-bottom: 2rem;
}
.workspace {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 1.5rem;
  min-width: 0;
}
legend {
  float: left;
  padding: 0;
  font-weight: 650;
  margin-bottom: 0.6rem;
}
label[for='command'] {
  clear: both;
  display: block;
  font-size: 0.9rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
}
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  padding: 0.75rem;
  resize: vertical;
  font:
    0.9rem/1.6 'Geist Mono',
    ui-monospace,
    monospace;
  white-space: pre;
  overflow-x: auto;
  tab-size: 2;
}
textarea[aria-invalid='true'] {
  border-color: var(--error);
}
.hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.65rem 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-size: 0.95rem;
}
.check input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--brand);
  flex: none;
}
#error {
  color: var(--error);
  font-weight: 600;
}
#feedback {
  font-weight: 600;
}
#error:empty,
#feedback:empty {
  margin: 0;
}
.result {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--tint);
}
.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}
.result h2 {
  margin: 0 0 0.5rem;
  font-family: 'Geist Mono', ui-monospace, monospace;
}
#summary {
  margin: 0 0 0.5rem;
  color: var(--muted);
}
#copy,
#download {
  font-weight: 650;
}
.notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.notes-list li {
  border-left: 3px solid var(--brand);
  background: var(--surface);
  padding: 0.55rem 0.8rem;
  border-radius: 0 6px 6px 0;
  overflow-wrap: anywhere;
}
.notes-list li.warning {
  border-left-color: var(--warn-line);
  background: var(--warn-bg);
}
.table-scroll {
  overflow-x: auto;
  margin: 0.5rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}
caption {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-weight: 650;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--line);
}
th {
  font-weight: 650;
}
td:first-child {
  min-width: 11rem;
}
td:nth-child(2) {
  min-width: 9rem;
}
td:last-child {
  color: var(--muted);
  min-width: 14rem;
}
tr.run-only td:first-child code,
tr.not-converted td:first-child code {
  color: var(--muted);
}
.warnings {
  border-left: 3px solid var(--brand);
  margin: 1.5rem 0;
  padding: 0.1rem 1rem;
}
.warnings h2 {
  font-size: 1.1rem;
}
.notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.5rem;
  margin-top: 2rem;
}
.notes p,
.notes li,
.reference > p {
  color: var(--muted);
}
.notes ul {
  padding-left: 1.25rem;
}
.notes li {
  margin-bottom: 0.4rem;
}
.reference {
  margin-top: 2rem;
}
footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 0;
  margin-top: 2rem;
}
@media (max-width: 640px) {
  main {
    padding-top: 1.5rem;
  }
  fieldset,
  .result {
    padding: 1rem;
  }
  .actions button {
    flex: 1 1 100%;
  }
  .notes {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
