/* ==========================================================================
   GTH RISE PHILIPPINES — PLATFORM DEMO STYLESHEET
   --------------------------------------------------------------------------
   Front-end demonstration only. No production authentication, payment,
   KYC, or investment execution is represented by this interface.

   TABLE OF CONTENTS
   01. Brand tokens
   02. Reset & base
   03. Typography
   04. Buttons
   05. Forms & inline validation
   06. Login screen
   07. Role selector
   08. Login transition overlay
   09. App shell (sidebar + main)
   10. Mobile navigation drawer
   11. Cards & stat tiles
   12. Journey tracker
   13. Progress bars & meters
   14. Pills, badges & locks
   15. Founder-specific modules
   16. Investor-specific modules
   17. Modals
   18. Demo notice & footer
   19. Animations
   20. Responsive breakpoints
   ========================================================================== */

/* ==========================================================================
   01. BRAND TOKENS
   --------------------------------------------------------------------------
   IMPORTANT ACCESSIBILITY RULE FOR THE GOLD FAMILY (measured, not guessed):

     --gth-rise-gold             #dfb81f  1.91:1 on white  -> FILLS/BORDERS ONLY
     --gth-rise-gold-deep        #ab7e23  3.66:1 on white  -> LARGE TEXT ONLY
     --gth-rise-gold-accessible  #8a651b  5.31:1 on white  -> BODY TEXT / LINKS

   Never set body-size text in --gth-rise-gold on a light background.
   Champagne (#efe3c7) also fails AA as a *text substrate* (muted drops to
   4.42, gold-accessible to 4.16), so "soft gold" selected states use a low
   opacity gold wash over ivory instead of solid champagne.
   ========================================================================== */

:root {
  /* Core brand palette (as supplied) */
  --gth-rise-gold: #dfb81f;
  --gth-rise-gold-deep: #ab7e23;
  --gth-rise-gold-accessible: #8a651b;
  --gth-rise-champagne: #efe3c7;
  --gth-rise-ivory: #fbf8f1;
  --gth-rise-white: #ffffff;
  --gth-rise-charcoal: #1b1a17;
  --gth-rise-muted: #6b675e;
  --gth-rise-border: #e8ddc5;

  /* Derived surfaces — kept AA-safe for text placed on them */
  --surface-page: var(--gth-rise-ivory);
  --surface-card: var(--gth-rise-white);
  --surface-sunken: #f6f1e6;
  --surface-gold-wash: rgba(223, 184, 31, 0.09);   /* selected states */
  --surface-gold-wash-strong: rgba(223, 184, 31, 0.16);
  --border-soft: var(--gth-rise-border);
  --border-hairline: #f0e8d8;

  /* Semantic status colours (muted, non-fintech) */
  --status-complete: #4a6b45;
  --status-complete-wash: rgba(74, 107, 69, 0.10);
  --status-progress: var(--gth-rise-gold-accessible);
  --status-progress-wash: var(--surface-gold-wash);
  --status-locked: #8f8b81;
  --status-locked-wash: rgba(143, 139, 129, 0.10);
  --status-attention: #96541c;
  --status-attention-wash: rgba(150, 84, 28, 0.10);

  /* Type */
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua",
                  Palatino, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.83rem);
  --step-0: clamp(0.9rem, 0.88rem + 0.12vw, 0.96rem);
  --step-1: clamp(1.03rem, 0.99rem + 0.2vw, 1.13rem);
  --step-2: clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-3: clamp(1.45rem, 1.3rem + 0.7vw, 1.9rem);
  --step-4: clamp(1.75rem, 1.5rem + 1.2vw, 2.6rem);

  /* Space & shape */
  --gap-xs: 0.35rem;
  --gap-sm: 0.6rem;
  --gap-md: 1rem;
  --gap-lg: 1.5rem;
  --gap-xl: 2.25rem;
  --gap-2xl: 3.25rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* Subtle, warm shadows — no harsh fintech drop shadows */
  --shadow-xs: 0 1px 2px rgba(27, 26, 23, 0.04);
  --shadow-sm: 0 2px 8px rgba(27, 26, 23, 0.05);
  --shadow-md: 0 8px 24px rgba(27, 26, 23, 0.07);
  --shadow-lg: 0 18px 48px rgba(27, 26, 23, 0.10);
  --shadow-gold: 0 6px 22px rgba(171, 126, 35, 0.18);

  --sidebar-w: 264px;
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
}

/* ==========================================================================
   02. RESET & BASE
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--gth-rise-charcoal);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  /* Guard against any child forcing a horizontal scrollbar at 360px */
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }

ul, ol { margin: 0; padding: 0; list-style: none; }

/* Visible, on-brand focus ring everywhere. Never remove without replacing. */
:focus-visible {
  outline: 2px solid var(--gth-rise-gold-deep);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* Screen-reader-only text (labels, live-region announcements) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: var(--gap-md);
  top: -100px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--gth-rise-charcoal);
  color: var(--gth-rise-white);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: var(--gap-md); }

[hidden] { display: none !important; }

/* ==========================================================================
   03. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--gth-rise-charcoal);
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0; }

.lede {
  font-size: var(--step-1);
  color: var(--gth-rise-muted);
  line-height: 1.62;
}

.muted { color: var(--gth-rise-muted); }

/* Eyebrow / section kicker. Uppercase micro-type in accessible gold. */
.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gth-rise-gold-accessible);
}
.eyebrow--muted { color: var(--gth-rise-muted); }

/* Fine print used for the compliance/guardrail statements */
.fineprint {
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--gth-rise-muted);
}

.stack > * + * { margin-top: var(--gap-md); }
.stack-sm > * + * { margin-top: var(--gap-sm); }
.stack-lg > * + * { margin-top: var(--gap-lg); }

/* Divider hairline */
.rule {
  height: 1px;
  background: var(--border-hairline);
  border: 0;
  margin: var(--gap-lg) 0;
}

/* ==========================================================================
   04. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  padding: 0.72rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: none;
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
              background-color 0.18s var(--ease), border-color 0.18s var(--ease),
              color 0.18s var(--ease);
}
.btn:disabled, .btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
  box-shadow: none !important;
}

/* Primary — charcoal ground with a gold hairline. Reads premium, not flashy. */
.btn--primary {
  background: var(--gth-rise-charcoal);
  color: var(--gth-rise-white);
  border-color: var(--gth-rise-charcoal);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
  border-color: var(--gth-rise-gold);
}

