/* ============================================================
   Factors section — "what the Proprietary Algorithm weighs"
   Ported from the Factors handoff. Colour comes from v3 tokens
   rather than the hardcoded hexes in the source, so nivio-v3-compat.css
   stays the single source of truth.
   ============================================================ */
.fx{padding:96px 0;position:relative;overflow:hidden;background:var(--bg)}
/* 1060px lands the headline on three rows at desktop; the 34ch cap that used
   to govern is dropped so the head width is the single control. The lede
   keeps its own narrower measure so it stays readable. */
.fx-head{display:flex;flex-direction:column;gap:18px;max-width:1060px}
.fx-head h2{margin:0;font-size:2.375rem;line-height:1.15;letter-spacing:-.02em;color:var(--ink);text-wrap:balance;font-weight:600}
/* raised with the board header — see the note in board.css. Two steps: 2.75rem
   from 769, and the v3 H1 size from 1240 where the three-row break fits. */
@media(min-width:769px){ .fx-head h2{font-size:2.75rem} }
@media(min-width:1240px){ .fx-head h2{font-size:3.5rem;line-height:1.09} }
/* the breaks here are set in markup, so balance must stay off */
.fx-head h2{text-wrap:nowrap}
@media(max-width:768px){ .fx-head h2{text-wrap:wrap} }
.fx-head h2 .sig{color:var(--signal)}
.fx-head p{margin:0;font-size:19px;line-height:1.55;color:var(--ink4);max-width:62ch;text-wrap:pretty}

/* ---- group nav: eight bars per segment, name centred above ---- */
.fx-nav{display:flex;align-items:flex-end;gap:20px;margin-top:56px}
.fx-nav button{appearance:none;background:transparent;border:0;padding:0;cursor:pointer;
  flex:1 1 0;display:flex;flex-direction:column;gap:12px;align-items:center;text-align:center}
.fx-nav .lb{font-weight:500;font-size:18px;line-height:1.2;letter-spacing:-.012em;
  white-space:nowrap;color:var(--ink4);transition:color 220ms cubic-bezier(.2,0,0,1)}
.fx-nav button[aria-selected="true"] .lb{color:var(--signal)}
.fx-nav .bars{display:flex;gap:0;width:100%;height:10px;align-items:flex-end}
.fx-nav .bars i{flex:1;height:5px;background:rgba(242,240,233,.14);
  transition:background 220ms cubic-bezier(.2,0,0,1),height 220ms cubic-bezier(.2,0,0,1)}
.fx-nav button[aria-selected="true"] .bars i{height:10px;background:var(--signal)}
.fx-nav button:focus-visible{outline:2px solid var(--signal);outline-offset:4px}

/* ---- 3D stage ---- */
.fx-stage{position:relative;margin-top:32px;perspective:1700px;perspective-origin:50% 45%;
  touch-action:pan-y;cursor:grab;outline:none;user-select:none}
.fx-stage.dragging{cursor:grabbing}
.fx-stage:focus-visible{outline:2px solid var(--signal);outline-offset:6px}
.fx-card{position:absolute;top:0;left:50%;box-sizing:border-box;transform-style:preserve-3d;
  border:1px solid rgba(242,240,233,.10);border-radius:4px;display:flex;flex-direction:column;
  justify-content:space-between;gap:22px;background:var(--nv-graphite,#222523);overflow:hidden}
.fx-card.on{background:var(--bg3);border-color:rgba(242,240,233,.18)}
.fx-card.hov{border-color:rgba(215,232,74,.25)}
.fx-inner{flex:0 0 auto;display:flex;flex-direction:column;gap:24px;
  transition:opacity 220ms cubic-bezier(.2,0,0,1)}
.fx-eyebrow{font-family:var(--mono,'Geist Mono',monospace);font-weight:500;font-size:11px;
  letter-spacing:.15em;text-transform:uppercase;color:var(--ink3)}
.fx-card.on .fx-eyebrow{color:var(--ink)}
.fx-top{display:flex;align-items:flex-start;gap:26px}
.fx-idx{font-weight:600;font-size:42px;line-height:1;letter-spacing:-.025em;
  font-variant-numeric:tabular-nums;color:var(--ink4);flex-shrink:0;
  font-family:var(--mono,'Geist Mono',monospace)}
.fx-card.on .fx-idx{color:var(--ink)}
.fx-card h3{margin:0;font-size:26px;font-weight:600;letter-spacing:-.02em;line-height:1.2;color:var(--ink)}
.fx-body{margin:12px 0 0;font-size:16px;line-height:1.65;color:var(--ink3)}
.fx-chips{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px}
.fx-chip{display:inline-flex;align-items:center;gap:7px;border:1px solid rgba(242,240,233,.22);
  border-radius:3px;padding:8px 14px;font-size:13px;color:var(--ink);background:transparent;
  transition:border-color 120ms ease-out,opacity 220ms cubic-bezier(.2,0,0,1),transform 220ms cubic-bezier(.2,0,0,1)}
.fx-chip.rule{background:var(--slate,#3A3D3B);border-color:rgba(242,240,233,.10);padding-left:8px}
.fx-chip:hover{border-color:rgba(215,232,74,.45)}
/* the walker: one chip at a time on the active card, so the eye is led
   through what the solver weighs rather than facing 10 chips at once */
/* Third Signal area in this section, at the client's direction: the headline
   clause, the active nav, and the constraint the walker is pointing at. */
.fx-chip.lit{color:var(--signal);border-color:rgba(215,232,74,.55);background:rgba(215,232,74,.10)}
/* The H / M / S tier badge and its legend were removed at the client's call
   — solver vocabulary on a page written for dispatchers. Their rules went
   with them rather than being left to rot; the note about Steel failing at
   4.25:1 on the Slate chip fill is kept here because that pairing will come
   back the next time someone puts small text on a chip. */
.fx-foot{flex:0 0 auto;border-top:1px solid rgba(242,240,233,.10);padding-top:20px;margin-top:8px;
  font-family:var(--mono,'Geist Mono',monospace);font-size:11.5px;line-height:1.5;color:var(--ink)}
.fx-foot .k{color:var(--ink4);margin-right:8px}
.fx-arrows{display:none;justify-content:center;gap:12px;margin-top:20px}
.fx-arrows button{appearance:none;background:transparent;color:var(--ink);cursor:pointer;
  border:1px solid rgba(242,240,233,.22);border-radius:3px;width:44px;height:36px;font-size:15px}
.fx-arrows button:hover{border-color:var(--signal)}

@media(max-width:700px){
  .fx{padding:64px 0}
  .fx-nav{flex-wrap:wrap;gap:16px 20px}
  .fx-nav button{flex:0 0 auto}
  .fx-nav .lb{font-size:15px}
  .fx-arrows{display:flex}
  .fx-stage{cursor:default;overflow-x:clip}
  .fx-chip{max-width:100%;word-break:break-word}
}
@media(max-width:560px){
  .fx-top{flex-direction:column;gap:10px}
  .fx-idx{font-size:28px}
}
@media(prefers-reduced-motion:reduce){
  .fx-card,.fx-inner,.fx-chip,.fx-nav .lb,.fx-nav .bars i{transition-duration:0ms !important}
}

@media(max-width:768px){
  .fx-head h2{font-size:1.6875rem}
}
