/* Approved accessible appearance. Presentation only; report rendering stays separate. */
:root {
  color-scheme:dark;
  --bg:#0d1825;--surface:#152638;--surface-2:#20374d;--input:#0c1b2b;
  --white:var(--surface);--ink:#f4f7fb;--muted:#d0dce7;--line:#415b71;--control-line:#7b94aa;
  --navy:#0b1420;--navy-2:#233e55;--gold:#f0cd86;--gold-light:#40341f;
  --teal:#a3efd1;--teal-bg:#163e34;--blue:#badcff;--blue-bg:#1b3654;
  --orange:#ffdfa2;--orange-bg:#49361c;--red:#ffc5c5;--red-bg:#4d2831;
  --accent:#9bcfff;--accent-ink:#102337;--hover:#28435b;--focus:#ffe3a7;
  --shadow:0 8px 24px #00000016;--radius:14px;
  font-size:var(--reading-size,18px);line-height:1.6;
}
:root[data-appearance="light"] {
  color-scheme:light;
  --bg:#e9eef3;--surface:#ffffff;--surface-2:#e7eef5;--input:#ffffff;
  --ink:#172b3c;--muted:#364a5d;--line:#aab9c7;--control-line:#667d91;
  --gold:#705113;--gold-light:#fff0c9;
  --teal:#145741;--teal-bg:#ddf3e9;--blue:#144d86;--blue-bg:#e5effa;
  --orange:#69420e;--orange-bg:#fff0ce;--red:#8a2837;--red-bg:#fde9ec;
  --accent:#145b9b;--accent-ink:#ffffff;--hover:#dae7f2;--focus:#195f9f;
  --shadow:0 6px 22px #14283b08;
}
html{background:var(--bg);color:var(--ink);scroll-padding-top:24px}
body{background:var(--bg);color:var(--ink)}
h1{font-size:1.8rem;line-height:1.3;letter-spacing:-.5px}
h2{font-size:1.2rem;letter-spacing:0;line-height:1.4}
h3{font-size:1rem;font-weight:650;line-height:1.5}
small{font-size:.875rem}
svg.icon{width:22px;height:22px;stroke-width:1.9}
.muted,.subline,.field-help,.note-small{color:var(--muted)}
.eyebrow,.nav-caption,.breadcrumb,.brand-caption{font-size:.75rem;letter-spacing:1.2px;font-weight:700}
.subline{font-size:.875rem;margin-top:6px;line-height:1.5}
.truncate{max-width:360px;white-space:normal;overflow-wrap:anywhere}
.sidebar{width:266px;padding:28px 18px 20px;color:#cedbe7;background:#0b1420;overflow-y:auto}
.sidebar .brand-logo{width:176px;padding:10px}
.workspace{margin-left:266px;width:calc(100% - 266px)}
.workspace-label{font-size:.95rem;color:#e7eff7;margin-bottom:25px}
.workspace-icon{width:38px;height:38px;font-size:.8rem;color:#f0cd86;border-color:#8297aa}
.nav-caption,.sidebar-note,.user-block small{color:#becede}
.nav-link{font-size:1rem;min-height:48px;line-height:1.45;padding:12px 13px;gap:12px;white-space:normal}
.nav-link.active{background:#233e55;color:#fff;box-shadow:inset 4px 0 #f0cd86}
.nav-link.active .icon{color:#f0cd86}
.nav-link:hover{background:#23364a;color:#fff}
.nav-count{font-size:.8rem;background:#30485e;color:#f5f8fc;min-width:28px}
.nav-divider{border-color:#3d5266;margin:22px 10px}
.sidebar-note{font-size:.8rem;line-height:1.6}
.user-block{color:#dce8f3;border-color:#41586e;padding-top:18px}
.user-block strong{font-size:.95rem;color:#fff}
.user-block small{font-size:.8rem}
.avatar{width:38px;height:38px;font-size:.8rem;background:#e7d5ac;color:#2e302e}
.topbar{background:var(--surface);min-height:82px;height:auto;padding:18px 30px;flex-wrap:wrap}
.topbar-left{font-size:1rem;min-width:0}
.topbar-right #today-label{font-size:.875rem;color:var(--muted)}
.breadcrumb,.breadcrumb-divider{color:var(--muted)}
.main-content{padding:32px 30px 42px;max-width:1660px}
.workspace-footer{font-size:.8rem;color:var(--muted);padding:20px 30px;flex-wrap:wrap}
.workspace-footer>span:first-child{color:var(--muted)}
.page-head{margin-bottom:26px;align-items:flex-start;flex-wrap:wrap}
.page-head p{font-size:1rem;line-height:1.65;max-width:55rem;color:var(--muted)}
.page-head h1{margin-top:8px}
.page-actions{flex-wrap:wrap;gap:10px}
.button,.button.compact,.quick-text,.signature-caption .button{font-size:.94rem;min-height:46px;padding:10px 15px;line-height:1.45;white-space:normal;font-weight:650}
.button{background:var(--surface-2);color:var(--ink);border-color:var(--control-line);border-radius:8px}
.button:hover{background:var(--hover);border-color:var(--accent);box-shadow:none}
.button.primary,.button.gold{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.button.primary:hover,.button.gold:hover{background:var(--accent);filter:brightness(1.08);border-color:var(--accent)}
.button.ghost{background:transparent;border-color:var(--control-line)}
.button.danger{color:var(--red);border-color:var(--red);background:var(--red-bg)}
.button.complete-button{background:var(--teal);color:var(--teal-bg);border-color:var(--teal)}
.button.complete-button:hover{background:var(--teal);filter:brightness(1.08)}
.button .icon{width:20px;height:20px}
.icon-button{width:46px;height:46px;color:var(--ink);border-color:var(--control-line);background:var(--surface-2);font-size:1.35rem}
.icon-button .icon{width:20px;height:20px}
.icon-button:hover{color:var(--ink);background:var(--hover);border-color:var(--accent)}
button:disabled{opacity:.65;cursor:not-allowed}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:3px;box-shadow:none}
.card,.metric,.billing-overview>div,.modal,.modal-header,.topbar,.login-panel{background:var(--surface);color:var(--ink);border-color:var(--line)}
.card-head{padding:21px 24px;border-color:var(--line);align-items:flex-start}
.card-head h2{font-size:1.15rem}
.card-head p,.card-head .text-link{font-size:.875rem;line-height:1.55}
.card-body{padding:24px}
a.text-link,.text-link{color:var(--blue);text-decoration:underline;text-underline-offset:4px;font-size:.94rem}
.metrics{gap:18px}
.metric{padding:23px;box-shadow:var(--shadow)}
.metric-top{font-size:.95rem;color:var(--muted);align-items:flex-start;gap:8px}
.metric-icon{width:38px;height:38px;color:var(--ink);background:var(--surface-2);flex-shrink:0}
.metric-value{font-size:2.2rem;font-weight:750;letter-spacing:-.5px;margin:12px 0 6px}
.metric-foot{font-size:.875rem;line-height:1.6;color:var(--muted);flex-wrap:wrap}
.metric-foot span{color:var(--teal)}
.dashboard-grid{grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr);gap:22px}
.dashboard-grid>.stack{gap:22px}
.hero-strip{background:var(--surface-2);color:var(--ink);border:1px solid var(--line)}
.hero-strip h3{font-size:1.05rem}
.hero-strip p{font-size:.9rem;color:var(--muted)}
.hero-strip .hero-icon{border-color:var(--control-line);color:var(--gold)}
.toolbar{gap:12px;padding:18px 22px;background:var(--surface)}
.search-box{min-width:240px;max-width:540px}
.search-box input{height:auto;min-height:48px;padding-left:44px}
.search-box>.icon{left:14px;top:14px;width:20px;height:20px;color:var(--muted)}
.toolbar select{font-size:1rem;height:auto;min-height:48px;min-width:150px}
.toolbar .result-count{font-size:.875rem}
thead{background:var(--surface-2)}
th{font-size:.8rem;font-weight:700;letter-spacing:.5px;color:var(--muted);padding:15px 20px}
td{font-size:1rem;padding:18px 20px;border-color:var(--line);line-height:1.55}
tbody tr:nth-child(even){background:color-mix(in srgb,var(--surface-2) 44%,var(--surface))}
tbody tr:hover{background:var(--hover)}
.table-id{font-size:.875rem;color:var(--muted);font-weight:650}
.table-title{font-size:1rem;font-weight:700;line-height:1.55}
.table-title a:hover{text-decoration:underline;text-underline-offset:4px}
.table-foot{font-size:.875rem;padding:17px 22px;color:var(--muted)}
.cell-person .avatar{background:var(--blue-bg);color:var(--blue);width:40px;height:40px}
.row-actions{gap:8px}
.badge{font-size:.8rem;line-height:1.4;padding:6px 10px;background:var(--surface-2);color:var(--ink);border:1px solid currentColor;border-radius:6px;white-space:normal;max-width:100%}
.badge:before{width:6px;height:6px;flex-shrink:0}
.priority{font-size:.875rem;color:var(--muted)}
.priority:before{width:7px;height:7px;background:var(--blue)}
.priority.P1:before,.priority.P2:before{background:var(--orange)}
.activity-row,.contract-row{border-color:var(--line);padding:20px 24px}
.activity-row .time-block{min-width:62px;font-size:1rem}
.activity-row .time-block small,.activity-row p{font-size:.875rem;color:var(--muted)}
.activity-row h3{font-size:1rem;line-height:1.5}
.activity-line{background:var(--gold)}
.contract-row-head{font-size:1rem;flex-wrap:wrap}
.contract-row-head span,.contract-row-foot{font-size:.875rem;color:var(--muted)}
.contract-row-foot{flex-wrap:wrap}
.progress{height:8px;background:var(--surface-2);border:1px solid var(--control-line)}
.progress>span{background:var(--blue)}
.progress.warning>span{background:var(--orange)}
.progress.danger>span{background:var(--red)}
.empty-state h3{font-size:1.05rem;color:var(--ink)}
.empty-state p,.loading-state{font-size:1rem;color:var(--muted)}
.empty-state>.icon{color:var(--muted)}
.notice{font-size:.95rem;color:var(--blue);background:var(--blue-bg);border-color:var(--blue);line-height:1.65}
.notice.warning{background:var(--orange-bg);color:var(--orange);border-color:var(--orange)}
.notice.danger{background:var(--red-bg);color:var(--red);border-color:var(--red)}
.notice.success{background:var(--teal-bg);color:var(--teal);border-color:var(--teal)}
.inline-stats strong{font-size:1.25rem}
.inline-stats span{font-size:.875rem}
label,.field-label{font-size:1rem;font-weight:650;color:var(--ink);line-height:1.5;gap:9px}
input,select,textarea,#incident-form input,#incident-form select,#incident-form textarea{font-size:1rem;line-height:1.5;min-height:48px;padding:12px 14px;color:var(--ink);background:var(--input);border:1.5px solid var(--control-line);border-radius:8px;box-shadow:none}
input:hover,select:hover,textarea:hover{border-color:var(--accent)}
input:focus,select:focus,textarea:focus{border-color:var(--focus);box-shadow:0 0 0 1px var(--focus)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
input[readonly]{background:var(--surface-2);color:var(--ink)}
input[type=file]{background:var(--input)}
input[type=checkbox],#incident-form input[type=checkbox]{width:22px;height:22px;min-height:22px;padding:0;accent-color:var(--accent)}
.check-label{font-size:1rem;min-height:44px;gap:12px}
.form-grid,.form-grid.three{gap:22px}
.field-help,.note-small,.essential-field>.field-help{font-size:.875rem;color:var(--muted);line-height:1.65}
.form-intro{font-size:1rem;color:var(--muted);line-height:1.65}
.essential-field{border-left:4px solid var(--gold);padding-left:15px}
.client-picker{background:var(--surface-2);border-color:var(--line);padding:20px}
.client-picker-selection{gap:14px}
.section-number{width:34px;height:34px;font-size:.875rem;color:var(--blue);background:var(--blue-bg);flex-shrink:0}
.form-section .card-head{padding:22px 24px}
.section-nav{font-size:.95rem;gap:22px;overflow:auto}
.section-nav a{min-height:46px;padding:10px 0 12px}
.section-nav a:first-child{border-bottom:3px solid var(--gold)}
.quick-texts{gap:9px;margin-top:12px}
.quick-texts>span{font-size:.875rem;color:var(--muted)}
.quick-text{color:var(--blue);background:var(--blue-bg);border-color:var(--control-line);padding:10px 14px}
.quick-text:hover{background:var(--hover);color:var(--ink);border-color:var(--accent)}
.editor-grid{grid-template-columns:minmax(0,1fr) 310px;gap:24px}
.editor-side h3{font-size:1.05rem}
.editor-side .card-body{padding:22px}
.editor-side .button,.report-buttons .button{font-size:.94rem;min-height:46px}
.timer-label,.timer-manual{font-size:.875rem;color:var(--muted)}
.timer-digits{font-size:2.2rem;font-weight:650;letter-spacing:1px}
.timer-manual input{font-size:1rem;min-height:46px;height:auto;width:90px}
.timer-controls{flex-wrap:wrap}
.timer-controls .button{flex:1;min-width:110px}
.summary-line,.side-meta .summary-line{font-size:.95rem;color:var(--muted);line-height:1.6}
.summary-line strong{font-weight:650}
.summary-total{font-size:1rem}
.summary-total strong{font-size:1.6rem}
.editor-save-note{font-size:.875rem;line-height:1.6}
.materials-table{min-width:680px}
.materials-table input,#incident-form .materials-table input{font-size:1rem;min-height:46px;height:auto;padding:10px}
.materials-table .item-number{width:96px}
.materials-table .item-description{min-width:200px}
.signature-wrap{background:#fff;border:2px dashed #59748a;color:#223c51;color-scheme:light}
.signature-wrap:after{border-color:#637c91}
.signature-caption{font-size:.875rem;gap:10px}
.signature-preview{background:#fff;color:#172b3c;border:1px solid #637c91;color-scheme:light}
.signature-preview table{width:auto}.signature-preview td{font-size:inherit;color:inherit;border:0;padding:0}
.signature-preview tbody tr,.signature-preview tbody tr:hover{background:transparent}
.signature-preview h3{color:#172b3c}
.balance-highlight{background:var(--teal-bg);color:var(--teal);font-size:.95rem;gap:10px}
.balance-highlight strong{color:var(--teal);font-size:1rem}
.contract-big{font-size:1.8rem}
.contract-big small,.contract-equivalence,.contract-summary,.contract-dates{font-size:.875rem;color:var(--muted);line-height:1.65}
.contract-summary,.contract-dates{flex-wrap:wrap;gap:10px}
.agenda-date{font-size:1.1rem;flex-wrap:wrap}
.agenda-date small{font-size:.875rem}
.agenda-item .agenda-time{font-size:1.15rem;min-width:68px}
.agenda-item h3{font-size:1rem}.agenda-item p{font-size:.875rem}
.agenda-item .badge{display:inline-flex}
.agenda-item{flex-wrap:wrap;gap:16px}
.export-option strong{font-size:1rem}.export-option small{font-size:.875rem}
.export-option>.icon{color:var(--blue)}
.import-summary span,.import-warnings,.settings-actions p{font-size:.95rem}
.modal{background:var(--surface);max-height:94vh;border:1px solid var(--control-line);width:min(820px,calc(100vw - 30px))}
.modal.wide{width:min(1060px,calc(100vw - 30px))}
.modal::backdrop{background:#030b13b3;backdrop-filter:blur(3px)}
.modal-header{padding:22px 26px;gap:16px}.modal-header h2{font-size:1.4rem}
.modal-body{padding:26px}.modal-section-title{font-size:1rem;line-height:1.5}
.modal-actions{flex-wrap:wrap}
.email-entry-head{flex-wrap:wrap;align-items:flex-start}
.email-entry-head strong{font-size:1rem!important}
.email-entry p{font-size:1rem}.email-entry small,.email-archive-heading>strong{font-size:.875rem}
.email-preview{background:#fff;color-scheme:light}
.toast{background:#122638;color:#fff;font-size:1rem;border-color:#7390a8;max-width:100%}
.toast.error{background:#572834;color:#fff}
.toast>.icon,.sidebar .status-dot{color:#f0cd86}
.sidebar .status-dot{background:#f0cd86}
th,.badge,.table-id,.field-help,.note-small,.essential-field>.field-help,.subline{font-size:max(min(16px,1rem),.875rem)}
.toast .icon-button{width:44px;height:44px;font-size:1.4rem;color:#fff;border-color:#8c9faf;background:transparent}
.toast-area{max-width:min(580px,calc(100vw - 30px))}
.back-link,.dirty-marker,.calendar-range{font-size:.95rem;min-height:44px}
details>summary{font-size:1rem;line-height:1.65;color:var(--ink);padding:12px 0;min-height:48px}
.header-count{font-size:.875rem;color:var(--ink);background:var(--surface-2);padding:4px 10px}
.status-summary-label{font-size:.95rem}.status-summary strong{font-size:1rem}
.tagline{font-size:.875rem;color:var(--muted)}
.inline-form-error{font-size:1rem;line-height:1.6}
.billing-overview span,.billing-overview p{font-size:.95rem;color:var(--muted)}
.billing-overview small{font-size:.875rem}
.billing-overview strong{font-size:1.8rem}
.billing-edit{font-size:.9rem;line-height:1.5;min-height:44px;padding:8px 0;color:var(--blue);text-align:left;text-decoration:underline;text-underline-offset:4px}
.communication-indicator{background:var(--surface);color:var(--ink);padding:22px;gap:18px}
.communication-indicator:hover{background:var(--hover);border-color:var(--accent)}
.communication-indicator strong{font-size:1rem;line-height:1.5}
.communication-indicator small{font-size:.875rem;color:var(--muted);line-height:1.65}
.communication-count{font-size:1.9rem;color:var(--blue)}
.completion-footer p{font-size:.95rem;max-width:500px}
.completion-field{font-size:1rem;min-height:54px;color:var(--ink);background:var(--surface-2);border-color:var(--control-line);line-height:1.5}
.completion-field:hover{background:var(--hover);border-color:var(--accent)}
.login-story h1{font-size:2.8rem;color:#fff}
.login-story .eyebrow{font-size:.875rem;color:#f0cd86}
.login-story h1 em{color:#f0cd86}
.login-story p{font-size:1rem;color:#cedbe7}
.login-story-foot{font-size:.875rem;color:#cedbe7}
.login-panel{background:var(--surface)}
.login-form{max-width:460px}.login-form h2{font-size:1.9rem}
.login-form>.muted{font-size:1rem}.login-form input{height:auto;background:var(--input)}
.login-form .button{height:auto;min-height:48px;font-size:1rem}
.login-note{font-size:.875rem;color:var(--muted)}
.skip-link{background:var(--accent);color:var(--accent-ink);font-size:1rem}
@media(min-width:1500px){.main-content{padding-top:36px}.dashboard-grid{grid-template-columns:minmax(0,1.8fr) minmax(330px,1fr)}}
@media(max-width:1300px){.dashboard-grid{grid-template-columns:minmax(0,1fr)}.dashboard-grid>.stack{display:grid;grid-template-columns:1fr 1fr}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-grid{grid-template-columns:minmax(0,1fr)}.editor-side{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.editor-side>.card:last-child{grid-column:1/-1}}
@media(max-width:1050px){.sidebar{transform:translateX(-100%);width:280px;max-width:88vw;z-index:80}.sidebar.open{transform:translateX(0)}.sidebar-shade{display:block;position:fixed;inset:0;background:#0009;border:0;z-index:75}.workspace{margin-left:0;width:100%}.mobile-menu{display:inline-flex!important}.breadcrumb,.breadcrumb-divider{display:none}.topbar-right #today-label{display:none}.settings-grid,.transfer-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){h1,.page-head h1{font-size:1.65rem}.topbar{padding:16px;gap:12px}.topbar-left{font-size:.95rem;gap:8px}.topbar-right{gap:8px}.topbar-right .button,.page-actions .button{font-size:.9rem;min-height:46px;padding:10px 12px}.main-content{padding:24px 16px 32px}.page-head p{font-size:1rem;max-width:none}.page-head .eyebrow{font-size:.75rem}.page-head{gap:18px}.page-actions{justify-content:flex-start}.metrics{gap:12px}.metric{padding:18px}.metric-top{font-size:.875rem}.metric-foot{font-size:.8rem}.metric-value{font-size:2rem}.metric-icon{width:32px;height:32px}.metric-icon .icon{width:20px;height:20px}.dashboard-grid>.stack,.editor-side{grid-template-columns:minmax(0,1fr)}.dashboard-grid td,.dashboard-grid th{padding:16px}.card-head,.card-body,.form-section .card-head{padding:20px}.section-nav{font-size:.95rem}.form-grid,.form-grid.three,.modal .form-grid{grid-template-columns:minmax(0,1fr);gap:22px}.span-2{grid-column:auto}.hero-strip h3{font-size:1rem}.hero-strip p{font-size:.9rem}.hero-strip .button{font-size:.95rem}.workspace-footer{padding:20px;font-size:.8rem}.toolbar{padding:16px}.toolbar select{font-size:1rem;min-width:120px}.signature-caption{flex-wrap:wrap}.modal-header{padding:20px}.modal-body{padding:20px}.modal-header h2{font-size:1.25rem}.client-picker-selection{flex-direction:column;align-items:stretch}.completion-footer{align-items:flex-start;flex-direction:column}.completion-footer .button{width:100%}.completion-footer p{font-size:.95rem}.communication-indicator{padding:18px}.billing-overview strong{font-size:1.6rem}.billing-overview>div{padding:20px}.agenda-item .badge{display:inline-flex}.login-story h1{font-size:1.9rem}.login-story .eyebrow{font-size:.8rem}.login-form h2{font-size:1.65rem}.settings-actions p{font-size:.9rem}}
@media(max-width:440px){.metrics{grid-template-columns:minmax(0,1fr)}.metric{padding:20px}.metric-top,.metric-foot{font-size:.95rem}.metric-value{font-size:2.3rem}.topbar{align-items:flex-start}.topbar-left{flex:1}.topbar-left #breadcrumb-title{max-width:none;white-space:normal;overflow:visible}.topbar-right{width:100%;justify-content:flex-end}.topbar-right .button{flex:1}.topbar-right #refresh{display:inline-flex}.page-head{flex-direction:column}.page-actions{width:100%}.page-actions .button{flex:1}.card-head{flex-wrap:wrap}.hero-strip{flex-direction:column;align-items:flex-start}.hero-strip .button{margin-left:0}.editor-side .report-buttons{grid-template-columns:minmax(0,1fr)}.completion-field>span:last-child{white-space:normal}.quick-text{font-size:.94rem}.email-archive-heading{align-items:flex-start;flex-direction:column}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:440px){.balance-highlight{flex-direction:column;align-items:flex-start}.client-picker{padding:14px}.form-section .card-body{padding:16px}}
