/* ==========================================================================
   AgroSys public site — redesign (2026)
   Loaded after site.css; site.css is retained only for the admin views.
   ========================================================================== */

:root {
  --ag-ink: #0F172A;
  --ag-deep: #0B1220;
  --ag-surface: #FFFFFF;
  --ag-muted: #F8FAFC;
  --ag-border: #E2E8F0;
  --ag-border-strong: #CBD5E1;
  --ag-green: #10B981;
  --ag-green-dark: #059669;
  --ag-green-deep: #065F46;
  --ag-green-tint: #ECFDF5;
  --ag-green-line: #A7F3D0;
  --ag-sky: #0284C7;
  --ag-sky-tint: #EFF6FF;
  --ag-sky-line: #BFDBFE;
  --ag-t1: #334155;
  --ag-t2: #475569;
  --ag-t3: #64748B;
  --ag-t4: #94A3B8;
  --ag-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.08);
  --ag-shadow-sm: 0 10px 26px -6px rgba(15, 23, 42, 0.08);
  --ag-pad: 72px;
}

body {
  background: var(--ag-surface);
  background-image: none;
  color: var(--ag-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html { font-size: 16px; }

.ag :where(h1, h2, h3, h4) {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ag-ink);
}
.ag :where(p) { margin: 0; }

.ag-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ag-t3);
}

/* --------------------------------------------------------------- nav ---- */
.ag-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--ag-border);
}
.ag-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--ag-pad);
  height: 76px;
}
.ag-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.ag-brand-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 15px;
  color: var(--ag-ink);
}
.ag-brand-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--ag-green-dark);
  padding-left: 14px;
  margin-left: 2px;
  border-left: 1px solid var(--ag-border);
}
.ag-brand-sub.sky { color: var(--ag-sky); }
.ag-nav-links { display: flex; align-items: center; gap: 34px; }
.ag-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ag-t1);
  text-decoration: none;
}
.ag-nav-link:hover { color: var(--ag-ink); }
.ag-nav-link.current { color: var(--ag-ink); font-weight: 600; }
.ag-nav-cta { display: flex; align-items: center; gap: 10px; }
.ag-nav-help { font-size: 13px; color: var(--ag-t3); }

.ag-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ag-ink);
}

