/*!
 * PHASE 6 · Slice 4 — engine-safe visual overlay for the FROZEN Step 1–3 tools.
 * Applies ONLY in Workspace context (body.lbic-tw-framed) and ONLY touches presentation — fonts,
 * palette, buttons, inputs, links, container width. No engine/JS/markup is changed; the frozen tools
 * keep their exact behaviour and output. Standalone/public visits are entirely unaffected.
 *
 * Roots: .lbic-cer (Export Readiness) · .lbic-cn (Product Compliance) · .iit-app (Incoterm/Responsibilities)
 */

/* container: DS width + calm ground, sits under the shared frame */
body.lbic-tw-framed .lbic-cer,
body.lbic-tw-framed .lbic-cn,
body.lbic-tw-framed .iit-app{
  max-width:var(--lbic-maxw)!important; margin:0 auto!important; padding:8px 24px 60px!important;
  font-family:var(--lbic-sans)!important; color:var(--lbic-ink)!important; background:transparent!important;
}

/* brand fonts everywhere inside the framed tool (fixes incoterm's Public Sans / IBM Plex) */
body.lbic-tw-framed .lbic-cer,body.lbic-tw-framed .lbic-cer p,body.lbic-tw-framed .lbic-cer span,body.lbic-tw-framed .lbic-cer label,body.lbic-tw-framed .lbic-cer li,body.lbic-tw-framed .lbic-cer button,
body.lbic-tw-framed .lbic-cn,body.lbic-tw-framed .lbic-cn p,body.lbic-tw-framed .lbic-cn span,body.lbic-tw-framed .lbic-cn label,body.lbic-tw-framed .lbic-cn li,body.lbic-tw-framed .lbic-cn button,
body.lbic-tw-framed .iit-app,body.lbic-tw-framed .iit-app p,body.lbic-tw-framed .iit-app span,body.lbic-tw-framed .iit-app label,body.lbic-tw-framed .iit-app li,body.lbic-tw-framed .iit-app button{
  font-family:var(--lbic-sans)!important;
}
body.lbic-tw-framed .lbic-cer h1,body.lbic-tw-framed .lbic-cer h2,body.lbic-tw-framed .lbic-cer h3,
body.lbic-tw-framed .lbic-cn h1,body.lbic-tw-framed .lbic-cn h2,body.lbic-tw-framed .lbic-cn h3,
body.lbic-tw-framed .iit-app h1,body.lbic-tw-framed .iit-app h2,body.lbic-tw-framed .iit-app h3{
  font-family:var(--lbic-serif)!important; color:var(--lbic-ink)!important; font-weight:500!important;
}

/* the tool's own top hero/title is redundant under the frame — hide common patterns to avoid a
 * duplicate heading. Best-effort + safe: only the top hero/eyebrow blocks. */
body.lbic-tw-framed .cer-hero,body.lbic-tw-framed .cn-hero,body.lbic-tw-framed .iit-hero,
body.lbic-tw-framed .cer-eyebrow,body.lbic-tw-framed .cn-eyebrow,body.lbic-tw-framed .iit-eyebrow,
body.lbic-tw-framed .lbic-cer > h1:first-child,body.lbic-tw-framed .lbic-cn > h1:first-child,body.lbic-tw-framed .iit-app > h1:first-child{ display:none!important; }

/* buttons → DS (one blue primary; calm secondary/ghost) */
body.lbic-tw-framed .cer-btn,body.lbic-tw-framed .cn-btn,body.lbic-tw-framed .iit-btn,
body.lbic-tw-framed .cer-btn-primary,body.lbic-tw-framed .cn-btn-primary,body.lbic-tw-framed .iit-btn-primary,
body.lbic-tw-framed .cer-btn-secondary,body.lbic-tw-framed .cer-btn-ghost,body.lbic-tw-framed .cn-btn-ghost,body.lbic-tw-framed .iit-btn-ghost{
  font-family:var(--lbic-sans)!important; font-weight:700!important; border-radius:var(--lbic-r-sm)!important; padding:10px 18px!important; border:1px solid transparent!important;
}
body.lbic-tw-framed .cer-btn-primary,body.lbic-tw-framed .cn-btn-primary,body.lbic-tw-framed .iit-btn-primary{
  background:var(--lbic-primary)!important; color:#fff!important; border-color:var(--lbic-primary)!important;
}
body.lbic-tw-framed .cer-btn-secondary,body.lbic-tw-framed .cer-btn-ghost,body.lbic-tw-framed .cn-btn-ghost,body.lbic-tw-framed .iit-btn-ghost{
  background:var(--lbic-surface)!important; color:var(--lbic-primary)!important; border-color:var(--lbic-line-strong)!important;
}

/* inputs → DS */
body.lbic-tw-framed .lbic-cer input,body.lbic-tw-framed .lbic-cn input,body.lbic-tw-framed .iit-app input,
body.lbic-tw-framed .lbic-cer select,body.lbic-tw-framed .lbic-cn select,body.lbic-tw-framed .iit-app select{
  border:1px solid var(--lbic-line-strong)!important; border-radius:var(--lbic-r-sm)!important; font-family:var(--lbic-sans)!important; color:var(--lbic-ink)!important;
}
body.lbic-tw-framed .lbic-cer input:focus,body.lbic-tw-framed .lbic-cn input:focus,body.lbic-tw-framed .iit-app input:focus{ outline:none!important; box-shadow:var(--lbic-focus)!important; border-color:var(--lbic-primary)!important; }

/* links → one accent */
body.lbic-tw-framed .lbic-cer a,body.lbic-tw-framed .lbic-cn a,body.lbic-tw-framed .iit-app a{ color:var(--lbic-primary)!important; }
