:root {
  color-scheme: light;
  --ink: #211917;
  --muted: #64554f;
  --red: #a41123;
  --paper: #faf6f0;
  --line: #e8dbd0;
  font-family: -apple-system, BlinkMacSystemFont, "Instrument Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.masthead {
  min-height: 4.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem clamp(1.25rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.masthead img { width: 5.25rem; height: auto; mix-blend-mode: multiply; }
main { width: min(100%, 40rem); margin: auto; padding: clamp(2rem, 7vw, 5rem) 1.25rem 2rem; }
h1 { margin: 0; font: 400 clamp(2.6rem, 8vw, 4.5rem)/1.04 "Instrument Serif", Georgia, serif; letter-spacing: -.055em; }
.lede { margin: .85rem 0 1.8rem; line-height: 1.55; color: var(--muted); }
form {
  padding: clamp(1rem, 4vw, 1.7rem);
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 .75rem 2rem #49291b0a;
}
.file-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 10rem;
  gap: .65rem;
  padding: 1rem;
  background: #fcf5f0;
  border: 1px dashed #c29188;
  border-radius: .75rem;
  text-align: center;
  overflow-wrap: anywhere;
}
.file-area svg, .file-area label { color: var(--red); }
.file-area label { font-weight: 650; }
.file-area span { color: var(--muted); font-size: .84rem; }
.file-area input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-area:focus-within, .file-area.is-over { outline: 2px solid var(--red); outline-offset: 2px; }
details { margin: .65rem 0; border-bottom: 1px solid var(--line); }
summary { padding: .8rem 0; cursor: pointer; font-size: .95rem; font-weight: 600; }
.settings { display: grid; gap: .45rem; padding-bottom: 1rem; }
.settings label { font-size: .87rem; color: var(--muted); }
.settings input {
  min-width: 0;
  min-height: 2.75rem;
  width: 100%;
  padding: .6rem .75rem;
  font: inherit;
  color: var(--ink);
  background: white;
  border: 1px solid #cdbdb2;
  border-radius: .5rem;
}
.settings input + label { margin-top: .35rem; }
button, .download {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: .85rem;
  border: 1px solid var(--red);
  border-radius: .55rem;
  font: inherit;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
}
button { margin-top: 1rem; color: white; background: var(--red); }
button:disabled { opacity: .65; cursor: wait; }
.download { color: var(--red); background: white; text-decoration: none; }
#status { margin: 1rem 0 .7rem; line-height: 1.5; overflow-wrap: anywhere; }
#status[data-error="true"] { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
