/* fraew.css — the FRAEW drafter screen (owner, 6 Oct 2026).
 *
 * Only what Guidex does not already have. The header reuses the report
 * screen's own bar (.gx-report-header … in fire-strategy-mode/
 * report-assistant.css, whose --gxr-* tokens are declared on :root); the chat
 * reuses Guidex's chat classes (.message, .bubble, .gx-mark, .gf-chat-pill,
 * .mode-seg, .send-btn, .welcome …); the Knowledge hub is Guidex's own,
 * borrowed while the screen is open. What is here: the screen's three panes,
 * the report's pages, the ticks, and the drafter's own cards (ported from the
 * feature's word-pages.css and gx-chat.css). */

/* ══ The screen ══ */
.gx-fraew-screen {
  position: fixed;
  inset: 0;
  z-index: 8800;
  background: var(--gxr-canvas);
  color: var(--gxr-ink);
  display: flex;
  flex-direction: column;
  font-family: var(--gxr-font);
}
.gx-fraew-screen[hidden] { display: none; }
.gx-fraew-screen .fx-chip {
  font-size: 11px; font-weight: 600; letter-spacing: .04em; color: #fff;
  background: var(--gxr-accent); border-radius: var(--gxr-r-chip); padding: 2px 7px; white-space: nowrap;
}
.gx-fraew-screen .gx-report-actions .fx-download { background: var(--gxr-accent); border-color: var(--gxr-accent); color: #fff; }
.gx-fraew-screen .gx-report-actions .fx-download:hover:not(:disabled) { background: var(--gxr-accent-deep); color: #fff; }

/* The launcher's FRAEW tile: a button while the drafter is switched on, the
   inert tile while it is off (projects.js gfSyncFraewTile). */
.gx-launcher-card[hidden] { display: none; }

/* Opening a FRAEW project: the list stays up until the drafter is up. */
body.gx-fraew-opening #app { display: none !important; }
body.gx-fraew-opening #projectsLanding { display: flex !important; }

/* Above the screen: the reader, the toast, the hub's move menu. The reader
   takes the right side and the screen gives it room, as for Fire Strategy. */
body.gx-fraew-active #toast { z-index: 8850; }
body.gx-fraew-active .gf-source-slideout { z-index: 8820; }
body.gx-fraew-active .gx-hub-move-menu { z-index: 8840; }
body.gx-fraew-active.gf-source-open .gx-fraew-screen { right: var(--gf-source-w); }
body.gx-fraew-active.gf-source-open .gx-fraew-screen .gx-report-save-state,
body.gx-fraew-active.gf-source-open .gx-fraew-screen .gx-report-brand { display: none; }
/* The reader open beside the drafter takes the hub's place (the feature's own
   reader opened over the hub), so the report and the chat keep their room.
   !important: a width the engineer dragged is an inline style. */
body.gx-fraew-active.gf-source-open #fxLeft,
body.gx-fraew-active.gf-source-open .fx-split[data-split="left"] { display: none; }
body.gx-fraew-active.gf-source-open #fxRight { flex-basis: 45% !important; width: 45% !important; min-width: 300px; }

.fx-main {
  flex: 1 1 auto; min-height: 0; display: flex; gap: 12px; padding: 12px; overflow: hidden;
}
.fx-panel {
  background: var(--gxr-surface); border: 1px solid var(--gxr-border); border-radius: 14px;
  display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden;
}
#fxLeft { flex: 0 0 24%; width: 24%; }
#fxPane { flex: 1 1 auto; }
#fxRight { flex: 0 0 30%; width: 30%; }
.fx-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--gxr-border);
}
.fx-eyebrow {
  font-family: var(--gxr-font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gxr-muted);
}
.fx-count { font-family: var(--gxr-font-mono); font-size: 10.5px; color: var(--gxr-muted); white-space: nowrap; }
.fx-pane-head { display: block; }
.fx-pane-head h2 { margin: 2px 0 0; font-family: var(--gxr-font-display); font-size: 16px; font-weight: 600; color: var(--gxr-ink); }
.fx-pane-head p { margin: 2px 0 0; font-size: 11.5px; color: var(--gxr-muted); }

