:root {
  --bg: #0c0f12;
  --surface: #141920;
  --surface-2: #1b222c;
  --border: #26303d;
  --text: #edf2f7;
  --muted: #9aa7b8;
  --primary: #197741;
  --primary-hover: #145e33;
  --accent: #d99b26;
  --danger: #c93b3b;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 16px; line-height: 1.6; }
body { margin: 0; background: var(--bg); color: var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: #6ee7a8; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); color: var(--text); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 16px; top: 16px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.site-main { min-height: 70vh; padding-bottom: 64px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(12, 15, 18, 0.94); border-bottom: 1px solid var(--border); backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-icon { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; }
.rec-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); display: inline-block; flex-shrink: 0; }

.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.nav-link { color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav-link:hover, .nav-link.is-active { color: var(--text); background: var(--surface-2); text-decoration: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius); font-family: var(--font-sans); font-size: 15px; font-weight: 600; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background 0.15s, border-color 0.15s; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: #ffffff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--surface-2); border-color: #3c4a5d; }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }

/* Typography */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 12px; color: var(--text); letter-spacing: -0.02em; }
h1 { font-size: 40px; }
h2 { font-size: 26px; margin-top: 40px; }
h3 { font-size: 19px; margin-top: 24px; }
p { margin: 0 0 16px; color: var(--text); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 12px; }

/* Home Hero */
.page-wrap, .legal-wrap { padding-top: 28px; }
.home-hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 32px; align-items: center; padding: 16px 0 32px; border-bottom: 1px solid var(--border); }
.hero-lead, .page-lead { font-size: 17px; color: var(--muted); max-width: 62ch; margin-bottom: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.hero-media { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.hero-media figcaption { padding: 10px 14px; font-size: 12px; color: var(--muted); font-family: var(--font-mono); border-top: 1px solid var(--border); }

/* Hairline KPI Bar */
.kpi-bar { display: flex; flex-wrap: wrap; gap: 16px 28px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 16px 0 24px; }
.kpi-item { display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.kpi-value { font-size: 15px; font-weight: 600; color: var(--text); font-family: var(--font-mono); }

/* Hub Cards */
.section { margin-top: 40px; }
.section-head p { color: var(--muted); margin-bottom: 20px; }
.hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hub-card { display: flex; flex-direction: column; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; transition: border-color 0.15s, background 0.15s; }
.hub-card:hover { border-color: var(--primary); background: var(--surface-2); text-decoration: none; }
.hub-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hub-tag { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent); }
.hub-arrow { color: var(--muted); font-size: 16px; }
.hub-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--text); }
.hub-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* Inner Page Header */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.page-header { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: center; margin-bottom: 20px; }
.page-header.is-compact { grid-template-columns: 1fr; margin-bottom: 12px; }
.meta-line { font-size: 13px; color: var(--muted); font-family: var(--font-mono); }
.page-banner { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }

/* Codes Panel */
.codes-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 20px 0 32px; }
.codes-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.codes-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.codes-remaining { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.codes-disclaimer { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.codes-list { display: flex; flex-direction: column; gap: 10px; }
.code-row { display: grid; grid-template-columns: 1.15fr 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.code-row.is-redeemed { opacity: 0.6; }
.code-row.is-redeemed .code-token { text-decoration: line-through; }
.code-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.code-token { font-size: 15px; font-weight: 600; padding: 4px 10px; color: #ffffff; background: var(--surface-2); border-color: #364354; }
.code-reward { font-weight: 600; color: #6ee7a8; font-size: 14px; }
.code-note { font-size: 13px; color: var(--muted); }
.code-actions { display: flex; align-items: center; gap: 8px; }
.codes-status-msg { font-size: 13px; color: var(--accent); margin-top: 10px; min-height: 18px; font-family: var(--font-mono); }
.codes-next { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }

/* Badges Database */
.badges-panel { margin: 20px 0 32px; }
.badges-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.pill:hover, .pill.is-active { background: var(--primary); border-color: var(--primary); color: #ffffff; }
.badges-progress { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.cat-chip { display: inline-block; font-size: 12px; font-family: var(--font-mono); padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.rarity-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.rarity-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.rarity-dot.is-common { background: #6ee7a8; }
.rarity-dot.is-uncommon { background: #60a5fa; }
.rarity-dot.is-rare { background: var(--accent); }
.rarity-dot.is-ultra { background: var(--danger); }
.badge-check { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
tr.is-checked { opacity: 0.62; }
tr.is-hidden { display: none; }

/* Prose & Tables */
.prose-body { max-width: 78ch; margin-top: 24px; }
.prose-body ul, .prose-body ol { padding-left: 22px; margin: 0 0 18px; }
.prose-body li { margin-bottom: 8px; }
.prose-body blockquote { margin: 20px 0; padding: 14px 18px; background: var(--surface); border-left: 3px solid var(--primary); border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted); }
.prose-body blockquote p:last-child { margin-bottom: 0; }
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius); }
.data-table caption { caption-side: bottom; text-align: left; font-size: 12px; color: var(--muted); padding: 10px 4px 0; }
.prose-body table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 18px 0 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; }
.data-table { width: 100%; border-collapse: collapse; margin: 18px 0 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.data-table th, .data-table td, .prose-body th, .prose-body td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th, .prose-body th { background: var(--surface-2); font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.data-table tr:last-child td, .prose-body tr:last-child td { border-bottom: 0; }
.mono { font-family: var(--font-mono); }

/* FAQ */
.faq-section { margin-top: 48px; max-width: 78ch; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.faq-item summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); font-size: 18px; }
.faq-item[open] summary::after { content: "-"; }
.faq-answer { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.faq-answer p { margin: 0; color: var(--muted); font-size: 15px; }

/* Engage & Comments */
.engage-section { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); max-width: 78ch; }
.engage-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.engage-left { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.share-msg, .comment-total, .comments-hint { font-size: 13px; color: var(--muted); }
[data-gf-liked] { background: var(--primary); border-color: var(--primary); color: #ffffff; }
.comment-form { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.comment-form input, .comment-form textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-family: var(--font-sans); font-size: 14px; }
[data-gf-reply-cancel] { display: none; }
[data-gf-replying] [data-gf-reply-cancel] { display: inline-flex; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; }
.comment-msg { font-size: 13px; color: var(--accent); }
.comments-list { display: flex; flex-direction: column; gap: 12px; }
.comments-list[data-gf-empty]::before { content: "No community notes yet. Be the first to share a verification update."; font-size: 14px; color: var(--muted); }
.comment-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.comment-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.comment-head time { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.owner-tag { display: none; font-size: 12px; font-family: var(--font-mono); background: var(--primary); color: #fff; padding: 2px 6px; border-radius: 4px; }
[data-gf-owner] .owner-tag { display: inline-block; }
.comment-text { margin: 0 0 8px; font-size: 14px; }
.reply-btn { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0; }
.comment-replies { margin-top: 10px; padding-left: 16px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 8px; }

/* Footer & 404 */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 36px 0 24px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.footer-brand { max-width: 460px; }
.footer-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.footer-note, .footer-contact { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.footer-nav a { font-size: 14px; color: var(--muted); }
.footer-nav a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 16px; font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.not-found { padding: 72px 24px; text-align: left; max-width: 640px; }

@media (max-width: 900px) {
  .home-hero, .page-header { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-cta { display: none; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  h1 { font-size: 30px; }
  h2 { font-size: 22px; }
  .header-inner { flex-wrap: wrap; padding: 10px 0; }
  .site-nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .hub-grid { grid-template-columns: 1fr; }
  .code-row { grid-template-columns: 1fr; }
  .code-actions { width: 100%; }
  .code-actions .btn { flex: 1; }
  .hero-actions .btn { width: 100%; }
}