/* devrel.md: a well-typeset Markdown document, not a marketing site.
   No stock illustrations, no gradients, no emoji. Light and dark, mobile first. */

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5b5b5b;
  --border: #e2e2e2;
  --accent: #1f5eff;
  --code-bg: #f4f4f4;
  --table-stripe: #fafafa;
  --pass-yes: #0a7a3d;
  --pass-no: #b3261e;
  --pass-unknown: #8a6d00;
  --max-width: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --fg: #e8e8e8;
    --muted: #a3a3a3;
    --border: #2b2e33;
    --accent: #6d9bff;
    --code-bg: #1d2025;
    --table-stripe: #191c20;
    --pass-yes: #4fd189;
    --pass-no: #ff6f66;
    --pass-unknown: #e0b93c;
  }
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5b5b5b;
  --border: #e2e2e2;
  --accent: #1f5eff;
  --code-bg: #f4f4f4;
  --table-stripe: #fafafa;
}

:root[data-theme="dark"] {
  --bg: #14161a;
  --fg: #e8e8e8;
  --muted: #a3a3a3;
  --border: #2b2e33;
  --accent: #6d9bff;
  --code-bg: #1d2025;
  --table-stripe: #191c20;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.site-header,
.site-footer {
  border-color: var(--border);
}

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

.site-header nav,
.site-footer .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-header nav a.nav-link {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-header nav a.nav-link:hover {
  color: var(--accent);
}

.header-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem;
  color: var(--fg);
}

.github-link:hover {
  color: var(--accent);
}

.github-link .github-mark {
  height: 1.05rem;
  width: 1.05rem;
  flex: none;
}

.theme-toggle {
  font-size: 0.85rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  color: var(--fg);
  cursor: pointer;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

main h1 {
  font-size: 1.8rem;
  line-height: 1.25;
  margin-top: 0;
}

main h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

main h3 {
  font-size: 1.1rem;
  margin-top: 1.75rem;
}

main h2:first-child,
main h1 + h2 {
  border-top: none;
  padding-top: 0;
}

main p,
main ul,
main ol {
  color: var(--fg);
}

main a[href^="#"] {
  scroll-margin-top: 1.5rem;
}

main pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.875rem;
}

main code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

main :not(pre) > code {
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}

main th,
main td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

main tr:nth-child(even) td {
  background: var(--table-stripe);
}

main blockquote {
  margin: 1rem 0;
  padding: 0.25rem 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

.pass-yes { color: var(--pass-yes); font-weight: 600; }
.pass-no { color: var(--pass-no); font-weight: 600; }
.pass-unknown, .pass-n\/a { color: var(--pass-unknown); font-weight: 600; }

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

.raw-toggle {
  margin: 1.5rem 0;
}

.raw-toggle summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
}

.raw-toggle pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.callout {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--table-stripe);
}

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.skill-list li {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.9rem;
}

.skill-list h3 {
  margin: 0 0 0.35rem;
}

.skill-list .meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.install-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  overflow-x: auto;
}

form.generate-form,
form.lead-form,
form.validate-form {
  display: grid;
  gap: 0.9rem;
  margin: 1.5rem 0;
}

textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  resize: vertical;
}

.problem-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.problem-list li {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
}

.problem-list li:first-child {
  border-top: none;
}

.problem-list li > span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.problem-list li p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

label {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.3rem;
}

input[type="text"],
input[type="url"],
input[type="email"],
select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font-size: 1rem;
}

button.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.65rem 1.1rem;
  font-size: 1rem;
  cursor: pointer;
  justify-self: start;
}

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

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-row label {
  font-weight: 400;
  margin: 0;
}

.error-text {
  color: var(--pass-no);
  font-size: 0.9rem;
}

.stage-gates {
  display: grid;
  gap: 0.4rem;
  margin: 1rem 0;
}

.stage-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted var(--border);
  padding-bottom: 0.4rem;
}

