/* /fiscal-contabil — padrão r2 (texto | motion, alternando) igual à Início.
   Motions mv próprios (prefixo fc-), inspirados nas funções reais: duas trilhas (hero), conferência de notas,
   apuração, SERPRO/e-CAC, Saúde Fiscal, conciliação bancária, revisão e sign-off.
   Estados ocultos só com .sx.is-armed (JS); movimento reduzido: estado final. */

/* ---------- Hero: texto | motion ---------- */
.fc-hero{padding-block:clamp(40px,5vw,88px) var(--space-section)}
.fc-hg{display:grid;grid-template-columns:minmax(0,1fr);gap:40px;align-items:center}
.fc-hcopy{display:flex;flex-direction:column;align-items:flex-start;gap:24px;min-width:0}
.fc-hcopy > *{margin:0}
.fc-hcopy .lead{max-width:42ch}
.fc-hg > .sx{max-width:620px;width:100%}
@media (min-width:1100px){
  .fc-hg{grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:clamp(56px,6vw,96px)}
  .fc-h1{font-size:clamp(2.4rem,1.3rem + 2vw,3.3rem);line-height:1.06;max-width:17ch}
  .fc-hg > .sx{justify-self:end}
}
@media (max-width:720px){.fc-hg{gap:36px}.fc-hcopy{gap:20px}.fc-h1{font-size:min(2.2rem,var(--fs-display))}}

/* ---------- peças comuns ---------- */
.fc-tw,.fc-nt,.fc-ap,.fc-ec,.fc-sc,.fc-cc,.fc-so{background:#fff;border:1px solid var(--sx-line);border-radius:18px;padding:20px}
.fc-av{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--sx-blue-b);color:var(--sx-blue-t);font-size:12px;font-weight:600;flex:none}
.sx :is(.fc-nt-h,.fc-ap-h,.fc-ec-h,.fc-sc-h,.fc-cc-h,.fc-so-h) .mv-tt small{font-weight:500;color:var(--sx-blue-t)}
.sx :is(.fc-nt-h,.fc-ap-h,.fc-ec-h,.fc-sc-h,.fc-cc-h,.fc-so-h){display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid var(--sx-line)}