/* ══ The Knowledge hub, borrowed ══ */
#fxHubHost { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 8px 10px; }
#fxHubHost .doc-item { padding-left: 6px; }
.fx-tick { display: inline-flex; align-items: center; flex: 0 0 auto; margin-right: 6px; cursor: pointer; }
.fx-tick input {
  appearance: none; -webkit-appearance: none; width: 15px; height: 15px; margin: 0; flex: 0 0 auto;
  border: 1.5px solid var(--gxr-border-strong); border-radius: 4px; background: var(--gxr-surface);
  display: inline-grid; place-items: center; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.fx-tick input:checked { background: var(--gxr-accent); border-color: var(--gxr-accent); }
.fx-tick input:checked::after {
  content: ""; width: 7px; height: 3.5px; border: 2px solid #fff; border-top: 0; border-right: 0;
  transform: translateY(-1px) rotate(-45deg);
}
.fx-tick input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--gxr-focus); }
.gx-hub-row > .fx-tick { margin-right: 4px; }
.fx-reading {
  display: inline-block; margin-left: 6px; font-family: var(--gxr-font-mono); font-size: 10px; color: var(--gxr-muted);
}

/* ══ Drag handles on the pane borders (fraew-split.js) ══ */
.fx-split { flex: 0 0 9px; margin: 0 -10px; position: relative; z-index: 6; cursor: col-resize; touch-action: none; }
.fx-split::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%);
  background: transparent; transition: background 140ms var(--ease);
}
.fx-split:hover::after, .fx-split.is-drag::after, .fx-split:focus-visible::after { background: var(--flame); }
.fx-split:focus-visible { outline: none; }
body.fx-resizing { cursor: col-resize !important; user-select: none; }
body.fx-resizing canvas, body.fx-resizing iframe { pointer-events: none; }

/* ══ The report pages: grey canvas, white pages, a slim status bar ══ */
#fxPages { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative; background: #e8e8e8; }
#fxPagesInner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 18px 28px 28px 54px; /* room on the left for the AI markers */
}
#fxPages .wp-page { position: relative; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .04); }
#fxPages .wp-canvas { display: block; }
#fxPages .wp-marks { position: absolute; inset: 0; pointer-events: none; }

/* The AI marker: a green pill in the grey margin, level with the heading;
   it widens to "Fill with AI" on hover. */
#fxPages .wp-mark {
  position: absolute; left: -46px; height: 20px; padding: 0 7px 0 5px;
  display: inline-flex; align-items: center; gap: 3px; pointer-events: auto; cursor: pointer;
  border: 0; border-radius: 999px; background: var(--green); color: #fff;
  font: 700 10px/1 var(--font); letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22), 0 0 0 2px rgba(255, 255, 255, .9);
  transition: background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  z-index: 3;
}
#fxPages .wp-mark svg { width: 11px; height: 11px; flex: 0 0 auto; }
#fxPages .wp-mark__more { display: none; font-weight: 600; }
#fxPages .wp-mark:hover, #fxPages .wp-mark:focus-visible { background: var(--green-deep); transform: translateX(1px); box-shadow: 0 2px 8px rgba(47, 156, 88, .45), 0 0 0 2px #fff; outline: none; }
#fxPages .wp-mark:hover .wp-mark__ai, #fxPages .wp-mark:focus-visible .wp-mark__ai { display: none; }
#fxPages .wp-mark:hover .wp-mark__more, #fxPages .wp-mark:focus-visible .wp-mark__more { display: inline; }
#fxPages .wp-mark.is-active { background: var(--ink); box-shadow: 0 0 0 2px var(--green), 0 2px 8px rgba(0, 0, 0, .3); }
#fxPages .wp-mark.is-done { background: #fff; color: var(--green); box-shadow: 0 0 0 1px var(--green); }
#fxPages .wp-mark.is-done:hover { background: var(--green); color: #fff; }
#fxPages .wp-mark.is-done.is-active { background: var(--ink); color: #fff; }

#fxPages .wp-state {
  display: flex; align-items: center; gap: 10px; margin-top: 80px;
  font: 13px var(--font); color: #605e5c;
}
.gx-fraew-screen .wp-spin {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid #c8c6c4; border-top-color: var(--green);
  animation: fx-spin .8s linear infinite;
}
@keyframes fx-spin { to { transform: rotate(360deg); } }

