:root{
  --ink:#1f2937; --muted:#6b7280; --brand:#5a3dff; --bg:#fafafa; --card:#fff; --line:#eee;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--ink);
  font:16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Layout */
.container{max-width:1100px; margin:0 auto; padding:0 16px}
.page{padding:24px 0}

/* Header */
.site-header{position:sticky; top:0; z-index:10; border-bottom:1px solid var(--line)}
.site-header .container{display:flex; align-items:center; gap:16px; padding:12px 16px}
.brand{font-weight:700; color:var(--ink); text-decoration:none}
.nav{margin-left:auto; display:flex; gap:14px}
.nav a{color:var(--ink); text-decoration:none; padding:6px 10px; border-radius:8px}
.nav a.active, .nav a:hover{background:#f5f5ff; color:#3c2bff}

/* Cards & buttons */
.cards{display:grid; gap:12px}
.card{background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px 18px; box-shadow:0 1px 2px rgba(0,0,0,.04)}
.btn{background:var(--brand); color:#fff; text-decoration:none; border-radius:10px; padding:10px 16px; display:inline-block}
.btn[disabled]{opacity:.6; pointer-events:none}
.meta{color:var(--muted); font-size:14px}
.pill{display:inline-block; padding:3px 8px; border-radius:999px; border:1px solid #e5e7eb; font-size:12px; color:#374151; background:#f9fafb}

/* Tables */
table{width:100%; border-collapse:collapse}
th,td{padding:8px 6px; border-bottom:1px solid var(--line); text-align:left}
th{text-transform:uppercase; font-size:12px; letter-spacing:.04em; color:#666}
.right{text-align:right}

/* === Header theme: brand background, white text === */
.site-header--brand{ background: var(--brand)!important; }
.site-header--brand .brand,
.site-header--brand .nav a{ color:#fff; }
.site-header--brand .nav a.active,
.site-header--brand .nav a:hover{ background: rgba(255,255,255,.16); color:#b5b5b5; }

/* Optional: logo sizing */
.brand-logo{ height:28px; width:auto; vertical-align:middle }

/* --- Active state contrast fixes --- */

/* When header is purple (site-header--brand), keep links white and show a light overlay */
header.site-header.site-header--brand .nav a { color:#fff; }
header.site-header.site-header--brand .nav a.active,
header.site-header.site-header--brand .nav a[aria-current="page"]{
  background: rgba(255,255,255,.22);
  color:#fff !important;
  border-radius:8px;
}

/* On white header, use your original light-blue chip */
header.site-header:not(.site-header--brand) .nav a.active,
header.site-header:not(.site-header--brand) .nav a[aria-current="page"]{
  background:#f5f5ff;
  color:#3c2bff;
  border-radius:8px;
}

/* Ensure the purple header actually goes purple (beats earlier background:#fff) */
header.site-header.site-header--brand { background: var(--brand) !important; }


