/* Interfaces screen (design workflow-mapper.md §5-§7). Loaded after screens.css; every class is ifc- prefixed. */
.ifc-page, .ifc-list-page { container-type: inline-size; }
.ifc-card { padding: 0; overflow: visible; }
.ifc-card-h { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-4) var(--sp-4) 0; }
.ifc-card-h h3 { margin: 0; font-size: var(--fs-md); }
.ifc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warning); margin-right: 6px; flex: none; vertical-align: middle; }
.ifc-err { color: var(--danger); font-size: var(--fs-xs); margin-top: 4px; }
.ifc-go { margin-left: 8px; white-space: nowrap; }
.ifc-lnk { background: none; border: none; padding: 0; color: var(--primary); font: inherit; cursor: pointer; text-align: left; }
.ifc-lnk:hover { text-decoration: underline; }
.ifc-lnk.danger { color: var(--danger); }
.ifc-static { min-height: var(--control-h); display: flex; align-items: center; flex-wrap: wrap; }
.ifc-below { margin-top: var(--sp-3); }
.ifc-info { display: flex; gap: 8px; align-items: flex-start; color: var(--text-secondary); font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.ifc-info svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--info); }
.ifc-notice { display: flex; gap: 8px; align-items: flex-start; margin-top: var(--sp-3); padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-elevated); border: 1px solid var(--border-subtle); font-size: var(--fs-sm); color: var(--text-secondary); }
.ifc-notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* Shared table pattern: fixed layout, wrapping cells, one flexible column */
.ifc-tbl { table-layout: fixed; }
.ifc-tbl th { white-space: normal; }
.ifc-tbl td { white-space: normal; height: auto; padding: 10px 14px; vertical-align: top; overflow-wrap: break-word; }
.ifc-tbl td.mono, .ifc-tbl .mono { font-variant-ligatures: none; }
.ifc-grp td { background: var(--bg-elevated); font-weight: 700; font-size: var(--fs-xs); color: var(--text-secondary); padding: 8px 14px; }

/* List */
.ifc-list .c-devs { width: 280px; } .ifc-list .c-cnt { width: 160px; } .ifc-list .c-ver { width: 148px; }
@container (min-width: 1300px) { .ifc-list .c-devs { width: 340px; } .ifc-list .c-cnt { width: 200px; } .ifc-list .c-ver { width: 180px; } }
.ifc-row { cursor: pointer; }
.ifc-row:hover td { background: var(--bg-hover); }
.ifc-name { font-weight: 600; }
.ifc-path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--text-secondary); font-size: var(--fs-sm); margin-top: 2px; }
.ifc-path-i { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ifc-path svg { width: 12px; height: 12px; color: var(--text-muted); flex: none; }
.ifc-pill { margin-top: 4px; }
.ifc-cnt { color: inherit; }
.ifc-cnt:hover { text-decoration: underline; }

/* Header */
.ifc-head { flex-wrap: wrap; row-gap: var(--sp-3); }
.ifc-head > div:first-child { min-width: 0; }
.ifc-draft { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: nowrap; white-space: nowrap; margin-left: auto; }
.ifc-banner { margin-bottom: var(--sp-4); }
.ifc-banner .ifc-go { color: inherit; text-decoration: underline; }
.ifc-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; margin-bottom: var(--sp-4); }
.ifc-sum-c { padding: var(--sp-3) var(--sp-4); min-width: 0; border-left: 1px solid var(--border-subtle); }
.ifc-sum-c:first-child { border-left: none; }
.ifc-sum-l { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: 4px; }
.ifc-sum-v { font-size: var(--fs-sm); font-weight: 600; overflow-wrap: break-word; }
.ifc-sum-v .ifc-path { font-size: var(--fs-sm); color: var(--text-primary); margin: 0; }
.ifc-tabs { margin-bottom: var(--sp-4); }
.ifc-tabs a.tab { text-decoration: none; color: inherit; }
.ifc-tabs a.tab.on { color: var(--text-primary); }

