:root{
  --bg0:#070A0F;
  --bg1:#0A101B;

  --text:#F4F7FF;
  --muted:#C5CDE6;     /* brighter for readability */
  --muted2:#A7B3D6;

  --line:rgba(255,255,255,.12);
  --line2:rgba(255,255,255,.08);

  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 18px;
  --radius2: 26px;
  --max: 1140px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";

  /* default accent (ASF main) */
  --accentA:#FF7A18;   /* orange */
  --accentB:#B3121D;   /* deep red */
  --glow: rgba(255,122,24,.14); /* subtle */
}

/* PAGE THEMES — used later on CUP/ACU/Fearless/RED pages */
body.theme-asf{
  --accentA:#FF7A18;
  --accentB:#B3121D;
  --glow: rgba(255,122,24,.14);
}
body.theme-cup{
  --accentA:#19E3A7;
  --accentB:#00A36C;
  --glow: rgba(25,227,167,.12);
}
body.theme-acu{
  --accentA:#FF7A18;
  --accentB:#FF3B3B;
  --glow: rgba(255,80,80,.12);
}
body.theme-fearless{
  --accentA:#B8B6B0;   /* steel light */
  --accentB:#6E6C66;   /* gunmetal */
  --glow: rgba(184,182,176,.14);
}
body.theme-red{
  --accentA:#FF3B3B;
  --accentB:#B3121D;
  --glow: rgba(255,59,59,.12);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background: linear-gradient(
  180deg,
  #1A1C1F 0%,
  #141618 100%
);
  color:var(--text);
  font-family:var(--sans);
  min-height:100vh;
  position:relative;
}

/* subtle depth – neutral grey only */
body::before{
  content:"";
  position:fixed; inset:0;
  pointer-events:none;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(255,255,255,.04), transparent 60%),
    radial-gradient(1000px 600px at 90% 10%, rgba(0,0,0,.35), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.15), transparent 35%, rgba(0,0,0,.45));
  opacity:.9;
}

/* ultra subtle grain (no colour shift) */
body::after{
  content:"";
  position:fixed; inset:0;
  pointer-events:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
  opacity:.05;
  mix-blend-mode:overlay;
}

a{color:inherit; text-decoration:none}
a:hover{opacity:.98}
img{max-width:100%; display:block}

.container{width:100%; max-width:var(--max); margin:0 auto; padding:0 28px}
/* tighter vertical rhythm */
.section{padding:8px 0}
.section.tight{padding:4px 0}

/* NAV */
.nav{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(7,10,15,.72);
  border-bottom: 1px solid var(--line2);
}
.nav-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
  gap:12px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:900; letter-spacing:.2px;
}

/* REAL logo slot (shows your emblem) */
.brand-logo{
  width:34px; height:34px;
  border-radius:10px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  padding:5px;
  object-fit:contain;
  box-shadow: 0 12px 34px rgba(0,0,0,.35);
}

.nav-links{display:flex; gap:14px; align-items:center}
.nav-links a{
  color:var(--muted);
  font-size:14px;
  padding:8px 10px;
  border-radius:10px;
}
.nav-links a.active, .nav-links a:hover{
  color:var(--text);
  background:rgba(255,255,255,.05);
  border:1px solid var(--line2);
}

.nav-cta{display:flex; gap:10px; align-items:center}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  padding:11px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  color:var(--text);
  font-weight:750;
  font-size:14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn:hover{transform: translateY(-1px)}
