:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7fafc;
  color: #1f2328;
  --bg: #f6f9ff;
  --panel: #ffffff;
  --text: #1f2328;
  --muted: #59636e;
  --line: #d8dee4;
  --soft-line: #eaeef2;
  --soft: #f2f6ff;
  --brand: #0969da;
  --brand-strong: #0757b3;
  --accent: #4f46e5;
  --brand-soft: #eaf2ff;
  --brand-text: #0757b3;
  --shadow: 0 18px 48px rgba(31, 35, 40, 0.1);
  --shadow-soft: 0 10px 28px rgba(31, 35, 40, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(9, 105, 218, 0.16), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(79, 70, 229, 0.13), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #edf4ff 100%);
  color: var(--text);
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 56px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #0f172a;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 54px;
  height: auto;
}

.nav {
  display: inline-flex;
  gap: 8px;
}

.nav a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nav a[aria-current="page"] {
  border-color: rgba(9, 105, 218, 0.24);
  background: var(--brand-soft);
  color: var(--brand-text);
}

.nav a:hover {
  border-color: rgba(9, 105, 218, 0.3);
  background: var(--soft);
}

.hero {
  max-width: 820px;
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 12px;
  padding: 6px 10px;
  border: 1px solid rgba(9, 105, 218, 0.22);
  border-radius: 999px;
  background: rgba(9, 105, 218, 0.08);
  color: var(--brand-text);
  font-size: 14px;
  font-weight: 700;
}

h1 {
  position: relative;
  width: fit-content;
  margin: 0 0 16px;
  color: #0f172a;
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.035em;
  background: linear-gradient(120deg, #0f172a 8%, var(--brand) 58%, var(--accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 18px rgba(9, 105, 218, 0.12));
}

h1::after {
  content: "";
  display: block;
  width: 42%;
  height: 5px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  box-shadow: 0 5px 14px rgba(9, 105, 218, 0.2);
}

.lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.panel {
  border: 1px solid rgba(216, 222, 228, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.generator {
  position: relative;
  overflow: hidden;
  padding: 26px;
  margin-bottom: 24px;
  border-color: rgba(9, 105, 218, 0.26);
  box-shadow: var(--shadow);
}

.generator::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

h2 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 20px;
}

.generator h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.generator h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 6px rgba(9, 105, 218, 0.12);
}

.field {
  display: grid;
  gap: 10px;
}

.field + .field {
  margin-top: 18px;
}

.result-section[hidden] {
  display: none;
}

.generator > .hint + .result-section {
  margin-top: 30px;
}

.result-heading,
.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-heading {
  justify-content: space-between;
}

.result-list {
  display: grid;
  gap: 16px;
}

.result-item {
  display: grid;
  gap: 8px;
}

.result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #f6f8fa;
}

.result-card code {
  display: block;
  padding: 0;
  background: transparent;
  color: #30363d;
  overflow-wrap: anywhere;
}

.result-description {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 7px;
  margin: 0;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.result-description img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.result-description.is-primary {
  background: var(--brand-soft);
  color: var(--brand-text);
}

.result-description.is-success {
  background: #dafbe1;
  color: #116329;
}

.result-description.is-warning {
  background: #fff8c5;
  color: #7d4e00;
}

button.compact {
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

label {
  color: #30363d;
  font-weight: 700;
}

.input-row,
.result-row {
  display: grid;
  gap: 12px;
}

.input-row {
  grid-template-columns: 1fr auto auto;
}

.result-row {
  grid-template-columns: 1fr auto auto;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(31, 35, 40, 0.04);
}

input {
  height: 48px;
  padding: 0 14px;
}

textarea {
  min-height: 118px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(9, 105, 218, 0.18);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--brand);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

button:hover,
.button:hover {
  background: var(--brand-strong);
  box-shadow: 0 8px 18px rgba(9, 105, 218, 0.2);
  transform: translateY(-1px);
}

button.secondary,
.button.secondary {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
}

button.secondary:hover,
.button.secondary:hover {
  background: var(--soft);
  box-shadow: 0 8px 18px rgba(31, 35, 40, 0.08);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hint,
.status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.status[data-kind="error"] {
  color: #cf222e;
}

.status[data-kind="success"] {
  color: var(--brand-text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

section.panel {
  padding: 24px;
}

code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: #074799;
  font-family: ui-monospace, SFMono-Regular, SFMono, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  word-break: break-all;
}

pre {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #f6f8fa;
  color: #30363d;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.examples {
  display: grid;
  gap: 12px;
}

.example {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.example:hover {
  border-color: rgba(9, 105, 218, 0.32);
  box-shadow: 0 12px 24px rgba(31, 35, 40, 0.08);
  transform: translateY(-1px);
}

.example strong {
  color: #0f172a;
}

ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.registry-list {
  display: grid;
  gap: 12px;
  padding-left: 0;
  list-style: none;
}

.registry-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--soft-line);
}

.registry-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.registry-list strong {
  color: var(--text);
}

.site-footer {
  border-top: 1px solid rgba(216, 222, 228, 0.8);
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(12px);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
  color: var(--muted);
}

.footer-inner p {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.footer-inner strong {
  color: var(--text);
}

.footer-inner nav {
  display: flex;
  gap: 16px;
}

.footer-inner a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--brand);
}

.footer-inner small {
  white-space: nowrap;
}

li::marker {
  color: var(--brand);
  font-weight: 700;
}

@media (max-width: 760px) {
  main {
    padding: 28px 0;
  }

  .topbar,
  .nav {
    align-items: stretch;
    flex-direction: column;
  }

  .input-row,
  .result-row,
  .grid {
    grid-template-columns: 1fr;
  }

  button,
  .button {
    width: 100%;
  }

  .result-heading,
  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .footer-inner p {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

}

/* Git page-specific content layout */
.git-page .result-row {
  grid-template-columns: 1fr auto;
}

.git-page .wide {
  grid-column: 1 / -1;
}

.git-page .example {
  gap: 10px;
  align-items: start;
}

.git-page .example p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.git-page .example > code {
  grid-column: 1 / -1;
  display: block;
  padding: 9px 10px;
  background: #f6f8fa;
  color: #30363d;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .git-page .result-row,
  .git-page .examples,
  .git-page .example {
    grid-template-columns: 1fr;
  }
}