/* Steps */
.ifc-step { display: grid; grid-template-columns: 40px minmax(0, 9fr) minmax(0, 11fr); column-gap: 24px; padding: var(--sp-4); border-top: 1px solid var(--border-subtle); position: relative; }
.ifc-card-h + .ifc-step { border-top: none; margin-top: var(--sp-2); }
.ifc-num-c { display: flex; justify-content: center; position: relative; }
.ifc-step:not(.ifc-fail) .ifc-num-c::after { content: ""; position: absolute; top: 28px; bottom: calc(-1 * var(--sp-4) - 16px); left: 50%; width: 1px; background: var(--border-default); }
.ifc-step:nth-last-child(2) .ifc-num-c::after { display: none; }
.ifc-n { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--bg-elevated); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 700; position: relative; z-index: 1; }
.ifc-fail .ifc-num-c svg { width: 18px; height: 18px; color: var(--text-muted); margin-top: 2px; }
.ifc-st-t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.ifc-st-t svg { width: 16px; height: 16px; color: var(--text-muted); flex: none; }
.ifc-st-d { font-size: var(--fs-sm); color: var(--text-secondary); margin-top: 4px; }
.ifc-sets { min-width: 0; display: flex; flex-direction: column; gap: var(--sp-4); container-type: inline-size; }
.ifc-sets:empty { display: none; }
.ifc-set { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: var(--sp-3); align-items: start; }
.ifc-set-l { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; font-size: var(--fs-sm); font-weight: 600; min-height: var(--control-h); }
.ifc-linked .ifc-set-l { min-height: 0; }
.ifc-set-l > span:not(.pill) { min-width: 0; } .ifc-set-l .pill { flex: none; }
@container (max-width: 520px) { .ifc-set { grid-template-columns: minmax(0, 1fr); row-gap: 4px; } .ifc-set-l { min-height: 0; } }
.ifc-set-v { min-width: 0; font-size: var(--fs-sm); }
.ifc-set-v .hint { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 4px; }
.ifc-ctl { width: 100%; max-width: 360px; }
.ifc-numrow { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); min-height: var(--control-h); }
.ifc-num { width: 96px; }
.ifc-bc { margin-top: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-3); }
.ifc-bc-r { display: flex; flex-direction: column; gap: 6px; }
.ifc-bc-l { font-size: var(--fs-xs); font-weight: 600; color: var(--text-secondary); }
.ifc-chars { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.ifc-chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ifc-try-l { margin-top: var(--sp-3); margin-bottom: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-secondary); }
.ifc-try { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); max-width: 100%; }
.ifc-try .input { width: 220px; max-width: 100%; flex: 0 1 220px; }
.ifc-tryres { font-size: var(--fs-sm); min-width: 0; flex: 1 1 160px; overflow-wrap: anywhere; }
.ifc-tryres:empty { display: none; }
.ifc-tryres.success { color: var(--success); } .ifc-tryres.danger { color: var(--danger); } .ifc-tryres.muted { color: var(--text-muted); }
.ifc-legacy { margin-bottom: var(--sp-2); }

/* Message */
.ifc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 40px; margin-bottom: var(--sp-3); flex-wrap: wrap; }
.ifc-tl, .ifc-tr { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: nowrap; white-space: nowrap; }
.ifc-tool { display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; }
.ifc-tool .select { width: auto; min-width: 180px; }
.ifc-toolbar .segmented a { height: 28px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 7px; color: var(--text-muted); font-weight: 600; font-size: var(--fs-xs); text-decoration: none; }
.ifc-toolbar .segmented a.on { background: var(--bg-elevated); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.ifc-prev { position: sticky; top: 0; z-index: 5; margin-bottom: var(--sp-4); padding: var(--sp-3) var(--sp-4); max-height: 240px; display: flex; flex-direction: column; }
.ifc-prev.stuck { box-shadow: 0 8px 8px -6px rgba(0, 0, 0, 0.5); }
.ifc-stick-s { height: 1px; margin-bottom: -1px; }
/* The field table header sticks under the preview card, so the card never covers it (--ifc-prev-h is set from the card height). */
.ifc-fields thead th { top: var(--ifc-prev-h, 240px); z-index: 4; }
.ifc-frow { scroll-margin-top: calc(var(--ifc-prev-h, 240px) + 56px); }
@media (max-height: 759px) { .ifc-prev { position: static; } .ifc-fields thead th { top: 0; } .ifc-frow { scroll-margin-top: 56px; } }
.ifc-msg-h { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.ifc-msg-h h4 { margin: 0; font-size: var(--fs-sm); }
.ifc-msg-a { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.ifc-prevsel { width: auto; max-width: 300px; }
.ifc-pbody { margin-top: var(--sp-2); font-size: var(--fs-sm); overflow-y: auto; min-height: 0; flex: 1; line-height: 1.55; }
.ifc-pbody b { color: var(--accent); font-weight: 700; }
.ifc-pbody .hl { background: var(--primary-soft); border-radius: 3px; outline: 1px solid var(--primary); }
.ifc-pl { padding: 1px 0; }
.ifc-pnote { font-family: var(--font-ui); color: var(--text-secondary); }
.ifc-json { margin: 0; white-space: pre-wrap; font: inherit; }
.ifc-pfoot { margin-top: var(--sp-2); }
.ifc-fields .c-f { width: 124px; } .ifc-fields .c-m { width: 220px; } .ifc-fields .c-x { width: 200px; } .ifc-fields .c-s { width: 104px; }
@container (min-width: 1300px) { .ifc-fields .c-f { width: 140px; } .ifc-fields .c-m { width: 300px; } .ifc-fields .c-x { width: 260px; } .ifc-fields .c-s { width: 120px; } }
.ifc-fields.ifc-csv .c-f { width: 220px; } .ifc-fields.ifc-csv .c-m { width: 180px; }
.ifc-frow[data-row] { cursor: pointer; }
.ifc-frow[data-row]:hover td, .ifc-frow.open td { background: var(--bg-hover); }
.ifc-frow.locked td { color: var(--text-muted); }
.ifc-frow.locked td a { color: var(--primary); }
.ifc-ui { font-family: var(--font-ui); }
.ifc-hdr { cursor: pointer; }
.ifc-hdr svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }
.ifc-edrow td { background: var(--bg-elevated); padding: var(--sp-4); }
.ifc-ed-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.ifc-ed-g .field { min-width: 0; }
.ifc-ed .ifc-notice { margin: 0 0 var(--sp-4); }
.ifc-ed-f { display: flex; justify-content: space-between; align-items: center; margin-top: var(--sp-4); }
.ifc-danger-t { color: var(--danger); }

/* Codes */
.ifc-codes .c-code { width: 120px; } .ifc-codes .c-ord { width: 200px; } .ifc-codes .c-send { width: 260px; } .ifc-codes .c-s, .ifc-pairs .c-s { width: 104px; }
@container (min-width: 1300px) { .ifc-codes .c-code { width: 140px; } .ifc-codes .c-ord { width: 240px; } .ifc-codes .c-send { width: 320px; } .ifc-codes .c-s { width: 120px; } }
.ifc-codes .select, .ifc-codes .input, .ifc-pairs .select, .ifc-pairs .input { width: 100%; }
.ifc-cdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.ifc-cdot.danger { background: var(--danger); } .ifc-cdot.muted { background: var(--paused); }
.ifc-codes td, .ifc-pairs td { vertical-align: middle; }
.ifc-cst { white-space: nowrap; }
.ifc-cst .pill { margin-right: 4px; }
.ifc-pairs .c-lc { width: 240px; }

/* Test */
.ifc-test { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--sp-4); align-items: stretch; }
.ifc-tbody { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.ifc-radio { display: flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-sm); }
.ifc-radio.disabled { color: var(--text-disabled); cursor: default; }
.ifc-radio .radio-dot { margin-top: 0; }
.ifc-radio .radio-dot.on { border-color: var(--primary); }
.ifc-radio .radio-dot.on::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); }
.ifc-radios { display: flex; gap: var(--sp-5); }
.ifc-tsel, .ifc-paste { margin-left: 24px; width: calc(100% - 24px); }
.ifc-run { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-2); }
.ifc-tres-h { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.ifc-tsteps { display: flex; flex-direction: column; gap: var(--sp-3); }
.ifc-tstep { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--sp-2); align-items: start; }
.ifc-tstep svg { width: 16px; height: 16px; margin-top: 2px; }
.ifc-tstep .success { color: var(--success); } .ifc-tstep .danger { color: var(--danger); } .ifc-tstep .warning { color: var(--warning); } .ifc-tstep .muted { color: var(--text-muted); }
.ifc-ring { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); margin-top: 2px; }
.ifc-tmsg { border-top: 1px solid var(--border-subtle); padding-top: var(--sp-3); }
.ifc-tmsg h4 { margin: 0 0 4px; font-size: var(--fs-sm); }

