:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#182634;background:#f5f3ed;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid #b9bfc5;border-radius:9px;background:white;color:#142f4d;padding:10px 15px;font-weight:700}button:hover{border-color:#274666}button:disabled{opacity:.55;cursor:wait}a{color:#155a93}a:hover{text-decoration-thickness:2px}.site-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px max(22px,calc((100vw - 1180px)/2));background:#142f4d;color:#fff}.site-header a{color:#fff}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;font-size:20px;font-weight:700}.brand strong{color:#accbea}.brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:9px;background:#accbea;color:#142f4d;font-weight:900}.header-right{display:flex;align-items:center;gap:18px;font-size:14px}.header-right button{background:transparent;color:#fff;border-color:#8b9baa}main{max-width:1180px;margin:auto;padding:40px 22px 80px}.intro{max-width:760px;margin-bottom:28px}.eyebrow{display:block;color:#234d78;font-size:12px;text-transform:uppercase;letter-spacing:.12em;font-weight:800}h1{font-size:clamp(34px,5vw,60px);line-height:1.08;letter-spacing:-.04em;margin:14px 0}h2{font-size:29px;margin:10px 0}h3{font-size:22px;margin:8px 0 16px}p{line-height:1.55;color:#525c66}.intro p{font-size:18px}.card{background:#fff;border:1px solid #dce0e3;border-radius:16px;padding:28px;box-shadow:0 8px 30px #162a3e10}.narrow{max-width:490px}.notice{border-radius:10px;padding:13px 17px;background:#e4eaf0;border:1px solid #a8bccf;color:#112f4d}.notice.error{background:#fff0ec;border-color:#e5b5a4;color:#803a2a}form{display:grid;gap:17px}label{display:grid;gap:7px;font-weight:700;font-size:14px}input,select,textarea{width:100%;border:1px solid #bec4cb;border-radius:9px;padding:12px;background:#fff;color:#182634}input:focus,select:focus,textarea:focus{outline:3px solid #baccdf;outline-offset:1px}.primary{background:#155a93;color:#fff;border-color:#155a93}.primary:hover{background:#102d4b}.helper{font-size:14px}.business-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;margin:22px 0}.business-choice{text-align:left;display:grid;gap:4px;padding:18px}.business-choice span,.project-item small{color:#626c76}.inline-form{display:flex;align-items:end;gap:10px;max-width:480px}.inline-form label{flex:1}.workspace-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:0 0 22px}.workspace-heading h2{margin-bottom:0}.workspace-heading p{margin:4px 0}.workspace-grid{display:grid;grid-template-columns:minmax(300px,420px) minmax(300px,1fr);gap:20px}.row-heading{display:flex;justify-content:space-between;align-items:start;gap:10px}.project-list{display:grid;gap:11px}.project-item{border:1px solid #dce0e3;border-radius:11px;padding:15px;display:grid;gap:4px}.project-item strong{font-size:17px}.project-item p{margin:0;font-size:14px}.status{font-size:12px;text-transform:uppercase;letter-spacing:.06em;font-weight:800;color:#155a93}footer{max-width:1180px;margin:auto;padding:0 22px 35px;color:#69727c;font-size:13px}[hidden]{display:none!important}@media(max-width:760px){main{padding-top:25px}.site-header{padding:15px 22px;align-items:start}.header-right{flex-wrap:wrap;justify-content:end}.header-right #signed-in-as{display:none}.workspace-grid{grid-template-columns:1fr}.inline-form{display:grid}.card{padding:21px}}

