:root {
  color-scheme: light dark;
  --bg: #f8f9fb;
  --surface: #fff;
  --text: #111827;
  --muted: #4b5563;
  --line: #d1d5db;
  --brand: #047857;
  --tint: #ecfdf5;
  --error: #b91c1c;
  font:
    16px/1.6 'Geist',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e14;
    --surface: #151821;
    --text: #f0f2f5;
    --muted: #c9cdd5;
    --line: #414754;
    --brand: #6ee7b7;
    --tint: #15362e;
    --error: #fca5a5;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--brand);
  text-underline-offset: 3px;
}
a,
button,
textarea {
  -webkit-tap-highlight-color: transparent;
  scroll-margin: 1rem;
}
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}
button,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  top: -6rem;
  left: 1rem;
  background: var(--surface);
  padding: 1rem;
  z-index: 1;
}
.skip:focus {
  top: 0;
}
.site-nav {
  border-bottom: 1px solid var(--line);
  padding: 1rem max(1rem, calc((100vw - 1080px) / 2));
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--surface);
}
.brand {
  font-weight: 750;
  text-decoration: none;
  color: var(--text);
}
main {
  max-width: 1080px;
  margin: auto;
  padding: 2.5rem 1rem 4rem;
}
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0.5rem 0 1rem;
  text-wrap: balance;
}
h2 {
  font-size: 1.4rem;
  line-height: 1.3;
}
p {
  max-width: 76ch;
}
.intro {
  color: var(--muted);
  margin-bottom: 2rem;
}
.workspace {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 1.5rem;
  min-width: 0;
}
legend {
  float: left;
  padding: 0;
  font-weight: 650;
  margin-bottom: 0.6rem;
}
textarea[aria-invalid='true'] {
  border-color: var(--error);
}
button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  min-height: 44px;
  color: var(--text);
  background: var(--surface);
}
button:hover {
  border-color: var(--brand);
}
#copy {
  white-space: nowrap;
  font-weight: 650;
}
.hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.65rem 0;
}
#error {
  color: var(--error);
}
#feedback {
  font-weight: 600;
}
#error:empty,
#feedback:empty {
  margin: 0;
}
.result {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--tint);
}
.result h2 {
  margin: 0 0 0.5rem;
}
#summary {
  font-size: 1.2rem;
  font-weight: 550;
  margin: 0 0 0.5rem;
}
code {
  font-family: 'Geist Mono', ui-monospace, monospace;
  overflow-wrap: anywhere;
}
.notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}
.notes p,
.notes li {
  color: var(--muted);
}
.notes ul {
  padding-left: 1.25rem;
}
footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 0;
  margin-top: 2rem;
}
@media (max-width: 640px) {
  main {
    padding-top: 1.5rem;
  }
  fieldset,
  .result {
    padding: 1rem;
  }
  #copy {
    width: 100%;
  }
  .notes {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .site-nav {
    gap: 0.75rem 1.25rem;
  }
}
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.6 ui-monospace,
    monospace;
  tab-size: 2;
  scroll-margin: 1rem;
}
.editors {
  clear: both;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
label {
  display: block;
  font-weight: 650;
  margin-bottom: 0.5rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
#compare {
  background: var(--brand);
  color: var(--surface);
  font-weight: 650;
}
.privacy {
  border-left: 3px solid var(--brand);
  padding-left: 1rem;
  color: var(--muted);
}
.empty {
  padding: 0 1.5rem 1rem;
  color: var(--muted);
}
#findings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 2rem;
}
#findings h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
#findings ul {
  margin-top: 0.25rem;
  padding-left: 1.25rem;
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .editors,
  #findings {
    grid-template-columns: 1fr;
  }
  .actions button {
    width: 100%;
  }
}
@media print {
  #editor,
  .site-nav,
  .skip {
    display: none;
  }
  .result {
    border: 1px solid;
  }
}
