/* ==========================================================================
   Agro Capital Investment — front-end design system
   Deep green + gold agricultural/financial identity. Mobile-first.
   ========================================================================== */

/* The custom properties are declared on :root AND on .agi-wrap so that a theme
   or plugin which resets/overrides :root cannot strip the design tokens the
   front-end depends on. Every var() also carries a literal fallback. */
:root,
.agi-wrap {
  --agi-green-900: #08281d;
  --agi-green-800: #0f3d2e;
  --agi-green-700: #14503c;
  --agi-green-600: #1c6b50;
  --agi-green-500: #2a8c68;
  --agi-green-50:  #eef6f1;
  --agi-gold-600:  #a8861c;
  --agi-gold-500:  #c9a227;
  --agi-gold-400:  #e0bc45;
  --agi-gold-50:   #fdf7e6;
  --agi-ink:       #16241d;
  --agi-muted:     #5c6f66;
  --agi-line:      #dfe8e2;
  --agi-bg:        #f6f9f7;
  --agi-white:     #ffffff;
  --agi-red:       #b23c3c;
  --agi-radius:    12px;
  --agi-radius-sm: 8px;
  --agi-shadow:    0 4px 18px rgba(8, 40, 29, .08);
  --agi-shadow-lg: 0 16px 44px rgba(8, 40, 29, .16);
  --agi-max:       1200px;
  --agi-font:      'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
.agi-wrap *, .agi-wrap *::before, .agi-wrap *::after { box-sizing: border-box; }

.agi-wrap {
  font-family: var(--agi-font);
  color: var(--agi-ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.agi-wrap img { max-width: 100%; height: auto; display: block; }
.agi-wrap a { color: var(--agi-green-700); text-decoration: none; }
.agi-wrap a:hover { color: var(--agi-gold-600); }

.agi-container { width: 100%; max-width: var(--agi-max); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.agi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 0;
  border-radius: var(--agi-radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
  text-align: center;
}
.agi-btn:hover { transform: translateY(-2px); }
.agi-btn:active { transform: translateY(0); }

.agi-btn--primary { background: var(--agi-gold-500); color: var(--agi-green-900); box-shadow: 0 6px 18px rgba(201, 162, 39, .32); }
.agi-btn--primary:hover { background: var(--agi-gold-400); color: var(--agi-green-900); }

.agi-btn--green { background: var(--agi-green-700); color: #fff; }
.agi-btn--green:hover { background: var(--agi-green-600); color: #fff; }

.agi-btn--ghost { background: transparent; color: var(--agi-green-800); border: 2px solid var(--agi-green-700); }
.agi-btn--ghost:hover { background: var(--agi-green-700); color: #fff; }

.agi-btn--light { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.34); }
.agi-btn--light:hover { background: rgba(255,255,255,.24); color: #fff; }

.agi-btn--sm { padding: 9px 16px; font-size: 13.5px; }
.agi-btn--block { width: 100%; }
.agi-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Sections ---------- */
.agi-section { padding: 76px 0; }
.agi-section--tight { padding: 52px 0; }
.agi-section--bg { background: var(--agi-bg); }
.agi-section--dark { background: var(--agi-green-800); color: #fff; }
.agi-section--dark h2, .agi-section--dark h3 { color: #fff; }
.agi-section--dark p { color: rgba(255,255,255,.82); }

.agi-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--agi-gold-600);
  margin-bottom: 12px;
}
.agi-section--dark .agi-eyebrow { color: var(--agi-gold-400); }

.agi-h1 { font-size: clamp(32px, 5.2vw, 54px); line-height: 1.1; font-weight: 800; margin: 0 0 18px; letter-spacing: -.02em; }
.agi-h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.18; font-weight: 800; margin: 0 0 16px; letter-spacing: -.015em; }
.agi-h3 { font-size: clamp(19px, 2.2vw, 24px); font-weight: 700; margin: 0 0 12px; }
.agi-h4 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }

.agi-lead { font-size: 17.5px; color: var(--agi-muted); max-width: 62ch; }
.agi-section--dark .agi-lead { color: rgba(255,255,255,.8); }

.agi-center { text-align: center; }
.agi-center .agi-lead { margin-left: auto; margin-right: auto; }
.agi-mt-0 { margin-top: 0; }
.agi-mt-1 { margin-top: 10px; }
.agi-mt-2 { margin-top: 20px; }
.agi-mt-3 { margin-top: 32px; }
.agi-mb-2 { margin-bottom: 20px; }

/* ---------- Hero ---------- */
.agi-hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(8,40,29,.96) 0%, rgba(15,61,46,.92) 52%, rgba(28,107,80,.86) 100%),
    radial-gradient(circle at 78% 18%, rgba(201,162,39,.30), transparent 58%);
  color: #fff;
  padding: 86px 0 92px;
  overflow: hidden;
}
.agi-hero::after {
  content: "";
  position: absolute;
  right: -140px; top: -140px;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,39,.20), transparent 68%);
  pointer-events: none;
}
.agi-hero__grid { display: grid; gap: 46px; align-items: center; position: relative; z-index: 2; }
.agi-hero h1 { color: #fff; }
.agi-hero p { color: rgba(255,255,255,.86); font-size: 17.5px; max-width: 56ch; }
.agi-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.agi-hero__badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.agi-hero__badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.92);
}
.agi-hero__badge svg { width: 15px; height: 15px; flex: none; }