/* ----------------------------------------------------------- buttons ---- */
.ag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ag-btn:hover { transform: translateY(-1px); }
.ag-btn:disabled { opacity: 0.65; cursor: default; transform: none; }
.ag-btn-green { background: var(--ag-green); color: #FFFFFF; }
.ag-btn-green:hover { background: var(--ag-green-dark); color: #FFFFFF; }
.ag-btn-ink { background: var(--ag-ink); color: #FFFFFF; }
.ag-btn-ink:hover { background: #1E293B; color: #FFFFFF; }
.ag-btn-ghost {
  background: var(--ag-surface);
  border-color: var(--ag-border-strong);
  color: var(--ag-t1);
  font-weight: 600;
}
.ag-btn-ghost:hover { color: var(--ag-ink); }
.ag-btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  font-weight: 600;
}
.ag-btn-outline-light:hover { border-color: rgba(255, 255, 255, 0.45); color: #FFFFFF; }
.ag-btn-lg { height: 56px; padding: 0 30px; font-size: 16px; }
.ag-btn-pill { height: 40px; padding: 0 20px; border-radius: 9999px; font-weight: 600; font-size: 14px; }
.ag-btn-pill.ag-btn-ghost { border-color: var(--ag-border-strong); color: var(--ag-ink); }
.ag-link { color: var(--ag-sky); font-weight: 600; font-size: 15px; text-decoration: none; }
.ag-link:hover { color: #075985; }

/* -------------------------------------------------------------- hero ---- */
.ag-hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px;
  padding: 96px var(--ag-pad) 88px;
  background: var(--ag-ink);
  color: #FFFFFF;
}
.ag-hero-copy { grid-column: span 7; }
.ag-hero-aside { grid-column: span 5; display: flex; align-items: flex-end; }
.ag-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  margin-bottom: 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #CBD5E1;
}
.ag-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--ag-green);
  display: inline-block;
}
.ag-hero h1 {
  font-size: 66px;
  line-height: 1.03;
  font-weight: 800;
  color: #FFFFFF;
  text-wrap: balance;
  margin-bottom: 26px;
}
.ag-hero-lede {
  font-size: 19px;
  line-height: 1.6;
  color: #CBD5E1;
  max-width: 560px;
  margin-bottom: 38px;
}
.ag-hero-actions { display: flex; gap: 14px; margin-bottom: 44px; flex-wrap: wrap; }
.ag-stats {
  display: flex;
  gap: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
}
.ag-stat-n {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 26px;
  color: #FFFFFF;
}
.ag-stat-l { font-size: 13px; color: var(--ag-t4); margin-top: 4px; }

.ag-panel-dark {
  width: 100%;
  border-radius: 20px;
  padding: 30px;
  /* Sits over the lightest part of the hero scrim, so it carries its own
     backing to keep the small print readable against a bright video frame. */
  background: rgba(11, 18, 32, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.ag-roster { display: flex; flex-direction: column; gap: 14px; }
.ag-roster-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ag-roster-row:last-child { padding-bottom: 0; border-bottom: none; }
.ag-roster-name { font-weight: 600; font-size: 15px; color: #FFFFFF; }
.ag-roster-note { font-size: 12px; color: var(--ag-t4); margin-top: 2px; }
.ag-roster-state { font-size: 12px; font-weight: 600; color: #6EE7B7; white-space: nowrap; }
.ag-roster-state.next { color: var(--ag-t4); }

/* ---------------------------------------------------------- sections ---- */
.ag-section { padding: 96px var(--ag-pad); }
.ag-section.muted { background: var(--ag-muted); }
.ag-section.ink { background: var(--ag-ink); color: #FFFFFF; }
.ag-section.tight { padding-top: 88px; padding-bottom: 88px; }
.ag-section-head { max-width: 620px; margin-bottom: 44px; }
.ag-section-head h2 { font-size: 42px; font-weight: 800; line-height: 1.12; margin-bottom: 16px; }
.ag-section-head p { font-size: 17px; line-height: 1.6; color: var(--ag-t2); }

.ag-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ag-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ag-grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px;
  align-items: center;
}

/* ------------------------------------------------------- track cards ---- */
.ag-track {
  display: flex;
  flex-direction: column;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: 20px;
  padding: 38px;
  box-shadow: var(--ag-shadow);
}
.ag-track-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin-bottom: 24px;
}
.ag-track-icon.green { background: var(--ag-green-tint); }
.ag-track-icon.sky { background: var(--ag-sky-tint); }
.ag-track h3 { font-size: 27px; font-weight: 800; margin: 10px 0 12px; }
.ag-track-lede { font-size: 15px; line-height: 1.65; color: var(--ag-t2); margin-bottom: 26px; }
.ag-ticks { display: flex; flex-direction: column; gap: 11px; margin-bottom: 30px; }
.ag-tick { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ag-t1); }
.ag-tick svg { flex-shrink: 0; margin-top: 4px; }
.ag-track .ag-btn { align-self: flex-start; }
.ag-track-meta { font-size: 13px; color: var(--ag-t3); margin-top: 16px; }

/* ------------------------------------------------------------- route ---- */
.ag-outcodes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.ag-outcode {
  text-align: center;
  padding: 22px 0;
  border: 1px solid var(--ag-green-line);
  background: var(--ag-green-tint);
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 19px;
  color: var(--ag-green-deep);
}
.ag-pills { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ag-t3); }
.ag-pill-dashed { padding: 8px 14px; border: 1px dashed var(--ag-border-strong); border-radius: 9999px; }

/* ------------------------------------------------------------ cards ----- */
.ag-card {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: 16px;
  padding: 26px;
}
.ag-card h4 { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.ag-card p { font-size: 14px; line-height: 1.6; color: var(--ag-t3); }
.ag-phase-tag {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

/* -------------------------------------------------------- closing cta --- */
.ag-cta {
  padding: 80px var(--ag-pad);
  background: var(--ag-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.ag-cta h2 { font-size: 38px; font-weight: 800; color: #FFFFFF; line-height: 1.12; margin-bottom: 12px; }
.ag-cta p { font-size: 16px; color: var(--ag-t4); }
.ag-cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.ag-cta.light { background: var(--ag-muted); padding: 72px var(--ag-pad); }
.ag-cta.light h2 { color: var(--ag-ink); font-size: 32px; }
.ag-cta.light p { color: var(--ag-t2); }

/* ----------------------------------------------------------- footer ----- */
.ag-footer { background: var(--ag-deep); color: var(--ag-t3); }
.ag-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 40px var(--ag-pad);
  font-size: 13px;
}
.ag-footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.ag-footer a { color: var(--ag-t4); text-decoration: none; }
.ag-footer a:hover { color: #FFFFFF; }

/* ------------------------------------------------------------ story ----- */
.ag-story-head { padding: 88px var(--ag-pad) 64px; max-width: 900px; }
.ag-story-head h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.06;
  margin-bottom: 24px;
  text-wrap: balance;
}
.ag-story-head p { font-size: 20px; line-height: 1.6; color: var(--ag-t2); }
.ag-story-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px;
  padding: 0 var(--ag-pad) 80px;
  align-items: start;
}
.ag-prose { font-size: 17px; line-height: 1.75; color: var(--ag-t1); }
.ag-prose + .ag-prose { margin-top: 24px; }
.ag-quote { border-left: 3px solid var(--ag-green); padding: 4px 0 4px 26px; margin: 36px 0; }
.ag-quote p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ag-ink);
}
.ag-quote cite { display: block; font-size: 14px; color: var(--ag-t3); margin-top: 14px; font-style: normal; }
.ag-bio {
  border: 1px solid var(--ag-border);
  border-radius: 20px;
  padding: 32px;
  background: var(--ag-muted);
}
.ag-bio-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ag-border);
  margin-bottom: 24px;
}
.ag-avatar {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: var(--ag-ink);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.ag-phase {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.04);
}
.ag-phase h3 { font-size: 21px; font-weight: 800; color: #FFFFFF; margin-bottom: 12px; }
.ag-phase > p { font-size: 14px; line-height: 1.65; color: var(--ag-t4); margin-bottom: 20px; }
.ag-phase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.ag-phase-state {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 9999px;
  color: var(--ag-t4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}
.ag-phase-state.now { color: var(--ag-ink); background: #6EE7B7; border-color: #6EE7B7; }
.ag-phase-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  color: #CBD5E1;
}

/* ============================================================ wizard ==== */
.ag-wizard { background: var(--ag-muted); padding: 40px var(--ag-pad) 72px; }
.ag-steps { display: flex; align-items: center; margin-bottom: 36px; }
.ag-step { display: flex; align-items: center; flex-grow: 1; }
.ag-step-face { display: flex; align-items: center; gap: 12px; }
.ag-step-dot {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: #F1F5F9;
  color: var(--ag-t4);
  flex-shrink: 0;
}
.ag-step-name { font-size: 14px; font-weight: 600; color: var(--ag-t4); }
.ag-step-hint { font-size: 12px; color: var(--ag-t4); }
.ag-step-rule { flex-grow: 1; height: 1px; background: var(--ag-border); margin: 0 20px; }
.ag-step.done .ag-step-dot { background: #D1FAE5; color: var(--ag-green-dark); }
.ag-step.done .ag-step-name,
.ag-step.active .ag-step-name { color: var(--ag-ink); }
.ag-step.active .ag-step-dot { background: var(--ag-green); color: #FFFFFF; }
.ag-wizard.sky .ag-step.active .ag-step-dot { background: var(--ag-sky); }
.ag-wizard.sky .ag-step.done .ag-step-dot { background: #DBEAFE; color: var(--ag-sky); }

.ag-wizard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.ag-form-card {
  grid-column: span 8;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.06);
}
.ag-side {
  grid-column: span 4;
  position: sticky;
  top: 100px;
  background: var(--ag-ink);
  border-radius: 20px;
  padding: 30px;
  color: #FFFFFF;
}
.ag-side-rows { display: flex; flex-direction: column; gap: 16px; }
.ag-side-row { padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.ag-side-row:last-child { padding-bottom: 0; border-bottom: none; }
.ag-side-k { font-size: 12px; color: var(--ag-t4); margin-bottom: 4px; }
.ag-side-v { font-size: 15px; font-weight: 600; }
.ag-side-foot {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ag-t4);
}
.ag-side-steps { display: flex; flex-direction: column; gap: 12px; font-size: 13px; line-height: 1.55; color: #CBD5E1; }

.ag-pane { display: none; }
.ag-pane.active { display: block; }
.ag-pane h2 { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.ag-pane-lede { font-size: 15px; color: var(--ag-t3); margin-bottom: 32px; }
.ag-pane-eyebrow { color: var(--ag-green-dark); margin-bottom: 10px; }
.ag-wizard.sky .ag-pane-eyebrow { color: var(--ag-sky); }

.ag-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ag-field.wide { grid-column: span 2; }
.ag-label { display: block; font-size: 13px; font-weight: 600; color: var(--ag-t1); margin-bottom: 7px; }
.ag-req { color: var(--ag-green-dark); }
.ag-wizard.sky .ag-req { color: var(--ag-sky); }
.ag-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--ag-border-strong);
  border-radius: 10px;
  padding: 0 14px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--ag-ink);
  background: var(--ag-surface);
  box-sizing: border-box;
}
textarea.ag-input { height: 96px; padding: 14px; resize: vertical; line-height: 1.6; }
.ag-input:focus {
  outline: none;
  border-color: var(--ag-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.ag-wizard.sky .ag-input:focus {
  border-color: var(--ag-sky);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.ag-input::placeholder { color: var(--ag-t4); }

.ag-choices { display: flex; gap: 12px; flex-wrap: wrap; }
.ag-choices.stack { flex-direction: column; }
.ag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ag-border-strong);
  border-radius: 10px;
  background: var(--ag-surface);
  color: var(--ag-t1);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.ag-chip.selected { background: var(--ag-ink); border-color: var(--ag-ink); color: #FFFFFF; }
.ag-chip.day { min-width: 62px; padding: 0 12px; }

.ag-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--ag-border);
  border-radius: 10px;
  background: var(--ag-surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--ag-t1);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: 'Inter', sans-serif;
}
.ag-opt-mark {
  width: 18px;
  height: 18px;
  border: 1px solid var(--ag-border-strong);
  border-radius: 9999px;
  background: var(--ag-surface);
  flex-shrink: 0;
}
.ag-opt.check .ag-opt-mark { border-radius: 5px; }
.ag-opt.selected { border-color: var(--ag-sky); background: #F0F9FF; color: var(--ag-ink); }
.ag-opt.selected .ag-opt-mark {
  background: var(--ag-sky);
  border: 5px solid var(--ag-sky);
  box-shadow: inset 0 0 0 2px #FFFFFF;
}
.ag-wizard:not(.sky) .ag-opt.selected { border-color: var(--ag-green); background: #F0FDF9; }
.ag-wizard:not(.sky) .ag-opt.selected .ag-opt-mark {
  background: var(--ag-green);
  border-color: var(--ag-green);
}

.ag-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ag-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--ag-border);
  border-radius: 12px;
  background: var(--ag-surface);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: 'Inter', sans-serif;
}
.ag-tile-box {
  width: 22px;
  height: 22px;
  border: 1px solid var(--ag-border-strong);
  border-radius: 6px;
  background: var(--ag-surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}
.ag-tile.selected { border-color: var(--ag-green); background: #F0FDF9; }
.ag-tile.selected .ag-tile-box {
  background: var(--ag-green);
  border-color: var(--ag-green);
  color: #FFFFFF;
}
.ag-tile-name { display: block; font-size: 15px; font-weight: 600; color: var(--ag-ink); }
.ag-tile-note { display: block; font-size: 13px; line-height: 1.5; color: var(--ag-t3); margin-top: 2px; }
.ag-tile.align-top { align-items: flex-start; }
.ag-tile.align-top .ag-tile-box { margin-top: 1px; }

.ag-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ag-cat {
  display: block;
  padding: 24px;
  border: 1px solid var(--ag-border);
  border-radius: 16px;
  background: var(--ag-surface);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: 'Inter', sans-serif;
}
.ag-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ag-cat-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  color: var(--ag-t3);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 15px;
}
.ag-cat-mark {
  width: 22px;
  height: 22px;
  border: 1px solid var(--ag-border-strong);
  border-radius: 9999px;
  background: var(--ag-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}
.ag-cat-name { display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ag-ink);
  margin-bottom: 6px;
}
.ag-cat-note { display: block; font-size: 13px; line-height: 1.55; color: var(--ag-t3); }
.ag-cat-module { display: block; font-size: 12px; font-weight: 600; color: var(--ag-sky); margin-top: 12px; }
.ag-cat.selected {
  border-color: var(--ag-sky);
  background: #F0F9FF;
  box-shadow: 0 8px 24px -6px rgba(2, 132, 199, 0.25);
}
.ag-cat.selected .ag-cat-badge { background: var(--ag-sky); color: #FFFFFF; }
.ag-cat.selected .ag-cat-mark { background: var(--ag-sky); border-color: var(--ag-sky); color: #FFFFFF; }

.ag-module { display: none; }
.ag-module.active { display: block; }

.ag-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--ag-sky-tint);
  border: 1px solid var(--ag-sky-line);
  font-size: 13px;
  color: #075985;
  margin-bottom: 32px;
}
.ag-note svg { flex-shrink: 0; }

.ag-privacy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ag-t3);
}
.ag-privacy svg { flex-shrink: 0; margin-top: 2px; }

.ag-zone {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 48px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.ag-zone.shown { display: flex; }
.ag-zone.core { background: var(--ag-green-tint); border: 1px solid var(--ag-green-line); color: var(--ag-green-deep); }
.ag-zone.extended { background: var(--ag-sky-tint); border: 1px solid var(--ag-sky-line); color: #075985; }
.ag-zone.out { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.ag-zone.invalid { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.ag-postcode-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ag-postcode-row .ag-input { width: 200px; }

.ag-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid #F1F5F9;
}
.ag-actions.end { justify-content: flex-end; }

.ag-errors {
  display: none;
  border: 1px solid #FECACA;
  background: #FEF2F2;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 28px;
}
.ag-errors.visible { display: block; }
.ag-errors strong { display: block; font-size: 14px; color: #991B1B; margin-bottom: 8px; }
.ag-errors ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.65; color: #B91C1C; }

.ag-done { text-align: center; padding: 40px 20px; }
.ag-done-icon {
  width: 68px;
  height: 68px;
  border-radius: 9999px;
  background: var(--ag-green-tint);
  color: var(--ag-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 26px;
}
.ag-wizard.sky .ag-done-icon { background: var(--ag-sky-tint); color: var(--ag-sky); }
.ag-done h2 { font-size: 30px; font-weight: 800; margin-bottom: 12px; }
.ag-done p { font-size: 16px; line-height: 1.65; color: var(--ag-t2); max-width: 480px; margin: 0 auto 30px; }

.ag-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px dashed var(--ag-border-strong);
  border-radius: 12px;
  background: var(--ag-muted);
  color: var(--ag-t3);
}
.ag-upload strong { display: block; font-size: 14px; font-weight: 600; color: var(--ag-ink); }
.ag-upload span { font-size: 13px; }

.ag-spin { animation: ag-spin 1s linear infinite; }
@keyframes ag-spin { to { transform: rotate(360deg); } }

.ag-mb-28 { margin-bottom: 28px; }
.ag-mb-32 { margin-bottom: 32px; }

/* -------------------------------------------------------- responsive ---- */
@media (max-width: 1180px) {
  :root { --ag-pad: 40px; }
  .ag-hero h1 { font-size: 52px; }
  .ag-form-card, .ag-side { grid-column: span 12; }
  .ag-side { position: static; }
}

@media (max-width: 900px) {
  :root { --ag-pad: 24px; }
  .ag-nav-links { display: none; }
  .ag-menu-btn { display: flex; }
  .ag-nav-links.open {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 24px 24px;
    background: var(--ag-surface);
    border-bottom: 1px solid var(--ag-border);
  }
  .ag-nav-links.open .ag-nav-link { padding: 12px 0; font-size: 16px; }
  .ag-nav-links.open .ag-nav-cta { flex-direction: column; align-items: stretch; margin-top: 8px; }
  .ag-nav-links.open .ag-btn-pill { height: 48px; }
  .ag-hero, .ag-grid-12, .ag-story-body { grid-template-columns: minmax(0, 1fr); }
  /* The desktop spans are inline `style="grid-column: span N"` in the views, so
     only !important can beat them. Without this the collapsed single-column grid
     keeps spawning zero-width implicit tracks and the content is squeezed. */
  .ag-hero-copy, .ag-hero-aside, .ag-grid-12 > *, .ag-story-body > * {
    grid-column: auto !important;
  }
  .ag-hero { padding-top: 56px; padding-bottom: 56px; }
  .ag-hero h1 { font-size: 38px; }
  .ag-hero-lede { font-size: 17px; }
  .ag-section, .ag-section.tight { padding: 56px var(--ag-pad); }
  .ag-section-head h2 { font-size: 30px; }
  .ag-grid-2, .ag-grid-3, .ag-tiles, .ag-cats, .ag-fields { grid-template-columns: minmax(0, 1fr); }
  .ag-field.wide { grid-column: auto; }
  .ag-outcodes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ag-cta { padding: 56px var(--ag-pad); }
  .ag-cta h2, .ag-cta.light h2 { font-size: 28px; }
  .ag-story-head { padding: 56px var(--ag-pad) 40px; }
  .ag-story-head h1 { font-size: 34px; }
  .ag-story-head p { font-size: 17px; }
  .ag-story-body { padding: 0 var(--ag-pad) 56px; }
  .ag-quote p { font-size: 20px; }
  .ag-wizard { padding: 28px var(--ag-pad) 56px; }
  .ag-form-card { padding: 26px; }
  .ag-pane h2 { font-size: 24px; }
  .ag-steps { overflow-x: auto; gap: 20px; }
  .ag-step { flex-grow: 0; flex-shrink: 0; }
  .ag-step-rule { display: none; }
  .ag-hero .ag-btn, .ag-cta .ag-btn, .ag-hero-actions .ag-btn { width: 100%; }
  .ag-hero-actions, .ag-cta-actions { width: 100%; }
  .ag-actions { flex-direction: column-reverse; }
  .ag-actions .ag-btn { width: 100%; }
}

/* native radio/checkbox inside .ag-opt — the input drives the visual mark */
.ag-opt input[type="radio"],
.ag-opt input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.ag-opt:has(input:checked) { border-color: var(--ag-sky); background: #F0F9FF; color: var(--ag-ink); }
.ag-opt:has(input:checked) .ag-opt-mark {
  background: var(--ag-sky);
  border: 5px solid var(--ag-sky);
  box-shadow: inset 0 0 0 2px #FFFFFF;
}
.ag-opt:has(input:focus-visible) { outline: 2px solid var(--ag-sky); outline-offset: 2px; }
.ag-wizard:not(.sky) .ag-opt:has(input:checked) { border-color: var(--ag-green); background: #F0FDF9; }
.ag-wizard:not(.sky) .ag-opt:has(input:checked) .ag-opt-mark {
  background: var(--ag-green);
  border-color: var(--ag-green);
}
.ag-tile:focus-visible,
.ag-cat:focus-visible,
.ag-chip:focus-visible,
.ag-btn:focus-visible {
  outline: 2px solid var(--ag-sky);
  outline-offset: 2px;
}
.ag-module + .ag-module { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--ag-border); }

/* ------------------------------------------------ certificate uploads --- */
.ag-upload { cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.ag-upload:hover,
.ag-upload.dragover { border-color: var(--ag-sky); background: var(--ag-sky-tint); }
.ag-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.ag-upload:focus-within { outline: 2px solid var(--ag-sky); outline-offset: 2px; }

.ag-files { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ag-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ag-border);
  border-radius: 10px;
  background: var(--ag-surface);
}
.ag-file-icon { color: var(--ag-sky); flex-shrink: 0; display: flex; }
.ag-file-name {
  flex-grow: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ag-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ag-file-size { font-size: 13px; color: var(--ag-t3); white-space: nowrap; }
.ag-file-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--ag-t3);
  cursor: pointer;
  flex-shrink: 0;
}
.ag-file-remove:hover { background: #FEF2F2; color: #B91C1C; }
.ag-file-error {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #FECACA;
  background: #FEF2F2;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #B91C1C;
}
.ag-file-error.visible { display: block; }
.ag-upload-status { font-size: 14px; color: var(--ag-t3); margin-top: 10px; }
.ag-upload-status.ok { color: var(--ag-green-dark); font-weight: 600; }
.ag-upload-status.warn { color: #B45309; }

/* ============================================== brand mark & hero video === */
.ag-brand-img {
  display: block;
  height: 26px;
  width: auto;
  max-width: 160px;
}

/* The hero paints its own dark ground; the video sits behind the copy and is
   only ever attached by script (see gateway.js) on a wide, motion-friendly view. */
.ag-hero.has-video { position: relative; overflow: hidden; isolation: isolate; }
.ag-hero.has-video > .ag-hero-copy,
.ag-hero.has-video > .ag-hero-aside { position: relative; z-index: 1; }

.ag-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--ag-ink);
}
.ag-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 900ms ease;
}
.ag-hero-video.ready { opacity: 1; }

/* Keeps white copy legible over whatever frame is on screen. */
.ag-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.48) 100%),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.34) 0%, rgba(15, 23, 42, 0.08) 40%, rgba(15, 23, 42, 0.6) 100%);
}

@media (max-width: 900px) {
  .ag-brand-img { height: 22px; max-width: 132px; }
  /* Extra weight on narrow screens, where the copy sits over the middle of the frame. */
  .ag-hero-scrim {
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.86) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ag-hero-video { display: none; }
}

/* ------------------------------------------------------- founder photo --- */
.ag-portrait { margin: 0 0 20px; }
.ag-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid var(--ag-border);
  background: var(--ag-muted);
}
.ag-portrait figcaption {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ag-t3);
  margin-top: 12px;
  padding-left: 14px;
  border-left: 2px solid var(--ag-green);
}
/* The bio card now sits under the photo, so it loses its own top divider. */
.ag-portrait + .ag-bio .ag-bio-head { padding-bottom: 20px; }

