:root {
  color-scheme: light;
  --paper: #f7f7f5;
  --ink: #15212a;
  --muted: #515b58;
  --olive: #576139;
  --line: #ccd0c7;
  --soft: #eef0e5;
  --rust: #80502c;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: auto;
  scroll-padding-top: 20px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.55 Arial,
    Helvetica,
    sans-serif;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--olive);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  background: transparent;
  border: 1px solid #858c7b;
  padding: 11px 16px;
  font-weight: 600;
  line-height: 1.35;
  border-radius: 3px;
  min-height: 44px;
}
button:hover {
  background: #e6e9da;
}
button.primary,
.download {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
button:disabled {
  cursor: default;
}
button[aria-pressed="true"] {
  background: var(--soft);
  border-color: var(--olive);
  box-shadow: inset 0 -3px var(--olive);
}
:focus-visible {
  outline: 3px solid #69782f;
  outline-offset: 4px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #969e90;
  border-radius: 2px;
  padding: 12px;
  background: #fff;
  min-height: 44px;
  max-width: 100%;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
label {
  display: block;
  margin: 15px 0 6px;
  font-size: 14px;
  font-weight: 700;
}
label code {
  font-size: 12px;
  margin-left: 5px;
  color: var(--muted);
}
.site-header,
main,
footer {
  max-width: 1320px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}
.site-header {
  display: flex;
  gap: 22px;
  align-items: center;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 34px;
  font-weight: 850;
  letter-spacing: -2.4px;
  text-decoration: none;
}
.brand span {
  color: var(--olive);
}
.wordmark {
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 2px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  font-weight: 700;
}
.site-header nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}
.site-header button {
  min-height: 40px;
  border: 0;
  padding: 8px;
}
.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--ink);
  color: #fff;
  padding: 14px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}
.intro {
  padding: 30px 0 24px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.8px;
  font-weight: 750;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 8px;
}
h1 {
  font-size: clamp(30px, 3.7vw, 48px);
  line-height: 1.1;
  letter-spacing: -1.8px;
  margin: 8px 0 12px;
}
h2 {
  font-size: clamp(23px, 2.1vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.7px;
  margin: 6px 0 12px;
}
h3 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 10px;
}
p {
  margin: 0 0 14px;
}
.intro > p:last-child {
  margin: 0;
  font-size: 18px;
}
.entrances {
  display: flex;
  border-block: 1px solid var(--line);
  gap: 36px;
}
.entrances a {
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 700;
}
.entrances span {
  font-size: 12px;
  color: var(--olive);
}
.entrances small {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.status {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 0;
  margin: 0;
}
.error,
.notice {
  background: #f5ebdc;
  border: 1px solid #aa7950;
  padding: 14px;
}
.error {
  position: sticky;
  top: 4px;
  z-index: 3;
}
.error[hidden],
[hidden] {
  display: none !important;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.case-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 22px;
}
.case-nav button {
  font-size: 13px;
  padding: 10px 12px;
  flex: 1;
  white-space: nowrap;
}
.case-nav span {
  margin-right: 7px;
  color: var(--olive);
  font-size: 12px;
}
.case-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 16px;
}
.case-header h2 {
  font-size: 23px;
}
.fine,
small {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: #fff;
}
.comparison section {
  padding: 24px;
  min-width: 0;
}
.comparison section + section {
  border-left: 1px solid var(--line);
}
.source-panel {
  background: #f0f2e9;
}
.comparison header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.comparison header h3 {
  margin: 0;
}
.step {
  color: var(--olive);
  font-size: 12px;
  font-weight: 700;
}
.badge {
  font-size: 12px;
  display: inline-block;
  border: 1px solid #c3c9b4;
  padding: 3px 7px;
  letter-spacing: 0.3px;
  color: var(--muted);
}
.comparison header .badge {
  margin-left: auto;
}
.comparison label:first-of-type {
  margin-top: 0;
}
blockquote {
  margin: 20px 0;
  padding: 0 0 0 16px;
  border-left: 3px solid var(--olive);
  font-size: 18px;
  line-height: 1.65;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}