/* ---------- 1 · Hero: um documento, duas trilhas ---------- */
.fc-tw-a,.fc-tw-b{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;background:var(--paper)}
.fc-tw-b{background:var(--sx-ok-b);transition:opacity .4s var(--sx-ease),transform .4s var(--sx-ease)}
.fc-tw-fork{position:relative;height:26px}
.fc-tw-fork i{position:absolute;left:25%;right:25%;top:50%;height:13px;border:2px solid var(--sx-line2);border-bottom:0;border-radius:10px 10px 0 0}
.fc-tw-fork::before{content:"";position:absolute;left:50%;top:0;height:50%;width:2px;margin-left:-1px;background:var(--sx-line2)}
.fc-tw-fork.j i{top:0;border-top:0;border-bottom:2px solid var(--sx-line2);border-radius:0 0 10px 10px}
.fc-tw-fork.j::before{top:50%}
.fc-tw-l{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.fc-ln{border:1px solid var(--sx-line);border-radius:14px;padding:12px 14px}
.fc-ln > p{font-family:var(--f-brand);font-weight:500;font-size:14px;margin-bottom:8px}
.fc-ln ol{display:flex;flex-direction:column;gap:8px}
.fc-ln li{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--sx-ink3);transition:color .3s}
.fc-ln li i{width:22px;height:22px;border-radius:50%;box-shadow:inset 0 0 0 2px var(--sx-line2);display:grid;place-items:center;color:transparent;flex:none;transition:background .3s,box-shadow .3s,color .3s}
.fc-ln li i svg{width:12px;height:12px}
.fc-ln li.in{color:var(--ink)}
.fc-ln li.in i{background:var(--sx-ok);box-shadow:none;color:#fff}
.sx:not(.is-armed) .fc-ln li{color:var(--ink)}
.sx:not(.is-armed) .fc-ln li i{background:var(--sx-ok);box-shadow:none;color:#fff}

/* ---------- 2 · Conferência de notas ---------- */
.fc-nt-c{font-size:12.5px;color:var(--sx-ink3);white-space:nowrap}
.fc-nt-c b{font-family:var(--f-brand);font-weight:500;font-size:18px;color:var(--ink);margin-right:2px;font-variant-numeric:tabular-nums}
.fc-nt-l li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:9px 10px;border-radius:10px;transition:background .3s}
.fc-nt-l li + li{border-top:1px solid var(--sx-line)}
.fc-nt-l li.is-hi{background:var(--sx-blue-b)}
.fc-nt-l li.is-x{background:var(--sx-al-b)}
.fc-nt-why{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;margin-top:12px;padding:12px 14px;border-radius:12px;border:1px dashed rgba(29,29,31,.2);font-size:13px;color:var(--sx-ink2)}
.fc-nt-why b{color:var(--ink);font-weight:500}
.fc-cf-a{color:var(--sx-al-t)}
.fc-cf-b{color:var(--sx-ok-t);font-weight:500}
.fc-nt-who{display:inline-flex;align-items:center;gap:8px;font-size:12.5px}

/* ---------- 3 · Apuração ---------- */
.fc-ap-due{display:flex;flex-direction:column;align-items:center;padding:6px 12px;border-radius:10px;background:var(--sx-warn-b);line-height:1.15}
.fc-ap-due b{font-family:var(--f-brand);font-weight:500;font-size:16px;color:var(--sx-warn-t)}
.fc-ap-due span{font-size:12px;color:var(--sx-warn-t)}
.fc-ap-d{display:flex;flex-direction:column;gap:6px}
.fc-ap-d li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;font-size:13.5px}
.fc-ap-d li i{width:22px;height:22px;border-radius:50%;background:var(--sx-ok);color:#fff;display:grid;place-items:center;transition:background .3s,box-shadow .3s,color .3s}
.fc-ap-d li i svg{width:12px;height:12px}
.fc-ap-d li[data-wait]:not(.is-ok) i{background:#fff;box-shadow:inset 0 0 0 2px var(--sx-warn);color:transparent}
.fc-ap-v{margin:16px 0 14px;padding:14px 16px;border-radius:14px;background:var(--paper);transition:opacity .4s}
.sx.is-armed .fc-ap-v:not(.in){opacity:.4}
.fc-ap-r{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.fc-ap-r li{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;border:1px solid var(--sx-line);font-size:12.5px;color:var(--sx-ink3);transition:border-color .3s,background .3s,opacity .3s}
.fc-ap-r li > span:last-child{display:flex;flex-direction:column;min-width:0}
.fc-ap-r li b{font-size:13.5px;color:var(--ink);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sx.is-armed .fc-ap-r li:not(.on){opacity:.5}
.fc-ap-r li.on{border-color:rgba(52,199,89,.5);background:var(--sx-ok-b)}

/* ---------- 4 · SERPRO / e-CAC: varredura ---------- */
.fc-ec-w{position:relative}
.fc-ec-l li{height:60px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:0 10px;border-top:1px solid var(--sx-line)}
.fc-ec-l li:first-child{border-top:0}
.fc-ec-l li .sx-badge{transition:opacity .3s,background .25s,color .25s}
.sx.is-armed .fc-ec-l li:not(.in) .sx-badge{opacity:0}
.fc-ec-scan{position:absolute;left:0;right:0;top:0;height:60px;border-radius:12px;background:var(--sx-blue-b);box-shadow:inset 3px 0 0 var(--sx-blue);opacity:0;transform:translateY(calc(var(--i,0) * 60px));transition:transform .45s var(--sx-ease),opacity .3s;pointer-events:none}
.fc-ec-scan.on{opacity:1}
.fc-ec-f{margin-top:12px;padding:12px 14px;border-radius:12px;background:var(--paper);font-size:13px;color:var(--sx-ink2)}
.fc-ec-f b{font-family:var(--f-brand);font-weight:500;font-size:15px;color:var(--ink)}

/* ---------- 5 · Score Fiscal: régua ---------- */
.fc-sc-avg{display:flex;align-items:baseline;gap:6px;font-size:12.5px;color:var(--sx-ink3)}
.fc-sc-avg b{font-family:var(--f-brand);font-weight:400;font-size:30px;color:var(--ink);letter-spacing:-.02em}
.fc-sc-t{padding:8px 0 4px}
.fc-sc-mk{position:relative;height:74px;container-type:inline-size}
.fc-sc-mk .fc-mk{position:absolute;left:0;top:calc(var(--row) * 34px);width:32px;height:28px;border-radius:9px;background:#fff;border:1px solid var(--sx-line2);display:grid;place-items:center;font-size:12px;font-weight:600;color:var(--sx-ink2);transform:translateX(calc(var(--s) * 1cqw - 50%));transition:transform .9s var(--sx-ease),opacity .4s,background .3s,color .3s,border-color .3s}
.fc-sc-mk .fc-mk::after{content:"";position:absolute;left:50%;top:100%;width:1px;height:calc(46px - var(--row) * 34px - 28px + 28px);background:var(--sx-line2)}
.sx.is-armed .fc-sc-mk:not(.in) .fc-mk{opacity:0}
.fc-mk.on{background:var(--ink);border-color:var(--ink);color:#fff}
.fc-sc-bar{display:flex;height:12px;border-radius:999px;overflow:hidden;gap:2px}
.fc-sc-bar i.cr{background:#C7C7CC}.fc-sc-bar i.ri{background:var(--sx-al)}.fc-sc-bar i.at{background:var(--sx-warn)}.fc-sc-bar i.bo{background:#7FB8FF}.fc-sc-bar i.ex{background:var(--sx-ok)}
.fc-sc-bl{display:flex;gap:2px;margin-top:8px;font-size:12px;color:var(--sx-ink3)}
.fc-sc-bl span{min-width:0;white-space:nowrap}
.fc-sc-d{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;margin-top:16px;padding:14px 16px;border-radius:14px;background:var(--paper)}
.fc-sc-n{display:flex;align-items:baseline;gap:2px;font-size:12.5px;color:var(--sx-ink3)}
.fc-sc-n b{font-family:var(--f-brand);font-weight:400;font-size:30px;line-height:1;color:var(--ink);font-variant-numeric:tabular-nums}
.fc-sc-d .mv-tt span{white-space:normal}

/* ---------- 6 · Conciliação: as duas peças se juntam ---------- */
.fc-cc-n{font-size:12.5px;color:var(--sx-ink3);white-space:nowrap}
.fc-cc-n b{font-family:var(--f-brand);font-weight:500;font-size:18px;color:var(--ink);margin-right:2px;font-variant-numeric:tabular-nums}
.fc-cc-p{display:grid;grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);align-items:stretch}
.fc-cc-a,.fc-cc-b{display:flex;flex-direction:column;gap:8px;padding:12px 14px;border-radius:14px;border:1px solid var(--sx-line);transition:transform .5s var(--sx-ease),border-color .3s,background .3s}
.fc-cc-a{background:var(--paper)}
.fc-cc-b{background:var(--sx-blue-b);border-color:rgba(0,122,255,.25)}
.fc-cc-b .sx-badge{align-self:flex-start}
.fc-cc-a small,.fc-cc-b small{font-size:12px;color:var(--sx-ink3)}
.fc-cc-r{display:flex;align-items:center;gap:10px;min-width:0}
.fc-cc-dt{width:44px;height:40px;border-radius:9px;background:#fff;display:grid;place-items:center;font-size:12.5px;font-weight:500;flex:none}
.fc-cc-lk{align-self:center;justify-self:center;width:30px;height:30px;border-radius:50%;background:#fff;border:1px dashed var(--sx-line2);display:grid;place-items:center;color:var(--sx-ink3);transition:background .3s,color .3s,border-color .3s;z-index:1}
.fc-cc-lk svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}
.fc-cc.is-ok .fc-cc-a{transform:translateX(8px);border-color:rgba(52,199,89,.5)}
.fc-cc.is-ok .fc-cc-b{transform:translateX(-8px);background:var(--sx-ok-b);border-color:rgba(52,199,89,.5)}
.fc-cc.is-ok .fc-cc-lk{background:var(--sx-ok);border:1px solid var(--sx-ok);color:#fff}
.fc-cc-act{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.fc-cc-e{margin-top:12px;padding:12px 14px;border-radius:14px;border:1px solid var(--sx-line);display:flex;flex-direction:column;gap:6px;font-size:13px}
.fc-cc-ek{font-size:12px;color:var(--sx-ink3)}
.fc-cc-e p:not(.fc-cc-ek){display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px}
.fc-cc-e p b{font-weight:500;font-variant-numeric:tabular-nums}
.fc-dc{width:22px;height:22px;border-radius:6px;background:var(--paper);display:grid;place-items:center;font-size:12px;font-weight:600}

/* ---------- 7 · Fechamento: sign-off por seção ---------- */
.fc-so-c{font-size:13px;color:var(--sx-ink2);margin-bottom:10px}
.fc-so-c b{font-family:var(--f-brand);font-weight:500;font-size:18px;color:var(--ink);margin-right:2px;font-variant-numeric:tabular-nums}
.fc-so-g{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.fc-so-g li{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-height:72px;padding:10px;border-radius:12px;background:var(--paper);font-size:12.5px;line-height:1.3;color:var(--sx-ink2);transition:background .3s,color .3s}
.fc-so-g li i{width:20px;height:20px;border-radius:50%;box-shadow:inset 0 0 0 1.5px var(--sx-line2);display:grid;place-items:center;color:transparent;transition:background .3s,box-shadow .3s,color .3s}
.fc-so-g li i svg{width:11px;height:11px}
.fc-so-g li.in{background:var(--sx-ok-b);color:var(--ink)}
.fc-so-g li.in i{background:var(--sx-ok);box-shadow:none;color:#fff}
.sx:not(.is-armed) .fc-so-g li{background:var(--sx-ok-b)}
.fc-so-snap{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;margin-top:12px;padding:12px 14px;border-radius:14px;background:var(--ink);color:var(--paper)}
.fc-so-snap .sx-ic{background:rgba(255,255,255,.12);color:#fff}
.fc-so-snap .mv-tt span{color:rgba(245,245,247,.7)}
.fc-so-dem{display:flex;gap:6px}
.fc-so-dem span{height:26px;padding:0 10px;border-radius:999px;background:rgba(255,255,255,.14);display:inline-flex;align-items:center;font-size:12px;font-weight:500}

/* ---------- Fechamento da página ---------- */
.fc-final-g{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:32px clamp(40px,6vw,96px);align-items:end}
.fc-final-c{display:flex;flex-direction:column;gap:20px}
.fc-final-c > *{margin:0 !important}
.fc-final-c .h2{max-width:22ch}
@media (max-width:900px){.fc-final-g{grid-template-columns:minmax(0,1fr)}}

/* ---------- celular: cenas pensadas para o telefone ---------- */
@media (max-width:720px){
  .fc-tw,.fc-nt,.fc-ap,.fc-ec,.fc-sc,.fc-cc,.fc-so{padding:16px}
  .fc-tw-l{gap:8px}
  .fc-ln{padding:10px}
  .fc-ln li{font-size:12.5px;gap:8px;align-items:flex-start}
  .fc-tw-b{grid-template-columns:auto minmax(0,1fr)}
  .fc-tw-b .sx-badge{grid-column:2;justify-self:start}
  .sx :is(.fc-nt-h,.fc-ap-h,.fc-ec-h,.fc-sc-h,.fc-cc-h,.fc-so-h){flex-wrap:wrap}
  .fc-nt-l li{padding:9px 6px}
  .fc-ap-r{grid-template-columns:minmax(0,1fr)}
  .fc-ec-l li{padding:0 6px}
  .fc-ec-l li .mv-tt span{font-size:12px}
  .fc-sc-bl{flex-wrap:wrap;gap:6px 12px}
  .fc-sc-bl span{flex:none !important;display:inline-flex;align-items:center;gap:6px}
  .fc-sc-bl span::before{content:"";width:8px;height:8px;border-radius:3px;background:#C7C7CC}
  .fc-sc-bl span:nth-child(2)::before{background:var(--sx-al)}.fc-sc-bl span:nth-child(3)::before{background:var(--sx-warn)}.fc-sc-bl span:nth-child(4)::before{background:#7FB8FF}.fc-sc-bl span:nth-child(5)::before{background:var(--sx-ok)}
  .fc-sc-mk .fc-mk{width:28px}
  .fc-sc-d{grid-template-columns:auto minmax(0,1fr)}
  .fc-sc-d .sx-badge{grid-column:2;justify-self:start}
  .fc-cc-p{grid-template-columns:minmax(0,1fr);grid-template-rows:auto 36px auto}
  .fc-cc.is-ok .fc-cc-a{transform:translateY(6px)}
  .fc-cc.is-ok .fc-cc-b{transform:translateY(-6px)}
  .fc-cc-act .sx-btn{flex:1;height:38px}
  .fc-so-g{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fc-so-g li{min-height:0;flex-direction:row;align-items:center}
  .fc-so-snap{grid-template-columns:auto minmax(0,1fr)}
  .fc-so-dem{grid-column:1 / -1}
}
