/* Templates: library, attorney library, public forms, details drawer and the drafting interview. */
.tl-view{--tl-ink:#0f2a52;--tl-text:#1f3a63;--tl-muted:#5a6d89;--tl-line:#dfe7f2;--tl-soft:#f4f8fd;--tl-blue:#1553b9;--tl-ok:#17603a;--tl-ok-bg:#e7f5ed;--tl-warn:#8a3b0f;--tl-warn-bg:#fff2e6;--tl-q:#4338a8;--tl-q-bg:#eeedfc}
.tl-view .sr-only,.tl-interview .sr-only,.tl-editor .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.tl-view .hidden,.agreement-template-dialog .hidden{display:none!important}
.portal-page.read-only [data-write]{display:none!important}

/* Header */
.tl-head{align-items:flex-end}
.tl-head p{max-width:720px}
.tl-head-actions{display:flex;gap:10px;align-items:center}
.tl-menu-wrap{position:relative}
.tl-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:40;display:grid;min-width:260px;padding:6px;border:1px solid var(--tl-line,#dfe7f2);border-radius:12px;background:#fff;box-shadow:0 18px 50px #0b264d29}
.tl-menu[hidden]{display:none}
.tl-menu [role="menuitem"]{display:block;width:100%;padding:9px 11px;border:0;border-radius:8px;background:none;color:#1f3a63;font:inherit;font-size:13px;font-weight:600;text-align:left;text-decoration:none;cursor:pointer}
.tl-menu [role="menuitem"]:hover,.tl-menu [role="menuitem"]:focus-visible{background:#eef4fd;outline:none}
.tl-menu [role="menuitem"] strong{display:block;color:#0f2a52;font-size:13px}
.tl-menu [role="menuitem"] small{display:block;margin-top:2px;color:#5a6d89;font-size:12px;font-weight:500;line-height:1.4}
#tl-create-menu{width:340px}

/* Stats */
.tl-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:4px 0 22px}
.tl-stat{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto auto;column-gap:12px;align-items:center;padding:16px 18px;border:1px solid var(--tl-line);border-radius:14px;background:#fff;box-shadow:0 3px 16px #1437630a}
.tl-stat svg{grid-row:1/4;width:38px;height:38px;padding:9px;border-radius:11px;background:#eef4fd;color:var(--tl-blue)}
.tl-stat span{color:var(--tl-muted);font-size:12px;font-weight:650}
.tl-stat strong{color:var(--tl-ink);font-size:25px;letter-spacing:-.03em;line-height:1.15}
.tl-stat small{color:var(--tl-muted);font-size:12px;line-height:1.4}

/* Tabs */
.tl-tabs{display:flex;gap:4px;margin-bottom:18px;border-bottom:1px solid var(--tl-line)}
.tl-tabs [role="tab"]{display:inline-flex;align-items:center;gap:8px;margin-bottom:-1px;padding:11px 14px;border:0;border-bottom:3px solid transparent;background:none;color:var(--tl-muted);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.tl-tabs [role="tab"] span{min-width:22px;padding:2px 7px;border-radius:999px;background:#edf2f9;color:#3d5579;font-size:11px;text-align:center}
.tl-tabs [role="tab"][aria-selected="true"]{border-bottom-color:var(--tl-blue);color:var(--tl-ink)}
.tl-tabs [role="tab"][aria-selected="true"] span{background:#dfeafd;color:#123f8a}
.tl-tabs [role="tab"]:hover{color:var(--tl-ink)}
.tl-panel[hidden]{display:none}

/* Toolbar and filters */
.tl-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:12px}
.tl-search{display:flex;flex:1 1 320px;align-items:center;gap:10px;min-height:46px;padding:0 14px;border:1px solid #d3dfee;border-radius:11px;background:#fff;color:#5a6d89}
.tl-search:focus-within{border-color:#5b8fd8;box-shadow:0 0 0 3px #d9e7fb}
.tl-search svg{width:18px;height:18px}
.tl-search input{flex:1;min-width:0;border:0;outline:none;background:none;color:var(--tl-ink);font:inherit;font-size:14px}
.tl-select{display:flex;align-items:center;gap:8px;min-height:46px;padding:0 6px 0 12px;border:1px solid #d3dfee;border-radius:11px;background:#fff}
.tl-select span{color:var(--tl-muted);font-size:12px;font-weight:650}
.tl-select select{min-height:40px;border:0;background:none;color:var(--tl-ink);font:inherit;font-size:13px;font-weight:650}
.tl-filter-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}
.tl-filter-end{display:flex;align-items:center;gap:14px;color:var(--tl-muted);font-size:12px}
.tl-check{display:inline-flex;align-items:center;gap:6px;color:#3d5579;font-size:12px;font-weight:600}
.tl-chips{display:flex;flex-wrap:wrap;gap:6px}
.tl-chips button{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:6px 13px;border:1px solid #d3dfee;border-radius:999px;background:#fff;color:#2a4a74;font:inherit;font-size:12px;font-weight:650;cursor:pointer}
.tl-chips button span{color:#5a6d89;font-weight:600}
.tl-chips button:hover{border-color:#8fb2e3}
.tl-chips button[aria-pressed="true"]{border-color:#0f3b80;background:#0f3b80;color:#fff}
.tl-chips button[aria-pressed="true"] span{color:#d6e4fb}

/* Library grid and cards */
.tl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:16px;align-items:stretch}
.tl-card,.tl-catalog-card{position:relative;display:flex;flex-direction:column;gap:10px;padding:18px;border:1px solid var(--tl-line);border-radius:14px;background:#fff;box-shadow:0 3px 16px #1437630a;transition:box-shadow .15s,border-color .15s}
.tl-card:hover,.tl-catalog-card:hover{border-color:#bcd1ee;box-shadow:0 10px 30px #14376317}
.tl-card.is-pinned{border-color:#b8cdf0;box-shadow:inset 3px 0 0 #1553b9,0 3px 16px #1437630a}
.tl-card.is-archived{background:#fafbfd}
.tl-card-top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:start}
.tl-kind{display:grid;place-items:center;width:42px;height:48px;border:1px solid #d6e3f6;border-radius:9px;background:#eef5ff;color:#1d5bb8;font-size:9px;font-weight:900;letter-spacing:.04em}
.tl-kind.is-q{border-color:#d5d1f6;background:linear-gradient(160deg,#f1efff,#e5e2fb);color:var(--tl-q)}
.tl-card-eyebrow{display:block;margin-bottom:3px;color:#2461b4;font-size:10px;font-weight:850;letter-spacing:.11em;text-transform:uppercase}
.tl-card h2,.tl-catalog-card h3{margin:0;color:var(--tl-ink);font-size:16px;line-height:1.3;letter-spacing:-.015em}
.tl-pin{display:grid;place-items:center;width:34px;height:34px;border:1px solid transparent;border-radius:9px;background:none;color:#7a8ba5;cursor:pointer}
.tl-pin svg{width:18px;height:18px}
.tl-pin:hover{border-color:#d3dfee;color:#1553b9}
.tl-pin[aria-pressed="true"]{border-color:#c6d8f3;background:#eaf2ff;color:#1553b9}
.tl-pin[aria-pressed="true"] svg{fill:#c9dbf8}
.tl-card-body{display:flex;flex-direction:column;gap:10px}
.tl-card-desc{display:-webkit-box;margin:0;overflow:hidden;color:#45597a;font-size:13px;line-height:1.55;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.tl-badges{display:flex;flex-wrap:wrap;gap:6px}
.tl-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border:1px solid #dbe4f0;border-radius:999px;background:#f6f9fd;color:#34507a;font-size:11px;font-weight:700;line-height:1.5}
.tl-badge svg{width:12px;height:12px}
.tl-badge-ok{border-color:#bfe2cd;background:var(--tl-ok-bg);color:var(--tl-ok)}
.tl-badge-warn{border-color:#f3d2b5;background:var(--tl-warn-bg);color:var(--tl-warn)}
.tl-badge-q{border-color:#d7d3f5;background:var(--tl-q-bg);color:var(--tl-q)}
.tl-badge-lib{border-color:#c9d6ea;background:#fff;color:#0f3b80}
.tl-card .agreement-role-chips,.tl-sheet .agreement-role-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0}
.tl-card .agreement-role-chips span{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border:1px solid #e1e8f2;border-radius:6px;background:#fff;color:#2a4a74;font-size:12px;font-weight:600}
.tl-card .agreement-role-chips span::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--role,#1d61c5)}
.tl-tags{display:flex;flex-wrap:wrap;gap:8px;color:#4c6386;font-size:12px}
.tl-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;margin:2px 0 0;overflow:hidden;border:1px solid #e6edf6;border-radius:10px;background:#e6edf6}
.tl-metrics div{padding:8px 10px;background:#fbfcfe}
.tl-metrics dt{color:#5a6d89;font-size:10px;font-weight:750;letter-spacing:.04em;text-transform:uppercase}
.tl-metrics dd{margin:2px 0 0;color:var(--tl-ink);font-size:15px;font-weight:800}
.tl-card-meta{color:#5a6d89;font-size:12px;line-height:1.5}
.tl-card .agreement-version-label{display:flex;align-items:center;gap:10px;margin:0;color:#4c6386;font-size:12px;font-weight:650}
.tl-card .agreement-version-label select{min-height:32px;padding:4px 8px;border:1px solid #cdddf1;border-radius:7px;background:#fff;color:#1d4479;font:inherit;font-size:12px}
.tl-card-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:auto;padding-top:6px}
.tl-card-actions .button{min-height:36px;padding:7px 13px;font-size:12px}
.tl-card-actions .tl-menu-wrap{margin-left:auto}
.tl-more{width:38px;padding:0!important}
.tl-more svg{width:18px;height:18px}
.tl-card .tl-menu{min-width:220px}
.quick-templates-heading{margin-top:34px}

/* Empty states */
.tl-empty{grid-column:1/-1;padding:34px 20px;border:1px dashed #c9d8ec;border-radius:14px;background:#fbfdff;color:#45597a;font-size:13px;text-align:center}
.tl-empty strong{display:block;margin-bottom:6px;color:var(--tl-ink);font-size:16px}
.tl-empty p{margin:0 0 14px}
.tl-empty-start{padding:46px 20px}
.tl-empty-mark{display:grid;place-items:center;width:58px;height:58px;margin:0 auto 14px;border-radius:16px;background:#eaf2ff;color:#1553b9}
.tl-empty-mark svg{width:28px;height:28px}
.tl-muted{color:#5a6d89;font-size:13px;line-height:1.55}

/* Attorney library */
.tl-catalog-hero{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:24px;align-items:end;margin-bottom:18px;padding:26px 28px;border-radius:16px;background:radial-gradient(ellipse at 85% 0%,#1f4f97 0%,#0c2c5e 55%,#081f45 100%);color:#fff}
.tl-catalog-hero .eyebrow{color:#9fc3ff}
.tl-catalog-hero h2{margin:8px 0;font-size:24px;letter-spacing:-.03em}
.tl-catalog-hero p{margin:0;color:#d5e3f8;font-size:14px;line-height:1.6}
.tl-catalog-hero .tl-catalog-notice{padding:12px 14px;border:1px solid #ffffff2e;border-radius:10px;background:#ffffff12;color:#e6eefb;font-size:12px}
.tl-areas{margin-bottom:16px}
.tl-catalog-grid{grid-template-columns:repeat(auto-fill,minmax(310px,1fr))}
.tl-catalog-card p{margin:0;color:#45597a;font-size:13px;line-height:1.55}
.tl-highlights{display:grid;gap:5px;margin:0;padding:0;list-style:none}
.tl-highlights li{display:flex;gap:8px;align-items:flex-start;color:#1f3a63;font-size:13px;font-weight:600}
.tl-highlights svg{width:16px;height:16px;margin-top:1px;color:#17834d}
.tl-catalog-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:2px 0 0}
.tl-catalog-facts div{padding:8px;border-radius:9px;background:#f4f8fd}
.tl-catalog-facts dt{color:#5a6d89;font-size:10px;font-weight:750;line-height:1.3;text-transform:uppercase;letter-spacing:.03em}
.tl-catalog-facts dd{margin:3px 0 0;color:var(--tl-ink,#0f2a52);font-size:14px;font-weight:800}
.tl-installed{display:inline-flex;align-items:center;gap:6px;color:#17603a;font-size:12px;font-weight:750}
.tl-installed svg{width:16px;height:16px}
.tl-catalog-notice{color:#45597a;font-size:12px;line-height:1.55}

/* Shared dialog shells */
.tl-sheet,.tl-drawer,.tl-interview{padding:0;border:0;color:#10264c;font-family:inherit}
.tl-sheet::backdrop,.tl-drawer::backdrop,.tl-interview::backdrop{background:#071e43a6;backdrop-filter:blur(3px)}
.tl-sheet{width:min(1240px,calc(100vw - 32px));height:min(900px,calc(100vh - 32px));border-radius:18px;box-shadow:0 30px 90px #071e4359}
.tl-sheet[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.tl-sheet-head,.tl-drawer-head,.tl-iv-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 24px;border-bottom:1px solid #e3eaf4;background:#fff}
.tl-sheet-head h2,.tl-drawer-head h2,.tl-iv-head h2{margin:6px 0 4px;color:#0f2a52;font-size:22px;letter-spacing:-.03em}
.tl-sheet-head p,.tl-iv-head p{margin:0;max-width:760px;color:#45597a;font-size:13px;line-height:1.55}
.tl-sheet-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);min-height:0}
.tl-sheet-info{min-height:0;overflow:auto;padding:20px 24px}
.tl-sheet-info h3,.tl-drawer-body h3{margin:22px 0 8px;color:#0f2a52;font-size:14px}
.tl-sheet-info .tl-catalog-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
.tl-sheet-info .tl-catalog-facts dd{font-size:13px;font-weight:700}
.tl-sheet-preview{display:flex;flex-direction:column;min-height:0;border-left:1px solid #e3eaf4;background:linear-gradient(140deg,#eaf0f8,#dfe8f4)}
.tl-sheet-foot,.tl-drawer-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px;padding:14px 24px;border-top:1px solid #e3eaf4;background:#fafcff}
.tl-outline{margin:0;padding-left:20px;color:#1f3a63;font-size:13px;line-height:1.8}
.tl-ask{margin:10px 0;padding:10px 12px;border:1px solid #e3eaf4;border-radius:10px}
.tl-ask strong{color:#0f2a52;font-size:13px}
.tl-ask ul{margin:6px 0 0;padding-left:18px;color:#1f3a63;font-size:13px;line-height:1.65}
.tl-ask small{color:#5a6d89}
.tl-compliance-list,.tl-compliance ul{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.tl-compliance-list li,.tl-compliance li{padding:11px 13px;border:1px solid #e3eaf4;border-left:4px solid #8aa4c8;border-radius:10px;background:#fff}
.tl-compliance-list li.tl-level-required,.tl-compliance li.tl-level-required{border-left-color:#b4521b}
.tl-compliance-list li.tl-level-recommended,.tl-compliance li.tl-level-recommended{border-left-color:#1553b9}
.tl-level{display:inline-block;margin-bottom:4px;color:#5a6d89;font-size:10px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}
.tl-level-required .tl-level{color:#8a3b0f}
.tl-level-recommended .tl-level{color:#174a9c}
.tl-compliance-list strong,.tl-compliance li strong{display:block;color:#0f2a52;font-size:13px}
.tl-compliance-list p,.tl-compliance li p{margin:4px 0;color:#34496b;font-size:12.5px;line-height:1.55}
.tl-compliance-list cite,.tl-compliance cite{color:#4c6386;font-size:11.5px;font-style:normal;font-weight:650}
.tl-exec{padding:10px 12px;border-radius:9px;background:var(--tl-ok-bg,#e7f5ed);color:#17603a;font-size:13px;line-height:1.5}
.tl-exec-check,.tl-exec-not_sufficient{background:#fff2e6;color:#8a3b0f}

/* PDF pages */
.tl-iv-preview-bar{display:flex;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid #d7e1ee;background:#fff;color:#45597a;font-size:12px}
.tl-iv-preview-bar strong{color:#0f2a52;font-size:13px}
.tl-iv-preview-bar .text-button{margin-left:auto;font-size:12px}
.tl-iv-pages{display:flex;flex:1;flex-direction:column;align-items:safe center;gap:18px;min-height:0;overflow:auto;padding:22px}
.tl-page{position:relative;flex:none;background:#fff;box-shadow:0 4px 22px #17386024,0 0 0 1px #d2dce9}
.tl-page canvas{display:block}
.tl-field{position:absolute;display:flex;align-items:flex-start;overflow:hidden;padding:1px 4px;border:1.5px dashed var(--role);border-radius:3px;background:color-mix(in srgb,var(--role) 8%,transparent);color:var(--role);font-size:9px;font-weight:800;line-height:1.3;white-space:nowrap;pointer-events:none}
.tl-field-signature{border-style:solid;background:color-mix(in srgb,var(--role) 11%,transparent)}

/* Details drawer */
.tl-drawer{position:fixed;inset:0 0 0 auto;width:min(680px,100vw);max-width:100vw;height:100vh;max-height:100vh;margin:0 0 0 auto;border-radius:18px 0 0 18px;box-shadow:-20px 0 70px #071e4340}
.tl-drawer[open]{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;animation:tl-slide .22s ease-out}
@keyframes tl-slide{from{transform:translateX(40px);opacity:.4}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.tl-drawer[open]{animation:none}}
.tl-drawer-head .tl-badges{margin-top:8px}
.tl-drawer-tabs{display:flex;gap:2px;padding:0 20px;border-bottom:1px solid #e3eaf4;background:#fff}
.tl-drawer-tabs [role="tab"]{margin-bottom:-1px;padding:12px 12px;border:0;border-bottom:3px solid transparent;background:none;color:#5a6d89;font:inherit;font-size:13px;font-weight:750;cursor:pointer}
.tl-drawer-tabs [role="tab"][aria-selected="true"]{border-bottom-color:#1553b9;color:#0f2a52}
.tl-drawer-body{min-height:0;overflow:auto;padding:6px 24px 24px}
.tl-drawer-body section[hidden]{display:none}
.tl-lede{margin:16px 0 0;color:#1f3a63;font-size:14px;line-height:1.6}
.tl-callout{margin:14px 0;padding:12px 14px;border:1px solid #cfe0f8;border-radius:11px;background:#f1f7ff}
.tl-callout strong{color:#0f2a52;font-size:13px}
.tl-callout p{margin:4px 0 0;color:#26446e;font-size:13px;line-height:1.55;white-space:pre-line}
.tl-callout-warn{border-color:#f0cfae;background:#fff6ec}
.tl-callout-warn strong,.tl-callout-warn p{color:#7a3410}
.tl-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px;margin:16px 0}
.tl-facts dt{color:#5a6d89;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.05em}
.tl-facts dd{margin:3px 0 0;color:#0f2a52;font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.tl-people-list{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.tl-people-list li{display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid #e3eaf4;border-radius:10px;font-size:13px}
.tl-people-list small{margin-left:auto;color:#5a6d89;font-size:12px}
.tl-dot{width:10px;height:10px;flex:none;border-radius:50%;background:var(--role,#1d61c5)}
.tl-plain{margin:0;padding-left:18px;color:#1f3a63;font-size:13px;line-height:1.7}
.tl-edit{margin:18px 0;padding:16px;border:1px solid #cfe0f8;border-radius:12px;background:#f8fbff}
.tl-edit h3{margin-top:0}
.tl-edit label,.tl-approve label,.agreement-template-dialog .tl-dialog-grid label{display:block;margin-top:12px;color:#1f3a63;font-size:12px;font-weight:700}
.tl-edit label small,.tl-approve label small,.agreement-template-dialog label small{color:#5a6d89;font-weight:500}
.tl-edit input,.tl-edit textarea,.tl-approve input,.tl-approve select,.tl-compare select{display:block;width:100%;margin-top:6px;padding:9px 10px;border:1px solid #c8d9ee;border-radius:8px;background:#fff;color:#173c6b;font:inherit;font-size:13px}
.tl-dialog-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tl-timeline{display:grid;gap:0;margin:16px 0 0;padding:0;list-style:none}
.tl-timeline li{position:relative;display:flex;justify-content:space-between;gap:12px;padding:12px 0 12px 22px;border-bottom:1px solid #eef2f8}
.tl-timeline li::before{content:"";position:absolute;left:4px;top:18px;width:8px;height:8px;border-radius:50%;background:#1553b9;box-shadow:0 0 0 3px #dfeafd}
.tl-timeline strong{color:#0f2a52;font-size:13px;margin-right:6px}
.tl-timeline small{display:block;margin-top:3px;color:#5a6d89;font-size:12px}
.tl-timeline p{margin:4px 0 0;color:#26446e;font-size:13px}
.tl-timeline .tl-badge{margin-right:4px;padding:1px 7px;font-size:10px}
.tl-timeline-actions{display:flex;gap:12px;align-items:flex-start}
.tl-timeline-actions .text-button,.tl-drawer .text-button{font-size:12px}
.tl-compare{margin-top:22px;padding:16px;border:1px solid #e3eaf4;border-radius:12px;background:#fbfcfe}
.tl-compare h3{margin-top:0}
.tl-compare-controls{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}
.tl-compare-controls label{color:#1f3a63;font-size:12px;font-weight:700}
.tl-compare-summary{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:16px 0 8px;color:#0f2a52;font-size:13px}
.tl-changes{display:grid;gap:8px;margin:8px 0;padding-left:20px}
.tl-changes small{color:#5a6d89;font-size:11px}
.tl-changes p{margin:2px 0;color:#26446e;font-size:13px;line-height:1.55}
.tl-changes del{background:#fde8e6;color:#9b1c10;text-decoration:line-through}
.tl-changes ins{background:#e3f4ea;color:#11633b;text-decoration:underline}
.tl-approval-state{display:flex;gap:12px;align-items:flex-start;margin:18px 0;padding:14px 16px;border:1px solid #dfe7f2;border-radius:12px;background:#f8fafd}
.tl-approval-state svg{width:30px;height:30px;color:#5a6d89}
.tl-approval-state strong{color:#0f2a52;font-size:14px}
.tl-approval-state p{margin:4px 0 0;color:#34496b;font-size:13px;line-height:1.5}
.tl-approval-state.is-ok{border-color:#bfe2cd;background:#f1faf5}
.tl-approval-state.is-ok svg{color:#17603a}
.tl-approval-state.is-warn{border-color:#f0cfae;background:#fff8f1}
.tl-approval-state.is-warn svg{color:#8a3b0f}
.tl-approve{padding:14px 16px;border:1px solid #e3eaf4;border-radius:12px}
.tl-switch-row{display:flex!important;align-items:center;justify-content:space-between;gap:14px;margin-top:16px!important;padding-top:14px;border-top:1px solid #eef2f8}
.tl-switch-row strong{display:block;color:#0f2a52;font-size:13px}
.tl-switch-row small{display:block;margin-top:3px;color:#5a6d89;font-size:12px;font-weight:500}
.tl-history{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.tl-history li{padding:9px 12px;border-left:3px solid #c8d9ee;background:#fafcff}
.tl-history strong{color:#0f2a52;font-size:13px}
.tl-history small{display:block;color:#5a6d89;font-size:12px}
.tl-history p{margin:4px 0 0;color:#26446e;font-size:13px}
.tl-usage{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}
.tl-usage div{padding:12px;border:1px solid #e3eaf4;border-radius:11px}
.tl-usage span{display:block;color:#5a6d89;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.04em}
.tl-usage strong{color:#0f2a52;font-size:20px}
.tl-bars{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.tl-bars li{display:grid;grid-template-columns:90px 1fr 34px;gap:10px;align-items:center;color:#26446e;font-size:13px}
.tl-bar{height:10px;overflow:hidden;border-radius:10px;background:#e8eef7}
.tl-bar i{display:block;height:100%;border-radius:10px;background:linear-gradient(90deg,#1553b9,#4f86d9)}

/* Switch */
.tl-switch,.tl-question>label.tl-switch{position:relative;display:inline-flex;align-items:center;gap:10px;margin:0;cursor:pointer}
.tl-switch input{position:absolute;z-index:1;width:44px;height:26px;margin:0;opacity:0;cursor:pointer}
.tl-switch>span{position:relative;display:inline-block;width:44px;height:26px;flex:none;border-radius:999px;background:#c3cfdf;transition:background .15s}
.tl-switch>span::after{content:"";position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .15s}
.tl-switch input:checked+span{background:#1553b9}
.tl-switch input:checked+span::after{transform:translateX(18px)}
.tl-switch input:focus-visible+span{outline:3px solid #5898f0;outline-offset:2px}
.tl-switch b{color:#1f3a63;font-size:13px}

/* Drafting interview */
.tl-interview{position:fixed;inset:0;width:100vw;max-width:100vw;height:100vh;max-height:100vh;margin:0;background:#f4f7fb}
.tl-interview[open]{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto}
.tl-iv-head{align-items:center}
.tl-iv-head>div:first-child{min-width:0}
.tl-iv-head h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tl-iv-progress{display:grid;gap:6px;min-width:210px;margin-left:auto;color:#26446e;font-size:12px;font-weight:700;text-align:right}
.tl-meter{display:block;height:8px;overflow:hidden;border-radius:8px;background:#e3eaf4}
.tl-meter i{display:block;width:0;height:100%;border-radius:8px;background:linear-gradient(90deg,#1553b9,#2f9e6a);transition:width .25s}
.tl-iv-switch{display:none}
.tl-iv-body{display:grid;grid-template-columns:minmax(380px,500px) minmax(0,1fr);min-height:0;min-width:0}
.tl-iv-body>*,.tl-sheet-body>*{min-width:0}
.tl-iv-head,.tl-sheet-head,.tl-drawer-head{position:relative}
.tl-iv-form{min-height:0;overflow:auto;padding:18px 22px 40px;border-right:1px solid #dfe7f2;background:#fff}
.tl-iv-preview{display:flex;flex-direction:column;min-height:0;background:linear-gradient(140deg,#eaf0f8,#dfe8f4)}
.tl-group{margin:0 0 16px;padding:14px 16px 6px;border:1px solid #e3eaf4;border-radius:13px;background:#fff}
.tl-group[hidden]{display:none}
.tl-group legend{display:flex;align-items:center;gap:10px;padding:0 6px;color:#0f2a52;font-size:14px;font-weight:800}
.tl-group legend>span{display:grid;place-items:center;width:26px;height:26px;border-radius:8px;background:#eaf2fe;color:#174a9c;font-size:11px;font-weight:900}
.tl-group.is-complete legend>span{background:#e3f4ea;color:#17603a}
.tl-group-progress{margin-left:auto;color:#5a6d89;font-size:11px;font-weight:700}
.tl-question{margin:0 0 12px}
.tl-question[hidden]{display:none}
.tl-question>label{display:block;margin-bottom:6px;color:#1f3a63;font-size:13px;font-weight:700}
.tl-question>label small{color:#5a6d89;font-weight:500}
.tl-question input:not([type=radio]):not([type=checkbox]),.tl-question select,.tl-question textarea,.tl-person input,.tl-person select,.tl-reference input{width:100%;min-height:40px;padding:8px 11px;border:1px solid #c8d9ee;border-radius:9px;background:#fff;color:#0f2a52;font:inherit;font-size:14px}
.tl-question textarea{min-height:76px;resize:vertical;line-height:1.5}
.tl-question input:focus,.tl-question select:focus,.tl-question textarea:focus,.tl-person input:focus,.tl-person select:focus,.tl-reference input:focus{border-color:#4f86d9;outline:none;box-shadow:0 0 0 3px #d9e7fb}
.tl-question.has-error input,.tl-question.has-error textarea{border-color:#c2412d}
.tl-help{margin:5px 0 0;color:#5a6d89;font-size:12px;line-height:1.45}
.tl-help:empty,.tl-error:empty{display:none}
.tl-error{margin:5px 0 0;color:#a4222a;font-size:12px;font-weight:650}
.tl-affix{display:flex;align-items:center;border:1px solid #c8d9ee;border-radius:9px;background:#fff}
.tl-affix>span{padding:0 10px;color:#4c6386;font-size:13px;font-weight:700}
.tl-question .tl-affix input{border:0!important;box-shadow:none!important}
.tl-affix:focus-within{border-color:#4f86d9;box-shadow:0 0 0 3px #d9e7fb}
.tl-segment{display:flex;flex-wrap:wrap;gap:6px}
.tl-segment label{position:relative;flex:1 1 auto}
.tl-segment input{position:absolute;opacity:0}
.tl-segment span{display:block;padding:9px 12px;border:1px solid #c8d9ee;border-radius:9px;background:#fff;color:#1f3a63;font-size:13px;font-weight:650;text-align:center;cursor:pointer}
.tl-segment input:checked+span{border-color:#1553b9;background:#eaf2ff;color:#0f3b80;box-shadow:inset 0 0 0 1px #1553b9}
.tl-segment input:focus-visible+span{outline:3px solid #5898f0;outline-offset:2px}
.tl-people .tl-help{margin:0 0 10px}
.tl-person{margin-bottom:12px;padding:10px 12px;border:1px solid #e3eaf4;border-left:4px solid var(--role);border-radius:10px}
.tl-person-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px}
.tl-person-head strong{color:#0f2a52;font-size:13px}
.tl-person-head small{color:#5a6d89;font-size:12px}
.tl-person-head select{width:auto!important;min-height:32px!important;margin-left:auto;padding:4px 8px!important;font-size:12px!important}
.tl-person-fields{display:grid;grid-template-columns:1fr 1.2fr;gap:8px}
.tl-person-fields label{color:#3d5579;font-size:12px;font-weight:650}
.tl-person-fields input{margin-top:4px}
.tl-slot{display:grid;gap:8px;margin-bottom:14px}
.tl-slot>strong{color:#1f3a63;font-size:13px}
.tl-clause{position:relative;display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid #d3dfee;border-radius:10px;cursor:pointer}
.tl-clause input{margin-top:3px;accent-color:#1553b9}
.tl-clause b{display:block;color:#0f2a52;font-size:13px}
.tl-clause b small{margin-left:6px;padding:1px 6px;border-radius:999px;background:#edf2f9;color:#3d5579;font-size:10px}
.tl-clause span>small{display:block;margin-top:2px;color:#4c6386;font-size:12px;line-height:1.45}
.tl-clause:has(input:checked){border-color:#1553b9;background:#f2f7ff;box-shadow:inset 0 0 0 1px #1553b9}
.tl-compliance{margin:0 0 16px;border:1px solid #e3eaf4;border-radius:13px;background:#fff}
.tl-compliance summary{display:flex;justify-content:space-between;gap:10px;padding:13px 16px;cursor:pointer;color:#0f2a52;font-size:14px}
.tl-compliance summary span{color:#5a6d89;font-size:12px;font-weight:650}
.tl-compliance ul{padding:0 14px 14px}
.tl-reference{display:block;color:#1f3a63;font-size:13px;font-weight:700}
.tl-reference small{color:#5a6d89;font-weight:500}
.tl-reference input{margin-top:6px}
.tl-iv-form>.tl-callout-warn{margin-top:0}
.tl-iv-foot{display:flex;flex-wrap:wrap;align-items:center;gap:14px;padding:12px 22px;border-top:1px solid #dfe7f2;background:#fff;box-shadow:0 -6px 18px #1a3f680a}
.tl-iv-foot p{margin:0;color:#26446e;font-size:13px}
.tl-iv-foot .form-error:empty{display:none}
.tl-iv-foot>div{display:flex;gap:10px;margin-left:auto}
.tl-iv-foot .button{min-height:42px;font-size:13px}
.tl-iv-foot .button.primary:disabled{opacity:.55;cursor:not-allowed}

/* Template editor */
.tl-editor .tl-ed-body{grid-template-columns:minmax(460px,640px) minmax(0,1fr)}
.tl-ed-main{display:flex;flex-direction:column;min-height:0;border-right:1px solid #dfe7f2;background:#fff}
.tl-ed-tabs{display:flex;gap:2px;padding:0 18px;border-bottom:1px solid #e3eaf4}
.tl-ed-tabs [role="tab"]{margin-bottom:-1px;padding:11px 10px;border:0;border-bottom:3px solid transparent;background:none;color:#5a6d89;font:inherit;font-size:13px;font-weight:750;cursor:pointer}
.tl-ed-tabs [role="tab"][aria-selected="true"]{border-bottom-color:#1553b9;color:#0f2a52}
.tl-ed-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:10px 18px;border-bottom:1px solid #eef2f8;background:#fafcff}
.tl-ed-chips:empty{display:none}
.tl-ed-chips>span{color:#5a6d89;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.tl-ed-chips button{padding:4px 9px;border:1px solid #d7d3f5;border-radius:999px;background:#f4f2ff;color:#3a2f99;font:inherit;font-size:12px;font-weight:650;cursor:pointer}
.tl-ed-chips button.is-role{border-color:#c6d8f3;background:#eef5ff;color:#174a9c}
.tl-ed-panel{flex:1;min-height:0;overflow:auto;padding:16px 18px 40px}
.tl-ed-panel h3{margin:18px 0 8px;color:#0f2a52;font-size:14px}
.tl-ed-list{display:grid;gap:10px}
.tl-ed-card{padding:10px 12px 12px;border:1px solid #e1e8f2;border-radius:11px;background:#fff}
.tl-ed-card .tl-ed-list{margin-top:10px;padding-left:12px;border-left:2px solid #e3eaf4}
.tl-ed-card-head{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.tl-ed-card-head code{padding:1px 6px;border-radius:5px;background:#f2f4fa;color:#3a2f99;font-size:11.5px}
.tl-ed-type{padding:2px 8px;border-radius:999px;background:#eef3fa;color:#26446e;font-size:11px;font-weight:800}
.tl-ed-if>.tl-ed-card-head .tl-ed-type{background:#fff2e6;color:#8a3b0f}
.tl-ed-slot>.tl-ed-card-head .tl-ed-type{background:#eeedfc;color:#4338a8}
.tl-ed-signatures>.tl-ed-card-head .tl-ed-type,.tl-ed-fill>.tl-ed-card-head .tl-ed-type,.tl-ed-checkboxes>.tl-ed-card-head .tl-ed-type{background:#e7f5ed;color:#17603a}
.tl-ed-actions{display:flex;gap:2px;margin-left:auto}
.tl-ed-actions button{width:28px;height:28px;border:1px solid transparent;border-radius:7px;background:none;color:#4c6386;font-size:13px;cursor:pointer}
.tl-ed-actions button:hover{border-color:#d3dfee;background:#f4f8fd;color:#0f2a52}
.tl-ed-actions button:disabled{opacity:.35;cursor:default}
.tl-ed-field{display:block;margin-top:8px;color:#3d5579;font-size:12px;font-weight:700}
.tl-ed-field input,.tl-ed-field select,.tl-ed-field textarea,.tl-ed-cond select,.tl-ed-cond input,.tl-ed-signer>input,.tl-ed-note input,.tl-ed-card-head select{display:block;width:100%;margin-top:4px;padding:7px 9px;border:1px solid #c8d9ee;border-radius:8px;background:#fff;color:#0f2a52;font:inherit;font-size:13px}
.tl-ed-field textarea{resize:vertical;line-height:1.5;font-family:Georgia,"Times New Roman",serif;font-size:14px}
.tl-ed-card-head select{width:auto;margin:0}
.tl-ed-title input{font-size:15px;font-weight:700}
.tl-ed-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tl-ed-inline{display:inline-flex;align-items:center;gap:6px;margin:8px 14px 0 0;color:#26446e;font-size:12.5px;font-weight:600}
.tl-ed-cond{display:grid;grid-template-columns:auto 1fr 1fr 1fr;gap:6px;align-items:center;margin:4px 0 2px;padding:8px;border-radius:9px;background:#fff8f1}
.tl-ed-cond>span{color:#8a3b0f;font-size:12px;font-weight:800}
.tl-ed-cond select,.tl-ed-cond input{margin:0}
.tl-ed-branch{margin-top:10px}
.tl-ed-branch>strong{color:#5a6d89;font-size:11px;font-weight:850;letter-spacing:.06em;text-transform:uppercase}
.tl-ed-option{margin-top:10px;padding:10px;border:1px dashed #cbc6f0;border-radius:10px;background:#fbfaff}
.tl-ed-add select{width:100%;margin-top:2px;padding:7px 9px;border:1px dashed #b9cbe5;border-radius:9px;background:#f8fbff;color:#1d5bb8;font:inherit;font-size:12.5px;font-weight:700;cursor:pointer}
.tl-ed-signers{display:grid;gap:6px;margin-top:8px}
.tl-ed-signer{padding:6px 8px;border-radius:8px;background:#f8fafd}
.tl-ed-signer>input{margin:4px 0 0}
.tl-ed-lines{margin-top:4px}
.tl-ed-fieldset{margin:10px 0;padding:8px 12px;border:1px solid #e1e8f2;border-radius:10px}
.tl-ed-fieldset legend{padding:0 4px;color:#3d5579;font-size:12px;font-weight:700}
.tl-ed-problem{margin:12px 16px 0;padding:10px 12px;border:1px solid #f0c3bd;border-radius:10px;background:#fff4f2;color:#8f1d12;font-size:13px;font-weight:650;line-height:1.5}
.tl-ed-problem[hidden]{display:none}
.tl-ed-note{flex:1 1 280px;color:#26446e;font-size:12px;font-weight:700}
.tl-ed-note input{margin-top:4px}
@media (max-width:900px){
  .tl-editor .tl-ed-body{grid-template-columns:1fr}
  .tl-editor[data-view="edit"] .tl-iv-preview,.tl-editor[data-view="preview"] .tl-ed-main{display:none}
  .tl-ed-main{border-right:0}
}
@media (max-width:690px){.tl-ed-row,.tl-ed-cond{grid-template-columns:1fr}.tl-ed-tabs{overflow-x:auto}.tl-ed-tabs [role="tab"]{white-space:nowrap}}

/* Importing the firm's documents */
.tl-import-sheet{height:auto;max-height:min(880px,calc(100vh - 32px));width:min(860px,calc(100vw - 32px))}
.tl-import-sheet[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.tl-import-body{min-height:0;overflow:auto;padding:20px 24px}
.tl-import-body h3{margin:22px 0 10px;color:#0f2a52;font-size:14px}
.tl-dropzone{position:relative;display:grid;justify-items:center;gap:6px;padding:28px 20px;border:2px dashed #a9c3e8;border-radius:14px;background:#f6f9ff;color:#1f3a63;text-align:center;cursor:pointer;transition:background .15s,border-color .15s}
.tl-dropzone:hover,.tl-dropzone.is-over,.tl-dropzone:focus-within{border-color:#1553b9;background:#eaf2ff}
.tl-dropzone input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.tl-drop-icon svg{width:34px;height:34px;padding:7px;border-radius:10px;background:#fff;color:#1553b9;box-shadow:0 3px 12px #1437631a}
.tl-dropzone strong{font-size:15px}
.tl-dropzone small{max-width:560px;color:#45597a;font-size:12.5px;line-height:1.5}
.tl-recognizes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;list-style:none}
.tl-recognizes li{padding:9px 11px;border:1px solid #e3eaf4;border-radius:10px;background:#fff}
.tl-recognizes strong{display:block;color:#0f2a52;font-size:12.5px}
.tl-recognizes span{display:block;margin-top:2px;color:#45597a;font-size:12px;line-height:1.45}
.tl-import-results:empty{display:none}
.tl-import-results{margin-top:14px}
.tl-import-summary{margin:0 0 8px;color:#0f2a52;font-size:13px;font-weight:700}
.tl-import-list{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.tl-import-list li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;padding:9px 12px;border:1px solid #e3eaf4;border-left:4px solid #c3cfdf;border-radius:9px;background:#fff;font-size:13px}
.tl-import-list li.is-ok{border-left-color:#2f9e6a}
.tl-import-list li.is-error{border-left-color:#c2412d}
.tl-import-list li.is-info{border-left-color:#1553b9}
.tl-import-name{color:#0f2a52;font-weight:700;overflow-wrap:anywhere}
.tl-import-state{color:#45597a}
.tl-import-list li.is-error .tl-import-state{color:#a4222a;font-weight:650}
.tl-import-state .text-button{font-size:12px}
.tl-view.is-dropping{position:relative}
.tl-view.is-dropping::after{content:"Drop to import into your library";position:fixed;inset:12px;z-index:60;display:grid;place-items:center;border:3px dashed #1553b9;border-radius:18px;background:#eaf2ffe6;color:#0f3b80;font-size:22px;font-weight:800;pointer-events:none}
.tl-ed-import{display:flex;gap:12px;align-items:flex-start;margin:12px 18px 0;padding:12px 14px;border:1px solid #bfe2cd;border-radius:11px;background:#f1faf5;color:#17603a}
.tl-ed-import>div{flex:1}
.tl-ed-import strong{color:#0f4a2c;font-size:13px}
.tl-ed-import p{margin:4px 0 0;color:#1f4d36;font-size:12.5px;line-height:1.5}
.tl-ed-import ul{margin:6px 0 0;padding-left:18px;color:#7a3410;font-size:12.5px;line-height:1.5}
@media (max-width:690px){.tl-recognizes{grid-template-columns:1fr}.tl-import-sheet{width:100vw;max-height:100vh;border-radius:0}}

/* Composer save dialog additions */
.agreement-template-dialog .tl-dialog-grid input{display:block;width:100%;margin-top:7px;padding:11px;border:1px solid #c8d9ee;border-radius:7px;color:#173c6b;font:inherit}
.signing-form-answers{margin-top:16px;padding:12px 14px;border:1px solid #dce7f4;border-radius:12px;background:#fafcff}
.signing-form-answers h3{margin:0 0 4px;font-size:14px}

/* Responsive */
@media (max-width:1200px){.tl-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.tl-catalog-hero{grid-template-columns:1fr}}
@media (max-width:900px){
  .tl-sheet-body{grid-template-columns:1fr;overflow:auto}.tl-sheet-info{overflow:visible}.tl-sheet-preview{min-height:520px;border-left:0;border-top:1px solid #e3eaf4}
  .tl-iv-switch{display:flex;gap:4px;padding:8px 14px;border-bottom:1px solid #dfe7f2;background:#fff}
  .tl-iv-switch [role="tab"]{flex:1;min-height:38px;border:1px solid #d3dfee;border-radius:9px;background:#fff;color:#1f3a63;font:inherit;font-size:13px;font-weight:750}
  .tl-iv-switch [role="tab"][aria-selected="true"]{border-color:#0f3b80;background:#0f3b80;color:#fff}
  .tl-iv-body{grid-template-columns:1fr}
  .tl-interview[data-view="questions"] .tl-iv-preview,.tl-interview[data-view="preview"] .tl-iv-form{display:none}
  .tl-iv-form{border-right:0}
  .tl-iv-progress{min-width:120px}
}
@media (max-width:690px){
  .tl-head{align-items:flex-start;flex-direction:column}.tl-head-actions{width:100%}.tl-head-actions .tl-menu-wrap,.tl-head-actions #tl-create{width:100%}
  #tl-create-menu{left:0;right:auto;width:min(340px,calc(100vw - 32px))}
  .tl-stats{grid-template-columns:1fr 1fr;gap:10px}.tl-stat{display:flex;flex-direction:column;gap:2px;padding:12px}.tl-stat svg{display:none}.tl-stat strong{font-size:21px}
  .tl-tabs{overflow-x:auto}.tl-tabs [role="tab"]{white-space:nowrap;padding:10px}
  .tl-grid,.tl-catalog-grid{grid-template-columns:1fr}
  .tl-select{flex:1 1 140px}
  .tl-catalog-hero{padding:20px}.tl-catalog-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tl-sheet{width:100vw;height:100vh;max-height:100vh;border-radius:0}
  .tl-sheet-head,.tl-drawer-head,.tl-iv-head{padding:14px 16px}
  .tl-drawer{width:100vw;border-radius:0}
  .tl-drawer-body{padding:4px 16px 20px}.tl-facts,.tl-dialog-grid,.tl-compare-controls{grid-template-columns:1fr}.tl-usage{grid-template-columns:1fr 1fr}
  .tl-iv-head{flex-wrap:wrap;padding-right:52px}.tl-iv-head h2{font-size:18px;white-space:normal}.tl-iv-progress{order:3;width:100%;margin:0;text-align:left}
  #tl-iv-close,.tl-sheet-head .close-button,.tl-drawer-head .close-button{position:absolute;top:10px;right:12px}
  .tl-iv-form{padding:14px 14px 30px}.tl-person-fields{grid-template-columns:1fr}
  .tl-iv-foot{padding:10px 14px}.tl-iv-foot>div{width:100%;margin:0}.tl-iv-foot>div .button{flex:1}
  .tl-iv-pages{padding:12px}
}