/* ---------- Cards ---------- */
.agi-card {
  background: var(--agi-white);
  border: 1px solid var(--agi-line);
  border-radius: var(--agi-radius);
  padding: 26px;
  box-shadow: var(--agi-shadow);
}
.agi-card--pad-lg { padding: 32px; }
.agi-card__title { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.agi-card__sub { font-size: 14px; color: var(--agi-muted); margin: 0; }

/* ---------- Plan cards ---------- */
.agi-plans { display: grid; gap: 22px; grid-template-columns: 1fr; }

.agi-plan {
  position: relative;
  background: #fff;
  border: 1px solid var(--agi-line);
  border-radius: var(--agi-radius);
  padding: 28px 24px;
  box-shadow: var(--agi-shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.agi-plan:hover { transform: translateY(-5px); box-shadow: var(--agi-shadow-lg); border-color: var(--agi-gold-500); }

.agi-plan--featured { border: 2px solid var(--agi-gold-500); box-shadow: 0 14px 40px rgba(201,162,39,.22); }
.agi-plan__flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--agi-gold-500); color: var(--agi-green-900);
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 15px; border-radius: 999px; white-space: nowrap;
}

.agi-plan__name { font-size: 19px; font-weight: 800; margin: 0 0 4px; color: var(--agi-green-800); }
.agi-plan__tagline { font-size: 13.5px; color: var(--agi-muted); margin: 0 0 14px; line-height: 1.45; min-height: 39px; }
.agi-plan__price { font-size: 38px; font-weight: 800; color: var(--agi-green-900); line-height: 1.05; letter-spacing: -.02em; }
.agi-plan__price small { font-size: 14px; font-weight: 600; color: var(--agi-muted); letter-spacing: 0; }

.agi-plan__roi {
  margin: 18px 0;
  background: var(--agi-gold-50);
  border: 1px solid #f0e2b8;
  border-radius: var(--agi-radius-sm);
  padding: 14px 16px;
}
.agi-plan__roi strong { display: block; font-size: 23px; color: var(--agi-green-800); line-height: 1.15; }
.agi-plan__roi span { font-size: 13px; color: var(--agi-gold-600); font-weight: 700; }

.agi-plan__list { list-style: none; margin: 0 0 22px; padding: 0; font-size: 14.5px; }
.agi-plan__list li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--agi-line);
  color: var(--agi-muted);
}
.agi-plan__list li:last-child { border-bottom: 0; }
.agi-plan__list b { color: var(--agi-ink); font-weight: 700; white-space: nowrap; }
.agi-plan__qty { display: block; font-style: normal; font-size: 12px; color: var(--agi-muted); opacity: .85; margin-top: 1px; }
.agi-plan__list--total { border-top: 1px solid var(--agi-line); border-bottom: 1px solid var(--agi-line) !important; margin-top: 2px; font-weight: 700; }
.agi-plan__list--total span { color: var(--agi-ink); }
.agi-plan__cta { margin-top: auto; }

/* ---------- Stats band ---------- */
.agi-stats { display: grid; gap: 26px; grid-template-columns: repeat(2, 1fr); text-align: center; }

/* Plan cards hold eight rows now, so three across needs more room before
   the four-across breakpoint takes over. */
