/* =========================================================================
   ELEVON — MLM software & business-tools template
   Design system reproduced 1:1 from the audited aitrading.plus stylesheet
   (tokens, type scale, base rules, .ai-* component layer, gpe-* auth layer).
   Only the copy, the brand mark and the page content are new.
   ========================================================================= */

/* ---------------------------------------------------------------- fonts */
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(../fonts/space-grotesk-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+00??, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(../fonts/space-grotesk-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+00??, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------- tokens */
:root {
  /* Typeface */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;

  /* Surfaces (dark navy canvas) */
  --color-canvas: oklch(14.4% 0.029 271);
  --color-surface: oklch(18% 0.042 271);
  --color-raised: oklch(24.7% 0.053 270);
  --color-overlay: oklch(14.4% 0.029 271 / 0.72);

  /* Text */
  --color-text: oklch(93.7% 0.013 267);
  --color-text-muted: oklch(76.9% 0.036 266);
  --color-text-subtle: oklch(62.8% 0.051 268);

  /* Lines */
  --color-border: oklch(30.3% 0.063 271);
  --color-border-strong: oklch(53.7% 0.095 271);

  /* Brand / state */
  --color-accent: oklch(76.9% 0.165 70);
  --color-accent-hover: oklch(83.7% 0.164 84);
  --color-accent-wash: oklch(76.9% 0.165 70 / 0.14);
  --color-on-accent: oklch(14.4% 0.029 271);
  --color-success: oklch(69.6% 0.149 163);
  --color-success-wash: oklch(69.6% 0.149 163 / 0.14);
  --color-danger: oklch(64.5% 0.215 16);
  --color-danger-wash: oklch(64.5% 0.215 16 / 0.14);
  --color-warning: oklch(70% 0.17 48);
  --color-warning-wash: oklch(70% 0.17 48 / 0.14);
  --color-info: oklch(75.4% 0.139 233);
  --color-info-wash: oklch(75.4% 0.139 233 / 0.14);

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Tracking / leading */
  --tracking-tight: -0.025em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  --leading-snug: 1.375;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;

  /* Motion */
  --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);

  /* Legacy aliases used by the component layer */
  --dark-1: #060916;
  --dark-2: #0b1024;
  --dark-3: #171f3a;
  --primary-50: #fffbeb;
  --primary-100: #fef3c7;
  --primary-200: #fde68a;
  --primary-300: #fcd34d;
  --primary-400: #fbbf24;
  --primary-500: #fbaf16;
  --primary-600: #f59e0b;
  --primary-700: #d97706;
  --primary-800: #b45309;
  --primary-900: #92400e;
  --primary-light: #f59e0b26;
  --primary-light-white: #f59e0b40;
  --text-primary-light: #e6eaf3;
  --text-secondary-light: #a9b4cc;
  /* the reference's legacy hairline: 9% white, not the navy --color-border token */
  --border-color: #ffffff17;
  --success-500: #34d399;
  --success-600: #10b981;

  /* Neutral ramp */
  --neutral-50: #0b1024;
  --neutral-100: #171f3a;
  --neutral-200: #232c4e;
  --neutral-300: #37436b;
  --neutral-400: #4d5a82;
  --neutral-500: #7b88a8;
  --neutral-600: #a9b4cc;
  --neutral-700: #e6eaf3;
  --neutral-800: #eef1f7;
  --neutral-900: #f4f6fb;
}

/* ----------------------------------------------------------- base layer */
*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: #f59e0a80 transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-secondary-light);
  overflow-wrap: break-word;
  background-color: var(--dark-1);
  background-image:
    radial-gradient(60rem 40rem at 12% -8%, #f59e0b0f, #0000 60%),
    radial-gradient(50rem 35rem at 100% 0, #10b9810b, #0000 55%),
    radial-gradient(70rem 50rem at 50% 115%, #37436b29, #0000 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
h1 { font-size: var(--text-xl);   line-height: 1.4; }
h2 { font-size: var(--text-lg);   line-height: 1.45; }
h3 { font-size: var(--text-md);   line-height: 1.5; }
h4 { font-size: var(--text-base); line-height: 1.5; }
h5 { font-size: var(--text-sm);   line-height: 1.5; }
h6 {
  font-size: var(--text-xs); line-height: 1.5;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-text-subtle);
}
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* A text input under 16px makes iOS Safari zoom on focus, so every typable
   control is floored at 16px — on iOS only, which is what the probe selects. */
@supports (-webkit-touch-callout: none) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
  select, textarea { font-size: max(1rem, 16px) !important; }
}
select { background-color: var(--dark-2); color: var(--text-primary-light); }

/* ----------------------------------------------------------- utilities */
.panel {
  min-width: 0;
  border: 1px solid oklab(100% 0 0 / 0.08);
  background: oklab(100% 0 0 / 0.04);
  border-radius: var(--radius-2xl);
  transition: border-color 0.25s var(--ease-entrance);
}
.panel-body { padding: 1rem; }
.panel-p5 { padding: 1.25rem; }
.panel-p6 { padding: 1.5rem; }
.panel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem; border-bottom: 1px solid var(--color-border);
}
.panel-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start;
  gap: 0.75rem; padding: 1rem; border-top: 1px solid var(--color-border);
}
.panel-title {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-size: var(--text-md); font-weight: 600;
  letter-spacing: -0.01em; color: var(--color-text);
}
.panel--accent { border-color: var(--color-accent); }

