:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5d687b;
  --line: #dbe1ea;
  --panel: #ffffff;
  --soft: #f4f7fb;
  --accent: #5a38ff;
  --accent-dark: #3a20bd;
  --ready: #08795c;
  --review: #a25d00;
  --invalid: #b12a3b;
  --shadow: 0 18px 55px rgba(25, 35, 61, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(90, 56, 255, 0.12), transparent 34rem),
    var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.18em;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0;
}

.brand {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.source-link {
  font-size: 0.9rem;
  font-weight: 700;
}

.hero {
  max-width: 820px;
  padding: clamp(3.5rem, 8vw, 6.8rem) 0 2.5rem;
}

.eyebrow,
.step {
  margin: 0 0 0.45rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 1rem;
  font-size: clamp(2.55rem, 6.5vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1rem;
}

.lede {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.workspace,
.results,
.method {
  margin: 1.25rem 0;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.workspace-heading,
.results-heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.55rem;
}

label {
  display: block;
  margin: 1rem 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid #bfc8d8;
  border-radius: 0.75rem;
  background: #fbfcfe;
  color: var(--ink);
  font: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input {
  padding: 0.78rem 0.9rem;
}

textarea {
  min-height: 19rem;
  padding: 1rem;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.55;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(90, 56, 255, 0.17);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.button {
  min-height: 2.65rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  color: white;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  border-color: #c9c3ff;
  background: #f1efff;
  color: var(--accent-dark);
}

.button.ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.help,
.result-summary {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.metric {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fbfcfe;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.metric strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 2rem;
  line-height: 1;
}

.metric.pass strong {
  color: var(--ready);
}

.metric.review strong {
  color: var(--review);
}

.metric.invalid strong {
  color: var(--invalid);
}

.table-wrap {
  margin-top: 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f6f8fb;
  color: #465166;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.status.error {
  background: #ffe7ea;
  color: var(--invalid);
}

.status.warning {
  background: #fff2da;
  color: var(--review);
}

.status.ready {
  background: #dff7ef;
  color: var(--ready);
}

.method {
  margin-top: 3rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.method article {
  padding: 1rem;
  border-left: 3px solid #c8c1ff;
  background: #f8f7ff;
}

.method article p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

footer {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 2.5rem 0 3.5rem;
  color: var(--muted);
  font-size: 0.84rem;
}

footer p {
  max-width: 520px;
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .summary-grid,
  .method-grid {
    grid-template-columns: 1fr 1fr;
  }

  footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .workspace-heading,
  .results-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
