/* Scaffold screens (S1-T3): the product-screen and AI-screen presets of
   template-parts/scaffold/screens/<key>.php (SPEC.md section 2.12), and the
   Ask AI scene of the hero stage, which reuses the AI screen classes.

   Ported from docs/scaffold/mocks/mock-shared.css.txt, the screens.css rows of
   SPEC.md section 4.4: lines 261-262 (.mk-dt-h b, .mk-crumb), 287-398 except
   288 (product screens, charts, gantt, tables, POS), 399-455 (AI screens), and
   from the 568-607 responsive block the rules whose first class is one of
   those (lines 578, 586, 588, 601-603), in the same container queries.
   Rename of SPEC.md section 2.0: .mk -> .ifs, mk-<n> -> ifs-<n>, --mk-<n> ->
   --if-<n>, container mk -> ifs (and the list counter mkol -> ifsol).

   Not here, because base.css owns them (4.4): the .ifs-shot frame (288), the
   .ifs-ex "contoh data" label (255-260), and the ifs-pulse keyframes the
   .ifs-live dot uses (562).

   Deliberate differences from the mock, both from SPEC.md section 4.1 (Fonts):
   JetBrains Mono is loaded at 500 and 700 only, so mono 400 is written 500
   (.ifs-box-h em, .ifs-rail-h em) and mono 600 is written 700 (.ifs-fnum b,
   .ifs-hrow b).

   Every selector starts with .ifs. No !important: nothing here sets a
   property allcss.min.css forces on a plain element (base.css carries those).
   Enqueued only by ifs_enqueue_base() in inc/scaffold.php, when a rendered
   tab uses a preset screen or the hero has a stage. */

.ifs .ifs-dt-h b{flex:none}
.ifs .ifs-crumb{min-width:0;white-space:nowrap}

/* ---------- product screens (tiles) ---------- */
.ifs .ifs-dt{display:flex;flex-direction:column;min-width:0;background:#FFFFFF;color:#0A1A2F;border:1px solid #E3E8EF;border-radius:.75rem;overflow:hidden;
  font-family:var(--if-sans);font-size:11.5px;line-height:1.4;box-shadow:0 1px 2px rgba(10,26,47,.05)}
