:root {
  color-scheme: light;
  --ink: #142c2a;
  --muted: #49655f;
  --paper: #f2f5ef;
  --line: #c1d0c6;
  --accent: #14614b;
  --result: #122f2a;
  --result-soft: #b5d5c7;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 73rem; margin: auto; padding: clamp(1.25rem, 5vw, 4rem); }
header { padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.brand { color: var(--accent); font-weight: 750; text-underline-offset: .24em; }
h1, h2, p { margin: 0; }
h1 {
  max-width: 14ch;
  margin-block: .55em .22em;
  font-family: Georgia, serif;
  font-size: clamp(2.55rem, 6.5vw, 5.65rem);
  font-weight: 500;
  letter-spacing: -.053em;
  line-height: .97;
}
header p, .method p, form > p { color: var(--muted); }
p, li { max-width: 67ch; line-height: 1.55; }
header p { font-size: clamp(1rem, 2vw, 1.2rem); }
h2 { font-size: 1.23rem; line-height: 1.25; letter-spacing: -.02em; margin-bottom: .55rem; }
.workspace { margin-block: 1.5rem 2.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
form, .results { padding: clamp(1rem, 3.2vw, 2rem); border-radius: .75rem; min-width: 0; }
form { background: #fff; border: 1px solid var(--line); }
form p { margin-bottom: 1.3rem; }
label { display: block; margin-bottom: .4rem; font-size: .9rem; font-weight: 700; }
input, textarea { font: inherit; width: 100%; }
input[type=file] { min-height: 2.6rem; margin-bottom: 1rem; color: var(--muted); }
input::file-selector-button, button {
  min-height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: .38rem;
  background: #fff;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  padding: .47rem .7rem;
  cursor: pointer;
}
input::file-selector-button { margin-inline-end: .55rem; }
textarea {
  min-height: 6rem;
  border: 1px solid var(--line);
  border-radius: .38rem;
  padding: .65rem;
  resize: vertical;
  color: var(--ink);
  font: .9rem/1.48 ui-monospace, monospace;
}
.actions { margin-top: .65rem; display: flex; flex-wrap: wrap; gap: .5rem; }
button[type=submit] { background: var(--accent); border-color: var(--accent); color: white; }
button:disabled { opacity: .65; cursor: wait; }
button:hover:not(:disabled), input::file-selector-button:hover { filter: brightness(.93); }
:focus-visible { outline: 3px solid #c27812; outline-offset: 3px; }
.results { background: var(--result); color: #fff; }
.results p, dt { color: var(--result-soft); }
dl { margin: 1rem 0; }
dl div { border-block-start: 1px solid #4b6860; padding: .65rem 0; display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
dt { font-size: .92rem; }
dd { margin: 0; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.results ul { margin: 0; padding-left: 1.2rem; }
.results li + li { margin-top: .25rem; }
.method { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.method p + p { margin-top: .7rem; }
.method ul { padding-left: 1.2rem; margin-bottom: 0; }
.method a { color: var(--accent); text-underline-offset: .2em; }

@media (max-width: 45rem) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  header { padding-bottom: 1.45rem; }
}
