:root {
  color-scheme: light dark;
  --canvas: #f4f1e8;
  --surface: #fbfaf6;
  --text: #13171a;
  --secondary: #5c6468;
  --line: #7a8388;
  --action: #0b6d66;
  --fill: #0e746c;
  --onfill: #fff;
  --error: #9f3026;
  font:
    106.25%/1.5 system-ui,
    -apple-system,
    sans-serif;
  color: var(--text);
  background: var(--canvas);
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #111417;
    --surface: #1a1f23;
    --text: #f4f1e8;
    --secondary: #aab2b6;
    --line: #75848d;
    --action: #55c9be;
    --fill: #55c9be;
    --onfill: #111417;
    --error: #ffa99e;
  }
}
* {
  box-sizing: border-box;
}
body {
  max-width: 960px;
  margin: auto;
  padding: 0 24px;
  overflow-wrap: anywhere;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 30px 0 20px;
  border-bottom: 2px solid var(--text);
}
header span:last-child {
  font-size: 0.8rem;
  color: var(--secondary);
}
.wordmark {
  font-weight: 750;
  letter-spacing: -0.04em;
  font-size: 1.6rem;
}
nav {
  display: flex;
  gap: 8px;
  padding: 16px 0;
  flex-wrap: wrap;
}
button,
input,
select,
textarea {
  font: inherit;
  min-height: 46px;
  max-width: 100%;
}
button {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 16px;
  cursor: pointer;
}
button:hover {
  border-color: var(--action);
}
button[aria-current="page"] {
  border: 2px solid var(--action);
  color: var(--action);
  font-weight: 650;
}
.primary {
  background: var(--fill);
  color: var(--onfill);
  border-color: var(--fill);
  font-weight: 650;
}
.danger {
  color: var(--error);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
a {
  color: var(--action);
}
:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 20px;
  top: 8px;
  background: var(--surface);
  padding: 12px;
  z-index: 3;
}
main {
  min-height: 40vh;
  padding: 8px 0 35px;
}
h1 {
  font-size: 1.9rem;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 18px 0;
}
h2 {
  font-size: 1.2rem;
  margin: 28px 0 12px;
}
p {
  max-width: 72ch;
}
.context,
.note,
small {
  color: var(--secondary);
}
.context {
  font-size: 0.85rem;
}
.answer {
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 680;
  letter-spacing: -0.05em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  margin: 15px 0 22px;
  overflow-wrap: anywhere;
}
.money {
  font-variant-numeric: tabular-nums;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ledger {
  list-style: none;
  padding: 0;
  margin: 0 0 25px;
}
.ledger li,
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.ledger li > span:first-child {
  flex: 1;
  min-width: 150px;
}
.ledger small {
  display: block;
}
.rule-note {
  border-left: 3px solid var(--action);
  padding: 10px 16px;
  background: var(--surface);
}
form {
  margin: 20px 0 32px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 18px 0;
}
legend {
  font-weight: 650;
  margin-bottom: 10px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
label {
  display: block;
  margin: 12px 0;
}
input:not([type="checkbox"]),
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}
input[type="checkbox"] {
  width: 24px;
  height: 24px;
  min-height: 24px;
  vertical-align: middle;
  margin: 0 10px 3px 0;
  accent-color: var(--fill);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}
.preview {
  border: 2px solid var(--action);
  padding: 18px;
  margin: 20px 0;
  background: var(--surface);
}
.error {
  color: var(--error);
}
#status:empty {
  display: none;
}
#status {
  padding: 10px 0;
  margin: 0;
}
footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 35px;
  color: var(--secondary);
  font-size: 0.85rem;
}
details {
  margin: 20px 0;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 8px 0;
  font-weight: 600;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
.badge {
  font-size: 0.8rem;
  font-weight: 650;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}
@media (max-width: 600px) {
  body {
    padding: 0 16px;
  }
  .fields {
    grid-template-columns: minmax(0, 1fr);
  }
  header {
    padding-top: 20px;
  }
  .answer {
    margin-top: 10px;
  }
  nav {
    gap: 6px;
  }
  nav button {
    flex: 1;
    padding-inline: 10px;
  }
  h1 {
    font-size: 1.7rem;
  }
}
@media print {
  nav,
  form,
  button,
  footer,
  #status {
    display: none;
  }
  body {
    max-width: none;
    padding: 0;
  }
  main {
    padding: 0;
  }
  .preview {
    border: 0;
    padding: 0;
  }
  details {
    display: block;
  }
}

.report-frame {
  display: block;
  width: 100%;
  height: 600px;
  border: 1px solid var(--line);
  background: white;
}
.resolution-history {
  padding-left: 24px;
}
.resolution-history li {
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}
.resolution-history .note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comparison-evidence {
  overflow-wrap: anywhere;
}