/* Gold — for the single most important action on a screen. Charcoal text on
   gold measures 9.13:1, so this is the one place solid gold carries type. */
.btn--gold {
  background: var(--gth-rise-gold);
  color: var(--gth-rise-charcoal);
  border-color: var(--gth-rise-gold-deep);
  box-shadow: var(--shadow-sm);
}
.btn--gold:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
  background: #e6c236;
}

.btn--ghost {
  background: var(--gth-rise-white);
  color: var(--gth-rise-charcoal);
  border-color: var(--border-soft);
}
.btn--ghost:hover:not(:disabled) {
  border-color: var(--gth-rise-gold);
  background: var(--surface-gold-wash);
}

.btn--quiet {
  padding: 0.4rem 0.7rem;
  background: none;
  color: var(--gth-rise-gold-accessible);
  font-size: var(--step--1);
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.btn--quiet:hover:not(:disabled) {
  background: var(--surface-gold-wash);
  text-decoration: underline;
}

.btn--danger {
  background: var(--gth-rise-white);
  color: #8a3324;
  border-color: #e3cdc6;
}
.btn--danger:hover:not(:disabled) { background: #fdf6f4; border-color: #c9836f; }

.btn--sm { padding: 0.48rem 0.95rem; font-size: var(--step--1); }
.btn--block { width: 100%; }
.btn--lg { padding: 0.95rem 1.6rem; font-size: var(--step-1); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
}

/* Follow / Following toggle — the "on" state is a confirmed, calmer look */
.btn--follow[aria-pressed="true"] {
  background: var(--surface-gold-wash-strong);
  border-color: var(--gth-rise-gold);
  color: var(--gth-rise-charcoal);
}

/* ==========================================================================
   05. FORMS & INLINE VALIDATION
   --------------------------------------------------------------------------
   No browser alert() anywhere in this demo — every message is inline and
   announced through aria-live / aria-describedby.
   ========================================================================== */

.field { display: block; }

.field__label {
  display: block;
  margin-bottom: var(--gap-xs);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gth-rise-charcoal);
}

.field__control { position: relative; display: flex; }

.input, .select {
  width: 100%;
  padding: 0.78rem 0.95rem;
  background: var(--gth-rise-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  color: var(--gth-rise-charcoal);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.input::placeholder { color: #a9a49a; }
.input:hover, .select:hover { border-color: #dcceb0; }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--gth-rise-gold-deep);
  box-shadow: 0 0 0 3px var(--surface-gold-wash);
}

/* Password field leaves room for the show/hide control */
.input--password { padding-right: 4.6rem; }

.password-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.35rem 0.6rem;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--gth-rise-gold-accessible);
  cursor: pointer;
}
.password-toggle:hover { background: var(--surface-gold-wash); }

/* Error state */
.input[aria-invalid="true"] {
  border-color: #b4543c;
  box-shadow: 0 0 0 3px rgba(180, 84, 60, 0.10);
}

.field__error {
  display: none;
  margin-top: var(--gap-xs);
  font-size: var(--step--1);
  font-weight: 500;
  color: #8a3324;
}
.field__error.is-visible { display: block; animation: fadeSlideIn 0.22s var(--ease); }

/* Form-level notice (bad credentials, role mismatch) */
.form-notice {
  display: none;
  gap: var(--gap-sm);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid #e3cdc6;
  background: #fdf6f4;
  font-size: var(--step--1);
  line-height: 1.5;
  color: #7a2e20;
}
.form-notice.is-visible { display: flex; animation: fadeSlideIn 0.24s var(--ease); }
.form-notice__icon { flex: none; font-weight: 700; }

.checkbox {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  font-size: var(--step--1);
  color: var(--gth-rise-muted);
  cursor: pointer;
}
.checkbox input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--gth-rise-gold-deep);
  cursor: pointer;
  flex: none;
}

/* ==========================================================================
   06. LOGIN SCREEN
   --------------------------------------------------------------------------
   Desktop: two columns — brand story left, login card right.
   Mobile: stacked, with the form pulled high so it is reachable without
   excessive scrolling (the brand panel condenses rather than repeating).
   ========================================================================== */

.login {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--surface-page);
}

/* ---- Left: brand panel ---- */
.login__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap-lg);
  padding: var(--gap-2xl) clamp(1.5rem, 4vw, 4.25rem);
  background:
    radial-gradient(circle at 12% 8%, rgba(223, 184, 31, 0.13), transparent 46%),
    radial-gradient(circle at 88% 92%, rgba(239, 227, 199, 0.5), transparent 52%),
    var(--gth-rise-white);
  border-right: 1px solid var(--border-soft);
  overflow: hidden;
}

/* Faint gold hairline arc — the only decorative flourish on this screen */
.login__brand::after {
  content: "";
  position: absolute;
  right: -180px;
  top: 50%;
  width: 420px;
  height: 420px;
  transform: translateY(-50%);
  border: 1px solid rgba(171, 126, 35, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.login__brand-inner {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin-inline: auto;
  width: 100%;
}

.brand-logo { width: clamp(190px, 20vw, 260px); }
.brand-logo--mobile { display: none; width: 170px; }

/* Text fallback if the hosted logo fails to load (offline demo safety net) */
.brand-fallback {
  display: none;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gth-rise-charcoal);
}
.brand-fallback strong { color: var(--gth-rise-gold-deep); font-weight: 600; }
.is-logo-missing .brand-logo { display: none; }
.is-logo-missing .brand-fallback { display: block; }

.login__headline {
  font-size: var(--step-4);
  max-width: 28ch;
}
.login__headline em {
  font-style: normal;
  color: var(--gth-rise-gold-deep);
}

.login__support { max-width: 46ch; }

/* ---- Ecosystem journey illustration (left panel) ---- */
.eco {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--gap-lg);
  background: var(--gth-rise-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.eco__step {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--gth-rise-muted);
}
.eco__dot {
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gth-rise-champagne);
  border: 1px solid var(--gth-rise-gold);
}
/* Final step of the journey is emphasised — it is the destination */
.eco__step--goal { color: var(--gth-rise-charcoal); font-weight: 700; }
.eco__step--goal .eco__dot { background: var(--gth-rise-gold); }
.eco__link {
  width: 1px;
  height: 15px;
  margin-left: 4px;
  background: linear-gradient(var(--gth-rise-gold), var(--border-soft));
}