@media (max-width: 480px) {
  main { padding: 1.5rem 1rem 3rem; }
  main h1 { font-size: 1.5rem; }
}

/* Home page: reads like agents.md. Generous whitespace and section rhythm
   instead of divider lines, a headline tagline under the H1, prominent code,
   a two-card comparison, and an FAQ that scans as a list of questions. */

body.home main {
  padding-top: 3rem;
}

/* The hero (H1, headline, lede, agent prompt) is an entrance: a wider measure
   than the reading column, centred on it. Below the hero the page returns to
   the narrow column. Same palette and type as everywhere else. */

.hero {
  margin-bottom: 1rem;
}

body.home main .hero h1 {
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

body.home main .hero h1 + h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

body.home main .hero .lede {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 38rem;
}

body.home main .hero blockquote {
  font-size: 0.92rem;
}

body.home main .hero pre {
  padding-block: 1.25rem;
  padding-inline-start: 1.5rem;
  font-size: 1.05rem;
  border-color: var(--accent);
}

@media (min-width: 56rem) {
  .hero {
    margin-inline: -5rem;
  }
  body.home main .hero h1 {
    font-size: 3rem;
  }
  body.home main .hero h1 + h2 {
    font-size: 1.85rem;
  }
}

body.home main h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 4rem;
  font-size: 1.5rem;
}

body.home main pre {
  padding-block: 1.25rem;
  padding-inline-start: 1.5rem;
  font-size: 0.92rem;
}

.code-link {
  margin: -0.25rem 0 1rem;
  font-size: 0.9rem;
}

/* Copy buttons are added by a small script; without JS none of this applies. */

.code-block {
  position: relative;
}

.code-block pre {
  padding-right: 5.5rem;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.2;
  padding: 0.25rem 0.6rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--fg);
  border-color: var(--muted);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

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

.compare-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
}

.compare-label {
  margin: 0 0 0.6rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.compare-card blockquote {
  margin: 0;
  padding: 0;
  border-left: none;
  color: var(--fg);
}

.faq-list {
  margin-top: 1rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--accent);
  font-weight: 700;
}

.faq-item[open] summary::before {
  content: "\2212";
}

.faq-item p:last-child {
  margin-bottom: 0;
}

.faq-item p {
  margin-top: 0.6rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  body.home main .hero h1 { font-size: 1.9rem; }
  body.home main .hero h1 + h2 { font-size: 1.25rem; }
  body.home main .hero .lede { font-size: 1.15rem; }
  body.home main .hero pre { font-size: 0.95rem; }
}

.wordmark .mark {
  height: 1.25em;
  width: 1.25em;
  flex: none;
}

.form-error {
  color: var(--pass-no);
  margin: 0.5rem 0;
}

.form-hint {
  color: var(--muted);
  margin: 0.5rem 0;
}

.turnstile-widget {
  min-height: 65px;
}

.generate-progress {
  margin: 1rem 0;
}

.generate-progress > span:not(.progress-dot) {
  font-weight: 600;
}

.progress-dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  animation: progress-pulse 1.2s ease-in-out infinite;
}

.progress-elapsed {
  color: var(--muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

@keyframes progress-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-dot { animation: none; }
}

/* Result page stage gates: one card per stage, saying what we found and,
   for gates that need the team's own numbers, what to measure. */
.gates-headline {
  margin: 0.5rem 0 1rem;
}

.gates-note {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9em;
}

.gate-cards {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.gate-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  background: var(--bg);
}

.gate-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.gate-head h3 {
  margin: 0;
  font-size: 1rem;
}

.gate-status {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.pass-na {
  color: var(--muted);
}

.gate-rule {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.25rem 0 0.5rem;
}

.gate-found,
.gate-measure {
  font-size: 0.9rem;
  margin: 0.35rem 0;
}

.gate-empty {
  color: var(--muted);
}

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