/* GenFunders brand foundation: the typeface, the type scale, the colour tokens and the defaults
   every page shares. Loaded first on every page; page styles build on it. Logos are separate assets.

   TYPEFACE: to change the font for the whole frontend, change the @import below plus
   --gf-font and --gf-font-css in :root. Nothing else names a font family.
   Geist is a variable font, so the import carries the full 100-900 weight range, one file per subset. */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap");

:root {
  /* Typeface (design preference: Geist), with Arial when it cannot load. --gf-font-css is the same
     stylesheet as the @import above, for places that must load the font themselves (the Stripe card field). */
  --gf-font: "Geist", Arial, sans-serif;
  --gf-font-css: "https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap";

  /* Core colours (from the logo) */
  --gf-blue: #2966f4;
  --gf-blue-hover: #2054cc;
  --gf-blue-active: #1943a5;
  --gf-navy: #020e31;

  /* Supporting palette */
  --gf-white: #ffffff;
  --gf-ice: #eef3ff;
  --gf-slate: #536078;
  --gf-line: #dce5f7;
  --gf-teal: #0b6e66;
  --gf-mint: #d8f4e8;
  --gf-amber: #8a4b00;
  --gf-red: #b42338;
}

/* Type scale (Brand Book, "Hierarchy that is easy to follow"). Every text size, line height and
   weight in the frontend uses these tokens, so the scale is changed here and nowhere else.
     Display          64/72  700   hero statements (mobile 40/46)
     Page heading     40/48  700   the one title of a page (mobile 32/40)
     Section heading  28/36  700   sections within a page; large figures
     Card heading     20/28  600   card, modal and panel titles
     Body             16/24  400-500, 600 for controls (buttons, labels, tabs)
     Caption          16/24  500   metadata, helper text, field validation, timestamps, tags
   Nothing is smaller than 16px except the compact steps below. `--gf-text-chip` (12/16) carries the
   account-type badge and the "+N" overflow control on cards, where 16px does not fit the 20-26px
   chip. The micro steps (11-15px) are the reasoning card's ladder from its artboards — step labels,
   hints, pills and the thought body — where 16px would break the drawn layout. The body size stays
   the floor for card copy; the remaining caption slots are the restricted list from the type-system
   audit. */
:root {
  --gf-text-display: 64px;
  --gf-leading-display: 72px;
  --gf-text-page: 40px;
  --gf-leading-page: 48px;
  --gf-text-section: 28px;
  --gf-leading-section: 36px;
  --gf-text-card: 20px;
  --gf-leading-card: 28px;
  --gf-text-body: 16px;
  --gf-leading-body: 24px;
  --gf-text-caption: 16px;
  --gf-leading-caption: 24px;
  /* Compact chips only (account-type badge, card "+N", source badges and similar 12px pills):
     see the type-scale note above. */
  --gf-text-chip: 12px;
  --gf-leading-chip: 16px;
  /* Micro steps: the reasoning card's ladder (step labels, hints, counts, its thought body) and the
     rail's product title. Drawn at these sizes, so they keep their pixels rather than rounding to
     16px. See the type-scale note above. */
  --gf-text-micro: 11px;
  --gf-leading-micro: 16px;
  --gf-text-label: 13px;
  --gf-leading-label: 18px;
  --gf-text-small: 14px;
  --gf-leading-small: 20px;
  --gf-text-note: 15px;
  --gf-leading-note: 22px;
  --gf-text-rail: 17px;
  --gf-leading-rail: 24px;
  --gf-text-header: 18px;
  --gf-leading-header: 24px;
  --gf-text-heading: 26px;
  --gf-leading-heading: 34px;
  --gf-text-hero: 32px;
  --gf-leading-hero: 40px;

  /* Weights use Tailwind-style names and cover the variable font's full range. */
  --gf-weight-thin: 100;
  --gf-weight-extralight: 200;
  --gf-weight-light: 300;
  --gf-weight-normal: 400;
  --gf-weight-medium: 500;
  --gf-weight-semibold: 600;
  --gf-weight-bold: 700;
  --gf-weight-extrabold: 800;
  --gf-weight-black: 900;
  /* Deprecated aliases, kept until the migration finishes (P5 of the audit). */
  --gf-weight-regular: var(--gf-weight-normal);
  --gf-weight-expressive: var(--gf-weight-extrabold);
}

