/* ---------- FORMS (Atrium layout) ---------- */
/* Saved forms as Linear rows, the form itself on a cream paper sheet, settings and the question palette in a glass rail. */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms { --fm-paper: #faf8f2; --fm-ink: #1b1f1d; --fm-ink-2: #535a56; --fm-line: #e5e2d8; --fm-line-2: #d5d0c2; --fm-field: #ffffff; --fm-focus: #eaf6ef; --fm-ring: #0b8a52; --fm-shadow: 0 1px 0 rgb(255 255 255 / .4) inset, 0 30px 80px rgb(0 0 0 / .45), 0 2px 8px rgb(0 0 0 / .25); }
html[data-theme="light"] body.workspace-framed.rt-route:not(#_):not(._) #panel-forms { --fm-paper: #ffffff; --fm-ink: #13201a; --fm-ink-2: #4f5c55; --fm-line: #e4e8e5; --fm-line-2: #cfd6d2; --fm-field: #f7f9f8; --fm-shadow: 0 30px 70px rgb(30 60 45 / .16), 0 2px 8px rgb(30 60 45 / .08); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms > .forms-local-note { order: 3; margin: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms > .forms-local-preview { order: 2; }
/* head */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder > .forms-head { margin: 4px 0 2px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-head > .forms-head-copy { flex: 1 1 320px; min-width: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-head > .forms-head-copy > p.forms-summary { margin: 10px 0 0; font-size: 15px; color: var(--at-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-summary b { font-weight: 600; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-dot { display: inline-block; width: 8px; height: 8px; margin-inline-end: 9px; border-radius: 50%; background: var(--at-green); vertical-align: 2px; box-shadow: 0 0 0 3px var(--at-green-soft); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-dot.is-amber { background: var(--at-amber); box-shadow: 0 0 0 3px var(--at-amber-soft); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-head > .forms-head-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-head-actions > [data-action="refresh"]:not(:disabled) { background: var(--at-glass-2) !important; border-color: var(--at-line) !important; box-shadow: var(--at-sheen) !important; color: var(--at-ink) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-head-actions > [data-action="refresh"]:not(:disabled):hover { background: var(--at-glass) !important; }
/* with a form open the paper's Save draft is the one green action */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder:has(.forms-sheet) .forms-head-actions > [data-action="new"]:not(:disabled) { background: var(--at-glass-2) !important; border: 1px solid var(--at-line) !important; box-shadow: var(--at-sheen) !important; color: var(--at-ink) !important; font-weight: 500 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder > p.forms-notice { display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; min-height: 32px; margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--at-glass-2); box-shadow: var(--at-sheen), inset 0 0 0 1px var(--at-line); color: var(--at-ink); font-size: 13px; line-height: 1.4; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder > p.forms-notice:empty { display: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder > p.forms-notice::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--at-green); }
/* layout: library | paper | rail; the action bar sits under the rail */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder > .forms-layout { display: grid; grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(280px, 320px); grid-template-rows: auto 1fr; align-items: start; gap: 16px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-library { grid-column: 1; grid-row: 1 / span 2; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-sheet { grid-column: 2; grid-row: 1 / span 2; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-editor { grid-column: 3; grid-row: 1; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-actionbar { grid-column: 3; grid-row: 2; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout:not(:has(> .forms-sheet)) { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout:not(:has(> .forms-sheet)) > .forms-editor { grid-column: 2; grid-row: 1 / span 2; }
/* library rows */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-library { display: flex; flex-direction: column; gap: 0; padding: 0 !important; overflow: hidden; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-library > .forms-library-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 8px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-library-head > h2.forms-library-heading { margin: 0 !important; font-size: 12px !important; font-weight: 600 !important; letter-spacing: .08em !important; text-transform: uppercase !important; color: var(--at-ink-3) !important; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-library-head > h2.forms-library-heading { font-size: 13px !important; letter-spacing: 0 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-library-head > .forms-library-count { font-size: 12px; color: var(--at-ink-3); font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-library > .forms-records { display: flex; flex-direction: column; padding: 0 6px 6px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-records > button.forms-record:not(:disabled) { position: relative; display: grid; justify-items: stretch; grid-template-columns: 20px minmax(0, 1fr) auto; grid-template-areas: "icon title date" "icon state state"; align-items: center; gap: 2px 12px; width: 100%; min-height: 60px; margin: 0; padding: 9px 12px !important; border: 0 !important; border-radius: 12px !important; background: transparent !important; box-shadow: none !important; outline: 0; color: var(--at-ink) !important; font-family: var(--at-sans); font-size: 14px; font-weight: 400; text-align: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-records > button.forms-record:disabled { display: grid; justify-items: stretch; grid-template-columns: 20px minmax(0, 1fr) auto; grid-template-areas: "icon title date" "icon state state"; align-items: center; gap: 2px 12px; width: 100%; min-height: 60px; margin: 0 0 2px; padding: 9px 12px; text-align: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-records > button.forms-record + button.forms-record::before { content: ""; position: absolute; top: 0; inset-inline: 12px; height: 1px; background: var(--at-line-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-records > button.forms-record:not(:disabled):hover { background: var(--at-hover) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-records > button.forms-record:is(:hover, [aria-current="true"])::before, html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-records > button.forms-record:is(:hover, [aria-current="true"]) + .forms-record::before { opacity: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-records > button.forms-record[aria-current="true"]:not(:disabled) { background: var(--at-green-soft) !important; box-shadow: inset 3px 0 0 var(--at-green) !important; }
html[dir="rtl"] body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-records > button.forms-record[aria-current="true"]:not(:disabled) { box-shadow: inset -3px 0 0 var(--at-green) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-records > button.forms-record:focus-visible { outline: 3px solid var(--at-green) !important; outline-offset: -3px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-record > .forms-record-icon { grid-area: icon; width: 18px; height: 18px; fill: none; stroke: var(--at-ink-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-record[aria-current="true"] > .forms-record-icon { stroke: var(--at-green-text); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-record > span { grid-area: title; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-record > small { grid-area: state; display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-record > small::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--at-ink-4); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-record[data-state="open"] > small { color: var(--at-green-text); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-record[data-state="open"] > small::before { background: var(--at-green); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-record[data-state="closed"] > small::before { background: var(--at-amber); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-record > time.forms-record-date { grid-area: date; justify-self: end; font-size: 12px; color: var(--at-ink-3); white-space: nowrap; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-record > time.forms-record-date { font-size: 13px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-library > p { margin: 0; padding: 24px 18px 28px; font-size: 14px; line-height: 1.55; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-library > [data-action="more"]:not(:disabled) { margin: 0 12px 12px; border-color: transparent !important; background: var(--at-fill-1) !important; color: var(--at-ink-2) !important; font-size: 13px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-editor:not(.forms-rail) { min-height: 280px; }
/* the paper sheet */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > section.forms-sheet { --glass-disabled: transparent; --glass-disabled-text: color-mix(in srgb, var(--fm-ink) 45%, transparent); --glass-border: var(--fm-line-2); box-sizing: border-box; min-width: 0; padding: 44px 52px 40px; border-radius: 8px; background: var(--fm-paper); box-shadow: var(--fm-shadow); color: var(--fm-ink); font-family: var(--at-sans); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet .forms-control > span { display: block; margin: 0 0 6px; font: 600 11px/1.3 var(--at-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--fm-ink-2); }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet .forms-control > span { font-size: 13px; letter-spacing: 0; text-transform: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet .forms-control { display: block; margin: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet :is(input:not([type="checkbox"]):not([type="radio"]), textarea, .localized-control-input):not(:disabled) { width: 100%; min-height: 44px; padding: 10px 12px !important; border: 1px solid var(--fm-line) !important; border-radius: 8px !important; background: var(--fm-field) !important; box-shadow: none !important; color: var(--fm-ink) !important; font-size: 14px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet :is(input, textarea, .localized-control-input):not(:disabled):hover { border-color: var(--fm-line-2) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet :is(input, textarea, .localized-control-input):not(:disabled):focus-visible { outline: 3px solid var(--fm-ring) !important; outline-offset: 2px; border-color: transparent !important; background: var(--fm-focus) !important; box-shadow: 0 0 0 4px var(--fm-focus) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet input[type="checkbox"]:not(:disabled) { accent-color: var(--fm-ring); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > .forms-identity { display: flex; flex-direction: column; gap: 6px; margin: 0 0 28px; padding: 0 0 22px; border: 0 !important; border-bottom: 1px solid var(--fm-line) !important; background: none !important; box-shadow: none !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-identity > .forms-control:first-child > span, html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-identity > .forms-control:nth-child(2) > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > .forms-identity > .forms-control > :is(input[name], textarea[name]):not(:disabled):not([type="checkbox"]) { padding: 4px 6px !important; margin-inline: -6px; width: calc(100% + 12px); border: 1px solid transparent !important; border-radius: 6px !important; background: transparent !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > .forms-identity > .forms-control > :is(input[name], textarea[name]):not(:disabled):not([type="checkbox"]):hover { border-color: transparent !important; border-bottom: 1px dashed #b9b3a5 !important; border-radius: 0 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > .forms-identity > .forms-control > input[name="title"]:not(:disabled):not([type="checkbox"]) { min-height: 64px; font-family: var(--at-serif); font-size: 44px !important; font-weight: 400; line-height: 1.1; letter-spacing: -.015em; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > .forms-identity > .forms-control > input[name="title"]:not(:disabled):not([type="checkbox"]) { font-family: var(--at-sans); font-size: 32px !important; font-weight: 600; letter-spacing: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > .forms-identity > .forms-control > textarea[name="description"]:not(:disabled):not([type="checkbox"]) { min-height: 56px; font-size: 16px !important; line-height: 1.6; color: var(--fm-ink-2) !important; resize: vertical; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > .forms-fields-heading { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0 0 10px; border-bottom: 1px solid var(--fm-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-fields-heading > h3 { margin: 0 !important; font: 600 11px/1.3 var(--at-sans) !important; letter-spacing: .08em !important; text-transform: uppercase !important; color: var(--fm-ink-2) !important; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-fields-heading > h3 { font-size: 13px !important; letter-spacing: 0 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-fields-heading > .forms-field-count { min-width: 0; padding: 0 7px; border-radius: 6px; background: var(--fm-line); color: var(--fm-ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > section.forms-field { position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "num req . actions" "label label label label" "answer answer answer answer" "settings settings settings settings"; align-items: center; gap: 8px 10px; margin: 0; padding: 18px 10px 16px; border: 0; border-bottom: 1px solid var(--fm-line); border-radius: 0; background: none; box-shadow: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > section.forms-field:focus-within { border-radius: 8px; background: var(--fm-focus); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > h4 { grid-area: num; margin: 0; font: 600 11px/1.3 var(--at-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--fm-ink-2); }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > h4 { font-size: 13px; letter-spacing: 0; text-transform: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > .forms-required { grid-area: req; padding: 1px 7px; border-radius: 6px; background: #fbe9e7; color: #9a2a1f; font-size: 12px; font-weight: 500; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > .forms-required { font-size: 13px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > .forms-control { grid-area: label; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > .forms-control > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > section.forms-field > .forms-control > input:not(:disabled):not([type="checkbox"]):not([type="radio"]) { padding: 4px 6px !important; margin-inline: -6px; width: calc(100% + 12px); border-color: transparent !important; background: transparent !important; font-size: 17px !important; font-weight: 500; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > section.forms-field[data-field-type="heading"] > .forms-control > input:not(:disabled):not([type="checkbox"]):not([type="radio"]) { font-family: var(--at-serif); font-size: 26px !important; font-weight: 400; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > section.forms-field[data-field-type="heading"] > .forms-control > input:not(:disabled):not([type="checkbox"]):not([type="radio"]) { font-family: var(--at-sans); font-size: 21px !important; font-weight: 600; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > .forms-answer { grid-area: answer; display: flex; flex-direction: column; gap: 8px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-answer:not(:has(.forms-answer-option)) { justify-content: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--fm-line); border-radius: 8px; background: var(--fm-field); color: var(--fm-ink-2); font-size: 13px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-answer.forms-answer-textarea { justify-content: flex-start; min-height: 92px; padding-top: 11px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-answer-option { display: flex; align-items: center; gap: 10px; min-height: 28px; font-size: 14px; color: var(--fm-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-answer-option > i { flex: none; width: 16px; height: 16px; border: 1.5px solid var(--fm-line-2); border-radius: 50%; background: var(--fm-field); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-answer:is(.forms-answer-multiselect, .forms-answer-checkbox) .forms-answer-option > i { border-radius: 4px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > details { grid-area: settings; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; background: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > details > summary { display: list-item; width: fit-content; min-height: 44px; padding: 0 4px; line-height: 44px; list-style: disclosure-closed inside; color: var(--fm-ink-2); font-size: 13px; font-weight: 500; cursor: pointer; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > details[open] > summary { list-style: disclosure-open inside; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > details[open] { padding: 0 0 6px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > details > .forms-control:has(> input[type="checkbox"]) { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 10px; min-height: 44px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > details > .forms-control:has(> input[type="checkbox"]) > span { margin: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > details > button:not(:disabled) { align-self: flex-start; min-height: 36px; padding: 4px 10px; border: 1px solid var(--fm-line) !important; border-radius: 8px; background: transparent !important; color: var(--fm-ink) !important; font-size: 13px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > details > button:not(:disabled):hover { background: var(--fm-line) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > details > button[data-action="remove-option"]:not(:disabled) { margin-top: -4px; border-color: transparent !important; color: #9a2a1f !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > details > button[data-action="add-option"]:not(:disabled) { color: #0b6b40 !important; font-weight: 600; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > .forms-field-actions { grid-area: actions; display: flex; gap: 0; margin: 0; padding: 0; border: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field-actions > button:not(:disabled) { min-height: 36px; padding: 4px 9px; border: 0 !important; border-radius: 8px; background: transparent !important; box-shadow: none !important; color: var(--fm-ink-2) !important; font-size: 13px; font-weight: 500; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field-actions > button:not(:disabled):hover { background: var(--fm-line) !important; color: var(--fm-ink) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field-actions > button[data-action="remove-field"]:not(:disabled):hover { background: #fbe9e7 !important; color: #9a2a1f !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field-actions > button:disabled { min-height: 36px; padding: 4px 9px; font-size: 13px; }
@media (hover: hover) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > section.forms-field > .forms-field-actions { opacity: 0; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > section.forms-field:is(:hover, :focus-within) > .forms-field-actions { opacity: 1; }
}
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > .forms-sheet-submit { display: flex; margin: 28px 0 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet-submit > span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 12px; background: var(--fm-ink); color: var(--fm-paper); font-size: 14px; font-weight: 600; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > .forms-sheet-submit:only-child { display: none; }
/* the glass rail */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-editor.forms-rail { display: flex; flex-direction: column; gap: 0; min-height: 0; padding: 18px 20px 8px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-rail > h3.forms-rail-heading, html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-palette > h3.forms-rail-heading { margin: 0 0 10px !important; font-size: 15px !important; font-weight: 600 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-rail > p.forms-state { display: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-rail > ol.forms-timeline { position: relative; display: flex; flex-direction: column; margin: 0 0 12px; padding: 0; list-style: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-timeline > li { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding-inline-start: 30px; font-size: 14px; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-timeline > li::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 16px; height: 16px; margin-top: -9px; border: 1.5px solid var(--at-ink-4); border-radius: 50%; background: var(--at-pane); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-timeline > li + li::after { content: ""; position: absolute; inset-inline-start: 8.5px; bottom: calc(50% + 10px); height: 26px; width: 1px; background: var(--at-line); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-timeline > li.is-done { color: var(--at-ink); font-weight: 500; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-timeline > li.is-done::before { border-color: var(--at-green); background: radial-gradient(circle, var(--at-green) 0 4px, transparent 4.5px); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-timeline > li > small { font-size: 13px; font-weight: 400; color: var(--at-ink-3); white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-rail > a { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 8px; color: var(--at-green-text); font-size: 14px; font-weight: 600; text-underline-offset: 3px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-rail > :is(.forms-palette, details.forms-settings) { margin: 0; padding: 16px 0 !important; border: 0 !important; border-top: 1px solid var(--at-line-2) !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-rail > details.forms-settings { padding: 6px 0 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-palette > .forms-add-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; border: 0; background: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-add-field > .forms-control { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-add-field > [data-action="add-field"]:not(:disabled) { border: 1px dashed var(--at-line) !important; background: transparent !important; color: var(--at-green-text) !important; font-weight: 600; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-add-field > [data-action="add-field"]:not(:disabled):hover { border-style: solid !important; background: var(--at-green-soft) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-rail > details.forms-settings > summary { display: list-item; min-height: 44px; line-height: 44px; list-style: disclosure-closed inside; font-size: 15px; font-weight: 600; color: var(--at-ink); cursor: pointer; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-rail > details.forms-settings[open] > summary { list-style: disclosure-open inside; margin-bottom: 8px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-rail > details.forms-settings > .forms-control { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; font-size: 13px; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-rail > :is(.forms-reconcile, p) { margin: 0 0 12px; font-size: 13px; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-rail > .forms-reconcile pre { max-height: 220px; overflow: auto; padding: 12px; border-radius: 12px; background: var(--at-fill-1); font-size: 12px; }
/* the action bar under the rail */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-actionbar { box-sizing: border-box; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 14px; border: 1px solid var(--at-line); border-radius: var(--at-r-lg); background: var(--at-pane); box-shadow: var(--at-sheen), var(--at-shadow); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-actionbar > :is([data-action="save"], [data-action="publish"]) { grid-column: 1 / -1; order: -1; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-actionbar > [data-action="publish"]:not(:disabled) { background: var(--at-fill-2) !important; border: 1px solid transparent !important; box-shadow: inset 0 0 0 1px var(--at-line) !important; color: var(--at-ink) !important; font-weight: 600 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-actionbar > [data-action="publish"]:not(:disabled):hover { background: var(--at-fill-3) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-actionbar > :is([data-action="discard"], [data-action="close"], [data-action="archive"], [data-action="restore"], [data-action="responses"]):not(:disabled) { padding-inline: 8px; border-color: transparent !important; background: var(--at-fill-1) !important; color: var(--at-ink-2) !important; font-size: 13px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-actionbar > :is([data-action="discard"], [data-action="close"], [data-action="archive"], [data-action="restore"], [data-action="responses"]):not(:disabled):hover { background: var(--at-fill-2) !important; color: var(--at-ink) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-actionbar > button:disabled { padding-inline: 8px; font-size: 13px; }
/* responses view */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-editor:not(.forms-rail) > h3 { font-family: var(--at-serif) !important; font-size: 28px !important; font-weight: 400 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-editor article.forms-response { margin: 12px 0 0 !important; padding: 14px 16px !important; border-radius: 14px !important; background: var(--at-fill-1) !important; box-shadow: inset 0 0 0 1px var(--at-line-2) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-response dl { display: grid; grid-template-columns: minmax(120px, 30%) minmax(0, 1fr); gap: 6px 16px; margin: 10px 0 0; font-size: 14px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-response dt { color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-response dd { margin: 0; color: var(--at-ink); }
/* the published preview: the client's view on paper inside a glass frame */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms > section.forms-local-preview:not([hidden]) { display: grid; gap: 14px; padding: 18px 20px 22px; border: 1px solid var(--at-line); border-radius: var(--at-r-lg); background: var(--at-pane); box-shadow: var(--at-sheen), var(--at-shadow); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .forms-local-preview-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 15px; font-weight: 600; color: var(--at-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview-control > :is(select, .localized-control) { flex: 0 1 320px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire { --glass-disabled: transparent; --glass-disabled-text: color-mix(in srgb, var(--fm-ink) 45%, transparent); --glass-border: var(--fm-line-2); width: 100%; max-width: 720px; margin: 4px auto 0; padding: 44px 52px 40px; border: 0; border-radius: 8px; background: var(--fm-paper); box-shadow: var(--fm-shadow); color: var(--fm-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire :is(h1, h2) { color: var(--fm-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire h1 { font-family: var(--at-serif); font-size: 40px; font-weight: 400; line-height: 1.1; letter-spacing: -.015em; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire h1 { font-family: var(--at-sans); font-size: 30px; font-weight: 600; letter-spacing: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire p { color: var(--fm-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire label { color: var(--fm-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire :is(input:not([type="checkbox"]), textarea, select, .localized-control-input):not(:disabled) { border: 1px solid var(--fm-line) !important; border-radius: 8px !important; background: var(--fm-field) !important; box-shadow: none !important; color: var(--fm-ink) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire :is(input, textarea, select, .localized-control-input):not(:disabled):focus-visible { outline: 3px solid var(--fm-ring) !important; outline-offset: 2px; background: var(--fm-focus) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire input[type="checkbox"]:not(:disabled) { accent-color: var(--fm-ring); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire button[type="submit"]:not(:disabled) { border: 0 !important; background: var(--fm-ink) !important; box-shadow: none !important; color: var(--fm-paper) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire [role="alert"] { color: #9a2a1f; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > section.forms-field > .forms-field-actions { transition: opacity var(--at-fast) var(--at-ease); }
}
@media (max-width: 1280px) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder > .forms-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 320px); grid-template-rows: auto auto 1fr; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-library { grid-column: 1 / -1; grid-row: 1; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-library > .forms-records { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-records > button.forms-record:not(:disabled) { flex: 1 1 220px; width: auto; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-records > button.forms-record + button.forms-record::before { display: none; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-sheet { grid-column: 1; grid-row: 2 / span 2; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-editor { grid-column: 2; grid-row: 2; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-actionbar { grid-column: 2; grid-row: 3; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout:not(:has(> .forms-sheet)) { grid-template-columns: minmax(0, 1fr); }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout:not(:has(> .forms-sheet)) > .forms-editor { grid-column: 1; grid-row: 2; }
}
@media (max-width: 860px) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder > .forms-layout { display: flex; flex-direction: column; align-items: stretch; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-sheet, html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-local-preview > .public-questionnaire { padding: 26px 22px 28px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > .forms-identity > .forms-control > input[name="title"]:not(:disabled):not([type="checkbox"]) { min-height: 52px; font-size: 34px !important; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-sheet > section.forms-field { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "num req ." "label label label" "answer answer answer" "settings settings settings" "actions actions actions"; padding-inline: 6px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-field > .forms-field-actions { justify-content: flex-end; }
  /* a sticky glass action bar above the dock while a form is open */
  /* main scrolls with 108px of padding under the dock; the negative inset lets the bar ride just above it */
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-actionbar { position: sticky; bottom: -96px; z-index: 5; display: flex; flex-wrap: nowrap; gap: 8px; padding: 8px; overflow-x: auto; scrollbar-width: none; background: var(--at-dock); -webkit-backdrop-filter: blur(var(--at-blur)); backdrop-filter: blur(var(--at-blur)); border-color: var(--at-dock-line); }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-actionbar > button { flex: none; white-space: nowrap; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-actionbar > [data-action="save"] { flex: 1 0 auto; }
}
/* ---------- FORMS · bento r2 (work pages) ---------- */
/* With no form open the library and the placeholder end together at the library's height (the paper layout keeps its own rows). */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder > .forms-layout:not(:has(> .forms-sheet)):not(#_) { align-items: stretch; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-editor:has(> p:only-child):not(#_) { min-height: 0; justify-content: center; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-editor > p:only-child:not(#_) { flex: 1 1 auto; min-height: 64px; padding: 16px 20px !important; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout > .forms-library:not(#_) { min-height: 0; }
/* ---------- FORMS, SCHEDULING, AUTOMATIONS, PORTAL, INBOX ---------- */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms.active { display: grid; gap: 16px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder { display: grid; gap: 16px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder > h1 { margin: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder > button.rt-btn-ghost:not(:disabled) { justify-self: start; min-width: 176px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 16px; align-items: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-library { display: grid; gap: 12px; align-content: start; padding: 18px 20px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-library > .rt-btn-primary:not(:disabled) { justify-self: stretch; width: 100%; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-editor { min-height: 260px; display: flex; flex-direction: column; padding: 18px 20px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-editor > p:only-child { flex: 1; min-height: 200px; }
/* ---------- FORMS head: the title and guidance stack like every other screen ---------- */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder { grid-template-columns: minmax(0, 1fr) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-forms .forms-builder > * { grid-column: 1 / -1; }