.login__motto {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--gth-rise-charcoal);
  padding-left: var(--gap-md);
  border-left: 2px solid var(--gth-rise-gold);
}

/* ---- Right: login card column ---- */
.login__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gap-2xl) clamp(1.25rem, 3.5vw, 3.5rem);
}

.login-card {
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  padding: clamp(1.4rem, 2.5vw, 2.25rem);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.login-card__title { font-size: var(--step-2); }

/* ==========================================================================
   07. ROLE SELECTOR
   ========================================================================== */

.roles {
  display: grid;
  gap: var(--gap-sm);
  border: 0;
  padding: 0;
  margin: 0;
}
.roles__legend {
  padding: 0;
  margin-bottom: var(--gap-sm);
  font-size: var(--step-0);
  font-weight: 600;
}

.role {
  position: relative;
  display: block;
  padding: var(--gap-md);
  padding-right: 2.9rem;
  background: var(--gth-rise-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease),
              box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.role:hover { border-color: var(--gth-rise-gold); box-shadow: var(--shadow-sm); }

/* Native radio drives state; it is visually hidden but fully focusable */
.role__input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
}
.role__input:focus-visible + .role__body {
  outline: 2px solid var(--gth-rise-gold-deep);
  outline-offset: 6px;
  border-radius: var(--radius-sm);
}

.role__title {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
}
.role__desc {
  display: block;
  margin-top: 0.2rem;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--gth-rise-muted);
}

/* Check indicator — empty ring until selected */
.role__check {
  position: absolute;
  top: var(--gap-md);
  right: var(--gap-md);
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  background: var(--gth-rise-white);
  color: var(--gth-rise-charcoal);
  font-size: 0.7rem;
  font-weight: 700;
  transition: all 0.2s var(--ease);
}
.role__check span { opacity: 0; transform: scale(0.5); transition: all 0.2s var(--ease); }

/* Selected: gold border, soft gold wash, check, slight elevation.
   Wash is a 9% gold tint over white — NOT solid champagne — so the
   muted description text inside stays above 4.5:1. */
.role:has(.role__input:checked) {
  border-color: var(--gth-rise-gold);
  background: var(--surface-gold-wash);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}
.role:has(.role__input:checked) .role__check {
  background: var(--gth-rise-gold);
  border-color: var(--gth-rise-gold-deep);
}
.role:has(.role__input:checked) .role__check span { opacity: 1; transform: scale(1); }

.role__demo { margin-top: var(--gap-sm); }

/* ==========================================================================
   08. LOGIN TRANSITION OVERLAY
   ========================================================================== */

.transition {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: var(--gap-lg);
  text-align: center;
  background: var(--gth-rise-ivory);
  animation: fadeIn 0.3s var(--ease);
}
.transition__inner { max-width: 26rem; }
.transition__name { font-size: var(--step-3); }
.transition__sub { margin-top: var(--gap-xs); color: var(--gth-rise-muted); }

.transition__bar {
  margin-top: var(--gap-lg);
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--border-soft);
  overflow: hidden;
}
.transition__bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gth-rise-gold), var(--gth-rise-gold-deep));
  transform-origin: left;
  animation: sweep 1.15s var(--ease) forwards;
}

/* ==========================================================================
   09. APP SHELL
   ========================================================================== */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---- Sidebar ---- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  padding: var(--gap-lg) var(--gap-md);
  background: var(--gth-rise-white);
  border-right: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
}

.sidebar__brand { display: flex; align-items: center; gap: var(--gap-sm); padding: 0 var(--gap-sm); }
.sidebar__emblem {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  object-fit: contain;
  background: var(--gth-rise-white);
  flex: none;
}
.sidebar__wordmark {
  font-family: var(--font-display);
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.15;
}
.sidebar__wordmark small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gth-rise-gold-accessible);
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__group-label {
  padding: var(--gap-md) var(--gap-sm) var(--gap-xs);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--status-locked);
}

.nav__item {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  width: 100%;
  padding: 0.62rem var(--gap-sm);
  background: none;
  border: 0;
  border-radius: var(--radius-md);
  font-size: var(--step-0);
  font-weight: 500;
  text-align: left;
  color: var(--gth-rise-charcoal);
  cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}
.nav__item:hover { background: var(--surface-sunken); }

.nav__item[aria-current="page"] {
  background: var(--surface-gold-wash);
  color: var(--gth-rise-charcoal);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--gth-rise-gold);
}

.nav__icon { flex: none; width: 1.1rem; text-align: center; opacity: 0.75; font-size: 0.95rem; }
.nav__label { flex: 1 1 auto; min-width: 0; }

/* Locked nav items stay VISIBLE (§12 lists them permanently) but are
   clearly gated until certification (§21). */
.nav__item--locked { color: var(--status-locked); cursor: not-allowed; }
.nav__item--locked:hover { background: var(--status-locked-wash); }
.nav__lock { flex: none; font-size: 0.72rem; opacity: 0.8; }

.nav__item--logout { color: #8a3324; margin-top: var(--gap-xs); }
.nav__item--logout:hover { background: #fdf6f4; }

.sidebar__foot { margin-top: auto; padding: var(--gap-sm); }

/* ---- Main column ---- */
.main { min-width: 0; display: flex; flex-direction: column; }

.view {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding: var(--gap-xl) clamp(1rem, 3vw, 2.5rem) var(--gap-2xl);
}
.view > * + * { margin-top: var(--gap-lg); }

.view-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--gap-md); }
.view-head__text { min-width: 0; }
.view-head h1 { font-size: var(--step-3); }
.view-head h2 { font-size: var(--step-2); }

/* Topbar — mobile menu button + role badge + seed balance */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  padding: var(--gap-sm) clamp(1rem, 3vw, 2.5rem);
  background: rgba(251, 248, 241, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-hairline);
}
.topbar__menu {
  display: none;
  align-items: center;
  gap: var(--gap-xs);
  padding: 0.5rem 0.8rem;
  background: var(--gth-rise-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
}
.topbar__spacer { flex: 1 1 auto; }

.seed-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  padding: 0.4rem 0.85rem;
  background: var(--surface-gold-wash);
  border: 1px solid var(--gth-rise-gold);
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--gth-rise-charcoal);
  white-space: nowrap;
}
.seed-chip__icon { font-size: 0.85rem; }
/* Brief pulse when the balance changes, so the deduction is noticed */
.seed-chip.is-changed { animation: seedPulse 0.7s var(--ease); }