.facts dt {
  font-size: 13px;
  color: var(--muted);
}
.facts dd {
  font-weight: 700;
  margin: 3px 0 0;
}
.verdict {
  font-size: 14px;
}
.claim-list {
  font-size: 13px;
}
mark {
  background: #f1e4d1;
  color: #6d3e1b;
  padding: 3px 6px;
  display: inline-block;
  margin: 2px;
}
.preset-actions,
.review-actions,
.apply-actions,
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0;
}
.preset-actions button {
  font-size: 13px;
}
.proposal-panel details {
  margin: 20px 0 12px;
}
details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
  line-height: 1.5;
  min-height: 32px;
}
details[open] > summary {
  margin-bottom: 12px;
}
pre,
code {
  font:
    12px/1.6 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
pre {
  background: #f1f2ee;
  padding: 14px;
  max-height: 420px;
  overflow: auto;
}
dl {
  margin: 10px 0;
}
dd {
  margin: 3px 0 15px;
  overflow-wrap: anywhere;
}
dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.control-section,
.review {
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.section-heading {
  margin-bottom: 20px;
}
.checks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.rule {
  font-size: 14px;
}
.rule summary {
  font-weight: 600;
  font-size: 14px;
}
.rule summary small {
  font-size: 12px;
  display: block;
  margin-left: 18px;
}
.rule code {
  display: block;
  font-size: 12px;
}
.rule.attention {
  border-top-color: #ad8c64;
}
.rule p {
  margin-bottom: 8px;
}
.editorial-note {
  margin-top: 20px;
}
.state-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 20px;
  background: var(--soft);
  padding: 20px;
  margin: 24px 0 12px;
}
.state-grid span {
  font-size: 12px;
  color: var(--muted);
  display: block;
}
.state-grid strong {
  display: block;
  font-size: 16px;
  line-height: 1.4;
  margin-top: 4px;
}
#history li {
  padding: 7px 0;
  font-size: 14px;
}
#history small {
  display: block;
}
.major-section {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}
.corpus-list {
  margin: 26px 0;
}
.corpus-record summary {
  display: flex;
  gap: 14px;
  align-items: start;
  font-weight: 500;
  padding: 5px 0;
}
.corpus-record summary::before {
  content: "+";
  color: var(--olive);
  font-size: 20px;
  line-height: 1;
}
.corpus-record[open] summary::before {
  content: "−";
}
.corpus-record summary small {
  margin-left: auto;
  white-space: nowrap;
}
.corpus-record .badge {
  white-space: nowrap;
}
.corpus-record dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  column-gap: 16px;
  padding: 15px;
  background: #fff;
}
.corpus-record dd {
  font-size: 14px;
}
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin: 26px 0;
}
.download {
  display: inline-block;
  padding: 12px 18px;
  margin: 12px 0;
  text-decoration: none;
}
#export-value {
  font:
    12px/1.5 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
footer {
  padding-top: 24px;
  padding-bottom: 30px;
  font-size: 13px;
  color: var(--muted);
}
button,
select,
textarea,
input {
  scroll-margin: 25px;
}
@media (max-width: 760px) {
  .site-header,
  main,
  footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .site-header {
    gap: 12px;
    min-height: 70px;
  }
  .brand {
    font-size: 28px;
  }
  .wordmark {
    display: none;
  }
  .site-header nav {
    gap: 14px;
  }
  .intro {
    padding: 24px 0;
  }
  .intro > p:last-child {
    font-size: 16px;
  }
  .entrances {
    gap: 0;
    flex-direction: column;
  }
  .entrances a {
    padding: 12px 0;
    flex-wrap: wrap;
  }
  .entrances a + a {
    border-top: 1px solid var(--line);
  }
  .entrances small {
    margin-left: auto;
  }
  .case-nav {
    gap: 6px;
  }
  .case-nav button {
    flex: 1 1 30%;
    font-size: 12px;
    white-space: normal;
    padding: 9px 6px;
  }
  .case-header {
    display: block;
  }
  .case-header .fine br {
    display: none;
  }
  .case-header .fine {
    font-size: 12px;
  }
  .case-header h2 {
    font-size: 22px;
  }
  .comparison {
    grid-template-columns: 1fr;
  }
  .comparison section {
    padding: 18px;
  }
  .comparison section + section {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  blockquote {
    font-size: 17px;
  }
  .checks-grid,
  .state-grid,
  .method-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .state-grid {
    gap: 14px;
  }
  .corpus-record summary {
    flex-wrap: wrap;
    gap: 8px;
  }
  .corpus-record summary small {
    margin-left: 0;
  }
  .corpus-record summary > span:nth-child(2) {
    flex-basis: 100%;
  }
  .corpus-record dl {
    display: block;
    padding: 12px;
  }
  .major-section {
    padding: 30px 0;
  }
  .review-actions button {
    flex: 1 1 44%;
  }
  h1 {
    letter-spacing: -1px;
  }
  .facts {
    gap: 12px;
  }
  .error {
    position: static;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
@media print {
  button,
  .export-actions,
  .entrances {
    display: none;
  }
  .comparison {
    break-inside: avoid;
  }
  .site-header nav {
    display: none;
  }
  body {
    background: white;
  }
}