.fx-status {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 26px; padding: 0 10px; background: #f3f2f1; border-top: 1px solid #e1dfdd;
  font: 11.5px var(--font); color: #605e5c; user-select: none;
}
.fx-status-zoom { display: flex; align-items: center; gap: 2px; }
.fx-status button {
  border: 0; background: transparent; color: #605e5c; font: inherit; cursor: pointer;
  min-width: 22px; height: 20px; border-radius: 3px; padding: 0 5px;
}
.fx-status button:hover { background: #e1dfdd; color: #201f1e; }
#fxZoomLabel { min-width: 38px; text-align: center; }
.fx-busy { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; margin-left: 12px; color: var(--green); }
.fx-busy[hidden] { display: none; }
.fx-busy .wp-spin { width: 10px; height: 10px; border-width: 1.5px; }

/* a figure frame: drop a picture on it, or click it */
#fxPages .wp-figs { position: absolute; inset: 0; pointer-events: none; }
#fxPages .wp-fig {
  position: absolute; pointer-events: auto; border: 2px dashed transparent; border-radius: 2px;
  display: flex; align-items: center; justify-content: center; transition: border-color .12s, background .12s;
}
#fxPages .wp-fig:hover, #fxPages .wp-fig.is-over { border-color: var(--green); background: rgba(47, 156, 88, .08); }
#fxPages .wp-fig.is-over { background: rgba(47, 156, 88, .18); }
#fxPages .wp-fig-hint { display: none; flex-direction: column; gap: 4px; align-items: center; }
#fxPages .wp-fig:hover .wp-fig-hint, #fxPages .wp-fig.is-over .wp-fig-hint, #fxPages .wp-fig:focus-within .wp-fig-hint { display: flex; }
#fxPages .wp-fig-hint button {
  border: 0; border-radius: 6px; padding: 6px 10px; background: var(--green); color: #fff; cursor: pointer;
  font: 600 12px var(--font); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); line-height: 1.25;
}
#fxPages .wp-fig-hint button small { font-weight: 400; opacity: .9; }
#fxPages .wp-fig-hint button[data-act="remove"] { background: #fff; color: #a33224; }
#fxPages .wp-fig.is-busy { border-color: var(--green); background: rgba(255, 255, 255, .6); }
#fxPages .wp-fig.is-busy .wp-fig-hint { display: none; }

/* ══ The chat: Guidex's chat, fitted to a column ══ */
#fxChat {
  flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0;
  background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased;
}
/* Guidex's chat lays out a whole page; here it is one column, so its page
   paddings give way (!important: Guidex's own rule is). */
#fxChat .chat-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 18px 14px 8px 8px !important; gap: 20px; }
#fxChat .chat-input-area { flex: 0 0 auto; padding: 14px 12px 4px !important; }
#fxChat .message { gap: 8px; }
#fxChat .message.user { padding-left: 40px; }
#fxChat .message.user > .bubble { max-width: 100% !important; }
#fxChat .gx-mark { width: 28px; height: 28px; font-size: 14px; box-shadow: none; }
#fxChat .message.assistant > .bubble { font-size: 13.5px; line-height: 1.6; min-width: 0; }
#fxChat .message.assistant table { display: block; overflow-x: auto; font-size: 12px; }
#fxChat .message.assistant th, #fxChat .message.assistant td { padding: 6px 8px; }
#fxChat .gf-chat-pill { padding: 10px 12px 8px; }
#fxChat .chat-input, #fxChat .chat-input:focus { outline: 0; box-shadow: none; border: 0; }
#fxChat .visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
#fxChat .welcome { margin: auto 0; padding: 12px 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
#fxChat.gf-has-messages .welcome { display: none; }
#fxChat .welcome .gx-mark { width: auto; height: auto; font-size: 20px; margin-bottom: 4px; }
#fxChat .welcome-title { font-family: var(--font-display); font-size: 21px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); margin: 0; line-height: 1.25; }
#fxChat .welcome-subtitle { font-size: 13px; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
#fxChat .suggestions { display: flex; flex-direction: column; gap: 6px; width: 100%; }
#fxChat .suggestion {
  display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: var(--r); background: var(--surface); font-size: 12.5px; color: var(--ink-soft);
  cursor: pointer; transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