/* ==========================================================================
   10. MOBILE NAVIGATION DRAWER
   --------------------------------------------------------------------------
   Both sidebars carry 12 entries, which is far too many for a bottom bar,
   so mobile uses the slide-out drawer option from the spec.
   ========================================================================== */

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(27, 26, 23, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s var(--ease);
}
body.is-drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
body.is-drawer-open { overflow: hidden; }

@media (max-width: 1023px) {
  .app { grid-template-columns: 1fr; }

  /* Sidebar becomes an off-canvas drawer */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    width: min(84vw, 310px);
    height: 100dvh;
    transform: translateX(-102%);
    box-shadow: var(--shadow-lg);
    transition: transform 0.28s var(--ease);
  }
  body.is-drawer-open .sidebar { transform: translateX(0); }
  .topbar__menu { display: inline-flex; }
}

/* ==========================================================================
   11. CARDS & STAT TILES
   ========================================================================== */

.card {
  padding: var(--gap-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.card--sunken { background: var(--surface-sunken); box-shadow: none; }
.card--flush { padding: 0; overflow: hidden; }

.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  margin-bottom: var(--gap-md);
}
.card__title { font-size: var(--step-1); }

/* Interactive cards lift slightly on hover */
.card--interactive { transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease); }
.card--interactive:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gth-rise-gold);
}

/* Auto-fitting grids used across both dashboards */
.grid { display: grid; gap: var(--gap-md); }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid--split { grid-template-columns: 1.55fr 1fr; align-items: start; }

/* ---- Stat tile ---- */
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xs);
  padding: var(--gap-md) var(--gap-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.stat__label {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gth-rise-muted);
}
.stat__value {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
/* Text-based stat values (e.g. "Not Yet Certified") need to wrap smaller */
.stat__value--text { font-size: var(--step-1); line-height: 1.25; }
.stat__value small { font-size: 0.5em; font-weight: 500; color: var(--gth-rise-muted); }
.stat__note { font-size: var(--step--1); color: var(--gth-rise-muted); }
.stat--accent { background: var(--surface-gold-wash); border-color: var(--gth-rise-gold); }

/* ==========================================================================
   12. JOURNEY TRACKER
   --------------------------------------------------------------------------
   The canonical six-stage journey. Horizontal on desktop, vertical on
   narrow screens. Note there is deliberately no "Tell your story" stage.
   ========================================================================== */

.journey { padding: var(--gap-lg); }

.journey__track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap-xs);
}

.journey__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-xs);
  padding-top: 30px;
  text-align: center;
}

/* Connector rail behind the markers */
.journey__step::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-soft);
}
.journey__step:first-child::before { left: 50%; }
.journey__step:last-child::before { right: 50%; }
/* Completed segments fill gold */
.journey__step--done::before,
.journey__step--current::before { background: var(--gth-rise-gold); }
.journey__step--current::before {
  background: linear-gradient(90deg, var(--gth-rise-gold) 50%, var(--border-soft) 50%);
}

.journey__marker {
  position: absolute;
  top: 0;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--border-soft);
  background: var(--gth-rise-white);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--status-locked);
}
.journey__step--done .journey__marker {
  background: var(--gth-rise-gold);
  border-color: var(--gth-rise-gold-deep);
  color: var(--gth-rise-charcoal);
}
.journey__step--current .journey__marker {
  background: var(--gth-rise-white);
  border-color: var(--gth-rise-gold-deep);
  color: var(--gth-rise-gold-accessible);
  box-shadow: 0 0 0 5px var(--surface-gold-wash);
}

.journey__name { font-size: var(--step--1); font-weight: 700; line-height: 1.3; }
.journey__step--locked .journey__name { color: var(--status-locked); font-weight: 600; }

.journey__state {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--status-locked);
}
.journey__step--done .journey__state { color: var(--status-complete); }
.journey__step--current .journey__state { color: var(--gth-rise-gold-accessible); }

/* Vertical layout for tablet & mobile */
@media (max-width: 820px) {
  .journey__track { grid-template-columns: 1fr; gap: 0; }
  .journey__step {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--gap-md);
    padding: 0.6rem 0 0.6rem 46px;
    text-align: left;
    min-height: 56px;
  }
  /* Rail flips to a vertical spine */
  .journey__step::before {
    top: 0; bottom: 0;
    left: 13px; right: auto;
    width: 2px; height: auto;
  }
  .journey__step:first-child::before { top: 50%; left: 13px; }
  .journey__step:last-child::before { bottom: 50%; top: 0; }
  .journey__step--current::before {
    background: linear-gradient(180deg, var(--gth-rise-gold) 50%, var(--border-soft) 50%);
  }
  .journey__marker { top: 50%; left: 0; transform: translateY(-50%); }
  .journey__name { flex: 1 1 auto; }
}

/* ==========================================================================
   13. PROGRESS BARS & METERS
   ========================================================================== */

.meter { display: grid; gap: var(--gap-xs); }

.meter__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap-sm);
  font-size: var(--step--1);
}
.meter__label { font-weight: 600; }
.meter__value { font-weight: 700; color: var(--gth-rise-charcoal); white-space: nowrap; }