.hover-lift { transition: translate 0.2s var(--ease-entrance), box-shadow 0.2s var(--ease-entrance); }
.hover-lift:hover { translate: 0 -3px; box-shadow: 0 12px 28px #00000059; }

.hint { font-size: var(--text-sm); color: var(--color-text-subtle); }
.hint svg { display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; }
.label { font-size: var(--text-sm); font-weight: 500; color: var(--color-text); }
.tabular { font-variant-numeric: tabular-nums; }
.stat-label {
  font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-text-subtle);
}
.divider-hairline {
  margin-block: 1.25rem; border: 0; height: 1px;
  background: var(--color-border); opacity: 0.55;
}
.text-accent { color: var(--color-accent); }
.text-ink { color: var(--color-text); }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.max-w-3xl { max-width: 48rem; }
.icon-lg { width: 2rem; height: 2rem; }
.icon-sm { width: 1rem; height: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding-block: 0.375rem; padding-inline: 1rem;
  border-radius: var(--radius-md); font-family: inherit;
  font-size: var(--text-base); font-weight: 500;
  line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer;
  flex-shrink: 0; max-width: 100%; white-space: normal;
  transition: background-color 0.15s var(--ease-entrance), border-color 0.15s var(--ease-entrance), color 0.15s var(--ease-entrance);
}
.btn > svg { flex-shrink: 0; font-size: 1.15em; width: 1.15em; height: 1.15em; translate: 0 -0.5px; }
.btn-primary { background: var(--color-accent); color: var(--color-on-accent); border: 1px solid transparent; }
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-secondary { background: transparent; color: var(--color-text); border: 1px solid var(--color-border-strong); }
.btn-secondary:hover { border-color: var(--color-accent); }
.btn-neutral { background: var(--color-raised); color: var(--color-text); border: 1px solid var(--color-border-strong); }
.btn-neutral:hover { background: color-mix(in oklab, var(--color-raised) 78%, #fff); border-color: var(--color-accent); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 2.25rem; padding-inline: 0.75rem; font-size: var(--text-sm); }

.badge {
  display: inline-flex; align-items: center; gap: 0.25rem; max-width: 100%;
  padding: 0.125rem 0.5rem; border-radius: 999px;
  font-size: var(--text-xs); font-weight: 500; line-height: 1.5;
  flex-shrink: 0; white-space: normal;
}
.badge > svg { flex-shrink: 0; width: 0.875rem; height: 0.875rem; }
.badge-neutral { background: var(--color-raised); color: var(--color-text-muted); }
.badge-warning { background: var(--color-warning-wash); color: var(--color-warning); }
.badge-danger  { background: var(--color-danger-wash);  color: var(--color-danger); }
.badge-success { background: var(--color-success-wash); color: var(--color-success); }
.badge-info    { background: var(--color-info-wash);    color: var(--color-info); }

.chip {
  display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.5rem;
  border: 1px solid var(--color-border); background: var(--color-raised);
  border-radius: var(--radius-sm); font-size: var(--text-xs); color: var(--color-text-muted);
}

.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding-top: 0.25rem; }
.input, .textarea {
  box-sizing: border-box; width: 100%; min-height: 2.75rem;
  padding: 0.625rem 0.875rem; font-family: inherit; font-size: var(--text-base);
  line-height: 1.5; color: var(--color-text); background: var(--color-raised);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  outline: 0; transition: border-color 0.15s var(--ease-entrance); box-shadow: none;
}
.textarea { min-height: 6rem; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--color-text-subtle); }
.input:hover:not(:disabled), .textarea:hover:not(:disabled) { border-color: color-mix(in oklab, var(--color-accent) 35%, transparent); }
.input:focus, .textarea:focus { outline: 1px solid var(--color-accent); outline-offset: 2px; }
.select {
  box-sizing: border-box; width: 100%; min-height: 2.75rem; appearance: none;
  padding: 0.625rem 2.5rem 0.625rem 0.875rem; font-family: inherit;
  font-size: var(--text-base); line-height: 1.5; color: var(--color-text);
  background-color: var(--color-raised);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a9b4cc' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.875rem center; background-repeat: no-repeat; background-size: 1rem 1rem;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  outline: 0; transition: border-color 0.15s var(--ease-entrance);
}
.select:focus { outline: 1px solid var(--color-accent); outline-offset: 2px; }

