/* FounderWise Studios flow marker system (17 Oct 2026). Built from the approved Phase 1 mockups
   (UX-Review-2026-10-17-flows/phase1-mockups/css/flow.css); the mockup-only specimen and index rules are left out.
   Loads AFTER /mvp/app.css (and /gtm/gtm.css on GTM pages). Every class starts with fm-.
   Rules kept: lime only for the one primary button per screen and for done states;
   no colored side rails; ink #0D0D0D; status always written in words, never color alone. */

/* ---------- Header: brand, Studio switcher, nav ---------- */
.fm-top { flex-wrap: wrap; row-gap: 0; }
.fm-top .fm-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
/* Studio switcher: the app's .pw-seg, made compact for a header */
.fm-switch { display: inline-grid; grid-auto-flow: column; border: 2px solid var(--line2); border-radius: 10px; overflow: hidden; flex: none; }
.fm-switch a { display: flex; align-items: center; min-height: 34px; padding: 0 12px; font: 700 13px/1 var(--font); color: var(--ink2); background: var(--card); border: 0; }
.fm-switch a:hover { background: #FBFDF3; }
.fm-switch a[aria-current="true"] { background: var(--ink); color: #fff; }
.fm-switch a small { font-weight: 500; color: var(--faint); margin-left: 6px; }
.fm-switch a[aria-current="true"] small { color: #BBBBBB; }
/* nav: scroll fade on the right edge so a cut word reads as "more" */
.fm-nav { position: relative; min-width: 0; }
@media (max-width: 640px) {
  .fm-top { padding-bottom: 0; }
  .fm-top .fm-nav { flex: 1 0 100%; order: 3; margin: 6px -16px 0; padding: 0 16px; }
  .fm-top .fm-nav nav { gap: 18px; }
  .fm-nav.fm-fade nav { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .fm-top .brand small { display: none; }
}

/* ---------- Section labels on the dashboard: Now / Your journey / Your tools ---------- */
.fm-sec { font: 700 11px/1 var(--mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; display: flex; align-items: center; gap: 10px; }
.fm-sec::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.fm-sec:first-child { margin-top: 6px; }

/* ---------- Journey rail (12 stages) ---------- */
.fm-rail { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 12px; margin: 0 0 14px; }
.fm-railhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fm-railhead .fm-pos { font-size: 14.5px; color: var(--ink2); }
.fm-railhead .fm-pos b { color: var(--ink); }
.fm-railhead a { font-size: 13.5px; }
.fm-phases, .fm-cells { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.fm-phases { margin-bottom: 4px; }
.fm-phases span { font: 700 9.5px/1.2 var(--mono); letter-spacing: .6px; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line2); padding-top: 4px; white-space: nowrap; overflow: hidden; }
.fm-cell { display: flex; flex-direction: column; gap: 3px; min-height: 64px; padding: 6px 5px; border-radius: 8px; border: 1px solid transparent; color: var(--ink); text-decoration: none; position: relative; min-width: 0; }
a.fm-cell:hover { background: #FBFDF3; }
.fm-cell .fm-n { font: 700 12px/1 var(--mono); display: flex; align-items: center; gap: 3px; }
.fm-cell .fm-l { font-size: 11.5px; line-height: 1.2; overflow-wrap: normal; word-break: normal; }
/* Desktop: the rail breaks out of the 680px reading column so every short name fits on its cell */
@media (min-width: 1000px) { .fm-rail { margin-left: -146px; margin-right: -146px; padding: 16px 18px 14px; } }
/* Narrow tablets: numbers and glyphs only, the names would break mid-word */
@media (min-width: 641px) and (max-width: 999px) { .fm-cell .fm-l { display: none; } .fm-cell { min-height: 40px; } }
.fm-cell .fm-g { width: 10px; height: 10px; flex: none; }
/* done: lime */
.fm-cell.fm-done { background: var(--lime); }
a.fm-cell.fm-done:hover { background: var(--lime); box-shadow: inset 0 0 0 2px var(--ink); }
/* current: ink with a lime number */
.fm-cell.fm-now { background: var(--ink); color: #fff; }
.fm-cell.fm-now .fm-n { color: var(--lime); }
a.fm-cell.fm-now:hover { background: #222; }
/* locked: paper with a lock glyph */
.fm-cell.fm-locked { background: var(--bg); border-color: var(--line2); color: var(--muted); }
/* skipped by verdict: hatched and struck */
.fm-cell.fm-skip { background: repeating-linear-gradient(45deg, #fff, #fff 4px, var(--line) 4px, var(--line) 6px); border-color: var(--line2); color: var(--muted); }
.fm-cell.fm-skip .fm-l, .fm-cell.fm-skip .fm-n { text-decoration: line-through; }
/* the stage being previewed (not the current one) */
.fm-cell.fm-view { box-shadow: inset 0 0 0 2px var(--ink); }
.fm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.fm-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.fm-legend .d { background: var(--lime); } .fm-legend .c { background: var(--ink); } .fm-legend .l { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line2); }
.fm-legend .s { background: repeating-linear-gradient(45deg, #fff, #fff 2px, var(--line2) 2px, var(--line2) 3px); box-shadow: inset 0 0 0 1px var(--line2); }

/* compact strip: the phone version of the rail. Not tappable; one button opens the full list. */
.fm-strip { display: none; }
.fm-strip .fm-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; margin: 8px 0 10px; }
.fm-strip .fm-bars i { height: 10px; border-radius: 3px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line2); }
.fm-strip .fm-bars i.d { background: var(--lime); box-shadow: none; }
.fm-strip .fm-bars i.c { background: var(--ink); box-shadow: none; height: 14px; margin-top: -2px; }
.fm-strip .fm-bars i.s { background: repeating-linear-gradient(45deg, #fff, #fff 2px, var(--line2) 2px, var(--line2) 3px); }
.fm-strip .fm-nums { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; font: 700 9.5px/1 var(--mono); color: var(--muted); text-align: center; margin-top: -6px; margin-bottom: 10px; }
.fm-strip .fm-nums b { color: var(--ink); }
.fm-strip .fm-bars i.v { box-shadow: inset 0 0 0 2px var(--ink); height: 14px; margin-top: -2px; }
.fm-strip .fm-nums b.v { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 640px) {
  .fm-rail .fm-phases, .fm-rail .fm-cells, .fm-rail .fm-legend { display: none; }
  .fm-rail .fm-strip { display: block; }
  .fm-railhead .fm-pos { font-size: 14px; }
}

/* ---------- Lock card (from .chip.ghost + .btn) ---------- */
.fm-lock { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px; margin: 0 0 14px; }
.fm-lock .chip { display: inline-flex; align-items: center; gap: 6px; }
.fm-lock p { margin: 10px 0 14px; font-size: 16px; }
.fm-lock p b { display: block; font-size: 19px; letter-spacing: -.3px; margin-bottom: 4px; }

/* ---------- Preview: a later stage shown read only, never savable ---------- */
.fm-preview { border: 1px dashed var(--line2); border-radius: var(--radius); padding: 18px; background: #FBFAF6; }
.fm-preview .opt { cursor: default; }
.fm-preview .fm-endnote { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }

/* ---------- One-line strips (folded meters) ---------- */
.fm-strips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.fm-strips .fold { margin: 0; }
.fm-strips .fold > summary { padding: 12px 14px; min-height: 52px; }
.fm-strips .fold > summary b { font-size: 15px; }
.fm-meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 4px 0 2px; }
.fm-meter i { display: block; height: 100%; background: var(--ink); }
@media (max-width: 560px) { .fm-strips { grid-template-columns: 1fr; gap: 8px; } }
/* On phones "Do this next" comes first, the strips under it */
.fm-now { display: flex; flex-direction: column; }
@media (max-width: 640px) { .fm-now .next { order: 1; } .fm-now .fm-strips { order: 2; } }

/* ---------- Tool rows: ghost buttons with a short status ---------- */
.fm-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.fm-tool.btn.ghost { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 66px; padding: 10px 14px; text-align: left; background: var(--card); }
.fm-tool.btn.ghost:hover { background: #FBFDF3; }
.fm-tool span { font-weight: 500; font-size: 13px; color: var(--muted); }
.fm-tool.fm-paused { color: var(--ink2); background: var(--bg); border-style: dashed; }
.fm-tool.fm-paused span { color: var(--ink2); font-weight: 600; }
@media (max-width: 640px) { .fm-tools { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Verdict confirmation (stage 12 after saving) ---------- */
.fm-verdict { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 14px; }
.fm-verdict h2 { font-size: 28px; margin: 10px 0 4px; letter-spacing: -.6px; }
.fm-rules { background: #FAF8F2; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.fm-rules .fm-rh { font: 700 11px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.fm-rules dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; }
.fm-rules dt { color: var(--muted); }
.fm-rules dd { margin: 0; font-weight: 600; }
.fm-rules .fm-says { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; }
.fm-scale { position: relative; height: 34px; margin: 12px 0 4px; }
.fm-scale .tr { position: absolute; left: 0; right: 0; top: 12px; height: 10px; border-radius: 5px; background: var(--line); }
.fm-scale .mid { position: absolute; top: 12px; height: 10px; background: var(--amber-bg); }
.fm-scale .tick { position: absolute; top: 4px; width: 2px; height: 26px; background: var(--ink2); }
.fm-scale .you { position: absolute; top: 7px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ink); }
.fm-scale-l { position: relative; height: 18px; font-size: 12.5px; color: var(--muted); }
.fm-scale-l span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.fm-scale-l span:first-child { transform: none; } .fm-scale-l span:last-child { transform: translateX(-100%); }
.fm-scale-l .you-l { color: var(--ink); font-weight: 700; }
.fm-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 4px; }

/* ---------- GTM loop strip ---------- */
.fm-posline { font: 700 12.5px var(--mono); letter-spacing: .4px; color: var(--ink2); margin: -2px 0 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.fm-posline span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; }
.fm-loop { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.fm-loop li { background: #fff; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.fm-loop a { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 0; color: var(--ink); height: 100%; }
.fm-loop a:hover { background: #FBFDF3; border-radius: 12px; }
.fm-loop .k { font: 700 11px var(--mono); color: var(--muted); }
.fm-loop .t { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.fm-loop .m { font-size: 13px; color: var(--ink2); }
.fm-loop .s { align-self: flex-start; font: 700 10.5px var(--mono); letter-spacing: .8px; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; margin-top: auto; white-space: nowrap; }
.fm-loop .done .s { background: var(--green-bg); color: var(--green); }
.fm-loop .due .s { background: var(--ink); color: #fff; }
.fm-loop .over { border-color: var(--red); }
.fm-loop .over .s { background: var(--red-bg); color: var(--red); }
.fm-loop .later .s { color: var(--muted); border: 1px solid var(--line2); }
.fm-loopnote { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
@media (max-width: 640px) {
  .fm-loop { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
  .fm-loop li { border: 0; border-radius: 0; }
  .fm-loop li + li { border-top: 1px solid var(--line); }
  .fm-loop li.over { border-color: var(--line); }
  .fm-loop a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "k t s" "k m s"; column-gap: 10px; row-gap: 2px; align-items: center; padding: 10px 14px; min-height: 56px; }
  .fm-loop .k { grid-area: k; } .fm-loop .t { grid-area: t; } .fm-loop .m { grid-area: m; } .fm-loop .s { grid-area: s; margin: 0; align-self: center; }
}

/* ---------- Handoff card (MVP to GTM) ---------- */
.fm-hand { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px; margin: 0 0 14px; }
.fm-hand h2 { font-size: 22px; letter-spacing: -.4px; margin: 10px 0 6px; }
.fm-hand p { color: var(--ink2); font-size: 15px; margin: 0 0 12px; }
.fm-hand .fm-actions { margin-top: 14px; }
.fm-hand .fm-small { font-size: 13.5px; color: var(--muted); margin: 12px 0 0; }
.fm-hand .fm-strip { display: block; }

/* ---------- Programs ---------- */
.fm-proghead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fm-proghead h1 { margin: 6px 0 0; }
.fm-ready { font-weight: 700; }
.fm-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.fm-table th { text-align: left; font: 700 11px var(--mono); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line2); }
.fm-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.fm-table tr.fm-hl td { background: #FBFDF3; }
.fm-table td small { display: block; color: var(--muted); font-size: 13px; }
.fm-table .chip { text-transform: none; font-family: var(--font); letter-spacing: 0; font-size: 12px; white-space: nowrap; }
@media (max-width: 640px) {
  .fm-table thead { display: none; }
  .fm-table, .fm-table tbody, .fm-table tr, .fm-table td { display: block; width: 100%; }
  .fm-table tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 6px 4px; background: #fff; }
  .fm-table td { border: 0; padding: 4px 10px; }
  .fm-table td[data-l]::before { content: attr(data-l); display: block; font: 700 10px var(--mono); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
}

/* GTM pages do not load dash.css, so the dashboard's one-line .fold strip is repeated here as .fm-fold (same values). */
.fm-fold { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.fm-fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px; min-height: 56px; }
.fm-fold > summary::-webkit-details-marker { display: none; }
.fm-fold > summary b { font-size: 16px; } .fm-fold > summary .st { font-size: 13px; color: var(--muted); text-align: right; margin-left: auto; }
.fm-fold > summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--ink2); border-bottom: 2px solid var(--ink2); transform: rotate(45deg); margin: -4px 2px 0 0; }
.fm-fold[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.fm-fold > .in { padding: 0 16px 16px; }

/* ---------- Added in the build (17 Oct 2026), same tokens as the mockups ---------- */
/* open: a later stage that is reachable without being current (stage 12 from launch day). No lock glyph. */
.fm-cell.fm-open { background: var(--card); border-color: var(--line2); color: var(--ink2); }
/* "See all 12 stages" on phones: the strip's one button opens the full list in place. */
.fm-all { margin: 0; }
.fm-all > summary { list-style: none; cursor: pointer; }
.fm-all > summary::-webkit-details-marker { display: none; }
.fm-list { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--line); }
.fm-list li a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 2px; border-bottom: 1px solid var(--line); color: var(--ink); }
.fm-list .n { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font: 700 13px var(--mono); background: var(--bg); }
.fm-list .t { flex: 1; min-width: 0; font-size: 15px; }
.fm-list .s { flex: none; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.fm-list .fm-done .n { background: var(--lime); } .fm-list .fm-now .n { background: var(--ink); color: var(--lime); } .fm-list .fm-now .s { color: var(--ink); }
.fm-list .fm-skip .t { text-decoration: line-through; color: var(--muted); }
/* The verdict confirmation reuses .fm-verdict; its saved answers fold under it. */
.fm-preview h1 { margin-top: 12px; }
.fm-preview .bar { display: none; }
/* Programs MVP / GTM toggle: the .pw-seg look on links (each view is its own page). */
.fm-proghead .pw-seg a { display: flex; align-items: center; min-height: 44px; padding: 0 16px; font: 600 14.5px/1 var(--font); border: 0; background: var(--card); color: var(--ink2); }
.fm-proghead .pw-seg a[aria-current="page"] { background: var(--ink); color: #fff; }
/* Join: where the magic-link round trip leaves the founder (finding 14). */
.fm-joinsteps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 4px 0 14px; font-size: 13.5px; color: var(--muted); }
.fm-joinsteps li { display: inline-flex; align-items: center; gap: 6px; }
.fm-joinsteps b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font: 700 12px var(--mono); background: var(--card); box-shadow: inset 0 0 0 1px var(--line2); color: var(--ink2); }
.fm-joinsteps li[aria-current="step"] { color: var(--ink); font-weight: 700; }
.fm-joinsteps li[aria-current="step"] b { background: var(--ink); color: var(--lime); box-shadow: none; }
.center .fm-joinsteps { justify-content: center; }
/* Advisory, never blocking (17 Oct 2026 review): a stage ahead of the current one opens and saves
   like any other. Its cell is quiet paper with no lock glyph; the page carries one quiet note. */
.fm-cell.fm-ahead { background: var(--bg); border-color: var(--line2); color: var(--ink2); }
.fm-ahead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14.5px; color: var(--ink2); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; }