.meter__track {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  border: 1px solid var(--border-hairline);
  overflow: hidden;
}
.meter__fill {
  /* Rendered on an <i>, which is inline by default - without display:block the
     height and width below would be ignored and the fill would never show. */
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  /* Deep golds only. Measured against the --surface-sunken track:
     gold #dfb81f = 1.69:1 (invisible), gold-deep = 3.25:1, gold-accessible
     = 4.71:1. Bright gold here made a full bar look nearly empty. */
  background: linear-gradient(90deg, var(--gth-rise-gold-deep), var(--gth-rise-gold-accessible));
  /* Width is set inline by JS; this transition animates the fill on reveal */
  transition: width 0.9s var(--ease);
}
.meter__fill--complete { background: linear-gradient(90deg, #4a6b45, #6d8f66); }
.meter--lg .meter__track { height: 11px; }

/* Big score dial for the readiness matrix */
.score {
  display: flex;
  align-items: center;
  gap: var(--gap-lg);
  flex-wrap: wrap;
}
.score__dial {
  position: relative;
  flex: none;
  width: 132px; height: 132px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  /* Conic gradient acts as the ring; --pct is written by JS */
  /* gold-deep, not bright gold, so the filled arc is distinguishable
     from the unfilled remainder (3.25:1 rather than 1.69:1). */
  background: conic-gradient(var(--gth-rise-gold-deep) calc(var(--pct, 0) * 1%), var(--surface-sunken) 0);
  transition: background 0.9s var(--ease);
}
.score__dial::after {
  content: "";
  position: absolute;
  inset: 11px;
  background: var(--gth-rise-white);
  border-radius: 50%;
  border: 1px solid var(--border-hairline);
}
.score__num {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1;
}
.score__num small { display: block; font-size: 0.32em; font-weight: 600; color: var(--gth-rise-muted); letter-spacing: 0.06em; }
.score__text { flex: 1 1 240px; min-width: 0; }

/* ==========================================================================
   14. PILLS, BADGES & LOCKS
   ========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pill--complete { background: var(--status-complete-wash); color: var(--status-complete); border-color: rgba(74, 107, 69, 0.28); }
.pill--progress { background: var(--status-progress-wash); color: var(--gth-rise-gold-accessible); border-color: var(--gth-rise-gold); }
.pill--locked { background: var(--status-locked-wash); color: #6e6a61; border-color: rgba(143, 139, 129, 0.3); }
.pill--attention { background: var(--status-attention-wash); color: var(--status-attention); border-color: rgba(150, 84, 28, 0.28); }
.pill--neutral { background: var(--surface-sunken); color: var(--gth-rise-muted); border-color: var(--border-soft); }
.pill--sm { padding: 0.18rem 0.55rem; font-size: 0.7rem; }

/* Verified / certified marker — the highest-trust signal in the product */
.pill--verified {
  background: var(--gth-rise-charcoal);
  color: var(--gth-rise-white);
  border-color: var(--gth-rise-charcoal);
}
.pill--verified .pill__tick { color: var(--gth-rise-gold); font-weight: 700; }

/* "Promoted" label — Bump buys visibility, and it is always disclosed. */
.pill--promoted {
  background: var(--gth-rise-white);
  color: var(--gth-rise-muted);
  border-color: var(--border-soft);
  border-style: dashed;
  font-weight: 600;
}

.pill-row { display: flex; flex-wrap: wrap; gap: var(--gap-xs); }

/* Certified badge block (certification screen) */
.cert-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-sm);
  padding: var(--gap-xl) var(--gap-lg);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(223, 184, 31, 0.16), transparent 62%),
    var(--gth-rise-white);
  border: 1px solid var(--gth-rise-gold);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-gold);
  animation: badgeIn 0.55s var(--ease);
}
.cert-badge__seal {
  width: 78px; height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gth-rise-gold);
  border: 3px double var(--gth-rise-white);
  box-shadow: 0 0 0 2px var(--gth-rise-gold-deep);
  font-size: 1.9rem;
  color: var(--gth-rise-charcoal);
}
.cert-badge__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Locked-panel treatment for pre-certification gated views */
.locked-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-2xl) var(--gap-lg);
  text-align: center;
  background: var(--surface-sunken);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-lg);
}
.locked-panel__icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gth-rise-white);
  border: 1px solid var(--border-soft);
  font-size: 1.3rem;
}
.locked-panel p { max-width: 44ch; }

/* Definition-style fact list used for verified information */
.facts { display: grid; gap: 0; }
.facts__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-hairline);
}
.facts__row:last-child { border-bottom: 0; }
.facts__key { font-size: var(--step--1); font-weight: 600; color: var(--gth-rise-muted); }
.facts__val { font-weight: 700; text-align: right; }

/* Guardrail / disclaimer note — deliberately plain, never dismissible */
.guardrail {
  display: flex;
  gap: var(--gap-sm);
  padding: var(--gap-md);
  background: var(--surface-sunken);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gth-rise-gold);
  border-radius: var(--radius-md);
}
.guardrail__icon { flex: none; color: var(--gth-rise-gold-accessible); font-weight: 700; }
.guardrail p { font-size: var(--step--1); line-height: 1.55; color: var(--gth-rise-muted); }
.guardrail strong { color: var(--gth-rise-charcoal); }

/* ==========================================================================
   15. FOUNDER-SPECIFIC MODULES
   ========================================================================== */

/* ---- Business identity block under the dashboard greeting ---- */
.biz {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-md) var(--gap-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.biz__mark {
  flex: none;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--surface-gold-wash);
  border: 1px solid var(--gth-rise-gold);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--gth-rise-charcoal);
}
.biz__name { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; }
.biz__meta { font-size: var(--step--1); color: var(--gth-rise-muted); }

/* ---- Next action card — the single most prominent prompt on Overview ---- */
.next-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-lg);
  padding: var(--gap-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(223, 184, 31, 0.15), transparent 58%),
    var(--gth-rise-white);
  border: 1px solid var(--gth-rise-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.next-step__body { flex: 1 1 320px; min-width: 0; }
.next-step__title { font-size: var(--step-2); margin-top: var(--gap-xs); }
.next-step__text { margin-top: var(--gap-xs); color: var(--gth-rise-muted); max-width: 52ch; }

/* ---- Module list (AI Business Builder, learning, checklists) ---- */
.module-list { display: grid; gap: var(--gap-sm); }

.module {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-md);
  background: var(--gth-rise-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.module:hover { border-color: var(--gth-rise-gold); }
.module__num {
  flex: none;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-sunken);
  border: 1px solid var(--border-soft);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gth-rise-muted);
}
.module--complete .module__num { background: var(--status-complete-wash); border-color: rgba(74,107,69,.3); color: var(--status-complete); }
.module--progress .module__num { background: var(--surface-gold-wash); border-color: var(--gth-rise-gold); color: var(--gth-rise-gold-accessible); }
.module__body { flex: 1 1 220px; min-width: 0; }
.module__name { font-weight: 600; }
.module__hint { font-size: var(--step--1); color: var(--gth-rise-muted); }
.module__meter { flex: 1 1 190px; min-width: 150px; }
.module__aside { flex: none; margin-left: auto; }

/* ---- Readiness matrix category rows ---- */
.matrix { display: grid; gap: var(--gap-md); }
.matrix__row { display: grid; gap: var(--gap-xs); }