/* Modal footer actions use the 51px control height from the job application
   journey. Keep sizing responsive and leave headers/inline action groups alone. */
:where(
  [class*="modal"] [class*="footer"] button,
  [class*="dialog"] [class*="footer"] button,
  [role="dialog"] [class*="footer"] button,
  dialog [class*="footer"] button,
  [class*="modal"][class*="footer"]:not([class*="header"]) button,
  [class*="dialog"][class*="footer"]:not([class*="header"]) button,
  [class*="modal"][class*="foot"]:not([class*="header"]) button,
  [class*="modal"][class*="actions"]:not([class*="header"]) button,
  [class*="dialog"][class*="actions"]:not([class*="header"]) button,
  .founders_dashboard_settings_verification_actions button,
  .jb-root .jb-app-footer-btn
) {
  box-sizing: border-box !important;
  min-height: 51px !important;
  height: 51px !important;
  padding-block: 0 !important;
  border-radius: 32px !important;
}

/* Semantic role tokens (type-system audit, P1). The six sizes above stay the primitives; these
   names are what surfaces migrate to, batch by batch, so values never change in between. */
:root {
  --gf-text-title-page: var(--gf-text-page);
  --gf-leading-title-page: var(--gf-leading-page);
  --gf-text-title-section: var(--gf-text-section);
  --gf-leading-title-section: var(--gf-leading-section);
  --gf-text-figure: var(--gf-text-section);
  --gf-leading-figure: var(--gf-leading-section);
  --gf-text-title-card: var(--gf-text-card);
  --gf-leading-title-card: var(--gf-leading-card);
  --gf-text-subtitle: var(--gf-text-body);
  --gf-leading-subtitle: var(--gf-leading-body);
  --gf-text-body-strong: var(--gf-text-body);
  --gf-leading-body-strong: var(--gf-leading-body);
  --gf-text-control: var(--gf-text-body);
  --gf-leading-control: var(--gf-leading-body);
  --gf-text-overline: var(--gf-text-caption);
  --gf-leading-overline: var(--gf-leading-caption);

  /* Modal titles: flat 28/36 at every breakpoint, medium weight — the one
     title size for the whole modal surface. Surfaced as the easy control
     block at the top of assets/css/dashboard/modal-titles.css. */
  --gf-text-title-modal: 28px;
  --gf-leading-title-modal: 36px;
}

@media (max-width: 768px) {
  :root {
    --gf-text-display: 40px;
    --gf-leading-display: 46px;
    --gf-text-page: 32px;
    --gf-leading-page: 40px;
  }
}

body {
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
  font-weight: var(--gf-weight-regular);
}

/* The roles as classes, for markup that has no stylesheet rule of its own. */
.gf-text-display { font-size: var(--gf-text-display); line-height: var(--gf-leading-display); font-weight: var(--gf-weight-bold); }
.gf-text-page { font-size: var(--gf-text-page); line-height: var(--gf-leading-page); font-weight: var(--gf-weight-bold); }
.gf-text-section { font-size: var(--gf-text-section); line-height: var(--gf-leading-section); font-weight: var(--gf-weight-bold); }
.gf-text-card { font-size: var(--gf-text-card); line-height: var(--gf-leading-card); font-weight: var(--gf-weight-semibold); }
.gf-text-body { font-size: var(--gf-text-body); line-height: var(--gf-leading-body); font-weight: var(--gf-weight-regular); }
.gf-text-caption { font-size: var(--gf-text-caption); line-height: var(--gf-leading-caption); font-weight: var(--gf-weight-medium); }