/* History */
.ifc-hist .c-v { width: 132px; } .ifc-hist .c-p { width: 150px; } .ifc-hist .c-b { width: 130px; } .ifc-hist .c-a { width: 110px; }
@container (min-width: 1300px) { .ifc-hist .c-v { width: 150px; } .ifc-hist .c-p { width: 170px; } .ifc-hist .c-b { width: 160px; } .ifc-hist .c-a { width: 130px; } }
.ifc-hist td:last-child { padding-top: 5px; }
.ifc-chg { margin: 4px 0 0; padding-left: 18px; color: var(--text-secondary); font-size: var(--fs-sm); }
.ifc-chg li { margin: 2px 0; }

/* Windows */
.modal.ifc-m640 { width: min(640px, 92vw); }
.modal.ifc-m560 { width: min(560px, 92vw); }
.modal.ifc-m880 { width: min(880px, 94vw); }
.ifc-pubh { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); }
.ifc-probs { margin-bottom: var(--sp-3); }
.ifc-probs ul { margin: 6px 0 0; padding-left: 18px; }
.ifc-probs .ifc-lnk { color: inherit; text-decoration: underline; }
.ifc-common { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.ifc-common .ifc-radio { padding: 8px 10px; border: 1px solid var(--border-subtle); border-radius: var(--r-md); }
.ifc-impw { max-height: 360px; overflow-y: auto; }
.ifc-imp .c-f { width: 110px; } .ifc-imp .c-b { width: 240px; } .ifc-imp .c-on { width: 48px; }
.ifc-imp .select { width: 100%; }
.ifc-impa { display: flex; gap: var(--sp-2); justify-content: flex-end; width: 100%; }
.ifc-sepch { width: 96px; display: block; }
/* List settings (No Read Values, 25.11.2026): one chip per value, x removes it. */
.ifc-lvals { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.ifc-lchip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--bg-elevated); border: 1px solid var(--border-default); font-size: var(--fs-xs); }
.ifc-lchip-x { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); cursor: pointer; padding: 0; }
.ifc-lchip-x:hover { background: var(--bg-hover); color: var(--text-primary); }
.ifc-lchip-x svg { width: 12px; height: 12px; }