@media (min-width: 768px) {
  .agi-plans { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .agi-plans { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .agi-plan { padding: 26px 18px; }
  .agi-plan__list { font-size: 13.5px; }
}
.agi-stat__num { font-size: clamp(28px, 4vw, 42px); font-weight: 800; color: var(--agi-gold-400); line-height: 1; letter-spacing: -.02em; }
.agi-stat__label { font-size: 13.5px; text-transform: uppercase; letter-spacing: .11em; color: rgba(255,255,255,.72); margin-top: 8px; font-weight: 600; }
.agi-stat--light .agi-stat__num { color: var(--agi-green-700); }
.agi-stat--light .agi-stat__label { color: var(--agi-muted); }

/* ---------- Feature grid ---------- */
.agi-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
.agi-grid--2 { grid-template-columns: 1fr; }
.agi-grid--3 { grid-template-columns: 1fr; }
.agi-grid--4 { grid-template-columns: 1fr; }

.agi-feature {
  background: #fff; border: 1px solid var(--agi-line); border-radius: var(--agi-radius);
  padding: 26px 24px; transition: transform .18s ease, box-shadow .18s ease;
}
.agi-feature:hover { transform: translateY(-4px); box-shadow: var(--agi-shadow); }
.agi-feature__icon {
  width: 46px; height: 46px; border-radius: 11px;
  background: var(--agi-green-50); color: var(--agi-green-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.agi-feature__icon svg { width: 23px; height: 23px; }
.agi-feature h3 { font-size: 17.5px; margin: 0 0 8px; color: var(--agi-green-800); }
.agi-feature p { margin: 0; font-size: 14.8px; color: var(--agi-muted); }

/* ---------- Steps ---------- */
.agi-steps { display: grid; gap: 24px; grid-template-columns: 1fr; counter-reset: agistep; }
.agi-step { position: relative; padding-left: 66px; }
.agi-step::before {
  counter-increment: agistep; content: counter(agistep, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--agi-green-700); color: var(--agi-gold-400);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.agi-step h3 { font-size: 17px; margin: 6px 0 7px; }
.agi-step p { margin: 0; color: var(--agi-muted); font-size: 14.8px; }

/* ---------- Testimonials ---------- */
.agi-quote {
  background: #fff; border: 1px solid var(--agi-line); border-radius: var(--agi-radius);
  padding: 26px 24px; box-shadow: var(--agi-shadow); display: flex; flex-direction: column; height: 100%;
}
.agi-quote__stars { color: var(--agi-gold-500); font-size: 15px; letter-spacing: 2px; margin-bottom: 12px; }
.agi-quote p { font-size: 15px; color: var(--agi-ink); margin: 0 0 18px; font-style: italic; }
.agi-quote__who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.agi-quote__avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--agi-green-700); color: var(--agi-gold-400);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
}
.agi-quote__name { font-weight: 700; font-size: 14.5px; }
.agi-quote__role { font-size: 13px; color: var(--agi-muted); }

/* ---------- FAQ ---------- */
.agi-faq { max-width: 850px; margin: 0 auto; }
.agi-faq__item { border: 1px solid var(--agi-line); border-radius: var(--agi-radius-sm); background: #fff; margin-bottom: 12px; overflow: hidden; }
.agi-faq__q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 18px 22px; font-size: 15.8px; font-weight: 700; color: var(--agi-green-800);
  font-family: inherit; display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.agi-faq__q::after { content: "+"; font-size: 21px; color: var(--agi-gold-500); font-weight: 400; flex: none; }
.agi-faq__item.is-open .agi-faq__q::after { content: "\2212"; }
.agi-faq__a { display: none; padding: 0 22px 20px; color: var(--agi-muted); font-size: 14.8px; }
.agi-faq__item.is-open .agi-faq__a { display: block; }

/* ---------- CTA band ---------- */
.agi-cta {
  background: linear-gradient(120deg, var(--agi-green-800), var(--agi-green-600));
  color: #fff; border-radius: var(--agi-radius); padding: 46px 34px; text-align: center;
  position: relative; overflow: hidden;
}
.agi-cta h2 { color: #fff; }
.agi-cta p { color: rgba(255,255,255,.84); max-width: 58ch; margin: 0 auto 24px; }
.agi-cta__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Forms ---------- */
.agi-field { margin-bottom: 18px; }
.agi-label { display: block; font-size: 13.6px; font-weight: 700; margin-bottom: 7px; color: var(--agi-green-800); }
.agi-input, .agi-select, .agi-textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--agi-line); border-radius: var(--agi-radius-sm);
  font-family: inherit; font-size: 15px; color: var(--agi-ink); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.agi-input:focus, .agi-select:focus, .agi-textarea:focus {
  outline: 0; border-color: var(--agi-green-500); box-shadow: 0 0 0 3px rgba(42,140,104,.16);
}
.agi-textarea { min-height: 120px; resize: vertical; }
.agi-hint { font-size: 12.8px; color: var(--agi-muted); margin-top: 6px; }
.agi-row { display: grid; gap: 18px; grid-template-columns: 1fr; }

.agi-form-card { max-width: 460px; margin: 0 auto; background: #fff; border: 1px solid var(--agi-line); border-radius: var(--agi-radius); padding: 34px; box-shadow: var(--agi-shadow); }
.agi-form-card--wide { max-width: 640px; }

/* ---------- Notices ---------- */
.agi-notice {
  border-radius: var(--agi-radius-sm); padding: 13px 17px; font-size: 14.5px;
  margin-bottom: 18px; border-left: 4px solid;
}
.agi-notice--info    { background: #eef4fb; border-color: #4a7fb5; color: #24486e; }
.agi-notice--success { background: #eaf6ef; border-color: var(--agi-green-500); color: #14503c; }
.agi-notice--error   { background: #fdeeee; border-color: var(--agi-red); color: #7d2626; }
.agi-notice--warn    { background: var(--agi-gold-50); border-color: var(--agi-gold-500); color: #6b5410; }

/* ---------- Dashboard shell ---------- */
.agi-dash { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }

/* Grid children default to min-width:auto, so a wide descendant (the data
   tables, which carry min-width:620px inside a scrollable wrapper) would force
   the whole grid track -- and therefore the sidebar -- wider than the phone
   viewport, producing horizontal page scroll. min-width:0 lets the tracks
   shrink and keeps the overflow inside .agi-table-wrap where it belongs. */
.agi-dash > * { min-width: 0; }
.agi-dash__side { min-width: 0; max-width: 100%; }
.agi-dash main { min-width: 0; max-width: 100%; }
.agi-dash main > *, .agi-panel, .agi-panel__body { min-width: 0; max-width: 100%; }

/* The wide data table scrolls inside this wrapper instead of stretching the
   grid track (and with it the whole page) past the viewport on phones. */
.agi-table-wrap { max-width: 100%; }

/* The sidebar paints the dark panel the white nav labels sit on. These rules are
   marked !important because losing this one background turns the entire menu
   into white-on-white text -- present in the DOM, invisible on screen. */
.agi-dash__side {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: var(--agi-green-800, #0f3d2e) !important; border-radius: var(--agi-radius);
  padding: 22px 18px; color: #fff;
}
.agi-dash__user { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.14); }
.agi-dash__avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: var(--agi-gold-500); color: var(--agi-green-900);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
}
.agi-dash__name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.agi-dash__email { font-size: 12.5px; color: rgba(255,255,255,.66); word-break: break-all; }

.agi-dash__nav {
  display: block !important; visibility: visible !important; opacity: 1 !important;
  list-style: none !important; margin: 0; padding: 0;
}
.agi-dash__nav li { list-style: none !important; }
.agi-dash__nav a {
  display: flex !important; visibility: visible !important; opacity: 1 !important;
  align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: var(--agi-radius-sm);
  color: rgba(255,255,255,.86) !important; font-size: 14.5px; font-weight: 600;
  text-decoration: none !important;
  transition: background .14s ease, color .14s ease;
}
.agi-dash__nav a:hover { background: rgba(255,255,255,.10); color: #fff !important; }
.agi-dash__nav a.is-active { background: var(--agi-gold-500, #c9a227) !important; color: var(--agi-green-900, #08281d) !important; }
.agi-dash__nav svg { width: 17px; height: 17px; flex: none; }

.agi-balance-card {
  background: linear-gradient(130deg, var(--agi-green-700), var(--agi-green-600));
  color: #fff; border-radius: var(--agi-radius); padding: 26px; margin-bottom: 22px;
  box-shadow: var(--agi-shadow);
}
.agi-balance-card__label { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.72); font-weight: 700; }
.agi-balance-card__value { font-size: clamp(30px, 4.4vw, 42px); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; color: #fff; }
.agi-balance-card__meta { font-size: 13.5px; color: rgba(255,255,255,.76); margin-top: 6px; }
.agi-balance-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- Stat tiles ---------- */
.agi-tiles { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.agi-tile { background: #fff; border: 1px solid var(--agi-line); border-radius: var(--agi-radius); padding: 20px; }
.agi-tile__label { font-size: 12.6px; text-transform: uppercase; letter-spacing: .09em; color: var(--agi-muted); font-weight: 700; }
.agi-tile__value { font-size: 24px; font-weight: 800; color: var(--agi-green-800); line-height: 1.2; margin-top: 5px; letter-spacing: -.01em; }
.agi-tile__note { font-size: 12.5px; color: var(--agi-muted); margin-top: 3px; }

/* ---------- Panel / tables ---------- */
.agi-panel { background: #fff; border: 1px solid var(--agi-line); border-radius: var(--agi-radius); overflow: hidden; margin-bottom: 24px; }
.agi-panel__head { padding: 18px 22px; border-bottom: 1px solid var(--agi-line); display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.agi-panel__head h3 { margin: 0; font-size: 17px; color: var(--agi-green-800); }
.agi-panel__body { padding: 22px; }
.agi-panel__body--flush { padding: 0; }

.agi-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.agi-table { width: 100%; border-collapse: collapse; font-size: 14.3px; min-width: 620px; }
.agi-table th {
  text-align: left; padding: 12px 16px; background: var(--agi-green-50);
  font-size: 12.4px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--agi-green-700); font-weight: 800; white-space: nowrap;
}
.agi-table td { padding: 13px 16px; border-bottom: 1px solid var(--agi-line); vertical-align: middle; }
.agi-table tr:last-child td { border-bottom: 0; }
.agi-table tr:hover td { background: #fafcfa; }
.agi-table .agi-num { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.agi-pos { color: var(--agi-green-600); font-weight: 700; }
.agi-neg { color: var(--agi-red); font-weight: 700; }

.agi-empty { padding: 42px 22px; text-align: center; color: var(--agi-muted); font-size: 14.5px; }

/* ---------- Pills ---------- */
.agi-pill {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .03em; white-space: nowrap;
}
.agi-pill--pending  { background: var(--agi-gold-50); color: #7a6010; }
.agi-pill--approved, .agi-pill--active, .agi-pill--completed { background: #e7f5ec; color: #14503c; }
.agi-pill--rejected, .agi-pill--cancelled, .agi-pill--suspended { background: #fdeaea; color: #8c2b2b; }

/* ---------- Progress ---------- */
.agi-progress { height: 8px; background: var(--agi-line); border-radius: 999px; overflow: hidden; min-width: 90px; }
.agi-progress__bar { height: 100%; background: linear-gradient(90deg, var(--agi-green-600), var(--agi-gold-500)); border-radius: 999px; }
.agi-progress__label { font-size: 12.4px; color: var(--agi-muted); margin-top: 5px; }

/* ---------- Crypto deposit cards ---------- */
.agi-crypto-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.agi-crypto {
  border: 2px solid var(--agi-line); border-radius: var(--agi-radius); padding: 16px 18px;
  cursor: pointer; transition: border-color .15s ease, background .15s ease; background: #fff;
}
.agi-crypto:hover { border-color: var(--agi-green-500); }
.agi-crypto.is-selected { border-color: var(--agi-gold-500); background: var(--agi-gold-50); }
.agi-crypto__top { display: flex; align-items: center; gap: 12px; }
.agi-crypto__badge {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  background: var(--agi-green-800); color: var(--agi-gold-400);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}
.agi-crypto__name { font-weight: 700; font-size: 15px; color: var(--agi-green-800); }
.agi-crypto__net { font-size: 12.6px; color: var(--agi-muted); }

.agi-address-box {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--agi-green-50); border: 1px dashed var(--agi-green-500);
  border-radius: var(--agi-radius-sm); padding: 12px 14px; margin-top: 12px;
}
.agi-address-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; word-break: break-all; color: var(--agi-green-800); flex: 1 1 200px;
}
.agi-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }
.agi-qr canvas, .agi-qr img { border-radius: var(--agi-radius-sm); background: #fff; padding: 8px; border: 1px solid var(--agi-line); }
.agi-qr__caption { font-size: 12.4px; color: var(--agi-muted); }

/* ---------- Misc ---------- */
.agi-kv { display: grid; gap: 10px; grid-template-columns: 1fr; font-size: 14.5px; }
.agi-kv__row { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 9px; border-bottom: 1px dashed var(--agi-line); }
.agi-kv__row:last-child { border-bottom: 0; padding-bottom: 0; }
.agi-kv__k { color: var(--agi-muted); }
.agi-kv__v { font-weight: 700; text-align: right; }

.agi-invest-card { border: 1px solid var(--agi-line); border-radius: var(--agi-radius); padding: 22px; background: #fff; margin-bottom: 16px; }
.agi-invest-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.agi-invest-card__grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.agi-invest-card__cell .k { font-size: 12.4px; text-transform: uppercase; letter-spacing: .08em; color: var(--agi-muted); font-weight: 700; }
.agi-invest-card__cell .v { font-size: 17px; font-weight: 800; color: var(--agi-green-800); }

.agi-loader { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(0,0,0,.2); border-top-color: currentColor; border-radius: 50%; animation: agi-spin .7s linear infinite; }
@keyframes agi-spin { to { transform: rotate(360deg); } }

.agi-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.agi-reveal.is-in { opacity: 1; transform: none; }

.agi-footer-note { font-size: 12.6px; color: var(--agi-muted); margin-top: 14px; }
.agi-disclaimer {
  background: var(--agi-gold-50); border: 1px solid #efe0b4; border-radius: var(--agi-radius-sm);
  padding: 15px 18px; font-size: 13.4px; color: #6b5410; margin-top: 20px;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .agi-grid--2, .agi-grid--3, .agi-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .agi-row { grid-template-columns: repeat(2, 1fr); }
  .agi-plans { grid-template-columns: repeat(2, 1fr); }
  .agi-stats { grid-template-columns: repeat(4, 1fr); }
  .agi-tiles { grid-template-columns: repeat(3, 1fr); }
  .agi-crypto-grid { grid-template-columns: repeat(2, 1fr); }
  .agi-steps { grid-template-columns: repeat(2, 1fr); }
  .agi-kv { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .agi-hero__grid { grid-template-columns: 1.15fr .85fr; }
  .agi-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .agi-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .agi-plans { grid-template-columns: repeat(3, 1fr); }
  .agi-dash { grid-template-columns: 268px minmax(0, 1fr); }
  .agi-tiles { grid-template-columns: repeat(4, 1fr); }
  .agi-invest-card__grid { grid-template-columns: repeat(4, 1fr); }
  .agi-steps { grid-template-columns: repeat(4, 1fr); }
  .agi-crypto-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
  .agi-plans { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 560px) {
  .agi-section { padding: 52px 0; }
  .agi-hero { padding: 58px 0 64px; }
  .agi-cta { padding: 34px 22px; }
  .agi-form-card { padding: 24px 20px; }
  .agi-tiles { grid-template-columns: 1fr; }
  .agi-invest-card__grid { grid-template-columns: 1fr; }
  .agi-balance-card__actions .agi-btn { flex: 1 1 100%; }
}

/* ==========================================================================
   SITE HEADER — sticky, with a working mobile menu
   ========================================================================== */

.agi-siteheader {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--agi-line);
  transition: box-shadow .25s ease;
}

.agi-siteheader--stuck {
  box-shadow: 0 6px 22px rgba(8, 40, 29, .10);
}

.agi-siteheader__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}

.agi-siteheader__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--agi-font-display);
  font-weight: 800;
  font-size: 1.06rem;
  color: var(--agi-green-800);
  text-decoration: none;
  letter-spacing: -.01em;
}

.agi-siteheader__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--agi-green-700), var(--agi-green-500));
  color: var(--agi-gold-400);
  flex: none;
}

.agi-siteheader__mark svg { width: 22px; height: 22px; }

.agi-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agi-nav a {
  display: block;
  padding: 9px 13px;
  border-radius: var(--agi-radius-sm);
  color: var(--agi-ink);
  font-weight: 600;
  font-size: .94rem;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.agi-nav a:hover { background: var(--agi-green-50); color: var(--agi-green-700); }

.agi-nav__cta a,
.agi-nav__cta a:hover {
  color: var(--agi-white);
  padding: 10px 18px;
}

.agi-nav__cta a:hover { filter: brightness(1.07); }

.agi-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--agi-line);
  border-radius: var(--agi-radius-sm);
  cursor: pointer;
}

.agi-menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--agi-green-800);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}

.agi-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.agi-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.agi-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .agi-menu-toggle { display: flex; }

  .agi-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--agi-white);
    border-bottom: 1px solid var(--agi-line);
    box-shadow: var(--agi-shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }

  .agi-nav--open { max-height: 520px; }

  .agi-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 18px;
  }

  .agi-nav a {
    padding: 13px 6px;
    border-bottom: 1px solid var(--agi-line);
    border-radius: 0;
  }

  .agi-nav__cta { margin-top: 12px; }

  .agi-nav__cta a {
    text-align: center;
    border-bottom: 0;
    border-radius: var(--agi-radius-sm);
  }

  .agi-siteheader__inner { position: relative; }
}

/* Anchor targets must clear the sticky header. */
#plans, #how-it-works, #why-us, #faq, #contact { scroll-margin-top: 86px; }

/* ==========================================================================
   Referral programme — registration aside, promo panel and code field
   ========================================================================== */

.agi-reg-layout {
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
}

.agi-reg-main,
.agi-reg-aside { min-width: 0; }

/* ---------- The referral code field on the registration form ---------- */
.agi-ref-field {
  margin: 4px 0 20px;
  padding: 16px;
  border: 1px solid var(--agi-line, #dfe8e2);
  border-left: 3px solid var(--agi-gold-500, #c9a227);
  border-radius: var(--agi-radius-sm, 8px);
  background: var(--agi-gold-50, #fdf7e6);
}

.agi-ref-field__opt {
  font-weight: 500;
  color: var(--agi-muted, #5c6f66);
  text-transform: none;
  letter-spacing: 0;
}

.agi-ref-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
}

.agi-ref-input[readonly] {
  background: #fff;
  color: var(--agi-green-700, #14503c);
  cursor: default;
}

.agi-ref-status {
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  min-height: 1px;
}

.agi-ref-status--ok  { color: var(--agi-green-600, #1c6b50); }
.agi-ref-status--bad { color: var(--agi-red, #b23c3c); }

/* ---------- Promo panel ---------- */
.agi-ref-promo {
  background: linear-gradient(160deg, #0f3d2e 0%, #08281d 100%);
  border-radius: var(--agi-radius, 12px);
  padding: 26px 24px;
  color: #fff;
  box-shadow: var(--agi-shadow-lg, 0 16px 44px rgba(8, 40, 29, .16));
}

.agi-ref-promo__head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.agi-ref-promo__icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(201, 162, 39, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--agi-gold-400, #e0bc45);
}

.agi-ref-promo__icon svg { width: 22px; height: 22px; }

.agi-ref-promo__title {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.3;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.01em;
}

.agi-ref-promo__sub {
  margin: 0;
  font-size: 13.4px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .74);
}

.agi-ref-promo__rate {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(201, 162, 39, .34);
  border-radius: var(--agi-radius-sm, 8px);
  padding: 16px;
  text-align: center;
  margin-bottom: 22px;
}

.agi-ref-promo__rate-num {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: var(--agi-gold-400, #e0bc45);
  letter-spacing: -.02em;
}

.agi-ref-promo__rate-label {
  font-size: 12.6px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  color: rgba(255, 255, 255, .72);
  margin-top: 7px;
}

.agi-ref-promo__steps { display: grid; gap: 16px; }

.agi-ref-promo__step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.agi-ref-promo__num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--agi-gold-500, #c9a227);
  color: #08281d;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agi-ref-promo__step strong {
  display: block;
  font-size: 14.2px;
  color: #fff;
  margin-bottom: 2px;
}

.agi-ref-promo__step p {
  margin: 0;
  font-size: 13.2px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .74);
}

.agi-ref-promo__pay {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .13);
}

.agi-ref-promo__pay strong {
  display: block;
  font-size: 13.4px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--agi-gold-400, #e0bc45);
  margin-bottom: 10px;
}

.agi-ref-promo__pay ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 7px;
}

.agi-ref-promo__pay li {
  font-size: 13.3px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .8);
}

.agi-ref-promo__note {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .13);
  font-size: 12.4px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .6);
}

@media (max-width: 980px) {
  .agi-reg-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .agi-ref-promo { padding: 22px 18px; }
  .agi-ref-promo__rate-num { font-size: 34px; }
}