.btn.primary{
  border:1px solid color-mix(in srgb, var(--accentA) 45%, rgba(255,255,255,.10));
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--accentA) 30%, transparent), rgba(255,255,255,.03) 58%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
}
.btn.primary:hover{
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 18px 50px rgba(0,0,0,.45);
}
.btn.warn{
  border:1px solid rgba(255,209,102,.35);
  background:
    radial-gradient(circle at 20% 20%, rgba(255,209,102,.28), rgba(255,209,102,.05) 45%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}

.hamburger{display:none; border:1px solid var(--line); border-radius:12px; padding:10px; background:rgba(255,255,255,.03)}
.hamburger span{display:block; width:20px; height:2px; background:var(--text); margin:4px 0; opacity:.9}
.mobile-menu{display:none; padding:10px 0 16px; border-top:1px solid var(--line2)}
.mobile-menu a{display:block; padding:10px 10px; color:var(--muted); border-radius:12px}
.mobile-menu a:hover{background:rgba(255,255,255,.05); color:var(--text)}

/* HERO */
.hero{padding:48px 0 28px}
.hero-grid{
  display:grid; grid-template-columns: 1.2fr .8fr; gap:18px;
  align-items:stretch;
}
.hero-card{
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border-radius: var(--radius2);
  padding:26px;
  box-shadow: var(--shadow);
  overflow:hidden;
  position:relative;
}

/* remove all blue from hero shine */
.hero-card::after{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(700px 220px at 18% 0%, var(--glow), transparent 66%),
    radial-gradient(700px 240px at 90% 20%, rgba(255,255,255,.06), transparent 70%);
  pointer-events:none;
  opacity:.85;
}

/* watermark: less intrusive -> better readability */
.hero-watermark{
  position:absolute;
  inset:auto -60px -80px auto;
  width:360px;
  opacity:.065;
  transform: rotate(-8deg);
  pointer-events:none;
  filter: blur(.1px);
}

.hero h1{
  margin:10px 0 10px;
  font-size:44px; line-height:1.05;
  letter-spacing:-.8px;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.hero p{
  margin:0 0 16px;
  color:var(--muted);
  font-size:16px;
  line-height:1.62;
  max-width:64ch;
}
.hero-actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:14px}

.kpis{display:flex; flex-wrap:wrap; gap:10px; margin-top:14px}
.kpi{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line2);
  background:rgba(255,255,255,.035);
  color:var(--muted);
  font-size:13px;
}
.kpi strong{color:var(--text); font-weight:900}

.side-stack{display:grid; gap:12px}
.panel{
  border:1px solid var(--line2);
  background: rgba(255,255,255,.035);
  border-radius: var(--radius);
  padding:16px;
}
.panel h3{margin:0 0 10px; font-size:14px; letter-spacing:.3px; color:var(--text)}
.quick{display:grid; gap:10px}
.quick a{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line2);
  background:rgba(255,255,255,.035);
  color:var(--text);
  font-weight:800;
}
.quick a span{color:var(--muted2); font-weight:700; font-family:var(--mono); font-size:12px}

/* COMPONENTS */
.grid-3{display:grid; grid-template-columns: repeat(3, 1fr); gap:12px}
.grid-2{display:grid; grid-template-columns: repeat(2, 1fr); gap:12px}
.card{
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border-radius: var(--radius);
  padding:18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.card h2,.card h3{margin:0 0 10px; color:var(--text); text-shadow: 0 2px 16px rgba(0,0,0,.28)}
.card p{margin:0 0 10px; color:var(--muted); line-height:1.62}
.card h4{
  margin:0 0 8px;
  color:var(--text);
  font-size:14px;
  font-weight:900;
  letter-spacing:.2px;
}
.pill{
  display:inline-flex; gap:8px; align-items:center;
  padding:7px 11px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.90);
  font-size:12px;
  font-weight:800;
}
.pill.theme{
  border:1px solid color-mix(in srgb, var(--accentA) 46%, rgba(255,255,255,.14));
  background:
    radial-gradient(circle at 15% 15%, color-mix(in srgb, var(--accentA) 22%, transparent), rgba(255,255,255,.05) 62%),
    rgba(255,255,255,.04);
  color:rgba(255,255,255,.92);
}

.hr{height:1px;background:var(--line2); margin:12px 0}
.list{margin:0; padding-left:18px; color:var(--muted); line-height:1.75}
.list li{margin:6px 0}

.callout{
  border:1px solid color-mix(in srgb, var(--accentA) 30%, rgba(255,255,255,.14));
  background:
    radial-gradient(circle at 10% 20%, color-mix(in srgb, var(--accentA) 16%, transparent), rgba(255,255,255,.04) 62%),
    rgba(255,255,255,.03);
  padding:18px;
  border-radius: var(--radius);
}
.callout strong{color:var(--text)}

/* Logo chips */
.logo-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:10px;
}
.logo-chip{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
}
.logo-chip img{
  width:34px; height:34px;
  object-fit:contain;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.35));
}
.logo-chip span{
  color:rgba(255,255,255,.86);
  font-size:13px;
  font-weight:850;
}

/* Pillars switcher (interactive) */
.pillars{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}

.pillar-btn{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.88);
  font-weight:850;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.pillar-btn img{
  width:30px;
  height:30px;
  object-fit:contain;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.35));
}

.pillar-btn:hover{ transform: translateY(-1px); }

.pillar-btn.is-active{
  border-color: color-mix(in srgb, var(--accentA) 45%, rgba(255,255,255,.16));
  background:
    radial-gradient(circle at 15% 15%, color-mix(in srgb, var(--accentA) 16%, transparent), rgba(255,255,255,.05) 70%),
    rgba(255,255,255,.04);
}

.pillar-panel{
  margin-top:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  border-radius:18px;
  padding:14px 14px;
}

