/* Agent Parrot. Colours, corners and shadows are variables here. Dark mode swaps the colours below. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f7f5;
  --ink: #0e1a14;
  --muted: #56655d;
  --line: #e6ece8;
  --green: #12b76a;
  --green-deep: #0e3b2a;
  --green-ink: #087443;
  --yellow: #ffc531;
  --red: #f04438;
  --blue: #2e90fa;
  --grade-a: #12b76a;
  --grade-b: #66c61c;
  --grade-c: #f5b400;
  --grade-d: #f79009;
  --grade-f: #f04438;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(14, 26, 20, .06), 0 8px 24px rgba(14, 26, 20, .06);
  --hero-glow: radial-gradient(600px 300px at 90% 0%, rgba(18, 183, 106, .16), transparent 70%), radial-gradient(400px 240px at 0% 100%, rgba(255, 197, 49, .18), transparent 70%);
  --head: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --green-hover: #087443;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1210;
  --surface: #111b17;
  --surface-2: #19261f;
  --ink: #e7efea;
  --muted: #9bada3;
  --line: #24352c;
  --green-ink: #4fd18f;
  --green-deep: #0f3b2a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  --hero-glow: radial-gradient(600px 300px at 90% 0%, rgba(18, 183, 106, .18), transparent 70%), radial-gradient(400px 240px at 0% 100%, rgba(255, 197, 49, .10), transparent 70%);
  color-scheme: dark;
}
:root[data-theme="dark"] .btn-github { border-color: #3d4650; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); }
a { color: var(--green-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
code { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 800; color: var(--green-ink); margin: 0 0 .5em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.fine { font-size: .82rem; color: var(--muted); margin-top: 1em; }

/* ----- Top bar ----- */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1160px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.logo { font: 800 1.35rem/1 var(--head); letter-spacing: -.02em; }
.logo b { color: var(--green); }
.topbar nav { display: flex; align-items: center; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { background: var(--surface-2); }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-actions .btn { padding: 7px 16px; font-size: .9rem; }
.theme-toggle { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.theme-toggle:hover { background: var(--surface-2); border-color: var(--green); }
.theme-toggle .icon-sun, :root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.switch-mode { margin-top: 16px; font-weight: 600; }
@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; gap: 6px 12px; }
  .topbar-actions { margin-left: auto; }
  .topbar nav { order: 3; width: 100%; margin: 0; flex-wrap: wrap; overflow: visible; gap: 2px; }
  .topbar nav a { padding: 6px 10px; font-size: .88rem; }
}