/* ---- Review checklist (Project Readiness human review items) ---- */
.checklist { display: grid; gap: var(--gap-xs); }
.checklist__item {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  padding: 0.65rem var(--gap-md);
  background: var(--gth-rise-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  font-size: var(--step-0);
}
.checklist__box {
  flex: none;
  width: 20px; height: 20px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  border: 1px solid var(--border-soft);
  background: var(--surface-sunken);
  font-size: 0.68rem;
  font-weight: 700;
  color: transparent;
}
.checklist__item--done .checklist__box {
  background: var(--status-complete);
  border-color: var(--status-complete);
  color: var(--gth-rise-white);
}
.checklist__item--pending .checklist__box { border-style: dashed; }
.checklist__label { flex: 1 1 auto; min-width: 0; }
.checklist__item--done .checklist__label { color: var(--gth-rise-charcoal); }

/* ---- Compact linear flow (Project Readiness pipeline) ---- */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--gap-xs);
}
.flow__node {
  flex: 1 1 130px;
  min-width: 0;
  padding: var(--gap-sm) var(--gap-md);
  background: var(--surface-sunken);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  font-size: var(--step--1);
  font-weight: 700;
  text-align: center;
  color: var(--gth-rise-muted);
}
.flow__node--active {
  background: var(--surface-gold-wash);
  border-color: var(--gth-rise-gold);
  color: var(--gth-rise-charcoal);
}
.flow__node--goal {
  background: var(--gth-rise-charcoal);
  border-color: var(--gth-rise-charcoal);
  color: var(--gth-rise-white);
}

/* ---- Demo controls block (Settings) — discreet but findable on stage ---- */
.demo-controls {
  padding: var(--gap-lg);
  background: var(--surface-sunken);
  border: 1px dashed var(--gth-rise-gold-deep);
  border-radius: var(--radius-lg);
}
.demo-controls__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  margin-bottom: var(--gap-sm);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--gth-rise-charcoal);
  color: var(--gth-rise-gold);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---- Mock video player (placeholder only — no real media loaded) ---- */
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background:
    radial-gradient(circle at 50% 42%, rgba(223, 184, 31, 0.20), transparent 60%),
    linear-gradient(160deg, #23211d, #35312a);
  overflow: hidden;
}
.player__play {
  position: relative;
  z-index: 1;
  width: 68px; height: 68px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--gth-rise-charcoal);
  font-size: 1.15rem;
  padding-left: 4px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.player__play:hover { transform: scale(1.06); background: var(--gth-rise-white); }
.player__caption {
  position: absolute;
  left: var(--gap-md);
  bottom: var(--gap-md);
  right: var(--gap-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  font-size: var(--step--1);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
}
.player__scrub {
  position: absolute;
  left: var(--gap-md);
  right: var(--gap-md);
  bottom: 2.6rem;
  height: 3px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}
.player__scrub i { display: block; height: 100%; width: 0; background: var(--gth-rise-gold); transition: width 0.4s linear; }
.player__badge {
  position: absolute;
  top: var(--gap-md);
  right: var(--gap-md);
  padding: 0.24rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gth-rise-charcoal);
}

/* ---- Pitch deck slide shells ---- */
.deck { display: grid; gap: var(--gap-md); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.slide {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--gap-md);
  background: var(--gth-rise-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}
.slide__n { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; color: var(--gth-rise-gold-accessible); }
.slide__t { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; }
.slide__lines { display: grid; gap: 5px; }
.slide__lines i { height: 5px; border-radius: var(--radius-pill); background: var(--surface-sunken); }
.slide__lines i:nth-child(2) { width: 82%; }
.slide__lines i:nth-child(3) { width: 58%; }

/* ---- Locked/blurred deck preview before unlocking ---- */
.deck-locked { position: relative; }
.deck-locked .deck { filter: blur(5px); opacity: 0.55; pointer-events: none; user-select: none; }
.deck-locked__gate {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--gap-md);
}
.deck-locked__inner {
  max-width: 30rem;
  padding: var(--gap-lg);
  text-align: center;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--gth-rise-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   16. INVESTOR-SPECIFIC MODULES
   ========================================================================== */

/* ---- Certified founder card ---- */
.founder-card {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  padding: var(--gap-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.founder-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gth-rise-gold); }

.founder-card__top { display: flex; align-items: flex-start; gap: var(--gap-md); }
.avatar {
  flex: none;
  width: 50px; height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-gold-wash);
  border: 1px solid var(--gth-rise-gold);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--gth-rise-charcoal);
}
.avatar--lg { width: 74px; height: 74px; font-size: var(--step-2); }
.avatar--sm { width: 38px; height: 38px; font-size: var(--step-0); }

.founder-card__id { min-width: 0; flex: 1 1 auto; }
.founder-card__name { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; }
.founder-card__biz { font-weight: 600; font-size: var(--step-0); }
.founder-card__meta { font-size: var(--step--1); color: var(--gth-rise-muted); }

/* Verified fact grid inside a founder card */
.vfacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-sm);
  padding: var(--gap-md) 0;
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
}
.vfacts__k { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gth-rise-muted); }
.vfacts__v { font-weight: 700; font-size: var(--step-0); }
.vfacts__v--score { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.1; }

/* ---- Filter bar ---- */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: var(--gap-sm);
  padding: var(--gap-md);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.filters__field { display: grid; gap: 0.2rem; min-width: 0; }
.filters__label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gth-rise-muted); }
.select {
  padding: 0.55rem 0.7rem;
  font-size: var(--step--1);
  font-weight: 600;
  border-radius: var(--radius-sm);
  /* Keep the native control but tame its appearance */
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gth-rise-muted) 50%),
                    linear-gradient(135deg, var(--gth-rise-muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.results-count { font-size: var(--step--1); font-weight: 600; color: var(--gth-rise-muted); }

/* ---- Seed store packages ---- */
.seed-pack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-sm);
  padding: var(--gap-lg);
  text-align: center;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.seed-pack:hover { transform: translateY(-3px); border-color: var(--gth-rise-gold); box-shadow: var(--shadow-md); }
.seed-pack__amount { font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; line-height: 1; }
.seed-pack__label { font-size: var(--step--1); font-weight: 600; color: var(--gth-rise-muted); }

/* ---- Activity feed (kept visually secondary per spec) ---- */
.feed { display: grid; gap: 0; }
.feed__item {
  display: flex;
  gap: var(--gap-sm);
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-hairline);
}
.feed__item:last-child { border-bottom: 0; }
.feed__dot {
  flex: none;
  margin-top: 0.45rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gth-rise-gold);
}
.feed__text { font-size: var(--step--1); line-height: 1.5; }
.feed__text strong { font-weight: 700; }
.feed__time { font-size: 0.7rem; color: var(--status-locked); margin-top: 0.1rem; }

