.client-page { margin:0; background:#f3f6f8; color:#122d43; font:16px/1.6 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.client-page *, .client-dialog * { box-sizing:border-box; }
.client-brand { display:flex; align-items:center; gap:12px; max-width:880px; padding:26px 28px; margin:auto; font-size:24px; font-weight:700; letter-spacing:-.6px; }
.client-brand img { border-radius:9px; }
.client-brand small { margin-left:auto; font-size:12px; font-weight:500; letter-spacing:.03em; color:#597080; }
.client-main { max-width:824px; margin:12px auto 40px; padding:0 24px; }
.client-card { border:1px solid #dde6eb; border-radius:18px; background:white; padding:32px; margin:18px 0; box-shadow:0 6px 26px #13324a05; overflow-wrap:anywhere; }
.client-page h1, .client-dialog h1 { font-size:clamp(26px,4vw,36px); line-height:1.2; letter-spacing:-.9px; margin:10px 0 18px; }
.client-page h2, .client-dialog h2 { font-size:21px; line-height:1.3; margin:0 0 16px; }
.client-page h3, .client-dialog h3 { margin:0 0 10px; font-size:16px; }
.client-eyebrow { text-transform:uppercase; color:#517381; letter-spacing:1.4px; font-size:11px; font-weight:700; }
.client-muted { color:#587080; font-size:14px; }
.client-page p { margin:10px 0; }
.client-progress { width:100%; height:6px; border:0; border-radius:4px; accent-color:#127f78; margin:18px 0 2px; }
.client-progress::-webkit-progress-bar { background:#e0e9e9; border-radius:4px; }
.client-progress::-webkit-progress-value { background:#127f78; border-radius:4px; }
.client-progress::-moz-progress-bar { background:#127f78; border-radius:4px; }
.client-field { border:0; padding:0; margin:22px 0 28px; min-width:0; }
.client-field legend { font-size:17px; font-weight:650; margin:0 0 6px; padding:0; }
.client-field > label:not(.client-choice), .client-setting { display:grid; gap:8px; font-size:14px; }
.client-field input:not([type=checkbox]):not([type=radio]), .client-field textarea, .client-setting input, .client-setting select, .client-link { width:100%; border:1px solid #becdd5; border-radius:9px; padding:12px 14px; background:#fff; color:#112d40; font:inherit; min-height:48px; }
.client-field textarea { resize:vertical; min-height:94px; }
.client-choice { display:flex; align-items:flex-start; gap:12px; padding:12px 14px; border:1px solid #d9e3e8; border-radius:9px; margin-top:8px; cursor:pointer; }
.client-choice input { flex:0 0 auto; width:19px; height:19px; margin:3px 0 0; accent-color:#137d77; }
.client-choice:has(input:checked) { background:#edf8f5; border-color:#439e96; }
.client-required { font-size:11px; color:#577080; margin-left:7px; font-weight:500; }
.client-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; margin-top:22px; }
.client-button { display:inline-flex; justify-content:center; align-items:center; border:1px solid #b9cbd3; border-radius:10px; padding:12px 18px; min-height:46px; background:white; color:#15354a; font:600 14px/1.4 system-ui,sans-serif; cursor:pointer; text-decoration:none; }
.client-button.primary { background:#10394c; border-color:#10394c; color:white; }
.client-button.danger { color:#a33235; border-color:#dec0c1; }
.client-button:disabled { opacity:.55; cursor:wait; }
.client-page :focus-visible, .client-dialog :focus-visible { outline:3px solid #19a696; outline-offset:3px; }
.client-status { font-size:13px; min-height:22px; color:#23756a; }
.client-error { color:#963334; background:#fff1f0; padding:12px 16px; border-radius:9px; margin:12px 0; white-space:pre-wrap; }
.client-error:empty { display:none; }
.client-summary { margin:0; }
.client-summary dt { font-weight:600; margin-top:18px; }
.client-summary dd { margin:5px 0 16px; white-space:pre-wrap; color:#48616f; }
.client-success { text-align:center; padding:55px 28px; }
.client-success img { width:76px; height:76px; border-radius:18px; margin-bottom:20px; }
.client-page-footer { color:#6a7d89; text-align:center; padding:16px 24px 32px; font-size:12px; }
.client-dialog { width:min(840px,calc(100vw - 24px)); max-height:90dvh; padding:0; overflow:hidden; border:1px solid #d6e1e6; border-radius:18px; color:#173246; background:#f7f9fa; font:15px/1.55 system-ui,sans-serif; }
.client-dialog[open] { display:flex; flex-direction:column; }
/* Avoid a filtered top-layer backdrop: Safari can stop painting the dialog's
   descendants when a scrolled form is replaced. The tint still dims the app. */
.client-dialog::backdrop { background:#061b32a6; }
.client-dialog-header { flex:none; padding:22px 26px; display:flex; align-items:center; gap:16px; justify-content:space-between; background:white; border-bottom:1px solid #dde6eb; }
.client-dialog-header h2 { min-width:0; margin:0; overflow-wrap:anywhere; }
.client-dialog-header > .client-button { flex-shrink:0; }
.client-dialog-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:4px 26px 26px; }
.client-settings { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:20px 0; }
.client-settings .wide { grid-column:1/-1; }
.client-request { padding:20px 0; border-bottom:1px solid #e0e8ed; }
.client-request:first-child { padding-top:0; }
.client-request:last-child { border:0; padding-bottom:0; }
.client-request-line { display:flex; align-items:center; gap:12px; justify-content:space-between; }
.client-badge { display:inline-flex; font-size:12px; padding:4px 10px; background:#e9eef2; border-radius:20px; white-space:nowrap; }
.client-badge.submitted { color:#135b50; background:#e0f4ed; }
.client-dialog .client-check { display:grid; grid-template-columns:20px minmax(0,1fr); gap:12px; align-items:start; min-height:44px; padding:10px 0; margin:0; cursor:pointer; }
/* Keep global text-input dimensions out of these compact checkbox rows. */
.client-dialog .client-check input { width:20px; height:20px; min-height:20px; padding:0; margin:2px 0 0; accent-color:#137d77; cursor:pointer; }
.client-dialog .client-check > span { min-width:0; line-height:24px; overflow-wrap:anywhere; }
.client-dialog .client-check + h3 { margin:24px 0 8px; padding-top:24px; border-top:1px solid #e0e8ed; }
.client-dialog p { margin:8px 0 16px; }
.client-dialog .client-check + .client-actions { margin-top:24px; padding-top:20px; border-top:1px solid #e0e8ed; }
.client-link { font-size:13px; margin:12px 0; }
.client-document-preview { overflow:auto; max-height:55vh; background:white; border:1px solid #dde6eb; padding:24px; margin-top:16px; }
.client-backup-link { font-size:13px; margin-top:14px; }
/* Keep all three actions on the first row; the title stays below them. */
.is-mobile-workspace .execution-topbar:has(.client-interview-open) {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    column-gap: 4px;
}
.is-mobile-workspace .execution-shell .editor-topbar-left:has(.client-interview-open) { display:contents; }
.is-mobile-workspace .execution-topbar:has(.client-interview-open) #previewBackButton { grid-row:1; grid-column:1; }
.is-mobile-workspace .execution-shell .client-interview-open {
    grid-row:1;
    grid-column:2;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.is-mobile-workspace .execution-topbar:has(.client-interview-open) .lexcraft-persistence-control-editor { grid-row:3; grid-column:1; justify-self:start; }
@media(max-width:600px) {
 .client-brand { padding:20px; font-size:22px; }
 .client-brand small { font-size:10px; }
 .client-main { padding:0 14px; margin-top:0; }
 .client-card { padding:22px 18px; border-radius:14px; }
 .client-actions { flex-direction:column; }
 .client-actions .client-button { width:100%; }
 .client-settings { grid-template-columns:1fr; }
 .client-dialog-header { padding:18px; gap:12px; }
 .client-dialog-header h2 { font-size:18px; }
 .client-dialog-body { padding:0 14px 18px; }
 .client-request-line { align-items:flex-start; flex-direction:column; gap:5px; }
 .client-page-footer { padding-bottom:calc(24px + env(safe-area-inset-bottom,0px)); }
}