.pillar-title{
  font-weight:900;
  letter-spacing:.2px;
  margin-bottom:6px;
  color:var(--text);
}

.pillar-desc{
  color:var(--muted);
  line-height:1.6;
}

.pillar-links{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

/* Media card */
.media{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  border-radius: 22px;
  overflow:hidden;
}
.media img{
  width:100%;
  height:240px;
  object-fit:cover;
  opacity:.98;
}
.media .cap{
  padding:10px 14px;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
  border-top:1px solid var(--line2);
}

.news-thumb{
  border:1px solid var(--line2);
  border-radius:14px;
  overflow:hidden;
  margin-bottom:10px;
  background:rgba(255,255,255,.03);
}
.news-thumb img{
  width:100%;
  height:160px;
  object-fit:cover;
  display:block;
}

.media.full img{
  height:auto;
  max-height:520px;
  object-fit:contain;
  background:rgba(0,0,0,.20);
}

/* CUP theme accent (green) */
body.theme-cup{
  --accentA:#00b36b;     /* CUP green */
  --accentB:#1ad38a;     /* lighter green */
}

/* Slightly different pill tone for CUP */
body.theme-cup .pill.theme{
  border-color: color-mix(in srgb, var(--accentA) 45%, rgba(255,255,255,.14));
  background:
    radial-gradient(circle at 15% 15%, color-mix(in srgb, var(--accentA) 20%, transparent), rgba(255,255,255,.05) 70%),
    rgba(255,255,255,.03);
}

/* Compact hero variant used on CUP */
.hero-compact{ padding:40px 0 22px; }

/* PDF embed */
.doc-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

.doc-embed{
  margin-top:12px;
  border:1px solid var(--line2);
  border-radius:16px;
  overflow:hidden;
  background: rgba(255,255,255,.02);
}

.doc-embed iframe{
  width:100%;
  height:480px;
  border:0;
}
.theme-cup .hero .media img {
  object-fit: contain;
  background: #0f1113; /* keeps tactical look if image has empty space */
}
body.theme-acu .hero .media.full img{
  height:auto;
  max-height:420px;
  object-fit:contain;
  background: rgba(0,0,0,.18);
}
body.theme-fearless .hero .media.full img{
  height:auto;
  max-height:420px;
  object-fit:contain;
  background: rgba(0,0,0,.18);
}

/* Simple vertical stack helper (keeps spacing consistent) */
.stack{
  display:flex;
  flex-direction:column;
  gap:14px;
}

/* Reusable form styling matching card aesthetic */
.acu-form input,
.acu-form select,
.acu-form textarea{
  width:100%;
  margin-top:6px;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline:none;
}

.acu-form textarea{ resize: vertical; min-height: 90px; }

.acu-form label{
  display:block;
  font-size:.92rem;
  color: var(--muted);
}

.form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

.form-grid .full{ grid-column: 1 / -1; }

.checks{ display:flex; flex-direction:column; gap:10px; }
.check{ display:flex; gap:10px; align-items:flex-start; color:var(--muted); font-size:.95rem; line-height:1.5; }
.check input{ margin-top:4px; }

/* Footer */
.footer{
  padding:18px 0 24px;
  border-top:1px solid var(--line2);
  color:var(--muted);
}
.footer-grid{display:grid; grid-template-columns: 1.2fr .8fr; gap:18px}
.foot-links{display:flex; gap:14px; flex-wrap:wrap}
.foot-links a{color:var(--muted)}
.small{font-size:12px; color:var(--muted2); line-height:1.55}
.theme-fearless .indemnity-scroll{
  max-height: 320px;
  overflow: auto;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
}

.theme-fearless .indemnity-scroll p{
  margin: 0 0 10px;
  line-height: 1.7;
}

/* Keep indemnity + checks stacked and full width */
.indemnity-wrap{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.indemnity-block{
  width:100%;
}

/* CHECKLISTS (Indemnity + Radio) — stable, never centered */
.checks{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:stretch;
}

.check{
  width:100%;
  display:grid;
  grid-template-columns: 18px 1fr;
  column-gap:10px;
  align-items:start;
  color:var(--muted);
  font-size:.95rem;
  line-height:1.5;
}

/* Checkbox alignment */
.check input[type="checkbox"]{
  width:16px;
  height:16px;
  margin:3px 0 0;
}

/* Signature row stays stacked cleanly */
.check.check-sign{
  display:block;
}
.check.check-sign span{
  display:block;
  margin-bottom:6px;
}
.check.check-sign input[type="text"]{
  width:100%;
}
/* RED-only: scrollable rules panel (scoped) */
body.theme-red .rules-scroll{
  max-height: 260px;
  overflow: auto;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
}

body.theme-red .rules-scroll .list li{
  margin: 8px 0;
  line-height: 1.75;
}

/* Contribute page theme (deep blue) */
body.theme-contribute{
  --accentA:#3B82F6;   /* blue */
  --accentB:#1D4ED8;   /* deep blue */
  --glow: rgba(59,130,246,.14);
}

/* Groups page helpers */
.groups-grid .group-card .group-top{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.group-logo{
  width:58px;
  height:58px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  object-fit:cover;
  flex:0 0 auto;
}

.group-card.restricted{
  border-color: rgba(255,140,0,.18);
}

/* ======================================
   GLOBAL SELECT / DROPDOWN STYLING
   ====================================== */

select {
  background-color: #2a2a2a; /* dark grey */
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;

  /* Keep native arrow visible */
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
}

/* Hover effect */
select:hover {
  background-color: #ffffff;
  color: #000000;
}

/* Focus state */
select:focus {
  outline: none;
  border-color: var(--accentA);
  box-shadow: 0 0 0 2px var(--glow);
}

/* Dropdown list options */
select option {
  background-color: #2a2a2a;
  color: #ffffff;
}

/* Disabled state */
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* Global form button loading */
.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.btn.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: spin .6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Global success + error message */
.form-feedback {
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.form-feedback.success {
  color: #4ade80;
}

.form-feedback.error {
  color: #f87171;
}
/* Modal (simple, site-native) */
.modal{ position:fixed; inset:0; display:none; z-index:2000; }
.modal[aria-hidden="false"]{ display:block; }

.modal-backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.78);
}

.modal-card{
  position:relative;
  width:min(720px, calc(100% - 24px));
  margin: 70px auto 0;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
}

.modal-head{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:12px;
  padding:16px 16px 10px;
  border-bottom:1px solid rgba(255,255,255,.10);
}

.modal-body{ padding:16px; }

/* Contribute: Section 18A row + help button */
.sec18a-row{
  display:flex;
  gap:10px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}

.btn.sec18a-help{
  padding:10px 12px;
  border-radius:14px;
  font-weight:800;
  border:1px solid color-mix(in srgb, var(--accentA) 35%, rgba(255,255,255,.12));
  background: rgba(255,255,255,.03);
}

/* “Locked amount” input styling (no redesign, just clarity) */
input.amount-locked{
  background: rgba(255,255,255,.06) !important;
  font-weight: 800;
  cursor: not-allowed;
}
@media (max-width: 980px){
  .modal-card{ margin: 18px auto 0; }
}

@media (max-width: 860px){
  .group-logo{ width:54px; height:54px; }
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr}
  .grid-2{grid-template-columns:1fr}
  .theme-fearless .indemnity-scroll{ max-height: 280px; }
  .container{ padding:0 22px; }
  .nav-links{display:none}
  .hamburger{display:inline-block}
  .form-grid{ grid-template-columns: 1fr; }
  .hero h1{font-size:36px}
  .hero-watermark{ width:260px; inset:auto -40px -60px auto; opacity:.055;}
  .doc-embed iframe{ height:360px; }
  body.theme-red .rules-scroll{ max-height: 240px; }
  body.theme-acu .hero .media.full img{
    height:auto;
    max-height:420px;
    object-fit:contain;
    background: rgba(0,0,0,.18);
  }
  .nav-cta .btn{
    display:none;
  }

  .nav-cta{
    gap:0;
  }
  .footer-grid{
    grid-template-columns:1fr;
    gap:18px;
  }

  .footer .brand{
    justify-content:flex-start;
  }

  .footer .small{
    padding-right:15px;
    
  }

  .foot-links{
    display:grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap:8px 14px;
  }

  .foot-links a{
    padding:6px 0;
    font-size:14px;
  }
  /* Mobile hero tightening */
  /* Make hero actions feel compact + tidy */
  .hero-actions{
    gap:8px;
    margin-top:12px;
  }

  .hero-actions .btn{
    padding:10px 12px;
    font-size:13px;
    border-radius:12px;
  }

  /* Make KPI chips smaller + tighter */
  .kpis{
    gap:8px;
    margin-top:12px;
  }

  .kpi{
    padding:8px 10px;
    font-size:12px;
    border-radius:12px;
  }
  .pillars{
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:10px;
  }

  /* Make the last one span full width (so it looks intentional) */
  .pillars .pillar-btn:last-child{
    grid-column: 1 / -1;
    justify-content:center;
  }

  .pillar-btn{
    width:100%;
    justify-content:flex-start;
  }

}
