@font-face{font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;src:url(fonts/inter-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
/* ==========================================================================
   FibrilX Material Combination Intelligence — scoped styles (.fx-*)
   Embedding: copy this <style>, the #fibrilx-root markup and the <script>.
   All selectors are prefixed so they cannot leak into the host website.
   ========================================================================== */
.fx-root {
  --fx-navy: #0e2250; --fx-ink: #1b2a4a; --fx-muted: #5d6b8a; --fx-line: #dde5f2; --fx-line-2: #eaf0f9; --fx-bg: #f3f6fb; --fx-card: #ffffff;
  --fx-blue: #2f6df0; --fx-green: #27a05a; --fx-purple: #7b52d3; --fx-orange: #ee8a1f; --fx-red: #d9485f; --fx-teal: #13a3a0;
  --fx-A: #1f9d57; --fx-B: #2f6df0; --fx-C: #7b52d3; --fx-D: #d97f0b; --fx-E: #6b7794;
  --fx-radius: 14px; --fx-radius-sm: 9px; --fx-shadow: 0 1px 2px rgba(14, 34, 80, .05), 0 6px 18px rgba(14, 34, 80, .05);
  --fx-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-family: var(--fx-font); color: var(--fx-ink); background: var(--fx-bg); font-size: 13px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  max-width: 1760px; margin: 0 auto; padding: 0 0 32px; text-align: left; box-sizing: border-box;
}
.fx-root *, .fx-root *::before, .fx-root *::after { box-sizing: border-box; }
.fx-root h1, .fx-root h2, .fx-root h3, .fx-root h4, .fx-root p, .fx-root ul, .fx-root ol, .fx-root figure { margin: 0; padding: 0; }
.fx-root ul, .fx-root ol { list-style: none; }
.fx-root button, .fx-root input, .fx-root select, .fx-root textarea { font: inherit; color: inherit; }
.fx-root button { cursor: pointer; }
.fx-root :focus-visible { outline: 2px solid var(--fx-blue); outline-offset: 2px; border-radius: 4px; }
.fx-root .fx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fx-root .fx-muted { color: var(--fx-muted); }
.fx-root .fx-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; }

/* header + banner ---------------------------------------------------------- */
.fx-header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px 28px; padding: 14px 22px; background: #fff; border-bottom: 1px solid var(--fx-line); }
.fx-brand { display: flex; align-items: center; gap: 14px; }
.fx-brand svg { height: 26px; width: auto; display: block; }
.fx-brand-tag { border-left: 1px solid var(--fx-line); padding-left: 14px; font-size: 11.5px; line-height: 1.3; color: var(--fx-ink); font-weight: 500; }
.fx-title { text-align: center; }
.fx-title h1 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: var(--fx-navy); }
.fx-title h1 b { font-weight: 800; }
.fx-title p { font-size: 13px; color: var(--fx-muted); margin-top: 1px; }
.fx-header-note { font-size: 11px; color: var(--fx-muted); max-width: 280px; text-align: right; }
.fx-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 22px; background: #fff7e8; border-bottom: 1px solid #f3dcae; color: #7a4a05; font-size: 12px; }
.fx-banner strong { letter-spacing: .04em; }
.fx-banner .fx-pill { background: #fff; border-color: #f0d49a; color: #7a4a05; }

/* generic bits --------------------------------------------------------------- */
.fx-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--fx-line); background: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; }
.fx-btn { border: 1px solid var(--fx-line); background: #fff; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 12px; transition: background .15s, border-color .15s, box-shadow .15s; }
.fx-btn:hover { border-color: #b9c8e4; background: #f7f9fe; }
.fx-btn.fx-primary { background: var(--fx-navy); border-color: var(--fx-navy); color: #fff; }
.fx-btn.fx-primary:hover { background: #17336f; }
.fx-btn.fx-sm { padding: 3px 9px; font-size: 11px; }
.fx-btn[aria-pressed="true"] { background: #e9f0ff; border-color: #9db7f5; color: #1b4fc2; }
.fx-btn:disabled { opacity: .5; cursor: not-allowed; }
.fx-ev { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; letter-spacing: .02em; }
.fx-ev-A { background: var(--fx-A); } .fx-ev-B { background: var(--fx-B); } .fx-ev-C { background: var(--fx-C); } .fx-ev-D { background: var(--fx-D); }
.fx-ev-E { background: repeating-linear-gradient(135deg, #7f8aa3 0 4px, #6b7794 4px 8px); outline: 1.5px dashed #6b7794; outline-offset: 1px; }
.fx-st { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border: 1px solid; background: #fff; }
.fx-st-MEASURED, .fx-st-KNOWN { color: #137a40; border-color: #8fd0ad; background: #effaf3; }
.fx-st-ESTIMATED { color: #8a5200; border-color: #f0c880; background: #fff8ea; border-style: dashed; }
.fx-st-INFERRED { color: #5b4a99; border-color: #c5b9ec; background: #f6f3fe; border-style: dashed; }
.fx-st-UNKNOWN { color: #5d6b8a; border-color: #cbd4e4; background: #f4f6fa; }
.fx-st-CONFLICTING { color: #b01e38; border-color: #eba1ae; background: #fdf0f3; }
.fx-st-UNSUPPORTED { color: #6b1f2e; border-color: #d6a3ad; background: #f9e9ec; border-style: dotted; }
.fx-conf { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 11.5px; }
.fx-conf i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #bbc4d6; }
.fx-conf-High i { background: var(--fx-green); } .fx-conf-Medium i { background: var(--fx-orange); } .fx-conf-Low i, .fx-conf-Very i { background: var(--fx-red); }
.fx-demo-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: #8a5200; background: #fff3d6; border: 1px solid #f0d49a; border-radius: 4px; padding: 0 5px; text-transform: uppercase; white-space: nowrap; }
.fx-warn { display: flex; gap: 7px; align-items: flex-start; background: #fff6e6; border: 1px solid #f3dcae; color: #7a4a05; border-radius: 8px; padding: 6px 9px; font-size: 11.5px; }
.fx-warn.fx-bad { background: #fdf0f3; border-color: #eba1ae; color: #8d1830; }
.fx-warn.fx-info { background: #eef4ff; border-color: #c3d4f7; color: #1b3f8f; }

/* panels ---------------------------------------------------------------------- */
.fx-panel { background: var(--fx-card); border: 1px solid var(--fx-line); border-radius: var(--fx-radius); box-shadow: var(--fx-shadow); padding: 14px 14px 14px; min-width: 0; }
.fx-panel > header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.fx-panel h2 { font-size: 13px; font-weight: 800; color: var(--fx-navy); letter-spacing: .01em; }
.fx-panel h2 .fx-num { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 7px; border-radius: 50%; background: var(--fx-navy); color: #fff; font-size: 11px; font-weight: 800; }
.fx-panel h2 small { font-weight: 500; color: var(--fx-muted); font-size: 11px; margin-left: 4px; }
.fx-panel h3 { font-size: 12px; font-weight: 800; color: var(--fx-navy); margin-bottom: 6px; }
.fx-sub { font-size: 11px; color: var(--fx-muted); }

/* layout ------------------------------------------------------------------------ */
.fx-request { display: grid; gap: 14px; padding: 16px 18px 6px; align-items: start; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.fx-main { display: grid; gap: 14px; padding: 8px 18px; grid-template-columns: 330px minmax(0, 1fr) 372px; align-items: start; }
.fx-col { display: grid; gap: 14px; min-width: 0; align-content: start; }
.fx-wide { padding: 8px 18px; display: grid; gap: 14px; }
.fx-rowgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* planner + spec form ------------------------------------------------------------ */
.fx-planner textarea { width: 100%; min-height: 54px; resize: vertical; border: 1px solid var(--fx-line); border-radius: 10px; padding: 9px 11px; background: #fbfcff; }
.fx-planner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.fx-spec { display: grid; gap: 12px 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 12px; }
.fx-spec fieldset { border: 1px solid var(--fx-line-2); border-radius: 10px; padding: 8px 10px 10px; min-width: 0; background: #fcfdff; }
.fx-spec legend { padding: 0 6px; font-size: 10.5px; font-weight: 800; color: var(--fx-muted); text-transform: uppercase; letter-spacing: .07em; }
.fx-field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; margin: 5px 0; font-size: 12px; }
.fx-field select, .fx-field input[type="number"] { border: 1px solid var(--fx-line); border-radius: 7px; padding: 3px 6px; background: #fff; max-width: 120px; }
.fx-field.fx-block { grid-template-columns: 1fr; }
.fx-field.fx-block select { max-width: none; width: 100%; }
.fx-check { display: flex; align-items: center; gap: 7px; margin: 4px 0; font-size: 12px; cursor: pointer; }
.fx-check input { accent-color: var(--fx-navy); }
.fx-seg { display: inline-flex; border: 1px solid var(--fx-line); border-radius: 8px; overflow: hidden; background: #fff; }
.fx-seg button { border: 0; background: transparent; padding: 3px 9px; font-size: 11px; font-weight: 600; color: var(--fx-muted); border-right: 1px solid var(--fx-line); }
.fx-seg button:last-child { border-right: 0; }
.fx-seg button[aria-pressed="true"] { background: var(--fx-navy); color: #fff; }
.fx-target-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; margin: 5px 0; font-size: 12px; }
.fx-interp-sentence { font-size: 13px; line-height: 1.5; padding: 9px 11px; border-radius: 10px; background: #f3f7ff; border: 1px solid #d3e0fb; }
.fx-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.fx-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--fx-muted); font-weight: 800; padding: 4px 6px; border-bottom: 1px solid var(--fx-line); white-space: nowrap; }
.fx-table td { padding: 5px 6px; border-bottom: 1px solid var(--fx-line-2); vertical-align: top; }
.fx-table tr:last-child td { border-bottom: 0; }
.fx-tablewrap { overflow-x: auto; }
.fx-vec { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.fx-vec span { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; border: 1px dashed var(--fx-line); color: var(--fx-muted); }
.fx-vec span.fx-on { border: 1px solid #9db7f5; background: #eaf1ff; color: #1b4fc2; font-weight: 700; }
.fx-tinput { width: 64px; border: 1px solid var(--fx-line); border-radius: 6px; padding: 2px 5px; font-size: 11.5px; }

/* materials ---------------------------------------------------------------------- */
.fx-mat-group { margin: 8px 0 2px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--fx-muted); }
.fx-mat { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 8px; border: 1px solid var(--fx-line-2); border-radius: 10px; margin: 5px 0; background: #fff; transition: border-color .15s, box-shadow .15s; }
.fx-mat[aria-current="true"] { border-color: var(--fx-blue); box-shadow: 0 0 0 2px #dbe7ff; }
.fx-mat .fx-mat-name { text-align: left; background: none; border: 0; padding: 0; font-weight: 700; color: var(--fx-navy); }
.fx-mat .fx-mat-name:hover { text-decoration: underline; }
.fx-mat-meta { grid-column: 1 / 2; font-size: 11px; color: var(--fx-muted); }
.fx-mat-side { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 6px; }
.fx-mat.fx-lib { background: #fafbfd; }
.fx-icon-btn { border: 1px solid var(--fx-line); background: #fff; border-radius: 7px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; color: var(--fx-muted); }
.fx-icon-btn:hover { background: #f3f6fb; color: var(--fx-navy); }
.fx-icon-btn[aria-pressed="true"] { color: #b87400; background: #fff3d6; border-color: #f0d49a; }

/* property cards ------------------------------------------------------------------- */
.fx-pgrid { display: grid; gap: 8px; grid-template-columns: 1fr; }
.fx-pcard { border: 1px solid var(--fx-line-2); border-radius: 10px; padding: 8px 10px; background: #fcfdff; }
.fx-pcard h4 { font-size: 11.5px; font-weight: 800; display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.fx-pcard h4 i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.fx-prop { border-top: 1px dashed var(--fx-line); padding: 5px 0; }
.fx-prop:first-of-type { border-top: 0; }
.fx-prop-head { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; font-weight: 700; font-size: 12px; }
.fx-prop-val { font-weight: 800; color: var(--fx-navy); }
.fx-prop-sub { font-size: 10.5px; color: var(--fx-muted); line-height: 1.35; }
.fx-obs { margin-top: 3px; padding-left: 8px; border-left: 2px solid var(--fx-line); }
.fx-obs-row { display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: center; font-size: 11px; margin: 2px 0; }

/* evidence + graph ------------------------------------------------------------------ */
.fx-graph { width: 100%; height: auto; aspect-ratio: 460 / 420; background: radial-gradient(circle at 50% 50%, #fbfdff 0%, #f1f6fd 100%); border: 1px solid var(--fx-line-2); border-radius: 10px; display: block; touch-action: manipulation; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.fx-chip { border: 1px solid var(--fx-line); background: #fff; border-radius: 999px; padding: 1px 8px; font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.fx-chip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.fx-chip[aria-pressed="false"] { opacity: .45; }
.fx-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 10px; color: var(--fx-muted); margin-top: 4px; }
.fx-legend span::before { content: ""; display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--c); margin-right: 4px; vertical-align: middle; border-top-style: var(--d, solid); }
.fx-search { display: flex; gap: 6px; margin: 8px 0 6px; }
.fx-search input { flex: 1; min-width: 0; border: 1px solid var(--fx-line); border-radius: 8px; padding: 5px 9px; background: #fbfcff; }
.fx-hit { border: 1px solid var(--fx-line-2); border-radius: 9px; padding: 6px 8px; margin: 5px 0; background: #fff; display: grid; gap: 3px; }
.fx-hit button { text-align: left; background: none; border: 0; padding: 0; font-weight: 700; color: var(--fx-navy); font-size: 12px; }
.fx-bar { height: 5px; background: var(--fx-line-2); border-radius: 3px; overflow: hidden; }
.fx-bar > i { display: block; height: 100%; background: var(--fx-blue); border-radius: 3px; }
.fx-inspector { border-top: 1px solid var(--fx-line); margin-top: 8px; padding-top: 8px; }
.fx-kv { display: grid; grid-template-columns: 112px 1fr; gap: 2px 8px; font-size: 11.5px; }
.fx-kv dt { color: var(--fx-muted); font-weight: 600; } .fx-kv dd { margin: 0; word-break: break-word; }

/* space ------------------------------------------------------------------------------ */
.fx-space-wrap { position: relative; border: 1px solid var(--fx-line-2); border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #fbfdff, #f1f6fd); }
.fx-space { width: 100%; height: 560px; display: block; cursor: grab; touch-action: none; }
.fx-tip { position: absolute; pointer-events: none; z-index: 3; max-width: 270px; background: #0e2250; color: #fff; padding: 8px 10px; border-radius: 9px; font-size: 11.5px; box-shadow: 0 8px 20px rgba(14, 34, 80, .3); display: none; }
.fx-tip b { display: block; margin-bottom: 2px; }
.fx-toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.fx-toolbar label { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--fx-muted); font-weight: 600; }
.fx-toolbar select { border: 1px solid var(--fx-line); border-radius: 7px; padding: 3px 5px; background: #fff; font-size: 11.5px; color: var(--fx-ink); max-width: 215px; }
.fx-toolbar input[type="range"] { width: 90px; accent-color: var(--fx-navy); }
.fx-regions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fx-region { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--fx-line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 10.5px; font-weight: 700; color: var(--fx-ink); }
.fx-region i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.fx-region[aria-pressed="true"] { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); }
.fx-region b { color: var(--fx-muted); font-weight: 700; }
.fx-selbar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 11.5px; }
.fx-hint { font-size: 10.5px; color: var(--fx-muted); }

/* insights + recs ----------------------------------------------------------------------- */
.fx-insight { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--fx-line-2); align-items: start; }
.fx-insight:first-of-type { border-top: 0; }
.fx-insight .fx-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }
.fx-insight h3 { margin: 0 0 2px; font-size: 12.5px; }
.fx-insight p { font-size: 12px; color: var(--fx-ink); }
.fx-rec { display: grid; grid-template-columns: 26px 1fr; gap: 4px 10px; padding: 9px 8px; margin: 6px 0; border: 1px solid var(--fx-line-2); border-radius: 11px; background: #fff; width: 100%; text-align: left; transition: border-color .15s, box-shadow .15s; }
.fx-rec:hover { border-color: #b9c8e4; }
.fx-rec[aria-current="true"] { border-color: var(--fx-orange); box-shadow: 0 0 0 2px #ffe5c4; }
.fx-rec .fx-badge { width: 24px; height: 24px; border-radius: 50%; background: var(--fx-navy); color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.fx-rec .fx-rec-t { display: block; font-size: 12.5px; line-height: 1.3; color: var(--fx-navy); }
.fx-rec-row { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 11px; color: var(--fx-muted); margin-top: 3px; align-items: center; }
.fx-rec-row b { color: var(--fx-ink); }

/* workbench ------------------------------------------------------------------------------- */
.fx-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--fx-line); margin: 0 -14px 12px; padding: 0 14px; scrollbar-width: thin; }
.fx-tab { border: 0; background: none; padding: 8px 12px; font-weight: 700; font-size: 12px; color: var(--fx-muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.fx-tab[aria-selected="true"] { color: var(--fx-navy); border-bottom-color: var(--fx-navy); }
.fx-tabpanel { min-height: 200px; }
.fx-cols2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.fx-card { border: 1px solid var(--fx-line-2); border-radius: 11px; padding: 10px 12px; background: #fcfdff; min-width: 0; }
.fx-card h3 { margin-bottom: 7px; }
.fx-stack { display: grid; gap: 8px; }
.fx-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; }
.fx-node { border: 1px solid var(--fx-line); border-radius: 10px; padding: 7px 9px; background: #fff; min-width: 140px; max-width: 200px; flex: 1 1 150px; }
.fx-node .fx-nt { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; color: var(--fx-muted); text-transform: uppercase; }
.fx-node .fx-nn { font-weight: 800; color: var(--fx-navy); font-size: 12px; margin: 1px 0 3px; display: flex; justify-content: space-between; gap: 4px; align-items: center; }
.fx-node ul { font-size: 10.5px; color: var(--fx-muted); }
.fx-node[data-kind="SUBSTRATE"] { border-top: 3px solid var(--fx-green); } .fx-node[data-kind^="LAYER"] { border-top: 3px solid var(--fx-blue); } .fx-node[data-kind="TEST / SERVICE ENV"] { border-top: 3px solid var(--fx-orange); }
.fx-node[data-kind="PRE-TREATMENT"], .fx-node[data-kind="DRYING / CURING"], .fx-node[data-kind="INTERMEDIATE DRYING"], .fx-node[data-kind="CONDITIONING"] { border-top: 3px solid var(--fx-purple); background: #fbfaff; }
.fx-edge { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 4px; min-width: 62px; max-width: 96px; font-size: 9.5px; color: var(--fx-muted); text-align: center; line-height: 1.25; }
.fx-edge::after { content: "→"; font-size: 18px; color: var(--fx-navy); line-height: 1; }
.fx-bigcard { display: grid; gap: 14px; }
.fx-reco-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; justify-content: space-between; }
.fx-reco-head h3 { font-size: 15px; margin: 0; }
.fx-eq { color: var(--fx-muted); font-weight: 800; margin: 0 4px; }
.fx-meter { display: grid; gap: 3px; }
.fx-meter-row { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 8px; font-size: 11.5px; }
.fx-meter-row .fx-bar { height: 7px; }
.fx-range { position: relative; height: 10px; background: var(--fx-line-2); border-radius: 5px; margin: 3px 0; }
.fx-range i { position: absolute; top: 1px; bottom: 1px; border-radius: 4px; background: var(--fx-blue); opacity: .75; min-width: 3px; }
.fx-range i.fx-dash { background: repeating-linear-gradient(90deg, var(--fx-blue) 0 5px, #8fb0f7 5px 9px); }
.fx-claim { padding: 7px 0; border-top: 1px solid var(--fx-line-2); display: grid; gap: 3px; }
.fx-claim:first-child { border-top: 0; }
.fx-claim .fx-refs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.fx-ref { font-size: 10px; border: 1px solid var(--fx-line); border-radius: 5px; padding: 0 5px; background: #f7f9fe; color: var(--fx-muted); font-family: ui-monospace, Menlo, monospace; }
.fx-gap { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid var(--fx-line-2); align-items: start; font-size: 12px; }
.fx-gap:first-child { border-top: 0; }
.fx-form { display: grid; gap: 8px 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.fx-form label { display: grid; gap: 3px; font-size: 11px; font-weight: 700; color: var(--fx-muted); }
.fx-form input, .fx-form select { border: 1px solid var(--fx-line); border-radius: 7px; padding: 5px 7px; background: #fff; font-weight: 500; color: var(--fx-ink); min-width: 0; }
.fx-form .fx-pair { display: grid; grid-template-columns: 1fr 1fr 92px; gap: 4px; }

/* pareto panel ----------------------------------------------------------------------------- */
.fx-pareto-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.fx-pareto-grid #fx-radar { max-width: 420px; margin: 0 auto; }
.fx-svg { width: 100%; height: auto; display: block; background: #fcfdff; border: 1px solid var(--fx-line-2); border-radius: 10px; }
.fx-objs { display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); font-size: 11.5px; }
.fx-obj { display: grid; grid-template-columns: 1fr 78px 18px; gap: 6px; align-items: center; }
.fx-obj input[type="range"] { width: 100%; accent-color: var(--fx-navy); }
.fx-details > summary { cursor: pointer; font-weight: 700; font-size: 12px; color: var(--fx-navy); margin: 6px 0; }
.fx-contrib { display: grid; gap: 3px; margin-top: 4px; }
.fx-contrib-row { display: grid; grid-template-columns: 130px 1fr 36px; gap: 6px; align-items: center; font-size: 11px; }

/* pipeline ------------------------------------------------------------------------------------ */
.fx-weeks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fx-week { border: 1px solid var(--fx-line); border-radius: 11px; padding: 8px 10px; background: #fff; position: relative; border-top: 4px solid var(--fx-line); }
.fx-week[data-s="done"] { border-top-color: var(--fx-green); } .fx-week[data-s="proto"] { border-top-color: var(--fx-blue); } .fx-week[data-s="next"] { border-top-color: var(--fx-orange); }
.fx-week .fx-wk { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--fx-muted); }
.fx-week h3 { margin: 1px 0 3px; font-size: 12px; }
.fx-week p { font-size: 10.5px; color: var(--fx-muted); }
.fx-steps { display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); counter-reset: s; }
.fx-step { border: 1px solid var(--fx-line-2); border-radius: 10px; padding: 7px 10px 7px 38px; position: relative; background: #fff; }
.fx-step::before { counter-increment: s; content: counter(s); position: absolute; left: 9px; top: 8px; width: 21px; height: 21px; border-radius: 50%; background: #e9f0ff; color: #1b4fc2; font-weight: 800; font-size: 11px; display: grid; place-items: center; }
.fx-step h3 { margin: 0; font-size: 12px; display: flex; justify-content: space-between; gap: 6px; }
.fx-step h3 span { font-weight: 700; color: var(--fx-blue); font-size: 11px; }
.fx-step p { font-size: 10.5px; color: var(--fx-muted); }
.fx-prog { display: grid; gap: 8px; }
.fx-prog-row { display: grid; grid-template-columns: 150px 1fr 120px; gap: 8px; align-items: center; font-size: 11.5px; }
.fx-bench { display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.fx-bm { border: 1px solid var(--fx-line-2); border-radius: 10px; padding: 7px 10px; background: #fff; }
.fx-bm b { font-size: 16px; color: var(--fx-navy); }
.fx-bm p { font-size: 10.5px; color: var(--fx-muted); }
.fx-foot { padding: 6px 22px; font-size: 11px; color: var(--fx-muted); }
.fx-toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; background: var(--fx-navy); color: #fff; padding: 10px 14px; border-radius: 10px; max-width: 340px; font-size: 12px; box-shadow: 0 10px 28px rgba(14, 34, 80, .35); }
.fx-busy { opacity: .55; transition: opacity .15s; }
dialog.fx-dialog { border: 1px solid var(--fx-line); border-radius: 16px; padding: 14px; width: min(1000px, 96vw); max-height: 94vh; overflow: auto; box-shadow: 0 24px 60px rgba(14, 34, 80, .35); font-family: var(--fx-font); color: var(--fx-ink); }
dialog.fx-dialog::backdrop { background: rgba(14, 34, 80, .45); }

/* responsive -------------------------------------------------------------------------------------- */
@media (max-width: 1400px) { .fx-main { grid-template-columns: 300px minmax(0, 1fr) 340px; } }
@media (max-width: 1180px) {
  .fx-request { grid-template-columns: 1fr; }
  .fx-main { grid-template-columns: 1fr 1fr; }
  .fx-col { display: contents; }
  .fx-main > .fx-col > .fx-panel { order: var(--o, 5); }
  #fx-panel-space { grid-column: 1 / -1; --o: 1 !important; }
  #fx-panel-materials { --o: 2 !important; } #fx-panel-recs { --o: 3 !important; } #fx-panel-insights { --o: 4 !important; } #fx-panel-pareto { grid-column: 1 / -1; --o: 5 !important; }
  #fx-panel-properties { --o: 6 !important; } #fx-panel-evidence { --o: 7 !important; }
  .fx-space { height: 520px; }
  .fx-pareto-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .fx-header { grid-template-columns: 1fr; text-align: left; padding: 12px 14px; }
  .fx-title { text-align: left; } .fx-header-note { text-align: left; max-width: none; }
  .fx-brand-tag { display: none; }
  .fx-request, .fx-main, .fx-wide { padding-left: 10px; padding-right: 10px; }
  .fx-main { grid-template-columns: 1fr; }
  #fx-panel-space, #fx-panel-pareto { grid-column: auto; }
  #fx-panel-materials { --o: 2 !important; } #fx-panel-space { --o: 1 !important; }
  .fx-space { height: 420px; }
  .fx-banner { padding: 8px 14px; }
  .fx-prog-row { grid-template-columns: 1fr; gap: 3px; }
  .fx-gap { grid-template-columns: 1fr; gap: 2px; }
  .fx-meter-row { grid-template-columns: 90px 1fr 36px; }
  .fx-edge { flex-direction: row; max-width: none; min-width: 100%; justify-content: flex-start; gap: 8px; padding: 3px 0; }
  .fx-edge::after { content: "↓"; }
  .fx-node { max-width: none; flex-basis: 100%; }
  .fx-form .fx-pair { grid-template-columns: 1fr 1fr; }
  .fx-form .fx-pair select { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .fx-root * { transition: none !important; animation: none !important; } }

@media (min-width: 1181px) { .fx-root #fx-materials { max-height: 520px; overflow-y: auto; padding-right: 4px; } }
@media (max-width: 460px) { .fx-cols2 { grid-template-columns: 1fr; } }
.fx-spec-details { margin-top: 12px; }
.fx-spec-details > summary { cursor: pointer; font-weight: 800; color: var(--fx-navy); font-size: 12.5px; padding: 7px 10px; border: 1px solid var(--fx-line); border-radius: 9px; background: #f8faff; }
.fx-spec-details[open] > summary { margin-bottom: 4px; }
.fx-spec-details .fx-spec { margin-top: 8px; }

/* selected-point facets ----------------------------------------------------- */
.fx-facets { margin-top: 12px; border-top: 1px solid var(--fx-line-2); padding-top: 10px; }
.fx-facets-h { font-size: 12.5px; margin-bottom: 8px; }
.fx-facets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.fx-facet { border: 1px solid var(--fx-line); border-radius: 10px; padding: 8px 10px; background: #fbfcff; min-width: 0; }
.fx-facet h4 { display: flex; align-items: center; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--fx-muted); margin-bottom: 5px; }
.fx-facet h4 span { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--fx-navy); color: #fff; font-size: 10px; letter-spacing: 0; }
.fx-facet ul, .fx-facet ol { display: grid; gap: 3px; font-size: 11.5px; }
.fx-facet p { font-size: 11.5px; margin-top: 3px; }
.fx-flow li { position: relative; padding-left: 14px; }
.fx-flow li::before { content: "↳"; position: absolute; left: 0; color: var(--fx-muted); }
.fx-table.fx-mini { font-size: 11px; }
.fx-table.fx-mini td { padding: 3px 4px; }

/* orchestration map ---------------------------------------------------------- */
.fx-orch { display: flex; flex-direction: column; align-items: stretch; max-width: 1080px; margin: 0 auto; }
.fx-orch-card { border: 1px solid var(--fx-line); border-left: 4px solid var(--fx-blue); border-radius: 10px; background: #fff; padding: 9px 12px; min-width: 0; }
.fx-orch-card[data-auth="lang"] { border-left-color: var(--fx-purple); background: #faf8ff; }
.fx-orch-card[data-auth="data"] { border-left-color: var(--fx-teal); }
.fx-orch-card[data-auth="ui"] { border-left-color: var(--fx-navy); background: #f6f8fd; }
.fx-orch-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.fx-orch-head > div { flex: 1; min-width: 0; }
.fx-orch-head h3 { font-size: 13px; }
.fx-orch-role { font-size: 10.5px; color: var(--fx-muted); text-transform: uppercase; letter-spacing: .05em; }
.fx-orch-n { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; background: var(--fx-navy); color: #fff; font-weight: 700; font-size: 11px; }
.fx-orch-card p { font-size: 12px; margin-top: 2px; }
.fx-orch-arrow { text-align: center; color: var(--fx-muted); font-size: 18px; line-height: 1.1; padding: 2px 0; }
.fx-orch-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* open data panel -------------------------------------------------------------- */
.fx-life { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; counter-reset: none; }
.fx-life li { display: flex; align-items: center; gap: 6px; border: 1px solid var(--fx-line); background: #fbfcff; border-radius: 999px; padding: 3px 10px 3px 4px; font-size: 11.5px; font-weight: 600; }
.fx-life li span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--fx-blue); color: #fff; font-size: 10px; }
.fx-acc { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; border: 1px solid; white-space: nowrap; }
.fx-acc-OPEN_DATA { color: #12703d; background: #e7f6ed; border-color: #9fd6b5; }
.fx-acc-OA_READ { color: #1b4fc2; background: #e9f0ff; border-color: #a9c0f5; }
.fx-acc-RESTRICTED { color: #8a5106; background: #fff3dc; border-color: #f0cf8e; }
.fx-acc-PAYWALLED { color: #8d1830; background: #fdecef; border-color: #eba1ae; }
.fx-cls-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.fx-cls-rules .fx-card p { margin-top: 5px; }
.fx-disc { margin-bottom: 8px; }
.fx-disc p { margin-top: 4px; }
.fx-disc a.fx-btn { text-decoration: none; display: inline-block; }
.fx-intake { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.fx-intake-form { display: grid; gap: 10px; min-width: 0; }
.fx-intake-form fieldset { border: 1px solid var(--fx-line); border-radius: 10px; padding: 8px 10px 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; min-width: 0; }
.fx-intake-form legend { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--fx-muted); font-weight: 800; padding: 0 4px; }
.fx-intake-form label { display: grid; gap: 2px; font-size: 11px; color: var(--fx-muted); font-weight: 600; min-width: 0; }
.fx-intake-form label.fx-wide-f { grid-column: 1 / -1; }
.fx-intake-form input, .fx-intake-form select { width: 100%; min-width: 0; border: 1px solid var(--fx-line); border-radius: 8px; padding: 5px 8px; background: #fff; color: var(--fx-ink); font-weight: 400; }
.fx-intake-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-decision { display: grid; gap: 2px; padding: 9px 12px; border-radius: 10px; border: 1px solid; font-size: 12px; }
.fx-decision b { font-size: 13px; }
.fx-decision-ok { background: #e7f6ed; border-color: #9fd6b5; color: #0f5a31; }
.fx-decision-warn { background: #fff3dc; border-color: #f0cf8e; color: #7a4a05; }
.fx-decision-bad { background: #fdecef; border-color: #eba1ae; color: #8d1830; }
.fx-covtable td, .fx-covtable th { text-align: center; white-space: nowrap; }
.fx-covtable td:first-child, .fx-covtable th:first-child { text-align: left; white-space: normal; min-width: 150px; }
.fx-cov-none { background: repeating-linear-gradient(135deg, #f3f6fb 0 5px, #e8edf6 5px 10px); color: var(--fx-muted); }
.fx-cov-secondary { background: #fff9ec; }
.fx-cov-measured { background: #f1faf4; }
.fx-covtable tr.fx-off td { opacity: .55; }
.fx-tag-target { font-size: 9px; color: var(--fx-blue); text-transform: uppercase; letter-spacing: .06em; }

/* provenance chain ---------------------------------------------------------------- */
.fx-prov { border: 1px solid var(--fx-line); border-radius: 12px; padding: 10px 12px; background: #fbfcff; display: grid; gap: 8px; }
.fx-pchain { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; position: relative; }
.fx-pstep { border: 1px solid var(--fx-line); border-radius: 8px; background: #fff; padding: 6px 8px; font-size: 11.5px; min-width: 0; overflow-wrap: anywhere; position: relative; }
.fx-pstep:not(:last-child)::after { content: "→"; position: absolute; right: -9px; top: 8px; color: var(--fx-muted); font-size: 12px; z-index: 1; background: #fbfcff; line-height: 1; }
.fx-pstep h5 { display: flex; align-items: center; gap: 5px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--fx-muted); margin: 0 0 3px; }
.fx-pstep h5 span { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--fx-navy); color: #fff; font-size: 9px; letter-spacing: 0; }

@media (max-width: 1180px) { .fx-pchain { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fx-pstep:not(:last-child)::after { display: none; } .fx-intake { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .fx-orch-row { grid-template-columns: 1fr; } .fx-intake-form fieldset { grid-template-columns: 1fr; } .fx-pchain { grid-template-columns: 1fr; } }

.fx-cov-na { color: #a3adc2; font-size: 10.5px; background: #fafbfd; }

/* ===== v2 additions ======================================================== */
.fx-acc-NO_COPY { color: #fff; background: #5a1424; border-color: #5a1424; }
.fx-pill-accent { background: #e9f0ff; border-color: #a9c0f5; color: #1b4fc2; }
.fx-pill-muted { background: #f3f6fb; color: var(--fx-muted); }
.fx-pillrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.fx-pillrow .fx-sub { flex: 1 1 320px; }
.fx-life li.fx-planned { border-style: dashed; color: var(--fx-muted); background: #fff; }
.fx-life li.fx-planned span { background: #a3adc2; }
.fx-life li { cursor: default; }
.fx-hier { display: grid; gap: 3px; counter-reset: h; margin: 4px 0 8px; }
.fx-hier li { counter-increment: h; padding-left: 22px; position: relative; font-size: 12px; }
.fx-hier li::before { content: counter(h); position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 50%; background: #e9f0ff; color: var(--fx-blue); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.fx-reg td, .fx-reg th { vertical-align: top; }
.fx-reg td:first-child { min-width: 190px; }
.fx-reg .fx-mono { word-break: break-all; color: var(--fx-muted); }
.fx-flag { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; border: 1px solid; }
.fx-flag-yes { color: #12703d; background: #e7f6ed; border-color: #9fd6b5; }
.fx-flag-no { color: #8d1830; background: #fdecef; border-color: #eba1ae; }
.fx-flag-verify { color: #8a5106; background: #fff3dc; border-color: #f0cf8e; }
.fx-ent { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; border: 1px solid; white-space: nowrap; }
.fx-ent-RESOLVED { color: #12703d; background: #e7f6ed; border-color: #9fd6b5; }
.fx-ent-CANDIDATE, .fx-ent-RELATED_NOT_EQUIVALENT { color: #8a5106; background: #fff3dc; border-color: #f0cf8e; }
.fx-ent-ENTITY_UNRESOLVED, .fx-ent-UNRESOLVED { color: #8d1830; background: #fdecef; border-color: #eba1ae; }
.fx-kn { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; border: 1px solid; white-space: nowrap; }
.fx-kn-KNOWN { color: #12703d; background: #e7f6ed; border-color: #9fd6b5; }
.fx-kn-INSUFFICIENTLY_STUDIED { color: #8a5106; background: #fff3dc; border-color: #f0cf8e; }
.fx-kn-CONFLICTING { color: #8d1830; background: #fdecef; border-color: #eba1ae; }
.fx-kn-EXPERIMENTALLY_UNSUPPORTED { color: #6b1f2e; background: #f9e9ec; border-color: #d6a3ad; border-style: dotted; }
.fx-kn-UNKNOWN { color: #44506e; background: #eef1f7; border-color: #c4cde0; border-style: dashed; }
.fx-kn-NA { color: #8a96ae; background: #fafbfd; border-color: #e2e8f3; }
.fx-cov.fx-k-KNOWN { background: #e9f7ee; } .fx-cov.fx-k-INSUFFICIENTLY_STUDIED { background: #fff6e2; } .fx-cov.fx-k-CONFLICTING { background: #fdebee; }
.fx-cov.fx-k-EXPERIMENTALLY_UNSUPPORTED { background: #f7e6ea; }
.fx-cov.fx-k-UNKNOWN { background: repeating-linear-gradient(135deg, #f3f6fb 0 5px, #e3e9f4 5px 10px); color: var(--fx-muted); }
.fx-xcol { font-size: 10.5px; max-width: 110px; white-space: normal !important; border-left: 2px solid var(--fx-line); }
.fx-kstates { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.fx-kcard { border: 1px solid var(--fx-line-2); border-radius: 10px; background: #fcfdff; padding: 8px 10px; }
.fx-kcard p { margin-top: 4px; }
.fx-covcounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fx-cdot { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.fx-cdot i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 2px solid; }
.fx-cd-STRONG { color: #12703d; } .fx-cd-STRONG i { background: #1f9d57; border-color: #1f9d57; }
.fx-cd-MODERATE { color: #1b4fc2; } .fx-cd-MODERATE i { background: #8fb0f5; border-color: #2f6df0; }
.fx-cd-LIMITED { color: #8a5106; } .fx-cd-LIMITED i { background: #fff; border-color: #d97f0b; }
.fx-cd-MISSING { color: #8d1830; } .fx-cd-MISSING i { background: repeating-linear-gradient(135deg, #fff 0 2px, #eba1ae 2px 4px); border-color: #d9485f; }
.fx-cd-NA { color: var(--fx-muted); } .fx-cd-NA i { border-color: #c4cde0; }
.fx-covsum { gap: 3px 10px !important; flex-wrap: wrap; }
.fx-grouprow th { background: #f3f6fb; text-align: left !important; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--fx-muted); }
.fx-skew { display: grid; gap: 6px; margin: 6px 0; }
.fx-skew-row { display: grid; grid-template-columns: 170px minmax(120px, 1fr) minmax(180px, 1.2fr); gap: 10px; align-items: center; font-size: 12px; }
.fx-skewbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #eef1f7; }
.fx-skewbar i { background: #8fb0f5; } .fx-skewbar b { background: #d9485f; }
.fx-bar { height: 8px; background: #eef1f7; border-radius: 4px; overflow: hidden; min-width: 60px; } .fx-bar i { display: block; height: 100%; background: var(--fx-blue); }
.fx-tri { margin: 6px 0; border-top: 1px dashed var(--fx-line); padding-top: 6px; }
.fx-tri summary { cursor: pointer; font-weight: 700; font-size: 11.5px; color: var(--fx-navy); }
.fx-axes { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 6px; }
.fx-axis { display: grid; gap: 2px; } .fx-axis small { font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--fx-muted); font-weight: 700; }
.fx-disc-h { display: flex; gap: 8px; align-items: flex-start; } .fx-disc-h h3 { margin: 0; font-size: 13px; }
.fx-disc-h .fx-badge { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--fx-navy); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.fx-intake-form textarea { width: 100%; border: 1px solid var(--fx-line); border-radius: 8px; padding: 6px 8px; background: #fff; resize: vertical; min-height: 90px; }
.fx-guard { display: grid; gap: 3px; list-style: disc; padding-left: 16px !important; }
.fx-root .fx-help { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--fx-line); background: #fff; color: var(--fx-blue); font-weight: 800; font-size: 12px; line-height: 1; padding: 0; margin-left: 6px; display: inline-grid; place-items: center; }
.fx-root .fx-help:hover { background: #e9f0ff; border-color: #a9c0f5; }
.fx-panel > header .fx-help, .fx-request header .fx-help { margin-left: auto; }
.fx-orch-card .fx-pill { align-self: start; }
.fx-orch-card[data-auth="agent"] { border-left-color: var(--fx-orange); background: #fffaf2; }
.fx-examples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 2px; }
.fx-examples .fx-chip { padding: 3px 10px; font-size: 11.5px; font-weight: 600; opacity: 1; background: #fbfcff; }
.fx-examples .fx-chip:hover { background: #e9f0ff; border-color: #a9c0f5; }
.fx-sharpen { margin-top: 8px; }
.fx-root .fx-header-actions { display: flex; gap: 8px; grid-column: 3; grid-row: 1; align-self: start; justify-self: end; }
.fx-hbtn { white-space: nowrap; }
.fx-root .fx-fab { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: var(--fx-navy); color: #fff; padding: 9px 14px 9px 10px; font-weight: 700; font-size: 12px; box-shadow: 0 4px 16px rgba(14, 34, 80, .3); }
.fx-root .fx-fab:hover { background: #1b3a82; }
.fx-guide-open .fx-fab { display: none; }
.fx-toast { bottom: 64px; }

/* guide drawer */
.fx-guide { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 60; background: #fff; border-left: 1px solid var(--fx-line); box-shadow: -10px 0 32px rgba(14, 34, 80, .18); display: flex; flex-direction: column; transform: translateX(24px); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
.fx-guide[hidden] { display: none; }
.fx-guide.fx-in { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .fx-guide { transition: none; } }
.fx-guide-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--fx-line); background: #f6f8fd; }
.fx-guide-head h2 { font-size: 15px; color: var(--fx-navy); }
.fx-guide-nav { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 16px; border-bottom: 1px solid var(--fx-line-2); }
.fx-guide-nav .fx-chip { opacity: 1; font-size: 11px; padding: 2px 9px; }
.fx-root .fx-guide-nav .fx-chip[aria-pressed="true"] { background: var(--fx-navy); color: #fff; border-color: var(--fx-navy); }
.fx-guide-body { padding: 14px 16px 24px; overflow-y: auto; flex: 1; font-size: 12.5px; line-height: 1.5; display: grid; gap: 10px; align-content: start; }
.fx-guide-body h3 { font-size: 14px; color: var(--fx-navy); }
.fx-guide-body p { margin: 0; }
.fx-steps { display: grid; gap: 6px; counter-reset: s; }
.fx-steps li { counter-increment: s; padding-left: 26px; position: relative; }
.fx-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--fx-blue); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.fx-check-list { display: grid; gap: 6px; list-style: none; }
.fx-check-list li { padding-left: 14px; position: relative; }
.fx-check-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--fx-blue); }
.fx-gnote { border-left: 3px solid var(--fx-orange); background: #fff9ec; padding: 6px 10px; border-radius: 0 8px 8px 0; font-size: 12px; }
.fx-gh { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--fx-muted); font-weight: 800; }
.fx-gex { display: flex; gap: 8px; align-items: center; justify-content: space-between; border: 1px solid var(--fx-line); border-radius: 9px; padding: 6px 8px; font-size: 12px; }
.fx-gdl { display: grid; gap: 6px; } .fx-gdl dt { font-weight: 700; color: var(--fx-navy); margin-top: 4px; } .fx-gdl dd { margin: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.fx-guide-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--fx-line-2); }
.fx-guide-foot .fx-sub { margin-left: auto; }

/* tour */
.fx-tour { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.fx-tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(10, 20, 48, .55), 0 0 0 3px #fff inset; pointer-events: none; transition: all .2s ease; }
.fx-tour-pop { position: fixed; background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 40px rgba(10, 20, 48, .35); pointer-events: auto; display: grid; gap: 6px; max-width: calc(100vw - 16px); }
.fx-tour-pop h3 { font-size: 14px; color: var(--fx-navy); } .fx-tour-pop p { font-size: 12.5px; }
.fx-tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .fx-tour-hole { transition: none; } }

@media (max-width: 1100px) { .fx-covcounts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .fx-skew-row { grid-template-columns: 1fr; gap: 3px; }
  .fx-guide { width: 100vw; }
  .fx-fab span { display: none; } .fx-fab { padding: 10px 13px; }
  .fx-tabs { flex-wrap: nowrap; }
}

.fx-header { grid-template-columns: auto 1fr minmax(0, 250px) auto; }
@media (max-width: 1300px) { .fx-header { grid-template-columns: auto 1fr auto; } .fx-header-note { grid-column: 1 / -2; grid-row: 2; } .fx-root .fx-header-actions { grid-column: 3; grid-row: 1; } }
@media (max-width: 900px) { .fx-header { grid-template-columns: 1fr auto; } .fx-title { grid-column: 1 / -1; grid-row: 2; text-align: left; } .fx-header-note { grid-column: 1 / -1; grid-row: 3; } .fx-root .fx-header-actions { grid-column: 2; grid-row: 1; } }
.fx-root .fx-panel > header, .fx-root .fx-request header { position: relative; padding-right: 32px; }
.fx-root .fx-panel > header > .fx-help, .fx-root .fx-request header > .fx-help { position: absolute; right: 0; top: 0; margin: 0; }
.fx-guide-nav { max-height: none; }
.fx-root .fx-guard { list-style: disc; padding-left: 18px; }
.fx-root .fx-life + .fx-hint { margin-top: 2px; margin-bottom: 8px; }
.fx-root .fx-life { margin-bottom: 4px; }
.fx-axis .fx-ev { justify-self: start; width: auto; padding: 1px 9px; }
@media (max-width: 760px) {
  .fx-header { grid-template-columns: minmax(0, 1fr); }
  .fx-brand { grid-row: 1; } .fx-root .fx-header-actions { grid-column: 1; grid-row: 2; justify-self: start; }
  .fx-title { grid-column: 1; grid-row: 3; } .fx-header-note { grid-column: 1; grid-row: 4; }
  .fx-brand-tag { display: none; }
  .fx-title h1 { overflow-wrap: anywhere; }
}
@media (max-width: 760px) { .fx-guide-nav .fx-chip { flex: none; max-width: 100%; white-space: normal; text-align: left; } }

/* ==========================================================================
   PLATFORM (v3): header account area, mode banner, dialogs, My Research,
   settings, administration, experimental validation. Scoped to .fx-root.
   ========================================================================== */
.fx-root .fx-skip { position: absolute; left: 8px; top: -40px; z-index: 100; background: var(--fx-navy); color: #fff; padding: 6px 10px; border-radius: 6px; font-weight: 700; }
.fx-root .fx-skip:focus { top: 8px; }
.fx-title h1 .fx-slash { color: #9db0d6; font-weight: 400; margin: 0 2px; }
.fx-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fx-account { display: flex; align-items: center; gap: 8px; }
.fx-mode-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; }
.fx-mode-demo { background: #fff2d6; color: #7a4a05; border: 1px solid #f0d49a; }
.fx-mode-live { background: #e5f6ec; color: #13693a; border: 1px solid #a9dcbd; }
.fx-acct { position: relative; }
.fx-acct-btn { display: inline-flex; align-items: center; gap: 7px; max-width: 240px; }
.fx-avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--fx-navy); color: #fff; font-size: 10px; font-weight: 800; flex: none; }
.fx-acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-acct-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; min-width: 240px; background: #fff; border: 1px solid var(--fx-line); border-radius: 12px; box-shadow: 0 14px 36px rgba(14, 34, 80, .18); padding: 6px; display: grid; }
.fx-acct-menu[hidden] { display: none; }
.fx-acct-menu [role="menuitem"] { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--fx-ink); }
.fx-acct-menu [role="menuitem"]:hover, .fx-acct-menu [role="menuitem"]:focus-visible { background: #f1f5fd; }
.fx-acct-who { display: grid; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--fx-line-2); margin-bottom: 4px; font-size: 12px; }
.fx-acct-who span { color: var(--fx-muted); font-size: 11.5px; }
.fx-banner-demo { background: #fff7e8; border-bottom-color: #f3dcae; color: #7a4a05; }
.fx-banner-live-mode { background: #edf8f1; border-bottom: 1px solid #b9e2c8; color: #12502d; }
.fx-banner-err { background: #fdf0f3; border-bottom: 1px solid #eba1ae; color: #8d1830; }
.fx-banner-live { color: #5b4a23; }
.fx-banner-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.fx-nc { display: inline-flex; gap: 5px; align-items: center; padding: 2px 8px; border-radius: 6px; background: #fff; border: 1px dashed #c7a65b; color: #6b4a0b; font-size: 11px; }
.fx-nc b { font-weight: 800; letter-spacing: .04em; }
.fx-unavailable .fx-main, .fx-unavailable .fx-wide, .fx-unavailable .fx-request #fx-panel-interp { display: none; }
.fx-data-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; }
.fx-data-demo { background: #fff2d6; color: #7a4a05; }
.fx-data-live { background: #e5f6ec; color: #13693a; }
.fx-root .fx-btn.fx-link { border: 0; background: none; padding: 0; color: var(--fx-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.fx-root .fx-btn.fx-danger { background: #b4233f; border-color: #b4233f; color: #fff; }
.fx-root .fx-btn.fx-danger:hover { background: #961c33; }
.fx-root .fx-btn.fx-danger-outline { color: #a3203a; border-color: #eab3bf; }
.fx-root .fx-btn.fx-danger-outline:hover { background: #fdf0f3; }
.fx-sel-sm { border: 1px solid var(--fx-line); border-radius: 7px; padding: 3px 6px; background: #fff; font-size: 11.5px; }
.fx-warn.fx-ok { background: #edf8f1; border-color: #b9e2c8; color: #12502d; }
.fx-tag-ok { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #e5f6ec; color: #13693a; font-size: 11px; font-weight: 700; }
.fx-tag-unk { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #eef1f6; color: #4a5672; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; }
.fx-tag-warn { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #fff2d6; color: #7a4a05; font-size: 11px; font-weight: 700; }
.fx-tagchip { display: inline-block; padding: 0 7px; margin: 0 2px; border-radius: 999px; background: #eef3fc; color: #24407c; font-size: 11px; font-weight: 600; }
.fx-ev.fx-ev-none { background: #eef1f6; color: #6b7794; }
.fx-verif { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 6px; background: #e5f6ec; color: #13693a; font-size: 10.5px; font-weight: 700; cursor: help; }
.fx-quote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid #c3d4f7; background: #f6f9ff; font-size: 11.5px; color: #24345c; }
.fx-quote .fx-sub { display: block; margin-top: 3px; }
.fx-live-pill { background: #e5f6ec; border-color: #a9dcbd; color: #13693a; }
.fx-break { word-break: break-all; }
.fx-small { font-size: 11.5px; }
.fx-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fx-row-actions, .fx-card-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fx-card-actions { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--fx-line-2); }
.fx-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.fx-vks { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; }
.fx-vk b { color: var(--fx-navy); margin-right: 3px; }

/* research bar under the query planner */
.fx-rbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--fx-line); border-radius: 10px; background: #f8fafe; font-size: 12px; }
.fx-rbar-demo { background: #fffaf0; border-color: #f3dcae; color: #7a4a05; }
.fx-rbar-saved { background: #f3f8ff; border-color: #c3d4f7; }
.fx-rbar-actions { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.fx-rbar-note { flex-basis: 100%; margin: 0; color: var(--fx-muted); font-size: 11.5px; }
.fx-rbar .fx-warn { flex-basis: 100%; }

/* dialogs: modal forms, side sheet, confirmations */
dialog.fx-pfdlg { border: 1px solid var(--fx-line); border-radius: 16px; padding: 18px 20px; color: var(--fx-ink); font-family: var(--fx-font); font-size: 13px; line-height: 1.45; box-shadow: 0 24px 60px rgba(14, 34, 80, .35); max-height: 92vh; overflow: auto; }
dialog.fx-pfdlg::backdrop { background: rgba(14, 34, 80, .45); }
dialog.fx-modal { width: min(560px, 96vw); }
dialog.fx-modal.fx-wide-dlg { width: min(860px, 96vw); }
dialog.fx-confirm { width: min(460px, 94vw); z-index: 90; }
dialog.fx-sheet { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(880px, 100vw); border-radius: 16px 0 0 16px; border-right: 0; }
dialog.fx-sheet.fx-wide-dlg { width: min(1180px, 100vw); }
.fx-dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fx-dlg-head h2 { font-size: 17px; color: var(--fx-navy); margin: 0; }
.fx-dlg-head .fx-sub { margin-top: 3px; }
.fx-dlg-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.fx-confirm h2 { font-size: 16px; color: var(--fx-navy); margin: 0; }
.fx-confirm-body { font-size: 12.5px; }
.fx-pfdlg .fx-field, .fx-hist-filters .fx-field, .fx-tabpanel form .fx-field { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0; font-weight: 600; font-size: 12px; }
.fx-pfdlg .fx-field input, .fx-pfdlg .fx-field select, .fx-pfdlg .fx-field textarea, .fx-hist-filters .fx-field input, .fx-hist-filters .fx-field select { width: 100%; max-width: none; border: 1px solid #ccd7ea; border-radius: 8px; padding: 7px 9px; font: inherit; font-weight: 400; background: #fff; }
.fx-pfdlg .fx-field textarea { resize: vertical; }
.fx-pfdlg .fx-field.fx-inline { display: inline-grid; grid-template-columns: auto auto; align-items: center; }
.fx-pfdlg .fx-field.fx-inline select { width: auto; }
.fx-pfdlg .fx-check { align-items: flex-start; font-size: 12.5px; }
.fx-pfdlg .fx-check input { margin-top: 3px; }
.fx-fieldset { border: 1px solid var(--fx-line-2); border-radius: 10px; padding: 8px 12px; margin: 0; }
.fx-fieldset legend { font-weight: 700; font-size: 12px; padding: 0 4px; }
.fx-form-err { margin: 0; color: #a3203a; font-weight: 600; font-size: 12.5px; }
.fx-form-err:empty { display: none; }
.fx-form-ok { font-size: 12.5px; color: #13693a; font-weight: 600; }
.fx-form-ok:empty { display: none; }
.fx-pw { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
.fx-pw-meter { font-size: 11.5px; }
.fx-pw-ok { color: #13693a; font-weight: 700; margin: 0; }
.fx-pw-bad { margin: 0; padding-left: 16px !important; list-style: disc !important; color: #8d1830; display: grid; gap: 2px; }
.fx-legal { border: 1px solid var(--fx-line-2); border-radius: 10px; padding: 6px 10px; background: #fbfcff; }
.fx-legal summary { cursor: pointer; font-weight: 700; font-size: 12px; }
.fx-legal-body { display: grid; gap: 6px; font-size: 12px; margin-top: 6px; }
.fx-legal-body h4 { margin: 6px 0 0; font-size: 12.5px; color: var(--fx-navy); }
.fx-danger-zone { border-color: #eab3bf; background: #fffafb; }

/* My Research */
.fx-hist-filters { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(0, 1fr)); gap: 8px 10px; align-items: end; margin-bottom: 10px; }
.fx-hist-filters .fx-field input, .fx-hist-filters .fx-field select { height: 34px; padding-top: 0; padding-bottom: 0; }
.fx-hist-filters .fx-grow { grid-column: span 1; }
.fx-hist-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0 8px; border-bottom: 1px solid var(--fx-line-2); }
.fx-root .fx-hist-list { display: grid; gap: 8px; margin: 10px 0; }
.fx-hist-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--fx-line); border-radius: 11px; background: #fff; }
.fx-hist-item.fx-current { border-color: #9db7f5; box-shadow: inset 3px 0 0 var(--fx-blue); }
.fx-hist-item > input { margin-top: 4px; accent-color: var(--fx-navy); }
.fx-hist-main { min-width: 0; display: grid; gap: 3px; }
.fx-hist-title { border: 0; background: none; padding: 0; text-align: left; font-weight: 800; font-size: 13.5px; color: var(--fx-navy); cursor: pointer; }
.fx-hist-title:hover { text-decoration: underline; }
.fx-hist-q { margin: 0; font-size: 12px; color: #33415f; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fx-hist-actions { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; max-width: 330px; }
.fx-inline { display: inline-flex; gap: 4px; align-items: center; }
.fx-hist-pager { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; padding: 8px 0; }
.fx-empty { padding: 22px; text-align: center; border: 1px dashed var(--fx-line); border-radius: 12px; display: grid; gap: 6px; }
.fx-sheet-foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--fx-line-2); }

/* administration */
.fx-admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.fx-big { font-size: 24px; font-weight: 800; color: var(--fx-navy); display: block; }
.fx-actions-cell { display: flex; flex-wrap: wrap; gap: 4px; }

/* section 9 · experimental validation */
.fx-root .fx-plan-list { display: grid; gap: 8px; }
.fx-verdict { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.fx-v-inside { background: #e5f6ec; color: #13693a; }
.fx-v-outside { background: #fdeef1; color: #8d1830; }
.fx-v-no_prediction { background: #eef1f6; color: #4a5672; }

/* guide groups */
.fx-guide-group { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; width: 100%; }
.fx-guide-gl { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--fx-muted); width: 100%; margin-top: 4px; }

.fx-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }

@media (max-width: 1180px) { .fx-hist-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fx-hist-filters .fx-grow { grid-column: 1 / -1; } .fx-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .fx-header-actions { justify-content: flex-start; }
  .fx-acct-name { display: none; }
  .fx-grid2 { grid-template-columns: 1fr; }
  .fx-hist-filters { grid-template-columns: 1fr 1fr; }
  .fx-hist-item { grid-template-columns: auto minmax(0, 1fr); }
  .fx-hist-actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .fx-admin-grid { grid-template-columns: 1fr; }
  dialog.fx-sheet { width: 100vw; border-radius: 0; }
  dialog.fx-pfdlg { padding: 14px; }
  .fx-banner-actions { margin-left: 0; }
}

.fx-seg.fx-seg-wrap { display: flex; flex-wrap: wrap; max-width: 100%; }
.fx-seg.fx-seg-wrap button { flex: 1 1 auto; }

.fx-stack { align-content: start; }
.fx-fb-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 6px 14px; }
.fx-fb-row { display: grid; grid-template-columns: minmax(84px, 1fr) 76px 64px minmax(104px, 1.2fr); gap: 5px; align-items: center; font-size: 11.5px; }
.fx-fb-l { font-weight: 700; color: var(--fx-muted); }
.fx-fb-row input, .fx-fb-row select { border: 1px solid var(--fx-line); border-radius: 7px; padding: 5px 7px; background: #fff; font-weight: 500; color: var(--fx-ink); min-width: 0; width: 100%; }

.fx-guide-toc { border-bottom: 1px solid var(--fx-line-2); }
.fx-guide-toc > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--fx-navy); list-style: none; }
.fx-guide-toc > summary::-webkit-details-marker { display: none; }
.fx-guide-toc > summary::before { content: '▸'; color: var(--fx-muted); margin-right: 2px; }
.fx-guide-toc[open] > summary::before { content: '▾'; }
.fx-guide-toc > summary > span:first-child { margin-right: auto; }
.fx-guide-toc > summary .fx-sub { font-weight: 500; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.fx-guide-toc .fx-guide-nav { border-bottom: 0; padding-top: 0; max-height: 42vh; overflow-y: auto; }

.fx-search { flex-wrap: wrap; }
.fx-search > select, .fx-search > input { min-width: 0; max-width: 100%; }
#fx-compare-tool .fx-search > select { flex: 1 1 160px; }

/* ---- signed-out landing (production): service overview; the synthetic demonstration is an explicit choice ---- */
.fx-landing-mode .fx-request, .fx-landing-mode .fx-main, .fx-landing-mode .fx-wide, .fx-landing-mode #fx-mode-banner,
.fx-landing-mode [data-action="tour"], .fx-landing-mode .fx-fab { display: none !important; }
.fx-landing { max-width: 1120px; margin: 0 auto; padding: 28px 22px 8px; display: grid; gap: 18px; }
.fx-landing[hidden] { display: none; }
.fx-land-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.fx-land-hero h2 { font-size: 26px; line-height: 1.2; font-weight: 800; color: var(--fx-navy); letter-spacing: -.015em; max-width: 30ch; }
.fx-land-hero p { font-size: 14px; color: var(--fx-ink); margin-top: 10px; max-width: 62ch; }
.fx-land-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.fx-land-cta .fx-btn { padding: 9px 14px; font-size: 13px; }
.fx-land-demo-note { font-size: 11.5px; color: var(--fx-muted); margin-top: 8px; max-width: 62ch; }
.fx-land-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fx-land-kpi { background: var(--fx-card); border: 1px solid var(--fx-line); border-radius: 10px; padding: 10px 12px; }
.fx-land-kpi b { display: block; font-size: 22px; font-weight: 800; color: var(--fx-navy); font-variant-numeric: tabular-nums; }
.fx-land-kpi span { font-size: 11.5px; color: var(--fx-muted); }
.fx-land-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fx-land-grid h3 { font-size: 13px; font-weight: 800; color: var(--fx-navy); margin-bottom: 8px; }
.fx-land-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.fx-land-list li { font-size: 12px; line-height: 1.45; padding-left: 12px; position: relative; }
.fx-land-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--fx-muted); }
.fx-svc { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 8px; font-size: 12px; }
.fx-svc::before { content: ""; width: 9px; height: 9px; border-radius: 50%; margin-top: .35em; background: #9aa6bf; grid-row: span 2; }
.fx-svc-ok::before { background: var(--fx-green); } .fx-svc-off::before { background: var(--fx-orange); }
.fx-svc b { font-weight: 700; color: var(--fx-ink); } .fx-svc span { color: var(--fx-muted); font-size: 11.5px; }
.fx-land-coverage { border-left: 3px solid var(--fx-orange); padding: 8px 12px; background: #fffaf1; border-radius: 0 8px 8px 0; font-size: 12px; }
.fx-land-sources summary { cursor: pointer; font-weight: 700; color: var(--fx-navy); font-size: 12.5px; }
.fx-land-sources ol { margin: 10px 0 0 18px; display: grid; gap: 6px; font-size: 12px; }
.fx-land-sources .fx-sub { display: block; }
.fx-land-err { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.fx-banner-actions .fx-link { text-decoration: underline; }
@media (max-width: 900px) {
  .fx-land-hero, .fx-land-grid { grid-template-columns: minmax(0, 1fr); }
  .fx-land-hero h2 { font-size: 22px; }
  .fx-landing { padding: 18px 14px 4px; }
}

/* ---- header help menu (replaces the separate guide, tour and floating help buttons) ---- */
.fx-helpmenu { position: relative; }
.fx-helpmenu .fx-acct-menu { min-width: 220px; }
.fx-landing-mode .fx-helpmenu [data-action="tour"] { display: none !important; }

/* ---- discreet data notice for signed-in users (details in About the data) ---- */
.fx-banner-info { background: #f6f8fc; border-bottom: 1px solid var(--fx-line); color: var(--fx-muted); padding: 6px 22px; }
.fx-banner-info strong { letter-spacing: 0; color: var(--fx-ink); font-weight: 700; }
.fx-banner-info .fx-link { color: var(--fx-blue); text-decoration: underline; font-weight: 600; padding: 0; }

/* ---- query planner: typed requirement or uploaded document ---- */
.fx-inswitch { display: inline-flex; gap: 2px; padding: 3px; margin: 2px 0 10px; border: 1px solid var(--fx-line); border-radius: 10px; background: #f3f6fb; flex-wrap: wrap; max-width: 100%; }
.fx-inswitch-btn { border: 0; background: none; border-radius: 8px; padding: 7px 12px; font-weight: 700; font-size: 12.5px; color: var(--fx-muted); }
.fx-inswitch-btn[aria-selected="true"] { background: #fff; color: var(--fx-navy); box-shadow: 0 1px 3px rgba(14, 34, 80, .12); }
.fx-inswitch-btn:focus-visible { outline: 2px solid var(--fx-blue); outline-offset: 1px; }
.fx-file-mode [data-text-only] { display: none !important; }
.fx-drop { display: grid; justify-items: center; gap: 6px; text-align: center; border: 1.5px dashed #b8c7e3; border-radius: 12px; background: #f8faff; padding: 20px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.fx-drop:hover, .fx-drop.fx-over { border-color: var(--fx-blue); background: #eef4ff; }
.fx-drop:focus-within { outline: 2px solid var(--fx-blue); outline-offset: 2px; }
.fx-drop b { color: var(--fx-navy); font-size: 13.5px; }
.fx-drop .fx-sub { max-width: 60ch; }
.fx-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.fx-drop-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e3ecfd; color: var(--fx-blue); font-weight: 800; font-size: 18px; }
.fx-up { display: grid; gap: 10px; }
.fx-up-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--fx-muted); }
.fx-up-meta b { color: var(--fx-ink); font-weight: 700; }
.fx-upprog { height: 6px; border-radius: 99px; background: var(--fx-line-2); overflow: hidden; }
.fx-upprog i { display: block; height: 100%; background: var(--fx-blue); border-radius: 99px; transition: width .2s; }
.fx-upprog.fx-indet i { width: 35% !important; animation: fx-indet 1.2s ease-in-out infinite; }
@keyframes fx-indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.fx-up-card { border: 1px solid var(--fx-line); border-radius: 10px; padding: 10px 12px; background: #fff; display: grid; gap: 8px; }
.fx-up-card h3 { font-size: 13px; font-weight: 800; color: var(--fx-navy); }
.fx-up-card h4 { font-size: 12px; font-weight: 800; color: var(--fx-ink); margin-top: 2px; }
.fx-up-sets { display: grid; gap: 6px; }
.fx-up-set { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; border: 1px solid var(--fx-line); border-radius: 9px; padding: 8px 10px; font-size: 12px; cursor: pointer; }
.fx-up-set:has(input:checked) { border-color: var(--fx-blue); background: #f5f8ff; }
.fx-up-set input { margin-top: 3px; }
.fx-up-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.fx-up-table th { text-align: left; font-weight: 700; color: var(--fx-muted); border-bottom: 1px solid var(--fx-line); padding: 5px 6px; white-space: nowrap; }
.fx-up-table td { border-bottom: 1px solid var(--fx-line-2); padding: 5px 6px; vertical-align: top; }
.fx-up-table td q { color: var(--fx-ink); font-style: normal; }
.fx-loc { display: inline-block; font-size: 10.5px; font-weight: 700; color: #1b3f8f; background: #eef4ff; border: 1px solid #c3d4f7; border-radius: 6px; padding: 0 5px; white-space: nowrap; }
.fx-basis { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 0 5px; border: 1px solid var(--fx-line); white-space: nowrap; }
.fx-basis-stated { color: #12502d; background: #edf8f1; border-color: #b9e2c8; }
.fx-basis-interpreted { color: #7a4a05; background: #fff6e6; border-color: #f3dcae; }
.fx-basis-default { color: var(--fx-muted); background: #f3f6fb; }
.fx-up-lines { max-height: 320px; overflow: auto; border: 1px solid var(--fx-line-2); border-radius: 8px; padding: 6px 8px; font-size: 11.5px; display: grid; gap: 3px; background: #fbfcff; }
.fx-up-line { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; }
.fx-up-line .fx-sub { font-size: 10.5px; }
.fx-up-readas { color: var(--fx-muted); font-size: 11px; }
.fx-up-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fx-up-recent { display: grid; gap: 4px; font-size: 12px; }
.fx-up-recent li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.fx-up-src { font-size: 11.5px; border-left: 3px solid var(--fx-blue); background: #f5f8ff; padding: 6px 10px; border-radius: 0 8px 8px 0; }
@media (max-width: 760px) {
  .fx-up-line { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fx-up-table thead { display: none; }
  .fx-up-table tr { display: grid; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--fx-line-2); }
  .fx-up-table td { border: 0; padding: 1px 0; }
  .fx-up-table td[data-l]::before { content: attr(data-l) ": "; color: var(--fx-muted); font-weight: 700; }
  .fx-inswitch { display: flex; } .fx-inswitch-btn { flex: 1 1 auto; }
}

/* ---- evidence basis callout above the recommendations ---- */
.fx-evbasis { border: 1px solid #c3d4f7; background: #f5f8ff; border-radius: 10px; padding: 8px 10px; font-size: 11.5px; color: var(--fx-ink); margin-bottom: 10px; }
.fx-evbasis > summary { cursor: pointer; font-weight: 800; color: #1b3f8f; font-size: 12px; list-style-position: inside; }
.fx-evbasis ul { margin: 6px 0 0 16px; display: grid; gap: 3px; }
.fx-evbasis .fx-sub { margin-top: 4px; }

/* ---- methodology, evidence sources and audit trail (one collapsible section) ---- */
.fx-method { background: var(--fx-card); border: 1px solid var(--fx-line); border-radius: var(--fx-radius); box-shadow: var(--fx-shadow); }
.fx-method > summary { cursor: pointer; display: grid; gap: 2px; padding: 14px 16px; list-style: none; }
.fx-method > summary::-webkit-details-marker { display: none; }
.fx-method > summary::before { content: "+"; float: right; font-weight: 800; color: var(--fx-blue); font-size: 18px; line-height: 1; }
.fx-method[open] > summary::before { content: "–"; }
.fx-method-h { font-size: 14px; font-weight: 800; color: var(--fx-navy); }
.fx-method-body { display: grid; gap: 14px; padding: 0 14px 14px; }
.fx-method-body > .fx-panel { box-shadow: none; }

/* ---- My Research: documents and activity ---- */
.fx-reg-list { display: grid; gap: 6px; }
.fx-reg-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; border: 1px solid var(--fx-line); border-radius: 9px; padding: 8px 10px; font-size: 12px; }
.fx-reg-item .fx-sub { font-size: 11px; }
.fx-reg-type { font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--fx-muted); }
.fx-land-grid.fx-land-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .fx-land-grid.fx-land-grid-2 { grid-template-columns: minmax(0, 1fr); } }
.fx-legal-body h3 { font-size: 13px; font-weight: 800; color: var(--fx-navy); margin-top: 6px; }

/* header: brand | title | Help and account controls on one row on desktop and tablet */
@media (min-width: 1301px) { .fx-header { grid-template-columns: auto 1fr auto; } }
@media (min-width: 901px) { .fx-root .fx-header-actions { flex-wrap: nowrap; align-self: center; } }

/* My Research → Documents and activity: buttons keep their natural height and the sections are clearly separated */
.fx-reg-item { align-items: center; }
.fx-reg-item > .fx-hist-actions { align-items: center; align-content: center; }
.fx-sheet-h3 { margin: 18px 0 6px; }
.fx-sheet-h3:first-of-type { margin-top: 10px; }
@media (max-width: 640px) {
  .fx-reg-item { grid-template-columns: minmax(0, 1fr); }
  .fx-reg-item > .fx-hist-actions { justify-content: flex-start; max-width: none; }
}

.fx-up-src-other { border-left-color: #9aa7bf; background: #f7f8fb; color: var(--fx-muted); }
/* requirement-set chooser: left-aligned, clear selected state */
.fx-root .fx-up-set { width: 100%; text-align: left; background: #fff; color: var(--fx-ink); font-weight: 400; }
.fx-root .fx-up-set:hover { border-color: #9db7f5; }
.fx-root .fx-up-set[aria-pressed="true"] { border-color: var(--fx-blue); background: #f3f7ff; box-shadow: inset 3px 0 0 var(--fx-blue); }
/* narrow screens: the header buttons sit at the left, so the Help menu opens to the right of its button */
@media (max-width: 900px) {
  .fx-helpmenu .fx-acct-menu { right: auto; left: 0; max-width: calc(100vw - 32px); }
}
/* methodology section: the open/close sign sits at the right of the heading (the summary is a grid, so it is positioned) */
.fx-method > summary { position: relative; padding-right: 48px; }
.fx-method > summary::before { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); float: none; width: 22px; height: 22px; border: 1px solid var(--fx-line); border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: #fff; }
.fx-method > summary:hover::before { background: #e9f0ff; border-color: #a9c0f5; }
