/* ─── E-App Guides ───────────────────────────────────────────────────────────
   Shared by eapp-guides.html (the index) and eapp-guides/*.html (the guides).
   Tokens ported from the "Modernist" Claude Design system.

   Only ever linked from those standalone pages, which saleshub.html loads in
   an iframe — so the generic selectors below (body, h1, .eg-row) stay isolated
   from the hub's own CSS. Do not link this from saleshub.html directly.
   ────────────────────────────────────────────────────────────────────────── */

/* ── Guide-page text faces ──
   The source site uses Wix's "helvetica-w01-roman" / "helvetica-w01-bold".
   Those encode weight in the FAMILY NAME, not font-weight: the roman face has
   no bold variant, so font-weight:700 on it still renders regular, while the
   bold family renders bold at any weight. Wix's own markup leans on this —
   body copy is roman@700 (regular on screen), labels are bold@700.

   Mapping both to plain "Helvetica" gave every 700 a real bold face, which
   made our text heavier and re-wrapped every paragraph. These two faces
   reproduce Wix's behaviour with metric-compatible system fonts (measured
   within 0.2% of the originals) and no licensed font to redistribute:
   declaring font-weight:100 900 makes each face claim every weight, so the
   browser never substitutes or synthesises a bold. */
@font-face {
  font-family: 'ffl-roman';
  src: local('Helvetica'), local('Arial'), local('Liberation Sans'), local('Nimbus Sans');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'ffl-bold';
  src: local('Helvetica Bold'), local('Helvetica-Bold'), local('Arial Bold'),
       local('Arial-BoldMT'), local('Liberation Sans Bold');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Matched to the Recruiting (.rhq) design system so the E-App Guides feel part
   of the same app. Dark mode syncs to the hub theme via localStorage (see the
   inline script in eapp-guides.html) — this is a same-origin iframe. */
:root {
  --color-bg: #f6f5f1;   /* == the hub's .ss-main canvas, so the frame seams away */
  --color-surface: #FFFFFF;
  --color-surface-2: #F0F0ED;
  --color-text: #2E2B2B;
  --color-text-2: #454040;
  --color-text-3: #9C9694;
  --color-border: #E7E7E2;
  --color-accent: #5F7F10;
  --color-accent-soft: #EFF6D9;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(40,38,30,.05), 0 4px 16px rgba(40,38,30,.06);
  --font-heading: 'Inter', 'Instrument Sans', system-ui, sans-serif;
  --font-body: 'Inter', 'Instrument Sans', system-ui, sans-serif;
  /* legacy aliases so existing rules keep resolving */
  --color-divider: var(--color-border);
  --color-neutral-300: var(--color-border);
  --color-neutral-700: var(--color-text-3);
  --color-accent-600: var(--color-accent);
  --color-accent-700: var(--color-accent);
}
:root[data-theme="dark"] {
  --color-bg: #0d0e10;   /* == the hub's .ss-main canvas in dark */
  --color-surface: #1B1A18;
  --color-surface-2: #242220;
  --color-text: #F4F3F1;
  --color-text-2: #B3AFAB;
  --color-text-3: #736F6B;
  --color-border: #2F2D2A;
  --color-accent: #B9DD5E;
  --color-accent-soft: #2A3313;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
}

/* ── Ocean colour scheme ──────────────────────────────────────────────────
   Add-on to the two palettes above, never a replacement: every selector
   carries [data-kf-scheme="ocean"], so on Original nothing here matches.
   Light is the base, dark overrides it. */
:root[data-kf-scheme="ocean"] {
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-surface-2: #F1F5F9;
  --color-text: #0F1B2D;
  --color-text-2: #37475F;
  --color-text-3: #5A6B85;
  --color-border: #DBE4F0;
  --color-accent: #0F766E;
  --color-accent-soft: #E0F2F0;
  --shadow: 0 1px 2px rgba(15,27,45,.05), 0 4px 16px rgba(15,27,45,.07);
}
:root[data-kf-scheme="ocean"][data-theme="dark"] {
  --color-bg: #04070C;
  --color-surface: #0A1220;
  --color-surface-2: #0D1829;
  --color-text: #E8EDF5;
  --color-text-2: #B8C6DC;
  --color-text-3: #8B9CB8;
  --color-border: #1A2740;
  --color-accent: #5EEAD4;
  --color-accent-soft: #0C2F33;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 6px 20px rgba(0,0,0,.45);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.eag-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ─── shared chrome ─── */
.eag-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px 32px; border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.eag-brand { font-family: var(--font-heading); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.eag-header-tag { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-3); }

.eag-hero { padding: 40px 32px 32px; border-bottom: 1px solid var(--color-border); }
.eag-hero-inner { max-width: 1200px; margin: 0 auto; }
.eag-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 12px; }
.eag-title { font-family: var(--font-heading); font-size: 40px; line-height: 1.08; margin: 0; letter-spacing: -0.02em; font-weight: 700; }

.eag-footer { background: var(--color-surface); color: var(--color-text-2); border-top: 1px solid var(--color-border); padding: 28px 32px; margin-top: auto; }
.eag-footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eag-footer-brand { font-family: var(--font-heading); font-weight: 700; letter-spacing: 0.06em; }
.eag-footer-note { font-size: 13px; max-width: 640px; }

/* ─── index: carrier grid ─── */
.eag-main { max-width: 1200px; margin: 0 auto; padding: 40px 32px 80px; width: 100%; flex: 1; }
.eag-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px; background: transparent; border: none;
}
.eag-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; display: flex; flex-direction: column; gap: 18px; }
.eag-logo-slot { height: 64px; display: flex; align-items: flex-start; }
.eag-logo-slot img { max-height: 56px; max-width: 240px; object-fit: contain; object-position: left; }
.eag-logo-fallback { font-family: var(--font-heading); font-size: 22px; font-weight: 700; }
/* Dark mode: sit every logo on its own white plate.
   Most of these are hotlinked PNG/SVGs drawn in dark ink on a TRANSPARENT
   background — fine on a white card, close to invisible on a dark one. There
   is nothing to fix in the images themselves (they are third-party CDN files),
   so the card gives them the background they were drawn for. A few, like VA
   Life, already ship a white background; those simply blend into the plate
   instead of sitting on it as a hard rectangle, which is what made them look
   out of place next to the transparent ones.
   box-sizing keeps the padding inside the existing 56px cap, so the 64px slot
   height and the card rhythm are untouched. */