.skip-link {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 1rem; left: 1rem; z-index: 50;
  width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal;
  padding: 0.5rem 1rem; border-radius: var(--radius-md);
  background: var(--color-accent); color: var(--color-on-accent); font-weight: 500;
  outline: 2px solid var(--color-text); outline-offset: 2px;
}

/* grid helpers (the reference uses Tailwind for these) */
.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1120px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.flex-col { display: flex; flex-direction: column; gap: 0.5rem; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

/* ============================= public component layer (.ai-*) ========= */
.ai-public { background-color: var(--dark-1); color: var(--text-primary-light); }
.ai-public-container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1.25rem; }

/* ------------------------------------------------------------- header */
.ai-public-header {
  position: sticky; top: 0; z-index: 30;
  padding: calc(0.85rem + env(safe-area-inset-top, 0px)) 0 0.85rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(6, 9, 22, 0.85);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.ai-public-header .ai-public-container { display: flex; align-items: center; gap: 1.5rem; }
.ai-public-brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; flex: 0 0 auto; }
.ai-public-nav { display: none; align-items: center; gap: clamp(0.75rem, 1.6vw, 1.5rem); margin-inline-start: auto; }
.ai-public-nav a { color: var(--text-secondary-light); text-decoration: none; font-size: 0.9rem; white-space: nowrap; padding-block: 0.3rem; transition: color 0.18s ease; }
.ai-public-nav a:hover, .ai-public-nav a[aria-current="page"] { color: var(--primary-600); }
.ai-public-actions { display: none; align-items: center; gap: 0.85rem; margin-inline-start: auto; }
.ai-public-nav + .ai-public-actions { margin-inline-start: 0; }
.ai-public-link { display: inline-flex; align-items: center; gap: 0.3rem; padding-block: 0.3rem; color: var(--primary-600); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.ai-public-link:hover { color: var(--primary-400); }
.ai-public-link svg { width: 1em; height: 1em; flex: none; }
.ai-nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; margin-inline-start: auto;
  border: 0; border-radius: 0.5rem; background: transparent;
  color: var(--text-secondary-light); cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.ai-nav-toggle:hover { color: var(--primary-600); background: rgba(255, 255, 255, 0.05); }
.ai-nav-toggle svg { width: 1.5rem; height: 1.5rem; }

/* ------------------------------------------------------- mega menu */
.ai-mega { display: inline-flex; align-items: center; gap: 0; }
.ai-mega-trigger { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; padding-block: 0.3rem; color: var(--text-secondary-light); font-size: 0.9rem; text-decoration: none; cursor: pointer; transition: color 0.18s ease; }
.ai-mega-toggle { display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0.4rem; margin-inline-end: -0.4rem; color: var(--text-secondary-light); cursor: pointer; transition: color 0.18s ease; }
.ai-mega-trigger:hover, .ai-mega:hover .ai-mega-trigger,
.ai-mega-toggle:hover, .ai-mega:hover .ai-mega-toggle { color: var(--primary-600); }
.ai-mega-caret { width: 0.8em; height: 0.8em; transition: transform 0.18s ease; }
.ai-mega:hover .ai-mega-caret, .ai-mega-toggle[aria-expanded="true"] .ai-mega-caret { transform: rotate(180deg); }
.ai-mega-panel { position: absolute; top: 100%; left: 0; right: 0; z-index: 60; background: var(--dark-2); border-bottom: 1px solid rgba(245, 158, 11, 0.2); box-shadow: 0 28px 48px -18px rgba(0, 0, 0, 0.7); padding-block: 1.5rem 1.1rem; }
.ai-mega-panel { display: none; }
.ai-mega:hover .ai-mega-panel, .ai-mega-panel.is-open { display: block; }
.ai-mega-inner { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1.25rem; }
.ai-mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.ai-mega-col { display: flex; flex-direction: column; min-width: 0; }
.ai-mega-col-head { display: flex; flex-direction: column; gap: 0.15rem; padding-bottom: 0.7rem; margin-bottom: 0.7rem; border-bottom: 1px solid rgba(255, 255, 255, 0.07); text-decoration: none; }
.ai-mega-col-name { color: var(--text-primary-light); font-weight: 600; font-size: 0.95rem; }
.ai-mega-col-head:hover .ai-mega-col-name { color: var(--primary-400); }
.ai-mega-col-count { color: var(--text-secondary-light); font-weight: 400; font-size: 0.78rem; }
.ai-mega-col-price { color: var(--text-secondary-light); font-size: 0.78rem; }
.ai-mega-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.1rem; flex: 1; }
.ai-mega-item { display: flex; align-items: flex-start; gap: 0.45rem; padding: 0.4rem 0.45rem; border-radius: 0.5rem; color: var(--text-secondary-light); font-size: 0.85rem; line-height: 1.35; text-decoration: none; transition: background 0.15s ease, color 0.15s ease; }
.ai-mega-item:hover { background: rgba(245, 158, 11, 0.1); color: var(--primary-400); }
.ai-mega-item-everything { font-weight: 600; }
.ai-mega-item-benefit { color: var(--primary-400); }
.ai-mega-check { width: 0.95em; height: 0.95em; flex-shrink: 0; margin-top: 0.2em; color: var(--success-600); }
.ai-mega-item-benefit .ai-mega-check, .ai-mega-group .ai-mega-check { color: var(--primary-600); }
.ai-mega-group { display: flex; align-items: flex-start; gap: 0.45rem; margin-top: 0.35rem; padding: 0.4rem 0.45rem; color: var(--text-primary-light); font-size: 0.82rem; font-weight: 600; line-height: 1.35; }
.ai-mega-col-cta { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.7rem; padding: 0.3rem 0.45rem; color: var(--primary-600); font-size: 0.82rem; font-weight: 500; text-decoration: none; transition: color 0.15s ease; }
.ai-mega-col-cta:hover { color: var(--primary-400); }
.ai-mega-col-cta svg { width: 0.9em; height: 0.9em; }
.ai-mega-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.ai-mega-footer-link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-secondary-light); font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: color 0.15s ease; }
.ai-mega-footer-link:hover { color: var(--primary-400); }
.ai-mega-footer-link svg { width: 1em; height: 1em; }

