/* AI Visibility Checker — design tokens: DESIGN.md §4.1.
   pine #0E3B2E / gold #D4A94E / cream #FFF6DC. Georgia serif headings,
   system sans body. No external resources. */
:root {
  --pine: #0E3B2E;
  --gold: #D4A94E;
  --cream: #FFF6DC;
  --ink: #1A1A1A;
  --muted: #5C665F;
  --line: #E3DCC3;
  --pass: #1E7A4C;
  --block: #B3261E;
  --info: #2F5D8A;
  --grey: #8A938D;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}
h1, h2, h3, h4 { font-family: var(--serif); color: var(--pine); line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 40px; }
h2 { font-size: 28px; margin-top: 36px; }
h3 { font-size: 21px; }
p { margin: 0 0 14px; }
a { color: var(--pine); }
a:hover { color: var(--info); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
code, pre { font-family: var(--mono); font-size: .92em; }
pre {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}
code { background: #F4EEDC; padding: 1px 5px; border-radius: 4px; }

/* ---- header ---- */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: var(--pine); color: var(--cream);
}
header.site .wrap {
  display: flex; align-items: center; gap: 18px;
  min-height: 60px; padding-top: 8px; padding-bottom: 8px;
}
header.site a.logo {
  font-family: var(--serif); font-weight: 700; font-size: 20px;
  color: var(--cream); text-decoration: none; white-space: nowrap;
}
header.site a.logo:hover { color: var(--gold); }
header.site nav.main { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
header.site nav.main a {
  color: var(--cream); text-decoration: none; font-size: .95rem;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap;
}
header.site nav.main a:hover { background: rgba(255, 246, 220, .14); color: var(--gold); }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid var(--gold); color: var(--cream); border-radius: 8px; padding: 6px 12px; font-size: 1rem; cursor: pointer; }
/* Sponsor button is red (DESIGN §4.4: red = money-out only).
   This rule loads after sponsor.css, so it wins over the component default. */
.btn-sponsor {
  background: var(--block) !important;
  border-color: var(--block) !important;
  color: #fff !important;
}
.btn-sponsor:hover { background: #8F1D16 !important; border-color: #8F1D16 !important; }

/* ---- buttons ---- */
.btn {
  display: inline-block; font-family: inherit; font-weight: 700;
  font-size: 1rem; text-decoration: none; cursor: pointer;
  border-radius: 999px; padding: 11px 24px; line-height: 1.3;
  border: 2px solid transparent;
}
.btn-pine { background: var(--pine); color: var(--cream); border-color: var(--pine); }
.btn-pine:hover { background: #0A2E24; color: var(--cream); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--pine); color: var(--pine); }
.btn.small { padding: 7px 16px; font-size: .9rem; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-block { width: 100%; }

/* ---- hero / trust strip ---- */
.hero { padding: 44px 0 8px; }
.hero h1 { margin-bottom: 10px; }
.hero .lede { font-size: 18px; color: var(--muted); max-width: 720px; }
.hero .hero-grid { display: grid; grid-template-columns: 1fr 420px; gap: 32px; align-items: start; }
.hero-art { width: 100%; max-width: 420px; height: auto; }
.trust-strip {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  list-style: none; margin: 22px 0 0; padding: 14px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-weight: 600; color: var(--pine); font-size: .95rem;
}
.trust-strip li::before { content: "\2713\0020"; color: var(--pass); font-weight: 700; }

/* ---- layout ---- */
main { padding-bottom: 8px; }
section { padding: 18px 0; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 1px 4px rgba(14, 59, 46, .08);
  padding: 20px 24px; margin: 18px 0;
}
.prose { max-width: 760px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 24px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose th { background: #FAF7EF; color: var(--pine); }
.callout {
  background: #FAF7EF; border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 18px 0;
}
.callout p:last-child { margin-bottom: 0; }
.honest {
  background: #fff; border: 1px solid var(--gold); border-radius: 10px;
  padding: 16px 20px; margin: 18px 0;
}
.honest p { margin: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; margin-bottom: 16px; padding-left: 44px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--pine); color: var(--cream);
  font-family: var(--serif); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---- FAQ ---- */
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; margin-bottom: 10px;
}
.faq summary { font-weight: 700; color: var(--pine); cursor: pointer; font-family: var(--serif); font-size: 1.05rem; }
.faq details p { margin: 10px 0 0; }

/* ---- related links ---- */
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.related li a {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 18px; text-decoration: none;
  font-weight: 600; color: var(--pine);
}
.related li a:hover { border-color: var(--gold); }
.related li a span { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; margin-top: 2px; }

/* ---- footer ---- */
footer.site { background: var(--pine); color: var(--cream); margin-top: 40px; padding: 36px 0 24px; }
footer.site h3 { color: var(--gold); font-size: 1.05rem; }
footer.site a { color: var(--cream); }
footer.site a:hover { color: var(--gold); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 7px; font-size: .95rem; }
.foot-bottom { border-top: 1px solid rgba(255, 246, 220, .25); margin-top: 28px; padding-top: 16px; font-size: .88rem; color: #B9CEC2; }
.foot-bottom p { margin: 0 0 6px; }

/* ---- checker ---- */
.checker { margin: 24px 0; }
.checker-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 4px rgba(14, 59, 46, .08); padding: 22px 24px; }
.checker-card h2 { margin-top: 0; font-size: 22px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab {
  font-family: inherit; font-size: .95rem; font-weight: 600;
  background: #fff; color: var(--ink); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 8px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.tab svg { width: 17px; height: 17px; flex: none; }
.tab[aria-selected="true"] { background: var(--pine); color: var(--cream); border-color: var(--pine); }
.tab:hover { border-color: var(--pine); }
.checker label { display: block; font-weight: 700; color: var(--pine); margin-bottom: 6px; }
.checker input[type="url"], .checker input[type="text"], .checker textarea {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 1rem;
  padding: 12px 14px; border: 1.5px solid #D8D2C4; border-radius: 10px; background: #fff; color: var(--ink);
}
.checker input:focus, .checker textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.checker textarea { min-height: 180px; resize: vertical; font-family: var(--mono); font-size: .92rem; line-height: 1.5; }
.checker textarea.plain { font-family: var(--sans); }
.checker .row { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.checker .row input { flex: 1; min-width: 220px; }
.checker .hint { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.checker .error {
  display: none; background: #FDECEC; border: 1px solid #E8AFAF; color: #8B1E1E;
  border-radius: 10px; padding: 12px 16px; margin-top: 14px;
}
.checker .error.show { display: block; }
.checker .error p { margin: 0 0 8px; }
.checker .error p:last-child { margin-bottom: 0; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,246,220,.4); border-top-color: var(--cream); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* results */
.results { margin-top: 22px; }
.score-card { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.score-big { text-align: center; min-width: 150px; }
.score-num { font-family: var(--serif); font-size: 56px; line-height: 1; color: var(--pine); font-weight: 700; }
.score-grade {
  display: inline-block; margin-top: 8px; font-family: var(--serif); font-weight: 700;
  font-size: 1.1rem; border: 2px solid var(--gold); color: var(--pine);
  border-radius: 999px; padding: 3px 16px;
}
.score-note { flex: 1; min-width: 240px; }
.score-note p { margin: 0 0 8px; }
.group-bars { margin-top: 12px; }
.group-bar { display: grid; grid-template-columns: 170px 1fr 64px; gap: 10px; align-items: center; font-size: .88rem; margin-bottom: 6px; }
.group-bar .track { background: #EFEAD6; border-radius: 999px; height: 10px; overflow: hidden; }
.group-bar .fill { background: var(--pine); height: 100%; border-radius: 999px; }
.group-bar .pts { text-align: right; color: var(--muted); white-space: nowrap; }
.result-table-wrap { overflow-x: auto; }
table.results-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 10px 0; }
.results-table th, .results-table td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.results-table th { background: #FAF7EF; color: var(--pine); white-space: nowrap; }
.results-table td .tok { font-family: var(--mono); font-size: .88em; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.status svg { width: 20px; height: 20px; flex: none; }
.status.allowed, .status.pass { color: var(--pass); }
.status.blocked, .status.fail { color: var(--block); }
.status.not-mentioned, .status.not-checked { color: var(--grey); }
.status.info { color: var(--info); }
.evidence { font-family: var(--mono); font-size: .82rem; background: var(--cream); border-radius: 6px; padding: 8px 10px; margin-top: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.expand-btn { background: none; border: 0; color: var(--pine); font-family: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; padding: 4px 0; text-decoration: underline; display: inline-flex; align-items: center; gap: 4px; }
.expand-btn svg { width: 15px; height: 15px; transition: transform .2s; }
.expand-btn.open svg { transform: rotate(180deg); }
.fix-card { border: 1px solid var(--line); border-left: 4px solid var(--block); border-radius: 10px; padding: 16px 18px; margin: 12px 0; background: #fff; }
.fix-card.optional { border-left-color: var(--gold); }
.fix-card.info-card { border-left-color: var(--grey); }
.fix-card h3 { margin-top: 0; font-size: 1.1rem; }
.fix-card p { margin: 0 0 10px; }
.code-block { position: relative; }
.code-block .copy-btn {
  position: absolute; top: 8px; right: 8px;
  font-family: inherit; font-size: .82rem; font-weight: 700;
  background: #fff; color: var(--pine); border: 1.5px solid var(--pine);
  border-radius: 999px; padding: 4px 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.code-block .copy-btn svg { width: 14px; height: 14px; }
.code-block .copy-btn:hover { background: var(--pine); color: var(--cream); }
.code-block pre { padding-right: 96px; }
.empty-results {
  border: 1.5px dashed var(--line); border-radius: 10px; padding: 28px 20px;
  text-align: center; color: var(--muted); margin-top: 18px;
}
.empty-results svg { width: 40px; height: 40px; color: var(--pine); margin-bottom: 8px; }
.check-list { list-style: none; padding: 0; margin: 10px 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid #F0EBD8; }
.check-list li:last-child { border-bottom: 0; }
.check-list .status { flex: none; margin-top: 2px; }
.check-list .detail { flex: 1; }
.check-list .detail b { color: var(--pine); }
.check-list .detail .why { color: var(--muted); font-size: .92rem; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: #FAF7EF; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 2px 10px; }
.pill.optional { background: #FFF6DC; border-color: var(--gold); color: #7A5E1E; }

/* sponsored slot on home */
.sponsor-zone { margin: 26px 0; }
.sponsor-zone h2 { margin-bottom: 6px; }

/* ---- breakpoints ---- */
@media (max-width: 860px) {
  .hero .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  header.site nav.main {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: var(--pine); flex-direction: column; padding: 10px 20px 16px; gap: 2px;
  }
  header.site nav.main.open { display: flex; }
  header.site nav.main a { padding: 9px 10px; }
  .nav-toggle { display: inline-block; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 30px; }
  h2 { font-size: 24px; }
  .btn { width: 100%; text-align: center; }
  .checker .row .btn { width: auto; }
  .related ul { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .group-bar { grid-template-columns: 120px 1fr 56px; }
  .card { padding: 16px 18px; }
  .checker-card { padding: 16px 18px; }
  .score-num { font-size: 48px; }
}
