:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --surface: #ffffff;
  --canvas: #ebebeb;
  --accent: #111827;
  --accent-dark: #374151;
  --input-border: #9ca3af;
  --button-bg: #111827;
  --button-hover: #1f2937;
  --button-ink: #ffffff;
  --code-bg: #f9fafb;
  --code-ink: #374151;
  --pass-bg: #dcfce7;
  --pass-ink: #166534;
  --warn-bg: #fef3c7;
  --warn-ink: #92400e;
  --fail-bg: #fee2e2;
  --fail-ink: #991b1b;
}

:root.dark {
  color-scheme: dark;
  --ink: #e5e7eb;
  --muted: #9ca3af;
  --line: #374151;
  --surface: #1f2937;
  --canvas: #111827;
  --accent: #e5e7eb;
  --accent-dark: #9ca3af;
  --input-border: #4b5563;
  --button-bg: #374151;
  --button-hover: #4b5563;
  --button-ink: #ffffff;
  --code-bg: #111827;
  --code-ink: #d1d5db;
  --pass-bg: #064e3b;
  --pass-ink: #6ee7b7;
  --warn-bg: #78350f;
  --warn-ink: #fcd34d;
  --fail-bg: #7f1d1d;
  --fail-ink: #fca5a5;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: underline;
}

a:hover {
  text-decoration: underline;
}

.site-nav a,
.brand {
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header__inner,
.site-footer__inner,
.check-shell {
  width: min(100% - 2rem, 760px);
  margin-inline: auto;
}

.site-header__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
}

.brand:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.theme-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.theme-toggle:hover {
  color: var(--accent);
}

.check-shell {
  flex: 1;
  padding-block: 4rem;
}

.hero {
  max-width: 38rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__lede {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero__tools {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.check-form {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.check-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.check-form__row {
  display: flex;
  gap: 0.75rem;
}

.check-form input {
  min-width: 0;
  flex: 1;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--input-border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.check-form input:focus {
  border-color: var(--accent);
  outline: 3px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

.check-form button {
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--button-bg);
  color: var(--button-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.check-form button:hover {
  background: var(--button-hover);
}

.check-form button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.help {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.form-error {
  margin: 0.75rem 0 0;
  color: var(--fail-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.result {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.result__heading {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.result__heading h2 {
  margin: 0;
  font-size: 1.25rem;
}

.result__summary {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  flex: none;
  margin-top: 0.1rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.badge--pass {
  background: var(--pass-bg);
  color: var(--pass-ink);
}

.badge--warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.badge--fail {
  background: var(--fail-bg);
  color: var(--fail-ink);
}

.result__grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.record-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--code-bg);
}

.record-card h3,
.message-box h3 {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.record-card pre {
  margin: 0.6rem 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: var(--code-ink);
  font-size: 0.82rem;
}

.message-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
}

.message-box--warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.message-box--error {
  background: var(--fail-bg);
  color: var(--fail-ink);
}

.message-box ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.message-box li + li {
  margin-top: 0.25rem;
}

.cta {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.explainer,
.faq {
  margin-top: 3rem;
}

.explainer h2,
.faq h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.explainer p,
.faq__item p {
  margin: 0;
  color: var(--muted);
}

.explainer__item + .explainer__item,
.faq__item + .faq__item {
  margin-top: 1.25rem;
}

.faq__item {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
}

.faq__item summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
}

.faq__item p {
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.product {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.product h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.product > p {
  margin: 0;
  color: var(--muted);
}

.product ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.product li + li {
  margin-top: 0.25rem;
}

.product__cta {
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  font-weight: 600;
}

.syntax {
  margin-top: 3rem;
}

.syntax h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.syntax > p {
  color: var(--muted);
}

.syntax__example {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--code-bg);
}

.syntax__example code {
  min-width: 0;
  color: var(--code-ink);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.syntax__copy {
  flex: none;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
}

.syntax__copy:hover {
  border-color: var(--input-border);
  color: var(--ink);
}

.syntax dl {
  display: grid;
  grid-template-columns: minmax(5rem, max-content) 1fr;
  margin: 0.75rem 0 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  overflow: hidden;
}

.syntax dt,
.syntax dd {
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--line);
}

.syntax dt:first-of-type,
.syntax dd:first-of-type {
  border-top: none;
}

.syntax dt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 600;
  background: var(--code-bg);
}

.syntax dd {
  color: var(--muted);
}

.syntax__list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.syntax__list li + li {
  margin-top: 0.35rem;
}

@media (max-width: 560px) {
  .syntax dl {
    display: block;
  }

  .syntax dt,
  .syntax dd {
    border: none;
    padding: 0;
  }

  .syntax dt {
    margin-top: 0.75rem;
    background: none;
  }

  .syntax dd {
    padding-top: 0.15rem;
  }

  .syntax dt:first-of-type {
    margin-top: 0;
  }
}

.site-footer__inner {
  width: min(100% - 2rem, 1280px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.5rem 1.25rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.site-footer__brand {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .site-footer__inner {
    flex-direction: row;
    text-align: left;
  }

  .site-footer__links {
    justify-content: flex-end;
  }
}

@media (min-width: 640px) {
  .result__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .check-shell {
    padding-block: 2.5rem;
  }

  .check-form__row {
    flex-direction: column;
  }

  .check-form button {
    width: 100%;
  }
}
