/* The Product Tour (js/feature-tour.js): a wide centred window. The opening page sets the product's one claim beside
 * the six steps; a step page keeps the steps down the left and lists that step's tools on the right.
 * Text sizes are fixed. The tool rows share the height that is free, so a page is full at every window size and
 * nothing is scaled; a window shorter than the content scrolls the right-hand panel only. */

.ftour-scrim { z-index: 1004; }

.kpf-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:12px 24px;border-top:1px solid var(--line,#D5E0DC);flex:none;background:#fff}
.kpf-controls .btn,.kpf-link{min-height:44px}
.kpf-controls .btn[hidden]{display:none}
.kpf-handoff-line{flex:1 0 100%;margin:0;font-size:13px;line-height:1.4;color:var(--muted,#5B6F6A);text-align:right}
.kpf-handoff-line[hidden]{display:none}
.kpf-progress{margin-right:auto;font-size:15px;color:var(--ink-2,#12302B)}

.ftour.kpf {
  position: fixed;
  z-index: 1005;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1240px, calc(100vw - 48px));
  height: min(90dvh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink, #0C1F1C);
  border: 1px solid var(--line, #D5E0DC);
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(12, 31, 28, .30);
  overflow: hidden;
  font: 400 15.5px/1.5 "IBM Plex Sans", system-ui, sans-serif;
  animation: kpf-in .18s ease-out both;
}

@keyframes kpf-in {
  from { opacity: 0; transform: translate(-50%, -48%); }
}
@media (prefers-reduced-motion: reduce) {
  .ftour.kpf { animation: none; }
}

.kpf-head {
  display: flex;
  align-items: center;
  padding: 6px 8px 6px 24px;
  background: var(--dark, #164034);
  color: #fff;
  font: 600 19px/1 Newsreader, Georgia, serif;
  flex: none;
}

.ftour-x {
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ftour-x:hover { background: rgba(255, 255, 255, .24); }
.ftour-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.kpf-main {
  flex: 1;
  min-height: 0;
  display: flex;
}

/* The six steps, down the left of a step page. */
.kpf-tabs {
  flex: none;
  width: 264px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 12px;
  background: #F3FAF7;
  border-right: 1px solid var(--line, #D5E0DC);
  overflow-y: auto;
}
.kpf-tabs[hidden] { display: none; }

.kpf-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px 8px 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--ink-2, #12302B);
  cursor: pointer;
}
.kpf-tab:hover { background: #E6F4EE; }
.kpf-tab:focus-visible, .kpf-jump:focus-visible, .kpf-link:focus-visible { outline: 2px solid var(--jade, #0E8A6E); outline-offset: 2px; }
.kpf-tab[aria-pressed="true"] {
  background: #fff;
  border-left-color: var(--jade, #0E8A6E);
  color: var(--ink, #0C1F1C);
  box-shadow: 0 1px 2px rgba(12, 31, 28, .10);
}

.kpf-n {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--jade, #0E8A6E);
  background: #fff;
  color: var(--jade-dark, #0a6b55);
  font: 600 13.5px/1 "IBM Plex Sans", sans-serif;
}
.kpf-tab[aria-pressed="true"] .kpf-n { background: var(--jade, #0E8A6E); color: #fff; }

.kpf-tab-text b { display: block; font: 500 15px/1.3 "IBM Plex Sans", sans-serif; }
.kpf-tab[aria-pressed="true"] .kpf-tab-text b { font-weight: 600; }

/* The right-hand panel of a step: title, one sentence, the tools, the screens to open. */
.kpf-panel {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 26px 36px 22px;
}

.kpf-panel h2 {
  margin: 0;
  font: 600 30px/1.15 Newsreader, Georgia, serif;
  letter-spacing: -.01em;
  color: var(--ink, #0C1F1C);
}

.kpf-lead {
  margin: 10px 0 0;
  max-width: 78ch;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2, #12302B);
}

.kpf-list {
  flex: 1 0 auto;
  margin: 18px 0 0;
  display: grid;
  grid-auto-rows: minmax(min-content, 1fr);
  border-top: 1px solid var(--line, #D5E0DC);
}
.kpf-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 24px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--line, #D5E0DC);
}
.kpf-name {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink, #0C1F1C);
}
.kpf-what {
  margin: 0;
  max-width: 84ch;
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink-2, #12302B);
}
/* The sample tag has the look of the site's own fact tag (css/simple-chat.css .factchip.fact-inline). */
.kpf-tag {
  padding: 0 5px;
  border: 1px solid var(--jade-pale, #AFCFC6);
  border-radius: 4px;
  background: var(--good-soft, #E6F4EE);
  color: var(--jade-dark, #0a6b55);
  font: 600 12px/1.5 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .02em;
}

.kpf-links { flex: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.kpf-link {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1.5px solid #BFDCD3;
  border-radius: 8px;
  background: #F3FAF7;
  color: #075C47;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}
.kpf-link:hover { border-color: #0E8A6E; background: #E6F4EE; text-decoration: none; }

/* The opening page: the claim on the left, the six steps on the right. */
.kpf-panel.kpf-open {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  column-gap: 48px;
  padding: 30px 40px 26px 44px;
}
.kpf-pitch { align-self: center; }
.kpf-open h2 { font-size: 40px; line-height: 1.1; max-width: 13em; }
.kpf-open .kpf-lead { margin-top: 20px; max-width: 44ch; font-size: 18px; line-height: 1.55; }

.kpf-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-rows: minmax(min-content, 1fr);
  border-top: 1px solid var(--line, #D5E0DC);
}
.kpf-index li { display: flex; border-bottom: 1px solid var(--line, #D5E0DC); }
.kpf-jump {
  flex: 1;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.kpf-jump:hover { background: #F3FAF7; }
.kpf-jn { font: 500 28px/1 Newsreader, Georgia, serif; color: var(--jade-dark, #0a6b55); }
.kpf-jt b { display: block; font: 600 16.5px/1.3 "IBM Plex Sans", sans-serif; color: var(--ink, #0C1F1C); }
.kpf-jt span { display: block; margin-top: 2px; font-size: 14.5px; line-height: 1.4; color: var(--muted, #44605A); }

/* Text sizes. css/type-scale.css sets every element of the site to its container's size with !important, so the
 * tour states its own sizes the same way; each selector starts at the window, which outweighs that sheet's rules. */
.ftour.kpf { font-size: 15.5px !important; }
.ftour.kpf .kpf-head { font-size: 19px !important; }
.ftour.kpf .ftour-x { font-size: 20px !important; }
.ftour.kpf .kpf-progress { font-size: 15px !important; }
.ftour.kpf .kpf-controls .btn { font-size: 14.5px !important; }
.ftour.kpf .kpf-n { font-size: 13.5px !important; }
.ftour.kpf .kpf-tab-text b { font-size: 15px !important; }
.ftour.kpf .kpf-panel h2 { font-size: 30px !important; line-height: 1.15 !important; }
.ftour.kpf .kpf-lead { font-size: 17px !important; }
.ftour.kpf .kpf-name { font-size: 16px !important; }
.ftour.kpf .kpf-what { font-size: 15.5px !important; }
.ftour.kpf .kpf-tag { font-size: 12px !important; }
.ftour.kpf .kpf-link { font-size: 14.5px !important; }
.ftour.kpf .kpf-open h2 { font-size: 40px !important; line-height: 1.1 !important; }
.ftour.kpf .kpf-open .kpf-lead { font-size: 18px !important; }
.ftour.kpf .kpf-jn { font-size: 28px !important; }
.ftour.kpf .kpf-jt b { font-size: 16.5px !important; }
.ftour.kpf .kpf-jt span { font-size: 14.5px !important; }

/* Task 1935: the button lives in the top bar before Consult AI (index.html #kpfbtn),
 * in flow like the other top-bar buttons, never fixed over the page content. */
/* Moses, 2026-10-07: the top-bar button takes its size and surface from the shared rule for both ids
 * in css/app.css, so one edit resizes both together. This sheet keeps only flow, never sizing. */
.topbtn-kpf { flex: none; white-space: nowrap; }
/* Legacy fixed button, kept only as a fallback when no top-bar slot exists. */
.ftour-reopen {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: calc(18px + 52px + 12px);
  padding: 11px 20px;
  border: 1.5px solid #0E8A6E;
  border-radius: 26px;
  background: #fff;
  color: #075C47;
  font: 700 14px "IBM Plex Sans", sans-serif;
  box-shadow: 0 8px 22px rgba(12, 31, 28, .18);
  cursor: pointer;
}
.ftour-reopen:hover { background: #F3FAF7; }
.ftour-reopen[hidden] { display: none; }
/* Task 1935: the first-visit hint is anchored under the top-bar button, never
 * fixed over the lower-right content. */
.ftour-hint { font-size: 12.5px; }
/* Moses, 2026-09-30 19:20 UTC: the hint sat over the header's "Find a fund" button. It is no longer
 * position:fixed or position:absolute at all: feature-tour.js puts it in the left rail's own flow
 * (nav.rail), under the rail's last item, where the column is empty on every page that shows it, so it
 * can never cover a control. These rules only give it its box; the placement is the markup's job. */
html body .ftour-hint {
  position: static !important;
  max-width: 196px;
  margin: auto 12px 4px;
  padding: 9px 26px 9px 11px;
  border: 1px solid #2C6B5C;
  border-radius: 10px;
  background: #123A31;
  color: #CFE9DF;
  font: 500 12.5px/1.45 "IBM Plex Sans", sans-serif;
  box-shadow: none;
}
.ftour-hint-slot { display: block; }
.rail .ftour-hint-slot { margin-top: auto; }
.ftour-hint .mobile-flow { margin: 0; }
html body .ftour-hint button { color: #CFE9DF; }

/* A short window (a small laptop): the same sizes of text, less air around them. */
@media (max-height: 800px) and (min-width: 761px) {
  .kpf-panel { padding: 18px 32px 16px; }
  .ftour.kpf .kpf-panel h2 { font-size: 27px !important; }
  .ftour.kpf .kpf-lead { margin-top: 6px; font-size: 16px !important; }
  .kpf-list { margin-top: 12px; }
  .kpf-row { padding: 3px 0; }
  .ftour.kpf .kpf-name { font-size: 15.5px !important; }
  .ftour.kpf .kpf-what { font-size: 15px !important; }
  .kpf-links { margin-top: 12px; }
  .kpf-tabs { padding: 10px 12px; }
  .kpf-tab { min-height: 46px; }
  .kpf-panel.kpf-open { padding: 20px 36px 18px 40px; }
  .ftour.kpf .kpf-open h2 { font-size: 34px !important; }
  .ftour.kpf .kpf-open .kpf-lead { margin-top: 14px; font-size: 17px !important; }
}

@media (max-width: 1024px) {
  .ftour.kpf {
    inset: 12px;
    width: auto;
    height: auto;
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    transform: none;
    animation: none;
  }
  .kpf-tabs { width: 232px; }
  .kpf-row { grid-template-columns: 190px minmax(0, 1fr); column-gap: 20px; }
  .kpf-panel.kpf-open { column-gap: 32px; padding: 24px 28px; }
  .ftour.kpf .kpf-open h2 { font-size: 32px !important; }
}
@media (max-width: 760px) {
  .kpf-main { flex-direction: column; }
  .kpf-tabs { width: auto; flex-direction: row; gap: 6px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line, #D5E0DC); overflow-x: auto; overflow-y: hidden; }
  .kpf-tab { flex: none; min-height: 44px; min-width: 44px; padding: 6px; justify-content: center; border-left: 0; }
  .kpf-tab-text { display: none; }
  .kpf-panel, .kpf-panel.kpf-open { display: block; padding: 18px 18px 16px; }
  .ftour.kpf .kpf-panel h2, .ftour.kpf .kpf-open h2 { font-size: 25px !important; }
  .ftour.kpf .kpf-lead, .ftour.kpf .kpf-open .kpf-lead { font-size: 16px !important; }
  .kpf-list { display: block; }
  .kpf-row { display: block; padding: 10px 0; }
  .kpf-what { margin-top: 2px; }
  .kpf-index { margin-top: 18px; display: block; }
  .kpf-controls { padding: 10px 12px; gap: 8px; }
}

@media print {
  .ftour, .ftour-scrim, .ftour-reopen { display: none !important; }
}

/* Onboarding polish: the same six steps, with a consistent frame and reading rhythm. */
html body .ftour.kpf {
  inset: 0 !important;
  margin: auto !important;
  width: min(1332px, calc(100vw - 48px)) !important;
  height: min(780px, calc(100vh - 48px));
  height: min(780px, calc(100dvh - 48px));
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  isolation: isolate;
  box-shadow: 0 24px 64px rgba(12, 31, 28, .30);
  animation: none;
}
html body .ftour.kpf .kpf-head {
  padding: 8px 14px 8px 24px;
  min-height: 60px;
  background: #164034;
  font-family: Newsreader, Georgia, serif;
  font-size: 23px !important;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
html body .ftour.kpf .ftour-x { width: 44px; height: 44px; min-height: 44px; border-radius: 8px; }
html body .ftour.kpf .kpf-tabs { width: 254px; padding: 16px 12px; gap: 4px; background: #F1F7F4; }
html body .ftour.kpf .kpf-tab { min-height: 58px; gap: 10px; padding: 11px 10px; border-radius: 8px; }
html body .ftour.kpf .kpf-tab[aria-pressed="true"] { box-shadow: 0 1px 3px rgba(12, 31, 28, .09); }
html body .ftour.kpf .kpf-tab-text b { font-size: 14px !important; line-height: 1.4; }
html body .ftour.kpf .kpf-n { width: 26px; height: 26px; font-size: 13px !important; }
html body .ftour.kpf .kpf-panel { padding: 26px 32px 24px; scroll-padding-block: 20px; overscroll-behavior: contain; scrollbar-width: thin; }
html body .ftour.kpf .kpf-panel h2 { font-size: 30px !important; font-weight: 500; line-height: 1.15; text-wrap: pretty; }
html body .ftour.kpf .kpf-lead { max-width: 76ch; margin-top: 12px; font-size: 16px !important; line-height: 1.55; text-wrap: pretty; }
html body .ftour.kpf .kpf-list { margin-top: 20px; }
html body .ftour.kpf .kpf-row { grid-template-columns: minmax(170px, 25%) minmax(0, 1fr); gap: 24px; padding: 12px 0; }
html body .ftour.kpf .kpf-name { font-size: 15px !important; line-height: 1.4; }
html body .ftour.kpf .kpf-what { font-size: 15px !important; line-height: 1.5; }
html body .ftour.kpf .kpf-links { margin-top: 20px; gap: 8px; }
html body .ftour.kpf .kpf-link { font-size: 13px !important; min-height: 44px; padding: 10px 14px; line-height: 1.35; }
html body .ftour.kpf .kpf-controls { padding: 10px 20px; gap: 8px; }
html body .ftour.kpf .kpf-controls .btn { min-height: 44px; padding: 8px 18px; border-radius: 8px; font-size: 13px !important; font-weight: 600; line-height: 1.25; }
html body .ftour.kpf .kpf-controls .btn.primary { min-width: 86px; }
html body .ftour.kpf .kpf-progress { font-size: 13px !important; font-weight: 500; color: #48635C; font-variant-numeric: tabular-nums; }
html body .ftour.kpf .kpf-open { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 32px 40px; }
html body .ftour.kpf .kpf-open h2 { max-width: 20em; font-size: clamp(32px, 3.15vw, 42px) !important; line-height: 1.12; letter-spacing: -.015em; }
html body .ftour.kpf .kpf-open .kpf-lead { max-width: 47ch; margin-top: 24px; font-size: 17px !important; line-height: 1.6; }
html body .ftour.kpf .kpf-jump { grid-template-columns: 36px minmax(0, 1fr) 10px; gap: 14px; padding: 12px 10px; min-height: 72px; border-radius: 8px; }
html body .ftour.kpf .kpf-jump::after { content: ""; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); color: #0a6b55; }
html body .ftour.kpf .kpf-jn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #E8F3EE; font-size: 24px !important; }
html body .ftour.kpf .kpf-jt b { font-size: 16px !important; line-height: 1.35; }
html body .ftour.kpf .kpf-jt span { margin-top: 4px; font-size: 14px !important; line-height: 1.4; color: #48635C; }
html body .ftour.kpf :is(button, a):focus-visible { outline: 2px solid #0a6b55; outline-offset: 3px; }
html body .ftour.kpf .kpf-head :focus-visible { outline-color: #fff; }
html body .ftour.kpf .kpf-link:hover { background: #E8F3EE; border-color: #0a6b55; }
@media (min-width: 761px) and (max-height: 800px) {
  html body .ftour.kpf .kpf-panel { padding: 20px 28px; }
  html body .ftour.kpf .kpf-panel h2 { font-size: 28px !important; }
  html body .ftour.kpf .kpf-list { margin-top: 16px; }
  html body .ftour.kpf .kpf-row { padding-block: 8px; }
  html body .ftour.kpf .kpf-links { margin-top: 16px; }
  html body .ftour.kpf .kpf-open { padding: 24px 36px; }
  html body .ftour.kpf .kpf-open h2 { font-size: clamp(30px, 3.15vw, 40px) !important; }
}
@media (min-width: 761px) and (max-width: 1024px) {
  html body .ftour.kpf { width: calc(100vw - 32px) !important; height: calc(100vh - 32px); height: calc(100dvh - 32px); }
  html body .ftour.kpf .kpf-tabs { width: 220px; padding: 12px 8px; }
  html body .ftour.kpf .kpf-panel { padding: 22px 24px; }
  html body .ftour.kpf .kpf-row { grid-template-columns: minmax(130px, 31%) minmax(0, 1fr); gap: 16px; }
  html body .ftour.kpf .kpf-open { gap: 24px; padding: 28px; }
  html body .ftour.kpf .kpf-open h2 { font-size: 32px !important; }
}
@media (max-width: 760px) {
  html body .ftour.kpf { inset: 0 !important; margin: 0 !important; width: 100% !important; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
  html body .ftour.kpf .kpf-head { padding: 8px 12px 8px 20px; font-size: 22px !important; }
  html body .ftour.kpf .kpf-tabs { width: 100%; padding: 8px 12px; gap: 6px; flex-direction: row; border-right: 0; border-bottom: 1px solid #C9D8D3; }
  html body .ftour.kpf .kpf-tab { flex: 1 0 44px; min-height: 44px; padding: 6px; justify-content: center; }
  html body .ftour.kpf .kpf-panel { padding: 22px 20px; }
  html body .ftour.kpf .kpf-panel h2 { font-size: 26px !important; }
  html body .ftour.kpf .kpf-row { display: block; padding: 12px 0; }
  html body .ftour.kpf .kpf-what { margin-top: 4px; }
  html body .ftour.kpf .kpf-open { display: block; padding: 28px 20px; }
  html body .ftour.kpf .kpf-open h2 { font-size: 32px !important; }
  html body .ftour.kpf .kpf-open .kpf-lead { font-size: 16px !important; margin-top: 16px; }
  html body .ftour.kpf .kpf-index { margin-top: 28px; }
  html body .ftour.kpf .kpf-jump { min-height: 84px; }
  html body .ftour.kpf .kpf-controls { padding: 10px 12px; }
  html body .ftour.kpf .kpf-controls .btn { padding-inline: 12px; }
}
@media (max-width: 420px) {
  html body .ftour.kpf .kpf-progress { flex: 1 0 100%; }
  html body .ftour.kpf .kpf-controls { justify-content: flex-end; }
}
@media (forced-colors: active) {
  html body .ftour.kpf .kpf-tab[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  html body .ftour.kpf .kpf-controls .btn.primary { border: 2px solid ButtonText; }
}