/* ---- Directory / list rows (investor network, following, portfolio) ---- */
.row-list { display: grid; gap: var(--gap-sm); }
.row-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-md);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: border-color 0.18s var(--ease);
}
.row-item:hover { border-color: var(--gth-rise-gold); }
.row-item__body { flex: 1 1 210px; min-width: 0; }
.row-item__name { font-weight: 700; }
.row-item__meta { font-size: var(--step--1); color: var(--gth-rise-muted); }
.row-item__aside { flex: none; margin-left: auto; display: flex; flex-wrap: wrap; gap: var(--gap-xs); align-items: center; }

/* ---- Reputation badges ---- */
.badge-grid { display: grid; gap: var(--gap-sm); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rep-badge {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  padding: var(--gap-md);
  background: var(--surface-sunken);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--gth-rise-muted);
}
.rep-badge__icon { font-size: 1.1rem; opacity: 0.5; }
/* Earned badges are the only ones rendered in full contrast */
.rep-badge--earned {
  background: var(--surface-gold-wash);
  border-color: var(--gth-rise-gold);
  color: var(--gth-rise-charcoal);
}
.rep-badge--earned .rep-badge__icon { opacity: 1; }

/* ---- Join Venture deal card ---- */
.deal {
  padding: var(--gap-lg);
  background:
    radial-gradient(circle at 0% 0%, rgba(239, 227, 199, 0.5), transparent 55%),
    var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

/* Label for features that are proposed rather than live */
.proposed-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  border: 1px dashed var(--gth-rise-muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gth-rise-muted);
}

/* ---- Trust banner — the platform's central rule (§40) ---- */
.trust-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-lg);
  background: var(--gth-rise-charcoal);
  border-radius: var(--radius-lg);
  color: var(--gth-rise-white);
}
.trust-banner__mark { flex: none; font-size: 1.4rem; color: var(--gth-rise-gold); }
.trust-banner__body { flex: 1 1 300px; min-width: 0; }
.trust-banner__rule {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--gth-rise-white);
}
/* Champagne on charcoal measures 13.66:1 — safe for supporting copy here */
.trust-banner__text {
  margin-top: var(--gap-xs);
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--gth-rise-champagne);
  max-width: 68ch;
}

/* ==========================================================================
   17. MODALS
   --------------------------------------------------------------------------
   Focus is trapped while open, ESC closes, focus returns to the trigger.
   Implemented with role="dialog" + aria-modal on a scrim overlay.
   ========================================================================== */

.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--gap-md);
  background: rgba(27, 26, 23, 0.5);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s var(--ease);
  overflow-y: auto;
}

.modal {
  width: 100%;
  max-width: 30rem;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1.25rem, 3vw, 1.85rem);
  background: var(--gth-rise-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.26s var(--ease);
}
.modal--wide { max-width: 40rem; }

.modal__head { display: flex; align-items: flex-start; gap: var(--gap-md); margin-bottom: var(--gap-md); }
.modal__title { flex: 1 1 auto; font-size: var(--step-2); min-width: 0; }
.modal__close {
  flex: none;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  background: var(--surface-sunken);
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--gth-rise-muted);
}
.modal__close:hover { background: var(--gth-rise-white); border-color: var(--gth-rise-gold); color: var(--gth-rise-charcoal); }

.modal__body > * + * { margin-top: var(--gap-md); }

.modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  margin-top: var(--gap-lg);
}
.modal__foot .btn { flex: 1 1 auto; }

/* Ledger used by the seed confirmation (before / after balance) */
.ledger {
  display: grid;
  gap: var(--gap-xs);
  padding: var(--gap-md);
  background: var(--surface-sunken);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}
.ledger__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--gap-sm); font-size: var(--step--1); }
.ledger__row--total {
  padding-top: var(--gap-xs);
  border-top: 1px solid var(--border-soft);
  font-weight: 700;
  font-size: var(--step-0);
}
.ledger__v { font-weight: 700; white-space: nowrap; }

/* Success confirmation icon inside a modal */
.modal__success {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--status-complete-wash);
  border: 1px solid rgba(74, 107, 69, 0.35);
  color: var(--status-complete);
  font-size: 1.5rem;
}

/* ---- Toast (non-blocking confirmations) ---- */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: var(--gap-lg);
  z-index: 110;
  transform: translateX(-50%);
  display: grid;
  gap: var(--gap-sm);
  width: min(92vw, 26rem);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  padding: 0.8rem var(--gap-md);
  background: var(--gth-rise-charcoal);
  color: var(--gth-rise-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--step--1);
  font-weight: 600;
  animation: toastIn 0.28s var(--ease);
}
.toast__icon { color: var(--gth-rise-gold); flex: none; }
.toast.is-leaving { animation: toastOut 0.24s var(--ease) forwards; }

/* ==========================================================================
   18. DEMO NOTICE & FOOTER
   ========================================================================== */

/* Persistent corner label so no screenshot is ever mistaken for production */
.demo-flag {
  position: fixed;
  right: var(--gap-md);
  bottom: var(--gap-md);
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  padding: 0.32rem 0.7rem;
  background: rgba(27, 26, 23, 0.9);
  color: var(--gth-rise-champagne);
  border-radius: var(--radius-pill);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.demo-flag__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gth-rise-gold);
}

.site-foot {
  padding: var(--gap-lg) clamp(1rem, 3vw, 2.5rem) 4.25rem;
  border-top: 1px solid var(--border-hairline);
  background: var(--gth-rise-white);
}
.site-foot__inner {
  max-width: 1180px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-md);
  align-items: center;
  justify-content: space-between;
}
.site-foot p { font-size: var(--step--1); color: var(--gth-rise-muted); max-width: 74ch; }

/* ==========================================================================
   19. ANIMATIONS
   --------------------------------------------------------------------------
   Deliberately restrained: fade, small slide, bar fill, gentle elevation.
   All of it is disabled under prefers-reduced-motion.
   ========================================================================== */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}