/* ========================================================= legal pages === */
.ag-legal { max-width: 820px; margin: 0 auto; padding: 72px var(--ag-pad) 96px; }
.ag-legal h1 { font-size: 44px; font-weight: 800; line-height: 1.1; margin-bottom: 18px; }
.ag-legal .ag-legal-lede { font-size: 18px; line-height: 1.65; color: var(--ag-t2); margin-bottom: 22px; }
.ag-legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 16px 20px;
  margin-bottom: 44px;
  background: var(--ag-muted);
  border: 1px solid var(--ag-border);
  border-radius: 12px;
  font-size: 13px;
  color: var(--ag-t3);
}
.ag-legal-meta strong { color: var(--ag-ink); font-weight: 600; }
.ag-legal h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 44px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--ag-border);
}
.ag-legal h2:first-of-type { border-top: none; padding-top: 0; }
.ag-legal h3 { font-size: 17px; font-weight: 700; margin: 26px 0 10px; }
.ag-legal p, .ag-legal li { font-size: 16px; line-height: 1.75; color: var(--ag-t1); }
.ag-legal p { margin-bottom: 16px; }
.ag-legal ul, .ag-legal ol { margin: 0 0 16px; padding-left: 22px; }
.ag-legal li { margin-bottom: 8px; }
.ag-legal a { color: var(--ag-sky); font-weight: 500; }
.ag-legal strong { color: var(--ag-ink); }

.ag-legal-toc {
  background: var(--ag-muted);
  border: 1px solid var(--ag-border);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 40px;
}
.ag-legal-toc ol { margin: 0; padding-left: 20px; }
.ag-legal-toc li { margin-bottom: 6px; font-size: 15px; }

.ag-table-wrap { overflow-x: auto; margin-bottom: 20px; }
.ag-legal table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.ag-legal th, .ag-legal td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--ag-border);
  vertical-align: top;
  line-height: 1.6;
}
.ag-legal th { background: var(--ag-muted); font-weight: 600; color: var(--ag-ink); }

.ag-callout {
  border-left: 3px solid var(--ag-green);
  background: var(--ag-green-tint);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 0 0 24px;
}
.ag-callout.warn { border-left-color: #D97706; background: #FFFBEB; }
.ag-callout p:last-child { margin-bottom: 0; }
.ag-todo {
  display: inline-block;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 13px;
  font-weight: 600;
  color: #92400E;
}

@media (max-width: 900px) {
  .ag-legal { padding: 44px var(--ag-pad) 64px; }
  .ag-legal h1 { font-size: 30px; }
  .ag-legal h2 { font-size: 20px; }
}
