:root{
  --ink:#17232d;--muted:#667480;--soft:#8a959f;--line:#e3e8eb;
  --canvas:#f8f9fa;--white:#fff;--navy:#14232d;--accent:#296b67;
  --teal:#e6f3f0;--warning:#aa651e;--warning-bg:#fff4e6;--danger:#a63d3d;--danger-bg:#fff0ef;
  color-scheme:light;font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,"Helvetica Neue",sans-serif;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--canvas);color:var(--ink)}
button,input,select{font:inherit}button{cursor:pointer}a{color:inherit}a:hover{color:var(--accent)}
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #8ac2b4;outline-offset:3px}
h1,h2,h3,p{margin:0}h1{font-size:clamp(31px,4vw,43px);letter-spacing:-.046em;line-height:1.15;font-weight:650}
h2{font-size:21px;letter-spacing:-.027em;font-weight:620;line-height:1.2}h3{font-size:16px;letter-spacing:-.01em;font-weight:650}
.muted{color:var(--muted)}.small{font-size:13px}.eyebrow,.section-kicker,.sidebar-label,.stat-label,.login-footer,.sidebar-footer{font-size:10px;font-weight:750;letter-spacing:.125em}
.eyebrow{color:var(--accent)}
.app-layout{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:100vh}
.sidebar{background:var(--navy);color:#e6eef1;display:flex;flex-direction:column;gap:40px;padding:29px 17px 24px;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:11px;font-size:12px;letter-spacing:.09em;font-weight:500;padding-left:14px;white-space:nowrap}
.brand strong{font-weight:800}.brand-symbol{height:37px;width:37px;display:grid;place-items:center;border-radius:11px;background:#f2f4f0;color:#16272d;font-size:22px;font-weight:750;letter-spacing:-.06em}
.brand-symbol span{color:#439a8e}.sidebar-group{display:grid;gap:5px}.sidebar-label{color:#82949d;padding:0 15px;margin-bottom:12px}
.nav-link{min-height:41px;padding:10px 14px;text-decoration:none;color:#bac9d0;border-radius:9px;display:flex;align-items:center;gap:12px;font-weight:500}
.nav-link:hover{background:#243640;color:#fff}.nav-link.selected{color:#fff;background:#2a3e46;font-weight:650}
.nav-link.inactive{opacity:.48;cursor:default}.nav-glyph{font-size:20px;line-height:1;width:23px;text-align:center}
.soon{margin-left:auto;font-size:10px;color:#a4b5bc}.sidebar-footer{margin-top:auto;padding:0 14px;letter-spacing:normal}
.privacy-mark{font-size:10px;color:#9eb2b8;letter-spacing:.06em}.privacy-mark:first-letter{color:#81bfb2}.logout{border:0;background:none;color:#b8c9cf;padding:14px 0 0;width:100%;text-align:left;display:flex;justify-content:space-between;align-items:center}
.logout:hover{color:#fff}
.workspace{min-width:0}.topbar{height:77px;background:#fff;border-bottom:1px solid var(--line);padding:0 clamp(24px,4vw,55px);display:flex;align-items:center;justify-content:space-between}
.topbar-breadcrumb{display:flex;align-items:center;gap:13px;font-size:13px;color:var(--muted)}.topbar-breadcrumb strong{color:var(--ink);font-weight:600}.crumb-sep{color:#cad3d8}
.topbar-actions{display:flex;align-items:center;gap:16px}.topbar-pill{background:#f0f3f3;color:#637279;border-radius:30px;font-size:11px;font-weight:650;padding:7px 11px}
.icon-btn{background:#fff;border:1px solid var(--line);border-radius:9px;color:var(--ink);height:35px;width:35px;font-size:20px;display:grid;place-items:center;line-height:1}
.icon-btn:hover{background:#f5f7f7}
.content{max-width:1350px;margin:0 auto;padding:43px clamp(24px,4vw,55px) 30px}
.heading-row{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:29px}
.heading-row h1{margin:9px 0 12px}.last-sync{white-space:nowrap;color:var(--muted);font-size:12px;display:flex;align-items:center;gap:8px;margin-bottom:5px}
.sync-dot{width:7px;height:7px;border-radius:50%;background:#7aada0}
.status-panel{display:flex;gap:18px;align-items:center;padding:23px 25px;border:1px solid #cfe6df;background:#f0f8f5;border-radius:14px;margin-bottom:22px}
.status-panel .status-icon{font-size:22px;color:#297b66}.status-panel h2{font-size:17px;margin-bottom:5px}.status-panel p{font-size:12px;color:#5d726d}
.status-panel.warning{background:var(--warning-bg);border-color:#f0dcc0}.status-panel.warning .status-icon{color:var(--warning)}
.status-panel.critical{background:var(--danger-bg);border-color:#eed0cc}.status-panel.critical .status-icon{color:var(--danger)}
.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:45px}
.stat{min-height:145px;background:#fff;border:1px solid var(--line);border-radius:13px;padding:20px 21px}
.stat-label{color:#7c8994}.stat-value{font-size:35px;font-weight:650;letter-spacing:-.06em;line-height:1.1;margin-top:17px;margin-bottom:7px}.stat-note{font-size:12px;color:var(--muted)}
.section-block{margin:0 0 47px;scroll-margin-top:30px}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:19px}
.section-heading .small{margin-top:8px}.section-kicker{color:var(--accent);margin-bottom:9px}.section-extra{font-size:12px;color:var(--muted)}
.website-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.website-card{min-width:0;background:#fff;border:1px solid var(--line);border-radius:14px;padding:22px;display:flex;flex-direction:column;gap:0;transition:box-shadow .18s,border-color .18s}
.website-card:hover{box-shadow:0 8px 24px #1a35440a;border-color:#ccd8d9}
.website-top{display:flex;justify-content:space-between;align-items:start;gap:10px}
.website-icon{width:38px;height:38px;border-radius:11px;background:#edf3f2;display:grid;place-items:center;font-size:18px;color:#2d746b;font-weight:800}
.signal{display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:700;border-radius:20px;padding:5px 8px;white-space:nowrap}
.signal.ok{background:#e6f3eb;color:#2c7454}.signal.unknown{background:#f0f2f3;color:#67747b}
.signal.alert{background:var(--danger-bg);color:var(--danger)}.signal.warning{background:var(--warning-bg);color:var(--warning)}
.website-card h3{margin-top:19px}.website-domain{font-size:12px;color:var(--muted);margin-top:4px}
.website-facts{border-top:1px solid var(--line);margin-top:21px;padding-top:11px}
.fact{display:flex;justify-content:space-between;gap:10px;padding:7px 0;font-size:12px}
.fact span{color:var(--muted)}.fact strong{font-weight:600;text-align:right}.fact .unknown{color:var(--warning)}.fact .pending{color:var(--muted)}.fact .alert{color:var(--danger)}
.website-actions{display:flex;gap:8px;margin-top:auto;padding-top:23px}
.btn{border:1px solid var(--line);border-radius:9px;padding:10px 14px;background:#fff;color:var(--ink);text-decoration:none;font-size:12px;font-weight:680;display:inline-flex;align-items:center;gap:8px;justify-content:center}
.btn:hover{background:#f4f8f7;color:var(--ink)}.btn-primary{background:var(--navy);color:#fff;border-color:var(--navy)}.btn-primary:hover{background:#274149;color:#fff}.btn-subtle{background:#f3f6f6}.full{width:100%}
.attention-list{display:grid;gap:10px}.attention-row{display:flex;gap:13px;background:#fff;border:1px solid #ead4cd;border-left:3px solid var(--danger);padding:16px 20px;border-radius:10px;align-items:center}
.attention-text{flex:1;min-width:0}.attention-row p{font-size:12px;color:var(--muted);margin-top:5px}.count-pill{font-size:12px;background:#faeaea;color:#a33f3f;border-radius:20px;padding:5px 10px}
.activity-section{margin-top:51px}.filter-bar{display:flex;flex-wrap:wrap;gap:12px;border:1px solid var(--line);border-bottom:0;background:#fff;border-radius:12px 12px 0 0;padding:15px}
.filter-bar label{display:grid;gap:5px;color:var(--muted);font-size:11px;font-weight:600}
.filter-bar select,.filter-bar input{background:#f9fafb;border:1px solid var(--line);border-radius:8px;padding:10px;color:var(--ink);min-height:37px;font-size:12px;min-width:130px}
[hidden]{display:none!important}
.activity-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:0 0 12px 12px;background:#fff}
.activity-table{width:100%;border-collapse:collapse;min-width:640px;text-align:left}
.activity-table thead{background:#f8fafb}.activity-table th{color:#71808a;letter-spacing:.08em;font-size:10px;text-transform:uppercase;font-weight:750;padding:14px 19px;white-space:nowrap}
.activity-table td{border-top:1px solid #edf0f2;padding:15px 19px;font-size:12px;vertical-align:middle}.activity-table td:first-child{font-weight:600}.activity-table td a{color:#345e63}
.activity-table .empty-cell{text-align:center;color:var(--muted);padding:35px}
.history-disclaimer{margin-top:10px;color:var(--soft);font-size:11px;line-height:1.5}
.workspace-footer{border-top:1px solid var(--line);padding:22px 0;display:flex;justify-content:space-between;gap:12px;color:var(--soft);font-size:10px;letter-spacing:.045em}
.empty-state{background:#fff;border:1px dashed var(--line);border-radius:12px;padding:30px;color:var(--muted);grid-column:1/-1;text-align:center;font-size:13px}
.details-dialog{padding:0;border:1px solid var(--line);border-radius:17px;box-shadow:0 30px 90px #14232d26;width:min(520px,calc(100vw - 24px));max-height:min(85vh,750px);overflow-y:auto;color:var(--ink)}
.details-dialog::backdrop{background:#0c1a23a3;backdrop-filter:blur(3px)}
.dialog-head{display:flex;align-items:start;justify-content:space-between;gap:20px;padding:28px 27px 20px;border-bottom:1px solid var(--line)}
.dialog-head h2{font-size:25px;margin-top:7px}.dialog-head form{margin:0}.dialog-section{padding:23px 27px;border-bottom:1px solid var(--line)}
.dialog-section h3{margin-bottom:14px}.dialog-section p{font-size:13px;color:var(--muted);line-height:1.6}
.dialog-note{background:#f7f8f9;border:1px solid var(--line);padding:13px;border-radius:9px;margin-top:15px;font-size:12px;color:var(--muted)}
.dialog-fact{display:flex;justify-content:space-between;gap:20px;padding:9px 0;font-size:12px}
.dialog-fact label{color:var(--muted)}.dialog-fact strong{text-align:right;font-weight:620}.dialog-footer{display:flex;gap:9px;padding:19px 27px 26px}
.pr-link{display:block;text-decoration:none;padding:12px 0;border-top:1px solid var(--line);font-size:12px}
.pr-link:hover{text-decoration:underline}.pr-link span{color:var(--muted);display:block;margin-top:4px}.sheet-handle{display:none}
.auth-page{min-height:100vh;background:#f3f6f5}.login-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:40px 18px}
.login-brand{display:flex;align-items:center;gap:11px;font-size:12px;font-weight:800;letter-spacing:.14em;margin-bottom:25px}
.login-brand .brand-symbol{background:var(--navy);color:#fff}.login-panel{width:100%;max-width:470px;background:#fff;padding:40px;border:1px solid var(--line);border-radius:17px;box-shadow:0 14px 60px #14232d0b}
.login-panel h1{margin:12px 0 15px}.login-panel .muted{font-size:13px;line-height:1.65}
.login-form{display:grid;gap:10px;margin-top:30px}.login-form label{font-size:12px;font-weight:650}
.login-form input{min-height:46px;border:1px solid #cbd5d8;padding:12px;border-radius:9px;background:#fff}
.login-form .btn{min-height:46px;margin-top:6px;font-size:13px}
.login-error{color:var(--danger);font-size:12px}.auth-footnote{font-size:11px;color:var(--soft);margin-top:24px}
.login-footer{color:var(--soft);font-size:10px;margin-top:27px}
@media(max-width:1140px){.website-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){
 .app-layout{display:block}.sidebar{height:auto;position:static;display:block;padding:14px 20px}
 .sidebar .brand{padding:0}.sidebar-group,.sidebar-footer{display:none}
 .topbar{height:58px;padding:0 22px}.content{padding:32px 22px}.heading-row{align-items:start;flex-direction:column}
 .stat-grid{margin-bottom:34px}.website-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:610px){
 .content{padding:25px 15px 22px}.topbar{padding:0 15px}.topbar-pill{display:none}
 h1{font-size:31px}.heading-row{margin-bottom:19px}.heading-row .muted{font-size:12px}
 .status-panel{align-items:start;padding:17px}.status-panel h2{font-size:15px}
 .stat-grid{gap:9px;margin-bottom:34px}.stat{min-height:122px;padding:16px}.stat-label{font-size:9px}.stat-value{font-size:30px;margin-top:13px}.stat-note{font-size:10px}
 .website-grid{grid-template-columns:1fr}.website-card{padding:19px}.section-heading{align-items:start}.section-heading h2{font-size:20px}
 .workspace-footer{flex-direction:column}.attention-row{align-items:start}.attention-row .btn{align-self:start}
 .details-dialog{position:fixed;inset:auto 0 0;width:100%;max-width:none;max-height:90vh;margin:0;border-radius:23px 23px 0 0;border-bottom:0}
 .sheet-handle{display:block;width:35px;height:4px;background:#cbd3d5;border-radius:8px;margin:10px auto 0}
 .dialog-head{padding:18px 21px}.dialog-section{padding:20px 21px}.dialog-footer{padding:17px 21px 30px}
 .login-panel{padding:28px 22px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

.notice-text + .notice-text{margin-top:9px}

/* V1.4: keep acknowledgement and incident history secondary to the overview. */
.incident-history-section{margin-top:34px;padding-top:25px;border-top:1px solid var(--line)}
.incident-history-section .section-heading{margin-bottom:16px}
.incident-history-section .activity-table-wrap{border-radius:12px}
.incident-history-section .activity-table{min-width:760px}
.dialog-footer{flex-wrap:wrap}
.dialog-footer .action-message{flex-basis:100%;font-size:12px;color:var(--danger);line-height:1.5}
.btn:disabled{opacity:.58;cursor:wait}
.attention-row button{flex-shrink:0}
@media(max-width:610px){
 .attention-row{flex-wrap:wrap}
 .attention-row .attention-text{flex-basis:calc(100% - 40px)}
 .attention-row .btn{margin-left:25px}
 .dialog-footer .btn{flex:1 1 42%}
}

/* V1.5 · Clients & Projects. Uses the existing typography, spacing and cards. */
.crm-stats{margin-bottom:43px}
.crm-toolbar{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;padding:15px;background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:16px}
.crm-toolbar label{display:grid;gap:7px;font-size:11px;font-weight:650;color:var(--muted)}
.crm-toolbar input,.crm-toolbar select{min-height:39px;padding:9px 11px;border:1px solid #d7e0e3;border-radius:8px;background:#fafbfb;color:var(--ink);font-size:12px}
.crm-toolbar .crm-search-label{flex:1;min-width:210px}.crm-search-label input{width:100%}
.crm-toolbar .crm-checkbox{display:flex;align-items:center;gap:9px;margin-bottom:11px;cursor:pointer}
.crm-toolbar .crm-checkbox input{min-height:auto;accent-color:var(--accent)}
.crm-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.crm-card{min-width:0;background:#fff;border:1px solid var(--line);border-radius:14px;padding:21px;display:flex;flex-direction:column;overflow-wrap:anywhere}
.crm-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.crm-card h3{font-size:17px;margin-top:18px;font-weight:670}
.crm-card-subtitle{font-size:12px;color:var(--muted);margin-top:5px;min-height:18px}
.crm-card .website-facts{margin-top:17px}
.crm-card .website-actions{padding-top:17px}
.crm-card .website-actions:empty{display:none}
.crm-card .fact{align-items:start}
.crm-card .fact span{flex:0 0 35%}
.crm-card .fact strong{min-width:0}
.crm-next-step strong{white-space:pre-line}
.crm-value-truncate{overflow-wrap:anywhere}
.crm-dialog{width:min(580px,calc(100vw - 24px))}
.crm-form-fields{padding:24px 27px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.crm-field{display:grid;gap:7px;min-width:0}
.crm-label{font-size:12px;font-weight:620;color:var(--muted)}
.crm-field input,.crm-field select,.crm-field textarea{width:100%;min-width:0;border:1px solid #cfd9dc;padding:11px 12px;border-radius:9px;background:#fff;color:var(--ink);font:inherit;font-size:13px}
.crm-field input,.crm-field select{min-height:43px}
.crm-field textarea{resize:vertical;min-height:65px}
.crm-field:has(textarea),.crm-archive-control{grid-column:1/-1}
.crm-field input:focus,.crm-field select:focus,.crm-field textarea:focus{border-color:#317e72}
.crm-archive-control{display:flex;align-items:start;gap:9px;font-size:12px;cursor:pointer;color:var(--muted);margin:3px 0}
.crm-archive-control input{accent-color:var(--accent)}
.crm-form-error{margin:0 27px 12px;font-size:12px;color:var(--danger);line-height:1.5}
.crm-form-actions{border-top:1px solid var(--line);justify-content:flex-end}
@media(max-width:1140px){.crm-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.crm-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:610px){
 .crm-cards{grid-template-columns:1fr}
 .crm-toolbar .crm-search-label{flex-basis:100%}
 .crm-form-fields{grid-template-columns:1fr;padding:18px 21px}
 .crm-form-actions{padding:16px 21px 28px}
 .crm-form-error{margin:0 21px 12px}
 .crm-toolbar label{flex:1 1 100%}
 .crm-toolbar select{width:100%}
 .crm-toolbar .crm-checkbox{margin-bottom:0}
 .crm-dialog{max-height:90vh}
 .crm-stats .stat{min-height:112px}
 .crm-stats .stat-value{font-size:30px}
}

/* Desktop sidebar exists; the topbar cross-module link remains visible on mobile. */
.topbar-module-link{font-size:12px;font-weight:650;color:#2b6661;text-decoration:none;white-space:nowrap}
.topbar-module-link:hover{text-decoration:underline}
@media(max-width:610px){.topbar-actions{gap:9px}.topbar-module-link{font-size:11px}}

/* UX/A11y refinement for V1.5 — target WCAG 2.2 AA. */
:root{--soft:#596873;--warning:#87470e}
:focus-visible{outline:3px solid #115e58;outline-offset:3px}
.sidebar :focus-visible{outline-color:#cbfae8}
.skip-link{position:fixed;left:12px;top:-80px;z-index:1000;background:#fff;color:#14232d;
  border:3px solid #115e58;border-radius:8px;padding:10px 14px;font-weight:750;text-decoration:none}
.skip-link:focus{top:10px}
.visually-hidden{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}
.mobile-navigation{display:none}
.nav-link{min-height:44px}
.btn{min-height:44px;min-width:44px}
.icon-btn{min-width:44px;min-height:44px}
.stat-label{color:#53636d}
.activity-table th{color:#4c5d67}
.signal.unknown{color:#485962}
.signal.warning{color:#784213}
.stat-note,.crm-label{color:#596873}
.website-icon{flex-shrink:0}
.status-icon{user-select:none}
.crm-more{grid-column:1/-1;border:1px solid var(--line);border-radius:10px;background:#fafbfb}
.crm-more summary{cursor:pointer;list-style:revert;min-height:44px;padding:12px 15px;font-weight:650;color:#274c53}
.crm-more summary:hover{background:#edf5f3}
.crm-more[open] summary{border-bottom:1px solid var(--line)}
.crm-advanced-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  padding:15px;gap:15px}
.crm-more .crm-field:has(textarea){grid-column:1/-1}
.crm-dialog-description{padding:15px 27px 0;font-size:12px;color:#596873}
.crm-form-error:focus{outline:3px solid #115e58;outline-offset:2px;border-radius:3px}
.crm-form-fields [aria-invalid=true]{border:2px solid #a63d3d}
.crm-hint{font-size:12px;color:#596873;grid-column:1/-1}
.crm-card:focus{outline:3px solid #115e58;outline-offset:3px}
.crm-card .website-actions{flex-wrap:wrap}
.crm-card .btn{padding-inline:13px}
.home-focus{margin-bottom:27px}
.home-focus .section-heading{align-items:flex-end}
.focus-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.focus-group{min-width:0;background:#fff;border:1px solid var(--line);border-radius:14px;padding:17px}
.focus-group h3{margin-bottom:13px;font-size:15px}
.count-subtle{font-size:12px;color:#596873;font-weight:600}
.focus-list{display:grid;gap:9px}
.focus-item{border:1px solid var(--line);border-radius:10px;padding:12px 14px;min-width:0}
.focus-item-content{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}
.focus-title{font-size:13px;color:#1b5552;font-weight:750;text-underline-offset:2px}
.focus-secondary,.focus-next,.focus-date,.focus-empty{font-size:12px;color:#53636d}
.focus-next{color:#17232d}
.focus-date{font-weight:700;margin-top:2px}
.focus-date.overdue{color:#9b3535}
.focus-empty{margin:8px 2px 14px}
@media(max-width:820px){
  .sidebar{display:none}
  .mobile-navigation{display:block;position:relative;z-index:20;flex-shrink:0}
  .mobile-navigation summary{display:flex;align-items:center;justify-content:center;
    list-style:none;border:1px solid #cfd9dc;border-radius:9px;min-height:44px;
    padding:0 13px;font-size:13px;font-weight:700;cursor:pointer}
  .mobile-navigation summary::-webkit-details-marker{display:none}
  .mobile-navigation[open] summary{background:#edf5f3}
  .mobile-navigation nav{position:absolute;top:calc(100% + 8px);left:0;display:grid;
    min-width:210px;max-width:calc(100vw - 30px);padding:7px;background:#fff;
    border:1px solid #c8d4d7;border-radius:12px;box-shadow:0 12px 30px #17232d20}
  .mobile-navigation nav a{display:flex;align-items:center;padding:11px 12px;
    min-height:44px;border-radius:8px;color:#243941;font-weight:620;text-decoration:none}
  .mobile-navigation nav a:hover,.mobile-navigation nav a[aria-current]{background:#e6f3f0;color:#164e46}
  .topbar{gap:10px;justify-content:space-between}
  .topbar .topbar-module-link{display:none}
  .topbar-breadcrumb{margin-right:auto}
  .focus-groups{grid-template-columns:1fr}
}
@media(max-width:610px){
  .topbar-breadcrumb{display:none}
  .topbar{min-height:62px;height:auto;padding:8px 15px}
  .topbar-actions{margin-left:auto}
  .crm-advanced-fields{grid-template-columns:1fr}
  .crm-dialog-description{padding:13px 21px 0}
  .home-focus .section-heading{align-items:flex-start;flex-wrap:wrap}
  .focus-group{padding:15px}
  .crm-form-fields{row-gap:15px}
}
@media(max-width:360px){
  .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat{padding:12px}
  .stat-value{font-size:27px}
  .topbar-actions{gap:7px}
  .crm-card{padding:15px}
  .filter-bar{padding:10px}
  .filter-bar select,.filter-bar input{min-width:0;width:100%}
  .filter-bar label{flex:1 1 100%;min-width:0}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition-duration:0.01ms!important;animation-duration:0.01ms!important}
}
/* Explicit element specificity overrides the original pale focus indicator. */
button:focus-visible,input:focus-visible,textarea:focus-visible,
select:focus-visible,a:focus-visible,summary:focus-visible{
  outline:3px solid #115e58;outline-offset:3px
}
.sidebar a:focus-visible{outline-color:#cbfae8}

/* V1.5 mobile UX review: route hierarchy, sticky navigation, reliable sheets. */
.sidebar-subheading{margin-top:24px}
.sidebar .nav-page{font-weight:670}
.sidebar .nav-anchor{padding-left:25px;color:#bac9d0;font-size:12px}
.nav-kind{margin-left:auto;color:inherit;opacity:.68;font-size:12px;font-weight:650;flex-shrink:0}
.sidebar .nav-link{display:flex;align-items:center;justify-content:space-between}
.mobile-page-label{display:none}
.to-top[hidden]{display:none!important}
.to-top{font-size:22px}
.refresh-button.is-refreshing span{display:inline-block;animation:refresh-turn 1s linear infinite}
@keyframes refresh-turn{to{transform:rotate(360deg)}}
#overview,#focus,#websites,#history,#projects,#clients,.section-block{scroll-margin-top:86px}
.mobile-navigation nav a[hidden]{display:none!important}
.mobile-menu-group{font-size:10px;font-weight:750;letter-spacing:.12em;color:#586b75;
  margin:0;padding:12px 12px 7px}
.mobile-navigation .mobile-nav-anchor{padding-left:20px;font-size:12px}
.mobile-navigation .mobile-nav-page{font-size:13px;font-weight:740}
.mobile-navigation .nav-kind{margin-left:auto;color:#526773}
.mobile-navigation nav a.selected{background:#e6f3f0;color:#164e46;font-weight:750}
.crm-dialog[open]{display:flex;flex-direction:column;max-height:min(86dvh,780px);
  overflow:hidden}
.crm-dialog .sheet-handle,.crm-dialog .crm-dialog-head,.crm-dialog .crm-dialog-description{
  flex:0 0 auto}
.crm-dialog .crm-dialog-head{min-width:0;align-items:center}
.crm-dialog .dialog-head-text{flex:1;min-width:0}
.crm-dialog #crm-dialog-title{max-width:100%;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;line-height:1.3}
.crm-dialog #crm-form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden}
.crm-dialog .crm-form-scroll{overflow-y:auto;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;min-height:0;flex:1 1 auto}
.crm-dialog .crm-form-actions{flex:0 0 auto;background:#fff;min-height:75px;z-index:1;
  box-shadow:0 -3px 12px #14232d0a}
.crm-dialog .crm-form-actions .btn{flex:0 0 auto;min-width:100px}
@media(min-width:821px){
  .to-top{display:none!important}
}
@media(max-width:820px){
  .topbar{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--line)}
  .mobile-navigation{z-index:51}
  .mobile-navigation summary{gap:8px}
  .mobile-page-label{display:block;font-size:12px;font-weight:740;color:#31474f;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
  .mobile-navigation nav{z-index:55;max-height:min(70dvh,520px);overflow-y:auto;
    overscroll-behavior:contain;min-width:min(295px,calc(100vw - 28px))}
  .topbar-actions{flex-shrink:0}
  .mobile-navigation nav a{justify-content:space-between;gap:9px}
  #overview,#focus,#websites,#history,#projects,#clients,.section-block{scroll-margin-top:90px}
}
@media(max-width:610px){
  /* Override the earlier desktop .crm-dialog width that left a visible right gutter. */
  .crm-dialog{position:fixed;inset:auto 0 0 0;left:0;right:0;bottom:0;top:auto;
    width:100%;max-width:100%;min-width:0;margin:0;
    height:min(93dvh,800px);max-height:93dvh;
    border-radius:22px 22px 0 0;border-left:0;border-right:0;border-bottom:0;
    padding:0;box-sizing:border-box;overflow:hidden}
  .crm-dialog[open]{max-height:93dvh}
  .crm-dialog .sheet-handle{margin:9px auto 0}
  .crm-dialog .crm-dialog-head{padding:13px 19px 14px;gap:12px}
  .crm-dialog .dialog-head h2{font-size:22px}
  .crm-dialog .crm-dialog-description{padding:11px 19px 10px;font-size:11px}
  .crm-dialog .crm-form-fields{padding:14px 19px 20px}
  .crm-dialog .crm-form-actions{padding:12px 19px calc(12px + env(safe-area-inset-bottom));
    display:flex;justify-content:space-between;align-items:center;gap:12px;
    flex-wrap:nowrap;min-height:72px}
  .crm-dialog .crm-form-actions .btn{flex:0 0 auto;min-width:100px}
  .mobile-navigation nav{min-width:min(300px,calc(100vw - 30px))}
  .topbar{padding:8px 13px}
  .mobile-page-label{font-size:11px}
}
@media(max-width:360px){
  .mobile-page-label{font-size:10px}
  .crm-dialog .crm-dialog-head{padding-inline:16px}
  .crm-dialog .crm-form-fields{padding-inline:16px}
  .crm-dialog .crm-form-actions{padding-inline:16px}
  .crm-dialog .crm-form-actions .btn{min-width:90px}
}
@media(prefers-reduced-motion:reduce){
  .refresh-button.is-refreshing span{animation:none}
}
/* Visible feedback: a forced refresh can legitimately return unchanged source data. */
.refresh-feedback:not([hidden]){
  position:fixed;top:82px;right:16px;z-index:70;max-width:min(360px,calc(100vw - 32px));
  border:1px solid #a7d2c3;border-radius:10px;background:#f0f8f5;color:#1a5144;
  box-shadow:0 8px 28px #14232d1a;padding:11px 14px;font-size:12px;font-weight:650;line-height:1.5;
  pointer-events:none
}
.refresh-feedback.is-error{background:#fff3ef;color:#8c2929;border-color:#e4bdb7}
@media(max-width:820px){
  .refresh-feedback:not([hidden]){top:76px;left:12px;right:12px;max-width:none}
}

/* Avoid narrow multi-line Create actions at 320-390px. */
@media(max-width:610px){
  #projects .section-heading,#clients .section-heading{
    flex-direction:column;align-items:stretch;gap:12px
  }
  #new-project,#new-client{
    align-self:flex-start;white-space:nowrap;min-width:148px
  }
}
