:root {
  --bg: #ffffff;
  --text: #202124;
  --title: #1a0dab;
  --url: #006621;
  --muted: #4d5156;
  --control: #70757a;
  --chip-bg: #f1f3f4;
  --chip-text: #3c4043;
  --shadow: 0 1px 6px rgba(32, 33, 36, 0.18);
  --font: "Arial", "Helvetica Neue", Helvetica, sans-serif;
  --site-header-h: 52px;
  /* Fixed footer (nav only); reserve for wrap on narrow viewports */
  --site-footer-reserve: 3.5rem;
  font-family: var(--font);
}

* { box-sizing: border-box; }

/* Screen-reader / Enter-submit only — not visible on landing */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}


/* Minimal top chrome — light, no card look */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  padding: 14px 24px;
  background: #fff;
  /* soft separation only — no heavy border chrome */
  box-shadow: 0 1px 0 rgba(32, 33, 36, 0.06);
}


.site-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-header-docs {
  color: #5f6368;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1;
  padding: 4px 2px;
}

.site-header-docs:hover {
  color: #202124;
  text-decoration: underline;
}

.site-header-docs:focus-visible {
  outline: 2px solid #1a0dab;
  outline-offset: 2px;
  border-radius: 2px;
}

.site-header-docs.is-current {
  color: #202124;
  cursor: default;
  text-decoration: none;
}

.site-header-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3c4043;
  text-decoration: none;
  border-radius: 50%;
  padding: 4px;
}

.site-header-github:hover {
  color: #202124;
  background: #f1f3f4;
}

.site-header-github:focus-visible {
  outline: 2px solid #1a0dab;
  outline-offset: 2px;
}

.site-header-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #3c4043;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-header-title:hover {
  color: #202124;
  text-decoration: underline;
}
.site-header-title:focus-visible {
  outline: 2px solid #1a0dab;
  outline-offset: 2px;
  border-radius: 2px;
}

.octicon {
  display: block;
}


.wrap {
  max-width: 652px;
  margin: 0 auto;
  padding: 0 20px var(--site-footer-reserve);
  display: flex;
  flex-direction: column;
}

/* Landing only: fill viewport under header so .hero can optically center */
.wrap:not(:has(.hero.has-results)) {
  min-height: calc(100vh - var(--site-header-h));
  min-height: calc(100dvh - var(--site-header-h));
}

/* Landing: viewport-center search under site-header */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  flex: 1 1 auto;
  padding-top: 0;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.hero.has-results {
  flex: 0 0 auto;
  justify-content: flex-start;
  padding-top: 16px;
  margin-bottom: 20px;
  text-align: left;
}

