:root {
  color-scheme: light;
  --paper: #f3efe8;
  --panel: #fffdf8;
  --ink: #24242a;
  --muted: #56524b;
  --line: #c9bfb0;
  --accent: #543e71;
  font: 16px/1.55 "Instrument Sans", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--accent); text-underline-offset: .22em; }
.frame { width: min(1210px, calc(100% - 3rem)); margin-inline: auto; }
.mast { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line); }
.brand { font-weight: 850; color: var(--ink); text-decoration: none; }
.hero { padding: 2.9rem 0 1.9rem; }
h1, h2, h3 { line-height: 1.08; overflow-wrap: anywhere; }
h1 { font: 700 clamp(3rem, 8vw, 5.9rem)/.98 "Instrument Serif", Georgia, serif; letter-spacing: -.055em; margin: 0; }
.hero p { max-width: 45rem; font-size: 1.1rem; color: var(--muted); margin: .75rem 0 0; }
.panel { min-width: 0; padding: clamp(1rem, 2.6vw, 1.6rem); border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.inputs, .panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
h2 { margin: 0 0 .4rem; font-size: clamp(1.35rem, 3vw, 1.85rem); letter-spacing: -.04em; }
h3 { margin: 0 0 .5rem; font-size: .97rem; }
label { display: block; margin: .55rem 0 .2rem; font-weight: 730; }
small, .muted { color: var(--muted); font-weight: 400; }
.muted { margin: .55rem 0 0; font-size: .88rem; }
input, textarea { display: block; width: 100%; padding: .55rem .65rem; border-radius: 6px; border: 1px solid #8b8192; background: white; color: var(--ink); font: inherit; }
textarea { resize: vertical; font: .91rem/1.55 "IBM Plex Mono", ui-monospace, monospace; }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin: .8rem 0 .2rem; }
button { padding: .48rem .7rem; min-height: 42px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: white; font-family: inherit; font-size: .87rem; font-weight: 750; cursor: pointer; }
button:hover { filter: brightness(.93); }
.secondary { background: transparent; color: var(--accent); }
:focus-visible { outline: 3px solid #765a9d; outline-offset: 3px; }
.result { margin-top: 1rem; }
.results-head { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.result-body { display: grid; grid-template-columns: minmax(0, .42fr) minmax(0, 1.45fr); gap: .8rem; }
.result-body:has(.change-list[hidden]) { grid-template-columns: 1fr; }
.change-list, .panes section { min-width: 0; }
.change-list ol { max-height: 26rem; overflow: auto; padding: 0; margin: 0; list-style: none; }
.change-list li + li { margin-top: .35rem; }
.jump { display: grid; width: 100%; gap: .2rem; text-align: left; overflow-wrap: anywhere; background: #faf7fc; color: var(--ink); border-color: var(--line); }
.jump[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); background: #eee6f4; }
.jump span { font-size: .76rem; font-weight: 550; }
.removed { color: #812328; }
.added { color: #245332; }
.document { min-height: 14rem; max-height: 26rem; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: .7rem; background: white; white-space: pre-wrap; overflow-wrap: anywhere; font: .91rem/1.65 "IBM Plex Mono", ui-monospace, monospace; }
mark { color: inherit; border-radius: 2px; }
mark.before { background: #f9d5d7; text-decoration: line-through; }
mark.after { background: #d9efda; text-decoration: underline; }
mark.current { outline: 2px solid var(--accent); }
.point.current { border-left: 2px solid var(--accent); }
.guide { max-width: 49rem; padding: 2.6rem 0 1.65rem; }
.guide p { color: var(--muted); }
footer { padding: 1rem 0; border-top: 1px solid var(--line); font-weight: 750; }
@media (max-width: 825px) {
  .frame { width: calc(100% - 1.5rem); }
  .hero { padding: 2rem 0 1.4rem; }
  .result-body { grid-template-columns: 1fr; }
  .change-list ol { max-height: 12rem; }
}
@media (max-width: 550px) {
  .inputs, .panes { grid-template-columns: 1fr; }
}