:root[data-theme="dark"] .eag-logo-slot img {
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  box-sizing: border-box;
}
/* Distinguishes cards that share a carrier logo (Transamerica Solutions vs Express). */
.eag-badge {
  align-self: flex-start;
  margin-left: auto;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 9px; white-space: nowrap; border-radius: 999px;
  color: var(--color-accent); background: var(--color-accent-soft);
}
.eag-group { display: flex; flex-direction: column; gap: 8px; }
.eag-group-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-3); }
.eag-guide-link {
  display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; padding: 10px 13px; border: 1px solid var(--color-border);
  border-radius: 10px; text-align: left; color: var(--color-text-2); background: var(--color-surface);
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.eag-guide-link:hover { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-soft); }

/* ─── guide pages ─── */
.eg-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 32px; border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.eg-back {
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; color: var(--color-text-2);
  border: 1px solid var(--color-border); border-radius: 999px; padding: 8px 15px;
  background: var(--color-surface);
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.eg-back:hover { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-soft); }
.eg-crumb { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--color-text-3); }

/* ── exact canvas ──
   The source is a fixed ~950px absolutely-positioned canvas. We reproduce it
   verbatim: .eg-canvas keeps the source's intrinsic pixel size and every child
   carries its measured left/top. NOTHING here may reflow — no grid, no flex,
   no width:100% on images — or captions drift from their screenshots. Narrow
   viewports scale the whole canvas via transform (see js/eapp-canvas.js). */
.eg-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
  /* No `flex:1` here: flex-basis:0 would override the explicit pixel height
     that js/eapp-canvas.js sets, and since .eg-canvas is absolutely positioned
     it contributes no height of its own — the page would collapse to one
     viewport and the whole guide would be unreachable. */
}
.eg-canvas {
  position: absolute;
  top: 0; left: 50%;
  background: #fff;
  transform-origin: top center;
}
.eg-i {
  position: absolute;
  z-index: 1;
  display: block;
  max-width: none; /* must defeat any inherited img { max-width:100% } */
}
/* Framed screenshot: the wrapper carries the source's border; box-sizing
   (border-box, set globally above) keeps the image at its original size. */
.eg-f {
  position: absolute;
  z-index: 1;
}
/* Video sits in the canvas at the source's own rect (the NLG guide). */
.eg-v { position: absolute; z-index: 1; display: block; background: #000; }
/* Translucent scrim the source paints over a paused video's poster. Same
   z-index as .eg-v and emitted after it, so it layers on top; the play button
   (.eg-s, z-index 2) stays above both. Hidden once playback starts. */
.eg-vscrim { position: absolute; z-index: 1; pointer-events: none; }
.eg-f img { display: block; width: 100%; height: 100%; max-width: none; }
.eg-s {
  position: absolute;
  z-index: 2; /* arrow shapes point at the screenshots beneath them */
}
.eg-s svg { display: block; width: 100%; height: 100%; overflow: visible; }
.eg-t {
  position: absolute;
  z-index: 3; /* numbered badges are text layered above shapes + screenshots */
}
/* Text keeps the source's own inlined computed styles; only guard against a
   stray UA default leaking in where the source had none. */
.eg-t img { display: inline; }

/* Zero-height marker: preserves the source's #esign-style deep links. */
.eg-anchor { position: absolute; left: 0; display: block; width: 1px; height: 0; overflow: hidden; }


@media (max-width: 640px) {
  .eag-title { font-size: 34px; }
  .eag-hero { padding: 36px 20px 28px; }
  .eag-main, .eg-main { padding: 28px 20px 56px; }
  .eag-header, .eg-bar { padding: 14px 20px; }
  .eag-grid { grid-template-columns: 1fr; }
  .eg-section { font-size: 24px; }
}