#fxChat .suggestion:hover { border-color: var(--border-strong); background: var(--hover); }
#fxChat .suggestion-arrow { color: var(--flame); font-family: var(--font-mono); }
#fxChat .fx-note { align-self: center; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); padding: 4px 8px; }

/* Guidance pills: Guidex's .gf-citation look, geometry constant on hover. */
#fxChat .gf-citation {
  display: inline; background: transparent; border: 0; border-bottom: 1px dashed var(--ink-soft);
  border-radius: 3px; padding: 0 4px 1px; margin: 0 -2px; color: var(--ink); font-weight: 500;
  font-size: inherit; line-height: inherit; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: color 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}
#fxChat .gf-citation::after {
  content: '↗'; display: inline-block; margin-left: 2px; font-size: .82em; color: inherit;
  vertical-align: baseline; opacity: .6; transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}
#fxChat .gf-citation:hover, #fxChat .gf-citation.active, #fxChat .gf-citation:focus-visible { background: var(--hover); border-bottom: 1px solid var(--ink); color: var(--ink); outline: 0; }
#fxChat .gf-citation:hover::after { transform: translate(1px, -1px); opacity: .9; }
#fxChat .gf-citation.gf-citation-unverified { color: var(--ink-soft); cursor: default; }
#fxChat .gf-citation.gf-citation-unverified::after { opacity: .45; }

/* File and evidence pills: the solid chip, apart from the dashed guidance. */
#fxChat .gx-ev, .gx-find-pop .gx-ev {
  display: inline-flex; align-items: center; gap: 5px; margin: 0 2px; padding: 1px 7px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.6; color: var(--ink-soft);
  vertical-align: 1px; cursor: pointer; white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
#fxChat .gx-ev:hover, .gx-find-pop .gx-ev:hover { background: var(--hover); border-color: var(--ink-soft); }
#fxChat .gx-ev.active, .gx-find-pop .gx-ev.active { background: var(--hover); border-color: var(--ink); }
#fxChat .gx-ev__dot, .gx-find-pop .gx-ev__dot { width: 6px; height: 6px; border-radius: 999px; background: var(--flame); flex: 0 0 auto; }
#fxChat .gx-ev--file, .gx-find-pop .gx-ev--file { gap: 4px; font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--ink); }
#fxChat .gx-ev__icon, .gx-find-pop .gx-ev__icon { width: 12px; height: 12px; color: var(--flame-deep); flex: 0 0 auto; }
#fxChat .gx-ev--pending { opacity: .6; }
#fxChat .gx-sources {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
#fxChat .gx-sources .gx-ev { margin: 0; }
#fxChat .gx-sources__label {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; width: 100%;
}

/* The guidance strip: PAS 9980:2026 locked on, plus one more standard. */
#fxChat .gx-guidance {
  flex: 0 0 auto; display: flex; align-items: center; flex-wrap: nowrap; gap: 3px; overflow-x: auto; scrollbar-width: none;
  padding: 6px 10px; border-bottom: 1px solid var(--border); background: var(--surface);
}
#fxChat .gx-guidance__label {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 2px;
}
#fxChat .gx-std {
  display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; flex: 0 0 auto; position: relative;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg);
  font-size: 10.5px; font-weight: 500; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap;
  transition: border-color 140ms var(--ease), background 140ms var(--ease), color 140ms var(--ease);
}
#fxChat .gx-std input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
#fxChat .gx-std:hover { border-color: var(--border-strong); color: var(--ink-soft); }
#fxChat .gx-std.is-on { border-color: var(--green); background: var(--green-soft); color: var(--ink); }
#fxChat .gx-std.is-fixed { cursor: default; border-color: var(--green); background: var(--green); color: #fff; }
#fxChat .gx-std.is-off { cursor: not-allowed; opacity: .5; }
#fxChat .gx-std svg { width: 10px; height: 10px; flex: 0 0 auto; }
#fxChat .gx-std:focus-within { outline: 2px solid rgba(47, 156, 88, .35); outline-offset: 1px; }