/* The semantic roles as classes (type-system audit P2) — same values as the primitives above. */
.gf-text-title-page { font-size: var(--gf-text-title-page); line-height: var(--gf-leading-title-page); font-weight: var(--gf-weight-bold); }
.gf-text-title-section { font-size: var(--gf-text-title-section); line-height: var(--gf-leading-title-section); font-weight: var(--gf-weight-bold); }
.gf-text-figure { font-size: var(--gf-text-figure); line-height: var(--gf-leading-figure); font-weight: var(--gf-weight-bold); }
.gf-text-title-card { font-size: var(--gf-text-title-card); line-height: var(--gf-leading-title-card); font-weight: var(--gf-weight-semibold); }
.gf-text-subtitle { font-size: var(--gf-text-subtitle); line-height: var(--gf-leading-subtitle); font-weight: var(--gf-weight-medium); }
.gf-text-body-strong { font-size: var(--gf-text-body-strong); line-height: var(--gf-leading-body-strong); font-weight: var(--gf-weight-medium); }
.gf-text-control { font-size: var(--gf-text-control); line-height: var(--gf-leading-control); font-weight: var(--gf-weight-semibold); }
.gf-text-overline { font-size: var(--gf-text-overline); line-height: var(--gf-leading-overline); font-weight: var(--gf-weight-semibold); letter-spacing: 0.04em; text-transform: uppercase; }

.gf-text-title-modal { font-size: var(--gf-text-title-modal); line-height: var(--gf-leading-title-modal); font-weight: var(--gf-weight-medium); }

/* Weight utilities (Tailwind-style names), for emphasis expressed in markup. */
.gf-weight-thin { font-weight: var(--gf-weight-thin); }
.gf-weight-extralight { font-weight: var(--gf-weight-extralight); }
.gf-weight-light { font-weight: var(--gf-weight-light); }
.gf-weight-normal { font-weight: var(--gf-weight-normal); }
.gf-weight-medium { font-weight: var(--gf-weight-medium); }
.gf-weight-semibold { font-weight: var(--gf-weight-semibold); }
.gf-weight-bold { font-weight: var(--gf-weight-bold); }
.gf-weight-extrabold { font-weight: var(--gf-weight-extrabold); }
.gf-weight-black { font-weight: var(--gf-weight-black); }

/* Browsers give form controls their own font; make them use the brand font too.
   :where() keeps this at zero specificity, so a deliberate page choice (e.g. monospace) still wins. */
:where(button, input, select, textarea, optgroup) {
  font-family: inherit;
}

/* Motion (160 ms respond, 240 ms transition, 400 ms reveal; one easing curve). */
:root {
  --gf-ease: cubic-bezier(0.2, 0, 0, 1);
  --gf-duration-respond: 160ms;
  --gf-duration-transition: 240ms cubic-bezier(0.2, 0, 0, 1);
  --gf-duration-reveal: 400ms;
}

/* Focus: a visible 2 px outline with an offset whenever a control is reached by keyboard.
   Many component styles remove outlines; this restores one for keyboard focus only
   (:focus-visible), so pointer clicks look unchanged. Text fields keep their own focus ring. */
:where(
  a[href],
  button,
  summary,
  select,
  [role="button"],
  [role="tab"],
  [role="menuitem"],
  [role="option"],
  [role="switch"],
  [role="checkbox"],
  [tabindex]:not([tabindex="-1"]),
  input[type="checkbox"],
  input[type="radio"],
  input[type="range"],
  input[type="file"],
  input[type="button"],
  input[type="submit"]
):focus-visible {
  outline: 2px solid var(--gf-blue) !important;
  outline-offset: 2px !important;
}

/* Reduced motion: no travel, no looping or drawn animation. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