@keyframes sweep {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes badgeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes seedPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.09); box-shadow: var(--shadow-gold); }
  100% { transform: scale(1); }
}

/* View entrance — applied by the router on each render */
.animate-in { animation: fadeSlideIn 0.34s var(--ease) both; }
/* Staggered children for dashboard card rows */
.animate-in > * { animation: fadeSlideIn 0.36s var(--ease) both; }
.animate-in > *:nth-child(1) { animation-delay: 0.02s; }
.animate-in > *:nth-child(2) { animation-delay: 0.06s; }
.animate-in > *:nth-child(3) { animation-delay: 0.10s; }
.animate-in > *:nth-child(4) { animation-delay: 0.14s; }
.animate-in > *:nth-child(5) { animation-delay: 0.18s; }
.animate-in > *:nth-child(6) { animation-delay: 0.22s; }
.animate-in > *:nth-child(n+7) { animation-delay: 0.26s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  /* Elevation-on-hover is motion too — remove the translate, keep the shadow */
  .card--interactive:hover,
  .founder-card:hover,
  .seed-pack:hover,
  .btn--primary:hover,
  .btn--gold:hover,
  .role:has(.role__input:checked) { transform: none; }
}

/* ==========================================================================
   20. RESPONSIVE BREAKPOINTS
   --------------------------------------------------------------------------
   Verified against 1440 / 1280 / 1024 / 768 / 430 / 390 / 360.
   ========================================================================== */

/* 1280px laptop — tighten the sidebar slightly */
@media (max-width: 1320px) {
  :root { --sidebar-w: 244px; }
}

/* Split layouts collapse before the tablet breakpoint */
@media (max-width: 1100px) {
  .grid--split { grid-template-columns: 1fr; }
}

/* 1024px tablet — login goes single column, drawer nav takes over (above) */
@media (max-width: 1023px) {
  .login { grid-template-columns: 1fr; min-height: 0; }

  /* Brand panel condenses: it stays, but stops competing with the form */
  .login__brand {
    padding: var(--gap-xl) clamp(1.25rem, 5vw, 3rem) var(--gap-lg);
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
  }
  .login__brand::after { display: none; }
  .login__panel { padding: var(--gap-xl) clamp(1.25rem, 5vw, 3rem) var(--gap-2xl); }
  .login__headline { font-size: var(--step-3); }
}

/* 768px tablet */
@media (max-width: 768px) {
  .vfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view { padding-top: var(--gap-lg); }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
}

/* 430px and below — phone. Form must be reachable fast, so the brand panel
   drops its illustration and keeps only logo + headline + motto. */
@media (max-width: 560px) {
  .login__brand { padding: var(--gap-lg) var(--gap-md) var(--gap-md); }
  .login__panel { padding: var(--gap-lg) var(--gap-md) var(--gap-xl); }
  .brand-logo { display: none; }
  .brand-logo--mobile { display: block; }
  .eco { display: none; }               /* journey is re-shown in-dashboard */
  .login__support { display: none; }    /* headline + motto carry the story */
  .login__headline { font-size: var(--step-2); }
  .login-card { padding: var(--gap-md); border-radius: var(--radius-lg); }

  .stat { padding: var(--gap-md); }
  .card { padding: var(--gap-md); }
  .journey { padding: var(--gap-md); }
  .next-step { padding: var(--gap-md); gap: var(--gap-md); }
  .trust-banner { padding: var(--gap-md); }
  .founder-card { padding: var(--gap-md); }

  .view-head { align-items: flex-start; }
  .btn-row .btn { flex: 1 1 100%; }
  .row-item__aside { margin-left: 0; width: 100%; }
  .row-item__aside .btn { flex: 1 1 auto; }
  .site-foot { padding-bottom: 3.5rem; }
}

/* 360px — smallest supported width. Guard against overflow from long
   strings (business names, emails, score labels). */
@media (max-width: 400px) {
  .grid--stats { grid-template-columns: 1fr; }
  .vfacts { grid-template-columns: 1fr; }
  .deck { grid-template-columns: 1fr; }
  .badge-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .score { gap: var(--gap-md); }
  .score__dial { width: 108px; height: 108px; }
  .flow__node { flex: 1 1 100%; }
  .facts__row { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
  .facts__val { text-align: left; }
  .module { gap: var(--gap-sm); }
  .module__aside { margin-left: 0; }
  .demo-flag { right: var(--gap-sm); bottom: var(--gap-sm); font-size: 0.6rem; }
}

/* Long unbroken tokens (emails, business names) must never widen the layout */
.founder-card__name, .founder-card__biz, .biz__name, .row-item__name,
.stat__value, .modal__title, .view-head h1, .view-head h2 {
  overflow-wrap: anywhere;
}

/* Print: flatten to a readable document (useful for pitch handouts) */
@media print {
  .sidebar, .topbar, .demo-flag, .toast-wrap, .drawer-scrim { display: none !important; }
  .app { grid-template-columns: 1fr; }
  body { background: #fff; }
  .card, .stat, .founder-card { box-shadow: none; break-inside: avoid; }
}

/* ==========================================================================
   21. LEGACY / file:// COMPATIBILITY FALLBACKS
   --------------------------------------------------------------------------
   This demo is distributed as a folder that a client opens by double-clicking
   index.html on Windows (the file:// protocol). Everything above works there,
   but two defensive layers are added here:

   a) :has() drives the selected role card. It needs Chrome/Edge 105+ (2022).
      app.js additionally sets .is-selected on the chosen card, so the state
      still renders correctly in an older engine that ignores :has().

   b) Browsers that do not support :has() would discard the whole selector
      block, so these duplicate rules are written separately rather than
      being comma-joined with the :has() versions.
   ========================================================================== */

.role.is-selected {
  border-color: var(--gth-rise-gold);
  background: var(--surface-gold-wash);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}
.role.is-selected .role__check {
  background: var(--gth-rise-gold);
  border-color: var(--gth-rise-gold-deep);
}
.role.is-selected .role__check span { opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .role.is-selected { transform: none; }
}

/* Fallback for engines without aspect-ratio (pre-2021): keep the mock video
   player and deck slides from collapsing to zero height. */
@supports not (aspect-ratio: 16 / 9) {
  .player { min-height: 260px; }
  .slide { min-height: 190px; }
}
