/* public/css/forms-ui.css — INTAKE_FORMS F2 §6: the Forms & Agreements page (public/js/forms-ui.js). */
.fui { max-width: 980px; }
.fui-head { display: flex; justify-content: flex-end; align-items: center; margin: 0 0 16px; }
.fui-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.fui-empty { color: var(--text2, #4a4840); margin: 0 0 12px; }
.fui-table { width: 100%; border-collapse: collapse; background: var(--surface, #fff); }
.fui-table th, .fui-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border, #e5e2da); }
.fui-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text2, #4a4840); }
.fui-row { cursor: pointer; }
.fui-row:hover, .fui-row:focus { background: var(--hover, #f5f3ee); outline: none; }
.fui-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px;
  background: #e8edf5; color: #1a2e4a; margin-left: 6px; vertical-align: middle; }
.fui-badge.fui-doc { background: #efe9dc; color: #5a4a20; }
.fui-status { font-size: 13px; font-weight: 400; color: var(--text2, #4a4840); margin-left: 8px; }
.fui-h2 { font-size: 20px; margin: 4px 0 16px; }
.fui-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.fui-label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 4px; }
.fui-input, .fui-textarea, .fui select { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--border, #d9d5cc);
  border-radius: 6px; box-sizing: border-box; background: #fff; }
.fui-check { display: inline-flex; align-items: center; gap: 6px; margin: 4px 16px 4px 0; font-size: 14px; }
.fui-fieldset { border: 1px solid var(--border, #e5e2da); border-radius: 8px; padding: 8px 12px; margin: 12px 0; }
.fui-q-row { display: flex; flex-wrap: wrap; gap: 12px; }
.fui-q-row > .fui-label { flex: 1 1 220px; }
.fui-q-tools { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.fui-auto { border-top: 1px solid var(--border, #e5e2da); margin: 16px 0; padding-top: 12px; }
.fui-auto summary { font-weight: 600; cursor: pointer; }
.fui-caveat { color: var(--text2, #4a4840); font-size: 13px; margin: 4px 0 8px; }
.fui-preview { margin: 16px 0; }
.fui-preview iframe { width: 390px; max-width: 100%; height: 640px; border: 1px solid var(--border, #d9d5cc);
  border-radius: 12px; background: #faf9f6; }
.fui-locked { border: 0; padding: 0; margin: 0; }
.fui-standard { padding-left: 20px; }
/* INTAKE_FORMS F3 — a template question's Urgent marker. */
.fui-urgent { background: rgba(197,48,48,.1); color: var(--red, #c53030); }
@media (max-width: 640px) {
  .fui-table th:nth-child(2), .fui-table td:nth-child(2) { display: none; }
}
/* ENGAGEMENT_TERMS_ON_ONE_PAGE §2a.3 — a typed agreement's Delete, last and apart: to the right on a wide screen, on a
   line of its own on a phone (public/js/forms-ui.js editorHtml). */
.fui-act-apart { margin-left: auto; }
@media (max-width: 640px) {
  .fui-act-apart { flex-basis: 100%; margin-left: 0; }
}
/* CLIENT_AGREEMENT_SIGNING §1 — a document's signing settings (public/js/forms-ui.js agreementHtml). */
.fui-ag-part { margin: 10px 0; }
.fui-companions { margin: 4px 0 8px 18px; padding: 0; }
.fui-companions li { margin: 2px 0; }
.fui-responsible { margin-top: 10px; }
/* FORMS_PAGE_SAYS_WHAT_IT_DOES — a tab's New button, the list by kind, the start screens, the file boxes
   (public/js/forms-ui.js listHtml, newFormHtml, newAgreementHtml, newDocumentHtml, dropZoneHtml). */
.fui-starts { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0 0 18px; }
.fui-start { display: flex; flex-direction: column; gap: 4px; }
.fui-group { margin: 20px 0 8px; }
.fui-group-h { font-size: 16px; margin: 0 0 8px; }
/* The three groups' last column in one line: fixed layout, the same last width everywhere. */
.fui-group .fui-table { table-layout: fixed; }
.fui-group .fui-table th:first-child, .fui-group .fui-table td:first-child { width: 44%; }
.fui-group .fui-table th:last-child, .fui-group .fui-table td:last-child { width: 16%; }
.fui-table-form th:nth-child(3), .fui-table-form td:nth-child(3) { width: 16%; }
.fui-table td { overflow-wrap: anywhere; }
.fui-archived { margin: 20px 0 8px; }
.fui-archived summary { font-weight: 600; cursor: pointer; font-size: 16px; margin: 0 0 8px; }
.fui-ask { margin: 0 0 12px; }
.fui-ways { display: flex; flex-direction: column; gap: 10px; max-width: 680px; }
.fui-way { border: 1px solid var(--border, #e5e2da); border-radius: 8px; background: var(--surface, #fff); }
.fui-way-head, .fui-way-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  text-align: left; font: inherit; background: none; border: 0; padding: 10px 14px; cursor: pointer; color: inherit; }
.fui-way-title { font-weight: 600; }
.fui-way-line { font-size: 13px; color: var(--text2, #4a4840); }
.fui-way-body { padding: 0 14px 12px; max-width: 680px; }
.fui-ag-ways { flex-direction: row; flex-wrap: wrap; }
.fui-ag-ways .fui-way-pick { flex: 1 1 260px; width: auto; border: 1px solid var(--border, #e5e2da); border-radius: 8px;
  background: var(--surface, #fff); }
.fui-way-pick.fui-way-on { border-color: var(--blue, #1a4a8a); box-shadow: 0 0 0 1px var(--blue, #1a4a8a); }
.fui-ag-ways + .fui-way-body { padding: 12px 0 0; }
.fui-badge.fui-rec { background: var(--blue-bg, #edf2fb); color: var(--blue, #1a4a8a); }
.fui-drop { border: 2px dashed var(--border, #d9d5cc); border-radius: 8px; padding: 14px; margin: 8px 0;
  background: var(--surface3, #f2f1ee); display: flex; flex-direction: column; gap: 4px; }
.fui-drop.fui-drop-over { background: var(--blue-bg, #edf2fb); border-color: var(--blue, #1a4a8a); }
.fui-drop-label { font-weight: 600; font-size: 14px; }
.fui-drop-kinds { font-size: 12px; color: var(--text2, #4a4840); }
.fui-drop-chosen { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.fui-drop-name { overflow-wrap: anywhere; }
.fui-drop-again { margin: 4px 0 0; font-size: 13px; color: var(--red, #c53030); }
.fui-building { margin: 8px 0 0; font-weight: 600; }
.fui-tools { margin: 8px 0; }
.fui-steps { border-left: 3px solid var(--border, #d9d5cc); padding: 6px 0 6px 12px; margin: 10px 0; font-size: 14px;
  line-height: 1.5; }
.fui-steps-title { font-weight: 600; margin: 0 0 4px; }
.fui-howto { margin: 4px 0 8px; }
.fui-howto summary { cursor: pointer; font-size: 13px; color: var(--blue, #1a4a8a); }
.fui-notice { background: var(--blue-bg, #edf2fb); border: 1px solid var(--blue-border, #bdd0ef); border-radius: 8px;
  padding: 10px 12px; margin: 0 0 12px; }
/* SIGNING_ITSELF_3 §2 — the engagement summaries' subsection under Agreements to sign, the summary's editor, and the
   page beside it as a phone shows it (public/js/forms-ui.js summariesHtml, summaryEditorHtml;
   public/js/engagement-page.js pageHtml). */
.fui-subgroup { margin: 18px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border, #e5e2da); }
.fui-subgroup-h { font-size: 15px; margin: 0 0 4px; }
.fui-subgroup .fui-actions { margin: 6px 0 10px; }
/* THE_FIRMS_COUNTERSIGNATURE F2 — Who can countersign for the firm (public/js/forms-ui.js whoHtml). */
.fui-who { border: 0; margin: 0; padding: 0; min-width: 0; }
.fui-who[disabled] { opacity: .55; }
.fui-who-modes { display: flex; flex-wrap: wrap; }
.fui-who-list { list-style: none; margin: 4px 0 0; padding: 0; }
.fui-who-role { color: var(--text2, #4a4840); }
.fui-group .fui-table-summaries th:first-child, .fui-group .fui-table-summaries td:first-child { width: 32%; }
.fui-group .fui-table-summaries th:nth-child(2), .fui-group .fui-table-summaries td:nth-child(2) { width: 22%; }
.fui-group .fui-table-summaries th:nth-child(3), .fui-group .fui-table-summaries td:nth-child(3) { width: 22%; }
.fui-group .fui-table-summaries th:last-child, .fui-group .fui-table-summaries td:last-child { width: 24%; }
.fui-sum-wrap { display: flex; flex-direction: column; gap: 20px; }
.fui-sum-edit { min-width: 0; }
.fui-sum-view { min-width: 0; }
@media (min-width: 900px) {
  .fui-sum-wrap { flex-direction: row; align-items: flex-start; }
  .fui-sum-edit { flex: 1 1 auto; }
  .fui-sum-view { flex: 0 0 360px; position: sticky; top: 12px; }
}
.fui-sum-list { list-style: none; padding: 0; margin: 6px 0 10px; }
.fui-sum-sec { border: 1px solid var(--border, #e5e2da); border-radius: 8px; padding: 10px 12px; margin: 0 0 10px;
  background: var(--surface, #fff); }
.fui-sum-sec .fui-label:first-child { margin-top: 0; }
.fui-sum-fixed { background: var(--surface3, #f2f1ee); }
.fui-sum-fixed-h { font-weight: 600; font-size: 14px; }
.fui-sum-sec .fui-q-tools .btn { min-height: 32px; }
.fui-sum-phone { border: 1px solid var(--border, #d9d5cc); border-radius: 16px; background: #faf9f6; padding: 14px;
  max-width: 390px; box-sizing: border-box; }
/* The page's own rules (.esp-*) are conflicts-ui.css's, which the Send step on both hosts reads too. */
/* THE_PASTED_AGREEMENT_TEXT §2 — Sign on Houji's page's two ways (B1), an agreement's description under its name, and a
   typed agreement's text in its editor (the box itself is conflicts-ui.css's .atb-*, read on both hosts). */
.fui-ag-hows { flex-direction: row; flex-wrap: wrap; margin: 0 0 8px; }
.fui-ag-hows .fui-way-pick { flex: 1 1 240px; width: auto; border: 1px solid var(--border, #e5e2da); border-radius: 8px;
  background: var(--surface, #fff); }
.fui-row-desc { margin: 2px 0 0; font-size: 12px; color: var(--text3, #8a8880); }
.fui-text { margin: 14px 0 12px; max-width: 760px; }
.fui-text-h { font-size: 15px; }
.fui-text-tips ul { margin: 4px 0 8px; padding-left: 18px; }
.fui-text-tips li { margin: 2px 0; }
/* FORM_QUESTIONS_EDITOR §4 — the form as the firm edits it (public/js/forms-ui.js questionsHtml): one row a question,
   headings standing between them, one question open in place, the first page fixed at the top, and the preview beside
   the form at 1100 px and wider, under it below that. */
.fui.fui-wide { max-width: 1400px; }
.fui-q-layout { display: block; }
@media (min-width: 1100px) {
  .fui-q-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; }
  .fui-q-side { position: sticky; top: 12px; }
  .fui-q-side .fui-preview { margin-top: 0; }
}
.fui-first { border: 1px solid var(--border, #e5e2da); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px;
  background: var(--surface3, #f7f6f2); }
.fui-first-h { font-size: 15px; margin: 0 0 2px; }
.fui-rows, .fui-fu-rows, .fui-sub-rows { list-style: none; padding: 0; margin: 6px 0 8px; }
.fui-qrow { border: 1px solid var(--border, #e5e2da); border-radius: 8px; background: var(--surface, #fff); margin: 0 0 8px; }
.fui-qrow-on { border-color: var(--navy, #1a2e4a); box-shadow: 0 0 0 1px var(--navy, #1a2e4a) inset; }
.fui-qrow-heading { border-color: transparent; background: transparent; margin: 18px 0 6px; }
.fui-qrow-line { display: flex; align-items: center; gap: 8px; }
.fui-qrow-open { flex: 1 1 auto; min-width: 0; text-align: left; background: none; border: 0; padding: 10px 12px;
  font: inherit; color: inherit; cursor: pointer; overflow-wrap: anywhere; }
.fui-qrow-open:hover, .fui-qrow-open:focus-visible { background: var(--hover, #f5f3ee); border-radius: 8px; }
.fui-qrow-label { font-weight: 500; }
.fui-qrow-kind { color: var(--text3, #8a8880); font-size: 13px; margin-left: 6px; }
.fui-qrow-h { font-size: 16px; font-weight: 700; }
.fui-row-tools { display: flex; gap: 4px; flex: 0 0 auto; padding-right: 8px; }
.fui-row-tools .btn { font-size: 12px; }
.fui-qpanel { padding: 0 12px 12px; border-top: 1px solid var(--border, #e5e2da); }
.fui-qpanel-foot { display: flex; gap: 8px; justify-content: space-between; margin-top: 12px; }
.fui-q-fault { color: var(--red, #c53030); font-weight: 600; margin: 10px 0 0; }
.fui-more { margin: 10px 0 0; }
.fui-more summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.fui-fus { margin: 10px 0 0; }
.fui-fu { border-left: 3px solid var(--border, #d9d5cc); padding: 4px 0 4px 12px; margin: 8px 0; }
.fui-fu-line { font-weight: 600; margin: 4px 0; }
.fui .fui-fu-line select { width: auto; display: inline-block; margin: 0 4px; }
.fui-fu-each { font-weight: 600; font-size: 13px; margin: 8px 0 2px; }
.fui .fui-askmore select { width: auto; }
.fui-e6 { border: 1px solid var(--red, #c53030); border-radius: 8px; padding: 8px 12px; margin: 10px 0 0;
  background: rgba(197,48,48,.05); }
.fui-e6 p { margin: 0 0 8px; }
.fui-add-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
@media (max-width: 640px) {
  .fui-qrow-line { flex-wrap: wrap; }
  .fui-row-tools { padding: 0 12px 8px; }
}
/* FORM_AND_AGREEMENT_EMAILS §0a.11 — the frame a changed form's page is drawn into, out of sight until it has loaded. */
.fui-preview { position: relative; }
.fui-preview iframe.fui-preview-next { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; }
/* FORM_AND_AGREEMENT_EMAILS §2 — the Emails group, an email's editor, the library, the emails Houji sends on its own. */
.fui-group .fui-table-email th:last-child, .fui-group .fui-table-email td:last-child { width: 32%; }
.fui-automatic { margin: 12px 0 0; }
.fui-automatic > summary { font-weight: 600; cursor: pointer; }
.fui-auto-email { border-top: 1px solid var(--border, #e5e2da); padding: 8px 0; }
.fui-auto-email summary { cursor: pointer; }
.fui-email-read { background: var(--surface, #fff); border: 1px solid var(--border, #e5e2da); border-radius: 8px;
  padding: 10px 14px; max-width: 680px; }
.fui-email-subj { font-weight: 600; margin: 0 0 8px; }
.fui-email-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.fui-goes-group { margin: 6px 0 10px; }
.fui-goes-h { font-weight: 600; font-size: 13px; margin: 0 0 4px; }
.fui-goes-draft { font-style: italic; color: var(--text2, #4a4840); font-size: 13px; }
.fui-insert { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 6px; }
.fui-insert-h { font-size: 13px; color: var(--text2, #4a4840); }
.fui-insert .btn { font-size: 12px; padding: 3px 8px; }
/* FORMS_AND_AGREEMENTS_3 §1.6 — the Link buttons read as links, and an email's order is dragged. */
.fui-insert .fui-link-btn { border-style: dashed; }
.fui-em-order { margin: 10px 0 4px; }
.fui-em-order-list li[draggable="true"] { cursor: grab; }
.fui-em-body { min-height: 220px; }
.fui-em-preview iframe { background: #ffffff; }
.fui-lib-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.fui-lib-filter.fui-lib-on { border-color: var(--blue, #1a4a8a); box-shadow: 0 0 0 1px var(--blue, #1a4a8a); }
.fui-lib { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; max-width: 680px; }
.fui-lib-entry { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left;
  font: inherit; color: inherit; background: var(--surface, #fff); border: 1px solid var(--border, #e5e2da);
  border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.fui-lib-name { font-weight: 600; }
.fui-lib-area, .fui-lib-desc { font-size: 13px; color: var(--text2, #4a4840); }
.fui-emails-for { border-top: 1px solid var(--border, #e5e2da); margin: 16px 0; padding-top: 12px; }
.fui-emails-for-h { font-size: 15px; margin: 0 0 4px; }
.fui-emails-for-list { margin: 4px 0 8px; padding-left: 18px; }
.fui .fui-emails-for select { width: auto; max-width: 100%; }
/* FORMS_AND_AGREEMENTS_1 §2.1 — the five tabs, the Conflicts page's look (public/css/conflicts-ui.css .cui-tab*) under
   this page's own prefix; a panel not shown is hidden by class (forms-ui.js activateTab). */
.fui-tabs { display: flex; gap: 2px; align-items: stretch; margin: 0 0 12px; border-bottom: 1px solid var(--border);
  overflow-x: auto; }
.fui-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 14px; font: inherit;
  font-size: 14px; font-weight: 500; color: var(--text3); cursor: pointer; white-space: nowrap; }
.fui-tab:hover { color: var(--text); }
.fui-tab-on { color: var(--navy, #1a2e4a); border-bottom-color: var(--navy, #1a2e4a); }
.fui-tab:focus-visible { outline: 2px solid var(--navy, #1a2e4a); outline-offset: -2px; }
.fui-panel { padding-top: 4px; }
.fui-panel:focus { outline: none; }
.fui-hidden { display: none !important; }
@media (max-width: 640px) {
  .fui-tab { padding: 8px 6px; font-size: 13px; }
}
/* §3 — the Sent tab: its line, its tools, its list and pager. On a phone the list keeps *What was sent*, and an Archived
   list keeps its Restore (the phone rule above hides every table's second column). */
.fui-sent-line { margin: 0 0 12px; max-width: 760px; line-height: 1.5; }
.fui-sent-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 0 0 12px; }
.fui-sent-show { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.fui .fui-sent-tools select, .fui .fui-sent-q { width: auto; }
.fui-sent-q { min-width: 220px; }
.fui-sent-by { margin: 2px 0 0; }
.fui-sent-row[data-fui-href] { cursor: pointer; }
.fui-sent-row[data-fui-href]:hover, .fui-sent-row[data-fui-href]:focus { background: var(--hover, #f5f3ee); outline: none; }
.fui-sent-pager { display: flex; gap: 12px; align-items: center; margin: 10px 0; }
.fui-restore-cell { text-align: right; width: 120px; }
@media (max-width: 640px) {
  .fui-table-sent th:nth-child(2), .fui-table-sent td:nth-child(2),
  .fui-table-archived th:nth-child(2), .fui-table-archived td:nth-child(2) { display: table-cell; }
  .fui-sent-q { min-width: 0; width: 100%; }
  /* A phone reads each row as a short block: who, what, when and by whom, where it stands. */
  .fui-table-sent thead { display: none; }
  .fui-table-sent tr { display: block; padding: 10px 12px; border-bottom: 1px solid var(--border, #e5e2da); }
  .fui-table-sent td { display: block; border: 0; padding: 1px 0; }
  .fui-table-sent td:first-child { font-weight: 600; }
}
/* FORMS_AND_AGREEMENTS_4 — who can edit (public/js/forms-ui.js editorsHtml), a draft email's pill and line
   (draftMarkHtml), the Sent tab's line for a member without the tick, and the editors' Earlier versions fold
   (versionsHtml). */
.fui-eds-off { color: var(--text3, #8a877e); }
.fui-eds-nosign { font-size: 12px; color: var(--text3, #8a877e); }
.fui-badge.fui-draft-pill { background: #f3ead2; color: #6a4f10; }
.fui-draft-line { margin: 2px 0 0; font-size: 12px; }
.fui-not-ticked { margin-top: 12px; }
.fui-versions { border-top: 1px solid var(--border, #e5e2da); margin: 18px 0 8px; padding-top: 10px; }
.fui-ver-toggle { background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 600; cursor: pointer;
  color: var(--text, #1f1e1b); }
.fui-ver-list { list-style: none; margin: 6px 0; padding: 0; }
.fui-ver-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--border, #e5e2da); }
.fui-ver-when { flex: 1 1 220px; font-size: 13px; }
.fui-ver-ask { flex: 1 1 100%; margin: 4px 0 2px; }
.fui-ver-ask .fui-notice { margin: 0 0 6px; }
.fui-ver-preview { margin: 10px 0; }
.fui-ver-preview iframe { width: 100%; max-width: 640px; height: 560px; border: 1px solid var(--border, #d9d5cc);
  border-radius: 8px; background: #fff; }
/* FORMS_AND_AGREEMENTS_5 §3–§4 — each tab's one sentence at its top (forms-ui.js tabLineHtml), a tab with nothing of
   the firm's own (startHereHtml), and the Sent tab's button as wide as its column on a phone (§1.5). */
.fui-tab-line { margin: 0 0 12px; max-width: 760px; line-height: 1.5; }
.fui-start-here { margin: 0 0 12px; max-width: 760px; }
.fui-start-here .fui-empty { margin: 0 0 6px; }
.fui-start-lead { margin: 0 0 4px; color: var(--text2, #4a4840); }
.fui-start-steps { margin: 0 0 8px; padding-left: 22px; color: var(--text2, #4a4840); line-height: 1.6; }
@media (max-width: 640px) {
  .fui-sent-send { display: flex; align-items: center; gap: 6px; }
  .fui-sent-send .btn { flex: 1 1 auto; }
}
