:root {
  color-scheme: light;
  --paper: #f2eee5;
  --card: #fffdf9;
  --ink: #211b40;
  --muted: #625c70;
  --accent: #5138a2;
  --accent-soft: #ebe4fc;
  --line: #d7d0dd;
  --mono: ui-monospace, 'Cascadia Code', 'Liberation Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.5 system-ui, sans-serif;
}
a { color: inherit; }
button, textarea { font: inherit; }
button, textarea, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #6c4ac9; outline-offset: 3px; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.topbar {
  min-height: 73px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #d5ced5;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.035em;
}
.guide-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-size: 14px;
  font-weight: 650;
}
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  align-items: center;
  gap: 32px;
  padding: clamp(29px, 5vw, 60px) 0 clamp(28px, 4vw, 47px);
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font: 700 12px/1.4 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 15px;
  font-size: clamp(38px, 6vw, 75px);
  font-weight: 780;
  line-height: .99;
  letter-spacing: -.076em;
}
.intro-copy { max-width: 470px; margin: 0; color: var(--muted); font-size: 17px; }
.illustration { position: relative; width: 265px; height: 190px; justify-self: center; }
.sheet {
  position: absolute;
  width: 161px;
  height: 125px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 20px;
  transform-origin: center;
  border: 1px solid #ada1c1;
  border-radius: 12px;
  box-shadow: 0 10px 24px #211b4014;
}
.sheet-before { top: 21px; left: 16px; background: #e5dcf4; transform: rotate(-12deg); }
.sheet-after { right: 12px; bottom: 17px; background: #fcf8ee; transform: rotate(9deg); }
.sheet i { display: block; height: 5px; background: #a89bbd; border-radius: 8px; }
.sheet i:nth-child(1) { width: 71%; }
.sheet i:nth-child(2) { width: 52%; }
.sheet i:nth-child(3) { width: 88%; }
.sheet i:nth-child(4) { width: 61%; }
.sheet-after i:nth-child(2), .sheet-after i:nth-child(4) { background: #7756c8; }
.delta {
  position: absolute;
  right: 54px;
  bottom: 1px;
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  color: #fffdf9;
  background: var(--ink);
  border-radius: 50%;
  box-shadow: 0 4px 12px #211b4030;
  font: 27px/1 var(--mono);
}
.workbench {
  padding: clamp(18px, 4vw, 30px);
  background: var(--card);
  border: 1px solid #d5cddf;
  border-radius: 16px;
  box-shadow: 0 4px 18px #211b4009;
}
h2 { margin-bottom: 4px; font-size: 24px; line-height: 1.2; letter-spacing: -.035em; }
.workbench-heading p, .results-heading p { margin-bottom: 0; color: var(--muted); }
.editors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.editor label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 700; }
textarea {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 112px;
  padding: 13px;
  background: #f8f6fa;
  border: 1px solid #bdb1c8;
  border-radius: 8px;
  color: var(--ink);
  font: 13px/1.6 var(--mono);
}
textarea::placeholder { color: #6a6076; opacity: 1; }
textarea[aria-invalid="true"] { border-color: #a12e30; }
.field-error { margin: 7px 0 0; color: #971e27; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
button {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #bdb1c8;
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf9;
  font-size: 14px;
  font-weight: 680;
  cursor: pointer;
}
button:disabled { cursor: auto; opacity: .58; }
button:not(:disabled):hover { background: #eee8f5; }
button.primary { border-color: var(--ink); color: #fffdf9; background: var(--ink); }
button.primary:not(:disabled):hover { background: #3a2c6d; }
button.primary span { margin-left: 6px; }
.sample-label { margin: 0 0 0 6px; color: var(--accent); font-size: 14px; font-weight: 650; }
.results { margin-block: 35px 54px; }
.results-heading { padding-bottom: 13px; border-bottom: 1px solid #cfc6d7; }
.results table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.results thead th { padding: 11px 12px; color: var(--muted); font: 700 12px/1.3 var(--mono); }
.results thead th:first-child { width: 29%; }
.results th, .results td { text-align: left; vertical-align: top; }
.results tbody tr { border-top: 1px solid #d8d0dd; }
.results tbody th, .results td { padding: 12px; overflow-wrap: anywhere; }
.field-name { display: block; color: var(--ink); font: 700 13px/1.5 var(--mono); }
.change { display: inline-block; margin-top: 5px; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.change-added { color: #15513a; background: #d8eadc; }
.change-removed { color: #832435; background: #f1dde0; }
.change-changed { color: #51348e; background: #e9e1f7; }
.change-unchanged { color: #534a63; background: #e8e3ec; }
.values { margin: 0; padding: 0; list-style: none; font: 13px/1.55 var(--mono); }
.values li { white-space: pre-wrap; }
.values li + li { margin-top: 4px; }
.absent { font-size: 13px; color: var(--muted); }
.mobile-label { display: none; }
.guide { padding-block: 24px 32px; border-top: 1px solid #d5ced5; }
.guide ol { max-width: 76ch; margin: 13px 0 0; padding-left: 22px; color: var(--muted); }
.guide li + li { margin-top: 9px; }
.guide strong { color: var(--ink); }
.guide code { font: 13px/1.5 var(--mono); color: var(--accent); overflow-wrap: anywhere; }
.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 16px;
  padding-block: 17px 26px;
  border-top: 1px solid #d5ced5;
  color: var(--muted);
  font-size: 13px;
}
.footer span { color: var(--ink); font-weight: 730; }
.footer p { margin-bottom: 0; }

@media (max-width: 720px) {
  .wrap { width: calc(100% - 40px); }
  .intro { grid-template-columns: minmax(0, 1fr); }
  .illustration { display: none; }
  .title-break { display: none; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .topbar { min-height: 62px; }
  .editors { grid-template-columns: minmax(0, 1fr); }
  textarea { font-size: 16px; }
  .results thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .results table, .results tbody, .results tbody th, .results td { display: block; }
  .results tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 0;
    border-bottom: 1px solid #d8d0dd;
  }
  .results tbody th { grid-column: 1 / -1; padding-bottom: 2px; }
  .results td { padding-top: 6px; }
  .mobile-label { display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; font-weight: 650; }
}