.logo {
  /* Prefer slight scale-down over wrap; fits ~320px with nowrap */
  font-size: clamp(1.35rem, 0.55rem + 6.2vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  color: #202124;
  white-space: nowrap;
}

.hero.has-results .logo {
  display: none; /* search-first results chrome — no landing tagline */
}

.tagline {
  color: var(--control);
  margin: 0 0 32px;
  font-size: 0.9rem;
  font-weight: 400;
}

.hero.has-results .tagline {
  display: none;
}

/* Google-like single input — soft shadow, no heavy border chrome */
.search-form {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 584px;
  margin: 0 auto;
  padding: 12px 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero.has-results .search-form {
  margin: 0;
}

.search-form input[type="search"] {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  min-width: 0;
}

.search-form input[type="search"]::placeholder {
  color: #9aa0a6;
}

.search-form button {
  border: 0;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 4px;
  padding: 8px 16px;
  margin-right: 6px;
  cursor: pointer;
}

.search-form button:hover {
  background: #e8eaed;
}

.search-form button:disabled {
  opacity: 0.55;
  cursor: wait;
}


.status {
  text-align: center;
  color: var(--control);
  margin: 24px 0 8px;
  font-size: 0.9rem;
}

.status.error { color: #d93025; }

/* Results: sterile stacked rows — no cards, no borders, no panels */
.results {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 28px;
}

.result {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}

.result .url {
  color: var(--url);
  font-size: 0.875rem;
  line-height: 1.3;
  word-break: break-all;
  margin-bottom: 2px;
}

.result a.title {
  color: var(--title);
  font-size: 1.25rem;
  line-height: 1.3;
  text-decoration: none;
  font-weight: 400;
  display: inline-block;
}

.result a.title:hover {
  text-decoration: underline;
}

.result a.title:visited {
  color: #681da8;
}

.result .snippet {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.58;
  margin: 4px 0 0;
}

.score-meter-wrap {
  position: relative;
  display: inline-block;
  margin-top: 8px;
  width: fit-content;
  /* Keep float above neighbors without covering title links */
  z-index: 1;
}

.score-meter-wrap.is-open {
  z-index: 20;
}

.score-meter {
  display: flex;
  gap: 3px;
  align-items: center;
  width: fit-content;
  cursor: help;
  outline: none;
  border-radius: 4px;
  padding: 2px;
  margin: -2px;
}

.score-meter:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1a0dab;
}

.score-box {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #e8eaed;
  pointer-events: none;
}

.score-box.filled {
  background: #34a853; /* soft professional green, not neon */
}

.score-box.filled-warn {
  background: #f9ab00; /* professional amber for spam risk */
}

/* Floating relevance card — white, soft shadow, generous padding */
.score-card {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 260px;
  max-width: min(320px, calc(100vw - 40px));
  padding: 16px 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(32, 33, 36, 0.16), 0 1px 4px rgba(32, 33, 36, 0.08);
  pointer-events: none; /* don't block title/result clicks underneath */
  z-index: 50; /* above fixed .site-footer (40) so last-row hover cards stay visible */
}

.score-meter-wrap.is-open .score-card {
  display: block;
}

.score-card-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.score-card-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: #5f6368;
  letter-spacing: 0.01em;
}

.score-card-big {
  font-size: 1.5rem;
  font-weight: 500;
  color: #202124;
  line-height: 1;
  margin-left: auto;
}

.score-card-of {
  font-size: 0.85rem;
  font-weight: 400;
  color: #80868b;
  margin-left: 1px;
}

.score-card-percent {
  font-size: 0.8rem;
  color: #80868b;
}

.score-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.score-card-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
}

.score-card-label {
  font-size: 0.8rem;
  color: #3c4043;
}

.score-card-meter {
  display: flex;
  gap: 2px;
  align-items: center;
}

.score-card-meter .score-box {
  width: 7px;
  height: 7px;
}

.score-card-pct {
  font-size: 0.75rem;
  color: #80868b;
  min-width: 2.4em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.score-card-footer {
  font-size: 0.75rem;
  color: #9aa0a6;
  padding-top: 4px;
}


/* Quiet crawlable prose below the fold (always in the HTML source).
   Hidden only after JS adds .has-results so the results list stays clean. */
.home-prose {
  max-width: 584px;
  margin: 0 auto;
  padding: 40px 20px 96px;
  color: var(--control);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 -1px 0 rgba(32, 33, 36, 0.04);
}

.home-prose h2 {
  font-size: 0.78rem;
  font-weight: 500;
  color: #80868b;
  letter-spacing: 0.01em;
  margin: 22px 0 8px;
}

.home-prose h2:first-child {
  margin-top: 0;
}

.home-prose p {
  margin: 0 0 10px;
}

.home-prose a {
  color: var(--control);
  text-decoration: none;
}

.home-prose a:hover {
  color: var(--text);
  text-decoration: underline;
}

.home-prose code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: transparent;
  padding: 0;
}

body:has(.hero.has-results) .home-prose {
  display: none;
}

/* Quiet agent callout under search (landing only) */
.agent-callout {
  max-width: 584px;
  margin: 12px auto 0;
  padding: 0;
  color: var(--control);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.hero.has-results .agent-callout {
  display: none;
}

.agent-callout a {
  color: var(--control);
  text-decoration: none;
}

.agent-callout a:hover {
  color: var(--text);
  text-decoration: underline;
}

.agent-callout code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: transparent;
  padding: 0;
}

/* Fixed bottom chrome: site nav only (always visible on /) */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 8px 20px 10px;
  background: #fff;
  box-shadow: 0 -1px 0 rgba(32, 33, 36, 0.06);
  color: var(--control);
  font-size: 0.8rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-width: 652px;
  margin: 0 auto;
}

.site-footer a {
  color: var(--control);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

@media (max-width: 600px) {
  /* clamp + nowrap already keep one line; avoid fixed 2.4rem wrap */
  .logo {
    font-size: clamp(1.25rem, 0.4rem + 5.8vw, 2.2rem);
  }
  .search-form { padding: 12px 14px; }
  .results { gap: 28px; }
}