/* ------------------------------------------------------- mobile menu */
.ai-mobile-menu { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.5rem 1.25rem 1rem; border-top: 1px solid var(--border-color); }
.ai-mobile-menu[hidden] { display: none; }
.ai-mobile-menu a { padding: 0.7rem 0.25rem; color: var(--text-secondary-light); text-decoration: none; font-size: 1rem; border-radius: 0.5rem; transition: color 0.15s ease; }
.ai-mobile-menu a:hover { color: var(--primary-600); }
.ai-mobile-menu a.ai-mobile-menu-sub { display: flex; justify-content: space-between; align-items: center; padding-inline-start: 1.6rem; font-size: 0.9rem; }
.ai-mobile-menu-price { color: var(--text-secondary-light); font-size: 0.8rem; }
.ai-mobile-menu-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.6rem; }
.ai-mobile-menu-actions a { padding: 0; }

/* -------------------------------------------------------------- hero */
.ai-hero { position: relative; overflow: hidden; padding: 5rem 0 4.5rem; }
.ai-hero-inner { position: relative; z-index: 1; text-align: center; }
.ai-hero-title { margin: 0.75rem 0 1rem; font-size: clamp(2.25rem, 6vw, 4rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; color: var(--text-primary-light); }
.ai-hero-sub { max-width: 42rem; margin: 0 auto 2rem; font-size: 1.05rem; line-height: 1.7; color: var(--text-secondary-light); text-wrap: pretty; }
.ai-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.85rem; margin-bottom: 3.5rem; }
.ai-hero-stats { display: grid; gap: 1.5rem; margin: 0; text-align: left; }
.ai-hero-stats > div { padding: 1.15rem 1.25rem; border: 1px solid var(--border-color); border-radius: 1rem; background: rgba(11, 16, 36, 0.6); }
.ai-hero-stats dt { font-size: 1.5rem; font-weight: 700; color: var(--primary-600); font-variant-numeric: tabular-nums; }
.ai-hero-stats dd { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--text-secondary-light); }