.ifs .ifs-dt-h{flex:none;display:flex;align-items:center;gap:.5em;padding:.6em .85em;border-bottom:1px solid #E3E8EF;white-space:nowrap;overflow:hidden}
.ifs .ifs-mark{width:1.7em;height:1.7em;border-radius:.4em;background:#0A1A2F;color:#FFFFFF;display:grid;place-items:center;font-family:var(--if-mono);font-size:.75em;font-weight:700;flex:none}
.ifs .ifs-dt-h b{font-family:var(--if-head);font-size:1.02em;font-weight:700;color:#0A1A2F}
.ifs .ifs-crumb{font-size:.88em;color:#5A6B7D;overflow:hidden;text-overflow:ellipsis}
.ifs .ifs-crumb::before{content:"/";margin-right:.4em;color:#C9D3DF}
.ifs .ifs-live{margin-left:auto;display:inline-flex;align-items:center;gap:.4em;flex:none;font-family:var(--if-mono);font-size:.78em;font-weight:500;color:#FFFFFF;background:#0A1A2F;padding:.2em .6em;border-radius:99em}
.ifs .ifs-live i{width:.5em;height:.5em;border-radius:50%;background:#0FCFFF;display:block;animation:ifs-pulse 1.8s ease-in-out infinite}
.ifs .ifs-db{padding:.75em .85em;display:flex;flex-direction:column;gap:.65em;min-width:0}
.ifs .ifs-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.5em}
.ifs .ifs-case{border:1px solid #E3E8EF;border-radius:.5em;padding:.5em .6em;min-width:0}
.ifs .ifs-case b{display:block;font-family:var(--if-head);font-size:1.45em;font-weight:700;letter-spacing:-.02em;line-height:1.15;color:#0A1A2F;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ifs .ifs-case b.is-pos{color:#0F7B6C}.ifs .ifs-case b.is-neg{color:#B8322A}.ifs .ifs-case b.is-act{color:#0459D9}
.ifs .ifs-case span{display:block;font-size:.85em;color:#5A6B7D;margin-top:.15em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ifs .ifs-lower{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:.6em}
.ifs .ifs-box{border:1px solid #E3E8EF;border-radius:.5em;padding:.6em .7em;min-width:0;display:flex;flex-direction:column;gap:.5em}
.ifs .ifs-box-h{font-family:var(--if-head);font-size:.95em;font-weight:700;color:#0A1A2F;line-height:1.25}
.ifs .ifs-box-h em{display:block;font-family:var(--if-mono);font-size:.82em;font-weight:500;color:#5A6B7D;margin-top:.15em}
.ifs .ifs-why{background:#F7F9FC}
.ifs .ifs-sh{display:flex;align-items:center;gap:.4em;font-family:var(--if-head);font-size:.92em;font-weight:700;color:#0A1A2F}
.ifs .ifs-sh svg{width:1.1em;height:1.1em;color:#0568FD}
.ifs .ifs-next .ifs-sh{color:#0459D9}
.ifs .ifs-ol{counter-reset:ifsol;display:flex;flex-direction:column;gap:.35em}
.ifs .ifs-ol li{counter-increment:ifsol;position:relative;padding-left:1.25em;font-size:.92em;line-height:1.4;color:#46566A}
.ifs .ifs-ol li::before{content:counter(ifsol) ".";position:absolute;left:0;top:0;font-family:var(--if-mono);font-size:.92em;color:#5A6B7D}
.ifs .ifs-ol li b{color:#0A1A2F}
.ifs .ifs-pillx{display:inline-flex;align-items:center;gap:.3em;border-radius:99em;padding:.12em .55em;font-family:var(--if-mono);font-size:.82em;font-weight:500;white-space:nowrap;line-height:1.35}
.ifs .ifs-pillx.is-pos{color:#0F7B6C;background:#E6F4F1}
.ifs .ifs-pillx.is-neg{color:#B8322A;background:#FCE9E7}
.ifs .ifs-pillx.is-warn{color:#946408;background:#FCF2DC}
.ifs .ifs-pillx.is-act{color:#0459D9;background:#E8F1FF}
.ifs .ifs-pillx.is-mute{color:#46566A;background:#EEF2F7}

/* charts: vertical bars */
.ifs .ifs-vbars{display:flex;align-items:flex-end;gap:.55em;height:8.5em;padding:.2em .1em 0;border-bottom:1px solid #E3E8EF}
.ifs .ifs-vbar{flex:1;height:100%;display:flex;align-items:flex-end;justify-content:center;gap:.18em;min-width:0}
.ifs .ifs-vbar i{display:block;width:42%;max-width:1.4em;border-radius:.25em .25em 0 0;background:#B9D3FE}
.ifs .ifs-vbar i.is-now{background:#0568FD}
.ifs .ifs-vbar i.is-bad{background:#B8322A}
.ifs .ifs-vlabels{display:flex;gap:.55em;padding:0 .1em}
.ifs .ifs-vlabels span{flex:1;text-align:center;font-size:.82em;color:#5A6B7D;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ifs .ifs-legend{display:flex;flex-wrap:wrap;gap:.4em .8em;font-size:.82em;color:#5A6B7D}
.ifs .ifs-legend span{display:inline-flex;align-items:center;gap:.3em}
.ifs .ifs-legend i{width:.7em;height:.7em;border-radius:.15em;display:block}
/* charts: line (inline SVG with explicit fills) */
.ifs .ifs-line{width:100%;height:8.5em}
.ifs .ifs-line svg{width:100%;height:100%}
.ifs .ifs-axis{display:flex;justify-content:space-between;font-family:var(--if-mono);font-size:.78em;color:#5A6B7D}
/* charts: funnel */
.ifs .ifs-funnel{display:flex;flex-direction:column;gap:.3em}
.ifs .ifs-frow{display:grid;grid-template-columns:minmax(0,1fr) 7.4em;align-items:center;gap:.5em}
.ifs .ifs-fbar{height:1.75em;display:flex;justify-content:center}
.ifs .ifs-fbar i{display:block;height:100%;border-radius:.25em;background:#0568FD}
.ifs .ifs-frow:nth-child(2) .ifs-fbar i{background:#3D8BFD}.ifs .ifs-frow:nth-child(3) .ifs-fbar i{background:#7AAEFE}.ifs .ifs-frow:nth-child(4) .ifs-fbar i{background:#B9D3FE}
.ifs .ifs-fnum b{display:block;font-family:var(--if-mono);font-size:.92em;font-weight:700;color:#0A1A2F}
.ifs .ifs-fnum{min-width:0}
.ifs .ifs-fnum span{display:block;font-size:.8em;line-height:1.3;color:#5A6B7D}
.ifs .ifs-fnum span.is-neg{color:#B8322A;font-weight:600}
/* charts: horizontal bars */
.ifs .ifs-hbars{display:flex;flex-direction:column;gap:.45em}
.ifs .ifs-hrow{display:grid;grid-template-columns:5.6em minmax(0,1fr) 3em;align-items:center;gap:.5em;font-size:.92em}
.ifs .ifs-hrow span{color:#46566A;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ifs .ifs-htr{position:relative;height:.8em;border-radius:.2em;background:#EEF2F7;overflow:hidden}
.ifs .ifs-htr i{display:block;height:100%;border-radius:.2em;background:#0568FD}
.ifs .ifs-htr i.is-bad{background:#B8322A}
.ifs .ifs-htr u{position:absolute;top:0;bottom:0;width:0;border-left:1px dashed #0A1A2F}
.ifs .ifs-hrow b{font-family:var(--if-mono);font-weight:700;text-align:right;color:#0A1A2F}
.ifs .ifs-hrow b.is-neg{color:#B8322A}
/* gantt */
.ifs .ifs-gantt{display:flex;flex-direction:column;gap:.45em}
.ifs .ifs-grow{display:grid;grid-template-columns:7.6em minmax(0,1fr);align-items:center;gap:.5em;font-size:.92em}
.ifs .ifs-grow span{color:#46566A;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ifs .ifs-gtr{position:relative;height:1.1em;border-radius:.25em;background:repeating-linear-gradient(90deg,#F4F7FB 0 calc(25% - 1px),#E3E8EF calc(25% - 1px) 25%)}
.ifs .ifs-gtr i{position:absolute;top:.15em;bottom:.15em;border-radius:.2em;background:#B9D3FE}
.ifs .ifs-gtr i b{display:block;height:100%;border-radius:.2em;background:#0568FD}
.ifs .ifs-gtr i.is-late b{background:#B8322A}
/* tables and lists */
.ifs .ifs-tbl{width:100%;border-collapse:separate;border-spacing:.2em;font-size:.9em;table-layout:fixed}
.ifs .ifs-tbl th{font-weight:500;color:#5A6B7D;text-align:center;font-size:.92em;padding:.1em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ifs .ifs-tbl th:first-child{text-align:left;width:34%}
.ifs .ifs-tbl td{text-align:center;background:#F4F7FB;border-radius:.25em;padding:.25em .1em;font-family:var(--if-mono);color:#0A1A2F}
.ifs .ifs-tbl td:first-child{text-align:left;background:none;font-family:var(--if-sans);color:#46566A;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ifs .ifs-tbl td.is-warn{background:#FCF2DC;color:#946408}
.ifs .ifs-tbl td.is-neg{background:#FCE9E7;color:#B8322A;font-weight:600}
.ifs .ifs-list{display:flex;flex-direction:column}
.ifs .ifs-li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.6em;padding:.45em .1em;border-top:1px solid #EEF2F7}
.ifs .ifs-li:first-child{border-top:0}
.ifs .ifs-av{width:2em;height:2em;border-radius:.45em;background:#E8F1FF;color:#0459D9;display:grid;place-items:center;font-family:var(--if-mono);font-size:.78em;font-weight:700}
.ifs .ifs-av svg{width:1.2em;height:1.2em}
.ifs .ifs-li b{display:block;font-weight:600;color:#0A1A2F;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ifs .ifs-li u{display:block;font-size:.88em;color:#5A6B7D;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ifs .ifs-li em{font-family:var(--if-mono);font-size:.88em;color:#5A6B7D;white-space:nowrap}
.ifs .ifs-li .ifs-r{display:flex;flex-direction:column;align-items:flex-end;gap:.15em}
/* POS register */
.ifs .ifs-pos{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:.6em}
.ifs .ifs-keys{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.35em}
.ifs .ifs-key{border:1px solid #E3E8EF;border-radius:.45em;padding:.55em .4em;text-align:center;background:#F7F9FC;min-width:0}
.ifs .ifs-key b{display:block;font-size:.92em;font-weight:600;color:#0A1A2F;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ifs .ifs-key u{display:block;font-family:var(--if-mono);font-size:.82em;color:#5A6B7D}
.ifs .ifs-cart{display:flex;flex-direction:column;gap:.3em}
.ifs .ifs-cl{display:flex;justify-content:space-between;gap:.5em;font-size:.92em;color:#46566A}
.ifs .ifs-cl b{font-family:var(--if-mono);font-weight:500;color:#0A1A2F;white-space:nowrap}
.ifs .ifs-total{display:flex;justify-content:space-between;align-items:baseline;border-top:1px dashed #C9D3DF;padding-top:.4em;margin-top:.1em}
.ifs .ifs-total b{font-family:var(--if-head);font-size:1.35em;font-weight:700;color:#0A1A2F}
.ifs .ifs-pays{display:flex;flex-wrap:wrap;gap:.3em}
.ifs .ifs-pay{border:1px solid #C9D3DF;border-radius:.35em;padding:.15em .5em;font-size:.86em;color:#46566A;background:#FFFFFF}
.ifs .ifs-pay.is-on{border-color:#0568FD;color:#0459D9;background:#E8F1FF;font-weight:600}
.ifs .ifs-charge{display:block;text-align:center;background:#0568FD;color:#FFFFFF;border-radius:.4em;padding:.45em;font-family:var(--if-head);font-weight:700;font-size:.95em}

/* ---------- AI screens ---------- */
.ifs .ifs-ai-b{padding:.75em .85em;display:flex;flex-direction:column;gap:.55em;min-width:0}
.ifs .ifs-msg{display:flex;gap:.5em;max-width:92%}
.ifs .ifs-msg.is-me{align-self:flex-end;max-width:78%}
.ifs .ifs-msg.is-ai{width:100%;max-width:100%}
.ifs .ifs-bub{border-radius:.6em;padding:.45em .65em;font-size:.95em;line-height:1.45;min-width:0}
.ifs .ifs-msg.is-me .ifs-bub{background:#EEF2F7;color:#0A1A2F}
.ifs .ifs-msg.is-ai .ifs-bub{flex:1;background:#FFFFFF;border:1px solid #E3E8EF;display:flex;flex-direction:column;gap:.5em;color:#46566A}
.ifs .ifs-msg.is-ai .ifs-bub > p b{color:#0A1A2F}
.ifs .ifs-ai-av{width:1.8em;height:1.8em;flex:none;border-radius:.45em;background:#0A1A2F;display:grid;place-items:center}
.ifs .ifs-ai-av svg{width:1.1em;height:1.1em;color:#0FCFFF}
.ifs .ifs-lbl{font-family:var(--if-mono);font-size:.8em;letter-spacing:.06em;text-transform:uppercase;color:#5A6B7D}
.ifs .ifs-ans{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.7em}
.ifs .ifs-ans .ifs-vbars{height:5.2em}
.ifs .ifs-acts{display:flex;flex-direction:column;gap:.25em}
.ifs .ifs-act{display:flex;align-items:center;gap:.5em;border:1px solid #E3E8EF;border-radius:.45em;padding:.3em .5em;background:#F7F9FC;font-size:.92em}
.ifs .ifs-act span{flex:1;min-width:0;color:#46566A;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ifs .ifs-act em{font-family:var(--if-mono);color:#0F7B6C;white-space:nowrap}
.ifs .ifs-act u{border:1px solid #C9D3DF;border-radius:.3em;padding:.02em .45em;color:#46566A;white-space:nowrap;background:#FFFFFF}
.ifs .ifs-ai-comp{display:flex;align-items:center;gap:.5em;border:1px solid #C9D3DF;border-radius:.55em;padding:.4em .6em;color:#687789;font-size:.92em}
.ifs .ifs-ai-comp svg{width:1.1em;height:1.1em;margin-left:auto;color:#0568FD}
.ifs .ifs-cw{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:.6em}
.ifs .ifs-doc{border:1px solid #E3E8EF;border-radius:.45em;background:#F7F9FC;padding:.45em .55em;display:flex;flex-direction:column;gap:.2em}
.ifs .ifs-doc b{color:#0A1A2F;font-weight:600}
.ifs .ifs-doc p{color:#46566A;line-height:1.45}
.ifs .ifs-rail{border:1px solid #E3E8EF;border-radius:.55em;background:#F7F9FC;padding:.55em .6em;display:flex;flex-direction:column;gap:.35em;min-width:0}
.ifs .ifs-rail-h{color:#0A1A2F;font-family:var(--if-head);font-size:.98em;font-weight:700;display:flex;align-items:center;gap:.4em;letter-spacing:0;line-height:1.3;text-wrap:balance}
.ifs .ifs-rail-h em{margin-left:auto;font-family:var(--if-mono);font-size:.85em;font-weight:500;color:#5A6B7D}
.ifs .ifs-trow{border:1px solid #E3E8EF;border-radius:.45em;background:#FFFFFF;padding:.35em .45em;display:flex;flex-direction:column;gap:.2em;align-items:flex-start}
.ifs .ifs-trow b{font-weight:600;color:#0A1A2F;font-size:.95em}
.ifs .ifs-trow u{font-size:.86em;color:#5A6B7D}
.ifs .ifs-lane{display:flex;flex-direction:column;gap:.5em;padding:.55em 0}
.ifs .ifs-lane + .ifs-lane{border-top:1px solid #E3E8EF}
.ifs .ifs-lane-h b{display:block;font-family:var(--if-head);font-weight:700;color:#0A1A2F;font-size:1em}
.ifs .ifs-lane-h u{display:block;font-size:.88em;color:#5A6B7D}
.ifs .ifs-chain{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.1em}
.ifs .ifs-stp{position:relative;display:flex;flex-direction:column;align-items:center;gap:.3em;text-align:center;min-width:0}
.ifs .ifs-stp + .ifs-stp::before{content:"";position:absolute;top:1.3em;right:calc(100% + .2em);width:.7em;border-top:1.5px solid #B9D3FE}
.ifs .ifs-stp + .ifs-stp::after{content:"";position:absolute;top:calc(1.3em - .25em);right:calc(100% + .15em);border:.25em solid transparent;border-left-color:#7AAEFE;border-right:0}
.ifs .ifs-stp .ifs-ic{width:2.6em;height:2.6em;border-radius:.55em;border:1px solid #E3E8EF;background:#F7F9FC;display:grid;place-items:center;color:#0568FD}
.ifs .ifs-stp .ifs-ic svg{width:1.3em;height:1.3em}
.ifs .ifs-stp.is-agent .ifs-ic{background:#0A1A2F;border-color:#0A1A2F;color:#0FCFFF}
.ifs .ifs-stp.is-human .ifs-ic{background:#FCF2DC;border-color:#F2D9A6;color:#946408}
.ifs .ifs-stp b{font-size:.88em;font-weight:600;color:#0A1A2F;line-height:1.25}
.ifs .ifs-stp u{font-size:.8em;color:#5A6B7D;line-height:1.25}
.ifs .ifs-cc{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr) minmax(0,1fr);gap:.6em}
.ifs .ifs-col{display:flex;flex-direction:column;gap:.35em;min-width:0}
.ifs .ifs-sys{display:flex;align-items:center;gap:.4em;border:1px solid #E3E8EF;border-radius:.4em;padding:.3em .45em;font-size:.92em;color:#46566A;background:#F7F9FC;white-space:nowrap;overflow:hidden}
.ifs .ifs-sys i{width:.5em;height:.5em;border-radius:50%;background:#0FCFFF;box-shadow:0 0 0 1.5px #0A1A2F;display:block;flex:none}
.ifs .ifs-ins{border:1px solid #E3E8EF;border-left-width:3px;border-radius:.4em;padding:.35em .5em;display:flex;flex-direction:column;gap:.15em}
.ifs .ifs-ins.is-neg{border-left-color:#B8322A}.ifs .ifs-ins.is-pos{border-left-color:#0F7B6C}.ifs .ifs-ins.is-act{border-left-color:#0568FD}
.ifs .ifs-ins b{font-size:.95em;font-weight:600;color:#0A1A2F}
.ifs .ifs-ins u{font-size:.86em;color:#5A6B7D}
.ifs .ifs-todo{display:flex;align-items:center;gap:.4em;border:1px solid #E3E8EF;border-radius:.4em;padding:.3em .45em;font-size:.9em;color:#46566A}
.ifs .ifs-todo span{flex:1;min-width:0}
.ifs .ifs-todo u{flex:none;font-family:var(--if-head);font-weight:700;font-size:.92em;color:#FFFFFF;background:#0568FD;border-radius:.3em;padding:.1em .45em}


/* ---------- responsive (container width): the 568-607 rules whose first class is a screen class ---------- */
@container ifs (max-width:820px){
  .ifs .ifs-lower,.ifs .ifs-pos{grid-template-columns:minmax(0,1fr)}
}
@container ifs (max-width:640px){
  .ifs .ifs-chat{padding:1rem}
  .ifs .ifs-ans,.ifs .ifs-cw,.ifs .ifs-cc{grid-template-columns:minmax(0,1fr)}
}
@container ifs (max-width:560px){
  .ifs .ifs-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ifs .ifs-chain{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:.8em}
  .ifs .ifs-chain .ifs-stp:nth-child(3)::before,.ifs .ifs-chain .ifs-stp:nth-child(3)::after{display:none}
}
