:root {
  color-scheme: light;
  --paper: #faf5ef;
  --ink: #241c20;
  --wine: #582b41;
  --rule: #cbbdb5;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
body { margin: 0 auto; width: min(100% - 4rem, 920px); background: var(--paper); color: var(--ink); font: 15px/1.45 "Segoe UI", system-ui, sans-serif; }
a { color: var(--wine); text-underline-offset: 4px; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 1.4rem; padding: 1.4rem 0 .8rem; border-bottom: 1px solid var(--rule); }
.brand { color: inherit; text-decoration: none; font: 1.85rem/1.1 var(--serif); letter-spacing: -.05em; }
nav { display: flex; flex-wrap: wrap; gap: .45rem 1.8rem; }
nav a { display: inline-flex; align-items: center; gap: .4rem; color: inherit; text-decoration: none; border-bottom: 2px solid transparent; padding: .35rem 0; }
nav a svg { width: 1.15em; height: 1.15em; flex: none; }
nav a.nav-verify { color: var(--wine); font-weight: 600; }
nav a:hover, nav [aria-current] { border-color: var(--wine); }
main { padding: 2.2rem 0 3rem; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: normal; font-style: italic; letter-spacing: -.047em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.55rem); line-height: 1.05; margin-bottom: 1.75rem; }
h2 { display: flex; align-items: center; gap: 1rem; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.1; margin-bottom: .65rem; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.issue-layout { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(135px, 1fr); gap: clamp(1rem, 6vw, 4rem); }
.issuer span, .fields label { display: block; }
.issuer strong { font: 1.65rem/1.2 var(--serif); }
.fields { display: grid; gap: .65rem; margin-top: 1rem; }
input:not([type=file]), .file-control { display: block; width: 100%; border: 1px solid var(--rule); color: inherit; background: transparent; font: inherit; }
input:not([type=file]) { padding: .45rem .65rem; margin-top: .15rem; }
.file-control { position: relative; display: flex !important; align-items: stretch; cursor: pointer; }
.file-caption { flex: 1; align-self: center; overflow-wrap: anywhere; padding: .55rem .65rem; }
.file-button { display: grid; place-items: center; text-align: center; padding: .55rem .75rem; background: #eae0db; }
.file-control input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
:focus-visible, .file-control:focus-within { outline: 2px solid var(--wine); outline-offset: 3px; }
.history { margin-top: 1.6rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .93rem; }
th, td { padding: .38rem .5rem .38rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; }
td:nth-child(n+2) { white-space: nowrap; }
.primary { display: block; width: min(100%, 560px); margin-top: 1.55rem; border: 0; background: var(--wine); color: #fff7f2; font: 1.5rem/1.2 var(--serif); padding: .8rem; cursor: pointer; transition: background .18s cubic-bezier(.2,.75,.25,1); }
.primary:hover { background: #6f3954; }
.primary:disabled { opacity: .7; cursor: wait; }
.preview { display: grid; align-content: start; gap: 1.5rem; padding: 1.4rem 0 0 1.4rem; border-left: 1px solid var(--rule); }
.paper { position: relative; width: min(100%, 166px); aspect-ratio: 0.74; background: #fffaf4; border: 1px solid #e1d4cb; box-shadow: 0 4px 12px #58372120; padding: 12%; font: italic 1rem/1.12 var(--serif); }
.paper small { position: absolute; bottom: 10%; left: 12%; font: .68rem system-ui; }
.lines, .mini-table { margin-top: 16%; height: 18%; background: repeating-linear-gradient(to bottom, #c7bdb6 0 1px, transparent 1px 8px); }
.mini-photo { width: 24%; aspect-ratio: .8; float: right; background: #e6d5c9; }
.mini-table { border: 1px solid #c7bdb6; }
.intro { margin: -.6rem 0 2rem; font-size: 1.15rem; }
.examples { margin-top: 3.6rem; }
.result-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1.3rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.result-row h3 { font: 1.55rem var(--serif); }
.result-row h3::before { content: ""; display: inline-block; width: .58rem; height: .58rem; border-radius: 50%; background: #406848; margin: 0 .75rem .16rem 0; }
.result-row h3.negative::before { background: #8d2546; }
.result-row p { padding-left: 1.33rem; }
.feedback { margin-top: .8rem; font-weight: 600; }
.feedback[data-status=valid] { color: #31573a; }
.feedback[data-status=modified], .feedback[data-status=invalid], .feedback[data-status=error] { color: #85243f; }
#welcome { width: min(calc(100% - 2rem), 34rem); max-height: calc(100% - 2rem); border: 1px solid var(--rule); background: var(--paper); color: var(--ink); padding: clamp(1rem, 4vw, 2rem); }
#welcome::backdrop { background: #241c2066; }
#welcome h2 { padding-right: 2rem; }
#welcome li + li { margin-top: .5rem; }
.dialog-close { position: absolute; right: .65rem; top: .55rem; border: 0; background: transparent; color: var(--wine); font-size: 1.6rem; cursor: pointer; }
footer { padding: 0 0 1.4rem; }
#show-welcome { border: 0; padding: 0; background: transparent; color: var(--wine); font: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
#change-copy { margin-top: 1.8rem; }
#alter { display: grid; gap: .65rem; max-width: 560px; }
#alter select { display: block; width: 100%; margin-top: .15rem; padding: .45rem .65rem; border: 1px solid var(--rule); background: var(--paper); color: inherit; font: inherit; }
#alter .primary { margin-top: .4rem; }
@media (min-width: 641px) {
  main:has(#issue) { padding-block: 1.65rem 1.5rem; }
  main:has(#issue) h1 { font-size: clamp(2.6rem, 6vw, 3.9rem); margin-bottom: 1.15rem; }
  #issue .fields { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); margin-top: .75rem; }
  #issue .fields > div { grid-column: 1 / -1; }
  #issue .history { margin-top: 1.05rem; }
  #issue h2 { font-size: 2rem; margin-bottom: .4rem; }
  #issue th, #issue td { padding-block: .28rem; }
  #issue .primary { margin-top: 1rem; }
  .preview { gap: 1rem; padding-top: .6rem; }
  .paper { width: min(100%, 138px); }
}
@media (max-width: 640px) {
  body { width: calc(100% - 2rem); }
  .masthead { align-items: start; flex-direction: column; gap: .55rem; }
  .issue-layout { grid-template-columns: 1fr; }
  .preview { grid-template-columns: repeat(2, minmax(0, 128px)); padding: .6rem 0 0; border-left: 0; }
  .result-row { flex-wrap: wrap; }
}