/* ----------------------------------------------------------- sections */
.ai-section { padding: 4rem 0; }
.ai-section--alt { background: rgba(11, 16, 36, 0.5); border-block: 1px solid var(--border-color); }
.ai-section-title { margin: 0 0 0.6rem; font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; color: var(--text-primary-light); }
.ai-section-sub { max-width: 40rem; margin: 0 0 2.5rem; color: var(--text-secondary-light); line-height: 1.7; }
.ai-section-sub a { color: var(--primary-600); }
.ai-section-sub--wide { max-width: none; }
.ai-cta { text-align: center; }
.ai-cta .ai-section-sub { margin-inline: auto; }

.ai-card-grid { display: grid; gap: 1.25rem; }
.ai-public-card { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem; border: 1px solid rgba(245, 158, 11, 0.2); border-radius: 1.25rem; background: rgba(11, 16, 36, 0.7); transition: border-color 0.2s ease, transform 0.2s ease; text-decoration: none; }
.ai-public-card:hover { border-color: rgba(245, 158, 11, 0.45); transform: translateY(-2px); }
.ai-public-card h3 { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--text-primary-light); }
.ai-public-card-sub { flex: 1 1 auto; margin: 0; font-size: 0.9rem; line-height: 1.65; color: var(--text-secondary-light); }
.ai-public-card-price { margin: 0.35rem 0 0.65rem; font-size: 0.85rem; color: var(--text-secondary-light); }
.ai-public-card-price > span { font-size: 1.5rem; font-weight: 700; color: var(--primary-600); font-variant-numeric: tabular-nums; }
.ai-public-card .ai-public-link svg { width: 1em; height: 1em; flex: none; }

.ai-steps { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.ai-steps > li { display: flex; align-items: flex-start; gap: 1rem; }
.ai-step-number { flex: 0 0 auto; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--primary-light); color: var(--primary-600); font-weight: 700; font-variant-numeric: tabular-nums; }
.ai-steps h3 { margin: 0 0 0.2rem; font-size: 1rem; font-weight: 600; color: var(--text-primary-light); }
.ai-steps p { margin: 0; font-size: 0.9rem; line-height: 1.65; color: var(--text-secondary-light); }

.ai-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
.ai-tile { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.15rem 1.25rem; border: 1px solid var(--border-color); border-radius: 1rem; background: var(--dark-2); }

.ai-prose { color: var(--text-secondary-light); line-height: 1.7; }
.ai-prose > * + * { margin-top: 0.75rem; }