/* ══ The section chat (fraew-section.js) ══ */
#fxChat .gx-section-bar {
  display: none; flex: 0 0 auto; align-items: center; gap: 6px; padding: 6px 10px;
  border-bottom: 1px solid var(--border); background: rgba(47, 156, 88, .07); font-size: 12px; color: var(--ink);
}
#fxChat .gx-section-bar.is-on { display: flex; }
#fxChat .gx-sec-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
#fxChat .gx-sec-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fxChat .gx-sec-leave {
  border: 0; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; width: 22px; height: 22px;
  border-radius: 4px; cursor: pointer;
}
#fxChat .gx-sec-leave:hover { background: var(--hover); color: var(--ink); }

#fxChat .gx-proposal > .bubble { max-width: 100% !important; }
#fxChat .gx-prop-head { font-weight: 600; color: var(--ink); font-size: 13.5px; margin-bottom: 4px; }
#fxChat .gx-prop-kicker {
  display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500;
}
#fxChat .gx-prop-msg { margin: 0 0 10px; font-size: 13px; }
#fxChat .gx-prop-wait { margin: 2px 0 8px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
#fxChat .gx-prop-known {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 999px; padding: 0 6px;
}
#fxChat .gx-prop-questions:empty { display: none; }
#fxChat .gx-prop-questions { margin-top: 10px; padding: 8px 10px; border-radius: 6px; background: rgba(214, 158, 46, .09); font-size: 12.5px; }
#fxChat .gx-prop-qhead { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
#fxChat .gx-prop-questions ul, #fxChat .gx-prop-questions ol { margin: 0; padding-left: 18px; }
#fxChat .gx-prop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
#fxChat .gx-prop-confirm {
  border: 1px solid var(--green); background: var(--green); color: #fff; font-size: 12px; font-weight: 600;
  border-radius: 6px; padding: 5px 12px; cursor: pointer;
}
#fxChat .gx-prop-confirm:disabled { opacity: .45; cursor: not-allowed; }
#fxChat .gx-prop-confirm.is-done { background: #fff; color: var(--green); opacity: 1; cursor: default; }

/* Findings: one thin line; click to open the list. */
#fxChat .gx-find { margin: 6px 0 0; }
#fxChat .gx-find-bar {
  width: 100%; display: flex; align-items: center; gap: 6px; padding: 5px 2px;
  border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: transparent;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; color: var(--green); cursor: pointer; text-align: left;
}
#fxChat .gx-find-bar:hover { background: rgba(47, 156, 88, .06); }
#fxChat .gx-find-caret { width: 10px; color: var(--muted); }
#fxChat ol.gx-find-list { list-style: none; margin: 0; padding: 2px 0 4px; counter-reset: find; border-bottom: 1px solid var(--border); }
#fxChat .gx-find-row {
  counter-increment: find; display: grid; grid-template-columns: 18px minmax(0, 40%) 1fr auto; gap: 6px; align-items: baseline;
  padding: 4px 4px; border-radius: 4px; font-size: 12px; cursor: default;
}
#fxChat .gx-find-row::before { content: counter(find) "."; font-family: var(--font-mono); font-size: 10px; color: var(--muted-2); }
#fxChat .gx-find-row:hover { background: var(--hover); }
#fxChat .gx-find-label { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fxChat .gx-find-val { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fxChat .gx-find-flag, .gx-find-pop .gx-find-flag {
  font-family: var(--font-mono); font-size: 9.5px; color: #5b6b8c; border: 1px solid #c9d1e3; border-radius: 999px; padding: 0 5px; white-space: nowrap;
}

