/* ============================================================
   OpCo Initiatives — styles
   Design tokens up top. This is the structure-first pass;
   restyling later means mostly changing these variables.
   ============================================================ */
:root {
  --bg: #0d1017;
  --surface: #151a24;
  --surface-2: #1c2331;
  --surface-3: #232c3d;
  --text: #eaf0fb;
  --muted: #93a0bd;
  --faint: #6b7793;
  --accent: #2f7cf6;      /* Arbitrum-ish blue */
  --accent-2: #12aaff;
  --border: #263149;
  --ok: #3ddc97;
  --warn: #ffb84d;
  --danger: #ff7a7a;
  --radius: 14px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.55; min-height: 100vh;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: rgba(13,16,23,.85); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.brand-logo { height: 28px; width: auto; display: block; }
/* The brand logo is the full-colour mark (navy wordmark), so it sits on a white
   chip to stay legible against the dark header. */
.brand-logo-chip { display: inline-flex; align-items: center; background: #fff; border-radius: 8px; padding: 6px 10px; }
.brand-fallback { display: inline-flex; align-items: center; gap: 10px; }
.top-nav { display: flex; gap: 6px; flex-wrap: wrap; overflow-x: auto; }
.top-nav a { color: var(--muted); font-size: 13px; padding: 5px 10px; border-radius: 8px; white-space: nowrap; }
.top-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.top-nav a.active { color: var(--text); background: var(--surface-3); }

/* Overview hero */
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 8px; }
.hero p { color: var(--muted); font-size: 17px; margin: 0; max-width: 640px; }
.asof { color: var(--faint); font-size: 13px; margin-top: 10px; }

/* OpCo summary band */
.opco-band { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin: 24px 0 8px; }
.opco-band h2 { margin: 0 0 4px; font-size: 15px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.opco-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 22px; margin-top: 12px; }
.opco-grid .k { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.opco-grid .v { font-size: 15px; margin-top: 2px; }
.people-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.person-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.person-chip .role { color: var(--faint); }

/* Section headings */
.section-title { margin: 34px 0 14px; font-size: 14px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s ease, transform .05s ease; color: var(--text);
}
.card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h3 { margin: 0; font-size: 18px; }
.card .cat { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }
.card-facts b { color: var(--text); font-weight: 600; }

/* Status pill */
.pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.pill.active { color: var(--ok); background: rgba(61,220,151,.12); border-color: rgba(61,220,151,.3); }
.pill.progress { color: var(--accent-2); background: rgba(18,170,255,.12); border-color: rgba(18,170,255,.3); }
.pill.winding { color: var(--warn); background: rgba(255,184,77,.12); border-color: rgba(255,184,77,.3); }
.pill.concluded { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.pill.notstarted { color: var(--muted); background: var(--surface-2); border-color: var(--border); }

/* Detail view */
.detail-head { padding: 34px 0 0; }
.back-link { color: var(--muted); font-size: 13px; }
.detail-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 6px; }
.detail-title h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); }
.detail-tagline { color: var(--muted); font-size: 17px; margin: 0 0 6px; max-width: 720px; }
.apply-btn { margin-left: auto; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-radius: 10px; padding: 8px 18px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.apply-btn:hover { opacity: .92; text-decoration: none; }

/* How rewards work */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.how-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.how-t { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.how-t::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); margin-right: 8px; vertical-align: middle; }
.how-d { color: var(--muted); font-size: 13px; line-height: 1.5; }
.detail-summary { color: var(--text); font-size: 15px; margin: 14px 0 0; max-width: 780px; opacity: .92; }

/* Quick-facts strip */
.facts-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 24px 0; }
.facts-strip .fact { background: var(--surface); padding: 14px 16px; }
.facts-strip .k { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.facts-strip .v { font-size: 15px; margin-top: 3px; }

/* Panels */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.panel.full { grid-column: 1 / -1; }
.panel h2 { margin: 0 0 14px; font-size: 14px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) { .panels { grid-template-columns: 1fr; } }

/* Reporting — horizontal strip */
.report-row { display: flex; flex-wrap: wrap; gap: 14px 40px; }
.report-row .rep-item .k { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.report-row .rep-item .v { font-size: 15px; margin-top: 3px; }

/* Key-value list */
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; }
.kv .k { color: var(--muted); font-size: 14px; }
.kv .v { text-align: right; font-size: 14px; font-weight: 500; }

/* Financials table */
.fin-list { display: flex; flex-direction: column; gap: 10px; }
.fin-list .row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.fin-list .row:last-child { border-bottom: none; padding-bottom: 0; }
.fin-list .lbl { color: var(--muted); font-size: 14px; }
.fin-list .amt { font-size: 15px; font-weight: 600; text-align: right; }
.note { color: var(--faint); font-size: 13px; margin-top: 14px; font-style: italic; }
.fin-lead { color: var(--ok); font-size: 13px; font-weight: 600; margin-bottom: 12px; padding: 8px 12px; background: rgba(61,220,151,.08); border: 1px solid rgba(61,220,151,.25); border-radius: 8px; }

/* Grants given list */
.grant-list { display: flex; flex-direction: column; }
.grant-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.grant-row:last-child { border-bottom: none; }
.grant-name { font-weight: 600; font-size: 14px; color: var(--text); }
.grant-name:hover { color: var(--accent-2); }
.grant-proj { color: var(--faint); font-size: 12px; margin: 1px 0 3px; }
.grant-deliv { font-size: 12px; }
.grant-deliv.none { color: var(--faint); font-style: italic; }
.grant-amt { font-weight: 700; font-size: 14px; white-space: nowrap; }
.fin-list .cap { color: var(--faint); font-weight: 400; font-size: 12px; }

/* Bounties by severity (Watchdog) */
.severity-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.sev-title { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 10px; }
.sev-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sev-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; text-align: center; }
.sev-level { color: var(--muted); font-size: 12px; }
.sev-amt { font-weight: 700; font-size: 14px; margin-top: 3px; }
.wallet { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); }

