:root{--navy:#10243e;--navy2:#183654;--ink:#182334;--muted:#66758a;--line:#dfe6ee;--bg:#f3f6fa;--card:#fff;--teal:#0f766e;--teal2:#14b8a6;--green:#15803d;--amber:#b45309;--red:#b42318;--blue:#2563eb;--shadow:0 12px 35px rgba(16,36,62,.08);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}*{box-sizing:border-box}html,body{margin:0;min-height:100%}body{font-size:14px}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}.muted{color:var(--muted)}.eyebrow{font-size:12px;font-weight:800;color:var(--teal);margin:0 0 8px}.brand-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:linear-gradient(145deg,var(--teal2),var(--teal));color:#fff;font-size:12px;font-weight:900;box-shadow:0 8px 18px rgba(15,118,110,.3)}.brand-mark.large{width:62px;height:62px;border-radius:18px;font-size:18px}.brand{display:flex;align-items:center;gap:11px}.brand span:last-child{display:flex;flex-direction:column}.brand strong{font-size:16px}.brand small{color:#91a1b7;margin-top:2px}.app-body{display:flex;background:var(--bg)}.sidebar{position:fixed;inset:0 auto 0 0;width:254px;background:linear-gradient(180deg,#10243e,#0d1d32);color:#dce5ef;padding:22px 16px;z-index:30;display:flex;flex-direction:column}.sidebar .brand{padding:0 8px 24px;border-bottom:1px solid rgba(255,255,255,.08)}.nav-list{display:flex;flex-direction:column;gap:5px;padding:22px 0;flex:1}.nav-list a{display:flex;gap:13px;align-items:center;padding:11px 13px;border-radius:9px;color:#b9c7d8;font-weight:600}.nav-list a:hover,.nav-list a.active{color:#fff;background:rgba(20,184,166,.16)}.nav-list a.active{box-shadow:inset 3px 0 var(--teal2)}.sidebar-user{display:flex;align-items:center;gap:9px;border-top:1px solid rgba(255,255,255,.08);padding-top:16px}.sidebar-user .avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#2d4a68;color:#fff;font-weight:800}.sidebar-user div{display:flex;flex-direction:column;min-width:0;flex:1}.sidebar-user strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-user small{color:#91a1b7;font-size:10px}.sidebar-user button{border:0;background:transparent;color:#91a1b7;font-size:20px}.main-shell{margin-left:254px;min-width:0;flex:1;min-height:100vh}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 30px;position:sticky;top:0;z-index:20}.topbar>div:nth-child(2){display:flex;flex-direction:column}.topbar small{color:var(--muted);font-size:11px}.topbar strong{font-size:17px}.topbar-actions{margin-left:auto;display:flex;gap:12px;align-items:center}.secure-pill{display:inline-flex;align-items:center;gap:6px;background:#ecfdf5;color:#087a55;border:1px solid #bbf7d0;border-radius:999px;padding:7px 11px;font-size:11px;font-weight:700}.menu-toggle{display:none;border:0;background:transparent;font-size:22px;margin-right:12px}.page-content{padding:28px;max-width:1600px;margin:0 auto}.critical-banner{background:#fff1f2;color:#8f1d2c;border-bottom:1px solid #fecdd3;padding:12px 30px}.critical-banner a{text-decoration:underline;font-weight:800}.flash{padding:13px 16px;border-radius:10px;margin-bottom:18px;border:1px solid;font-weight:600}.flash ul{margin:7px 0 0 18px}.flash.success{background:#ecfdf5;border-color:#bbf7d0;color:#11653f}.flash.warning{background:#fffbeb;border-color:#fde68a;color:#8a4b08}.flash.error{background:#fff1f2;border-color:#fecdd3;color:#9f2434}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.page-head h1{font-size:27px;letter-spacing:-.03em;margin:3px 0 4px}.page-head p{color:var(--muted);margin:0;max-width:720px}.head-actions{display:flex;gap:9px;flex-wrap:wrap}.button{border:1px solid transparent;border-radius:9px;padding:10px 14px;font-weight:750;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px}.button.primary{background:var(--teal);color:#fff;box-shadow:0 5px 14px rgba(15,118,110,.2)}.button.primary:hover{background:#0b625c}.button.secondary{background:#fff;border-color:var(--line);color:var(--ink)}.button.danger{background:#fff1f2;border-color:#fecdd3;color:var(--red)}.button.small{padding:6px 10px;min-height:32px;font-size:12px}.button.full{width:100%;min-height:48px}.text-link{color:var(--teal);font-weight:700}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:22px}.stat-card,.panel,.activity-card{background:var(--card);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}.stat-card{padding:19px}.stat-card small{color:var(--muted);font-weight:700}.stat-card strong{display:block;font-size:28px;margin-top:8px;letter-spacing:-.03em}.stat-card span{font-size:11px;color:var(--teal);font-weight:700}.panel{overflow:hidden;margin-bottom:20px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding:17px 19px;border-bottom:1px solid var(--line)}.panel-head h2{font-size:16px;margin:0}.panel-head p{margin:3px 0 0;color:var(--muted);font-size:12px}.panel-body{padding:19px}.grid-2{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.75fr);gap:20px}.grid-equal{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse}.data-table th{text-align:left;background:#f8fafc;color:#6c7888;text-transform:uppercase;letter-spacing:.06em;font-size:10px;padding:11px 14px;border-bottom:1px solid var(--line)}.data-table td{padding:13px 14px;border-bottom:1px solid #edf1f5;vertical-align:middle}.data-table tr:last-child td{border-bottom:0}.data-table tr:hover td{background:#fbfcfe}.name-cell{display:flex;align-items:center;gap:10px}.mini-avatar{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;background:#e6fffb;color:var(--teal);font-size:11px;font-weight:900}.name-cell div{display:flex;flex-direction:column}.name-cell small{color:var(--muted)}.badge{display:inline-flex;align-items:center;border-radius:999px;padding:5px 8px;font-size:10px;font-weight:800;white-space:nowrap}.badge.green{background:#dcfce7;color:#166534}.badge.amber{background:#fef3c7;color:#92400e}.badge.red{background:#fee2e2;color:#991b1b}.badge.blue{background:#dbeafe;color:#1d4ed8}.badge.gray{background:#eef2f6;color:#526173}.status-dot{width:7px;height:7px;border-radius:50%;background:currentColor}.activity-list{display:flex;flex-direction:column;gap:10px}.activity-row{display:grid;grid-template-columns:minmax(230px,1.4fr) minmax(140px,.7fr) 110px 130px auto;gap:12px;align-items:center;padding:13px 16px;border-bottom:1px solid #edf1f5}.activity-row:last-child{border:0}.activity-row h3{font-size:13px;margin:0 0 3px}.activity-row p,.activity-row small{margin:0;color:var(--muted);font-size:11px}.progress-mini{display:flex;align-items:center;gap:7px}.progress-track{height:6px;background:#e8edf3;border-radius:99px;overflow:hidden;flex:1}.progress-track i{display:block;height:100%;background:var(--teal);border-radius:99px}.empty{padding:35px;text-align:center;color:var(--muted)}.attention-list{display:flex;flex-direction:column;gap:10px}.attention-item{border:1px solid #fee2e2;background:#fffafa;border-radius:10px;padding:12px}.attention-item strong{display:block;font-size:12px}.attention-item small{color:var(--muted)}.stack-form{display:flex;flex-direction:column;gap:14px}.stack-form label,.field{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:12px}.stack-form input,.stack-form select,.stack-form textarea,.field input,.field select,.field textarea{width:100%;border:1px solid #ccd6e1;border-radius:8px;background:#fff;padding:10px 11px;color:var(--ink);min-height:42px;outline:none}.stack-form input:focus,.stack-form select:focus,.stack-form textarea:focus,.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--teal);box-shadow:0 0 0 3px rgba(20,184,166,.12)}textarea{resize:vertical}.check{flex-direction:row!important;align-items:flex-start!important;font-weight:500!important;color:var(--muted)}.check input{width:auto!important;min-height:0!important;margin-top:3px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.form-grid .span-2{grid-column:1/-1}.help{font-size:11px;color:var(--muted);font-weight:500}.divider{border:0;border-top:1px solid var(--line);margin:20px 0}.auth-body{background:#0e223b;display:grid;place-items:center;padding:30px;min-height:100vh}.auth-shell{width:min(1000px,100%);display:grid;grid-template-columns:1.1fr .9fr;background:#fff;border-radius:22px;overflow:hidden;box-shadow:0 35px 80px rgba(0,0,0,.3)}.auth-story{padding:60px;background:radial-gradient(circle at 80% 15%,rgba(20,184,166,.25),transparent 35%),linear-gradient(145deg,#142f4d,#0d2036);color:#fff}.auth-story h1{font-size:42px;line-height:1.1;letter-spacing:-.045em;margin:22px 0}.auth-story>p:not(.eyebrow){font-size:16px;line-height:1.7;color:#bdd0e2}.trust-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:35px}.trust-row span{padding:7px 10px;border:1px solid rgba(255,255,255,.14);border-radius:99px;color:#dce8f2;font-size:10px}.auth-card{padding:48px;background:#fff}.auth-brand{display:flex;align-items:center;gap:10px;margin-bottom:42px}.auth-card h2{font-size:28px;margin:0 0 7px}.auth-card hr{border:0;border-top:1px solid var(--line);margin:26px 0}.search-bar{display:flex;gap:8px}.search-bar input{min-width:240px;border:1px solid var(--line);border-radius:8px;padding:9px 11px}.client-hero{display:flex;align-items:center;gap:16px}.client-hero .mini-avatar{width:52px;height:52px;font-size:16px}.client-hero h1{margin:0 0 3px}.client-meta{display:flex;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:12px}.service-card{padding:17px;border:1px solid var(--line);border-radius:11px;background:#fff}.service-card h3{margin:0 0 6px}.service-card p{color:var(--muted);font-size:12px;min-height:34px}.service-card footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding-top:11px}.timeline{position:relative;padding-left:19px}.timeline:before{content:"";position:absolute;left:5px;top:7px;bottom:7px;width:2px;background:#dbe4ec}.timeline-item{position:relative;margin:0 0 18px}.timeline-item:before{content:"";position:absolute;left:-18px;top:4px;width:10px;height:10px;border-radius:50%;background:var(--teal);border:2px solid #fff;box-shadow:0 0 0 2px #a7f3d0}.timeline-item strong{display:block;font-size:12px}.timeline-item small{color:var(--muted)}.checklist{display:flex;flex-direction:column;gap:9px}.checklist-item{display:flex;align-items:center;gap:11px;padding:13px;border:1px solid var(--line);border-radius:10px}.checklist-item .item-icon{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:#eef7f6;color:var(--teal)}.checklist-item>div:nth-child(2){flex:1;display:flex;flex-direction:column}.checklist-item small{color:var(--muted)}.file-list{display:flex;flex-direction:column;gap:7px;margin-top:8px}.file-chip{display:flex;align-items:center;justify-content:space-between;background:#f7f9fb;border-radius:8px;padding:8px 10px;font-size:11px}.danger-zone{border-color:#fecdd3}.danger-zone .panel-head{background:#fff7f7}.tooltip-note{background:#fff7ed;border:1px solid #fed7aa;color:#9a4b0b;padding:10px;border-radius:8px;font-size:11px}.review-shell{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(350px,.75fr);min-height:calc(100vh - 180px);gap:18px}.document-preview{background:#dce3ea;border-radius:12px;padding:25px;display:grid;place-items:center;overflow:auto}.mock-paper{width:min(620px,100%);min-height:760px;background:#fff;box-shadow:0 12px 35px rgba(0,0,0,.17);padding:42px;color:#273649}.mock-paper h2{letter-spacing:.08em}.mock-paper table{width:100%;border-collapse:collapse;margin-top:25px;font-size:11px}.mock-paper td,.mock-paper th{padding:8px;border-bottom:1px solid #dfe5eb;text-align:left}.inspector-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:19px}.ai-check{border:1px solid #c7d2fe;background:#f7f7ff;border-radius:10px;padding:14px;margin:15px 0}.ai-check h3{margin:0 0 10px;color:#4338ca}.match-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #e5e7ff;font-size:12px}.match-row:last-child{border:0}.admin-body{background:#f1f4f8}.admin-top{height:78px;background:#0e223b;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 30px}.admin-top>div{display:flex;align-items:center;gap:12px}.admin-main{max-width:1500px;margin:auto;padding:28px}.admin-hero{background:linear-gradient(135deg,#112a46,#164e63);color:#fff;border-radius:16px;padding:25px;margin-bottom:20px}.admin-hero h1{margin:0 0 5px}.modal-card{border:1px solid var(--line);border-radius:11px;padding:16px;background:#fff}.portal-body{background:#f3f7fa;min-height:100vh}.portal-header{background:#10243e;color:#fff;padding:16px}.portal-header-inner{max-width:680px;margin:auto;display:flex;align-items:center;justify-content:space-between}.portal-header .brand small{color:#b9c9d9}.portal-main{max-width:680px;margin:0 auto;padding:24px 16px 120px}.portal-welcome{text-align:center;padding:12px 0 20px}.portal-lock{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:#dcfce7;color:#087a55;font-size:23px;margin:auto}.portal-welcome h1{font-size:25px;margin:11px 0 4px}.portal-welcome p{color:var(--muted);margin:0}.deadline-card,.portal-progress,.portal-item,.privacy-card{background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}.deadline-card{display:flex;justify-content:space-between;align-items:center;padding:16px;margin-bottom:12px}.deadline-card small{display:block;color:var(--muted)}.deadline-card strong{font-size:16px}.portal-progress{padding:16px;margin-bottom:20px}.portal-progress header{display:flex;justify-content:space-between;margin-bottom:10px}.portal-progress b{color:var(--teal)}.portal-section-head h2{margin:0}.portal-section-head p{color:var(--muted);margin:5px 0 13px}.portal-items{display:flex;flex-direction:column;gap:12px}.portal-item{padding:16px}.portal-item-head{display:flex;gap:11px}.portal-number{width:30px;height:30px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;background:#e8f7f5;color:var(--teal);font-weight:900}.portal-item-head>div{flex:1}.portal-item h3{font-size:14px;margin:1px 0 4px}.portal-item p{font-size:11px;color:var(--muted);margin:0}.portal-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.upload-button{min-height:50px;border:1px solid #b9d7d4;background:#f3fffd;color:var(--teal);font-weight:800;border-radius:9px;display:grid;place-items:center}.portal-item input[type=file]{position:absolute;width:1px;height:1px;opacity:0}.consent-line{display:flex;gap:8px;color:var(--muted);font-size:11px;margin-top:10px}.received-file{display:flex;align-items:center;gap:9px;background:#ecfdf5;color:#166534;border-radius:9px;padding:11px;margin-top:12px}.rejected-note{background:#fff1f2;border:1px solid #fecdd3;color:#991b1b;padding:10px;border-radius:8px;margin-top:10px}.privacy-card{display:flex;gap:12px;padding:16px;margin-top:18px}.privacy-card strong{display:block}.privacy-card p{font-size:11px;line-height:1.6;color:var(--muted);margin:4px 0}.upload-dock{position:fixed;left:50%;bottom:18px;transform:translate(-50%,120px);width:min(620px,calc(100% - 24px));background:#10243e;color:#fff;border-radius:13px;padding:14px 16px;box-shadow:0 18px 45px rgba(0,0,0,.3);z-index:50;transition:.25s}.upload-dock.show{transform:translate(-50%,0)}.upload-dock div:first-child{display:flex;justify-content:space-between}.upload-dock .progress-track{margin-top:9px;background:#314a66}.portal-success{position:fixed;inset:0;background:rgba(7,27,46,.9);display:grid;place-items:center;padding:20px;z-index:100}.portal-success>div{background:#fff;border-radius:20px;padding:38px;text-align:center;max-width:420px}.success-check{width:80px;height:80px;display:grid;place-items:center;margin:auto;border-radius:50%;background:#dcfce7;color:var(--green);font-size:38px}.pagination{display:flex;justify-content:flex-end;padding:15px}.admin-plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.code-token{background:#10243e;color:#c9fff5;padding:12px;border-radius:8px;word-break:break-all;font-family:ui-monospace,monospace}.nowrap{white-space:nowrap}.text-danger{color:var(--red)}.text-success{color:var(--green)}
@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,1fr)}.grid-2,.review-shell{grid-template-columns:1fr}.activity-row{grid-template-columns:1fr 130px 100px}.activity-row>*:nth-child(2){display:none}.admin-plan-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar-open .sidebar{transform:translateX(0);box-shadow:0 0 0 100vmax rgba(3,14,26,.5)}.main-shell{margin-left:0}.menu-toggle{display:block}.topbar{padding:0 15px}.secure-pill{display:none}.page-content{padding:18px 13px}.page-head{align-items:flex-start;flex-direction:column}.stats-grid,.grid-equal,.grid-3,.form-grid,.admin-plan-grid{grid-template-columns:1fr}.form-grid .span-2{grid-column:auto}.activity-row{grid-template-columns:1fr auto;padding:12px}.activity-row>*:nth-child(2),.activity-row>*:nth-child(3),.activity-row>*:nth-child(4){display:none}.auth-body{padding:0}.auth-shell{grid-template-columns:1fr;min-height:100vh;border-radius:0}.auth-story{display:none}.auth-card{padding:35px 22px}.portal-actions{grid-template-columns:1fr}.admin-top{padding:0 15px}.admin-main{padding:18px 12px}.data-table{min-width:700px}.topbar-actions{display:none}}
.secure-preview{width:min(760px,100%);background:#fff;border:1px solid #cbd5e1;border-radius:14px;padding:14px;margin:0 auto 16px;text-align:center;box-shadow:0 8px 24px rgba(15,23,42,.08)}.secure-preview img{display:block;width:100%;max-height:640px;object-fit:contain;background:#f8fafc;border-radius:8px}.secure-preview small{display:block;color:#64748b;margin-top:10px}.compact-paper{min-height:auto;margin-top:0}.document-preview{align-content:start;gap:0}
.reconcile-box{position:relative;min-width:110px}.reconcile-box summary{list-style:none}.reconcile-box summary::-webkit-details-marker{display:none}.reconcile-box[open] form{position:absolute;right:0;top:38px;z-index:10;width:310px;padding:14px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 18px 45px rgba(16,36,62,.2)}
.routing-form{display:flex;align-items:center;gap:7px;min-width:310px}.routing-form label{flex:1}.routing-form select{width:100%;min-height:34px;border:1px solid #ccd6e1;border-radius:8px;background:#fff;padding:6px 8px;color:var(--ink)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ------------------------------------------------------------------
   Controls and icons - 21 Sep 2026
   app.css sizes every input inside .stack-form / .field to width:100%
   and min-height:42px. That is right for a text box and wrong for a
   checkbox or radio, which Chrome then paints as a huge blue square
   inside a white bordered box. Only inputs wrapped in .check were
   rescued; these rules rescue the rest, wherever they appear.
------------------------------------------------------------------- */
.stack-form input[type=checkbox],.stack-form input[type=radio],
.field input[type=checkbox],.field input[type=radio],
.perm-grid input[type=checkbox],.data-table input[type=checkbox],
.data-table input[type=radio],table input[type=checkbox],table input[type=radio]{
  width:16px;min-width:16px;height:16px;min-height:16px;
  padding:0;margin:0;border-radius:4px;border:0;background:none;
  flex:0 0 auto;accent-color:var(--brand,#0f766e);cursor:pointer;
  vertical-align:middle;appearance:auto;-webkit-appearance:checkbox
}
.stack-form input[type=radio],.field input[type=radio],
.data-table input[type=radio],table input[type=radio]{-webkit-appearance:radio;border-radius:50%}
.perm-grid label input[type=checkbox]{margin-top:3px}
.data-table td input[type=checkbox]{display:block;margin:0 auto}
.stack-form input[type=checkbox]:disabled,.perm-grid input[type=checkbox]:disabled{cursor:not-allowed;opacity:.5}

/* An inline SVG with a viewBox and no width/height stretches to fill its
   container. Nothing in this app ships an icon larger than 24px, so cap
   every SVG rather than wait for the next one to escape. */
svg{max-width:100%;max-height:1.5em;vertical-align:middle}
svg[width],svg[height]{max-height:none}
.icon,button svg,a svg,.pagination svg{width:1em;height:1em;max-height:1em;flex:0 0 auto}

/* ------------------------------------------------------------------
   Brand mark - 22 Sep 2026
   The mark is an inline SVG now rather than the letter T, so it needs a
   little padding inside the rounded square and no font sizing.
------------------------------------------------------------------- */
.brand-mark{padding:8px;font-size:0}
.brand-mark svg{width:100%;height:100%;max-height:none;display:block;color:#fff}
.brand-mark.large{padding:11px}
/* On a page that puts the mark on a pale surface rather than the teal tile. */
.brand-mark.plain{background:none;box-shadow:none;padding:0;color:var(--teal,#0f766e)}
.brand-mark.plain svg{color:currentColor}
/* TASK-P5-003: the emblem carries its own teal squircle, so the tile behind it goes. */
.brand-mark{background:none;padding:0;border-radius:0;box-shadow:0 6px 14px rgba(13,148,136,.22)}
.brand-mark.large{padding:0;border-radius:0}
.brand-mark svg{border-radius:28%}

/* ---------------------------------------------------------------------
   A validation message that belongs to one field, shown under that field.
   The alternative - a banner at the top of the form - makes a person hunt
   for which input it is about, and when both are on screen it reads as two
   separate failures.
   --------------------------------------------------------------------- */
small.field-error{
  display:block;
  margin-top:4px;
  color:#b42318;
  font-weight:600;
}

/* ---------------------------------------------------------------------
   The one-screen acceptance page. Four documents as one line each, so the
   tick box and the button are visible without scrolling.
   --------------------------------------------------------------------- */
.legal-doc-list{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:1px;background:rgba(0,0,0,.08);border:1px solid rgba(0,0,0,.08);border-radius:8px;overflow:hidden}
.legal-doc-list li{background:#fff;padding:10px 12px;display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.legal-doc-list a{font-weight:600}
.legal-doc-list .muted{font-size:.78rem;white-space:nowrap}

/* A disabled submit has to look disabled, or the page reads as broken
   rather than as waiting for the tick. */
.button[disabled]{opacity:.45;cursor:not-allowed}

/* ---------------------------------------------------------------------
   Checklist editor. The textarea behind it stays in the DOM and stays the
   thing that posts; it is only visually removed once the editor is up.
   --------------------------------------------------------------------- */
textarea.checklist-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.checklist-rows{display:grid;gap:6px;margin-top:6px}
.checklist-row{display:flex;gap:6px;align-items:center}
.checklist-row input[type="text"]{flex:1 1 auto;min-width:0}
.checklist-row .checklist-kind{flex:0 0 auto;width:auto;min-width:150px}
.checklist-remove{flex:0 0 auto;width:30px;height:30px;min-height:0;padding:0;line-height:1;border:1px solid rgba(0,0,0,.15);background:#fff;border-radius:6px;cursor:pointer;font-size:18px;color:#b42318}
.checklist-remove:hover{background:#fef3f2}
.checklist-add{margin-top:8px}
.checklist-empty{margin:4px 0;font-size:.82rem;color:#667085}

/* ---------------------------------------------------------------------
   Support threads - 25 Sep 2026
   The two sides have to be tellable apart at a glance. Indenting ToSure's
   replies rather than colouring them differently keeps the thread readable
   when it is printed or when the page is read in high-contrast mode, where
   a pale tint disappears entirely.
   --------------------------------------------------------------------- */
.ticket-thread{display:flex;flex-direction:column;gap:12px}
.ticket-message{border:1px solid var(--line);border-radius:11px;padding:13px 15px;background:#fff}
.ticket-message header{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:7px}
.ticket-message header strong{font-size:12px}
.ticket-message header small{color:var(--muted);font-size:11px;white-space:nowrap}
.ticket-message p{margin:0;line-height:1.65;word-break:break-word}
.ticket-message.from-tosure{background:#f4fbfa;border-color:#bfe4df;margin-left:26px}
.ticket-message.from-tosure header strong{color:var(--teal)}
@media(max-width:760px){.ticket-message.from-tosure{margin-left:10px}}

/* The help centre list. One line per article with the summary underneath,
   so scanning the list answers "is this my problem" without opening it. */
.help-list{list-style:none;margin:0 0 20px;padding:0;display:grid;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:10px;overflow:hidden}
.help-list li{background:#fff;padding:12px 14px;display:flex;flex-direction:column;gap:3px}
.help-list li:hover{background:#fbfcfe}
.help-list a strong{font-size:13px}
.help-list a:hover strong{color:var(--teal)}
.help-list small{color:var(--muted)}

/* Rendered markdown. The converter emits bare h2/p/ul, which inherit the
   panel's spacing and run together without this. */
.help-article{line-height:1.75;max-width:70ch}
.help-article h1,.help-article h2,.help-article h3{margin:22px 0 8px;line-height:1.3}
.help-article h1:first-child,.help-article h2:first-child{margin-top:0}
.help-article h2{font-size:17px}
.help-article h3{font-size:14px}
.help-article p,.help-article ul,.help-article ol{margin:0 0 14px}
.help-article ul,.help-article ol{padding-left:22px}
.help-article li{margin-bottom:6px}
.help-article code{background:#eef2f6;border-radius:5px;padding:2px 5px;font-family:ui-monospace,monospace;font-size:12px;word-break:break-word}
.help-article a{color:var(--teal);font-weight:700;text-decoration:underline}

.admin-plan-grid .callout{margin:10px 0 0}.admin-plan-grid .callout p{margin:4px 0 0}

/* ---------------------------------------------------------------------
   A client's businesses and their accounts.
   One card per business, accounts listed inside it, so a client with four
   businesses reads as four things rather than one long list of accounts
   with no indication of which belongs to what.
   --------------------------------------------------------------------- */
.entity-card{border:1px solid rgba(0,0,0,.1);border-radius:10px;padding:12px 14px;margin-bottom:10px;background:#fff}
.entity-card.inactive{opacity:.6}
.entity-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.entity-head strong{display:block}
.entity-head small{display:block}
.account-list{list-style:none;margin:10px 0 6px;padding:0;display:grid;gap:1px;background:rgba(0,0,0,.08);border:1px solid rgba(0,0,0,.08);border-radius:8px;overflow:hidden}
.account-list li{background:#f9fbfd;padding:8px 10px;display:flex;justify-content:space-between;align-items:center;gap:10px}
.account-list li.inactive{opacity:.55}
.account-list li strong{display:block;font-size:.9rem}
.account-list li small{display:block}
.checklist-row .checklist-each{flex:0 0 auto;width:auto;min-width:170px}
.checklist-row .checklist-each:disabled{opacity:.45}

/* ---------------------------------------------------------------------
   Bulk client import - 27 Sep 2026
   The preview is the whole feature: a firm cannot check four hundred rows
   by eye, so the counts have to be readable at a glance and the problem
   rows have to carry their row number. Tiles rather than a sentence,
   because "12 new clients" read wrongly is an import done twice.
   --------------------------------------------------------------------- */
.import-rules{margin:8px 0 0;padding-left:20px}
.import-rules li{margin-bottom:4px}
.import-counts{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px}
.import-counts>div{flex:1 1 120px;border:1px solid rgba(0,0,0,.1);border-radius:10px;padding:10px 12px;background:#f9fbfd}
.import-counts>div strong{display:block;font-size:22px;line-height:1.1}
.import-counts>div span{font-size:12px;color:#5b6b7c}
.import-counts .muted-tile{background:#fff;opacity:.8}
.problem-list{list-style:none;margin:0;padding:0}
.problem-list li{margin-bottom:6px}
.problem-list li:last-child{margin-bottom:0}

/* SCREEN-COLLECT-PASSWORD (TASK-P2-002): 16px text and 44-48px targets on a phone. */
.portal-password .portal-main { max-width: 34rem; }
.portal-password-form { display: grid; gap: 10px; margin: 18px 0; }
.portal-password-row { display: flex; gap: 8px; }
.portal-password-row input { flex: 1; min-height: 48px; font-size: 16px; padding: 0 12px; }
.portal-password-row .button { min-height: 48px; min-width: 72px; }
.portal-password-form .button.primary { min-height: 48px; font-size: 16px; }
.portal-password .portal-warning { padding: 10px 12px; border-left: 4px solid #b45309; background: #fff7ed; color: #7c2d12; }
.portal-password .portal-help { margin-top: 24px; font-size: 16px; line-height: 1.6; }
.portal-password .portal-help .button { min-height: 44px; }

/* SCREEN-COLLECT-QUESTION (TASK-P2-005): the one question, in the ink colour — never muted — and large enough to read on a phone. */
.portal-question .portal-question-text { color: var(--ink); font-size: 18px; line-height: 1.5; margin-top: 8px; }
.portal-question .portal-answer-form textarea, .portal-question .portal-answer-form input[type="text"], .portal-question .portal-answer-form input[inputmode], .portal-question .portal-answer-form input[type="date"] { min-height: 44px; font-size: 16px; }
.portal-question .portal-choices { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.portal-question .portal-choice { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.portal-question .portal-evidence, .portal-question .portal-voice { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); }
.portal-question .portal-evidence summary, .portal-question .portal-voice summary { min-height: 32px; cursor: pointer; font-weight: 600; color: var(--ink); }
.portal-question .portal-closing { color: var(--ink); }
.portal-question .portal-welcome[role="status"] p { color: var(--ink); }

/* TASK-P4-009 (axe on the client's pages): muted words on the page's own background, not on a card, at 5.5:1 —
   #66758a on #f3f7fa was 4.36:1, under WCAG 2.2 AA's 4.5:1. */
.portal-body .portal-welcome p, .portal-body .portal-section-head p { color: #56657a; }

/* TASK-P5-001 (ADR-0066 point 1): the translation disclaimer at the top of a translated client page, and the way
   back from English. A note, not an alarm: dark ink on a pale amber card (#3d2a0a on #fff7e8, 13.9:1; the link
   #7c3a00 on #fff7e8, 8.1:1), inside the page's own column. */
.translation-banner { max-width: 680px; margin: 12px auto 0; padding: 10px 14px; border-radius: 10px; border-left: 4px solid #b45309; background: #fff7e8; color: #3d2a0a; font-size: 14px; line-height: 1.5; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; justify-content: space-between; box-sizing: border-box; }
.translation-banner p { margin: 0; flex: 1 1 260px; color: #3d2a0a; }
.translation-banner .text-link { color: #7c3a00; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.translation-banner-english { justify-content: flex-end; }
.legal-body .translation-banner { margin-left: auto; margin-right: auto; width: calc(100% - 32px); }
@media (max-width: 720px) { .translation-banner { margin-left: 12px; margin-right: 12px; } .translation-banner .text-link { white-space: normal; } }

/* ---------------------------------------------------------------------
   TASK-P5-003: the sign-in page's logo animation (brand/LogoMorph.ts), on
   the dark story panel — so the wordmark takes its dark-theme tones. The
   box is the animation's size from the start, so nothing below it moves
   when it begins.
   --------------------------------------------------------------------- */
.auth-intro{height:200px;display:flex;align-items:center;--ts-brand-slate:#E2E8F0;--ts-brand-600:#5EEAD4}
.auth-intro .ts-logo-morph{height:200px;width:auto;display:block}
/* On a narrow screen the story panel is hidden; while the animation plays it alone shows, above the form, at
   160 px. Never in the installed app, which opens straight to the form. */
@media(max-width:760px){.auth-story:has(.auth-intro){display:flex;justify-content:center;padding:18px 22px 0}.auth-story:has(.auth-intro)>:not(.auth-intro){display:none}.auth-intro,.auth-intro .ts-logo-morph{height:160px}}
@media(max-width:760px) and (display-mode:standalone){.auth-story:has(.auth-intro){display:none}}
/* TASK-P5-003 (FIND): a link standing alone in the sign-in card — "Forgot password?", "Back to sign in" — is a 24 px target (WCAG 2.2, 2.5.8); links inside a sentence are exempt and unchanged. */
.auth-card > .text-link{display:inline-block;min-height:24px;line-height:24px}
/* TASK-P5-006: the live PAN and GSTIN check under each field (identifier-check.js); words carry the meaning, the colour only repeats it. */
.identifier-check{display:block;margin-top:4px;font-size:12px;line-height:1.4;color:var(--muted)}.identifier-check[data-check="ok"]{color:var(--green)}.identifier-check[data-check="problem"]{color:var(--red);font-weight:600}.identifier-check:empty{display:none}
/* REL-2026-11 W4-CHK (S5-E-08): an element with the hidden attribute stays hidden whatever its class sets (.button is display:inline-flex). */
[hidden]{display:none!important}
/* REL-2026-11 W4-CHK (T-H3): the client's item — Take a photo and Choose files side by side, the staged list, what was already sent. */
.portal-hint{font-size:12px;color:var(--muted);margin:10px 0 0}
.portal-uploader{margin-top:12px;gap:10px}
.portal-pick{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.portal-pick .upload-button{position:relative;min-height:50px;padding:6px 10px;text-align:center;cursor:pointer}
.portal-pick .upload-button:focus-within{outline:3px solid var(--blue);outline-offset:2px}
.portal-pick input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.portal-staged{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.portal-staged-row{border:1px solid var(--line);border-radius:9px;padding:9px 10px;background:#fbfcfe}
.portal-staged-row[data-state=invalid],.portal-staged-row[data-state=failed],.portal-staged-row[data-state=stopped]{border-color:#fecdd3;background:#fff7f7}
.portal-staged-row[data-state=sent]{border-color:#bbf7d0;background:#f3fdf6}
.portal-staged-head{display:flex;align-items:center;gap:8px}
.portal-staged-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.portal-staged-size{color:var(--muted);font-size:11px}
.portal-staged-remove{min-width:44px;min-height:44px;border:0;background:transparent;font-size:22px;color:var(--muted)}
.portal-staged-state{margin:6px 0 0;font-size:12px}
.portal-staged-row .progress-track{margin-top:6px}
.portal-staged-row .button{margin-top:6px}
.portal-result{margin:0;font-weight:700}
.portal-sent{margin-top:14px}
.portal-sent h4{margin:0 0 6px;font-size:12px;color:var(--muted);font-weight:700}
.portal-sent ul{list-style:none;margin:0;padding:0}
.portal-sent .received-file{flex-wrap:wrap;margin-top:6px}
.portal-sent .received-file>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
.portal-sent .received-file.earlier{background:#f4f6f8;color:#5b6676}
.portal-sent .received-file[data-client-state=NEEDS_REPLACEMENT],.portal-sent .received-file[data-client-state=PASSWORD_NEEDED]{background:#fff7ed;color:#9a4b0b}
.portal-replace{flex-basis:100%}
.portal-replace summary{cursor:pointer;font-weight:700;color:var(--teal);min-height:44px;display:flex;align-items:center}
.portal-action-form{margin-top:12px}
@media(max-width:380px){.portal-pick{grid-template-columns:1fr}}
/* REL-2026-11 W4-CHK (Requirement D): the activity workspace — header facts, banners, readiness strip, dense checklist rows. */
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.activity-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}
.activity-head h1{font-size:24px;letter-spacing:-.02em;margin:2px 0 8px}
.activity-facts{display:flex;flex-wrap:wrap;gap:6px 18px;margin:0;font-size:12px}
.activity-facts div{display:flex;gap:6px;align-items:baseline}
.activity-facts dt{color:var(--muted);font-weight:600}
.activity-facts dd{margin:0;font-weight:600}
.activity-head-actions{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap;justify-content:flex-end}
.menu{position:relative}
.menu>summary{list-style:none;cursor:pointer}
.menu>summary::-webkit-details-marker{display:none}
.menu-list{position:absolute;right:0;top:calc(100% + 6px);z-index:15;min-width:240px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:6px;display:flex;flex-direction:column}
.menu-item{width:100%;text-align:left;border:0;background:transparent;padding:10px 12px;border-radius:7px;font-weight:600;min-height:44px}
.menu-item:hover,.menu-item:focus-visible{background:#f1f5f9}
.menu-item.danger{color:var(--red)}
.activity-banner{border:1px solid;border-radius:10px;padding:10px 14px;margin-bottom:10px;font-weight:600;font-size:13px}
.activity-banner.closed{background:#f1f5f9;border-color:#cbd5e1;color:#334155}
.activity-banner.hold{background:#fff1f2;border-color:#fecdd3;color:#9f2434}
.activity-banner.held,.activity-banner.link-off{background:#fffbeb;border-color:#fde68a;color:#8a4b08}
.readiness-strip{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:4px 0 16px}
.readiness-total{font-size:13px;margin-right:6px}
.readiness-chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:700}
.readiness-chip.missing{color:#526173}.readiness-chip.review{color:#1d4ed8}.readiness-chip.rejected{color:var(--red)}.readiness-chip.accepted{color:var(--green)}
.checklist-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:12px 19px;border-bottom:1px solid var(--line)}
.filter-chips{display:flex;flex-wrap:wrap;gap:6px;flex:1}
.filter-chip{border:1px solid var(--line);border-radius:999px;padding:6px 11px;font-size:12px;font-weight:700;color:var(--muted);min-height:32px;display:inline-flex;align-items:center;gap:5px}
.filter-chip span{font-weight:600}
.filter-chip[aria-current=true]{background:var(--navy);color:#fff;border-color:var(--navy)}
.checklist-search input{border:1px solid var(--line);border-radius:8px;padding:8px 10px;min-width:220px;min-height:36px}
.checklist-group{font-size:13px;margin:4px 0 8px;color:var(--ink)}
.checklist-group small{color:var(--muted);font-weight:600}
.check-rows{list-style:none;margin:0 0 16px;padding:0;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.check-row+.check-row{border-top:1px solid #edf1f5}
.check-summary{display:grid;grid-template-columns:150px minmax(0,1fr) minmax(0,auto);gap:10px;align-items:center;padding:9px 12px;cursor:pointer;list-style:none;min-height:52px}
.check-summary::-webkit-details-marker{display:none}
.check-summary:focus-visible{outline:3px solid var(--blue);outline-offset:-3px}
.check-row details[open]>.check-summary{background:#f8fafc}
.check-state{justify-self:start}
.check-name{display:flex;flex-direction:column;min-width:0}
.check-name strong{font-size:13px;overflow-wrap:anywhere}
.check-name small{color:var(--muted);font-size:11px}
.check-reason{font-size:11px;color:var(--red);max-width:280px;overflow-wrap:anywhere}
.check-body{padding:4px 12px 12px 12px;display:flex;flex-direction:column;gap:8px}
.check-actions{display:flex;flex-wrap:wrap;gap:6px}
.file-row{display:flex;justify-content:space-between;gap:10px;background:#f7f9fb;border-radius:8px;padding:8px 10px;font-size:12px}
.file-row.earlier{opacity:.75;background:#f4f5f7}
.file-row-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.file-row-main small{color:var(--muted)}
.file-name{overflow-wrap:anywhere}
.file-reason{color:var(--red)!important}
.file-row-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.mini-label{color:var(--muted);font-size:10px;font-weight:700;margin-left:4px}
.stage-chips{list-style:none;display:flex;flex-wrap:wrap;gap:4px;margin:4px 0 0;padding:0}
.stage-chip{border-radius:999px;padding:2px 8px;font-size:10px;background:#eef2f6;color:#526173}
.stage-chip span{font-weight:800}
.stage-chip.green{background:#dcfce7;color:#166534}.stage-chip.amber{background:#fef3c7;color:#92400e}.stage-chip.red{background:#fee2e2;color:#991b1b}
.earlier-copies>summary,.earlier-events>summary,.replace-copy>summary{cursor:pointer;font-size:12px;font-weight:700;color:var(--teal);min-height:32px;display:flex;align-items:center}
.firm-item-upload{gap:8px}
.firm-item-upload .portal-pick{grid-template-columns:1fr}
.followup-list,.firm-files{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.followup{border:1px solid var(--line);border-radius:9px;padding:9px 11px;display:flex;flex-direction:column;gap:2px}
.followup.stopped{border-color:#fecdd3;background:#fffafa}
.followup small{color:var(--muted)}
.followup-reason{color:var(--red)!important}
.add-followup>summary,.add-firm-file>summary{list-style:none;cursor:pointer;margin-bottom:8px}
.compact-timeline{list-style:none;margin:0}
.compact-timeline .timeline-item{margin-bottom:12px}
.compact-timeline .timeline-item small{display:block}
.timeline-by{font-weight:600}
@media(max-width:900px){.activity-workspace{grid-template-columns:1fr}.activity-head{flex-direction:column}.activity-head-actions{justify-content:flex-start}.check-summary{grid-template-columns:minmax(0,1fr);gap:4px}.check-reason{max-width:none}.checklist-search,.checklist-search input{width:100%;min-width:0}.file-row{flex-direction:column}.file-row-actions{align-items:flex-start}.menu-list{left:0;right:auto}}
.copy-switcher{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:12px;margin-top:6px}
/* REL-2026-11 W5-UI (REG-S5-F1-15, REG-S5-F13-07): on a phone a list's search box and its count share the row by wrapping, so the count is never cut off. */
@media(max-width:760px){.panel-head.wraps{flex-wrap:wrap;gap:8px}.panel-head.wraps .search-bar{flex:1 1 100%;min-width:0}.panel-head.wraps .search-bar input{min-width:0;flex:1}}
/* REL-2026-11 W5-UI (REG-S5-D1-03): the sidebar foot puts the role under the name, not run on after it. */
.sidebar-user div>a{display:flex;flex-direction:column;min-width:0}
/* REL-2026-11 W5-UI (REG-S5-C-22): once two columns become one, that column is never wider than the screen; a wide table
   inside scrolls in its own box (1fr let the column grow to the table's width and the whole page scroll sideways). */
@media(max-width:1100px){.grid-2,.review-shell{grid-template-columns:minmax(0,1fr)}}

/* REL-2026-11 FIX-A (W6 G1-6, S5-F1-05): on the client page the services table fits its narrow column at 1440 px; Stop stands under the status. */
[data-part="assigned-services"] [data-part="assignment-actions"]{margin-top:6px}
/* REL-2026-11 FIX-B (REL-W6-G3-04, S5-F2-08): the command centre's Active work row fits its panel at 1440 px. The first
   two columns had fixed minimums (230 + 140 px) that, with the date and progress columns, left the status pill no room,
   so "Under review" ran past the panel and was clipped. They now shrink, and the pills wrap only when even that is not enough. */
@media(min-width:1101px){.activity-row{grid-template-columns:minmax(0,1.4fr) minmax(min-content,.7fr) 110px 130px auto}}
.activity-row>div:first-child{min-width:0;overflow-wrap:anywhere}.activity-row .badge{white-space:normal;text-align:center}
/* REL-2026-11 FIX-B (REL-W6-G3-05, S5-F2-11/S5-F1-05): Assigned recurring services sits in the narrow column of the client
   page (about 378 px at 1440); five columns with 14 px side padding needed 450 px, so Stop sat outside the panel. Tighter
   side padding and a service name that may break keep all five columns, Stop included, inside it. */
.services-table th{letter-spacing:0;white-space:normal}.services-table th,.services-table td{padding-left:7px;padding-right:7px}.services-table th:first-child,.services-table td:first-child{padding-left:14px}.services-table td:first-child{overflow-wrap:anywhere}
/* REL-2026-11 FIX-C (REL-W6-G5A-02): the Active work deadline and its note ("Overdue", "6 days from now") were two
   inline elements with nothing between them ("22 Oct 2026Overdue"). The note is its own line under the date. */
.activity-row>[data-part="deadline"] strong,.activity-row>[data-part="deadline"] small{display:block}