/* hover preview of one finding (lives on <body>, above the screen) */
.gx-find-pop {
  position: fixed; z-index: 8845; display: none; padding: 10px 12px; border-radius: 8px;
  background: #fff; border: 1px solid var(--border); box-shadow: 0 8px 28px rgba(20, 24, 30, .16);
  font: 12.5px/1.5 var(--font); color: var(--ink-soft);
}
.gx-find-pop.is-on { display: block; }
.gx-find-pop__label { font-size: 11px; color: var(--muted); margin-bottom: 2px; display: flex; gap: 6px; align-items: center; }
.gx-find-pop__val { color: var(--ink); font-size: 13px; margin-bottom: 6px; }
.gx-find-pop__why { font-size: 11.5px; color: #4b5563; margin-bottom: 6px; }
.gx-find-pop__why b { color: #5b6b8c; font-weight: 600; }
.gx-find-pop__item { border-top: 1px solid #f0f1f3; padding-top: 6px; margin-top: 6px; }
.gx-find-pop__none { font-size: 11px; color: var(--muted-2); }
.gx-find-pop .gx-prop-known { font: 10px var(--font-mono); color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 999px; padding: 0 6px; }
.gx-find-pop__src { display: flex; flex-wrap: wrap; gap: 5px; border-top: 1px solid #f0f1f3; padding-top: 7px; }
.gx-find-pop__src:empty { display: none; }

/* Risk-factor tables: one click for Influence and Weight. */
#fxChat .gx-factors { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 12px; }
#fxChat .gx-fx-table, #fxChat .gx-rule, #fxChat .gx-wait { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
#fxChat .gx-fx-head, #fxChat .gx-rule-head, #fxChat .gx-wait-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px;
  background: var(--sidebar); color: var(--muted); border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
#fxChat .gx-fx-head > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fxChat .gx-fx-cols { display: flex; gap: 6px; font-weight: 500; }
#fxChat .gx-fx-cols span:first-child { width: 118px; text-align: center; }
#fxChat .gx-fx-cols span:last-child { width: 66px; text-align: center; }
#fxChat .gx-fx-row { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-top: 1px solid #f0eeeb; font-size: 11.5px; }
#fxChat .gx-fx-row:nth-child(odd) { background: #fafaf9; }
#fxChat .gx-fx-ref { flex: 0 0 30px; font-family: var(--font-mono); font-size: 10.5px; color: #6b6b6b; }
#fxChat .gx-fx-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
#fxChat .gx-fx-name:hover { text-decoration: underline dotted; }
#fxChat .gx-seg { flex: 0 0 auto; display: inline-flex; gap: 2px; }
#fxChat .gx-seg--infl { width: 118px; }
#fxChat .gx-seg--infl .gx-seg-btn[data-v="N/A"] { flex-grow: 1.5; }
#fxChat .gx-seg--weight { width: 66px; }
#fxChat .gx-seg--none { justify-content: center; color: #b5b3b0; }
#fxChat .gx-seg-btn {
  flex: 1 1 0; min-width: 0; height: 20px; padding: 0 2px; border: 1px solid #dcdad7; border-radius: 4px;
  background: #fff; color: #555; font-size: 10.5px; font-weight: 600; cursor: pointer; line-height: 1; white-space: nowrap;
}
#fxChat .gx-seg-btn:hover { border-color: #9a9894; color: #222; }
/* the AI's suggestion: dashed until you click it */
#fxChat .gx-seg-btn.is-on.is-ai { border: 1.5px dashed currentColor; background: #fff; }
#fxChat .gx-seg-btn.is-on.is-mine { color: #fff; border-color: transparent; }
#fxChat .gx-seg--infl .gx-seg-btn[data-v="Positive"].is-on { color: #2f8a4c; }
#fxChat .gx-seg--infl .gx-seg-btn[data-v="Negative"].is-on { color: #c0392b; }
#fxChat .gx-seg--infl .gx-seg-btn[data-v="Neutral"].is-on, #fxChat .gx-seg--infl .gx-seg-btn[data-v="N/A"].is-on { color: #6b6b6b; }
#fxChat .gx-seg--weight .gx-seg-btn.is-on { color: var(--ink); }
#fxChat .gx-seg-btn.is-on.is-mine[data-v="Positive"] { background: #2f8a4c; color: #fff; }
#fxChat .gx-seg-btn.is-on.is-mine[data-v="Negative"] { background: #c0392b; color: #fff; }
#fxChat .gx-seg-btn.is-on.is-mine[data-v="Neutral"], #fxChat .gx-seg-btn.is-on.is-mine[data-v="N/A"] { background: #6b6b6b; color: #fff; }
#fxChat .gx-seg--weight .gx-seg-btn.is-on.is-mine { background: var(--ink); color: #fff; }
#fxChat .gx-fx-row.needs-infl .gx-seg--infl .gx-seg-btn,
#fxChat .gx-fx-row.needs-weight .gx-seg--weight .gx-seg-btn { border-color: #e0a800; background: #fff8e1; }
#fxChat .gx-fx-balance {
  display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-top: 1px solid #e3e1de; background: #f6f5f3; font-size: 11px;
}
#fxChat .gx-bal-up { color: #a33224; }
#fxChat .gx-bal-down { color: #2a7a45; }

/* Rule A: the section-13 levels the app suggests. */
#fxChat .gx-rule { margin: 8px 0 4px; }
#fxChat .gx-rule-row { padding: 6px 8px; border-top: 1px solid #f0eeeb; }
#fxChat .gx-rule-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
#fxChat .gx-rule-label { white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--ink); }
#fxChat .gx-seg--rule { gap: 3px; }
#fxChat .gx-seg--rule .gx-seg-btn { flex: 0 0 auto; padding: 0 6px; font-weight: 500; color: var(--ink); }
#fxChat .gx-seg--rule .gx-seg-btn.is-on.is-mine { background: var(--ink); color: #fff; }
#fxChat .gx-seg--rule .gx-seg-btn.is-wanted { border-color: #e0a800; background: #fff8e1; }
#fxChat .gx-rule-why { margin-top: 3px; font-size: 11px; color: var(--muted); line-height: 1.35; }
#fxChat .gx-rule-why.is-mine { color: #8a5a00; }
#fxChat .gx-rule-ask { display: flex; gap: 4px; margin-top: 5px; }
#fxChat .gx-rule-ask[hidden] { display: none; }
#fxChat .gx-rule-ask input { flex: 1 1 auto; min-width: 0; height: 24px; padding: 0 6px; border: 1px solid #dcdad7; border-radius: 4px; font-size: 11.5px; }
#fxChat .gx-rule-ask input.is-empty { border-color: #c0392b; }
#fxChat .gx-rule-ask button { height: 24px; padding: 0 8px; border: 1px solid #dcdad7; border-radius: 4px; background: #fff; font-size: 11px; cursor: pointer; }
#fxChat .gx-rule-ask .gx-rule-save { background: var(--green); border-color: var(--green); color: #fff; }

/* The Executive Summary's waiting list. */
#fxChat .gx-wait { margin: 8px 0 4px; }
#fxChat .gx-wait-row { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-top: 1px solid #f0eeeb; font-size: 11.5px; color: #6b6b6b; }
#fxChat .gx-wait-row.is-done { color: var(--ink); }
#fxChat .gx-wait-dot { flex: 0 0 14px; text-align: center; color: #b5b3b0; }
#fxChat .gx-wait-row.is-done .gx-wait-dot { color: var(--green); font-weight: 700; }
#fxChat .gx-wait-label { flex: 1 1 auto; min-width: 0; }
#fxChat .gx-wait-from { border: 0; background: #f3f2f1; color: var(--ink); font: 10.5px var(--font-mono); border-radius: 3px; padding: 1px 5px; cursor: pointer; }
#fxChat .gx-wait-from:hover { background: #e1dfdd; }

/* The facts card (fraew-autofill.js): a source pill and a drop button per row. */
#fxChat .gx-af-row { grid-template-columns: 18px minmax(0, 40%) minmax(0, 1fr) auto; }
#fxChat .gx-af-act { display: inline-flex; align-items: center; gap: 4px; }
#fxChat .gx-af-act .gx-ev { margin: 0; max-width: 150px; }
#fxChat .gx-af-drop {
  border: 0; background: transparent; color: var(--muted-2); font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 4px; cursor: pointer;
}
#fxChat .gx-af-drop:hover:not(:disabled) { color: var(--ink); background: var(--hover); }
#fxChat .gx-af-drop:disabled { visibility: hidden; }
#fxChat .gx-af-nosrc { font-family: var(--font-mono); font-size: 10px; color: var(--muted-2); white-space: nowrap; }
#fxChat .gx-af-note { font-size: 11.5px; color: var(--muted); }

/* Guidex's reader, opened from a drafter pill on a file that is not a PDF:
   the quoted words marked (citations.js _gxReaderMarkQuote). */
.gx-reader mark.gx-reader-hit { background: rgba(99, 199, 106, .28); color: inherit; border-radius: 2px; padding: 0 1px; }