.ai-public-footer { padding: 2.5rem 0; border-top: 1px solid var(--border-color); font-size: 0.85rem; color: var(--text-secondary-light); }
.ai-public-footer a { color: var(--primary-600); text-decoration: none; }
.ai-public-footer a:hover { color: var(--primary-400); }
.ai-footer-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .ai-footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.ai-footer-col { display: flex; flex-direction: column; gap: 0.55rem; align-items: flex-start; }
.ai-public-risk { margin-top: 1rem; max-width: 46rem; font-size: 0.78rem; line-height: 1.6; opacity: 0.75; }

/* --------------------------------------------------------- brand mark */
.gpe-auth-mark { display: block; flex: none; width: 50px; height: 50px; }
.gpe-auth-mark svg { display: block; width: 100%; height: 100%; }
.gpe-auth-wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.gpe-auth-wordmark b { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.gpe-auth-wordmark b span { color: var(--primary-600); }
.gpe-auth-wordmark small { margin-top: 0.25rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--primary-600); }
.gpe-auth-grid { position: absolute; inset: 0; opacity: 0.3; background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px); background-size: 44px 44px; }
.gpe-auth-blob { position: absolute; border-radius: 9999px; pointer-events: none; filter: blur(64px); animation: gpe-blob-float 14s ease-in-out infinite; }
.gpe-auth-blob--amber { top: -6rem; left: -6rem; width: 24rem; height: 24rem; background: rgba(245, 158, 11, 0.2); }
.gpe-auth-blob--corner { top: -7rem; right: -7rem; width: 22rem; height: 22rem; background: rgba(245, 158, 11, 0.16); animation-delay: -3s; }
.gpe-auth-blob--jade { right: -4rem; bottom: -8rem; width: 28rem; height: 28rem; background: rgba(16, 185, 129, 0.15); }
.gpe-delay-neg6 { animation-delay: -6s; }
.gpe-auth-eyebrow { display: inline-flex; align-items: flex-start; gap: 0.5rem; font-size: 0.75rem; font-weight: 600; line-height: 1.5; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(252, 211, 77, 0.9); }
.gpe-auth-eyebrow::before { content: ""; width: 0.375rem; height: 0.375rem; flex: 0 0 auto; margin-top: calc((1.5em - 0.375rem) / 2); border-radius: 9999px; background: var(--primary-400); }
.gpe-in { animation: gpe-field-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
.gpe-delay-50 { animation-delay: 0.05s; } .gpe-delay-100 { animation-delay: 0.1s; }
.gpe-delay-150 { animation-delay: 0.15s; } .gpe-delay-200 { animation-delay: 0.2s; }
.gpe-delay-250 { animation-delay: 0.25s; } .gpe-delay-300 { animation-delay: 0.3s; }
.gpe-logo-beat { animation: gpe-logo-heartbeat 3s ease-in-out infinite; }

@keyframes gpe-field-in { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }
@keyframes gpe-blob-float { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(2rem, -1.5rem, 0) scale(1.08); } }
@keyframes gpe-logo-heartbeat { 0%, 70%, 100% { transform: scale(1); } 12% { transform: scale(1.08); } 24% { transform: scale(1); } 36% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) {
  .gpe-in, .gpe-auth-blob, .gpe-logo-beat { animation: none !important; }
  .hover-lift { transition: none; }
  .hover-lift:hover { box-shadow: none; translate: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------- data table */
.ai-table-scroll { overflow-x: auto; contain: paint; }
.ai-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 0; }
.ai-table th, .ai-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.ai-table thead th { position: sticky; top: 0; background: var(--dark-2); color: var(--text-primary-light); font-weight: 600; z-index: 1; }
.ai-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.ai-table .is-centred { text-align: center; }
@media (max-width: 767px) { .ai-table thead th { position: static; } }

/* ------------------------------------------------------- breakpoints */
@media (min-width: 768px) {
  .ai-public-actions { display: flex; }
  .ai-hero-stats { grid-template-columns: repeat(3, 1fr); }
  .ai-card-grid { grid-template-columns: repeat(3, 1fr); }
  .ai-steps { grid-template-columns: repeat(2, 1fr); gap: 2rem 2.5rem; }
}
@media (min-width: 1120px) {
  .ai-public-nav { display: flex; }
  .ai-nav-toggle { display: none; }
  .ai-mobile-menu { display: none !important; }
}
@media (max-width: 1119px) {
  .ai-mega-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* =========================================================================
   Phones. Measured at 320 / 375 / 430 before these rules: no page scrolled
   sideways, but every form field rendered at 14px (iOS zooms the page when
   such a field is focused), footer links were 20px tall, the catalogue table
   was 544px inside a 278px scroller, and the hero buttons sat at half width.
   The reference's own phone pass (aitrading mobile.css) fixes the same four.
   ========================================================================= */
@media (max-width: 47.99rem) {

  /* 16px in every typable control: below that, iOS zooms in on focus. */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  select:not([multiple]),
  textarea,
  .input, .select, .textarea { font-size: 1rem; }
  .input, .select { min-height: 3rem; }

  /* Thumb-sized tap targets. */
  .ai-public-footer a { display: inline-block; padding-block: 0.75rem; }
  .ai-public-link { min-height: 2.75rem; align-items: center; }
  .btn-sm { min-height: 2.5rem; }
  .ai-mobile-menu a { padding-block: 0.8rem; }
  .ai-nav-toggle { width: 2.75rem; height: 2.75rem; }
  .ai-collapsible > summary, details > summary { min-height: 2.75rem; display: flex; align-items: center; }

  /* Main actions stack and fill the width, easy to reach with a thumb. */
  .ai-hero-actions { flex-direction: column; align-items: stretch; gap: 0.65rem; margin-bottom: 2.5rem; }
  .ai-hero-actions > .btn,
  .form-actions > .btn,
  .row-wrap > .btn { width: 100%; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .hint { text-align: center; }

  /* Tighter vertical rhythm — the desktop 4rem sections read as dead space. */
  .ai-public-container { padding-inline: 1rem; }
  .ai-hero { padding: 3.25rem 0 3rem; }
  .ai-section { padding: 2.75rem 0; }
  .ai-section-sub { margin-bottom: 1.75rem; }
  .ai-public-card { padding: 1.15rem; border-radius: 1rem; gap: 0.45rem; }
  .panel-p5, .panel-p6, .panel-body { padding: 1.15rem; }
  .ai-hero-stats { gap: 0.75rem; }
  .ai-hero-stats > div { padding: 1rem 1.15rem; }
  .ai-card-grid { gap: 0.85rem; }
  .grid { gap: 0.85rem; }

  /* The eyebrow is inline-flex, so on a second line its dot was stranded at
     the far left while the text centred in what was left of the row. */
  .gpe-auth-eyebrow { display: block; }
  .gpe-auth-eyebrow::before {
    display: inline-block; margin: 0 0.45rem 0.15rem 0;
    vertical-align: middle;
  }

  /* A wide table becomes stacked rows rather than a sideways scroll. */
  .ai-table-scroll { overflow-x: visible; }
  .ai-table { min-width: 0; }
  .ai-table thead { display: none; }
  .ai-table, .ai-table tbody, .ai-table tr, .ai-table td { display: block; width: 100%; }
  .ai-table tr { padding: 0.9rem 1rem; border-bottom: 1px solid var(--color-border); }
  .ai-table tr:last-child { border-bottom: 0; }
  .ai-table td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
    padding: 0.25rem 0; border: 0; text-align: right;
  }
  .ai-table td::before {
    content: attr(data-label); flex: none; max-width: 42%; text-align: left;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--text-secondary-light);
  }
  .ai-table td:first-child { display: block; text-align: left; margin-bottom: 0.4rem; }
  .ai-table td:first-child::before { content: none; }

  /* Footer columns read better with a little air between them. */
  .ai-footer-grid { gap: 1.5rem; }
}

/* Narrow phones: the wordmark and mark crowd the burger at 320. */
@media (max-width: 22.5rem) {
  .gpe-auth-wordmark b { font-size: 1.35rem; }
  .gpe-auth-wordmark small { font-size: 0.66rem; letter-spacing: 0.07em; }
  .gpe-auth-mark { width: 42px; height: 42px; }
  .ai-hero-title { font-size: clamp(1.9rem, 10vw, 2.25rem); }
}
