/* ============================================================================
   LendSight Seminar Kit - shared design system
   Professional presentation theme: print-ready, navy/teal, bank-document polish.
   Used by every seminar deck and handout. Edit here to restyle all seminars.
   ============================================================================ */

:root {
  /* Brand palette */
  --navy: #1B2559;
  --navy-2: #24306e;
  --teal: #00B4D8;
  --teal-dark: #0091ad;
  --gold: #FAB95B;
  --ink: #1A1A2E;
  --muted: #6B7280;
  --line: #E5E7EB;
  --bg: #FFFFFF;
  --bg-subtle: #F9FAFB;
  --bg-tint: #EEF6FA;      /* pale teal wash */
  --good: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Rhythm */
  --slide-pad: clamp(28px, 4.5vw, 72px);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(27, 37, 89, 0.10);
  --shadow-lg: 0 24px 60px rgba(27, 37, 89, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0c1030;   /* dark frame behind the white slide, stage feel */
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Deck viewport ---------- */
.deck {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: var(--slide-pad);
  background: var(--bg);
  animation: slideIn 420ms cubic-bezier(0.16, 1, 0.3, 1);
}
.slide.active { display: flex; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(14px) scale(0.995); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .slide { animation: none; }
}

/* Center a slide's content vertically when it wants to */
.slide.center { justify-content: center; }
.slide.center .slide-body { flex: 0 1 auto; }

.slide-body { flex: 1; display: flex; flex-direction: column; gap: clamp(14px, 2vw, 26px); min-height: 0; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--teal-dark); margin: 0;
}
h1.deck-title { font-size: clamp(34px, 5.4vw, 64px); line-height: 1.04; font-weight: 800; letter-spacing: -0.02em; margin: 0; color: var(--navy); }
h2.slide-title { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.08; font-weight: 800; letter-spacing: -0.015em; margin: 0; color: var(--navy); }
h3 { font-size: clamp(18px, 2vw, 24px); font-weight: 700; margin: 0; color: var(--ink); }
p.lead { font-size: clamp(17px, 1.9vw, 23px); line-height: 1.5; color: #33384d; margin: 0; max-width: 60ch; }
p { font-size: clamp(15px, 1.6vw, 18px); line-height: 1.55; color: #33384d; }
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }
.accent { color: var(--teal-dark); }
strong { color: var(--ink); }

.slide-head { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Cards, grids, stats ---------- */
.grid { display: grid; gap: clamp(12px, 1.6vw, 20px); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: clamp(16px, 1.8vw, 24px);
}
.card.tint { background: var(--bg-tint); border-color: #cfeaf3; }
.card.navy { background: var(--navy); color: #eaf0ff; border: none; }
.card.navy h3, .card.navy .stat-value { color: #fff; }
.card.navy .stat-label { color: #aebbe6; }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-size: clamp(24px, 3.2vw, 40px); font-weight: 800; letter-spacing: -0.02em; color: var(--navy); line-height: 1; }
.stat-value.teal { color: var(--teal-dark); }
.stat-value.good { color: var(--good); }
.stat-sub { font-size: 13px; color: var(--muted); }

/* Pill / tag */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg-tint); color: var(--teal-dark); border: 1px solid #cfeaf3; }
.pill.good { background: #e7f9f1; color: #067a54; border-color: #b6ecd7; }
.pill.warn { background: #fdf3e2; color: #a9700f; border-color: #f6dcae; }

/* Two-column split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 34px); align-items: center; height: 100%; }
.split.wide-left { grid-template-columns: 1.3fr 1fr; }

/* Bulleted value list */
ul.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
ul.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: clamp(15px, 1.6vw, 19px); line-height: 1.4; }
ul.checks li::before { content: ""; flex: 0 0 22px; height: 22px; margin-top: 1px; border-radius: 6px; background: var(--teal) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/14px no-repeat; }
ul.checks.warn li::before { background: var(--warn) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='8' x2='12' y2='13'/><circle cx='12' cy='17' r='0.6'/></svg>") center/14px no-repeat; }

/* Comparison table (bank-document look) */
table.compare { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.compare th, table.compare td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: clamp(14px, 1.5vw, 17px); }
table.compare thead th { background: var(--navy); color: #fff; font-weight: 700; }
table.compare thead th:first-child { border-top-left-radius: 8px; }
table.compare thead th:last-child { border-top-right-radius: 8px; }
table.compare tbody tr:nth-child(even) { background: var(--bg-subtle); }
table.compare td.label { color: var(--muted); font-weight: 600; }
table.compare tr.total td { font-weight: 800; color: var(--navy); border-top: 2px solid var(--navy); }

/* Step / roadmap flow */
.flow { display: grid; gap: 14px; }
.flow.h { grid-auto-flow: column; grid-auto-columns: 1fr; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.step .num { width: 34px; height: 34px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px; }
.step h4 { margin: 0; font-size: clamp(15px, 1.5vw, 18px); color: var(--navy); }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.4; }

/* Speaker notes live in the deck markup but only surface in the presenter
   window (which reads their text). Never shown on the audience screen. */
.notes { display: none !important; }
.frame-mode .nav, .frame-mode .dots, .frame-mode .progress, .frame-mode .help-hint { display: none !important; }

/* Chutes-and-ladders roadmap board (SVG rendered by seminar-kit.js) */
.board-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; min-height: 0; flex: 1; padding-bottom: 30px; }
.board-svg { width: 100%; height: 100%; max-height: 100%; display: block; }
.board-legend { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; font-size: clamp(12px, 1.15vw, 14px); font-weight: 700; color: var(--ink); }
.board-legend .bl { display: inline-flex; align-items: center; gap: 8px; }
.board-legend .bl i { width: 22px; height: 0; border-top: 3px dashed; border-radius: 2px; }
.board-legend .bl-ladder i { border-top-style: solid; color: #16a34a; }
.board-legend .bl-chute i { color: #dc2626; }

/* Callout */
.callout { border-left: 4px solid var(--teal); background: var(--bg-tint); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.callout.gold { border-left-color: var(--gold); background: #fef7ec; }

/* Two-engine labels (cash flow vs wealth) - reinforce the separation rule */
.engine-tag { display:inline-flex; align-items:center; gap:8px; font-weight:800; letter-spacing:0.02em; }
.engine-tag.cash { color: #0091ad; }
.engine-tag.wealth { color: #067a54; }

/* ---------- Title slide ---------- */
.title-slide { background: linear-gradient(140deg, var(--navy) 0%, #101a4d 55%, #0b1236 100%); color: #fff; }
.title-slide h1.deck-title, .title-slide h2.slide-title { color: #fff; }
.title-slide .eyebrow { color: var(--teal); }
.title-slide p.lead { color: #c7d0f2; }
.title-slide .mesh { position: absolute; inset: 0; overflow: hidden; opacity: 0.5; pointer-events: none; }
.title-slide .mesh::before { content:""; position:absolute; width: 60vw; height: 60vw; right: -18vw; top: -22vw; background: radial-gradient(circle, rgba(0,180,216,0.55), transparent 62%); }
.title-slide .mesh::after { content:""; position:absolute; width: 46vw; height: 46vw; left: -14vw; bottom: -20vw; background: radial-gradient(circle, rgba(250,185,91,0.28), transparent 60%); }
.title-slide .slide-body { position: relative; z-index: 1; }

/* ---------- Branding blocks (LO + partner) ---------- */
.brand-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
.brand-row .divider { width: 1px; height: 64px; background: rgba(255,255,255,0.25); }
.brand-card { display: flex; gap: 14px; align-items: center; }
.brand-card img.headshot { width: 62px; height: 62px; border-radius: 999px; object-fit: cover; border: 2px solid rgba(255,255,255,0.6); background:#dbe3ff; }
/* Portrait headshots: bias the circular crop to the top so the head shows and
   the lower body is cropped out. Applies to every avatar (deck, bar, cards). */
img.headshot { object-position: center top; }
.brand-card .b-name { font-weight: 800; font-size: 17px; line-height: 1.15; }
.brand-card .b-role { font-size: 12.5px; opacity: 0.85; }
.brand-card .b-meta { font-size: 12px; opacity: 0.8; margin-top: 3px; line-height: 1.4; }
/* On white slides */
.slide:not(.title-slide) .brand-card .b-name { color: var(--navy); }
.slide:not(.title-slide) .brand-card .b-role,
.slide:not(.title-slide) .brand-card .b-meta { color: var(--muted); }
.slide:not(.title-slide) .brand-row .divider { background: var(--line); }
.logo-strip { display:flex; align-items:center; gap: 18px; flex-wrap: wrap; }
.logo-strip img { height: 30px; width:auto; object-fit: contain; }

/* ---------- Chrome: progress, footer, nav ---------- */
.progress { position: fixed; top: 0; left: 0; height: 4px; background: var(--teal); width: 0; z-index: 50; transition: width 300ms cubic-bezier(0.16,1,0.3,1); }

.slide-footer {
  position: absolute; left: var(--slide-pad); right: var(--slide-pad); bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 10.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px;
}
.title-slide .slide-footer { color: #9aa6d8; border-top-color: rgba(255,255,255,0.15); }
.slide-footer .eh { display:inline-flex; align-items:center; gap:6px; font-weight:700; }
.slide-footer .eh svg { width: 14px; height: 14px; }
.slide-footer .pending { color: var(--warn); font-weight: 700; }
.page-num { font-variant-numeric: tabular-nums; }

/* Proprietary-IP copyright line (injected into every footer surface). */
.ls-copyright { font-size: 9.5px; line-height: 1.4; color: var(--muted); opacity: .9; }
.slide-footer { flex-wrap: wrap; }
.slide-footer .ls-copyright { flex-basis: 100%; margin-top: 3px; }
.title-slide .slide-footer .ls-copyright { color: rgba(255,255,255,.5); }
.lp-foot .ls-copyright, .h-foot .ls-copyright { display: block; margin-top: 8px; color: inherit; opacity: .8; }
.ls-disclosures { display: block; margin-top: 8px; font-size: 9px; line-height: 1.45; color: inherit; opacity: .7; }

/* Nav arrows float on the right edge, vertically centered, so they never
   collide with the full-width compliance footer. */
.nav { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.nav button {
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(12,16,48,0.5); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px);
  display: grid; place-items: center; transition: transform 150ms ease, background 150ms ease; box-shadow: var(--shadow);
}
.nav button:hover { background: var(--teal-dark); transform: scale(1.08); }
.dots { display: none; } /* position is shown in the footer (n / total); dots removed to keep chrome clean */

/* Hint is a dark pill (readable on white slides) that fades out after a few seconds. */
.help-hint {
  position: fixed; left: 16px; top: 12px; z-index: 60; font-size: 11px; color: #fff;
  background: rgba(12,16,48,0.55); backdrop-filter: blur(6px); padding: 6px 12px; border-radius: 999px;
  animation: hintFade 0.6s ease 6s forwards;
}
@keyframes hintFade { to { opacity: 0; visibility: hidden; } }

/* ---------- QR block ---------- */
.qr-wrap { display:flex; gap:18px; align-items:center; }
.qr-wrap .qr { width: 150px; height: 150px; border-radius: 12px; border: 1px solid var(--line); background:#fff; padding: 8px; }

/* ============================================================================
   MOBILE - stack every multi-column layout, reflow the deck for phones.
   ============================================================================ */
@media (max-width: 680px) {
  /* Flow the active slide in normal document flow so the PAGE scrolls. This
     avoids the fixed-height flex container that clips the top of tall slides. */
  html, body { height: auto; overflow: visible; }
  .deck { position: static; display: block; overflow: visible; }
  .slide {
    position: relative; inset: auto;
    min-height: 100vh; min-height: 100svh;
    padding: 26px 18px 88px;
    justify-content: flex-start;
  }
  .slide.center { justify-content: flex-start; }
  .slide-body { gap: 16px; flex: 0 0 auto; }

  /* Blanket min-width:0 so every flex/grid item can shrink below its content. */
  .slide, .slide * { min-width: 0; }
  p, p.lead, h1.deck-title, h2.slide-title, h3, .stat-value, .stat-sub,
  .callout, li, .b-name, .b-meta, .slide-footer, td, th { overflow-wrap: anywhere; }
  /* Checks lists: switch from flex to block with an absolutely-positioned icon,
     so the (anonymous) text node wraps instead of forcing the column wider. */
  ul.checks li { display: block; position: relative; padding-left: 32px; }
  ul.checks li::before { position: absolute; left: 0; top: 2px; width: 22px; }

  h1.deck-title { font-size: 32px; }
  h2.slide-title { font-size: 24px; }
  p.lead { font-size: 16px; max-width: none; }

  /* Stack every multi-column layout as plain BLOCKS. Block children are always
     <= parent width and wrap text, avoiding the grid/flex min-content expansion
     that was forcing the slide wider than the screen. */
  .split, .split.wide-left, .grid, .grid.c2, .grid.c3, .grid.c4, .flow, .flow.h, .brand-row { display: block; height: auto; }
  .split > * + *, .grid > * + *, .flow > * + *, .brand-row > * + * { margin-top: 14px; }
  .brand-row .divider { display: none; }
  .qr-wrap { flex-direction: column; align-items: flex-start; }

  /* Tables stay readable */
  table.compare th, table.compare td { padding: 8px 10px; font-size: 13px; }
  .stat-value { font-size: 26px; }

  /* Footer flows at the end of the (scrollable) slide instead of overlapping */
  .slide-footer { position: static; left: auto; right: auto; bottom: auto; margin-top: 20px; flex-wrap: wrap; gap: 6px 10px; }

  /* Nav to a small bottom-right pair; hint hidden */
  .nav { top: auto; bottom: 12px; right: 12px; transform: none; flex-direction: row; gap: 8px; }
  .nav button { width: 40px; height: 40px; }
  .dots, .help-hint { display: none; }
}

/* ============================================================================
   MOBILE - handouts (fixed 8.5in print sheet) fit to the phone width on screen.
   Print output is unchanged (it uses @page in each handout).
   ============================================================================ */
@media (max-width: 820px) {
  html, body { overflow-x: hidden; }
  .sheet { width: 100% !important; min-height: auto !important; margin: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
  .sheet * { min-width: 0; }
  .sheet .two-col, .sheet .cols { grid-template-columns: 1fr !important; }
  .sheet .snapshot { grid-template-columns: 1fr 1fr !important; }
  .sheet table, table.matrix, table.compare { font-size: 12px !important; }
  .sheet .cta-strip { flex-wrap: wrap; }
}

/* ============================================================================
   PRINT / PDF - stack every slide as a page. Same for deck export + handout.
   ============================================================================ */
@media print {
  @page { size: 1280px 720px; margin: 0; }
  html, body { background: #fff; height: auto; }
  .deck { position: static; display: block; overflow: visible; }
  .progress, .nav, .dots, .help-hint { display: none !important; }
  .slide {
    position: relative; inset: auto; display: flex !important;
    width: 1280px; height: 720px; page-break-after: always; break-after: page;
    animation: none; box-shadow: none;
  }
  .slide:last-child { page-break-after: auto; }
  .title-slide { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

/* Utility */
.spacer { flex: 1; }
.row { display:flex; gap: 12px; align-items:center; }
.wrap { flex-wrap: wrap; }
.mt-a { margin-top: auto; }
.big { font-size: clamp(30px, 4.4vw, 56px); font-weight: 800; color: var(--navy); letter-spacing:-0.02em; }
.vs-chip { display:inline-grid; place-items:center; width:44px; height:44px; border-radius:999px; background:var(--navy); color:#fff; font-weight:800; font-size:14px; }

/* Co-marketing (RESPA cost-split) text: hide on single-branded (solo) pages,
   where there is no co-marketing partner, so the "co-marketed" claim is accurate. */
.ls-solo .ls-cobrand-only { display: none; }

/* ---- Print compaction for one-page handouts (Legal) ----
   Handout bodies + required disclosures run tall; this shaves shared elements in
   print so each handout fits a single Legal page without touching screen layout. */
@media print {
  .sheet-pad { gap: 7px !important; padding: 0.32in 0.5in !important; }
  .h-title h1, .h-head h1 { font-size: 25px !important; }
  .h-title p, .h-head p { font-size: 11px !important; margin-top: 3px !important; }
  .cta-strip { padding: 9px 13px !important; }
  .cta-strip img { width: 64px !important; height: 64px !important; }
  .cta-strip h3 { font-size: 14px !important; }
  .cta-strip p { font-size: 11px !important; }
  .h-foot, .lp-foot { font-size: 6.9px !important; line-height: 1.3 !important; padding-top: 4px !important; }
  .ls-disclosures { font-size: 6.9px !important; margin-top: 2px !important; }
  .board-svg { max-height: 5.3in !important; }
  .board-legend { font-size: 10px !important; }
  .tl-row { padding: 2px 0 !important; }
  .tl-dot { width: 34px !important; height: 34px !important; font-size: 13px !important; }
  .tl-row { grid-template-columns: 34px 1fr !important; }
  .tl-body h4 { font-size: 12.5px !important; }
  .tl-body p { font-size: 10.5px !important; line-height: 1.22 !important; }
  .mini { padding: 7px 10px !important; }
  .mini h4 { font-size: 12px !important; }
  .mini li, .mini ul li { font-size: 10.5px !important; line-height: 1.24 !important; }
  table.matrix td, table.matrix th { padding: 3px 8px !important; font-size: 10px !important; }
  .matrix-wrap { margin: 0 !important; }
  .snapshot .snap { padding: 6px !important; }
  .snapshot .snap .v { font-size: 15px !important; }
  .two-col { gap: 10px !important; }
}
