:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5f6368;
  --border: #e2e2e2;
  --accent: #2563eb;
  --good: #16a34a;
  --mid: #d97706;
  --low: #dc2626;
  --card-bg: #f8f9fa;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --fg: #f1f2f4;
    --muted: #9aa0a6;
    --border: #2c2f34;
    --card-bg: #1c1f24;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.5;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.tagline {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 auto;
  max-width: 46ch;
}

.scan-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#repo-input {
  flex: 1;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
}

#repo-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.scan-form button {
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.scan-form button:hover {
  filter: brightness(1.08);
}

.example-line {
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 46rem;
  margin: 0.6rem auto 0;
}

/* A button, not a link: it performs an action on this page rather than
   navigating, and screen-reader users should be told which. Styled as a link
   because that is what "one small optional thing to try" looks like. */
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  filter: brightness(1.3);
}

.link-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.loading,
.error {
  text-align: center;
}

.error {
  color: var(--low);
  font-weight: 600;
}

.score-card {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  background: var(--card-bg);
}

.score-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.score-card.good .score-number { color: var(--good); }
.score-card.mid .score-number { color: var(--mid); }
.score-card.low .score-number { color: var(--low); }

.score-suffix {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--muted);
}

.score-repo {
  margin-top: 0.4rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.check {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.check.pass {
  opacity: 0.65;
}

.check-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.check-icon {
  width: 1.1rem;
  text-align: center;
}

.check.pass .check-icon { color: var(--good); }
.check.fail .check-icon { color: var(--low); }

.check-weight {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}

.check-why,
.check-fix {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.check-fix strong {
  color: var(--fg);
}

.disclaimer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.disclaimer h2 {
  font-size: 1rem;
  color: var(--fg);
}

.footer {
  margin-top: 2rem;
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer p {
  margin: 0.75rem 0;
}

.privacy {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.archived-note {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--muted);
  font-size: 0.92rem;
}

.summary-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

#copy-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Docs pages (e.g. github-sponsors-readiness-checklist.html) add a worked
   table. `.table-wrap` gives it its own horizontal scroll on a narrow phone
   screen instead of pushing the whole page sideways. */
.table-wrap {
  overflow-x: auto;
}

.checklist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 8px 0 0;
}

.checklist-table caption {
  caption-side: bottom;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: left;
  padding-top: 8px;
}

.checklist-table th,
.checklist-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.checklist-table th:first-child,
.checklist-table td:first-child {
  text-align: right;
  white-space: nowrap;
}
