@font-face {
  font-family: Inter;
  src: url('/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Instrument Serif;
  src: url('/instrument-serif.woff2') format('woff2');
  font-display: swap;
}
:root {
  --base: #f0ede4;
  --paper: #fcfaf4;
  --tint: #e8e0d0;
  --ink: #252521;
  --muted: #5c5a51;
  --accent: #8d3c2b;
  --line: #d3cbbd;
  --serif: Instrument Serif, Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font: 15px/1.55 Inter,sans-serif;
}
a { color: var(--accent); text-underline-offset: .22em; }
button,input,select,textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .50; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -100px; padding: 8px; background: var(--paper); z-index: 4; }
.skip:focus { top: 8px; }
.shell { width: min(1140px,calc(100% - 64px)); margin-inline: auto; }
.top,.top nav,.brand,.tool-head,.review-head,.split-head,.output { display: flex; align-items: center; }
.top { min-height: 65px; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 10px; }
.top nav { justify-content: end; gap: 15px; flex-wrap: wrap; font-size: 13px; }
.brand { gap: 8px; color: var(--ink); text-decoration: none; font-weight: 750; }
.mark { display: grid; place-items: center; background: var(--accent); border-radius: 50%; color: #fff5e7; font: 20px/1 var(--serif); width: 32px; aspect-ratio: 1; }
.intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(200px,290px); gap: 20px; align-items: end; margin: 44px 0 27px; }
h1 { font: 400 clamp(57px,8.6vw,112px)/.86 var(--serif); letter-spacing: -.038em; margin: 0; }
h1 em { color: var(--accent); font-weight: 400; }
.intro p { margin: 0 0 3px; max-width: 34ch; color: var(--muted); font-size: 16px; }
.tool { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tool-head { padding: 11px 18px; gap: 12px; justify-content: space-between; background: #e7ddcd; border-bottom: 1px solid var(--line); }
h2,h3,h4,p { margin: 0; }
.tool-head h2 { font: 400 clamp(23px,3.6vw,37px)/1 var(--serif); overflow-wrap: anywhere; letter-spacing: -.02em; }
.tool-head nav { display: flex; gap: 2px; border: 1px solid #c9bcac; background: #f3eadc; border-radius: 7px; padding: 3px; flex: none; }
.tool-head nav button { font-size: 12px; font-weight: 710; background: transparent; border: 0; border-radius: 4px; padding: 8px 12px; color: var(--ink); }
.tool-head nav button[aria-pressed="true"] { color: #fff7ea; background: var(--accent); }
#review,#setup,#results { padding: 18px; }
.review-head { flex-wrap: wrap; align-items: end; gap: 9px; margin-bottom: 12px; }
.review-head label { min-width: 0; max-width: min(100%,230px); }
.review-head select { min-width: min(116px,100%); }
.review-head p { margin-left: auto; align-self: center; }
.hint,.notice,.error { color: var(--muted); font-size: 12px; }
.hint { font-weight: 400; }
.notice,.error { min-height: 1.2em; }
.notice { margin: 8px 0; }
.error,.danger { color: var(--accent); }
.brief { border: 1px solid #cfc1a7; border-left: 3px solid var(--accent); background: #f3ecdf; border-radius: 6px; padding: 13px 14px; }
.brief h3 { font: 400 29px/1 var(--serif); margin-bottom: 7px; }
.brief > div,.responses { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.brief h4 { font-size: 11px; letter-spacing: .045em; text-transform: uppercase; margin-bottom: 2px; color: var(--accent); }
.brief p,.response p,.list-row p,.list-row li { overflow-wrap: anywhere; white-space: pre-wrap; }
.brief p { font-size: 14px; }
.responses { margin: 12px 0; }
.response { background: #fffdf7; border: 1px solid var(--line); border-radius: 7px; padding: 13px 14px; min-width: 0; }
.response h3 { margin-bottom: 5px; color: var(--accent); font-size: 12px; }
.response p { line-height: 1.58; }
.decision { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 8px 14px; padding-top: 1px; }
.decision .actions { grid-column: 1/-1; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend,label { font-size: 12px; font-weight: 670; }
legend { padding: 0 0 5px; }
label { display: grid; gap: 5px; }
.choices,.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.choices label { display: inline-flex; align-items: center; gap: 5px; padding: 7px 8px; border-radius: 6px; background: #f4eee2; border: 1px solid var(--line); cursor: pointer; }
input[type=radio] { accent-color: var(--accent); margin: 0; }
input:not([type=radio]),textarea,select { width: 100%; min-width: 0; border: 1px solid #cbbfae; background: #fffdf8; color: var(--ink); padding: 7px 8px; border-radius: 6px; font-size: 14px; min-height: 36px; }
textarea { resize: vertical; }
.primary,.quiet { border: 1px solid transparent; border-radius: 6px; min-height: 36px; padding: 8px 11px; font-weight: 720; font-size: 12px; line-height: 1.25; }
.primary { background: var(--accent); color: #fff7ed; }
.primary:hover { background: #9e4938; }
.quiet { background: #f1ebdf; color: var(--ink); border-color: #cbbfae; }
.quiet:hover { border-color: #826f5c; }
.split-head,.output { justify-content: space-between; gap: 12px; }
.split-head h3,#results-title { font: 400 32px/1 var(--serif); }
.setup-form { margin: 13px 0; padding: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 8px; align-items: end; border: 1px solid var(--line); border-radius: 6px; }
.setup-form .error { grid-column: 1/-1; }
.list-row { padding: 9px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 9px; align-items: center; }
.list-row .hint { color: var(--accent); }
.result-row details { margin-top: 5px; font-size: 13px; }
.result-row summary { cursor: pointer; }
.result-row ul { padding-inline-start: 20px; margin: 4px 0; }
#export { margin-top: 12px; }
#result-info { margin: 4px 0 10px; }
.totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 8px 0 12px; }
.total { background: #f2eadc; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.total span { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.total strong { color: var(--accent); font: 400 39px/1 var(--serif); }
.output { padding: 13px 0 23px; }
.output h2 { font-size: 15px; }
.output p { color: var(--muted); font-size: 13px; }
footer { border-top: 1px solid var(--line); padding: 13px 0 22px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; }
dialog { width: min(680px,calc(100% - 24px)); max-height: calc(100dvh - 20px); background: var(--paper); color: var(--ink); border: 1px solid var(--line); padding: 16px; border-radius: 10px; }
dialog::backdrop { background: #25252178; }
dialog h2 { font: 400 30px/1 var(--serif); margin-bottom: 8px; }
dialog form > label { margin-bottom: 7px; }
dialog .actions { justify-content: flex-end; }
#reviewer-modal,#confirm { width: min(450px,calc(100% - 24px)); }
.reading { width: min(760px,100%); padding: 49px 0; }
.reading h1 { font-size: clamp(51px,8vw,100px); margin-bottom: 17px; }
.reading h2 { font: 400 35px/1.05 var(--serif); margin: 23px 0 6px; }
.reading p,.reading li { max-width: 65ch; margin-bottom: 8px; }
.reading .lead { font-size: 17px; color: var(--muted); }
.reading blockquote { border-left: 2px solid var(--accent); padding-left: 13px; margin: 16px 0; }
@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  .intro { grid-template-columns: 1fr; gap: 10px; margin: 34px 0 19px; }
  .intro h1 { font-size: clamp(52px,12vw,80px); }
  .tool-head { padding: 11px; }
  #review,#setup,#results { padding: 11px; }
}
@media (max-width: 550px) {
  .top nav { gap: 5px; font-size: 11px; }
  .top .quiet { min-height: 30px; font-size: 11px; }
  .tool-head { align-items: start; flex-direction: column; gap: 8px; }
  .brief > div,.responses,.decision,.setup-form { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .review-head p { margin-left: 0; }
  .output { align-items: start; flex-direction: column; }
  .split-head { align-items: start; }
  .split-head h3 { font-size: 25px; }
}
