:root {
  color-scheme: light dark;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #1a1a1f;
  --muted: #5c5f66;
  --border: #d8dbe0;
  --accent: #0b5cab;
  --accent-text: #ffffff;
  --danger: #a11919;
  --focus: #ffbf47;
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141a;
    --surface: #1c1f27;
    --text: #f2f4f8;
    --muted: #b5bac4;
    --border: #343947;
    --accent: #4da3ff;
    --accent-text: #081018;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.wrap {
  width: min(960px, calc(100% - 2rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--focus);
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header,
.site-footer {
  padding: 2rem 0;
}

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

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

.lede {
  max-width: 60ch;
  color: var(--muted);
}

main {
  padding: 2rem 0 3rem;
  display: grid;
  gap: 2rem;
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

h1,
h2 {
  line-height: 1.2;
}

.field {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.grid-2 {
  display: grid;
  gap: 1rem;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}

.output-panel ol {
  padding-left: 1.25rem;
}

.output-panel code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95em;
}

#json-output {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
}

.validation {
  min-height: 1.5rem;
  margin-top: 0.75rem;
}

.validation.ok {
  color: #0f6b3a;
}

.validation.error {
  color: var(--danger);
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav {
  margin-top: 1.25rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
}

.hero-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.prose h2 {
  margin-top: 1.5rem;
}

.steps {
  padding-left: 1.25rem;
}

.submit-result {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.submit-result.ok {
  border-color: #0f6b3a;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.status-row input {
  flex: 1 1 16rem;
}

@media (prefers-color-scheme: dark) {
  .validation.ok {
    color: #7ddea8;
  }
}