/* The Build shell follows the Fordwell business portal's header, rail, and card rhythm. */
:root{background:#f3f7fb;color:#0f1e2e}body{background:#f3f7fb}h1{font-size:clamp(30px,3.5vw,42px);letter-spacing:-.035em}h2{font-size:21px}h3{font-size:17px}.site-header{height:78px;padding:10px 28px;background:#fff;border-bottom:1px solid #d8dee5;color:#173a5c;position:sticky;top:0;z-index:20}.site-header a{color:#153d65}.brand{gap:7px;font-size:21px;line-height:1}.brand img{object-fit:contain}.brand span{display:grid}.brand strong{color:#173a5c}.brand small{font-size:12px;color:#536476;margin-top:4px;letter-spacing:.02em}.top-links{display:flex;align-items:center;gap:28px;color:#3f5c79;font-size:14px;font-weight:750}.header-right button{color:#153d65;border-color:#b4c4d4}.header-right{color:#34485c}.notice{position:sticky;top:78px;z-index:18;max-width:900px;margin:10px auto -5px;box-shadow:0 5px 20px #12273c17}.app-shell{display:grid;grid-template-columns:286px minmax(0,1fr);min-height:calc(100vh - 78px)}.sidebar{background:#f7f8fa;border-right:1px solid #dce2e7;padding:24px 18px;display:flex;flex-direction:column;gap:22px}.sidebar-title{display:grid;gap:6px;padding:8px 14px 3px}.sidebar-title strong{font-size:19px;line-height:1.2}.sidebar-title small{color:#647382}.side-nav{display:grid;gap:9px}.side-nav button{text-align:left;display:flex;align-items:center;gap:16px;border-color:#dadfe4;background:#fff;border-radius:11px;min-height:68px;color:#153d66;font-size:21px}.side-nav button span{display:grid;gap:3px}.side-nav button strong{font-size:14px;color:#12202e}.side-nav button small{font-size:11px;font-weight:500;color:#707983}.side-nav button.active{background:#e8f2fb;border-color:#82a6ca}.side-secondary{margin-top:auto}.content{max-width:none;margin:0;padding:24px clamp(20px,3vw,48px) 70px;min-width:0}.view{max-width:1450px;margin:0 auto}.hero{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:28px 34px;background:linear-gradient(115deg,#e8f0f9 0%,#eef4fa 68%,#fff1cf 100%);border:1px solid #b4c8dd;border-radius:13px;margin-bottom:17px}.hero h1{margin:8px 0}.hero p{margin:0}.hero img{object-fit:contain;background:#fff9;border-radius:13px;padding:8px}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px}.stat-grid .card{padding:18px;box-shadow:none}.stat-grid span{color:#5b6b7c;font-size:13px}.stat-grid strong{display:block;font-size:30px;margin-top:6px;color:#153250}.card{border-radius:12px;box-shadow:0 6px 22px #162a3e08}.two-column{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:0 0 20px}.page-heading h1{margin:7px 0}.page-heading p{margin:0}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.section-head h2,.section-head h3{margin:4px 0}.section-head input{max-width:240px}.list{display:grid;gap:10px}.list-row,.project-card{border:1px solid #dbe1e7;background:#fff;border-radius:10px;padding:14px;text-align:left;display:grid;gap:5px;width:100%}.list-row:hover,.project-card:hover{border-color:#759abe;background:#f8fafc}.list-row strong,.project-card strong{font-size:16px}.list-row small,.project-card small{font-size:12px;color:#636e78}.project-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}.project-card{padding:20px;min-height:160px}.project-card mark,.pill{display:inline-block;width:max-content;background:#e9eff5;border-radius:999px;padding:5px 10px;color:#153e67;font-size:12px;font-weight:800}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.contract-layout{grid-template-columns:minmax(0,1.3fr) minmax(320px,.7fr)}.editor-list{display:grid;gap:12px}.editor-row{border:1px solid #d9e0e8;border-radius:11px;background:#f8fafb;padding:16px;display:grid;gap:11px}.editor-row header{display:flex;justify-content:space-between;gap:12px;align-items:center}.editor-row header strong{color:#153352}.editor-row .small-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.editor-row .date-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.check-line{display:flex;align-items:center;gap:8px;font-size:13px}.check-line input{width:auto}.assignment-options{display:flex;flex-wrap:wrap;gap:7px}.assignment-options label{border:1px solid #c9d2dc;background:#fff;border-radius:8px;padding:7px 9px;font-size:12px;display:flex;gap:6px;align-items:center}.assignment-options input{width:auto}.contract-preview{border:1px solid #e0e4e8;background:#fbfcfd;border-radius:9px;padding:23px;min-height:280px;color:#232e39}.contract-preview h3{font-size:20px}.contract-preview article{border-top:1px solid #e0e4e9;padding:10px 0}.contract-preview p{white-space:pre-wrap}.contract-preview .preview-total{font-weight:800;text-align:right}.tab-row{display:flex;gap:8px;border-bottom:1px solid #d2dae3;margin-bottom:18px}.tab-row button{border:0;border-radius:9px 9px 0 0;background:transparent}.tab-row button.active{background:#e7eef5;color:#0c3b6b}.gantt{overflow-x:auto;margin-bottom:15px}.gantt-row{display:grid;grid-template-columns:180px repeat(7,minmax(75px,1fr));gap:3px;align-items:center;min-width:750px;padding:7px 0;border-bottom:1px solid #eceef1}.gantt-row span{font-size:12px}.gantt-row .day{height:28px;background:#f1f3f6;border-radius:4px}.gantt-row .day.active{background:#4274a6}.gantt-row .day.done{background:#9bb0c6}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border:1px solid #d5dde5;border-radius:12px;overflow:hidden;background:#fff;margin-bottom:18px}.calendar-day{min-height:108px;padding:8px;border-right:1px solid #e4e9ee;border-bottom:1px solid #e4e9ee}.calendar-day strong{font-size:12px}.calendar-day.is-outside{background:#f5f6f8;color:#9ba2aa}.calendar-entry{display:block;background:#dbe7f3;color:#14385d;border-radius:5px;padding:3px 5px;font-size:11px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.muted{color:#66727e}.empty{color:#6e7781;font-size:14px;padding:15px;background:#f8fafb;border:1px dashed #c8d2dd;border-radius:9px}.eyebrow{color:#126ba7}.primary{background:#155d99;border-color:#155d99}#auth-shell{max-width:1200px}#auth-shell .narrow{margin:25px auto}#business-panel{max-width:760px;margin:28px auto}@media(max-width:1120px){.app-shell{grid-template-columns:230px minmax(0,1fr)}.stat-grid{grid-template-columns:repeat(2,1fr)}.two-column,.contract-layout{grid-template-columns:1fr}}@media(max-width:720px){.site-header{padding:10px 14px}.top-links{display:none}.header-right #signed-in-as{display:none}.app-shell{display:block}.sidebar{padding:10px;gap:8px}.sidebar-title{display:none}.side-nav{display:flex;overflow:auto}.side-nav button{min-height:46px;white-space:nowrap;padding:8px 10px}.side-nav button small{display:none}.side-secondary{display:none}.content{padding:16px}.hero{padding:18px}.hero img{display:none}.stat-grid{grid-template-columns:repeat(2,1fr)}.form-row,.editor-row .small-fields{grid-template-columns:1fr}.calendar-day{min-height:76px;padding:5px}.calendar-entry{font-size:9px}}

/* Portal-style compact rail, expanding on hover or keyboard focus. */
@media (min-width: 801px) {
  .app-shell { grid-template-columns: 84px minmax(0, 1fr); transition: grid-template-columns 220ms cubic-bezier(.2,.8,.2,1); }
  .app-shell:has(.sidebar:hover), .app-shell:has(.sidebar:focus-within), .app-shell:has(.sidebar.is-pinned) { grid-template-columns: 286px minmax(0, 1fr); }
  .sidebar { position: sticky; top: 78px; height: calc(100dvh - 78px); overflow-x: hidden; overflow-y: auto; padding: 16px 7px; gap: 12px; z-index: 12; transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
  .sidebar.is-pinned { background: #eaf0f5; border-right-color: #a6bbd0; box-shadow: inset -4px 0 #b8cbde; }
  .side-nav .nav-copy, .side-secondary .nav-copy { display: none; }
  .sidebar:hover .nav-copy, .sidebar:focus-visible .nav-copy, .sidebar:has(:focus-visible) .nav-copy, .sidebar.is-pinned .nav-copy { display: grid; }
  .side-nav { gap: 8px; }
  .side-nav button { width: 68px; min-height: 70px; padding: 8px 4px 15px; display: grid; justify-items: center; gap: 2px; position: relative; }
  .side-nav button::after { content: attr(data-short); position: absolute; bottom: 5px; left: 2px; right: 2px; text-align: center; font-size: 9px; color: #304254; }
  .side-nav .nav-icon { font-size: 23px; line-height: 1; }
  .sidebar:hover .side-nav button, .sidebar:focus-visible .side-nav button, .sidebar:has(:focus-visible) .side-nav button, .sidebar.is-pinned .side-nav button { width: 100%; min-height: 64px; display: flex; justify-content: flex-start; padding: 10px 12px; gap: 13px; }
  .sidebar:hover .side-nav button::after, .sidebar:focus-visible .side-nav button::after, .sidebar:has(:focus-visible) .side-nav button::after, .sidebar.is-pinned .side-nav button::after { display: none; }
  .side-secondary { padding: 10px 2px; min-height: 48px; }
  .sidebar:hover .side-secondary, .sidebar:focus-visible .side-secondary, .sidebar:has(:focus-visible) .side-secondary, .sidebar.is-pinned .side-secondary { display: flex; align-items: center; justify-content: center; gap: 8px; }
}

/* Project overview drilldowns and the persistent contract revision indicator. */
#project-overview-tab { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: 10px; }
#project-overview-tab > h2 { min-width: 0; margin: 0; }
#project-overview-tab > #project-overview-content { grid-column: 1 / -1; min-width: 0; margin-top: 10px; }
#project-customer-details-action { position: static; grid-column: 2; justify-self: end; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }
#project-customer-details-action[hidden] { display: none; }
.project-overview-grid > button { border: 1px solid #dce2e7; border-radius: 9px; padding: 13px; min-width: 0; min-height: 92px; text-align: left; color: inherit; background: #fff; cursor: pointer; display: block; }
.project-overview-grid > button strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.project-overview-grid > button:hover, .project-overview-grid > button[aria-pressed="true"] { border-color: #2781c5; background: #edf6ff; }
.project-overview-grid > button:focus-visible { outline: 3px solid #2781c5; outline-offset: 2px; }
.project-metric-detail { margin: 12px 0 16px; padding: 14px 16px; border: 1px solid #b8d1e9; border-radius: 10px; background: #f5faff; }
.project-metric-detail[hidden] { display: none; }
.project-metric-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.project-metric-heading h3 { margin: 0; }
.project-metric-heading .icon-action { flex: 0 0 auto; }
.project-metric-rows { display: grid; gap: 0; }
.project-metric-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid #dce8f4; }
.project-metric-row span { min-width: 0; overflow-wrap: anywhere; }
.project-metric-row strong { flex: 0 0 auto; text-align: right; }
.project-metric-total .project-metric-row { border-bottom: 0; font-size: 1.05em; }
.project-metric-rows > .compact-action { justify-self: start; margin-top: 12px; }
.project-customer-inline-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.project-customer-inline-form label { min-width: 0; }
.project-customer-inline-form input, .project-customer-inline-form select, .project-customer-inline-form textarea { width: 100%; }
.project-customer-field-wide, .project-customer-form-actions { grid-column: 1 / -1; }
.project-customer-form-actions { margin-top: 4px; }
#project-panel-nav .contract-revision-badge { grid-column: 2; display: inline-block; justify-self: start; padding: 2px 5px; border-radius: 6px; background: #dbeefc; color: #064e80; font-size: 9px; font-weight: 700; line-height: 1.2; }
#project-panel-nav .contract-revision-badge[hidden] { display: none; }
@media (max-width: 600px) {
  .project-overview-grid > button { min-height: 72px; padding: 10px; }
  .project-metric-detail { padding: 11px; }
  .project-metric-row { flex-wrap: wrap; gap: 2px 8px; }
  .project-metric-row strong { flex-basis: 100%; text-align: left; }
  .project-customer-inline-form { grid-template-columns: 1fr; }
}
button { min-height: 44px; transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 110ms ease; }
button:not(:disabled):hover { box-shadow: 0 5px 14px rgba(12,45,78,.12); }
button:not(:disabled):active { transform: translateY(2px) scale(.98); box-shadow: inset 0 2px 5px rgba(0,0,0,.12); }
button:focus-visible { outline: 3px solid #7fa4ca; outline-offset: 2px; }
.side-nav button:hover, .side-nav button:focus-visible { background: #e8f2fb; border-color: #82a6ca; }
.customer-option { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.customer-option span { display: grid; gap: 5px; }
.customer-mode { display: flex; gap: 12px; flex-wrap: wrap; }
.customer-mode label { display: flex; align-items: center; gap: 8px; border: 1px solid #d4dce4; border-radius: 9px; padding: 10px 12px; min-height: 48px; }
.customer-mode input { width: auto; }
.project-panel-nav { display: flex; align-items: center; gap: 8px; padding: 7px; border: 1px solid #dce2e7; background: #fff; border-radius: 12px; margin-bottom: 18px; }
.project-panel-nav > button, .panel-dropdown > button { border-color: transparent; background: transparent; min-height: 48px; }
.project-panel-nav button.active { background: #144e80; color: #fff; }
.panel-dropdown { position: relative; }
.panel-menu { position: absolute; top: calc(100% + 7px); left: 0; min-width: 300px; padding: 7px; border: 1px solid #c9d3dd; border-radius: 11px; box-shadow: 0 18px 42px rgba(17,35,53,.2); background: #fffefa; z-index: 14; }
.panel-menu button { display: grid; gap: 3px; width: 100%; text-align: left; border-color: transparent; }
.panel-menu button:hover, .panel-menu button.active { background: #e5ecf3; border-color: #8eaac6; color: #152a40; }
.panel-menu small { font-size: 11px; font-weight: 500; }
.project-overview-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.project-overview-grid > div, .history-entry { border: 1px solid #dce2e7; border-radius: 9px; padding: 13px; }
.project-overview-grid strong, .history-entry small { display: block; margin-top: 5px; }
.history-entry p { margin: 8px 0; }
@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 78px; z-index: 12; padding: 8px; }
  .sidebar-title, .side-secondary { display: none; }
  .side-nav { display: flex; overflow-x: auto; gap: 7px; }
  .side-nav button { flex: 0 0 auto; min-height: 52px; padding: 7px 10px; gap: 7px; }
  .side-nav .nav-icon { font-size: 19px; }
  .side-nav .nav-copy small { display: none; }
  .project-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 540px) {
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .actions { width: 100%; }
  .page-heading .actions button { flex: 1; }
  .customer-option { grid-template-columns: 1fr; }
  .customer-mode { display: grid; }
  .project-panel-nav { overflow-x: auto; }
  .panel-menu { min-width: min(300px, calc(100vw - 45px)); }
}

/* Build's app switcher and contract setup follow the portal's panel-card language. */
.app-launcher-toggle { display: grid; place-items: center; width: 46px; min-width: 46px; height: 46px; padding: 0; border-radius: 50%; background: #eef1f4; border-color: #d5dce4; }
.app-launcher-toggle svg { width: 23px; height: 23px; fill: #23405d; }
.app-launcher-toggle[aria-expanded="true"] { background: #d9e4f0; border-color: #81a3c5; }
.app-launcher { position: fixed; top: 85px; right: 24px; z-index: 35; width: min(390px,calc(100vw - 28px)); max-height: calc(100dvh - 100px); overflow-y: auto; background: #f7f8fa; border: 1px solid #cbd4de; border-radius: 25px; padding: 17px; box-shadow: 0 22px 48px rgba(17,35,53,.22); }
.app-launcher-head { display: grid; gap: 4px; padding: 3px 6px 15px; }
.app-launcher-head strong { font-size: 17px; }
.app-launcher-head small { color: #5f6e7c; }
.app-tile-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.app-tile { min-width: 0; min-height: 111px; display: grid; justify-items: center; align-content: center; gap: 5px; padding: 10px 5px; border: 1px solid transparent; border-radius: 17px; background: transparent; color: #162a3f; text-decoration: none; text-align: center; }
.app-tile:hover, .app-tile:focus-visible { border-color: #b6c8da; background: #e9f0f6; box-shadow: none; }
.app-tile > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: #0a3b6d; background: #d9e4f0; font-size: 24px; }
.app-tile > img { width: 42px; height: 42px; object-fit: contain; }
.app-tile strong { font-size: 12px; }
.app-tile small { font-size: 10px; color: #6a747e; font-weight: 500; }
.builder-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 0 0 18px; padding: 20px 24px; background: #fff; border: 1px solid #dce2e7; border-radius: 12px; }
.builder-heading h2 { margin: 5px 0; }
.builder-heading p { margin: 0; }
.builder-heading .contract-publication-status { margin-top: 8px; font-size: 13px; color: #465f77; }
.builder-heading .actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.builder-panel { background: #f4f7fa; border: 1px solid #b8c8d9; border-radius: 12px; padding: 20px; }
#contract-items { display: grid; gap: 20px; }
.builder-panel .section-head { border-top: 1px solid #d9e0e7; padding-top: 12px; }
.builder-panel .section-head p { margin: 3px 0 0; font-size: 13px; }
.builder-panel > label { margin-top: 12px; }
.contract-base-price-field { display: block; max-width: 320px; }
.contract-preview .preview-base-price { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #e0e4e9; border-bottom: 1px solid #e0e4e9; }
.contract-audience-heading { margin: 2px 0 14px; padding: 15px 18px; border: 1px solid #b8c8d9; border-radius: 10px; background: #e8f0f7; }
.contract-audience-heading p { margin: 5px 0 0; font-size: 13px; }
.internal-procedures-panel { margin-top: 20px; background: #edf3f8; border-color: #9db6cf; }
.procedure-tools { margin: 14px 0 18px; }
.procedure-tools .helper { margin: 8px 0 0; }
.procedure-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.procedure-toolbar label { flex: 1 1 250px; min-width: 220px; }
.procedure-toolbar select { width: 100%; }
.procedure-library-overlay { z-index: 125; }
.procedure-library-drawer { width: min(780px,calc(100vw - 24px)); }
.procedure-library-content { display: grid; align-content: start; gap: 16px; padding: 18px; }
.procedure-template-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,220px),1fr)); gap: 12px; margin-top: 16px; }
.procedure-template-card { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; min-height: 205px; padding: 15px; border: 1px solid #b8c8d9; border-radius: 10px; background: #fffefa; box-shadow: 0 3px 10px rgba(5,28,51,.04); }
.procedure-template-card .builder-card-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.procedure-template-card strong { color: #11273d; font-size: 14px; line-height: 1.25; }
.procedure-template-card small { color: #536779; font-size: 11px; font-weight: 600; }
.procedure-template-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: #53606d; font-size: 12px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.procedure-template-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 9px; }
.procedure-template-actions button { min-height: 38px; padding: 7px 11px; font-size: 12px; }
.procedure-template-actions .danger, .procedure-template-editor .danger { color: #9b352b; border-color: #debab5; background: #fff8f7; }
.procedure-template-editor { scroll-margin-top: 14px; }
.procedure-template-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.procedure-template-fields .procedure-wide { grid-column: 1 / -1; }
.procedure-template-editor .actions { margin-top: 14px; }
.builder-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(175px,1fr)); grid-auto-rows: 1fr; gap: 12px; align-items: stretch; }
.builder-items { display: contents; }
.builder-card, .builder-add-card { min-width: 0; min-height: 206px; border: 1px solid #b8c8d9; border-radius: 10px; background: #fffefa; box-shadow: 0 3px 10px rgba(5,28,51,.04); }
.builder-card:hover, .builder-card:focus-within, .builder-add-card:hover { border-color: #6f94ba; box-shadow: 0 9px 22px rgba(5,28,51,.12); }
.builder-card[open] { grid-column: span 2; }
.builder-card summary { list-style: none; cursor: pointer; height: 100%; min-height: 204px; padding: 15px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.builder-card[data-item-id] summary { position: relative; }
.builder-track-status { position: absolute; top: 15px; right: 12px; display: inline-flex; align-items: center; gap: 3px; max-width: calc(100% - 65px); padding: 4px 6px; border-radius: 5px; font-size: 10px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.builder-track-status svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.builder-track-status.is-tracked { color: #155f91; background: #e4f1fa; }
.builder-track-status.is-untracked { color: #5e6975; background: #edf0f2; }
.builder-card summary::-webkit-details-marker { display: none; }
.builder-card summary:focus-visible { outline: 3px solid #7fa4ca; outline-offset: 2px; }
.builder-card-icon, .builder-add-card > span { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; color: #176ea9; background: #e4ecf3; font-size: 20px; }
.builder-card summary small { font-size: 10px; color: #546474; }
.builder-card summary strong, .builder-add-card strong { font-size: 14px; line-height: 1.25; color: #11273d; }
.builder-card summary p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: #525e6c; font-size: 11px; line-height: 1.4; }
.builder-card summary em { background: #e7edf3; color: #234364; font-size: 10px; font-style: normal; padding: 3px 6px; border-radius: 4px; }
.builder-card-action { margin-top: auto; color: #126ba7; font-size: 11px; font-weight: 750; }
.builder-card-fields { display: grid; gap: 12px; padding: 15px; border-top: 1px solid #d9e0e8; }
.builder-card-fields .small-fields, .builder-card-fields .date-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.builder-card-fields > button { justify-self: start; }
.builder-add-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; padding: 15px; }
.builder-add-card small { font-size: 11px; color: #5e6a78; font-weight: 500; }
.billing-panel .section-head { align-items: flex-start; }
.billing-panel .section-head a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; border: 1px solid #8eaac6; border-radius: 8px; padding: 9px 12px; background: #fff; text-decoration: none; font-weight: 750; }
.billing-panel .section-head a:hover { background: #e8f2fb; }
.billing-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.billing-summary > div { display: grid; gap: 6px; padding: 14px; background: #fff; border: 1px solid #d0d9e2; border-radius: 9px; }
.billing-summary span { font-size: 12px; color: #606b76; }
.billing-summary strong { font-size: 19px; }
.billing-summary .billing-total { background: #e1eaf3; border-color: #82a6ca; }
#view-project > #project-finance-tab { margin: 18px; min-width: 0; }
#project-finance-tab { display: grid; gap: 16px; }
#project-finance-tab[hidden] { display: none; }
#project-finance-tab .builder-heading { margin: 0; }
#finance-invoices-link { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 12px; border: 1px solid #adc3d9; border-radius: 8px; background: white; font-weight: 700; text-decoration: none; white-space: nowrap; }
.finance-panel { min-width: 0; }
.finance-panel .section-head { margin-top: 14px; flex-wrap: wrap; }
.finance-milestones, .finance-billing-list, .finance-receipts { display: grid; gap: 10px; min-width: 0; }
.finance-milestone, .finance-billing-row, .finance-receipt { display: grid; align-items: end; gap: 10px; padding: 12px; border: 1px solid #c6d6e6; border-radius: 9px; background: #fff; min-width: 0; }
.finance-milestone { grid-template-columns: minmax(0,2fr) minmax(0,1.15fr) minmax(0,1fr) minmax(0,1.3fr) auto; }
.finance-billing-row { grid-template-columns: minmax(0,1.4fr) minmax(0,1.3fr) minmax(0,1.2fr) auto; align-items: center; }
.finance-milestone label, .finance-billing-row label { min-width: 0; }
.finance-milestone input, .finance-milestone select, .finance-billing-row input, .finance-billing-row select { width: 100%; min-width: 0; }
.finance-milestone > button { min-width: 42px; min-height: 42px; font-size: 22px; }
.finance-step-progress { grid-column: 1 / -1; color: #526477; }
.project-finance-glance { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin: 12px 0; padding: 10px 14px; border: 1px solid #c6d6e6; border-radius: 9px; background: #f3f8fc; }
.project-finance-glance span { display: inline-flex; gap: 6px; }
.project-finance-glance button { margin-left: auto; }
.finance-billing-row > div, .finance-receipt > div { display: grid; gap: 4px; min-width: 0; }
.finance-billing-row small, .finance-receipt small { color: #526477; overflow-wrap: anywhere; }
.finance-item-status { display: grid; gap: 8px; justify-self: end; max-width: 240px; min-width: 0; border-radius: 9px; background: #e8f1f9; padding: 8px 10px; font-size: 12px; font-weight: 700; white-space: normal; overflow-wrap: anywhere; }
.finance-receipt { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.finance-receipt.is-voided { opacity: .55; background: #f1f2f3; }
.finance-receipt-form { display: grid; gap: 10px; margin: 12px 0 20px; }
.finance-receipt-form > button { justify-self: start; }
@media (max-width: 1050px) { .finance-milestone, .finance-billing-row { grid-template-columns: repeat(2,minmax(0,1fr)); } .finance-billing-row > div { grid-column: 1 / -1; } .finance-item-status { justify-self: start; } }
@media (max-width: 600px) { #view-project > #project-finance-tab { margin: 12px; } .finance-milestone, .finance-billing-row { grid-template-columns: 1fr; } .finance-billing-row > div { grid-column: auto; } .finance-milestone > button { justify-self: start; } }
.builder-save-row { display: flex; justify-content: flex-end; padding: 5px 0 15px; }
.builder-save-row button { min-height: 48px; }
.contract-preview-panel { margin-top: 15px; }
.signature-request-panel form[hidden]{display:none}.company-agreement-review{margin:12px 0;border:1px solid #b9cde0;border-radius:8px;background:#fff}.company-agreement-review summary{padding:12px 14px;color:#145184;font-weight:700;cursor:pointer}.company-agreement-review .agreement-paper{max-width:none;padding:20px;box-shadow:none;border-top:1px solid #d7e2eb}
.contract-preview-panel .contract-preview{padding:0;overflow:hidden;background:#fff}.contract-preview-panel .agreement-paper{box-shadow:none;max-width:none}.contract-preview-panel .agreement-paper article{border-top:0}.contract-preview-panel .section-head{align-items:center;gap:12px;flex-wrap:wrap}.contract-preview-panel .actions{display:flex;gap:8px;flex-wrap:wrap}.signature-request-panel{margin-top:20px;border:1px solid #b9cde0;border-radius:10px;background:#f5f9fd;padding:18px}.signature-request-panel form{display:grid;gap:12px}.signature-request-panel input[readonly]{width:100%;margin:8px 0}.signature-request-panel a{display:inline-flex;align-items:center;border:1px solid #b9cde0;border-radius:7px;padding:10px 12px;background:#fff;color:#145184;font-weight:700;text-decoration:none}.signature-request-list{margin-top:20px}.signature-request-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:12px 0;border-top:1px solid #d7e2eb}.signature-request-row div{display:grid;gap:4px}.signature-request-row small{color:#536d80;overflow-wrap:anywhere}
@media (max-width: 800px) {
  .builder-heading { flex-direction: column; align-items: flex-start; }
  .billing-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #signed-in-as { display: none; }
}
@media (max-width: 540px) {
  .app-launcher { right: 14px; }
  .builder-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .builder-card[open] { grid-column: span 2; }
  .builder-panel { padding: 14px; }
  .billing-panel .section-head { flex-direction: column; }
  .billing-summary { grid-template-columns: 1fr 1fr; }
  .procedure-toolbar > button { flex: 1 1 100%; }
  .procedure-template-fields { grid-template-columns: 1fr; }
}

/* Use the full workspace width and place creation actions in the content grid. */
.view { max-width: none; }
.customer-layout { grid-template-columns: minmax(0, 1fr); }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; align-items: stretch; }
.entry-grid.has-empty { grid-template-columns: minmax(250px, .3fr) minmax(0, 1fr); }
.entry-grid-items { display: contents; }
.entry-add-card { min-width: 0; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 22px; border: 1px dashed #7796b6; border-radius: 10px; background: #f2f6fa; color: #142f4d; text-align: center; }
.entry-add-card .entry-add-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 9px; background: #144e80; color: white; }
.entry-add-card svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.entry-add-card strong { font-size: 17px; }
.entry-add-card small { max-width: 23ch; color: #576674; font-size: 12px; font-weight: 600; line-height: 1.4; }
.entry-add-card:hover, .entry-add-card:focus-visible { background: #e4ecf4; border-color: #155d99; box-shadow: 0 14px 30px rgba(5,28,51,.12); transform: translateY(-2px); }
.entry-grid .list-row, .entry-grid .project-card { min-height: 260px; align-content: start; gap: 11px; padding: 20px; }
.entry-empty { min-height: 260px; display: grid; align-content: center; gap: 8px; padding: 26px; border: 1px dashed #c3d1df; border-radius: 10px; background: #f8fafc; }
.entry-empty strong { font-size: 17px; color: #16314c; }
.entry-empty p { max-width: 55ch; margin: 0; font-size: 14px; }
.profile-project-grid { margin-top: 14px; }
#project-editor:not([hidden]) { margin-bottom: 18px; }
@media (min-width: 801px) { .content { padding-left: clamp(14px, 1.2vw, 24px); padding-right: clamp(14px, 1.2vw, 24px); } }
@media (min-width: 1121px) { .customer-layout.editor-open { grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); } }
@media (max-width: 600px) { .entry-grid.has-empty { grid-template-columns: 1fr; } .entry-empty { min-height: 150px; } .entry-add-card, .entry-grid .list-row, .entry-grid .project-card { min-height: 210px; } }

/* Customer actions sit beside search in a compact overflow menu. */
#view-customers .customer-layout .section-head { flex-wrap: wrap; }
.customer-toolbar { display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: auto; }
.customer-toolbar input { width: clamp(160px, 20vw, 260px); }
.customer-actions { position: relative; }
.customer-actions-toggle { display: grid; place-items: center; width: 46px; min-width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 10px; }
.customer-actions-toggle svg { width: 22px; height: 22px; fill: #155a93; }
.customer-actions-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 16; min-width: 254px; padding: 6px; border: 1px solid #c9d3dd; border-radius: 11px; background: #fffefa; box-shadow: 0 18px 42px rgba(17,35,53,.2); }
.customer-actions-menu button { width: 100%; min-height: 46px; border-color: transparent; background: transparent; text-align: left; }
.customer-actions-menu button:hover, .customer-actions-menu button:focus-visible { border-color: #8eaac6; background: #e8f2fb; }
@media (max-width: 600px) { .customer-toolbar { width: 100%; margin-left: 0; } .customer-toolbar input { flex: 1; width: auto; min-width: 0; max-width: none; } }

/* Build detail panels follow the business portal product setup drawer. */
.build-drawer-overlay { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: flex-end; background: rgba(16,25,35,.38); }
.build-drawer { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); width: min(1040px,calc(100vw - 24px)); height: 100dvh; margin-left: auto; background: #fff; border-left: 1px solid #cfd6dc; box-shadow: -18px 0 52px rgba(15,30,46,.2); animation: buildDrawerIn 180ms ease-out; }
.build-drawer[data-panel="customer-editor"], .build-drawer[data-panel="customer-connect-panel"], .build-drawer[data-panel="project-editor"], .build-drawer[data-panel="resource-editor"] { width: min(780px,calc(100vw - 24px)); }
.build-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 12px 18px; background: #fffefa; border-bottom: 1px solid #d6dde4; }
.build-drawer-head > div { display: grid; gap: 3px; min-width: 0; }
.build-drawer-head strong { overflow: hidden; color: #162a3e; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.build-drawer-head small { color: #5e6a76; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.build-drawer-head small:empty { display: none; }
.build-drawer-head button { flex: 0 0 auto; }
.build-drawer-content { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
body.build-drawer-open { overflow: hidden; }
body.build-drawer-open .notice:not([hidden]) { position: fixed; top: 86px; right: 20px; z-index: 130; max-width: min(480px,calc(100vw - 40px)); margin: 0; }
.build-drawer[data-panel="booking-editor"] { width: min(780px,calc(100vw - 24px)); }
.booking-editor-tabs { position: sticky; top: 0; z-index: 6; display: flex; gap: 8px; padding: 12px 18px; border-bottom: 1px solid #d0dce8; background: #fff; }
.booking-editor-tabs button { min-height: 42px; padding: 8px 16px; border-color: transparent; background: transparent; }
.booking-editor-tabs button[aria-selected="true"] { border-color: #8eb4d3; background: #e8f2fb; color: #124f82; }
.booking-preview-panel { padding: 18px; }
.booking-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.booking-preview-head > div:first-child { display: grid; gap: 3px; }
.booking-preview-head small { color: #5e6a76; }
.booking-device-switch { display: flex; gap: 5px; padding: 4px; border: 1px solid #c7d6e4; border-radius: 9px; background: #f4f8fb; }
.booking-device-switch button { min-height: 36px; border: 0; padding: 6px 11px; background: transparent; }
.booking-device-switch button[aria-pressed="true"] { background: #155a93; color: #fff; }
.booking-preview-stage { display: flex; justify-content: center; min-height: min(720px,calc(100dvh - 220px)); padding: 8px; border: 1px solid #d0dce8; border-radius: 12px; background: #e9eff5; }
.booking-preview-stage iframe { display: block; width: 100%; height: max(650px,calc(100dvh - 240px)); border: 1px solid #b9cad9; border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(18,44,76,.13); transition: max-width 180ms ease; }
.booking-preview-stage[data-device="phone"] iframe { max-width: 390px; }
.booking-builder { display: grid; gap: 16px; padding: 18px; }
.booking-builder > .helper { margin: 0; }
.booking-builder .section-head { margin: 12px 0 0; }
.booking-days { display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid #d0dce8; border-radius: 10px; padding: 12px; }
.booking-days legend { padding: 0 6px; font-weight: 700; }
.booking-days label { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 4px 8px; border: 1px solid #d0dce8; border-radius: 8px; }
.booking-days input { width: 18px; min-height: 18px; }
#booking-fields { display: grid; gap: 10px; }
.booking-question { border: 1px solid #d0dce8; border-radius: 10px; padding: 12px; background: #f8fbfe; }
.booking-question-actions, .booking-link-row, .booking-status-actions .actions { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.booking-question-actions { justify-content: space-between; margin-top: 8px; }
.booking-link-row label { flex: 1 1 320px; min-width: 0; }
.booking-status-actions { margin: 12px 0; padding: 12px; border: 1px solid #c7d9e9; border-radius: 9px; background: #f0f6fb; }
.booking-answers { border-top: 1px solid #c7d9e9; margin-top: 12px; }
.booking-answers p { margin: 8px 0; font-size: 13px; }
.appointment-requests { margin-bottom: 14px; border-color: #ccaa68; background: #fffcf5; }
.appointment-requests .section-head { margin-bottom: 10px; }
.appointment-requests .list-row { width: 100%; text-align: left; }
.calendar-entry.is-requested { background: #fff0d3; border: 1px dashed #bb8137; color: #6d490f; }
.drawer-panel { min-height: 100%; background: #fff; }
.build-drawer-content .drawer-panel.card { border: 0; border-radius: 0; box-shadow: none; }
.drawer-panel > .eyebrow, .drawer-panel > h2, .drawer-panel > #back-customers, .drawer-panel > #back-projects { display: none; }
.drawer-panel-nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; padding: 14px 18px; overflow-x: auto; overscroll-behavior-x: contain; border-bottom: 1px solid #d6dde4; background: #fff; scrollbar-width: thin; }
.drawer-panel-nav button { display: flex; flex: 1 0 135px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; min-height: 112px; padding: 12px; border: 1px solid #bccad8; border-radius: 13px; background: #fffefa; text-align: left; }
.drawer-panel-nav button[aria-pressed="true"] { border-color: #166eae; background: #e9eff5; box-shadow: inset 0 0 0 1px #166eae; }
.drawer-panel-nav button:hover { background: #f0f4f8; }
.drawer-panel-nav button svg { flex: 0 0 23px; width: 23px; height: 23px; fill: none; stroke: #155a93; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drawer-panel-nav button strong { font-size: 13px; line-height: 1.2; }
.drawer-panel-nav button small { color: #526477; font-size: 11px; font-weight: 500; line-height: 1.3; }
.drawer-form-panel { flex: 1; padding: 20px; }
.drawer-form-panel > header { margin-bottom: 18px; }
.drawer-form-panel > header h3 { margin: 0 0 4px; font-size: 20px; }
.drawer-form-panel > header p { margin: 0; font-size: 13px; }
.drawer-form-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.drawer-form-fields > label, .drawer-form-fields > .form-row, .drawer-form-fields > .customer-mode, .drawer-form-fields > #project-existing-customer, .drawer-form-fields > #project-new-customer { grid-column: 1 / -1; min-width: 0; }
#customer-editor, #project-editor { padding: 0; }
#customer-form, #project-form { display: flex; flex-direction: column; gap: 0; min-height: calc(100dvh - 76px); }
.drawer-form-actions { position: sticky; bottom: 0; z-index: 6; justify-content: flex-end; min-height: 76px; margin-top: auto; padding: 13px 20px; border-top: 1px solid #d6dde4; background: #f7f8fa; }
#customer-connect-panel, #resource-editor { padding: 20px; }
#customer-connect-panel #close-customer-connect { display: none; }
#view-customer .two-column { display: block; }
#view-customer .two-column > .card { border: 0; border-radius: 0; box-shadow: none; }
.drawer-inline-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
#view-customer .profile-project-grid { margin-top: 16px; }
#view-project { padding: 0; }
#view-project, #view-project > div, #view-project form, #view-project .builder-panel, #view-project .builder-grid { min-width: 0; }
#view-project .form-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
#view-project .builder-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,175px),1fr)); }
#view-project .builder-card, #view-project .builder-add-card, #view-project .builder-panel, #view-project .contract-preview { overflow-wrap: anywhere; }
#project-panel-nav { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px; padding: 10px 14px; overflow-x: auto; }
#project-panel-nav button { display: grid; grid-template-columns: 19px minmax(0,1fr); grid-template-rows: auto auto; align-content: center; align-items: center; gap: 2px 7px; flex: none; min-width: 0; width: 100%; min-height: 68px; height: auto; padding: 8px; border-radius: 9px; }
#project-panel-nav button svg { grid-row: 1 / 3; width: 19px; height: 19px; }
#project-panel-nav button strong, #project-panel-nav button small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#project-panel-nav button strong { font-size: 11px; }
#project-panel-nav button small { font-size: 9px; }
@media (max-width: 860px) { #project-panel-nav { grid-template-columns: repeat(6,minmax(130px,1fr)); } }
@media (max-width: 520px) { #view-project .form-row { grid-template-columns: minmax(0,1fr); } }
#view-project > #project-overview-tab, #view-project > #project-contract-tab, #view-project > #project-timeline-tab, #view-project > #project-library-tab, #view-project > #project-history-tab { margin: 18px; }
#view-project .builder-heading { padding: 16px 18px; }
#view-project .builder-save-row { position: sticky; bottom: 0; z-index: 4; margin: 0 -18px; padding: 12px 18px; border-top: 1px solid #d6dde4; background: #f7f8fa; }
.project-catalog .section-head { flex-wrap: wrap; }
.project-catalog .section-head input { width: min(280px,100%); }
.project-catalog-body { display: grid; gap: 10px; }
.project-catalog-body > .entry-add-card { display: flex; flex-direction: row; justify-content: flex-start; width: 100%; min-height: 88px; padding: 13px 18px; text-align: left; }
.project-catalog-body > .entry-add-card .entry-add-icon { width: 48px; height: 48px; }
.project-catalog-body > .entry-add-card small { max-width: none; margin-left: auto; }
.project-catalog-list { display: grid; gap: 9px; }
.project-catalog-row { display: grid; grid-template-columns: 54px minmax(0,1fr) auto; align-items: center; gap: 14px; width: 100%; min-height: 82px; padding: 11px 15px; border: 1px solid #cbd4de; border-left: 4px solid #4d79a6; border-radius: 10px; background: #fffefa; text-align: left; }
.project-catalog-row { padding-left: calc(15px + var(--project-depth, 0) * 18px); }
.project-catalog-row:hover, .project-catalog-row:focus-visible { border-color: #678aae; background: #f5f8fb; }
.project-row-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 9px; background: #e7edf3; color: #155a93; font-size: 26px; }
.project-row-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.project-row-main, .project-row-meta { display: grid; gap: 5px; min-width: 0; }
.project-row-main strong { font-size: 16px; }
.project-row-main small { overflow: hidden; color: #616c77; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.project-row-meta { text-align: right; }
.project-row-meta strong { color: #163657; font-size: 12px; }
.project-row-meta small { color: #616c77; font-size: 11px; }
.project-catalog-list .entry-empty { min-height: 150px; }
.project-start-steps { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.project-start-steps li { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 8px 10px; border: 1px solid #d2deea; border-radius: 9px; background: #fff; color: #284869; font-size: 12px; }
.project-start-steps b { display: grid; place-items: center; flex: 0 0 23px; width: 23px; height: 23px; border-radius: 7px; background: #dceafb; color: #155a93; }
.resource-layout { grid-template-columns: minmax(0,1fr); }
.resource-grid { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 14px; }
.resource-grid > .entry-add-card { min-height: 220px; }
.resource-list-items { display: grid; align-content: start; gap: 9px; }
.resource-sections { display: grid; gap: 18px; }
.resource-sections > .card { min-width: 0; }
.resource-sections .section-head { flex-wrap: wrap; gap: 12px; }
.resource-sections .section-head p { margin: 5px 0 0; max-width: 75ch; }
.resource-sections .section-head a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid #b9c6d3; border-radius: 8px; background: #fff; font-weight: 700; text-decoration: none; }
.resource-partner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.resource-partner-actions button { min-height: 44px; }
.manual-partner-row .access-status { margin-left: auto; }
.resource-team-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; list-style: none; }
.resource-team-panel > summary::-webkit-details-marker { display: none; }
.resource-team-panel > summary span { display: grid; gap: 3px; min-width: 0; }
.resource-team-panel > summary strong { font-size: 19px; line-height: 1.2; }
.resource-team-panel > summary small { color: #606b76; font-size: 12px; line-height: 1.3; }
.resource-team-panel > summary svg { flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.resource-team-panel[open] > summary svg { transform: rotate(180deg); }
.resource-team-panel > summary:focus-visible { outline: 2px solid #1765a3; outline-offset: 5px; border-radius: 4px; }
.resource-team-panel > .helper { margin: 11px 0; max-width: 75ch; }
.resource-control-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 74px; padding: 12px 16px; border: 1px solid #d4dbe2; border-radius: 10px; background: #fffefa; }
.resource-control-row > div { display: grid; gap: 4px; min-width: min(220px,100%); margin-right: auto; }
.resource-control-row strong { font-size: 15px; }
.resource-control-row small { color: #606b76; font-size: 12px; }
.resource-control-row > label { display: grid; gap: 3px; font-size: 11px; font-weight: 700; }
.resource-control-row select { min-height: 44px; min-width: 155px; }
.resource-control-row button { min-height: 44px; }
.access-status { padding: 7px 10px; border-radius: 999px; background: #f1f2f4; color: #535f6b; font-size: 12px; font-weight: 700; white-space: nowrap; }
.access-status.is-on { background: #e3ecf5; color: #103962; }
.team-permission-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.team-permission-badge { padding: 3px 7px; border-radius: 999px; background: #e9f2fa; color: #174c79; font-size: 11px; font-weight: 700; }
.team-permission-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.team-permission-grid label { display: flex; align-items: flex-start; gap: 10px; padding: 15px; border: 1px solid #c9d9e9; border-radius: 10px; cursor: pointer; }
.team-permission-grid input { flex: 0 0 auto; margin-top: 3px; width: 18px; height: 18px; }
.team-permission-grid span { display: grid; gap: 4px; }
.team-permission-grid small { color: #596b7c; line-height: 1.4; }
@media (max-width: 600px) { .team-permission-grid { grid-template-columns: 1fr; } }
.build-viewer #show-customer-form, .build-viewer #customer-actions, .build-viewer .customer-actions, .build-viewer #show-project-form, .build-viewer #show-resource-form, .build-viewer #add-manual-partner, .build-viewer #edit-profile-customer, .build-viewer [data-disconnect-customer], .build-viewer .builder-save-row, .build-viewer .builder-add-card { display: none; }
.schedule-toolbar { flex-wrap: wrap; padding: 0 4px; }
@keyframes buildDrawerIn { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: translateX(0); } }
@media (max-width: 700px) {
  .build-drawer, .build-drawer[data-panel] { width: 100%; }
  .drawer-panel-nav { gap: 7px; padding: 10px 12px; }
  .drawer-panel-nav button { flex: 0 0 118px; min-height: 104px; padding: 10px; }
  .drawer-form-panel { padding: 16px; }
  .drawer-form-fields { grid-template-columns: 1fr; }
  .project-catalog-row { grid-template-columns: 46px minmax(0,1fr); }
  .project-row-icon { width: 44px; height: 44px; }
  .project-row-meta { grid-column: 2; text-align: left; }
  .project-catalog-body > .entry-add-card small { display: none; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-grid > .entry-add-card { min-height: 150px; }
}
@media (prefers-reduced-motion: reduce) { .build-drawer { animation: none; } }

/* Keep account discovery behind a simple branded loading state. */
body:has(#auth-shell:not([hidden]) > #loading:not([hidden])) > .site-header { display: none; }
#auth-shell:has(> #loading:not([hidden])) { max-width: none; margin: 0; padding: 0; }
.build-loading { min-height: 100dvh; padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; }
.build-loading-brand { display: flex; align-items: center; gap: 15px; color: #142f4d; text-align: left; }
.build-loading-brand img { width: 84px; height: 84px; object-fit: contain; }
.build-loading-brand > div { display: grid; line-height: 1.03; }
.build-loading-brand strong { font-size: clamp(29px, 6vw, 42px); letter-spacing: -.04em; }
.build-loading-word { display: inline-flex; width: max-content; padding-top: 5px; color: #155d99; font-size: clamp(24px, 5vw, 34px); font-weight: 800; letter-spacing: -.025em; }
.build-loading-word span { display: inline-block; animation: build-loading-letter 1.35s ease-in-out infinite; animation-delay: calc(var(--letter) * 110ms); }
.build-loading p { margin: 0; color: #50657b; font-size: 14px; }
@keyframes build-loading-letter { 0%, 55%, 100% { transform: translateY(0); color: #155d99; } 25% { transform: translateY(-7px); color: #4274a6; } }
@media (prefers-reduced-motion: reduce) { .build-loading-word span { animation: none; } }

.schedule-toolbar .actions { align-items: center; flex-wrap: wrap; }
.schedule-add-button { display: inline-flex; align-items: center; gap: 8px; background: #155d99; border-color: #155d99; color: #fff; }
.schedule-add-button:hover { background: #144e80; border-color: #144e80; }
.schedule-add-button span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: rgba(255,255,255,.18); font-size: 21px; line-height: 1; }
.calendar-entry { width: 100%; min-height: 24px; border: 0; padding: 3px 5px; text-align: left; font-weight: 600; box-shadow: none; }
.calendar-entry.is-manual { background: #dceafb; color: #103b66; }
.calendar-entry:hover { background: #bdd6f0; box-shadow: none; }
.schedule-item-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #dce2e7; padding: 8px 0; }
.schedule-item-row:last-of-type { border-bottom: 0; }
.schedule-item-main { min-width: 0; flex: 1; display: grid; gap: 5px; text-align: left; border: 0; background: transparent; padding: 10px 12px; box-shadow: none; }
.schedule-item-main:hover { background: #eef5fc; box-shadow: none; }
.schedule-item-main small { color: #5a6978; font-size: 12px; font-weight: 500; }
.schedule-google-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border: 1px solid #b6c8da; border-radius: 9px; text-decoration: none; white-space: nowrap; font-size: 12px; font-weight: 700; }
.schedule-google-link:hover { background: #eef5fc; }
.schedule-sync-note { margin: 12px 0 0; color: #5a6978; font-size: 12px; }
.schedule-filter-note { margin: 4px 6px 0; color: #62778a; font-size: 11px; }
.schedule-upcoming-group { border: 1px solid #d7e3ee; border-radius: 10px; overflow: hidden; }
.schedule-upcoming-group h3 { margin: 0; padding: 11px 14px; border-bottom: 1px solid #d7e3ee; background: #f2f7fc; color: #17476f; font-size: 14px; }
.schedule-upcoming-group .schedule-item-row { padding: 4px 8px; }
.schedule-upcoming-group .schedule-item-row:last-child { border-bottom: 0; }
#view-schedule.is-list-view .schedule-list-panel { max-width: none; }
.build-viewer #show-schedule-form, .build-viewer #save-schedule-item, .build-viewer #delete-schedule-item { display: none; }
@media (max-width: 640px) { .schedule-item-row { align-items: stretch; flex-direction: column; gap: 0; } .schedule-google-link { margin: 0 12px 8px; align-self: flex-start; } }

/* Account menu uses the portal's profile switcher pattern. */
.account-control { position: relative; }
.header-right .account-toggle { display: flex; align-items: center; justify-content: center; width: 48px; min-width: 48px; height: 48px; padding: 4px; border: 1px solid #b6c8da; border-radius: 13px; background: #fff; color: #173a5c; }
.account-toggle img { width: 32px; height: 32px; border-radius: 7px; object-fit: contain; }
.header-right .account-toggle:hover, .header-right .account-toggle[aria-expanded="true"] { border-color: #6f9cc8; background: #eef5fc; }
.account-menu { position: absolute; top: calc(100% + 11px); right: 0; z-index: 40; width: min(350px, calc(100vw - 24px)); max-height: calc(100dvh - 100px); overflow-y: auto; padding: 14px; border: 1px solid #cbd7e3; border-radius: 13px; background: #fff; box-shadow: 0 18px 45px rgba(20,47,77,.2); color: #173a5c; }
.account-menu-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.account-menu-head > div { display: grid; gap: 3px; }
.account-menu-head strong { font-size: 16px; }
.account-menu-head small, .account-current small { color: #627181; font-size: 11px; }
.account-menu #signed-in-as { display: block; max-width: 250px; overflow-wrap: anywhere; }
.header-right .account-menu-head button { width: 38px; height: 38px; min-height: 38px; padding: 0; border-color: #cad7e4; border-radius: 9px; background: #f6f9fc; color: #173a5c; font-size: 23px; }
.account-current { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid #c8d9ea; border-radius: 10px; background: #eef5fc; }
.account-current img { width: 38px; height: 38px; padding: 3px; border-radius: 8px; background: #fff; object-fit: contain; }
.account-current span { display: grid; gap: 3px; min-width: 0; }
.account-current strong { font-size: 13px; }
.account-menu-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e3e9ef; }
.account-menu-label { display: block; margin-bottom: 8px; color: #5a6978; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
#account-business-list { display: grid; gap: 6px; }
.header-right .account-business-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 9px; border: 1px solid transparent; border-radius: 9px; background: #fff; color: #173a5c; text-align: left; }
.header-right .account-business-row:hover { border-color: #b7cde2; background: #f3f8fd; }
.header-right .account-business-row.is-current { border-color: #85aed5; background: #e8f2fb; cursor: default; opacity: 1; }
.account-business-mark { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 8px; background: #dceafb; color: #155a93; font-weight: 800; }
.account-business-row span:nth-child(2) { display: grid; flex: 1; min-width: 0; gap: 2px; }
.account-business-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-business-row small, .account-business-row em { color: #5e7183; font-size: 11px; font-style: normal; }
.account-menu-empty { margin: 3px 0 6px; color: #627181; font-size: 12px; }
.account-menu-link { display: flex; align-items: center; min-height: 44px; margin-top: 10px; padding: 7px 9px; border-top: 1px solid #e3e9ef; font-size: 12px; font-weight: 700; text-decoration: none; }
.header-right .account-sign-out { width: 100%; min-height: 44px; border: 0; background: transparent; color: #173a5c; text-align: left; }
.header-right .account-sign-out:hover, .account-menu-link:hover { background: #f3f8fd; }
@media (max-width: 600px) { .account-menu { right: -8px; } .header-right .account-toggle { width: 48px; min-width: 48px; } }

.notice:not([hidden]) { display: flex; align-items: flex-start; gap: 12px; }
#notice-message { flex: 1; min-width: 0; align-self: center; }
.notice-dismiss { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; margin: -7px -11px -7px 0; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: inherit; font-size: 23px; font-weight: 500; line-height: 1; }
.notice-dismiss:hover, .notice-dismiss:focus-visible { border-color: currentColor; background: rgba(255,255,255,.45); box-shadow: none; }

/* Project overview planning and personal alerts. */
.project-overview-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.project-overview-section { min-width: 0; padding: 19px; border: 1px solid #d4e0ec; border-radius: 11px; background: #f9fbfe; }
.project-overview-section h3 { margin: 0 0 15px; font-size: 17px; }
.project-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.project-section-heading small, .project-detail-note, .project-empty-note { color: #607184; font-size: 12px; }
.project-detail-note { margin: 10px 0; }
.project-empty-note { margin: 0; padding: 15px; border: 1px dashed #c7d9ea; border-radius: 8px; background: #fff; }
.project-checklist { display: grid; gap: 7px; }
.project-checklist-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 10px; border: 1px solid #d7e3ef; border-radius: 8px; background: #fff; text-align: left; font-size: 13px; }
.project-checklist-row:hover, .project-checklist-row:focus-visible { background: #ecf5fc; border-color: #8db5db; }
.project-check { display: grid; place-items: center; flex: 0 0 23px; width: 23px; height: 23px; border: 1px solid #93b2ce; border-radius: 6px; color: #fff; }
.project-check.is-done { background: #155a93; border-color: #155a93; }
.project-check-status { margin-left: auto; color: #4b6b89; white-space: nowrap; font-size: 11px; }
.project-check-status svg, .project-check svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.project-checklist-row.is-complete { color: #6d7883; background: #f6f8fa; border-color: #dce2e8; }
.project-checklist-row.is-complete .project-check { background: #8b9aaa; border-color: #8b9aaa; }
.completed-group { min-width: 0; margin-top: 13px; border: 1px solid #d9e1e8; border-radius: 9px; background: #f7f9fb; }
.completed-group summary { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 9px 12px; color: #536579; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.completed-group summary::-webkit-details-marker { display: none; }
.completed-group summary svg { flex: 0 0 17px; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.completed-group summary svg:last-child { margin-left: auto; transition: transform .18s ease; }
.completed-group[open] summary svg:last-child { transform: rotate(180deg); }
.completed-group summary small { margin-left: 3px; font-size: 11px; color: #718092; }
.completed-group summary:hover, .completed-group summary:focus-visible { background: #eaf1f7; outline-color: #327db9; }
.completed-group-list { display: grid; gap: 7px; padding: 0 10px 10px; }
.completed-task-row { position: relative; padding-right: 66px; color: #647181; background: #f7f8fa; border-color: #dce2e8; }
.completed-task-row strong, .completed-task-row small { color: #647181; }
.completed-gantt-row { color: #798594; background: #f5f7f9; }
.completed-gantt-row .day.done { background: #aab5c0; }
.calendar-entry.is-complete { background: #e3e7eb; color: #677583; }
.schedule-item-row.is-complete { color: #667687; background: #f7f9fb; }
.schedule-item-row.is-complete strong, .schedule-item-row.is-complete small { color: #667687; }
.task-complete-control { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.task-complete-control input { position: absolute; inset: 0; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.task-complete-control span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #8eaac5; border-radius: 6px; color: transparent; background: #fff; pointer-events: none; }
.task-complete-control input:checked + span { color: #fff; background: #8798a9; border-color: #8798a9; }
.task-complete-control input:focus-visible + span { outline: 2px solid #2678b6; outline-offset: 3px; }
.task-complete-control input:disabled + span { opacity: .55; }
.task-complete-control svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#project-task-list > .list-row { position: relative; padding-right: 66px; }
#overview-completed .completed-group-list .list-row { margin: 0; }
.project-plan-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px; }
.project-plan-form label { font-size: 12px; }
.project-plan-form input { min-height: 44px; }
.project-plan-form button { grid-column: 1 / -1; justify-self: start; min-height: 44px; }
.project-days-card { display: grid; align-content: center; gap: 4px; min-height: 68px; padding: 10px 13px; border: 1px solid #c7d9ea; border-radius: 9px; background: #fff; }
.project-days-card strong { color: #173a5c; font-size: 19px; line-height: 1.2; }
.project-days-card small { color: #607184; font-size: 11px; }
.project-forecast { margin-top: 16px; padding: 13px; border: 1px solid #c7d9ea; border-radius: 9px; background: #fff; }
.project-forecast strong { display: block; margin-top: 5px; color: #173a5c; font-size: 18px; }
.project-forecast p { margin: 7px 0 0; font-size: 12px; }
.project-date-risk { color: #a34125 !important; font-weight: 700; }
.project-overview-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.project-overview-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 9px 11px; border: 1px solid #d7e3ef; border-radius: 8px; background: #fff; font-size: 12px; }
.project-overview-list li > span:first-child { min-width: 0; }
.project-overview-list strong, .project-overview-list small { display: block; }
.project-overview-list small { margin-top: 2px; color: #657789; }
.project-overview-list time { flex: 0 0 auto; color: #315777; text-align: right; font-size: 11px; }
.project-alert button { flex: 0 0 auto; min-height: 44px; padding: 7px 12px; font-size: 12px; }
.icon-action { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; }
.icon-action svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .project-overview-sections { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .project-plan-form { grid-template-columns: 1fr; } .project-overview-section { padding: 14px; } .project-overview-list li { align-items: flex-start; flex-direction: column; } }

/* Contract cards stay compact while their editor opens like the portal's contract section panel. */
.builder-card[open] { grid-column: auto !important; }
.contract-card-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(20, 35, 48, .42); }
.builder-card .builder-card-fields { display: none; }
.builder-card[open] .builder-card-fields { position: fixed; top: 0; right: 0; z-index: 21; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0; width: min(640px, calc(100vw - 12px)); height: 100dvh; padding: 0; border: 1px solid #c6d3df; border-radius: 0; background: #fff; box-shadow: -18px 0 48px rgba(13, 31, 47, .22); }
.contract-card-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 88px; padding: 16px 20px; border-bottom: 1px solid #d9e3ed; background: #fffefa; }
.contract-card-editor-head small { color: #516b82; font-size: 11px; }
.contract-card-editor-head h3 { margin: 4px 0 0; font-size: 19px; }
.contract-card-editor-head button { flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; font-size: 26px; font-weight: 500; }
.contract-card-editor-body { display: grid; align-content: start; gap: 17px; min-height: 0; padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
.contract-card-editor-body > label { min-width: 0; }
.contract-card-editor-body textarea { min-height: 130px; }
.contract-card-editor-body .check-line { min-height: 48px; }
.contract-card-editor-body > button { justify-self: start; min-height: 44px; }
.contract-card-editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 72px; padding: 12px 20px; border-top: 1px solid #d9e3ed; background: #f7fafc; }
.contract-card-editor-foot small { color: #5a6c7c; font-size: 11px; line-height: 1.4; }
.contract-card-editor-foot button { flex: 0 0 auto; min-height: 44px; }
@media (max-width: 560px) { .contract-card-editor-body .small-fields, .contract-card-editor-body .date-fields { grid-template-columns: 1fr; } .contract-card-editor-foot { align-items: flex-start; flex-direction: column; } }

/* Chrome installation is offered without crowding the Build navigation. */
.header-right .install-build { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 9px 12px; background: #e8f2fb; border-color: #a9c4df; color: #153d65; }
.header-right .install-build[hidden] { display: none; }
.install-build svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.install-build img { width: 24px; height: 24px; object-fit: contain; }
.install-build:hover, .install-build:focus-visible { background: #d9eaf9; border-color: #6f9cc8; }
.install-help { width: min(430px,calc(100vw - 32px)); border: 1px solid #b7cce0; border-radius: 14px; padding: 24px; color: #173a5c; box-shadow: 0 20px 60px #162a3e44; }
.install-help::backdrop { background: #0f2438a8; }
.install-help h2 { margin: 0 0 10px; }
.install-help p { margin: 0 0 20px; }
.install-help .actions { justify-content: flex-end; }
@media (max-width: 540px) { .header-right { gap: 8px; } .header-right .install-build { width: 46px; min-width: 46px; padding: 0; } .install-build .install-label { display: none; } }
@media (max-width: 380px) { .site-header { gap: 6px; padding-inline: 8px; } .brand img { width: 32px; height: 32px; } .brand strong { font-size: 17px; } .brand small { font-size: 10px; } .header-right { gap: 5px; } .header-right .install-build, .app-launcher-toggle, .header-right .account-toggle { width: 42px; min-width: 42px; height: 42px; } }

/* Compact action controls; large cards remain touch-friendly choices. */
button { padding: 8px 12px; border-radius: 8px; font-size: 13px; }
button:not(:disabled):hover { box-shadow: 0 2px 8px rgba(12,45,78,.09); }
button:not(:disabled):active { transform: translateY(1px) scale(.99); }
.compact-action { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 7px 10px; border-color: #c8d8e7; background: #f8fbfe; color: #164c78; line-height: 1.2; white-space: nowrap; }
.compact-action svg, .compact-icon-button svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.compact-action:hover { background: #eaf3fb; border-color: #8aafd0; }
.compact-action.primary { background: #155d99; border-color: #155d99; color: #fff; }
.compact-action.primary:hover { background: #144e80; }
.project-quick-actions { gap: 7px; margin: 12px 0 16px; }
.project-quick-actions button[aria-pressed="true"] { background: #e6f1fb; border-color: #4282bd; color: #103d65; box-shadow: inset 0 0 0 1px #4282bd; }
.project-quick-preview { margin: 0 0 20px; padding: 18px; border: 1px solid #cbd9e7; border-radius: 12px; background: #f8fbfe; }
.project-quick-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.project-quick-heading h3 { margin: 2px 0 0; }
.project-quick-caption { margin: 8px 0 0; color: #53687a; font-size: 12px; }
.project-quick-document { max-height: 420px; overflow: auto; padding: 18px; border: 1px solid #d6e0e9; border-radius: 9px; background: #fff; }
.project-quick-document article { padding: 11px 0; border-top: 1px solid #e2e9f0; }
.project-quick-document article > strong, .project-quick-document article > small { display: block; }
.project-quick-document article p { margin: 5px 0; white-space: pre-wrap; }
.project-quick-document .preview-total { margin-bottom: 0; font-weight: 700; }
.project-quick-axis { display: flex; justify-content: space-between; margin: 0 0 6px; color: #53687a; font-size: 12px; }
.project-quick-timeline { border: 1px solid #d6e0e9; border-radius: 9px; background: #fff; overflow: hidden; }
.project-quick-timeline-row { display: grid; grid-template-columns: minmax(150px, 38%) minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 12px; border-bottom: 1px solid #e5ebf1; }
.project-quick-timeline-row:last-child { border-bottom: 0; }
.project-quick-timeline-row > span { min-width: 0; }
.project-quick-timeline-row strong, .project-quick-timeline-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-quick-timeline-row small { color: #53687a; }
.project-quick-timeline-track { position: relative; height: 22px; border-radius: 5px; background: repeating-linear-gradient(90deg, #edf3f8 0, #edf3f8 1px, #f7f9fc 1px, #f7f9fc 25%); }
.project-quick-timeline-bar { position: absolute; top: 5px; height: 12px; border-radius: 6px; background: #397fb7; min-width: 5px; }
.project-quick-target { position: absolute; top: 0; bottom: 0; width: 2px; background: #b17425; }
.project-quick-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px; }
.project-quick-stats > div { padding: 11px; border: 1px solid #d6e0e9; border-radius: 9px; background: #fff; }
.project-quick-stats small, .project-quick-stats strong { display: block; }
.project-quick-stats small { color: #53687a; }
.project-quick-meters { display: grid; gap: 12px; }
.project-quick-meter-row > div:first-child { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.project-quick-meter-row small { color: #53687a; }
.project-quick-meter-row b { margin-left: auto; }
.project-quick-meter { height: 9px; overflow: hidden; border-radius: 8px; background: #dce7f0; }
.project-quick-meter > span { display: block; height: 100%; border-radius: inherit; background: #397fb7; }
.project-quick-breakdown { margin-top: 17px; }
.project-quick-breakdown h4 { margin: 0 0 6px; }
.project-quick-breakdown > div { display: flex; flex-wrap: wrap; gap: 5px 12px; padding: 7px 0; border-top: 1px solid #dce7f0; }
.project-quick-breakdown > div strong { margin-left: auto; }
.project-quick-breakdown > div small { color: #53687a; }
@media (max-width: 720px) { .project-quick-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .project-quick-timeline-row { grid-template-columns: minmax(0, 1fr); gap: 5px; } }
.project-plan-form .compact-action { min-height: 40px; padding: 7px 10px; }
.build-drawer-head button.compact-icon-button { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; padding: 0; }
.schedule-toolbar .compact-icon-button { display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; }
.schedule-add-button.compact-action { background: #155d99; border-color: #155d99; color: #fff; }
.schedule-add-button.compact-action:hover { background: #144e80; }
.schedule-add-button.compact-action span { display: inline; width: auto; height: auto; border: 0; border-radius: 0; background: transparent; font-size: inherit; line-height: inherit; }
.drawer-panel-nav { gap: 7px; padding: 9px 18px; }
.drawer-panel-nav button { display: grid; grid-template-columns: 20px minmax(0,1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 2px; align-content: center; flex: 1 0 145px; min-height: 72px; padding: 8px 10px; border-radius: 9px; }
.drawer-panel-nav button svg { grid-row: 1 / span 2; width: 20px; height: 20px; align-self: center; }
.drawer-panel-nav button strong { grid-column: 2; font-size: 12px; }
.drawer-panel-nav button small { grid-column: 2; font-size: 10px; line-height: 1.15; }
.builder-add-card > span svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.builder-save-row button.compact-action { min-height: 44px; }
@media (max-width: 720px) {
  .compact-action, .project-plan-form .compact-action, .build-drawer-head button.compact-icon-button, .schedule-toolbar .compact-icon-button { min-height: 44px; }
  .build-drawer-head button.compact-icon-button, .schedule-toolbar .compact-icon-button { width: 44px; height: 44px; flex-basis: 44px; }
  .drawer-panel-nav { padding: 8px 12px; }
  .drawer-panel-nav button { flex: 0 0 142px; min-height: 68px; padding: 8px; }
}

/* Schedule views and project comparison. */
.schedule-toolbar { display: flex; align-items: center; justify-content: flex-start; flex-wrap: nowrap; gap: 10px; min-height: 54px; margin-bottom: 16px; }
.schedule-toolbar h2 { flex: 0 0 auto; margin-right: 8px; white-space: nowrap; }
.schedule-period-controls { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 5px; }
.schedule-period-controls svg, .schedule-extra-tools svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.schedule-period-controls #previous-month, .schedule-period-controls #next-month { display: grid; place-items: center; width: 40px; min-height: 40px; padding: 0; }
.schedule-period-controls #schedule-today { min-height: 40px; margin-left: 3px; padding: 7px 10px; font-size: 12px; }
#calendar-month { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 130px; max-width: 230px; min-height: 40px; overflow: hidden; padding: 7px 8px; text-align: center; white-space: nowrap; font-size: 12px; }
#calendar-month-label { overflow: hidden; text-overflow: ellipsis; }
#calendar-month svg { flex: none; width: 14px; height: 14px; }
.schedule-extra-tools, .schedule-extra-menu { display: contents; }
#schedule-extra-toggle { display: none; }

/* Mobile drawers use the same compact, sticky navigation rhythm as the home rail. */
@media (max-width: 600px) {
  .build-drawer .drawer-panel-nav { gap: 6px; padding: 6px 7px; scrollbar-width: thin; transition: padding 160ms ease; }
  .build-drawer .drawer-panel-nav button { min-height: 58px; padding: 6px 9px; transition: min-height 160ms ease, padding 160ms ease, background-color 150ms ease; }
  .build-drawer .drawer-panel-nav button small { display: none; }
  .build-drawer.is-content-scrolled .drawer-panel-nav { padding-top: 3px; padding-bottom: 3px; }
  .build-drawer.is-content-scrolled .drawer-panel-nav button { min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
  #project-panel-nav { display: flex; overflow-x: auto; }
  #project-panel-nav button { flex: 0 0 132px; width: 132px; min-width: 132px; min-height: 58px; grid-template-columns: 19px minmax(0,1fr); grid-template-rows: auto; gap: 7px; }
  #project-panel-nav button svg { grid-row: 1; width: 19px; height: 19px; }
  #project-panel-nav button strong { grid-column: 2; font-size: 11px; }
  .build-drawer.is-content-scrolled #project-panel-nav button { min-height: 44px; }
  #view-project > #project-overview-tab,
  #view-project > #project-contract-tab,
  #view-project > #project-timeline-tab,
  #view-project > #project-library-tab,
  #view-project > #project-finance-tab,
  #view-project > #project-history-tab { width: auto; min-width: 0; margin: 7px 6px; }
  #view-project > #project-overview-tab { padding: 12px 9px; }
  #view-project > #project-overview-tab > h2 { margin: 2px 3px 10px; }
  #view-project .builder-panel { padding: 11px 9px; }
  #view-project .builder-heading { padding: 11px 9px; }
  #view-project .builder-save-row { margin: 0 -6px; padding: 8px 10px; }
  .project-overview-grid { gap: 7px; }
  .project-overview-grid > div { min-width: 0; padding: 9px; overflow-wrap: anywhere; }
  .project-overview-grid .eyebrow { font-size: 10px; }
  .project-overview-sections { gap: 10px; margin-top: 14px; }
  .project-overview-section { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .build-drawer .drawer-panel-nav, .build-drawer .drawer-panel-nav button { transition: none; }
}
.schedule-extra-menu #open-booking-page { display: inline-flex; align-items: center; gap: 7px; }
.schedule-extra-menu #open-booking-page svg { width: 18px; height: 18px; }
.schedule-extra-menu .schedule-print-button { width: 44px; min-height: 44px; border-color: #b9cce0; background: #fff; color: #155d99; }
.schedule-extra-menu .schedule-print-button:hover { background: #eaf3fb; border-color: #75a5d0; }
.build-drawer[data-panel="schedule-date-picker"] { width: min(460px,calc(100vw - 24px)); }
.schedule-date-picker { display: grid; align-content: start; gap: 20px; padding: 22px; }
.schedule-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.schedule-picker-heading h2 { margin: 0; font-size: 20px; }
.schedule-year-field { min-width: 0; }
.schedule-year-label { display: block; margin-bottom: 6px; color: #617688; font-size: 12px; }
.schedule-year-wheel { position: relative; display: flex; align-items: center; width: 100%; min-width: 0; height: 70px; padding-inline: calc(50% - 44px); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; }
.schedule-year-wheel::-webkit-scrollbar { display: none; }
.schedule-year-wheel { mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.schedule-year-wheel button { flex: 0 0 88px; width: 88px; min-height: 56px; padding: 6px 0; border: 0; background: transparent; box-shadow: none; color: #929eaa; font-size: 18px; font-weight: 500; scroll-snap-align: center; transform: none; user-select: none; }
.schedule-year-wheel button:hover { background: #edf3f8; box-shadow: none; }
.schedule-year-wheel button[aria-pressed="true"] { color: #155d99; background: #e8f2fc; font-size: 28px; font-weight: 700; border-radius: 10px; }
.schedule-year-wheel button:focus-visible { outline: 2px solid #2781c5; outline-offset: -3px; }
.schedule-year-wheel.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.schedule-picker-months { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.schedule-picker-months button { min-height: 52px; padding: 8px; }
.schedule-picker-months button[aria-pressed="true"] { background: #e6f1fb; border-color: #155d99; color: #0e4c7b; }
.schedule-view-switcher { display: flex; flex: 0 0 auto; flex-wrap: nowrap; align-items: center; gap: 2px; padding: 3px; border: 1px solid #cbd9e6; border-radius: 10px; background: #eaf1f8; }
.schedule-view-switcher button { min-height: 40px; padding: 7px 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #395874; font-size: 12px; white-space: nowrap; }
.schedule-view-switcher button:hover { background: #fff; border-color: #c4d5e6; }
.schedule-view-switcher button[aria-pressed="true"] { background: #155d99; border-color: #155d99; color: #fff; box-shadow: 0 2px 5px #173a5c20; }
.schedule-month-ranges { position: relative; }
#schedule-month-toggle { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; }
.schedule-month-menu { position: absolute; top: calc(100% + 7px); left: 0; z-index: 30; min-width: 124px; padding: 5px; border: 1px solid #b9cce0; border-radius: 9px; background: #fff; box-shadow: 0 12px 28px #173a5c26; }
.schedule-month-menu button { display: block; width: 100%; text-align: left; }
.schedule-project-filter { position: relative; z-index: 12; flex: 0 0 auto; }
#schedule-project-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 48px; border-color: #b9cce0; background: #fff; }
#schedule-project-toggle[aria-expanded="true"] { background: #eaf3fb; border-color: #75a5d0; }
#schedule-project-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#schedule-project-count { padding: 3px 6px; border-radius: 6px; background: #eaf2fa; color: #315c80; font-size: 11px; }
.schedule-project-menu { position: absolute; top: calc(100% + 7px); right: 0; width: min(340px,calc(100vw - 30px)); max-height: min(470px,calc(100dvh - 190px)); overflow-y: auto; padding: 12px; border: 1px solid #b9cce0; border-radius: 11px; background: #fff; box-shadow: 0 18px 42px #173a5c2e; }
.schedule-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: #173a5c; font-size: 13px; }
.schedule-filter-head > div { display: flex; gap: 5px; }
.schedule-filter-head button { min-height: 36px; padding: 5px 9px; border-color: #d6e1eb; font-size: 11px; }
#schedule-project-options { display: grid; gap: 2px; max-height: 295px; overflow-y: auto; }
.schedule-filter-option { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 5px 6px; border-radius: 7px; font-size: 12px; font-weight: 650; cursor: pointer; }
.schedule-filter-option { padding-left: calc(6px + var(--project-depth, 0) * 14px); }
.schedule-filter-option:hover { background: #edf5fc; }
.schedule-filter-option input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: #155d99; }
.schedule-filter-option > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.schedule-project-menu > .schedule-filter-option { margin-top: 7px; padding-top: 10px; border-top: 1px solid #e3eaf1; border-radius: 0; }
.schedule-project-dot { display: inline-block; flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--project-color); }
.schedule-summary { flex: 1 1 auto; min-width: 95px; margin: 0; overflow: hidden; color: #607184; font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.schedule-toolbar > .schedule-add-button { flex: 0 0 auto; min-height: 44px; }
.schedule-toolbar > .schedule-print-button { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; border-color: #b9cce0; background: #fff; color: #155d99; }
.schedule-toolbar > .schedule-print-button:hover { background: #eaf3fb; border-color: #75a5d0; }
.calendar-day { position: relative; min-width: 0; }
.calendar-day:not(.calendar-weekday):hover { background: #f5faff; }
.calendar-day-open { position: absolute; inset: 0; z-index: 0; width: 100%; min-height: 100%; border: 0; border-radius: 0; padding: 0; background: transparent; box-shadow: none; cursor: pointer; }
.calendar-day-open:hover { background: transparent; box-shadow: none; }
.calendar-date-label { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 30px; height: 30px; font-size: 12px; font-weight: 750; pointer-events: none; }
.calendar-entry, .calendar-more { position: relative; z-index: 1; }
.calendar-entry { display: flex; align-items: center; gap: 4px; }
.calendar-entry svg, .calendar-day-add svg, .calendar-day-menu svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.calendar-entry span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-entry.is-manual.is-requested { background: #fff0d3; border: 1px dashed #bb8137; color: #6d490f; }
.calendar-day-add { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 5px 9px; border-color: #bad0e5; background: #f4f9fe; color: #155d99; font-size: 12px; }
.calendar-day-menu { position: fixed; z-index: 50; width: 226px; padding: 8px; border: 1px solid #b7ccdf; border-radius: 12px; background: #fff; box-shadow: 0 14px 36px #19334d33; }
.calendar-day-menu > strong { display: block; padding: 7px 9px 9px; color: #314b64; font-size: 12px; }
.calendar-day-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; border: 0; border-radius: 7px; padding: 8px 9px; background: transparent; color: #183d62; text-align: left; font-size: 13px; }
.calendar-day-menu button:hover, .calendar-day-menu button:focus-visible { background: #eaf3fc; box-shadow: none; }
.calendar-weekday { min-height: 42px; background: #f5f9fc; }
.calendar-date-link { display: grid; place-items: center; width: 30px; height: 30px; min-height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: 12px; }
.calendar-date-link:hover { background: #dfeefb; box-shadow: none; }
.calendar-more { min-height: 28px; padding: 2px 4px; border: 0; background: transparent; color: #155d99; font-size: 11px; }
.calendar-grid.is-week .calendar-day:not(.calendar-weekday) { min-height: 320px; }
.calendar-grid.is-day { display: block; min-height: 330px; padding: 20px; }
.schedule-day-agenda { max-width: 900px; margin: 0 auto; }
.schedule-day-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 13px; padding-bottom: 15px; border-bottom: 1px solid #e0e7ee; }
.schedule-day-heading h3 { margin: 0; font-size: 21px; }
.schedule-day-heading small { margin-left: auto; color: #65798a; }
.schedule-day-row { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid #e8edf2; }
.schedule-day-time { padding-top: 10px; color: #66788a; font-size: 12px; font-weight: 700; }
.schedule-day-item { display: grid; gap: 3px; min-height: 55px; border-color: #c5d9eb; border-left: 4px solid #3d86bd; background: #f3f8fd; text-align: left; }
.schedule-day-item small { color: #5c7081; font-size: 11px; font-weight: 500; }
.schedule-day-item.is-complete { border-color: #d8dfe5; border-left-color: #a2afba; background: #f5f7f9; color: #6c7883; }
.schedule-gantt { margin-bottom: 18px; border: 1px solid #d5dde5; border-radius: 12px; background: #fff; }
.schedule-gantt-scroll { overflow-x: auto; overscroll-behavior-inline: contain; }
.schedule-gantt-inner { min-width: 820px; }
.schedule-gantt-header, .schedule-gantt-row { display: grid; grid-template-columns: 225px minmax(0,1fr); }
.schedule-gantt-header { position: sticky; top: 0; z-index: 2; min-height: 48px; border-bottom: 1px solid #cfdce8; background: #f5f9fc; }
.schedule-gantt-header > strong { display: flex; align-items: center; padding: 0 14px; border-right: 1px solid #dce6ef; font-size: 12px; }
.schedule-gantt-axis, .schedule-gantt-track { position: relative; min-width: 0; }
.schedule-gantt-axis span { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; overflow: hidden; padding: 0 8px; border-right: 1px solid #dce6ef; color: #46627b; font-size: 11px; white-space: nowrap; }
.schedule-gantt-row { min-height: 52px; border-bottom: 1px solid #e7edf3; }
.schedule-gantt-row.is-project { min-height: 58px; background: #f7fafd; }
.schedule-gantt-label { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 12px; border: 0; border-right: 1px solid #e2eaf1; border-radius: 0; background: transparent; text-align: left; }
button.schedule-gantt-label:hover { background: #eaf3fb; box-shadow: none; }
.schedule-gantt-label strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-gantt-label small { overflow: hidden; color: #6a7d8d; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.schedule-gantt-row:not(.is-project) .schedule-gantt-label { display: grid; align-content: center; gap: 2px; padding-left: 25px; }
.schedule-gantt-row.is-project .schedule-gantt-label { flex-wrap: wrap; align-content: center; }
.schedule-gantt-group > .schedule-gantt-row.is-project .schedule-gantt-label { padding-left: calc(12px + var(--project-depth, 0) * 14px); }
.schedule-gantt-row.is-project .schedule-gantt-label small { flex: 0 0 100%; padding-left: 17px; }
.schedule-gantt-track { background-image: linear-gradient(to right,#e5edf4 1px,transparent 1px); background-size: calc(100% / var(--segment-count, 12)) 100%; }
.schedule-gantt-bar, .schedule-gantt-span { position: absolute; top: 50%; transform: translateY(-50%); height: 27px; min-width: 5px; border: 0; border-radius: 5px; background: var(--project-color,#155d99); }
.schedule-gantt-bar { z-index: 1; overflow: hidden; padding: 4px 7px; color: #fff; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.schedule-gantt-bar:hover { filter: brightness(1.12); }
.schedule-gantt-span { height: 15px; opacity: .5; }
.schedule-gantt-bar.is-complete { background: #aab7c3; color: #354f66; }
.schedule-gantt-undated { display: inline-block; margin: 16px 10px; color: #8191a0; font-size: 10px; }
.schedule-target-marker { position: absolute; z-index: 3; top: 16px; width: 15px; height: 15px; transform: translateX(-50%) rotate(45deg); border: 2px solid #915d20; background: #ffd581; }
.schedule-today-marker { position: absolute; z-index: 2; top: 0; bottom: 0; width: 2px; background: #cf684d; pointer-events: none; }
.schedule-gantt-empty { margin: 0; padding: 8px 25px; color: #82909d; font-size: 11px; }
.schedule-gantt-completed { margin: 10px; }
.schedule-gantt-completed .completed-group-list { display: block; padding: 0; }
.schedule-gantt-completed .schedule-gantt-row { opacity: .76; }
.schedule-gantt-inner > .empty { margin: 14px; }
.schedule-gantt-key { display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px 12px; border-top: 1px solid #e5edf4; color: #617688; font-size: 11px; }
.schedule-key-today { width: 2px; height: 16px; margin-right: 3px; background: #cf684d; }
.schedule-key-target { width: 11px; height: 11px; margin: 0 3px 0 13px; transform: rotate(45deg); border: 2px solid #915d20; background: #ffd581; }
@media (max-width: 1550px) {
  .schedule-toolbar { flex-wrap: wrap; }
  .schedule-toolbar h2 { margin-right: auto; }
  .schedule-summary { order: 7; flex-basis: 100%; text-align: left; }
}
@media (max-width: 800px) {
  .schedule-toolbar { align-items: center; }
  .schedule-view-switcher { order: 6; width: 100%; min-width: 0; overflow: visible; }
  .schedule-view-switcher > button, .schedule-month-ranges { flex: 1 1 auto; min-width: 0; }
  .schedule-view-switcher button { padding: 5px 4px; font-size: 11px; }
  .schedule-period-controls { order: 3; }
  .schedule-project-filter { order: 4; margin-left: auto; }
  .schedule-toolbar > .schedule-add-button { order: 5; }
  .schedule-toolbar > .schedule-print-button { order: 5; }
  .calendar-grid.is-week .calendar-day:not(.calendar-weekday) { min-height: 210px; }
  .calendar-day { padding: 4px; }
  .calendar-entry { font-size: 9px; }
}
@media (max-width: 560px) {
  #calendar-month { min-width: 112px; }
  .schedule-period-controls { width: 100%; justify-content: space-between; }
  .schedule-project-filter { margin-left: 0; }
  .schedule-summary { flex-basis: 100%; }
  .schedule-day-row { grid-template-columns: 65px minmax(0,1fr); gap: 7px; }
  .schedule-day-heading small { margin-left: 0; }
  .calendar-grid.is-week .calendar-day:not(.calendar-weekday) { min-height: 155px; }
  .calendar-entry { min-height: 20px; padding: 2px; }
}
@media (max-width: 600px) {
  #calendar-grid { touch-action: pan-y; }
  .calendar-swipe-viewport { position: relative; overflow: hidden; border-radius: 12px; }
  .calendar-swipe-ghost { position: absolute; z-index: 1; pointer-events: none; overflow: hidden; box-sizing: border-box; will-change: transform; }
  .content:has(#view-schedule:not([hidden])) { padding: 8px; }
  .schedule-toolbar { display: grid; grid-template-columns: minmax(0,1fr) minmax(90px,1.1fr) repeat(3,42px); align-items: center; gap: 6px; min-height: 0; margin-bottom: 8px; padding: 0; }
  .schedule-toolbar h2 { grid-column: 1; grid-row: 1; min-width: 0; margin: 0; font-size: clamp(14px,4vw,18px); }
  .schedule-title-prefix { display: none; }
  .schedule-period-controls { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; margin: 0; }
  .schedule-period-controls #previous-month, .schedule-period-controls #next-month, .schedule-period-controls #schedule-today { display: none; }
  #calendar-month { width: 100%; min-width: 0; max-width: none; min-height: 42px; padding: 6px 5px; }
  .schedule-project-filter { grid-column: 3; grid-row: 1; margin: 0; }
  #schedule-project-toggle { position: relative; display: grid; place-items: center; width: 42px; min-height: 42px; padding: 0; }
  #schedule-project-toggle .schedule-project-label, #schedule-project-toggle .schedule-filter-chevron { display: none; }
  #schedule-project-toggle .schedule-filter-icon { width: 21px; height: 21px; }
  #schedule-project-count { position: absolute; top: -5px; right: -5px; padding: 1px 3px; border: 1px solid #b9cce0; font-size: 9px; }
  .schedule-toolbar > .schedule-add-button { grid-column: 4; grid-row: 1; justify-content: center; width: 42px; min-height: 42px; padding: 0; }
  .schedule-toolbar > .schedule-add-button span:not([aria-hidden]) { display: none; }
  .schedule-extra-tools { position: relative; display: block; grid-column: 5; grid-row: 1; }
  #schedule-extra-toggle { display: grid; place-items: center; width: 42px; min-height: 42px; padding: 0; }
  .schedule-extra-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: none; width: 56px; padding: 6px; border: 1px solid #b9cce0; border-radius: 10px; background: #fff; box-shadow: 0 14px 32px #173a5c2e; }
  .schedule-extra-menu.is-open { display: grid; gap: 6px; }
  .schedule-extra-menu > button, .schedule-extra-menu .schedule-print-button { display: grid !important; place-items: center; width: 42px; height: 42px; min-height: 42px; padding: 0; }
  .schedule-extra-menu #open-booking-page span { display: none; }
  .schedule-extra-menu > button[hidden] { display: none !important; }
  .schedule-view-switcher { grid-column: 1 / -1; grid-row: 2; order: initial; width: 100%; min-width: 0; padding: 2px; overflow: visible; }
  .schedule-view-switcher button { min-height: 36px; padding: 5px 4px; }
  #view-schedule.is-list-view .schedule-toolbar { grid-template-columns: minmax(0,1fr) repeat(3,42px); }
  #view-schedule.is-list-view .schedule-project-filter { grid-column: 2; }
  #view-schedule.is-list-view .schedule-toolbar > .schedule-add-button { grid-column: 3; }
  #view-schedule.is-list-view .schedule-extra-tools { grid-column: 4; }
  #view-schedule.is-list-view .schedule-list-panel { padding: 14px; }
  .schedule-summary { display: none; }
  .calendar-weekday { min-height: 32px; }
  .calendar-grid:not(.is-day):not(.is-week) { min-height: calc(100dvh - 248px); grid-auto-rows: minmax(64px,1fr); }
  .calendar-grid:not(.is-day):not(.is-week) .calendar-day { min-height: 64px; padding: 2px; }
  .calendar-date-label { width: 25px; height: 25px; }
  .schedule-project-menu { position: fixed; top: 164px; right: 8px; left: 8px; width: auto; max-height: min(470px,calc(100dvh - 180px)); }
  .build-drawer[data-panel="schedule-date-picker"] { width: 100%; }
}

@media print {
  body.printing-schedule { color: #142b42; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.printing-schedule .site-header,
  body.printing-schedule .sidebar,
  body.printing-schedule .notice,
  body.printing-schedule #build-drawer-overlay,
  body.printing-schedule #schedule-editor,
  body.printing-schedule .schedule-google-link,
  body.printing-schedule .schedule-sync-note { display: none !important; }
  body.printing-schedule #workspace-panel { display: block !important; min-height: 0; }
  body.printing-schedule .content { display: block; width: 100%; max-width: none; margin: 0; padding: 0; }
  body.printing-schedule .view:not(#view-schedule) { display: none !important; }
  body.printing-schedule #view-schedule { display: block !important; width: 100%; max-width: none; margin: 0; }
  body.printing-schedule .schedule-toolbar { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; padding: 0 0 8px; border-bottom: 1px solid #bacbdb; }
  body.printing-schedule .schedule-toolbar > * { display: none !important; }
  body.printing-schedule .schedule-toolbar > h2,
  body.printing-schedule .schedule-toolbar > .schedule-period-controls,
  body.printing-schedule .schedule-toolbar > .schedule-summary { display: inline-flex !important; align-items: center; flex: 0 0 auto; order: 0; }
  body.printing-schedule #view-schedule.is-list-view .schedule-period-controls { display: none !important; }
  body.printing-schedule .schedule-toolbar > .schedule-summary { flex-basis: 100%; color: #516577; text-align: left; font-size: 9pt; }
  body.printing-schedule .schedule-toolbar h2 { margin: 0; font-size: 18pt; }
  body.printing-schedule .schedule-title-prefix { display: inline; }
  body.printing-schedule .schedule-period-controls button { display: none !important; }
  body.printing-schedule #calendar-month { display: inline-flex !important; min-width: 0; max-width: none; border: 0; font-size: 11pt; }
  body.printing-schedule #calendar-month svg { display: none; }
  body.printing-schedule .calendar-grid,
  body.printing-schedule .schedule-gantt,
  body.printing-schedule .schedule-list-panel { box-shadow: none; border-color: #bacbdb; }
  body.printing-schedule .calendar-grid { margin-bottom: 12px; }
  body.printing-schedule .calendar-day { min-height: 72px; padding: 5px; }
  body.printing-schedule .calendar-grid.is-week .calendar-day:not(.calendar-weekday) { min-height: 140px; }
  body.printing-schedule .calendar-date-link,
  body.printing-schedule .calendar-more,
  body.printing-schedule .calendar-entry,
  body.printing-schedule .schedule-day-item,
  body.printing-schedule .schedule-gantt-label,
  body.printing-schedule .schedule-gantt-bar,
  body.printing-schedule .schedule-item-main { cursor: default; }
  body.printing-schedule .calendar-entry { white-space: normal; }
  body.printing-schedule .schedule-gantt-scroll { overflow: visible; }
  body.printing-schedule .schedule-gantt-inner { min-width: 0; }
  body.printing-schedule .schedule-gantt-header,
  body.printing-schedule .schedule-gantt-row { grid-template-columns: 160px minmax(0,1fr); }
  body.printing-schedule .schedule-gantt-group,
  body.printing-schedule .schedule-item-row { break-inside: avoid; }
  body.printing-schedule .schedule-gantt-label strong { font-size: 9pt; }
  body.printing-schedule .schedule-gantt-label small { font-size: 7pt; }
  body.printing-schedule .schedule-gantt-bar { border: 1px solid #426486; }
  body.printing-schedule .schedule-list-panel { padding: 14px; }
  body.printing-schedule .schedule-list-panel h2 { font-size: 14pt; }
}

/* Home project workspace */
.overview-top-panels { margin-bottom: 18px; }
.overview-top-panels > .card { min-width: 0; }
.overview-top-panels #overview-project-search { width: 100%; max-width: none; margin-bottom: 10px; }
.overview-project-list { display: grid; gap: 8px; max-height: 318px; overflow-y: auto; }
.overview-project-option { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 62px; padding: 9px 12px; border: 1px solid #d5e0eb; border-radius: 9px; background: #fff; color: #153653; text-align: left; }
.overview-project-option { padding-left: calc(12px + var(--project-depth, 0) * 15px); }
.overview-project-option:hover, .overview-project-option.is-selected { border-color: #4085ba; background: #eaf3fb; }
.overview-project-option > span:first-child { display: grid; gap: 3px; min-width: 0; flex: 1; }
.overview-project-option strong, .overview-project-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-project-option small { display: block; color: #5b6c7e; font-size: 11px; }
.overview-project-option-meta { display: grid; gap: 3px; font-size: 11px; font-weight: 700; text-align: right; }
.overview-project-option > svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.overview-project-focus { scroll-margin-top: 96px; }
.overview-project-focus .section-head p { margin: 4px 0 0; color: #647586; font-size: 12px; }
.overview-focus-heading { align-items: end; flex-wrap: wrap; }
.overview-focus-heading h2 { font-size: 24px; }
.overview-focus-actions { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.overview-focus-actions label { display: grid; gap: 4px; color: #526a80; font-size: 11px; font-weight: 700; }
.overview-focus-actions select { min-width: 220px; max-width: 300px; }
.overview-focus-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin: 14px 0 18px; }
.overview-focus-stats > div { display: grid; gap: 4px; padding: 12px; border: 1px solid #d9e3ed; border-radius: 9px; background: #f8fbfe; }
.overview-focus-stats small { color: #597087; }
.overview-focus-stats strong { color: #173955; }
.overview-focus-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(300px,.8fr); gap: 14px; }
.overview-focus-panel { min-width: 0; padding: 15px; border: 1px solid #d9e3ed; border-radius: 10px; background: #fbfdff; }
.overview-focus-panel .section-head { align-items: start; flex-wrap: wrap; }
.overview-focus-panel .section-head button { min-height: 38px; padding: 7px 11px; }
.overview-contract-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.overview-contract-controls input { flex: 1 1 240px; min-width: 0; }
.overview-audience-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid #cbdbea; border-radius: 9px; background: #f0f6fc; }
.overview-audience-switch button { min-height: 36px; padding: 6px 10px; border: 0; background: transparent; font-size: 12px; }
.overview-audience-switch button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 5px #142b4221; }
.overview-contract-count { margin: 9px 0; color: #687c8d; font-size: 11px; }
.overview-contract-results, .overview-schedule-list { display: grid; align-content: start; gap: 8px; }
.overview-contract-item { display: flex; align-items: center; gap: 9px; min-height: 65px; padding: 9px 10px; border: 1px solid #d7e1eb; border-radius: 9px; background: #fff; }
.overview-contract-item.is-complete { background: #f5f7f9; color: #607080; }
.overview-contract-item-main { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.overview-contract-item-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 7px; background: #e8f2fb; color: #1d659f; }
.overview-contract-item-icon svg, .overview-contract-term svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.overview-contract-item details { min-width: 0; width: 100%; }
.overview-contract-item summary { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 9px; min-height: 44px; cursor: pointer; list-style: none; }
.overview-contract-item summary::-webkit-details-marker, .overview-contract-term summary::-webkit-details-marker { display: none; }
.overview-contract-item summary::marker, .overview-contract-term summary::marker { content: ''; }
.overview-contract-item-copy { min-width: 0; overflow-wrap: anywhere; }
.overview-contract-item details[open] > summary .overview-contract-item-icon,
.overview-contract-term[open] > summary .overview-contract-item-icon { background: #155d99; color: #fff; box-shadow: inset 0 0 0 1px #0e4879; }
.overview-contract-item summary:focus-visible, .overview-contract-term summary:focus-visible { outline: 2px solid #2781c5; outline-offset: 3px; border-radius: 5px; }
.overview-contract-item summary strong, .overview-contract-item summary small { display: block; }
.overview-contract-item summary small, .overview-contract-item p { color: #627386; font-size: 11px; }
.overview-contract-item p { margin: 8px 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.overview-contract-results mark.contract-search-match { padding: 1px 2px; border-radius: 3px; background: #ffe39a; color: #352508; box-shadow: inset 0 -1px 0 #d9a63a; }
.overview-contract-item-status { display: grid; gap: 4px; text-align: right; font-size: 11px; }
.overview-contract-item-status small { color: #6b7d8e; }
.overview-status { display: inline-block; padding: 3px 7px; border-radius: 99px; background: #fff2d9; color: #754b11; font-weight: 700; white-space: nowrap; }
.overview-status.is-dated { background: #e8f3fc; color: #1b5d91; }
.overview-status.is-complete { background: #e8edf1; color: #596a78; }
.overview-contract-item .task-complete-control { position: relative; top: auto; right: auto; transform: none; flex: 0 0 44px; }
.overview-contract-term { padding: 11px; border: 1px solid #d7e1eb; border-radius: 9px; background: #fff; }
.overview-contract-term summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; }
.overview-contract-term summary small { margin-left: auto; color: #6c7d8e; }
.overview-contract-term p { white-space: pre-wrap; color: #586b7e; font-size: 12px; }
.overview-completed-items .completed-group-list { display: grid; gap: 8px; }
.overview-schedule-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 55px; padding: 9px 10px; border: 1px solid #d7e1eb; border-radius: 9px; background: #fff; }
.overview-schedule-row span { display: grid; gap: 3px; }
.overview-schedule-row small { color: #63788a; }
.overview-schedule-row time { color: #275d8a; font-size: 12px; white-space: nowrap; }
.overview-schedule-reminder { margin: 2px 0; color: #825b21; font-size: 12px; }
@media (max-width: 1050px) { .overview-focus-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .overview-focus-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } .overview-focus-actions { width: 100%; } .overview-focus-actions label { flex: 1; } .overview-focus-actions select { min-width: 0; width: 100%; } .overview-contract-item { flex-wrap: wrap; } .overview-contract-item-status { margin-left: 39px; text-align: left; } }

/* Project analytics */
.side-nav .nav-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.analytics-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 14px; background: linear-gradient(115deg,#e8f0f9,#fff4dc); }
.analytics-header h2 { font-size: 27px; margin: 5px 0; }
.analytics-header p { margin: 0; font-size: 13px; }
.analytics-header label { flex: 0 1 320px; color: #526b81; font-size: 12px; }
.analytics-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.analytics-stats .card { display: grid; align-content: start; gap: 7px; min-width: 0; padding: 17px; box-shadow: none; }
.analytics-stats small, .analytics-stats span { color: #60758a; font-size: 12px; }
.analytics-stats strong { color: #153d66; font-size: 26px; }
.analytics-progress, .analytics-breakdowns > .card, .analytics-task-panel { margin-bottom: 14px; }
.analytics-progress .section-head, .analytics-breakdowns .section-head { align-items: start; }
.analytics-progress .section-head p, .analytics-breakdowns .section-head p, .analytics-task-panel .section-head p { margin: 3px 0 0; font-size: 12px; }
#analytics-progress-bars { display: grid; gap: 15px; }
.analytics-progress-row > div:first-child { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.analytics-progress-row strong { font-size: 13px; }
.analytics-progress-row span { color: #63778a; font-size: 12px; }
.analytics-progress-row b { margin-left: auto; color: #153d66; }
.analytics-meter { height: 12px; overflow: hidden; border-radius: 99px; background: #e5edf5; }
.analytics-meter > span { display: block; height: 100%; border-radius: inherit; background: #347eb5; }
.analytics-meter > span.time { background: #bb8641; }
.analytics-meter > span.done { background: #267a86; }
.analytics-risk { margin: 13px 0 0; padding: 9px 11px; border-radius: 8px; background: #f0f5fa; font-size: 12px; }
.analytics-breakdowns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.analytics-breakdown-row { padding: 10px 0; border-top: 1px solid #e0e8f0; }
.analytics-breakdown-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; font-size: 13px; }
.analytics-breakdown-head span { color: #486b88; white-space: nowrap; }
.analytics-breakdown-row .analytics-meter { height: 9px; }
.analytics-breakdown-row small { display: block; margin-top: 5px; color: #64788b; }
.analytics-task-row { display: grid; grid-template-columns: minmax(180px,2fr) minmax(150px,1.2fr) minmax(95px,.6fr) auto; align-items: center; gap: 10px; min-height: 60px; padding: 10px 0; border-top: 1px solid #e0e8f0; font-size: 12px; }
.analytics-task-row > span:first-child { display: grid; gap: 4px; }
.analytics-task-row small { color: #64788b; }
.analytics-task-row b { color: #194f78; white-space: nowrap; }
.analytics-task-row em { padding: 4px 8px; border-radius: 99px; background: #eaf3fb; color: #275f8d; font-style: normal; font-weight: 700; }
.analytics-task-row.is-complete { color: #718090; }
.analytics-task-row.is-complete em { background: #ecf0f3; color: #667988; }
#schedule-open-analytics { flex: 0 0 44px; min-height: 44px; }
#schedule-open-analytics svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1050px) { .analytics-breakdowns { grid-template-columns: 1fr; } .analytics-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 650px) { .analytics-header { display: grid; } .analytics-header label { width: 100%; } .analytics-task-row { grid-template-columns: 1fr auto; } .analytics-task-row > span:nth-child(2) { grid-column: 1 / -1; } .analytics-task-row b { grid-row: 1; grid-column: 2; } .analytics-progress-row > div:first-child { flex-wrap: wrap; } }

/* Generic project groups */
.project-group-fields, .project-structure-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.project-group-fields > label:first-child, .project-structure-form > label:first-child { grid-column: 1 / -1; }
.project-structure-section { margin-top: 20px; padding: 18px; border: 1px solid #d4e0ec; border-radius: 11px; background: #f9fbfe; }
.project-structure-section .section-head { align-items: center; margin-bottom: 14px; }
.project-structure-section h3 { margin: 0 0 4px; font-size: 17px; }
.project-structure-section .section-head p, .project-group-summary { margin: 0; color: #60758a; font-size: 12px; }
.project-structure-form { align-items: end; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.project-structure-form > label:first-child { grid-column: auto; }
.project-structure-form > button { min-height: 44px; }
.project-customer-link-form { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #dce6f0; }
.project-customer-link-form > label { flex: 1 1 220px; }
.project-customer-link-form > button { min-height: 44px; }
.project-customer-link-form > small { flex-basis: 100%; color: #60758a; }
.project-group-parent { display: flex; align-items: center; gap: 8px; margin: 13px 0 0; font-size: 12px; }
.project-group-parent button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: #155d99; font-weight: 700; }
.project-group-parent svg, .project-child-list svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.project-child-list { display: grid; gap: 7px; margin-top: 15px; }
.project-child-list > strong { font-size: 13px; }
.project-child-list > button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 8px 11px; border: 1px solid #d4e0ec; border-radius: 8px; background: #fff; text-align: left; }
.project-child-list > button:hover { background: #eff6fc; }
.project-child-list > button span { display: grid; gap: 3px; }
.project-child-list small { color: #60758a; }
.project-group-summary { margin-top: 13px; }
.analytics-project-group { margin-bottom: 14px; }
.analytics-project-group .section-head { flex-wrap: wrap; gap: 12px; }
.analytics-project-group .section-head p { margin: 4px 0 0; font-size: 12px; }
.analytics-project-group .section-head label { min-width: 170px; font-size: 12px; }
.analytics-group-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 4px; border: 0; border-top: 1px solid #e0e8f0; background: transparent; text-align: left; }
.analytics-group-row:hover { background: #f2f7fc; }
.analytics-group-row > span:first-child { display: grid; gap: 4px; flex: 1; min-width: 0; }
.analytics-group-row small { color: #60758a; font-size: 11px; }
.analytics-group-meta { display: grid; gap: 4px; text-align: right; white-space: nowrap; }
.analytics-group-row svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
@media (max-width: 800px) { .project-structure-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .project-structure-form > label:first-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .project-group-fields, .project-structure-form { grid-template-columns: 1fr; } .project-structure-form > label:first-child { grid-column: auto; } .project-structure-section { padding: 13px; } .analytics-group-row { flex-wrap: wrap; } .analytics-group-meta { margin-left: auto; } }

/* Project staging and reference library */
.project-stage { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 99px; background: #e7f1fa; color: #245e8a; font-size: 11px; font-style: normal; vertical-align: middle; }
.project-stage.stage-upcoming { background: #fff2d7; color: #805b18; }
.project-stage.stage-on_hold { background: #eef0f3; color: #596878; }
.project-stage.stage-completed { background: #e3f3ef; color: #23665e; }
#project-stage-filter { min-width: 125px; width: auto; margin-left: auto; }
.project-profile-section { margin-top: 20px; padding: 18px; border: 1px solid #d4e0ec; border-radius: 11px; background: #f9fbfe; }
.project-profile-section h3, .library-form h3 { margin: 0 0 5px; }
.project-profile-section .section-head p { margin: 0 0 12px; color: #60758a; font-size: 12px; }
.library-form { display: grid; gap: 12px; margin: 16px 0 24px; padding: 18px; border: 1px solid #d4e0ec; border-radius: 11px; background: #f9fbfe; }
.library-form > button { justify-self: start; min-height: 44px; }
.library-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.library-toolbar h3 { margin: 0 auto 0 0; }
.library-toolbar input { flex: 1 1 190px; max-width: 290px; }
.library-toolbar select { width: auto; }
.library-list { display: grid; gap: 9px; margin-bottom: 24px; }
.library-record { display: flex; align-items: start; gap: 12px; padding: 13px; border: 1px solid #d6e2ed; border-radius: 9px; background: white; }
.library-record p { margin: 0 0 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.library-record small { display: block; color: #62788c; }
.library-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0; }
.library-tags span { padding: 3px 7px; border-radius: 99px; background: #eaf3fb; color: #2a648f; font-size: 11px; }
.library-file > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.library-file-icon svg, .library-file button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.library-file button { min-height: 44px; }
@media (max-width: 620px) { .library-file { flex-wrap: wrap; } #project-stage-filter { margin-left: 0; } }

/* Files and notes use the same expandable panel rhythm as contract setup. */
.library-add-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.library-add-card { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 82px; padding: 13px; border: 1px dashed #91b1ce; border-radius: 10px; background: #f3f8fd; text-align: left; color: #14395d; }
.library-add-card[hidden] { display: none; }
.library-add-card:hover, .library-add-card:focus-visible { border-color: #176ea9; background: #eaf4fc; }
.library-add-card strong { font-size: 14px; }
.library-add-card small { display: block; color: #58728a; font-size: 11px; }
.library-add-icon, .library-folder-icon, .library-item-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 9px; color: #176ea9; background: #e4edf6; }
.library-add-icon svg, .library-folder-icon svg, .library-item-icon svg, .library-item-actions svg, .library-folder summary > svg, .library-item summary > svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.library-editor[hidden] { display: none; }
.library-editor { margin: 12px 0 20px; }
.library-editor .section-head { align-items: center; }
.library-folders { display: grid; gap: 10px; }
.library-folder { min-width: 0; border: 1px solid #bfcfdf; border-radius: 10px; background: #f8fbfe; overflow: hidden; }
.library-folder > summary { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 15px; list-style: none; cursor: pointer; }
.library-folder > summary::-webkit-details-marker, .library-item > summary::-webkit-details-marker { display: none; }
.library-folder > summary:hover, .library-item > summary:hover { background: #edf5fb; }
.library-folder > summary strong { flex: 1; min-width: 0; font-size: 15px; }
.library-folder > summary small { padding: 3px 8px; border-radius: 99px; background: #e6eef7; color: #355a7e; font-weight: 700; }
.library-folder[open] > summary > svg, .library-item[open] > summary > svg { transform: rotate(180deg); }
.library-folder-body { display: grid; gap: 8px; padding: 13px; border-top: 1px solid #dce6ef; }
.library-item { min-width: 0; border: 1px solid #d0deeb; border-radius: 9px; background: #fff; overflow: hidden; }
.library-item > summary { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 9px 12px; list-style: none; cursor: pointer; }
.library-item-copy { display: grid; gap: 3px; flex: 1; min-width: 0; }
.library-item-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.library-item-copy small { color: #64798d; }
.library-item-body { display: grid; gap: 12px; padding: 15px; border-top: 1px solid #e1e9f0; overflow-wrap: anywhere; }
.library-item-body p { white-space: pre-wrap; margin: 0; }
.library-item-body form { display: grid; gap: 12px; min-width: 0; }
.library-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.library-item-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.library-item-actions .danger { color: #9b352b; border-color: #debab5; background: #fff8f7; }
.library-photo-preview img { display: block; max-width: 100%; max-height: 60vh; object-fit: contain; border-radius: 8px; }
@media (max-width: 620px) { .library-add-grid { grid-template-columns: 1fr; } .library-toolbar input { max-width: none; } }

/* The header mark plays one build sequence per hover or keyboard focus. */
.brand .brand-icon { width: 48px; height: 48px; flex: none; overflow: visible; }
.brand-icon .build-tile-top, .brand-icon .build-tile-lower,
.brand-icon .build-ripple-inner, .brand-icon .build-ripple-middle,
.brand-icon .build-ripple-outer { transform-box: fill-box; transform-origin: center; }
.brand:hover .build-tile-top, .brand:focus-visible .build-tile-top { animation: brand-drop-top 1.15s ease-out 1; }
.brand:hover .build-tile-lower, .brand:focus-visible .build-tile-lower { animation: brand-drop-lower 1.15s ease-out 1; }
.brand:hover .build-ripple-inner, .brand:focus-visible .build-ripple-inner { animation: brand-ripple-inner 1.15s ease-out 1; }
.brand:hover .build-ripple-middle, .brand:focus-visible .build-ripple-middle { animation: brand-ripple-middle 1.15s ease-out 1; }
.brand:hover .build-ripple-outer, .brand:focus-visible .build-ripple-outer { animation: brand-ripple-outer 1.15s ease-out 1; }
@keyframes brand-drop-top { 0% { opacity: 0; transform: translateY(-45px); } 29%, 100% { opacity: 1; transform: none; } }
@keyframes brand-drop-lower { 0%, 17% { opacity: 0; transform: translateY(-31px); } 46%, 100% { opacity: 1; transform: none; } }
@keyframes brand-ripple-inner { 0%, 38% { opacity: 0; transform: scale(.65); } 59%, 100% { opacity: 1; transform: none; } }
@keyframes brand-ripple-middle { 0%, 46% { opacity: 0; transform: scale(.7); } 70%, 100% { opacity: 1; transform: none; } }
@keyframes brand-ripple-outer { 0%, 54% { opacity: 0; transform: scale(.75); } 82%, 100% { opacity: 1; transform: none; } }
@media (max-width: 380px) { .brand .brand-icon { width: 32px; height: 32px; } }
@media (prefers-reduced-motion: reduce) {
  .brand:hover .brand-icon *, .brand:focus-visible .brand-icon * { animation: none; }
}

/* Reusable contract starting points */
.contract-starting-point { display: grid; gap: 14px; margin: 0 0 18px; }
.contract-starting-point[hidden] { display: none; }
.contract-starting-point .section-head { margin-bottom: 0; }
.contract-starting-point .section-head p { margin: 4px 0 0; color: #60758a; }
.contract-starting-point .section-head button { display: grid; place-items: center; min-width: 42px; min-height: 42px; padding: 9px; }
.contract-starting-point .section-head svg, #open-contract-starting-point svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#open-contract-starting-point { display: inline-flex; align-items: center; gap: 7px; }
.contract-starting-point > label:not(.check-line) { max-width: 620px; }
.contract-starting-point .check-line { display: flex; align-items: center; gap: 9px; }
.contract-starting-point .check-line input { width: 18px; height: 18px; }
.contract-starting-point .actions { margin: 0; }
.contract-starting-point .helper { margin: 0; }
.contract-standard-save { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding-top: 14px; border-top: 1px solid #d4e0ec; }
.contract-standard-save label { flex: 1 1 260px; max-width: 500px; }
.contract-standard-save button { min-height: 44px; }

/* Contract option catalog and tagged agreement fields */
.contract-options-panel { display: grid; gap: 13px; }
.contract-options-panel .section-head { margin-bottom: 0; }
.contract-options-panel .helper { margin: 0; }
.contract-options-panel code, .contract-option-marker code { padding: 2px 5px; border-radius: 4px; background: #eaf2f9; color: #174f7c; }
.contract-option-list { display: grid; gap: 8px; }
.contract-option-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid #d1dfeb; border-radius: 9px; background: #fff; }
.contract-option-row.is-unavailable { border-color: #d8dfe5; background: #f6f8fa; }
.contract-option-row.is-unavailable > div:first-child { opacity: .72; }
.option-availability-badge { display: inline-block; margin: 4px 0 0; padding: 3px 7px; border-radius: 999px; background: #e7f4eb; color: #165c3d; font-size: 11px; font-weight: 700; }
.is-unavailable .option-availability-badge { background: #e7eaed; color: #536372; }
.contract-option-availability { width: max-content; }

/* One clear, consistent icon language for Build navigation and the app launcher. */
.side-nav .nav-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; color: #164d7b; }
.side-nav .nav-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; transition: transform 150ms ease; }
.side-nav button:is(:hover, :focus-visible) .nav-icon svg { transform: translateY(-1px); }
.side-nav button.active .nav-icon { color: #095b9e; }
.app-tile > span { width: 44px; height: 44px; border-radius: 13px; }
.app-tile > span svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-tile:nth-child(2) > span { background: #e1f0ed; color: #0d675c; }
.app-tile:nth-child(4) > span { background: #e7e9f7; color: #3c4f91; }
.app-tile:nth-child(5) > span { background: #e3eef9; color: #135b97; }
.app-tile:nth-child(6) > span { background: #edf0f5; color: #3b5570; }
@media (prefers-reduced-motion: reduce) { .side-nav .nav-icon svg { transition: none; } .side-nav button:is(:hover, :focus-visible) .nav-icon svg { transform: none; } }

/* Keep the full business artwork visible in the overview and account switcher. */
.hero-business-logo-frame { display: grid; place-items: center; flex: 0 0 108px; width: 108px; height: 108px; padding: 6px; border-radius: 15px; background: rgba(255,255,255,.68); }
.hero-business-logo-frame #hero-business-logo { display: block; width: 88%; height: 88%; padding: 0; border-radius: 0; background: none; object-fit: contain; object-position: center; }
.header-right .account-toggle { width: 52px; min-width: 52px; height: 52px; padding: 2px; }
.account-toggle #account-business-logo { display: block; width: 36px; height: 36px; max-width: 100%; max-height: 100%; border-radius: 0; object-fit: contain; object-position: center; }
.account-current img { width: 44px; height: 44px; padding: 0; border-radius: 0; background: transparent; object-fit: contain; }
@media (max-width: 720px) { .hero-business-logo-frame #hero-business-logo { display: block; } .hero-business-logo-frame { flex-basis: 76px; width: 76px; height: 76px; padding: 4px; } }
@media (max-width: 600px) { .header-right .account-toggle { width: 46px; min-width: 46px; height: 46px; } .account-toggle #account-business-logo { width: 34px; height: 34px; } }
@media (max-width: 380px) { .header-right .account-toggle { width: 42px; min-width: 42px; height: 42px; } .account-toggle #account-business-logo { width: 30px; height: 30px; } }
.contract-option-row > div:first-child { min-width: 0; }
.contract-option-row strong, .contract-option-row small { display: block; }
.contract-option-row small { color: #587188; font-size: 11px; }
.contract-option-row strong { margin: 4px 0; font-size: 13px; }
.contract-option-row p { margin: 4px 0 7px; color: #394e62; font-size: 12px; overflow-wrap: anywhere; }
.product-reference-link { display: inline-flex; align-items: center; gap: 5px; width: max-content; max-width: 100%; margin: 5px 0; color: #165e94; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.product-reference-link svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.product-reference-link:focus-visible { outline: 2px solid #2a7bb8; outline-offset: 3px; }
.contract-option-row .actions { flex: none; margin: 0; }
.contract-option-editor { display: grid; gap: 12px; padding: 15px; border: 1px solid #c7d9e9; border-radius: 10px; background: #f7fbfe; }
.contract-option-editor[hidden] { display: none; }
.contract-option-editor .section-head { margin: 0; }
.contract-option-editor h4 { margin: 0; }
.contract-option-editor > button { justify-self: start; }
.contract-option-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 8px 0; }
.contract-subitems { min-width: 0; padding: 16px; border: 1px solid #b8cfe2; border-radius: 10px; background: #f4f8fc; }
.contract-subitems .section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.contract-subitems h4 { margin: 0; font-size: 15px; }
.contract-subitems .section-head p { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: #4d6478; }
.contract-subitems [data-subitem-list] { display: grid; gap: 7px; }
.contract-subitem { min-width: 0; border: 1px solid #c6d7e6; border-radius: 9px; background: #fff; overflow: hidden; }
.builder-card .contract-subitem-summary { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 58px; height: auto; padding: 9px 12px; list-style: none; }
.contract-subitem-summary::-webkit-details-marker { display: none; }
.contract-subitem-summary:hover { background: #f3f8fc; }
.contract-subitem-summary:focus-visible { outline: 3px solid #7fa4ca; outline-offset: -3px; }
.contract-subitem-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 7px; color: #1d659f; background: #e8f2fb; }
.contract-subitem-icon svg, .contract-subitem-chevron svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contract-subitem-summary-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.contract-subitem-summary-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contract-subitem-summary-text small { color: #5d7082; white-space: normal; }
.contract-subitem-chevron { display: grid; place-items: center; color: #426986; transition: transform .18s ease; }
.contract-subitem[open] .contract-subitem-chevron { transform: rotate(180deg); }
.contract-subitem-fields { display: grid; gap: 10px; min-width: 0; padding: 14px; border-top: 1px solid #d9e3ed; }
.contract-subitem-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.contract-subitem-head button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px; }
.contract-subitem-head svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.contract-card-editor-body .contract-subitem textarea { min-height: 72px; }
.contract-subitem label { min-width: 0; }
@media (max-width: 560px) { .contract-subitems .section-head { flex-wrap: wrap; } .contract-subitems .section-head button { width: 100%; } }
.contract-option-fields .helper { grid-column: 1 / -1; }
.contract-option-marker { display: flex; align-items: end; gap: 8px; margin: 8px 0; }
.contract-option-marker label { flex: 1; }
.contract-option-marker button { min-height: 44px; }
@media (max-width: 760px) { .contract-option-row { align-items: stretch; flex-direction: column; } .contract-option-row .actions { justify-content: flex-start; } .contract-option-fields { grid-template-columns: 1fr; } .contract-option-marker { align-items: stretch; flex-direction: column; } }

/* Business option library and compact project selection */
.library-heading { margin: 0 0 18px; }
.library-heading h2 { margin: 5px 0 4px; }
.library-heading p { margin: 0; color: #536b81; }
#view-library .contract-options-panel { max-width: none; }
#contract-option-search { max-width: 400px; }
.project-options-panel { display: grid; gap: 12px; }
.project-options-panel .section-head { margin-bottom: 0; }
.project-options-panel .section-head p { margin: 4px 0 0; }
.project-option-picker { display: flex; align-items: end; gap: 9px; flex-wrap: wrap; }
.project-option-picker label { flex: 1 1 260px; }
.project-option-picker button { min-height: 44px; }
.project-selected-options { display: flex; gap: 8px; flex-wrap: wrap; }
.project-selected-options > div { display: grid; gap: 3px; padding: 9px 11px; border: 1px solid #d1dfeb; border-radius: 8px; background: #fff; }
.project-selected-options strong { font-size: 12px; }
.project-selected-options small { color: #587188; font-size: 11px; }
.project-selected-options .empty { width: 100%; margin: 0; }
.project-options-panel code { padding: 2px 5px; border-radius: 4px; background: #eaf2f9; color: #174f7c; }

/* Option editor uses the shared right-side Build drawer. */
.build-drawer[data-panel="contract-option-editor"] { width: min(780px,calc(100vw - 24px)); }
.build-drawer-content #contract-option-editor { min-height: 100%; align-content: start; padding: 22px; border: 0; border-radius: 0; background: #fff; }
.build-drawer-content #contract-option-editor textarea { min-height: 150px; }
.build-drawer-content #save-contract-option { justify-self: stretch; position: sticky; bottom: 0; z-index: 2; min-height: 48px; margin-top: 12px; box-shadow: 0 -6px 18px #fff; }
.build-drawer-content #contract-option-editor > .form-row:first-of-type { grid-template-columns: 1fr; }
.contract-option-group-choices { display: grid; grid-column: 1 / -1; gap: 6px; max-height: 252px; overflow-y: auto; padding: 7px; border: 1px solid #b7cce0; border-radius: 9px; background: #f7fbfe; }
.contract-option-group-choices[hidden] { display: none; }
.contract-option-group-choices button { display: flex; align-items: center; gap: 10px; min-height: 46px; width: 100%; padding: 9px 11px; border: 1px solid transparent; border-radius: 7px; background: #fff; color: #143b61; text-align: left; }
.contract-option-group-choices button:hover,.contract-option-group-choices button:focus-visible { border-color: #79a6cd; background: #eaf3fb; }
.contract-option-group-choices button strong { font-size: 13px; }
.contract-option-group-choices button small { display: block; margin-top: 2px; color: #5b7185; font-size: 11px; }
.contract-option-group-choices .option-group-create { border-style: dashed; border-color: #9ab9d4; background: #edf6fd; }
.contract-option-group-choices svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#contract-option-group-help { grid-column: 1 / -1; margin: -4px 0 0; }
.option-tag-help { display: block; margin-top: 4px; color: #5b7185; font-size: 11px; font-weight: 400; }
#contract-option-tag[readonly] { background: #f0f5f9; color: #3d5872; }
@media (max-width: 600px) { .build-drawer-content #contract-option-editor { padding: 16px; } .build-drawer-content #contract-option-editor .form-row { grid-template-columns: 1fr; } }

/* Mobile home: put active project work ahead of business-wide reporting. */
@media (max-width: 600px) {
  #view-overview { display: flex; flex-direction: column; gap: 12px; }
  .content:has(#view-overview:not([hidden])) { padding: 8px 7px 40px; }
  #view-overview > .hero { order: 0; min-height: 0; margin: 0; padding: 10px 13px; gap: 10px; }
  #view-overview > .hero .eyebrow, #view-overview > .hero p { display: none; }
  #view-overview > .hero h1 { margin: 0; font-size: 17px; line-height: 1.2; letter-spacing: -.015em; }
  #view-overview > .hero .hero-business-logo-frame { width: 42px; height: 42px; flex: 0 0 42px; padding: 2px; border-radius: 9px; }
  #view-overview > .hero #hero-business-logo { width: 100%; height: 100%; padding: 2px; border-radius: 7px; }
  #view-overview > .overview-top-panels { display: contents; }
  #view-overview > .overview-top-panels > .card { min-width: 0; margin: 0; padding: 10px; }
  #view-overview > .overview-top-panels > .card:first-child { order: 1; }
  #view-overview > .overview-project-focus { order: 2; margin: 0; padding: 10px 7px; }
  #view-overview > .overview-top-panels > .card:last-child { order: 3; }
  #view-overview > .stat-grid { order: 4; margin: 0; gap: 7px; }
  #view-overview > .stat-grid .card { min-width: 0; padding: 9px 11px; }
  #view-overview > .stat-grid span { font-size: 11px; }
  #view-overview > .stat-grid strong { font-size: 20px; line-height: 1.2; margin-top: 2px; overflow-wrap: anywhere; }
  .overview-focus-panel { padding: 10px 8px; }
  .overview-focus-panel > .section-head { align-items: center; flex-wrap: nowrap; gap: 7px; margin-bottom: 8px; }
  .overview-focus-panel > .section-head h3 { margin: 0; font-size: 16px; }
  .overview-focus-panel > .section-head p { display: none; }
  .overview-focus-panel > .section-head button { flex: none; min-height: 44px; padding: 7px 9px; font-size: 12px; }
  .overview-contract-controls { flex-wrap: nowrap; gap: 6px; }
  .overview-contract-controls input { flex: 1 1 0; width: 0; min-width: 0; min-height: 44px; padding: 8px; font-size: 12px; }
  .overview-audience-switch { flex: none; padding: 2px; }
  .overview-audience-switch button { min-height: 40px; padding: 5px 6px; font-size: 11px; }
  .overview-contract-item { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: start; gap: 4px 7px; padding: 8px; }
  .overview-contract-item:not(:has(.task-complete-control)) { grid-template-columns: minmax(0,1fr); }
  .overview-contract-item-main { display: contents; }
  .overview-contract-item-icon { width: 24px; height: 24px; flex-basis: 24px; }
  .overview-contract-item details { grid-column: 1; grid-row: 1; min-width: 0; }
  .overview-contract-item summary { grid-template-columns: 24px minmax(0,1fr); gap: 7px; }
  .overview-contract-item-status { grid-column: 1; grid-row: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; margin: 0 0 0 31px; min-width: 0; text-align: left; }
  .overview-contract-item .task-complete-control { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

/* Keep the overview contract heading, count and controls compact. */
.overview-contract-panel > .section-head { align-items: center; flex-wrap: nowrap; gap: 8px; margin-bottom: 4px; }
.overview-contract-panel > .section-head > div { min-width: 0; }
.overview-contract-panel > .section-head h3 { margin: 0; }
.overview-contract-panel > .section-head .context-help-trigger { min-height: 24px; padding: 0; font: inherit; }
.overview-contract-panel > .section-head .overview-contract-count { display: block; margin: 3px 0 0; font-size: 10px; line-height: 1.35; }
#view-overview .overview-action { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid #b6c8da; border-radius: 8px; background: #fff; color: #155d99; box-shadow: none; }
#view-overview .overview-action:hover { background: #e8f2fb; border-color: #82a6ca; }
#view-overview .overview-action svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.overview-focus-actions { flex-wrap: nowrap; }
.overview-focus-actions label { min-width: 0; }
#view-overview > .hero { min-height: 64px; padding: 8px 14px; gap: 12px; margin-bottom: 12px; }
#view-overview > .hero .eyebrow, #view-overview > .hero p { display: none; }
#view-overview > .hero h1 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.015em; }
#view-overview > .hero .context-help-trigger { min-height: 24px; padding: 0; font: inherit; }
#view-overview > .hero .hero-business-logo-frame { width: 44px; height: 44px; flex: 0 0 44px; padding: 2px; border-radius: 8px; }
@media (max-width: 800px) {
  #view-overview > .hero { display: none; }
  .overview-focus-actions { width: 100%; }
  .overview-focus-actions label { flex: 1; }
  .overview-focus-actions select { width: 100%; min-width: 0; max-width: none; }
}
.overview-contract-panel .overview-contract-results { margin-top: 8px; }
@media (max-width: 600px) {
  .overview-contract-panel { padding: 6px 8px 8px; }
  .overview-contract-panel > .section-head h3 { font-size: 14px; }
  .overview-contract-panel .overview-contract-controls input { min-height: 40px; }
  .overview-contract-panel .overview-audience-switch button { min-height: 36px; }
}

/* A compact mobile bar opens the shared navigation in a left-hand sheet. */
.mobile-navigation-toggle, .mobile-navigation-title { display: none; }
.mobile-navigation { padding: 0; border: 0; margin: 0; width: min(280px, calc(100vw - 40px)); max-width: none; height: 100dvh; max-height: none; color: #173a5c; background: #fff; }
.mobile-navigation::backdrop { background: rgba(15, 30, 46, .32); }
.mobile-navigation[open] { animation: mobile-navigation-enter 200ms ease-out; }
.mobile-navigation-sheet { display: flex; flex-direction: column; min-height: 100%; padding: env(safe-area-inset-top) 12px max(12px, env(safe-area-inset-bottom)); }
.mobile-navigation-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 76px; border-bottom: 1px solid #e6edf3; margin-bottom: 12px; }
.mobile-navigation-head .brand { gap: 6px; text-decoration: none; }
.mobile-navigation-head .brand .brand-icon { width: 38px; height: 38px; }
.mobile-navigation-head .brand strong { font-size: 16px; font-weight: 600; }
.mobile-navigation-head .brand small { font-size: 10px; font-weight: 400; }
#mobile-navigation-close { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #536476; }
#mobile-navigation-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.mobile-navigation .sidebar { position: static; height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; overflow: visible; }
.mobile-navigation .side-nav { display: grid; gap: 4px; overflow: visible; }
.mobile-navigation .side-nav button { display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 44px; padding: 8px 10px; gap: 10px; border: 0; border-radius: 7px; background: transparent; text-align: left; white-space: normal; box-shadow: none; }
.mobile-navigation .side-nav button.active { background: #edf5fc; color: #155d99; }
.mobile-navigation .side-nav button:hover { background: #f0f5f9; }
.mobile-navigation .side-nav .nav-copy { display: block; }
.mobile-navigation .side-nav .nav-copy strong { font-size: 13px; font-weight: 500; }
.mobile-navigation .side-nav .nav-copy small, .mobile-navigation .side-nav button::after { display: none; }
.mobile-navigation .side-nav .nav-icon { width: 22px; height: 22px; }
.mobile-navigation .side-nav .nav-icon svg { width: 20px; height: 20px; stroke-width: 1.6; }
.mobile-navigation-footer { margin-top: auto; padding-top: 24px; }
.mobile-navigation-footer .install-build { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; background: #f4f7fa; color: #536476; font-size: 12px; font-weight: 400; }
.mobile-navigation-footer .install-build[hidden] { display: none; }
.mobile-navigation-footer .install-label { display: inline; }
body.mobile-navigation-open { overflow: hidden; }
@keyframes mobile-navigation-enter { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@media (max-width: 800px) {
  .mobile-build-navigation .site-header { height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(4px, env(safe-area-inset-right)) 0 max(2px, env(safe-area-inset-left)); align-items: center; gap: 2px; }
  .mobile-build-navigation .mobile-navigation-toggle { display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; flex: none; padding: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; }
  .mobile-build-navigation .mobile-navigation-title { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; color: #536476; }
  .mobile-build-navigation .header-right { flex-wrap: nowrap; gap: 0; }
  .mobile-build-navigation .header-right :is(.app-launcher-toggle, .account-toggle) { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 8px; border: 0; background: transparent; box-shadow: none; }
  .mobile-build-navigation .account-toggle #account-business-logo { width: 28px; height: 28px; }
  .mobile-build-navigation .app-launcher-toggle svg { width: 20px; height: 20px; }
  .mobile-build-navigation .app-launcher { top: calc(52px + env(safe-area-inset-top)); max-height: calc(100dvh - 64px - env(safe-area-inset-top)); }
  .mobile-build-navigation .account-menu { right: 0; max-height: calc(100dvh - 60px - env(safe-area-inset-top)); overflow-y: auto; }
  .mobile-build-navigation .content { padding-top: 8px; }
  .mobile-build-navigation .overview-project-focus { scroll-margin-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-navigation[open] { animation: none; }
  .sidebar, .side-nav button, .side-nav .nav-icon, .side-nav .nav-icon svg, .side-nav .nav-copy strong { transition: none; }
}

/* Project shortcuts stay within thumb reach on the overview. */
.project-quick-tools {
  position: fixed;
  right: max(15px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}
.project-quick-tools[hidden], .project-quick-menu[hidden] { display: none !important; }
.project-quick-toggle {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border: 1px solid #0d5489;
  border-radius: 50%;
  background: #125b91;
  color: #fff;
  box-shadow: 0 7px 22px #173a5c55;
  touch-action: manipulation;
  user-select: none;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.project-quick-toggle:hover, .project-quick-toggle:focus-visible { background: #0d4a7a; box-shadow: 0 10px 26px #173a5c66; }
.project-quick-toggle:active { transform: scale(.93); }
.project-quick-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; transition: transform .18s ease; }
.project-quick-toggle[aria-expanded="true"] svg { transform: rotate(45deg); }
.project-quick-menu {
  width: min(280px, calc(100vw - 30px));
  max-height: min(68dvh, 480px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #b8ccdd;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 12px 35px #173a5c40;
  animation: quick-menu-in .15s ease-out;
}
.project-quick-menu-head { display: grid; gap: 1px; min-width: 0; padding: 7px 9px 9px; border-bottom: 1px solid #e3ebf2; }
.project-quick-menu-head small { color: #5c7081; font-size: 11px; }
.project-quick-menu-head strong { overflow: hidden; color: #102d49; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.project-quick-tool-actions { display: grid; gap: 2px; padding: 6px 0; }
.project-quick-tool-actions button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #153551;
  text-align: left;
  font-size: 13px;
}
.project-quick-tool-actions button:hover, .project-quick-tool-actions button:focus-visible { background: #eaf3fa; box-shadow: none; }
.project-quick-action-icon { display: inline-grid; flex: 0 0 22px; place-items: center; color: #12639c; }
.project-quick-action-icon svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.project-quick-configure { width: 100%; min-height: 39px; border: 0; border-top: 1px solid #e3ebf2; border-radius: 0; background: transparent; color: #416079; text-align: left; font-size: 12px; }
.project-quick-configure:hover, .project-quick-configure:focus-visible { background: #f0f6fb; box-shadow: none; }
.project-quick-settings { width: min(470px, calc(100vw - 24px)); max-height: min(85dvh, 700px); overflow-y: auto; padding: 18px; border: 1px solid #bdd0e2; border-radius: 15px; color: #153551; background: #fff; box-shadow: 0 22px 60px #102c4660; }
.project-quick-settings::backdrop { background: #10263888; }
.project-quick-settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-quick-settings-head h2 { margin: 2px 0 0; font-size: 20px; }
.project-quick-settings-head button { display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 24px; }
.project-quick-settings > p { margin: 10px 0 14px; color: #52677a; font-size: 13px; }
.project-quick-settings-list { display: grid; gap: 7px; }
.project-quick-settings-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; padding: 5px 7px 5px 11px; border: 1px solid #d7e3ee; border-radius: 9px; background: #f8fbfd; }
.project-quick-settings-row label { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 650; font-size: 13px; }
.project-quick-settings-row input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; }
.project-quick-order-buttons { display: flex; gap: 4px; }
.project-quick-order-buttons button { display: grid; place-items: center; min-width: 38px; min-height: 40px; padding: 0; font-size: 18px; }
.project-quick-settings > .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }
@keyframes quick-menu-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 600px) {
  .project-quick-tools { right: max(12px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
  .project-quick-menu { width: min(270px, calc(100vw - 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .project-quick-toggle, .project-quick-toggle svg { transition: none; }
  .project-quick-menu { animation: none; }
}
/* Mobile customer and project lists put records ahead of page chrome. */
@media (max-width: 600px) {
  .content:has(#view-customers:not([hidden])),
  .content:has(#view-projects:not([hidden])) { padding: 8px 7px 40px; }
  #view-customers .customer-layout > .card:first-child,
  #view-projects .project-catalog { padding: 10px; min-width: 0; }
  #view-customers .customer-layout .section-head,
  #view-projects .project-catalog .section-head { margin-bottom: 8px; gap: 7px; }
  #view-customers .customer-toolbar { width: 100%; }
  #view-customers .customer-toolbar input,
  #view-projects .project-catalog .section-head input { min-width: 0; max-width: none; min-height: 44px; }
  #view-customers .customer-entry-grid,
  #view-customers .customer-entry-grid.has-empty { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  #view-customers #show-customer-form { flex-direction: row; justify-content: flex-start; min-height: 64px; padding: 8px 11px; gap: 10px; text-align: left; }
  #view-customers #show-customer-form .entry-add-icon { width: 40px; height: 40px; flex: 0 0 40px; }
  #view-customers #show-customer-form .entry-add-icon svg { width: 23px; height: 23px; }
  #view-customers #show-customer-form strong { font-size: 15px; }
  #view-customers #show-customer-form small { display: none; }
  #view-customers .customer-entry-grid .list-row { min-height: 66px; padding: 10px 12px; gap: 3px; }
  #view-customers .customer-entry-grid .list-row strong { font-size: 14px; line-height: 1.25; }
  #view-customers .customer-entry-grid .list-row small { font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
  #view-projects .project-catalog .section-head { flex-wrap: nowrap; }
  #view-projects #project-stage-filter { width: 116px; min-width: 116px; min-height: 44px; margin: 0; padding-inline: 7px; }
  #view-projects .project-catalog .section-head input { flex: 1; width: 100%; }
  #view-projects .project-catalog-body,
  #view-projects .project-catalog-list { gap: 7px; }
  #view-projects #show-project-form { min-height: 64px; padding: 8px 11px; gap: 10px; }
  #view-projects #show-project-form .entry-add-icon { width: 40px; height: 40px; flex: 0 0 40px; }
  #view-projects #show-project-form .entry-add-icon svg { width: 23px; height: 23px; }
  #view-projects #show-project-form strong { font-size: 15px; }
  #view-projects .project-catalog-row { grid-template-columns: 36px minmax(0,1fr); gap: 4px 9px; min-height: 72px; padding: 9px 10px 9px calc(10px + var(--project-depth, 0) * 10px); }
  #view-projects .project-row-icon { width: 36px; height: 36px; font-size: 20px; }
  #view-projects .project-row-icon svg { width: 20px; height: 20px; }
  #view-projects .project-row-main { gap: 3px; }
  #view-projects .project-row-main strong { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
  #view-projects .project-row-main small { font-size: 11px; }
  #view-projects .project-row-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; text-align: left; }
  #view-projects .project-row-meta strong,
  #view-projects .project-row-meta small { font-size: 11px; line-height: 1.25; }
}

/* Library cards keep specifications available without making the list tall. */
.contract-option-details { min-width: 0; }
.contract-option-details summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 3px 0; color: #394e62; cursor: pointer; list-style: none; }
.contract-option-details summary::-webkit-details-marker { display: none; }
.contract-option-details summary:focus-visible { outline: 2px solid #2a7bb8; outline-offset: 2px; border-radius: 4px; }
.contract-option-teaser { display: -webkit-box; min-width: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.contract-option-detail-action { flex: none; color: #155d99; font-size: 11px; font-weight: 750; white-space: nowrap; }
.contract-option-details .when-open, .contract-option-details[open] .when-closed,
.contract-option-details[open] .contract-option-teaser { display: none; }
.contract-option-details[open] .when-open { display: inline; }
.contract-option-details[open] p { margin: 0 0 8px; white-space: pre-wrap; }
.contract-option-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; }
.contract-option-meta .product-reference-link { margin: 0; }
.contract-option-meta .option-availability-badge { margin: 0; }
@media (max-width: 600px) {
  .content:has(#view-library:not([hidden])) { padding: 8px 7px 40px; }
  #view-library .library-heading { margin-bottom: 8px; padding: 0 3px; }
  #view-library .library-heading h2 { margin: 2px 0 0; font-size: 18px; }
  #view-library .library-heading p { display: none; }
  #view-library .contract-options-panel { gap: 8px; padding: 10px; }
  #view-library .contract-options-panel .section-head { align-items: center; gap: 8px; padding-top: 0; border-top: 0; }
  #view-library .contract-options-panel .section-head h3 { margin: 0; font-size: 15px; }
  #view-library .contract-options-panel .section-head p { display: none; }
  #view-library #new-contract-option { flex: none; min-height: 44px; padding-inline: 9px; }
  #view-library #contract-option-search { width: 100%; max-width: none; min-height: 44px; }
  #view-library .contract-option-list { gap: 7px; }
  #view-library .contract-option-row { gap: 5px; padding: 9px 10px; }
  #view-library .contract-option-row strong { margin: 3px 0 0; font-size: 13px; line-height: 1.3; }
  #view-library .contract-option-row .actions { gap: 6px; }
  #view-library .contract-option-row .actions button { min-height: 44px; }
}

/* The schedule timeline and its selected item share a compact inspection flow. */
.schedule-gantt-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 10px; border-bottom: 1px solid #dce6ef; color: #63798c; font-size: 11px; }
.schedule-gantt-tools > div { display: flex; gap: 5px; }
.schedule-gantt-tools button { display: grid; place-items: center; width: 34px; height: 34px; min-height: 34px; padding: 0; border: 1px solid #c7d8e8; border-radius: 8px; background: #fff; }
.schedule-gantt-tools button:disabled { opacity: .42; }
.schedule-gantt-tools svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.schedule-gantt-scroll { scrollbar-width: thin; touch-action: pan-x pan-y; }
.schedule-gantt-bar.is-selected, .schedule-gantt-label.is-selected, .schedule-item-main.is-selected, .calendar-entry.is-selected, .schedule-day-item.is-selected { outline: 2px solid #155d99; outline-offset: -2px; background-color: #dceafb; color: #123b63; }
.schedule-gantt-bar.is-selected { background-color: #123e68; color: #fff; }
.schedule-selected-detail { min-width: 0; margin: 12px 0; padding: 15px; border-color: #8fb7d9; background: #f8fbff; }
.schedule-selected-detail[hidden] { display: none; }
.schedule-selected-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.schedule-selected-head > div:first-child { min-width: 0; }
.schedule-selected-head h3 { margin: 3px 0 9px; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.schedule-selected-actions { display: flex; flex: none; gap: 6px; }
.schedule-selected-actions .icon-action { flex-basis: 44px; width: 44px; height: 44px; min-height: 44px; border: 1px solid #bdd2e5; border-radius: 8px; background: #fff; color: #155d99; }
.schedule-selected-date { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; color: #183e61; font-size: 13px; font-weight: 650; }
.schedule-selected-date svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.schedule-selected-date em { padding: 3px 6px; border-radius: 5px; background: #e5e9ed; color: #586b7a; font-size: 10px; font-style: normal; }
.schedule-selected-meta { margin: 3px 0; color: #496479; font-size: 12px; overflow-wrap: anywhere; }
.schedule-selected-meta strong { color: #153b60; }
.schedule-selected-description { margin: 9px 0 0; padding-top: 9px; border-top: 1px solid #dce6ef; color: #314f68; font-size: 12px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .schedule-list-panel { padding: 10px; }
  .schedule-list-panel .section-head { margin-bottom: 5px; }
  .schedule-list-panel h2 { font-size: 16px; }
  .schedule-item-row { align-items: center; flex-direction: row; gap: 0; padding: 2px 0; }
  .schedule-item-main { min-height: 52px; gap: 2px; padding: 7px 6px; }
  .schedule-item-main strong { font-size: 13px; line-height: 1.25; }
  .schedule-item-main small { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 11px; line-height: 1.3; }
  .schedule-gantt-header, .schedule-gantt-row { grid-template-columns: 150px minmax(0,1fr); }
  .schedule-gantt-header { min-height: 34px; }
  .schedule-gantt-row { min-height: 41px; }
  .schedule-gantt-row.is-project { min-height: 44px; }
  .schedule-gantt-label { padding: 4px 6px; }
  .schedule-gantt-row:not(.is-project) .schedule-gantt-label { padding-left: 8px; }
  .schedule-gantt-group > .schedule-gantt-row.is-project .schedule-gantt-label { padding-left: calc(6px + var(--project-depth, 0) * 8px); }
  .schedule-gantt-row.is-project .schedule-gantt-label small { padding-left: 0; }
  .schedule-gantt-bar { height: 24px; padding: 3px 5px; }
  .schedule-selected-detail { padding: 11px; }
}
@media print {
  body.printing-schedule .schedule-gantt-tools { display: none; }
  body.printing-schedule .schedule-gantt-inner { min-width: 0 !important; }
}

/* Keep project analytics and access management usable in a narrow viewport. */
.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; }
.analytics-heading-copy { min-width: 0; }
.analytics-header .analytics-project-picker { position: relative; display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; border: 1px solid #b4c7da; border-radius: 9px; background: #fff; color: #175988; cursor: pointer; }
.analytics-project-picker:hover, .analytics-project-picker:focus-within { border-color: #2774ae; background: #edf5fc; }
.analytics-project-picker:focus-within { outline: 3px solid #9fc7eb; outline-offset: 2px; }
.analytics-project-picker svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.analytics-header .analytics-project-picker select { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; }

@media (max-width: 650px) {
  .analytics-header { display: flex; align-items: center; gap: 10px; min-height: 0; padding: 13px 14px; margin-bottom: 8px; }
  .analytics-header h2 { margin: 2px 0; font-size: 19px; line-height: 1.16; }
  .analytics-header p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; font-size: 11px; line-height: 1.3; }
  .analytics-header .eyebrow { font-size: 10px; }
  .analytics-header .analytics-project-picker { width: 44px; margin-left: auto; }
  .analytics-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
  .analytics-stats .card { gap: 2px; min-height: 61px; padding: 8px 10px; border-radius: 9px; }
  .analytics-stats small { font-size: 10px; line-height: 1.2; }
  .analytics-stats strong { font-size: 18px; line-height: 1.2; }
  .analytics-stats .card > span { display: none; }
  .analytics-progress, .analytics-breakdowns > .card, .analytics-task-panel { padding: 14px; margin-bottom: 9px; }
  .analytics-progress .section-head { gap: 6px; margin-bottom: 10px; }
  .analytics-progress .section-head h3 { margin: 0; }
  .analytics-progress .section-head p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.25; }
  .analytics-progress .section-head button { flex: 0 0 auto; padding: 8px 9px; font-size: 11px; }
  #analytics-progress-bars { gap: 10px; }
  .analytics-progress-row > div:first-child { gap: 3px 7px; margin-bottom: 3px; }
  .analytics-meter { height: 8px; }
  .analytics-risk { margin-top: 9px; padding: 7px 9px; }
  .resource-sections { gap: 9px; }
  .resource-sections > .card { padding: 13px; }
  .resource-sections .section-head { margin-bottom: 8px; }
  .resource-sections h2 { margin: 0; font-size: 17px; line-height: 1.2; }
  .resource-sections .section-head p { margin-top: 3px; font-size: 11px; line-height: 1.35; }
  .resource-team-panel > summary strong { font-size: 17px; }
  .resource-team-panel > summary small { font-size: 11px; }
  .resource-team-panel > .helper { font-size: 11px; line-height: 1.35; }
  .resource-list-items { gap: 6px; }
  .resource-control-row { min-height: 0; padding: 8px 9px; gap: 5px 7px; border-radius: 8px; }
  .resource-control-row strong { font-size: 13px; line-height: 1.2; }
  .resource-control-row small { font-size: 10px; }
  .resource-control-row > div { min-width: 0; width: 100%; margin-right: 0; gap: 2px; }
  .resource-control-row > div small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .team-access-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .team-access-row > div { grid-column: 1; grid-row: 1; }
  .team-access-row .access-status { grid-column: 1; grid-row: 2; justify-self: start; padding: 3px 7px; font-size: 10px; }
  .team-access-row button, .team-access-row .resource-owner { grid-column: 2; grid-row: 1 / span 2; }
  .team-access-row button { min-height: 44px; max-width: 105px; padding: 5px 7px; font-size: 11px; line-height: 1.15; }
  .team-access-row .resource-owner { max-width: 65px; text-align: right; }
  .partner-access-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .partner-access-row > div { grid-column: 1 / -1; }
  .partner-access-row > label { grid-column: 1; font-size: 10px; }
  .partner-access-row select { min-width: 0; min-height: 40px; }
  .partner-access-row .access-status { grid-column: 2; grid-row: 1; padding: 3px 7px; font-size: 10px; }
  .partner-access-row button { grid-column: 2; min-height: 44px; max-width: 100px; padding: 5px 7px; font-size: 11px; line-height: 1.15; }
  .resource-partner-actions { width: 100%; }
  .resource-partner-actions button { min-height: 40px; font-size: 11px; }
  .manual-partner-row > div { width: auto; flex: 1 1 auto; }
  .resource-sections .section-head a { min-height: 40px; padding: 6px 9px; font-size: 11px; }
  .resource-grid { grid-template-columns: 1fr; gap: 8px; }
  .resource-grid > .entry-add-card { flex-direction: row; justify-content: flex-start; gap: 9px; min-height: 56px; padding: 8px 10px; text-align: left; }
  .resource-grid > .entry-add-card .entry-add-icon { width: 36px; height: 36px; flex: 0 0 36px; }
  .resource-grid > .entry-add-card svg { width: 21px; height: 21px; }
  .resource-grid > .entry-add-card strong { font-size: 13px; }
  .resource-grid > .entry-add-card small { display: none; }
}

/* Shared, opt-in help for instructional copy throughout the Build workspace. */
button.context-help-trigger { display: inline-flex; align-items: baseline; gap: 7px; min-height: 32px; max-width: 100%; padding: 2px 0; border: 0; border-radius: 3px; background: transparent; color: inherit; font: inherit; font-weight: inherit; line-height: inherit; text-align: left; white-space: normal; box-shadow: none; }
button.context-help-trigger:hover, button.context-help-trigger:active { background: transparent; box-shadow: none; transform: none; }
.context-help-trigger:hover .context-help-title, .context-help-trigger[aria-expanded="true"] .context-help-title { text-decoration: underline dotted; text-underline-offset: 4px; }
.context-help-icon { display: inline-grid; place-items: center; flex: 0 0 17px; width: 17px; height: 17px; border: 1px solid #8ca9c0; border-radius: 50%; color: #456b88; font: 700 11px/1 Arial,sans-serif; align-self: center; }
.context-help-panel { position: fixed; inset: auto; box-sizing: border-box; max-width: calc(100vw - 24px); max-height: min(360px,calc(100dvh - 32px)); overflow: auto; overscroll-behavior: contain; z-index: 10000; margin: 0; padding: 14px 16px; border: 1px solid #adc5d9; border-radius: 10px; background: #fff; color: #26445e; box-shadow: 0 10px 32px #14364f30; font: 400 14px/1.6 Arial,sans-serif; text-align: left; }
.context-help-panel p, .context-help-panel .helper { margin: 0 0 10px; color: inherit; font: inherit; }
[data-help-ready] { display: none !important; }
.context-help-copy:last-child > :last-child { margin-bottom: 0; }
.context-help-panel a { color: #075b9d; text-decoration: underline; }
#project-contract-tab .builder-heading > div:first-child { min-width: 0; }
#project-contract-tab .builder-heading .eyebrow { display: inline-block; }
#project-contract-tab .builder-heading #contract-version { display: inline-block; margin-left: 8px; vertical-align: middle; font-size: 10px; }
#project-contract-tab .contract-actions { flex-wrap: nowrap; }
#project-contract-tab .contract-actions button { white-space: nowrap; }
@media (max-width: 600px) {
  #project-contract-tab .builder-heading { gap: 10px; margin-bottom: 10px; }
  #project-contract-tab .builder-heading h2 { font-size: 18px; line-height: 1.25; margin: 3px 0; }
  #project-contract-tab .builder-heading .contract-publication-status { font-size: 12px; margin-top: 2px; }
  #project-contract-tab .contract-actions { display: flex; width: 100%; gap: 6px; justify-content: stretch; }
  #project-contract-tab .contract-actions button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 8px 5px; font-size: 11px; gap: 4px; justify-content: center; }
  #project-contract-tab .contract-actions button svg { flex: 0 0 14px; width: 14px; height: 14px; }
}
@media print {
  .context-help-panel, .context-help-icon { display: none !important; }
}

/* Account setup reuses Fordwell registration and keeps paid activation separate. */
#workspace-panel.onboarding-pending { display: block; }
.onboarding-pending #build-sidebar { display: none; }
#login-panel { max-width: 620px; }
#login-panel h1 { font-size: clamp(25px, 5vw, 34px); line-height: 1.18; margin: 12px 0; }
.onboarding-intro { color: #415b73; line-height: 1.6; }
.onboarding-tabs { display: flex; gap: 6px; padding: 5px; margin: 22px 0 18px; border-radius: 10px; background: #edf3f8; }
.onboarding-tabs button { flex: 1; min-width: 0; min-height: 44px; border-color: transparent; background: transparent; }
.onboarding-tabs button[aria-pressed="true"] { background: #fff; border-color: #97b6ce; box-shadow: 0 2px 5px #132b4f12; }
.onboarding-note { color: #52677b; font-size: 13px; line-height: 1.55; }
.onboarding-text-link { display: inline-block; margin-top: 18px; font-size: 13px; text-decoration: underline; }
.onboarding-steps { list-style: none; padding: 0; margin: 0 0 22px; counter-reset: setup; }
.onboarding-steps li { position: relative; padding: 0 0 18px 42px; counter-increment: setup; }
.onboarding-steps li::before { content: counter(setup); position: absolute; left: 0; top: -3px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e8f2fb; color: #125b90; font-weight: 700; }
.onboarding-steps p { margin: 6px 0 0; color: #415b73; font-size: 14px; line-height: 1.6; }
.onboarding-primary { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 10px 16px; border-radius: 8px; background: #145184; color: #fff; text-decoration: none; font-weight: 700; text-align: center; }
.onboarding-primary:hover { background: #103d64; }
.onboarding-primary:focus-visible { outline: 3px solid #2781c5; outline-offset: 3px; }
#build-setup-guide > .onboarding-primary, .onboarding-return { width: 100%; box-sizing: border-box; }
.onboarding-team { margin-top: 22px; font-size: 13px; line-height: 1.6; }
.onboarding-team summary { cursor: pointer; font-weight: 700; }
.onboarding-empty { margin: 18px 0; padding: 18px; background: #f4f8fb; border-radius: 10px; line-height: 1.6; }
.onboarding-empty h2 { font-size: 20px; }
.onboarding-activation { max-width: 760px; margin: 20px auto; line-height: 1.6; }
.onboarding-upgrade { background: #edf4fa; border: 1px solid #c6d8e7; border-radius: 10px; padding: 16px; margin: 20px 0; }
.onboarding-upgrade p { margin-bottom: 0; }
.onboarding-activation .actions { flex-wrap: wrap; align-items: center; }
.onboarding-activation .actions a { padding: 10px; }
@media (max-width: 480px) { #login-panel { padding: 20px 16px; } .onboarding-tabs button { padding: 9px 7px; font-size: 13px; } .onboarding-steps li { padding-left: 37px; } }