/* ----- Layout ----- */
.wrap { max-width: 1160px; margin: 0 auto; padding: 28px 16px 64px; }
.section { margin-top: 48px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card + .card { margin-top: 20px; }
.card.narrow { max-width: 520px; margin: 24px auto; text-align: left; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h1, .card-head h2 { margin: 0; }
.page-head { margin-bottom: 20px; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-top: 28px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .two-col, .grid2 { grid-template-columns: 1fr; } }
.table-scroll { overflow-x: auto; }

/* ----- Buttons and forms ----- */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 .95rem var(--body); padding: 11px 20px; border-radius: 999px; border: 2px solid var(--green); background: var(--green); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover, button:hover { background: var(--green-hover); border-color: var(--green-hover); }
.btn.ghost, button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover, button.ghost:hover { border-color: var(--green); background: var(--surface-2); }
button.danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn.small, button.small { padding: 6px 12px; font-size: .82rem; }
.hero-actions, .share-row, .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
form.inline { display: inline-block; margin: 4px 6px 4px 0; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); border-color: var(--green); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
label.check input { width: auto; margin-top: 5px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; display: grid; gap: 8px; }
legend { font-weight: 700; padding: 0 6px; }
.notice { background: color-mix(in srgb, var(--green) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); padding: 12px 16px; border-radius: var(--radius-sm); }
.error { background: color-mix(in srgb, var(--red) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); color: var(--ink); padding: 12px 16px; border-radius: var(--radius-sm); }

.providers { display: grid; gap: 10px; margin: 12px 0; max-width: 380px; }
.btn-provider { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-provider:hover { border-color: var(--ink); }
.btn-linkedin { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.btn-github { background: #1f2328; border-color: #1f2328; color: #fff; }
.email-login { max-width: 380px; margin-top: 12px; }
.email-login label { font-size: .85rem; color: var(--muted); }
.email-row { display: flex; gap: 8px; }
.email-row button { white-space: nowrap; padding: 10px 14px; }
@media (max-width: 420px) { .email-row { flex-direction: column; } }
@media (max-width: 480px) {
  .brand { gap: 6px; }
  .brand .mark { width: 30px; height: 30px; }
  .logo { font-size: 1.1rem; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .btn { padding: 6px 11px; font-size: .82rem; }
  .theme-toggle { width: 32px; height: 32px; }
}

/* ----- Home ----- */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: center; background: var(--surface) var(--hero-glow); border: 1px solid var(--line); border-radius: 28px; padding: 40px; box-shadow: var(--shadow); }
.hero h1 em { font-style: normal; color: var(--green); }
.hero-polly { margin: 0; text-align: center; }
.hero-polly img { width: min(260px, 60vw); height: auto; filter: drop-shadow(0 12px 24px rgba(14, 59, 42, .25)); animation: bob 5s ease-in-out infinite; }
.hero-polly figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; font-style: italic; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .hero-polly img { animation: none; } }
.join-box { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); }
.join-title { font-weight: 800; margin: 0; }
.invited { font-weight: 700; color: var(--green-ink); }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 24px 20px; }
  .hero-polly { order: -1; }
  .hero-polly img { width: 140px; }
}

.ticker { overflow: hidden; margin: 20px 0 0; background: var(--green-deep); border-radius: 999px; }
.ticker-run { display: inline-flex; gap: 40px; white-space: nowrap; padding: 10px 20px; animation: ticker 60s linear infinite; }
.ticker a { color: #fff; text-decoration: none; font-size: .92rem; }
.ticker b { color: var(--yellow); margin-right: 6px; }
.ticker-copy { display: inline-flex; gap: 40px; }
.ticker:hover .ticker-run { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-run { animation: none; } }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.stat-strip div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat-strip strong { display: block; font: 800 2rem/1 var(--head); color: var(--green-ink); }
.stat-strip span { font-size: .85rem; color: var(--muted); }
.stat-strip.small strong { font-size: 1.5rem; }
@media (max-width: 760px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }

.pecking-mini { list-style: none; margin: 0; padding: 0; }
.pecking-mini a { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pecking-mini li:last-child a { border-bottom: 0; }
.pecking-mini a:hover { background: var(--surface-2); }
.pecking-mini .place { width: 1.6em; color: var(--muted); font-weight: 700; text-align: right; }
.pecking-mini .pname { flex: 1; font-weight: 600; }
.pecking-mini .pscore { font-family: var(--mono); font-weight: 700; }

.daily-col { display: grid; gap: 12px; }
.daily-teaser { display: grid; gap: 4px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.daily-teaser:hover { border-color: var(--green); }
.daily-teaser strong { font-size: 1.05rem; }
.daily-teaser .go { font-weight: 800; color: var(--green-ink); }
.daily-teaser.accent { background: var(--green-deep); color: #fff; border-color: var(--green-deep); }
.daily-teaser.accent .eyebrow, .daily-teaser.accent .go { color: var(--yellow); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step .num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: #0e1a14; font-weight: 800; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.article-card { display: block; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.article-card:hover { border-color: var(--green); }
.article-card p { color: var(--muted); font-size: .92rem; margin: 0; }
.article-card h3 { margin-top: 10px; }
@media (max-width: 860px) { .article-grid { grid-template-columns: 1fr; } }

/* ----- Grades and tags ----- */
.grade { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font: 800 1.6rem/1 var(--head); color: #fff; flex-shrink: 0; }
.grade.sm { width: 28px; height: 28px; font-size: .95rem; border-radius: 8px; }
.grade.xl { width: 120px; height: 120px; font-size: 4rem; border-radius: 28px; }
.grade-A { background: var(--grade-a); }
.grade-B { background: var(--grade-b); }
.grade-C { background: var(--grade-c); color: #3d2a00; }
.grade-D { background: var(--grade-d); }
.grade-F { background: var(--grade-f); }
.grade-none { background: var(--surface-2); color: var(--muted); border: 1.5px dashed var(--line); }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.tag-pass { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green-ink); }
.tag-fail { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.tag-mid { background: color-mix(in srgb, var(--yellow) 25%, transparent); }
.tag.founding { background: var(--yellow); color: #0e1a14; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: 0 0 16px; scrollbar-width: none; }
.tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.inline-tabs { margin: 0; }

/* ----- Directory ----- */
.agent-list { display: grid; gap: 10px; }
.agent-card { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
a.agent-card:hover { border-color: var(--green); box-shadow: var(--shadow); }
.agent-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.agent-desc { color: var(--muted); font-size: .9rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.agent-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.agent-tags .btn { margin-left: 4px; }
/* Agents from other directories (/listed) and the "Also listed on" badges */
.listed-search { display: flex; gap: 8px; margin: 14px 0 8px; }
.listed-search input { flex: 1; }
.listed-link { margin: 18px 0; padding: 14px 16px; border: 1.5px dashed var(--line); border-radius: var(--radius); }
.listed-on { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.listed-on a.tag { text-decoration: none; }
.listed-on a.tag:hover { outline: 1.5px solid var(--green); }
/* Key details on agent pages, and maker reputation */
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 24px; margin: 12px 0 0; }
.details > div { min-width: 0; }
.details dt { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.details dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.details dd .tag { margin: 2px 2px 0 0; white-space: normal; }
.rep { margin-top: 16px; }
.rep-head { display: flex; align-items: center; gap: 14px; }
.rep-score { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; font-weight: 800; font-size: 1.4rem; background: var(--surface-2); flex: none; }
.rep-A { background: color-mix(in srgb, var(--green) 22%, transparent); color: var(--green-ink); }
.rep-B { background: color-mix(in srgb, var(--green) 12%, transparent); }
.rep-C { background: color-mix(in srgb, var(--yellow) 28%, transparent); }
.rep-F { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.rep-none { border: 1.5px dashed var(--line); color: var(--muted); }
.rep-lines { list-style: none; padding: 0; margin: 14px 0 8px; display: grid; gap: 6px; }
.rep-lines b { display: inline-block; min-width: 2.2em; text-align: right; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 20px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .agent-card.untested { flex-wrap: wrap; } .agent-card.untested .agent-tags { justify-content: flex-start; width: 100%; } }
@media (max-width: 600px) { .agent-card { flex-wrap: wrap; } .agent-main { flex-basis: calc(100% - 70px); } .agent-tags { width: 100%; justify-content: flex-start; padding-left: 68px; } }

/* ----- Agent page ----- */
.agent-hero { display: flex; gap: 28px; align-items: flex-start; background: var(--surface) var(--hero-glow); border: 1px solid var(--line); border-radius: 28px; padding: 32px; box-shadow: var(--shadow); }
.meaning { font-size: 1.05rem; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; }
.facts span { background: var(--surface-2); padding: 8px 14px; border-radius: 999px; font-size: .9rem; }
.facts .bad { color: var(--red); }
.facts .ok { color: var(--green-ink); }
@media (max-width: 640px) { .agent-hero { flex-direction: column; padding: 22px; gap: 16px; } .grade.xl { width: 84px; height: 84px; font-size: 2.8rem; } }
.task { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.task-head { display: flex; gap: 16px; align-items: flex-start; }
.task-head h3 { font: 600 1rem/1.5 var(--body); white-space: pre-line; }
.task-score { flex-shrink: 0; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font: 800 1.1rem var(--mono); border: 3px solid; }
.score-ok { color: var(--green-ink); border-color: var(--green); }
.score-bad { color: var(--red); border-color: var(--red); }
.score-none { color: var(--muted); border-color: var(--line); }
.judge { background: var(--surface-2); padding: 12px 14px; border-radius: var(--radius-sm); font-size: .92rem; }
details summary { cursor: pointer; font-weight: 700; color: var(--green-ink); }
.answer { white-space: pre-wrap; word-wrap: break-word; background: var(--surface-2); padding: 14px; border-radius: var(--radius-sm); font: .85rem/1.55 var(--mono); max-height: 420px; overflow: auto; }
.cta-card { display: flex; gap: 20px; align-items: center; margin-top: 32px; background: var(--surface) var(--hero-glow); }
@media (max-width: 600px) { .cta-card { flex-direction: column; align-items: flex-start; } }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.num { text-align: right; font-family: var(--mono); font-weight: 700; }
.pecking .place { font: 800 1.2rem var(--head); color: var(--muted); width: 3em; }
.pecking tr:nth-child(1) .place, .pecking tr:nth-child(2) .place, .pecking tr:nth-child(3) .place { color: var(--green-ink); }

.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.price .amount { font: 800 3rem/1 var(--head); color: var(--green-ink); margin: 4px 0 12px; }
.price ul, .plain-list { padding-left: 1.2em; }
.price li, .plain-list li { margin-bottom: 6px; }
@media (max-width: 700px) { .price-grid { grid-template-columns: 1fr; } }

/* ----- News ----- */
.stories { display: grid; gap: 20px; max-width: 760px; }
.story { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.story h2 a { color: var(--ink); text-decoration: none; }
.story h2 a:hover { color: var(--green-ink); }
.story .source { font-size: .85rem; color: var(--muted); }
.polly-box { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border-left: 4px solid var(--green); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 12px; }
.polly-box p { margin: 0; font-size: .92rem; }
.polly-box .grade { vertical-align: middle; }
.news-day { max-width: 760px; margin-top: 32px; }
.day-heading { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 1.25rem; padding-bottom: 8px; margin-bottom: 14px; border-bottom: 2px solid var(--green); }
.day-heading time { font: 600 .9rem var(--body); color: var(--muted); }
.headlines { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.headlines li { display: grid; gap: 2px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.headlines li:last-child { border-bottom: 0; }
.headlines a { color: var(--ink); font-weight: 600; text-decoration: none; }
.headlines a:hover { color: var(--green-ink); text-decoration: underline; }

/* ----- Game ----- */
.game { max-width: 980px; }
.game-question { background: var(--green-deep); color: #fff; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 16px; }
.game-question .q { font-size: 1.1rem; font-weight: 600; margin: 0; white-space: pre-line; }
.game-question .muted { color: #b9d3c5; margin: 0 0 4px; }
.game-prompt { font: 800 1.3rem var(--head); }
.game-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .game-answers { grid-template-columns: 1fr; } }
.game-answer { display: grid; gap: 8px; align-content: start; text-align: left; background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; font: 400 .92rem/1.55 var(--body); cursor: pointer; }
.game-answer:hover:not(:disabled) { border-color: var(--green); background: var(--surface); transform: translateY(-2px); }
.game-answer .label { font-weight: 800; text-transform: uppercase; font-size: .75rem; letter-spacing: .1em; color: var(--green-ink); }
.game-answer .text { white-space: pre-wrap; max-height: 360px; overflow: auto; }
.game-answer:disabled { cursor: default; }
.game-answer.is-wrong { border-color: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.game-answer.is-wrong .label { color: var(--red); }
.game-answer.is-right { opacity: .8; }
.game-answer.picked { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 15%, transparent); }
.game-result { border-radius: var(--radius); padding: 16px 20px; margin: 4px 0 16px; border: 2px solid; }
.game-result.ok { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, var(--surface)); }
.game-result.bad { border-color: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.game-result .verdict { font: 800 1.3rem var(--head); margin-bottom: 6px; }
.game-finish .squares { font-size: 2rem; letter-spacing: 4px; margin: 0; }

/* ----- Articles ----- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.5em; font-size: 1.35rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.article .dek { font-size: 1.2rem; color: var(--muted); }

/* ----- Members ----- */
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.who { display: flex; gap: 16px; align-items: center; }
.who h1 { font-size: 1.8rem; margin: 0 0 6px; }
.invite-link input { font-family: var(--mono); font-size: .9rem; }

/* ----- Admin ----- */
.admin-story { border-top: 1px solid var(--line); padding: 16px 0; }
.admin-story.is-hidden { opacity: .55; }
.email-preview { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: #0e1a14; padding: 8px; margin: 12px 0; overflow-x: auto; }
.issue-list li { margin-bottom: 6px; }

/* ----- Footer ----- */
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 28px 16px; color: var(--muted); font-size: .9rem; }
.footer-inner div { display: flex; align-items: center; gap: 10px; color: var(--ink); margin-bottom: 10px; }

/* ----- Home: CoinGecko-style ranked table ----- */
.wrap.wide { max-width: 1280px; }
.market-head { padding: 8px 0 4px; }
.market-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: .3em; }
.market-head h1 em { font-style: normal; color: var(--green); }
.market-line { color: var(--muted); max-width: 60rem; }
.market-line strong { color: var(--ink); font-family: var(--mono); }
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.hl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.hl-card h2 { font-size: 1.05rem; }
.hl-card .card-head { margin-bottom: 4px; }
.hl-card .pecking-mini a { padding: 8px 4px; }
.hl-stack { display: grid; gap: 12px; padding: 0; border: 0; background: none; }
.hl-stack .daily-teaser { padding: 14px 16px; }
@media (max-width: 900px) { .highlights { grid-template-columns: 1fr; } }
.market { margin-top: 32px; }
.market .tabs { margin-bottom: 12px; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.agent-table th { position: sticky; top: 0; background: var(--surface); white-space: nowrap; }
.agent-table td { padding: 10px; }
.agent-table tbody tr:hover { background: var(--surface-2); }
.agent-table tbody tr:last-child td { border-bottom: 0; }
.agent-table .place { color: var(--muted); font-weight: 700; width: 2.5em; }
.agent-cell a { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; min-width: 220px; }
.agent-cell a > span { display: flex; flex-direction: column; min-width: 0; }
.agent-cell .small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 34rem; }
.agent-cell a:hover strong { color: var(--green-ink); }
.num-plain { white-space: nowrap; }
.task-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 28px; width: 72px; }
.task-bars .bar { flex: 1; border-radius: 2px 2px 0 0; background: var(--grade-a); }
.task-bars .bar.mid { background: var(--grade-c); }
.task-bars .bar.lo { background: var(--grade-f); }
.task-bars .bar.none { height: 8%; background: var(--line); }
.join-card h2 { margin-bottom: .3em; }
@media (max-width: 980px) { .hide-md { display: none; } }
@media (max-width: 640px) { .hide-sm { display: none; } .agent-cell .small { display: none; } .agent-cell a { min-width: 0; } }
.makers { margin-top: 32px; }
.makers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.maker-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.maker-card:hover { border-color: var(--green); }
.maker-card > span:not(.grade):not(.go) { display: flex; flex-direction: column; flex: 1; }
.maker-card .go { font-weight: 800; color: var(--green-ink); white-space: nowrap; align-self: center; }
@media (max-width: 760px) { .makers-grid { grid-template-columns: 1fr; } }
.tool-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.tool-list code { font-weight: 700; }
.agent-hero .tag-pass, .agent-hero .tag-fail { margin-bottom: 6px; }
/* Security flags */
.flags { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.flag { display: flex; gap: 10px; align-items: baseline; }
.flag-icon { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .75rem; font-weight: 800; background: var(--surface-2); }
.flag-good .flag-icon { background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green-ink); }
.flag-warn .flag-icon { background: color-mix(in srgb, var(--yellow) 35%, transparent); }
.flag-bad .flag-icon { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); }
/* Grade history chart */
.history-chart { width: 100%; height: auto; max-height: 260px; display: block; margin: 8px 0; }
.history-chart .band { font-size: 11px; fill: var(--muted); }
.history-chart .gridline { stroke: var(--line); stroke-dasharray: 3 4; }
.history-chart .line { fill: none; stroke: var(--green); stroke-width: 3; }
.history-chart .dot { fill: var(--surface); stroke: var(--green); stroke-width: 3; }
.history-chart .label { font-size: 12px; font-weight: 700; fill: var(--ink); }
.history-chart .date { font-size: 11px; fill: var(--muted); }

/* Compare two agents (/compare). Three columns: label, agent A, agent B. On phones the label sits above the pair. */
.cmp { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.cmp-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--line); }
.cmp-row:first-child { border-top: 0; }
.cmp-row > div { padding: 14px 16px; min-width: 0; overflow-wrap: anywhere; }
.cmp-row > div + div { border-left: 1px solid var(--line); }
.cmp-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cmp-top { background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
.cmp-head h2 { margin: 2px 0 4px; font-size: 1.2rem; }
.cmp-head .eyebrow { margin: 0; }
.cmp-desc { margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmp-win { background: color-mix(in srgb, var(--green) 7%, var(--surface)); }
.cmp-badge { margin-bottom: 4px; }
.cmp .grade { width: 40px; height: 40px; font-size: 1.2rem; vertical-align: middle; }
.cmp .flags.compact { margin: 0; gap: 6px; font-size: .875rem; }
.cmp .rep.compact { margin-top: 8px; }
.cmp .rep-score { width: 44px; height: 44px; font-size: 1.1rem; border-radius: 12px; }
.spark { display: inline-block; vertical-align: middle; }
.spark polyline { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 700px) {
  .cmp-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cmp-label { grid-column: 1 / -1; padding-bottom: 0 !important; }
  .cmp-row > div + div { border-left: 0; }
  .cmp-row > .cmp-cell + .cmp-cell, .cmp-top > div:last-child { border-left: 1px solid var(--line); }
  .cmp-row > div { padding: 10px 12px; }
}
.cmp .ok { color: var(--green-ink); }
.cmp .bad { color: var(--red); }

/* Member reviews */
#reviews { scroll-margin-top: 90px; }
.reviews .btn + .muted { margin-left: 10px; }
.stars { position: relative; display: inline-block; line-height: 1; font-size: 1rem; letter-spacing: 1px; vertical-align: -1px; }
.stars::before { content: '★★★★★'; color: var(--line); }
.stars-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; }
.stars-fill::before { content: '★★★★★'; color: var(--yellow); }
.stars.lg { font-size: 1.5rem; }
.tag-rating { background: color-mix(in srgb, var(--yellow) 22%, transparent); }
.reviews .review-summary { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; flex-wrap: wrap; }
.review-avg { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.review-write > summary { list-style: none; margin-bottom: 12px; }
.review-write > summary::-webkit-details-marker { display: none; }
.review-form { max-width: 40rem; }
.review-form textarea { width: 100%; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); resize: vertical; }
.star-input { border: 0; padding: 0; margin: 0; }
.star-input legend { font-weight: 700; margin-bottom: 4px; padding: 0; }
.star-row { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-row label { font-size: 2rem; line-height: 1; color: var(--line); cursor: pointer; padding: 2px; }
.star-row label:hover, .star-row label:hover ~ label, .star-row input:checked ~ label { color: var(--yellow); }
.star-row input:focus-visible + label { outline: 2px solid var(--green); border-radius: 6px; }
.review-list { list-style: none; padding: 0; margin: 16px 0 0; }
.review { padding: 14px 0; border-top: 1px solid var(--line); }
.review.mine { background: color-mix(in srgb, var(--yellow) 8%, transparent); padding-left: 10px; padding-right: 10px; border-radius: 10px; }
.review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-body p { margin: 8px 0 0; overflow-wrap: anywhere; }
.review-report { margin-top: 6px; font-size: .82rem; color: var(--muted); }
.review-report summary { cursor: pointer; }
.review-report form { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }

/* Report an agent (src/agent-report-views.js) */
.report-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.agent-report > summary { cursor: pointer; list-style: none; display: inline-block; }
.agent-report > summary::-webkit-details-marker { display: none; }
.agent-report > summary.danger { border-color: var(--red); color: var(--red); background: transparent; }
.agent-report form { margin-top: 10px; max-width: 560px; }
.agent-report fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.agent-report legend { font-weight: 700; margin-bottom: 4px; }
.agent-report .radio { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.agent-report .radio input { width: auto; margin: 0; }
.flag-community { font-weight: 600; }
/* Claim your listing (src/claim-views.js) */
.tag-claimed { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green-ink); text-decoration: none; }
.tag-unclaimed { background: transparent; border: 1px dashed var(--line, #ccc); color: var(--muted, #666); font-weight: 600; text-decoration: none; }
a.tag-claimed:hover, a.tag-unclaimed:hover { text-decoration: underline; }
.agent-hero .tag-claimed, .agent-hero .tag-unclaimed { margin-bottom: 6px; }
.check-result { font-size: 1.05rem; }
.check-result.ok b { color: var(--green-ink); }
.check-result.bad b { color: var(--red, #c92a2a); }
.invite-link label { display: block; margin-bottom: 4px; }
.invite-link input { width: 100%; }
/* A maker's agents' reviews together (maker pages, agent pages, cards) */
#maker-reviews { scroll-margin-top: 90px; }
.maker-reviews-top { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin: 12px 0 8px; }
.maker-reviews-top .review-summary { margin: 0; }
.dist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; min-width: 200px; flex: 1; max-width: 320px; }
.dist li { display: grid; grid-template-columns: 2.4em 1fr 2.4em; align-items: center; gap: 8px; font-size: .85rem; }
.dist-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.dist-bar span { display: block; height: 100%; background: var(--yellow); border-radius: 99px; }
.dist-n { color: var(--muted); text-align: right; }
.maker-rating { margin: 10px 0 0; }
.tag-maker-rating { border: 1px dashed var(--line); background: transparent; }
/* Weekly digest */
.digest-section h2 { margin-top: 0; }
.mover-list { list-style: none; padding: 0; margin: .5em 0 0; }
.mover-list li { display: flex; align-items: center; gap: .8em; padding: .55em 0; border-top: 1px solid var(--line); }
.mover-list li:first-child { border-top: 0; }
.mover-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mover-change { font: 700 1rem var(--mono, monospace); min-width: 3.2em; text-align: center; padding: .2em .4em; border-radius: 8px; }
.mover-change.up { color: var(--green-ink); background: color-mix(in srgb, var(--green) 14%, transparent); }
.mover-change.down { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.digest-top li { margin: .3em 0; }
.post-box { margin: .5em 0 1.5em; }
.post-box textarea { width: 100%; box-sizing: border-box; font: .92rem/1.5 var(--body); padding: .8em; border: 1px solid var(--line); border-radius: 10px; background: var(--card, var(--bg)); color: var(--ink); }
.post-box .row { display: flex; flex-wrap: wrap; align-items: center; gap: 1em; margin-top: .5em; }