/* Participating delegates */
.delegate-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.delegate-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--text); }
.delegate-chip:hover { border-color: var(--accent); text-decoration: none; }
.delegate-chip.has-data { border-color: rgba(61,220,151,.35); }
.delegate-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; }

/* Delegate page — headline stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 22px 0 6px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat-v { font-size: 26px; font-weight: 700; }
.stat-k { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat-sub { color: var(--faint); font-size: 12px; margin-top: 2px; }

/* Data table (monthly breakdown) */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 10px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table .total-row td { font-weight: 700; font-size: 15.5px; color: var(--text); border-top: 2px solid var(--accent); background: var(--surface-2); padding-top: 12px; padding-bottom: 12px; }
.data-table .total-row td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.data-table .total-row td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

/* Leaderboard */
.lb-link { text-decoration: underline; color: var(--accent-2); font-weight: 600; }
.data-table a { color: var(--text); }
.data-table a:hover { color: var(--accent-2); }
.lb-table .lb-rank { color: var(--faint); font-weight: 700; width: 40px; text-align: center; }
.lb-table tbody tr { cursor: pointer; }
.lb-table tbody tr:hover td { background: var(--surface-2); }
.lb-table tbody tr:hover .lb-rank { color: var(--accent-2); }

/* Documents list (Code of Conduct) */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-row { display: block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; color: var(--text); }
.doc-row:hover { border-color: var(--accent); text-decoration: none; }
.doc-name { font-weight: 600; font-size: 14px; }
.doc-desc { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Conflict resolution */
.cr-intro { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.cr-steps { list-style: none; counter-reset: cr; margin: 0; padding: 0; }
.cr-steps li { position: relative; padding: 0 0 12px 30px; }
.cr-steps li:last-child { padding-bottom: 0; }
.cr-steps li::before { counter-increment: cr; content: counter(cr); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border); color: var(--accent-2); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cr-t { display: block; font-weight: 600; font-size: 14px; }
.cr-d { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.submit-btn { display: inline-block; margin-top: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-radius: 10px; padding: 9px 18px; font-size: 14px; font-weight: 600; }
.submit-btn:hover { opacity: .92; text-decoration: none; }

/* Eligibility criteria list */
.crit-list { list-style: none; margin: 0; padding: 0; }
.crit-list li { padding: 0 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.crit-list li:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.crit-t { display: block; font-weight: 600; font-size: 14px; }
.crit-t::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 8px; }
.crit-d { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; padding-left: 20px; }
.live-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--faint); border: 1px dashed var(--border); border-radius: 6px; padding: 2px 6px; margin-left: 8px; }

/* People list */
.pgroup { margin-bottom: 16px; }
.pgroup:last-child { margin-bottom: 0; }
.pgroup-title { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.people-list { display: flex; flex-direction: column; gap: 10px; }
.people-list .p { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.people-list .nm { font-weight: 600; font-size: 14px; }
.people-list .rl { color: var(--muted); font-size: 13px; text-align: right; }
.people-list .hd { color: var(--accent-2); font-size: 12px; }

/* Timeline */
.timeline { position: relative; margin: 0; padding: 0 0 0 18px; list-style: none; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 16px 16px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.timeline .t-date { color: var(--faint); font-size: 12px; }
.timeline .t-title { font-weight: 600; font-size: 14px; margin: 1px 0; }
.timeline .t-note { color: var(--muted); font-size: 13px; }

/* Proposals + updates lists */
.list-rows { display: flex; flex-direction: column; gap: 12px; }
.lrow { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.lrow:last-child { border-bottom: none; padding-bottom: 0; }
.lrow .lr-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lrow .lr-title { font-weight: 600; font-size: 14px; }
.lrow .lr-meta { color: var(--faint); font-size: 12px; }
.lrow .lr-note { color: var(--muted); font-size: 13px; margin-top: 3px; }
.tag { font-size: 11px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; }

/* KPI chips */
.kpi-list { display: flex; flex-direction: column; gap: 12px; }
.kpi { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.kpi .knm { font-size: 14px; font-weight: 600; }
.kpi .kst { font-size: 13px; color: var(--ok); text-align: right; }
.kpi .knote { color: var(--faint); font-size: 12px; }

/* Links */
.link-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.link-chips a { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; font-size: 13px; color: var(--text); }
.link-chips a:hover { border-color: var(--accent); text-decoration: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 22px 0; color: var(--faint); font-size: 13px; text-align: center; margin-top: 40px; }

.empty-note { color: var(--faint); font-size: 13px; font-style: italic; }

/* ---- Month payout chips (RAD page) + month view ------------------------- */
.sub-head { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--faint); font-weight: 700; }
.month-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.month-chip { display: inline-flex; flex-direction: column; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; color: var(--text); line-height: 1.25; }
.month-chip:hover { border-color: var(--accent); text-decoration: none; }
.month-chip .mc-label { font-size: 13px; font-weight: 600; }
.month-chip .mc-sub { font-size: 11.5px; color: var(--faint); }
.month-grid.tight { margin: 0 0 18px; }
.month-grid.tight .month-chip { padding: 6px 12px; border-radius: 999px; }
.month-chip.active { border-color: var(--accent); background: var(--surface); }
.month-chip.active .mc-label { color: var(--accent-2); }

/* Footer credit link — underline only, inherits the footer's colour. */
.plain-link { color: inherit; text-decoration: underline; }
.plain-link:hover { color: inherit; text-decoration: underline; }
