/* Anchor3D OS. Built phone first (12/03/2026): one working column; under 1024px the menu is a drawer behind the bar's
   button and a phone gets the sections as a tab bar; from 1024px the menu is a fixed left column. Dense tables for
   operators, tiles for the summary; a list reads as cards where its box is narrow. See "The shell" and the sections
   after it at the end of this file. */
/* Light and dark mode are the FY2027 planner's (Dashboards/reports/FY2027_Plan): its palette, dark first, following
   the system until someone picks one with the sun/moon button (static/theme.js), which then sticks on this browser. */
:root{
  --bg:#0f141b; --panel:#1a212c; --panel2:#212a37; --ink:#e6ebf2; --mut:#96a2b3; --line:#2a3543; --line2:#344152; --chip:#232d3a;
  --accent:#7ea6e6; --accent-ink:#0f141b; --good:#5cc07b; --goodbg:#173021; --warn:#e3a53f; --warnbg:#33280f; --bad:#e26a61; --badbg:#331a18;
  --vdc:#a487f2; --fs:#ec8a3c; --bim:#4a93ec; --lv:#199e70;
  --sans:"Source Sans 3",system-ui,-apple-system,"Segoe UI",sans-serif; --mono:"JetBrains Mono",ui-monospace,Consolas,monospace;
  --brand-blue:var(--ink); --mark-dark:block; --mark-light:none;
  color-scheme:dark;
}
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]){
  --bg:#f3f5f8; --panel:#ffffff; --panel2:#f6f8fb; --ink:#141a22; --mut:#5c6875; --line:#d7dde6; --line2:#c3ccd8; --chip:#e9eef5;
  --accent:#2f5f9e; --accent-ink:#ffffff; --good:#1d7f3f; --goodbg:#e2f3e7; --warn:#a86a00; --warnbg:#fbefd6; --bad:#b83a31; --badbg:#fbe3e0;
  --vdc:#7a5cd6; --fs:#e0711f; --bim:#1f6fd1; --lv:#1baf7a; color-scheme:light; --brand-blue:#013046; --mark-dark:none; --mark-light:block}}
:root[data-theme="light"]{
  --bg:#f3f5f8; --panel:#ffffff; --panel2:#f6f8fb; --ink:#141a22; --mut:#5c6875; --line:#d7dde6; --line2:#c3ccd8; --chip:#e9eef5;
  --accent:#2f5f9e; --accent-ink:#ffffff; --good:#1d7f3f; --goodbg:#e2f3e7; --warn:#a86a00; --warnbg:#fbefd6; --bad:#b83a31; --badbg:#fbe3e0;
  --vdc:#7a5cd6; --fs:#e0711f; --bim:#1f6fd1; --lv:#1baf7a; color-scheme:light; --brand-blue:#013046; --mark-dark:none; --mark-light:block}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:0.9375rem/1.5 var(--sans);overflow-wrap:break-word}
a{color:var(--accent);text-decoration:none} a:hover{text-decoration:underline}
nav.side{background:var(--panel);padding:18px 12px;display:flex;flex-direction:column;gap:2px}
nav.side .brand{font-weight:800;font-size:17px;padding:4px 10px 14px;letter-spacing:-.01em}
nav.side .brand small{display:block;font-weight:400;color:var(--mut);font-size:12px}
nav.side a{color:var(--ink);padding:7px 10px;border-radius:6px}
nav.side a.on{background:var(--chip);font-weight:600}
nav.side .foot{margin-top:auto;font-size:13px;color:var(--mut);padding:10px}
.scope-bar{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin:-6px 0 6px;font-size:13px;color:var(--mut)}
.scope-bar select{font-weight:600}
h1{font-size:clamp(1.3125rem,1.1rem + 1vw,1.5rem);line-height:1.2;margin:0 0 4px} h2{font-size:17px;margin:26px 0 10px} h3{font-size:15px;margin:14px 0 6px}
h1,h2,h3{text-wrap:balance} p,li{text-wrap:pretty}
.sub{color:var(--mut);margin:0 0 18px}
/* two tiles to a row on a phone; a tile's figure shrinks to fit a narrow tile (container units) */
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr));gap:10px}
.tile{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:12px 14px;min-width:0;container-type:inline-size}
.tile .k{font-size:12px;color:var(--mut);text-transform:uppercase;letter-spacing:.05em}
.tile .v{font:600 22px var(--mono);font-variant-numeric:tabular-nums;margin-top:2px}
.tile .v{font-size:clamp(1.0625rem,13.5cqi,1.375rem)}
.tile .s{font-size:13px;color:var(--mut)}
.card{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:14px 16px;min-width:0}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(380px,100%),1fr));gap:14px}
/* chart cards (Trends, Plan vs actual): never narrower than two blocks (Brady 11/05) */
.grid-wide{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(540px,100%),1fr));gap:14px}
.grid-wide svg text{font-size:16px} .grid-wide .pt .pt-l{font-size:16px} .grid-wide .legend{font-size:14px}
.tablewrap{overflow-x:auto;background:var(--panel);border:1px solid var(--line);border-radius:8px}
table{border-collapse:collapse;width:100%;font-size:14px}
th,td{padding:7px 10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
th{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--mut);background:var(--chip);white-space:nowrap}
td.n,th.n{text-align:right;font-family:var(--mono);font-variant-numeric:tabular-nums;white-space:nowrap}
tr.total td{font-weight:700;border-top:2px solid var(--ink)}
.pill{display:inline-block;padding:1px 8px;border-radius:99px;font-size:12px;background:var(--chip);white-space:nowrap}
.pill.good{color:var(--good);background:var(--goodbg)} .pill.warn{color:var(--warn);background:var(--warnbg)} .pill.bad{color:var(--bad);background:var(--badbg)}
.div-FS{border-left:4px solid var(--fs)} .div-VDC{border-left:4px solid var(--vdc)} .div-BIM{border-left:4px solid var(--bim)} .div-LV{border-left:4px solid var(--lv)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;text-align:center;background:var(--accent);color:var(--accent-ink);border:0;border-radius:6px;padding:7px 12px;font:600 14px var(--sans);cursor:pointer}
.btn.ghost{background:transparent;color:var(--accent);border:1px solid var(--line)}
.btn.small{padding:3px 9px;font-size:13px}
.btn.danger{background:var(--bad);color:var(--accent-ink)} a.delete-link{color:var(--bad)}
.btn:hover{text-decoration:none;filter:brightness(1.05)}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
form.inline{display:inline}
input,select,textarea{font:inherit;color:var(--ink);background:var(--panel2);border:1px solid var(--line2);border-radius:6px;padding:6px 8px;max-width:100%}
#themeBtn{display:inline-flex;align-items:center;justify-content:center;padding:5px 8px}
#themeBtn svg{width:18px;height:18px;display:block}
/* Brand (Brady, 11/03): the anchor mark beside the name, "OS" in Anchor3D orange, the active page marked in orange.
   The name is Anchor3D navy (#013046, the anchor in the logo); in dark mode the light mark (white anchor, orange rope,
   static/tools/brand/anchor-mark-light.png) and the name stays white (Brady 11/03: navy is for light mode only). Both marks
   are in the page; --mark-dark / --mark-light show the one for the theme, and theme.js swaps the tab icon the same way. */
:root{--brand:#f46900}
.brand-link,nav.side a.brand-link{display:flex;align-items:center;gap:10px;color:var(--brand-blue);text-decoration:none;white-space:nowrap}
.brand-link:hover{text-decoration:none}
.brand-mark{width:36px;height:36px;flex:none;display:block}
.brand-os{color:var(--brand)}
nav.side .brand{padding:2px 8px 16px}
nav.side a.on{box-shadow:inset 3px 0 0 var(--brand)}
nav.side .foot .row{gap:8px}
.login-mark{display:block;width:72px;height:72px;margin:0 auto 10px}
.brand-mark.mark-dark,.login-mark.mark-dark{display:var(--mark-dark)} .brand-mark.mark-light,.login-mark.mark-light{display:var(--mark-light)}
.login-box h1{text-align:center;color:var(--brand-blue)} .login-box .sub{text-align:center}
input[type=number]{font-family:var(--mono);text-align:right;width:100px}
textarea{width:100%;min-height:80px}
label{font-size:13px;color:var(--mut)}
.form-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(230px,100%),1fr));gap:10px 14px}
.form-grid .f{display:flex;flex-direction:column;gap:3px}
fieldset{border:1px solid var(--line);border-radius:8px;padding:10px 14px;margin:0 0 12px;background:var(--panel)}
legend{font-weight:700;padding:0 6px}
.msgs{list-style:none;padding:0;margin:0 0 14px} .msgs li{padding:8px 12px;border-radius:6px;background:var(--chip);margin-bottom:6px}
.msgs li.error{color:var(--bad)} .msgs li.success{color:var(--good)}
.muted{color:var(--mut)} .err{color:var(--bad)}
svg text{fill:var(--mut);font:11px var(--sans)}
.legend{display:flex;gap:14px;font-size:13px;color:var(--mut);flex-wrap:wrap} .legend svg.swatch{width:14px;height:3px;vertical-align:middle;margin-right:5px}
.doc{background:#fff;color:#18212b;max-width:820px;padding:40px 46px;border:1px solid var(--line)}
.doc .doc-head{display:flex;justify-content:space-between;border-bottom:2px solid #18212b;padding-bottom:12px;margin-bottom:18px}
.doc .brand{font-weight:800;font-size:20px} .doc .right{text-align:right} .doc h1{font-size:20px;margin:0} .doc h2{font-size:15px}
.doc table th{background:#eef2f6;color:#5d6b79} .doc td,.doc th{border-color:#d9e0e7}
@media print{nav.side,.drawer,.appbar,.tabbar,.subnav,.skip-link,.noprint,.msgs{display:none!important} .shell{display:block} main{padding:0} .doc{border:0;padding:0}}

td:first-child{white-space:nowrap}

/* One-off adjustments. These were style="" attributes, which production's Content-Security-Policy blocks
   (style-src without 'unsafe-inline'); !important keeps the precedence an inline style had. Use these, never style="",
   and put behavior in static/app.js, never in onclick/onchange attributes (script-src 'self' blocks those too). */
.mt0{margin-top:0!important} .mt8{margin-top:8px!important} .mt10{margin-top:10px!important} .mt12{margin-top:12px!important}
.mt14{margin-top:14px!important} .mt16{margin-top:16px!important} .mb12{margin-bottom:12px!important} .mb14{margin-bottom:14px!important}
details>summary{cursor:pointer;list-style:revert} details.card>summary{margin:-4px 0} details[open]>summary{margin-bottom:6px}
/* Collapsible page sections (the bid page, 11/04): the heading is the summary; data-remember keeps each one the way it was left. */
details.sec>summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0;list-style:none} details.sec>summary::-webkit-details-marker{display:none}
details.sec>summary::before{content:"";width:9px;height:9px;flex:none;border-right:2px solid var(--mut);border-bottom:2px solid var(--mut);transform:rotate(-45deg);transition:transform .15s;margin:0 2px 0 4px}
details.sec[open]>summary::before{transform:rotate(45deg);margin-top:-4px} details.sec>summary h2{display:inline;margin:0}
/* The bid page's Project details card (read-only, Edit opens the form) beside Notes and calls, which takes the same
   height and scrolls (Brady, 11/04): the notes card's inside is positioned absolutely so the row is as tall as the
   details card, never taller. */
.kv{display:grid;grid-template-columns:max-content 1fr;gap:5px 14px;font-size:13px} .kv dt{color:var(--mut)} .kv dd{margin:0;min-width:0;overflow-wrap:anywhere}
.notes-card{position:relative;min-height:260px} .notes-card .fill{position:absolute;inset:0;padding:14px 16px;display:flex;flex-direction:column}
.notes-card ul.scroll{flex:1;min-height:0;overflow:auto;margin:8px 0 0;padding-left:18px}
a.btn.delete-link,a.btn.delete-link:hover{color:var(--bad)} .mb8{margin-bottom:8px!important}
details.sec[open]>summary{margin-bottom:10px} details.sec.card>summary{margin:-4px 0} details.sec.card[open]>summary{margin-bottom:6px}
.btn:disabled,.btn[disabled]{opacity:.45;cursor:not-allowed;filter:none}
/* "Post for approval" on the proposal page: its own box, apart from Send and Save (11/04). */
.approval-opt{border:1px dashed var(--line);border-radius:8px;padding:10px 12px;background:var(--chip)} .approval-opt>label{cursor:pointer}
.locked-note details>summary{display:inline-block} .locked-note ul{padding-left:20px}
.prop-row td{vertical-align:middle} .prop-row td .row{gap:6px} .mb0{margin-bottom:0!important}
.w64{width:64px!important} .w110{width:110px!important} .w150{width:150px!important} .w100{width:100%!important} .mw720{max-width:720px!important}
.fs12{font-size:12px!important} .fs13{font-size:13px!important} .fs18{font-size:18px!important}
.nowrap{white-space:nowrap!important} .grow{flex:1!important} .between{justify-content:space-between!important} .span-all{grid-column:1/-1!important}
.stack:not(table){display:flex!important;flex-direction:column;gap:8px}   /* not a list table: class="stack" on a table means "folds into cards" (below), and flex on a table detaches its header from its columns */
.login-box{max-width:380px;margin:12vh auto;padding:0 16px} .status-line{min-height:1.5em;margin-top:8px!important}
.wide-fields input:not([type=checkbox]):not([type=date]),.wide-fields select{width:100%}
/* Per-line lists (templates/estimating/line_list.html): the proposal editor and proposal templates */
.line-list{margin:0}
.ll-rows{list-style:none;margin:0 0 6px;padding:0;display:flex;flex-direction:column;gap:6px}
.ll-row{display:grid;grid-template-columns:24px 1fr auto;gap:6px;align-items:start}
.ll-mark{color:var(--mut);text-align:right;padding-top:7px;font-variant-numeric:tabular-nums}
.ll-row textarea{min-height:0;resize:none;overflow:hidden;width:100%;line-height:1.4}
.ll-tools{display:flex;gap:2px;padding-top:2px}
.ll-tools .btn{min-width:28px;padding:3px 6px}
.ll-tools .btn:disabled{opacity:.35;cursor:default}

/* SharePoint folder browser (static/files.js): list on the left, preview on the right; stacks on a phone */
.files{margin-top:16px}
.files-crumbs{margin:4px 0 8px;font-size:14px}
.files-grid{display:grid;grid-template-columns:minmax(240px,1fr) minmax(0,2fr);gap:14px;align-items:start}
@media (max-width:900px){.files-grid{grid-template-columns:1fr}}
.files-list{background:var(--panel);border:1px solid var(--line);border-radius:8px;max-height:70vh;overflow:auto}
.files-row{display:grid;grid-template-columns:48px 1fr;column-gap:8px;width:100%;text-align:left;padding:8px 10px;border:0;
  border-bottom:1px solid var(--line);background:none;color:var(--ink);font:inherit;cursor:pointer}
.files-row:hover{background:var(--panel2)} .files-row.on{background:var(--chip)}
.files-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.files-icon{grid-row:span 2;font-size:10px;font-weight:600;color:var(--mut);border:1px solid var(--line2);border-radius:4px;
  height:30px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.files-row.is-folder .files-icon{color:var(--accent)}
.files-name{overflow-wrap:anywhere;font-size:14px} .files-meta{font-size:12px}
.files-view{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:10px 12px;min-height:200px;min-width:0}
.files-frame{width:100%;height:70vh;border:0;background:#fff;border-radius:4px}
.files-img{max-width:100%;max-height:70vh;display:block;margin:auto}
.files-text{max-height:70vh;overflow:auto;white-space:pre-wrap;font-size:12px}
.linkish{background:none;border:0;padding:0;color:var(--accent);font:inherit;cursor:pointer}
.linkish:hover{text-decoration:underline}

/* Lists with sorting, filters and bulk actions (Bids, Jobs; core/listing.py) */
th a.sort{color:inherit;text-decoration:none} th a.sort:hover{color:var(--ink)} th a.sort.on{color:var(--ink)}
th.sel,td.sel{width:28px;padding-right:0} td.name{min-width:170px}
.filters{margin:6px 0 8px} .filters select,.bulk-bar select{width:auto;max-width:240px} .w260{width:260px;max-width:100%} .w180{width:180px;max-width:100%}
.bulk-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 10px;margin:0 0 8px;border:1px solid var(--line);border-radius:8px;background:var(--panel);font-size:13px}
.bulk-bar.picked{border-color:var(--accent)}

/* The home dashboard (core/dashboard.py): a grid of cards a person arranges; narrow = one column, half = two, full = all */
.dash{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:6px}
.dash-card{display:flex;flex-direction:column;gap:6px}
.dash-card.w-s{grid-column:span 1} .dash-card.w-m{grid-column:span 2} .dash-card.w-l{grid-column:1 / -1}
@media (max-width:1100px){.dash{grid-template-columns:repeat(2,minmax(0,1fr))} .dash-card.w-m,.dash-card.w-l{grid-column:1 / -1}}
/* a phone: two columns, where only a card that is one figure takes half the row; later figures fill a gap */
@media (max-width:620px){.dash{grid-auto-flow:dense} .dash-card{grid-column:1 / -1} .dash-card.is-number{grid-column:span 1}}
.dash-card.is-number{container-type:inline-size} .dash-card.is-number .dash-v{font-size:clamp(1.0625rem,14cqi,1.5rem)}
.dash-table td:first-child{white-space:normal}
.dash-scroll{overflow-x:auto;overscroll-behavior-x:contain} .card>table td:first-child{white-space:normal}
.dash-head{display:flex;justify-content:space-between;align-items:flex-start;gap:6px;flex-wrap:wrap}
.dash-head h2{margin:0;font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--mut);font-weight:600}
.dash-head h2 a{color:inherit}
.dash-edit{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:auto;padding-top:8px;border-top:1px dashed var(--line)}
.dash-tools{display:flex;gap:4px;align-items:center} .dash-tools select{font-size:12px;padding:2px 4px}
.dash-v{font:600 24px var(--mono);font-variant-numeric:tabular-nums}
.dash-s,.dash-desc{font-size:13px;color:var(--mut);margin:0}
.dash-table{font-size:13px} .dash-table th,.dash-table td{padding:5px 6px}
.bars{display:flex;flex-direction:column;gap:5px;font-size:13px}
.bar-row{display:grid;grid-template-columns:minmax(0,38%) minmax(0,1fr) auto;gap:8px;align-items:center}
.bar-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-track{width:100%;height:10px;background:var(--chip);border-radius:2px;display:block}
.bar-track .bar{fill:var(--accent)}
.bar-v{font-family:var(--mono);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.lib{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr));gap:10px}
.lib-card{display:flex;flex-direction:column;gap:4px;align-items:flex-start}
.lib-card .btn{margin-top:auto}

/* The Schedule (projects/schedule.py): a Gantt chart and the capacity chart under it, drawn as SVG */
.sched-bar{margin:4px 0 8px;gap:14px} .sched-bar .seg{display:inline-flex;gap:4px}
.legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;color:var(--mut);margin:4px 0 8px}
.legend .key{display:inline-block;width:14px;height:10px;border-radius:2px;margin-right:-6px}
.gantt-wrap{overflow-x:auto;background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:6px 0}
.gantt-wrap .pad{padding:10px 14px}
.gantt,.capchart{display:block;font-family:var(--sans)}
.gantt text,.capchart text{font-size:12px;fill:var(--ink)}
.g-grid{stroke:var(--line);stroke-width:1} .g-weekend{fill:var(--chip);opacity:.55} .g-now{fill:var(--accent);opacity:.08}
.g-band{fill:var(--panel2)}
.gantt .g-col,.capchart .g-col{fill:var(--mut);font-size:11px} .gantt .g-col2{fill:var(--mut);font-size:10px;font-weight:600}
.gantt .g-head{font-weight:700} .gantt .g-sub{fill:var(--mut)} .gantt a text{fill:var(--accent);cursor:pointer}
.gantt a:hover text{text-decoration:underline}
.gantt .g-num{font-size:11px;font-weight:600} .gantt .g-free,.capchart .g-free{fill:var(--mut);font-size:10px}
.g-bar{stroke:none} .g-job,.legend .g-job{fill:var(--accent);background:var(--accent)}
/* Jobs take their division's color (the lists' left-border colors); bids are the job blue, internal codes gray (11/04) */
.g-job.g-div-FS,.legend .g-div-FS{fill:var(--fs);background:var(--fs)} .g-job.g-div-VDC,.legend .g-div-VDC{fill:var(--vdc);background:var(--vdc)}
.g-job.g-div-LV,.legend .g-div-LV{fill:var(--lv);background:var(--lv)} .g-job.g-div-BIM,.legend .g-div-BIM{fill:var(--bim);background:var(--bim)}
.g-job.g-div-A3D,.legend .g-div-A3D{fill:#7b8794;background:#7b8794}
.g-bid,.legend .g-bid{fill:var(--accent);background:var(--accent)} .g-int,.legend .g-int{fill:var(--line2);background:var(--line2)}
.gantt .g-barnum{font-size:10px;fill:var(--accent-ink);font-weight:600;pointer-events:none}
.g-total{fill-opacity:.85} .g-load-good,.legend .g-load-good{fill:var(--goodbg);background:var(--goodbg);stroke:var(--good)}
.g-load-warn,.legend .g-load-warn{fill:var(--warnbg);background:var(--warnbg);stroke:var(--warn)}
.g-load-bad,.legend .g-load-bad{fill:var(--badbg);background:var(--badbg);stroke:var(--bad)} .g-load-none{fill:var(--chip);stroke:var(--line2)}
.capchart .g-axis{fill:var(--mut);font-size:10px}
.c-job,.legend .c-job{fill:var(--accent);background:var(--accent)} .c-bid,.legend .c-bid{fill:#a77fd8;background:#a77fd8}
.c-int,.legend .c-int{fill:var(--line2);background:var(--line2)}
.c-open,.legend .c-open{fill:none;stroke:#a77fd8;stroke-width:1.5;stroke-dasharray:3 2;background:transparent;border:1.5px dashed #a77fd8}
.gantt .g-barnum-int{fill:var(--ink)}
.c-cap{fill:none;stroke:var(--ink);stroke-width:2;stroke-dasharray:5 3} .legend .c-cap{background:var(--ink);height:3px}
.c-cap-dot{fill:var(--ink)}
.capchart .u-good{fill:var(--good);font-weight:700} .capchart .u-warn{fill:var(--warn);font-weight:700} .capchart .u-bad{fill:var(--bad);font-weight:700}
.capchart .g-head{font-weight:700} .capchart .g-sub{fill:var(--mut)}
.sched-edit td:first-child{min-width:240px}
.g-cell{fill:transparent;cursor:pointer} .g-cell:hover{fill:var(--accent);fill-opacity:.14}
/* dragging a bar's edge across blank weeks (static/schedule.js): the preview, and no text selection meanwhile */
.g-ghost{fill:var(--accent);fill-opacity:.3;stroke:var(--accent);stroke-dasharray:4 3;pointer-events:none}
svg.gantt.dragging{cursor:ew-resize;user-select:none} svg.gantt.dragging .g-cell{cursor:ew-resize}
.block-editor{position:absolute;z-index:30;min-width:280px;max-width:360px;box-shadow:0 6px 24px rgba(0,0,0,.25)}
.block-editor h4{margin:0 0 6px;font-size:14px} .block-editor .fs13{margin:0 0 8px}
.gantt-wrap{position:relative}
/* pay applications (projects/payapps.py) */
.steps{display:flex;flex-wrap:wrap;gap:6px 18px;list-style:none;padding:0;margin:6px 0 12px;counter-reset:st}
.steps li{counter-increment:st;color:var(--mut)} .steps li::before{content:counter(st) ". "}
.steps li.on{color:var(--ink);font-weight:700} .steps li.done{color:var(--good)} .steps li.done::before{content:"\2713  "}
table.compact td,table.compact th{padding:3px 5px}
.payapp-frame{width:100%;height:78vh;border:1px solid var(--line);border-radius:8px;background:#8a8f98}
/* placing values on the GC's lien waiver form (static/waiver_fields.js) */
.waiver-edit{display:grid;grid-template-columns:minmax(300px,360px) minmax(0,1fr);gap:14px;align-items:start}
.waiver-list .tablewrap{max-height:78vh;overflow:auto}.waiver-list td:last-child{white-space:nowrap}
.waiver-list td .btn.small{padding:2px 7px}.waiver-list select{max-width:190px}
@media (max-width:900px){.waiver-edit{grid-template-columns:1fr}}
.waiver-list tr.on td{background:var(--chip)}
/* The billable list (templates/billing/billing.html): one card per invoice, laid out as the QuickBooks invoice's fields */
.bill-list{display:flex;flex-direction:column;gap:12px}
.bill-head{display:flex;justify-content:space-between;align-items:baseline;gap:4px 12px;flex-wrap:wrap;font-weight:600}
.bill-amount{display:flex;align-items:center;gap:6px 12px;flex-wrap:wrap;margin:10px 0 12px}
.bill-amount .k{font-size:12px;color:var(--mut);text-transform:uppercase;letter-spacing:.05em}
.bill-amount .v{font:700 28px var(--mono);font-variant-numeric:tabular-nums}
.bill-fields{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:6px 16px;margin:0;align-items:center}
.bill-fields dt{font-size:13px;color:var(--mut)} .bill-fields dt label{font-size:inherit}
.bill-fields dd{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;min-width:0}
.bill-val{font-weight:600;overflow-wrap:anywhere}
.bill-input{width:340px;max-width:100%}
.bill-notes{margin:12px 0 0;padding:8px 10px;border-radius:6px;background:var(--panel2);font-size:14px}
.bill-why{margin:8px 0 0}
.bill-total{margin:2px 0 0;text-align:right}
.bill-total b{font-family:var(--mono);font-variant-numeric:tabular-nums}
@media (max-width:620px){.bill-fields{grid-template-columns:1fr} .bill-fields dt{margin-top:6px}}
.offscreen{position:fixed;left:-9999px;top:0;opacity:0}
/* The Time page (templates/timekeeping/timesheet.html, static/timesheet.js) */
.ts-table th,.ts-table td{padding:6px 5px}
.ts-table td.ts-total{font-weight:600;min-width:56px}
.ts-table select{max-width:300px}
.ts-table input[name^="n_"]{width:150px}
.waiver-pages{display:flex;flex-direction:column;gap:12px}
.waiver-page{position:relative;width:100%;max-width:820px;border:1px solid var(--line);background:#fff;user-select:none}
.waiver-page img{display:block;width:100%;height:100%;pointer-events:none}
.waiver-page.placing{cursor:crosshair}
.waiver-page .wf{position:absolute;border:1.5px solid #1f6feb;background:rgba(31,111,235,.12);color:#0b3d91;font:11px/1.1 Arial,sans-serif;overflow:hidden;white-space:nowrap;cursor:move;padding:1px 2px 0;box-sizing:border-box}
.waiver-page .wf.on{border-color:#d9480f;background:rgba(217,72,15,.15);color:#8a2c06}
.waiver-page .wf.unset{border-style:dashed;border-color:#c92a2a;color:#c92a2a}

/* Schedule (Brady, 11/04): the charts are drawn with columns that fill the frame (projects/schedule.py fit_col, from
   the frame width static/schedule.js measures), at their own size otherwise; the block editor's job menu stays
   inside the box. */
.gantt-wrap svg.gantt,.gantt-wrap svg.capchart{display:block}
.block-editor .f{display:flex;flex-direction:column;gap:3px;min-width:0} .block-editor select{width:100%;max-width:100%}
.legal-box{max-width:760px;margin:40px auto;padding:0 16px} .legal-box h1{color:var(--brand-blue)} .legal-box h2{margin-top:20px;font-size:17px} .legal-box p,.legal-box li{line-height:1.5} .legal-brand .login-mark{width:48px;height:48px;margin:0 0 6px} .legal-foot{margin-top:24px;border-top:1px solid var(--line);padding-top:10px} .legal-links{text-align:center;margin-top:14px}
/* The grouped menu (Brady 11/05): a parent page and the pages under it */
nav.side a.grp{margin-top:8px;font-weight:700}
nav.side a.grp:first-of-type{margin-top:0}
nav.side a.kid{padding:5px 10px 5px 24px;font-size:14px;color:var(--mut)}
nav.side a.kid.on{color:var(--ink)}
/* The parent dashboards (core/hubs.py; Brady 11/05: cards sized to their content, charts, color) */
.hub{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px;align-items:start}
.hub-card{grid-column:span 12;padding:14px 16px}
.hub-card.span-4{grid-column:span 4} .hub-card.span-6{grid-column:span 6} .hub-card.span-8{grid-column:span 8}
@media (max-width:1180px){.hub-card.span-4{grid-column:span 6} .hub-card.span-8{grid-column:span 12}}
@media (max-width:820px){.hub-card.span-4,.hub-card.span-6,.hub-card.span-8{grid-column:span 12}}
.hub-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:10px}
.hub-head h2{font-size:17px} .hub-head h2 a{color:inherit}
.hub-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px}
.hub-metric{border-left:3px solid var(--line);padding:2px 0 2px 9px;border-radius:2px}
.hub-metric .k{font-size:11.5px;color:var(--mut);text-transform:uppercase;letter-spacing:.04em}
.hub-metric .v{font-size:21px;font-weight:700;margin:1px 0;font-variant-numeric:tabular-nums;line-height:1.2}
.hub-metric .s{font-size:12px;color:var(--mut);line-height:1.3}
.hub-metric.is-good{border-left-color:var(--good)} .hub-metric.is-good .v{color:var(--good)}
.hub-metric.is-warn{border-left-color:var(--warn)} .hub-metric.is-warn .v{color:var(--warn)}
.hub-metric.is-bad{border-left-color:var(--bad);background:var(--badbg)} .hub-metric.is-bad .v{color:var(--bad)}
.hub-chart{margin-top:12px}
.mini{display:block;overflow:visible} .mini-fixed{max-width:470px} .mini-auto{max-width:100%;height:auto} .mini text{font-size:11.5px;fill:var(--ink)} .mini .mini-l{fill:var(--mut)} .mini .mini-v{font-weight:600;font-variant-numeric:tabular-nums}
.mini .mini-k{fill:var(--mut);font-size:11px}
.mini-cap{font-size:12px;color:var(--mut);margin:8px 0 4px}
.mini-title{font-size:12.5px;font-weight:600;color:var(--ink);margin:0 0 6px} svg.mini + .mini-title{margin-top:18px}
.mini-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px 18px}
.mini-row .mini-head{display:flex;gap:8px;align-items:baseline;font-size:13px;margin-bottom:4px} .mini-row .mini-head span{color:var(--mut)}
.mini-row .mini-head b{font-size:17px}
/* The Schedule's row arrows (Brady 11/05) */
.gantt .g-fold{cursor:pointer} .gantt .g-fold text{fill:var(--mut);font-size:13px} .gantt .g-fold:hover text,.gantt .g-fold:focus text{fill:var(--ink)}
.gantt .g-move{cursor:pointer} .gantt .g-move rect{fill:var(--panel);stroke:var(--line)} .gantt .g-move text{fill:var(--ink);font-size:13px}
.gantt .g-move:hover rect,.gantt .g-move:focus rect{stroke:var(--brand)} .gantt .g-move-off{cursor:default;opacity:.3}
/* Click-to-sort headings (static/sort.js, Brady 11/05) */
th.sortable{cursor:pointer;user-select:none} th.sortable:hover,th.sortable:focus{color:var(--ink);outline:none} th[aria-sort]{color:var(--ink)}
/* The Cash chart's hover points (static/forecast.js, Brady 11/05) */
/* chart points (Brady 11/05): no tooltip - the point grows and its figure appears, bold, in the line's color */
.pt{cursor:default} .pt .pt-hit{fill:transparent} .pt .pt-dot{transition:r .12s}
.pt:hover .pt-dot{r:6.5}
.pt .pt-l{opacity:0;pointer-events:none;font-size:12px;font-weight:600;fill:inherit;paint-order:stroke;stroke:var(--panel);stroke-width:3px;stroke-linejoin:round;font-variant-numeric:tabular-nums}
.pt:hover .pt-l{opacity:1} .pt .bar{opacity:.88} .pt:hover .bar{opacity:1}
.pt-low{cursor:default} .pt-low:hover{r:7}

/* Series colors for charts with several series: a job's hours by employee or task (projects/jobdash.py, 11/15). Eight
   hues in a fixed order, the same hues stepped for each theme; checked for color-blind separation and contrast against
   both panels (the dataviz palette validator, light #ffffff and dark #1a212c). A ninth series is gray, never a new hue. */
:root{--s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#0ca30c; --s7:#9085e9; --s8:#e66767}
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]){
  --s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100; --s5:#e87ba4; --s6:#008300; --s7:#6250d6; --s8:#e34948}}
:root[data-theme="light"]{--s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100; --s5:#e87ba4; --s6:#008300; --s7:#6250d6; --s8:#e34948}
/* The job page's dashboard */
.jobdash{margin-top:14px} .dash-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 8px}
.seg{display:inline-flex;gap:4px;flex-wrap:wrap}
.jobchart{display:block;overflow:visible;height:auto;max-width:100%}
.jobchart .jc-axis{fill:var(--mut)} .jobchart .jc-level{fill:var(--ink);font-weight:600}
.pt .bar.bar-light{opacity:.38} .pt:hover .bar.bar-light{opacity:.62}
.legend svg.sw-box{width:10px;height:10px;vertical-align:middle;margin-right:5px} .legend svg.sw-line{width:16px;height:4px;vertical-align:middle;margin-right:5px}
.jobdash .legend{margin:8px 0 0}
/* Hours and rates under a billing row, and an invoice's lines (templates/billing/cover.html) */
tr.has-sub>td{border-bottom:0} tr.sub>td{background:var(--panel2);padding:4px 12px 12px;white-space:normal}
.sub-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(340px,100%),1fr));gap:8px 22px;align-items:start}
.bill-lines{margin:10px 0 4px} .sub-grid>div{min-width:0;overflow-x:auto}
table.cover{width:100%;font-size:13px;border:1px solid var(--line);border-radius:6px;border-collapse:separate;border-spacing:0;background:var(--panel)}
table.cover th{font-size:11.5px;padding:5px 9px} table.cover td{padding:4px 9px;white-space:normal}
table.cover tr.total td{border-top:1px solid var(--line2);border-bottom:0} table.cover td.n,table.cover th.n{white-space:nowrap}
/* Hours reports (templates/timekeeping/reports.html) */
.report-bar{gap:8px 10px} .report-bar label{margin-left:4px}
table.report tr.lead>td{font-weight:600} table.report tr.kid>td{font-size:13px;color:var(--mut)} table.report tr.kid>td:first-child{padding-left:30px}
.ts-table select[data-ts-task]{max-width:160px}
/* Trends: a week carried in from the old dashboards (Brady 11/18/2026: keep them, marked) */
th.carried, td.carried { background: color-mix(in srgb, var(--mut) 12%, transparent); }

/* ======================================================================================================================
   The shell (12/03/2026, Brady: "Anchor3D OS looks like crap on a phone and narrow desktop windows"). Written phone
   first: the rules here are the phone's, and the wider layouts are added by the min-width blocks after them.
     under 640px     the bar on top (Menu button, name), the open section's pages as a strip, the sections as a tab
                     bar along the bottom
     640 to 1023px   the bar and the strip; no tab bar
     1024px and up   the menu as the left column; no bar, strip or tab bar
   The Menu button opens the same menu as a drawer (static/shell.js). Anything sized for a finger keys off
   (pointer: coarse), not the width: a narrow desktop window keeps mouse-sized controls.
   ====================================================================================================================== */
:root{--bar-h:52px; --tab-h:0px; --pad:16px; --tap:24px}
@media (pointer:coarse){:root{--tap:44px}}
@media (max-width:639.98px){:root{--tab-h:58px}}
html{scroll-padding-top:calc(var(--bar-h) + env(safe-area-inset-top,0px) + 8px);scroll-padding-bottom:calc(var(--tab-h) + env(safe-area-inset-bottom,0px) + 12px)}
.shell{min-height:100vh;min-height:100dvh}
.skip-link{position:absolute;left:8px;top:-80px;z-index:100;background:var(--accent);color:var(--accent-ink);padding:8px 12px;border-radius:6px;font-weight:600}
.skip-link:focus{top:calc(8px + env(safe-area-inset-top,0px))}
main{min-width:0;padding:14px max(var(--pad),env(safe-area-inset-right,0px)) calc(40px + var(--tab-h) + env(safe-area-inset-bottom,0px)) max(var(--pad),env(safe-area-inset-left,0px))}
main:focus{outline:none}
.ico{width:24px;height:24px;display:block;flex:none}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;padding:0;border:0;border-radius:10px;background:none;color:var(--ink);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.icon-btn:hover{background:var(--chip)}

/* the bar */
.appbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:4px;height:calc(var(--bar-h) + env(safe-area-inset-top,0px));
  padding:env(safe-area-inset-top,0px) max(12px,env(safe-area-inset-right,0px)) 0 max(4px,env(safe-area-inset-left,0px));
  background:var(--panel);border-bottom:1px solid var(--line)}
@supports (backdrop-filter:blur(8px)){.appbar,.tabbar{background:color-mix(in srgb,var(--panel) 86%,transparent);backdrop-filter:saturate(1.5) blur(12px)}}
.appbar .brand-link{font-weight:800;font-size:17px;letter-spacing:-.01em;min-height:44px}
.appbar .brand-mark{width:28px;height:28px}
.appbar-badge{margin-left:auto;padding:4px 10px;font-weight:600}

/* the open section's pages, a strip that scrolls sideways */
.subnav{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain;margin:-2px calc(-1 * var(--pad)) 12px;padding:2px var(--pad)}
.subnav::-webkit-scrollbar{display:none}
.subnav a{flex:none;display:inline-flex;align-items:center;gap:6px;min-height:max(34px,var(--tap) - 4px);padding:0 13px;border-radius:99px;border:1px solid var(--line);background:var(--panel);color:var(--ink);font-size:14px;font-weight:600;white-space:nowrap;text-decoration:none}
.subnav a.on{background:var(--ink);border-color:var(--ink);color:var(--bg)}

/* the sections along the bottom of a phone */
.tabbar{display:none}
@media (max-width:639.98px){
  .tabbar{position:fixed;left:0;right:0;bottom:0;z-index:40;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);
    height:calc(var(--tab-h) + env(safe-area-inset-bottom,0px));padding:0 max(4px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(4px,env(safe-area-inset-left,0px));
    background:var(--panel);border-top:1px solid var(--line)}
  .tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;color:var(--mut);font-size:11px;font-weight:600;line-height:1;text-decoration:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
  .tabbar a span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tabbar .ico{width:22px;height:22px}
  .tabbar a.on{color:var(--ink);box-shadow:inset 0 2px 0 var(--brand)} .tabbar a.on .ico{color:var(--brand)}
}

/* the menu: a drawer under 1024px (static/shell.js opens it as a popover; the swipe is a sideways scroll with two stops) */
.drawer-close{margin-left:auto}
nav.side .brand{display:flex;align-items:center}
nav.side a{display:flex;align-items:center;gap:6px;min-height:var(--tap);text-decoration:none}
nav.side a:hover{background:var(--chip)}
@media (max-width:1023.98px){
  html.can-drawer .drawer:not(:popover-open){display:none}
  .drawer[popover]{--drawer-width:min(20em,80dvw,100dvw - 24px);--drawer-backdrop:0;
    inset:0;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:visible}
  .drawer[popover]::backdrop{background:#000;opacity:calc(var(--drawer-backdrop) / 2)}
  .drawer[popover] .drawer-scroller{position:relative;display:grid;grid-template-columns:var(--drawer-width) 100%;height:100%;
    overflow-x:scroll;overscroll-behavior:none;scrollbar-width:none;scroll-snap-type:x mandatory}
  .drawer[popover] .drawer-scroller::-webkit-scrollbar{display:none}
  .drawer[popover] .drawer-scroller::after{content:"";scroll-snap-align:end;scroll-initial-target:nearest}
  .drawer[popover] nav.side{height:100vh;height:100svh;overflow-y:auto;scroll-snap-align:start;scrollbar-width:none;border-right:1px solid var(--line);box-shadow:8px 0 32px rgba(0,0,0,.28);
    padding:calc(10px + env(safe-area-inset-top,0px)) 12px calc(14px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))}
  .drawer[popover] nav.side a{min-height:max(40px,var(--tap));font-size:1rem} .drawer[popover] nav.side a.kid{font-size:.9375rem}
  /* a browser without popovers keeps the menu in the page, as a wrapped row under the bar */
  html:not(.can-drawer) #navOpen,html:not(.can-drawer) .drawer-close{display:none}
  html:not(.can-drawer) nav.side{flex-direction:row;flex-wrap:wrap;border-bottom:1px solid var(--line)}
  html:not(.can-drawer) nav.side .brand,html:not(.can-drawer) nav.side .foot{display:none}
  html:not(.can-drawer) nav.side a.grp{margin-top:0} html:not(.can-drawer) nav.side a.kid{padding-left:10px}
}
@media (max-width:1023.98px) and (prefers-reduced-motion:no-preference){.drawer[popover] .drawer-scroller{scroll-behavior:smooth}}
/* the dimming behind the drawer follows the swipe. Inside @supports: a browser that knows @keyframes but not
   animation-timeline would otherwise hold the first frame (fully dimmed) the whole time; shell.js sets the value there. */
@supports (animation-timeline:scroll()){
  @media (max-width:1023.98px){
    .drawer[popover]{timeline-scope:--drawer-fade;animation:drawer-fade linear both;animation-timeline:--drawer-fade}
    .drawer[popover] .drawer-scroller{scroll-timeline:--drawer-fade x}
  }
  @property --drawer-backdrop{syntax:'<number>';inherits:true;initial-value:0}
  @keyframes drawer-fade{0%{--drawer-backdrop:1} 100%{--drawer-backdrop:0}}
}

@media (min-width:640px){
  :root{--pad:clamp(16px,3vw,36px)}
  main{padding-top:20px;padding-bottom:60px}
}
@media (min-width:1024px){
  .shell{display:grid;grid-template-columns:224px minmax(0,1fr)}
  .appbar,.subnav,.drawer-close{display:none}
  .drawer{grid-column:1;grid-row:1} .drawer-scroller{display:contents}
  .shell>main{grid-column:2;grid-row:1;padding-top:22px}       /* nothing else can take the page's column */
  /* the side menu stays in view (sticky, one window tall), so the name, Sign out and the light/dark button sit at the
     bottom of the window, not the page; when the window is too short the menu scrolls inside itself */
  nav.side{position:sticky;top:0;height:100vh;height:100dvh;overflow-y:auto;border-right:1px solid var(--line)}
  html{scroll-padding-top:12px}
}

/* ---------------------------------------------------------------------------------------------------- Touch and focus */
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.btn,select,input:not([type=checkbox],[type=radio],[type=range],[type=file],[type=hidden]){min-height:var(--tap)}
.btn,select,summary{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.btn:active{filter:brightness(.94)}
input[type=checkbox],input[type=radio]{width:1.0625rem;height:1.0625rem;accent-color:var(--accent);vertical-align:-2px;margin:0 4px 0 0}
details.sec>summary{min-height:var(--tap)}
@media (pointer:coarse){
  /* 16px and up: a smaller field makes an iPhone zoom the page when it is tapped */
  input,select,textarea{font-size:1rem}
  .btn{padding-inline:14px} .btn.small{font-size:14px;padding-inline:12px}
  input[type=checkbox],input[type=radio]{width:1.375rem;height:1.375rem;vertical-align:-5px;margin-right:8px}
  label:has(input[type=checkbox],input[type=radio]){display:inline-block;padding-block:10px}
  th.sel,td.sel{width:44px}
  .ll-tools .btn{min-width:44px}
  .legal-links a,.fs13>a,a.fs13{padding-block:6px;display:inline-block}
}

/* ------------------------------------------------------------------------------------------------- Tables on a phone */
/* A table wider than its box scrolls inside the box, never the page; the shading at an edge says there is more that
   way. Each box is a container, so a list can change shape by the box's own width (a half-width card on a wide page
   stacks too). class="matrix" on a table keeps its first column in view while the rest scrolls. */
.tablewrap{container:tw / inline-size;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
  background:linear-gradient(to right,var(--panel) 40%,transparent) left center / 36px 100% no-repeat local,
    linear-gradient(to left,var(--panel) 40%,transparent) right center / 36px 100% no-repeat local,
    linear-gradient(to right,rgba(0,0,0,.28),transparent) left center / 12px 100% no-repeat scroll,
    linear-gradient(to left,rgba(0,0,0,.28),transparent) right center / 12px 100% no-repeat scroll,var(--panel)}
table.matrix th:first-child,table.matrix td:first-child{position:sticky;left:0;z-index:1;background:var(--panel);box-shadow:1px 0 0 var(--line)}
table.matrix thead th:first-child{background:var(--chip);z-index:2}
/* A chart is drawn for a wide card: on a phone it keeps a width its text can be read at and scrolls sideways in its
   own box (the small charts on the section pages are drawn phone-sized already, all but the 13-week cash line). */
.chart-scroll{overflow-x:auto;overscroll-behavior-x:contain} .chart-scroll>svg{min-width:520px}
.chart-scroll.tall>svg{min-width:600px}
#fc-chart.chart-scroll>svg{min-width:780px}
.hub-chart.chart-scroll>svg{min-width:0} .hub-chart.chart-scroll>svg.mini[viewBox^="0 0 1100"]{min-width:600px}

/* Lists as cards. class="stack" on a list inside a .tablewrap: under 640px of box, each row is a card. The first cell
   (or the cells marked class="lead") is its title; a number sits under its column's heading, three to a line; any
   other value follows its heading on a line of its own; class="wide-only" on a cell leaves it off the card. The
   headings come from the heading row (static/shell.js sets data-label), and "Sort by" stands in for clicking them. */
.stack-sort{display:none;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--chip)}
.stack-sort select{flex:1;min-width:0}
@container tw (width < 640px){
  .stack-sort{display:flex}
  table.stack,table.stack>tbody,table.stack>tfoot{display:block}
  table.stack>thead{display:none}
  table.stack>*>tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 12px;position:relative;padding:13px 14px;border-bottom:1px solid var(--line)}
  table.stack>:last-child>tr:last-child{border-bottom:0}
  table.stack>*>tr>td,table.stack>tbody>tr>th{display:block;grid-column:1 / -1;min-width:0;padding:0;border:0;text-align:left;white-space:normal}
  table.stack>*>tr>td.n{grid-column:auto;font-size:.9375rem}
  table.stack>*>tr>td[data-label]::before{content:attr(data-label);color:var(--mut);font:600 .6875rem/1.3 var(--sans);text-transform:uppercase;letter-spacing:.04em}
  table.stack>*>tr>td.n[data-label]::before{display:block}
  table.stack>*>tr>td[data-label]:not(.n)::before{display:inline-block;min-width:6.5em;margin-right:8px}
  table.stack>*>tr>td.lead{font-size:1rem;font-weight:600}
  table.stack>*>tr>td.lead + td.lead{margin-top:-5px}
  table.stack>*>tr>td[data-blank],table.stack>*>tr>td.wide-only{display:none}
  table.stack>*>tr>td.nowrap{white-space:normal!important}
  table.stack>*>tr>td.sel{position:absolute;top:9px;right:10px;width:auto}
  table.stack>*>tr:has(>td.sel)>td.lead{padding-right:40px}
  table.stack>*>tr.total{background:var(--panel2);border-top:2px solid var(--line2)} table.stack>*>tr.total>td{border-top:0}
  table.stack>*>tr.sub{padding-top:0} table.stack>*>tr.has-sub{border-bottom:0}
  table.stack>*>tr>td :where(input:not([type=checkbox],[type=radio]),select,textarea){max-width:100%}
  table.stack>*>tr>td>.row,table.stack>*>tr>td>form.row{gap:8px}
  table.stack>*>tr>td>form.row>input:not([type=checkbox],[type=radio],[type=hidden]){flex:1;min-width:0}
}
/* class="stack wide" on a list with many columns (Jobs, Bids, People...): the same cards under 900px of box, so a
   tablet or a narrow desktop window gets cards, two or three across, where the table would run far off the side.
   (The rules above again for the wider box: a container query cannot share one block between two widths.) */
@container tw (width < 900px){
  table.stack.wide~.stack-sort,.stack-sort:has(~table.stack.wide).stack-sort{display:flex}
  table.stack.wide,table.stack.wide>tbody,table.stack.wide>tfoot{display:block}
  table.stack.wide>thead{display:none}
  table.stack.wide>*>tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 12px;position:relative;padding:13px 14px;border-bottom:1px solid var(--line)}
  table.stack.wide>:last-child>tr:last-child{border-bottom:0}
  table.stack.wide>*>tr>td,table.stack.wide>tbody>tr>th{display:block;grid-column:1 / -1;min-width:0;padding:0;border:0;text-align:left;white-space:normal}
  table.stack.wide>*>tr>td.n{grid-column:auto;font-size:.9375rem}
  table.stack.wide>*>tr>td[data-label]::before{content:attr(data-label);color:var(--mut);font:600 .6875rem/1.3 var(--sans);text-transform:uppercase;letter-spacing:.04em}
  table.stack.wide>*>tr>td.n[data-label]::before{display:block}
  table.stack.wide>*>tr>td[data-label]:not(.n)::before{display:inline-block;min-width:6.5em;margin-right:8px}
  table.stack.wide>*>tr>td.lead{font-size:1rem;font-weight:600}
  table.stack.wide>*>tr>td.lead + td.lead{margin-top:-5px}
  table.stack.wide>*>tr>td[data-blank],table.stack.wide>*>tr>td.wide-only{display:none}
  table.stack.wide>*>tr>td.nowrap{white-space:normal!important}
  table.stack.wide>*>tr>td.sel{position:absolute;top:9px;right:10px;width:auto}
  table.stack.wide>*>tr:has(>td.sel)>td.lead{padding-right:40px}
  table.stack.wide>*>tr.total{background:var(--panel2);border-top:2px solid var(--line2)} table.stack.wide>*>tr.total>td{border-top:0}
  table.stack.wide>*>tr.sub{padding-top:0} table.stack.wide>*>tr.has-sub{border-bottom:0}
  table.stack.wide>*>tr>td :where(input:not([type=checkbox],[type=radio]),select,textarea){max-width:100%}
  table.stack.wide>*>tr>td>.row,table.stack.wide>*>tr>td>form.row{gap:8px}
  table.stack.wide>*>tr>td>form.row>input:not([type=checkbox],[type=radio],[type=hidden]){flex:1;min-width:0}
}
@container tw (width >= 600px) and (width < 900px){
  table.stack.wide>tbody:not(:has(>tr.sub)){display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
  table.stack.wide>tbody:not(:has(>tr.sub))>tr{border-right:1px solid var(--line);align-content:start}
  table.stack.wide>tbody:not(:has(>tr.sub))>tr.total,table.stack.wide>tbody:not(:has(>tr.sub))>tr:has(>td[colspan]:only-child){grid-column:1 / -1}
}

/* The Time page: under 900px of box a row is a card, the job and task across the top and the week's seven days in one
   line under them, each under its day (the page's own grid, so it does not use the three-to-a-line rule above). */
@container tw (width < 900px){
  table.ts-table,table.ts-table>tbody,table.ts-table>tfoot{display:block}
  table.ts-table>thead{display:none}
  table.ts-table>*>tr{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px 4px;position:relative;padding:13px 12px;border-bottom:1px solid var(--line)}
  table.ts-table>*>tr>td{display:block;grid-column:1 / -1;min-width:0;padding:0;border:0;text-align:left;white-space:normal}
  table.ts-table>*>tr>td[data-blank]{display:none}
  table.ts-table>*>tr>td.lead{font-size:1rem;font-weight:400}
  table.ts-table>*>tr>td :where(select,input:not([type=number])){width:100%;max-width:none}
  table.ts-table>*>tr>td.n{grid-column:auto;text-align:center;font-size:.9375rem}
  table.ts-table>*>tr>td[data-label]::before{content:attr(data-label);display:block;color:var(--mut);font:600 .6875rem/1.25 var(--sans);text-transform:uppercase;letter-spacing:.02em}
  table.ts-table>*>tr>td.n[data-label]::before{width:min-content;margin:0 auto 3px;text-align:center}
  table.ts-table.stack>*>tr>td select{max-width:none}
  table.ts-table>*>tr>td[data-label]:not(.n){display:flex;align-items:center;gap:8px} table.ts-table>*>tr>td[data-label]:not(.n)::before{flex:none;min-width:3.5em;margin:0}
  table.ts-table>*>tr>td[data-label]:not(.n)>:where(select,input){flex:1;min-width:0}
  table.ts-table>*>tr>td.n input{width:100%!important;min-width:0;padding-inline:1px;text-align:center}
  table.ts-table>*>tr>td.n.ts-total,table.ts-table>tfoot>tr>td.n[data-week-total]{grid-column:1 / -1;text-align:right;font-weight:700}
  table.ts-table>*>tr>td.n.ts-total[data-label]::before,table.ts-table>tfoot>tr>td.n[data-week-total]::before{display:inline;margin-right:8px}
  table.ts-table>tfoot>tr.total{background:var(--panel2);border-top:2px solid var(--line2)} table.ts-table>tfoot>tr.total>td{border-top:0}
  table.ts-table>tfoot>tr>td.lead{font-weight:700}
  table.ts-table .ll-tools{justify-content:flex-end}
}

/* --------------------------------------------------------------------------------------------- Page parts on a phone */
@media (max-width:639.98px){
  h2{margin-top:22px}
  .card{padding:13px 14px}
  .scope-bar{justify-content:flex-start;margin:0 0 10px} .scope-bar select{flex:1;min-width:0}
  /* search and filters: the search box across, the menus two to a line */
  .filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .filters>input[type=search]{grid-column:1 / -1;width:100%}
  .filters select{width:100%;max-width:none}
  /* the bar that changes several rows at once: only its hint and Export until a row is ticked, then it stays in view */
  .bulk-bar:not(.picked) [data-needs-pick],.bulk-bar:not(.picked) label{display:none}
  .bulk-bar.picked{position:sticky;top:calc(var(--bar-h) + env(safe-area-inset-top,0px) + 8px);z-index:20;box-shadow:0 8px 24px rgba(0,0,0,.3)}
  .bulk-bar select{flex:1;min-width:120px;max-width:none}
  .form-grid .f>:where(input:not([type=checkbox],[type=radio]),select){width:100%}
  .bill-input{width:100%}
  .hub-head{flex-wrap:wrap}
  .doc{padding:22px 16px}
  .login-box{margin-top:6vh}
}

/* Moving between pages: a short cross-fade, the bar, tab bar and side menu holding still (browsers with view
   transitions between documents; others just load the page). */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  ::view-transition-old(root),::view-transition-new(root){animation-duration:.14s}
  .appbar{view-transition-name:appbar} .tabbar{view-transition-name:tabbar} nav.side{view-transition-name:sidemenu}
}
/* a row of view buttons ("Show: Active, On hold...") is one line that scrolls sideways on a phone */
@media (max-width:639.98px){
  .row.chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain;margin-inline:calc(-1 * var(--pad));padding-inline:var(--pad)}
  .row.chips::-webkit-scrollbar{display:none} .row.chips>*{flex:none}
}

/* ------------------------------------------------------------------------------------------------------ Help buttons */
/* {% help %} (core/templatetags/ui.py; Brady 12/03/2026: no paragraphs of explanation on the page, a help button where
   one is useful). The button opens the text as a popover: beside the button where the browser can anchor it there,
   otherwise in the middle of the window, and as a sheet along the bottom on a phone. Straight after a heading the
   button sits on the heading's line. */
.help-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:22px;height:22px;padding:0;vertical-align:middle;
  border:1px solid var(--line2);border-radius:50%;background:var(--panel);color:var(--mut);font:700 13px/1 var(--sans);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.help-btn:hover,.help-btn:focus-visible{color:var(--accent);border-color:var(--accent)}
.help-btn::after{content:"";position:absolute;inset:calc((22px - var(--tap)) / 2)}        /* a finger-sized target around the small button */
.help-btn.labeled{width:auto;height:auto;min-height:var(--tap);padding:0;border:0;border-radius:4px;background:none;color:var(--accent);font:600 13px/1.3 var(--sans);text-align:left}
.help-btn.labeled::before{content:"?";display:inline-flex;align-items:center;justify-content:center;flex:none;width:17px;height:17px;margin-right:6px;border:1px solid currentColor;border-radius:50%;font-size:11px;line-height:1}
.help-btn.labeled::after{content:none}
.help-btn.labeled:hover{text-decoration:underline}
:is(h1,h2,h3,h4):has(+.help-btn){display:inline-block;vertical-align:middle;margin-right:8px}
h1:has(+.help-btn),h1:has(+.help-btn)+.help-btn{margin-bottom:12px}
.help-btn.labeled{display:flex;margin:6px 0}
:is(h1,h2,h3,h4)+.help-btn.labeled{display:inline-flex;margin:0}
.help-pop{color:var(--mut);font-size:13px}
.help-pop[popover]{position:fixed;inset:0;margin:auto;width:fit-content;height:fit-content;max-width:min(27rem,calc(100vw - 24px));max-height:min(70vh,32rem);overflow:auto;
  padding:13px 15px;border:1px solid var(--line2);border-radius:10px;background:var(--panel);color:var(--ink);font:400 14px/1.5 var(--sans);
  text-align:left;text-transform:none;letter-spacing:0;white-space:normal;box-shadow:0 12px 40px rgba(0,0,0,.35)}
@supports (position-area:block-end){
  .help-pop[popover]{inset:auto;margin:6px 0;position-area:block-end span-inline-end;position-try-fallbacks:flip-block,flip-inline,block-end span-inline-start}
}
@media (max-width:639.98px){
  .help-pop[popover]{inset:auto 0 0 0;margin:0;position-area:none;width:auto;max-width:none;max-height:70vh;max-height:70dvh;border-radius:16px 16px 0 0;border-width:1px 0 0;
    padding:18px max(18px,env(safe-area-inset-right,0px)) calc(22px + env(safe-area-inset-bottom,0px)) max(18px,env(safe-area-inset-left,0px));font-size:15px}
  .help-pop[popover]::backdrop{background:rgba(0,0,0,.4)}
}
/* a browser without popovers: the explanation shows on the page, as it used to, and there is no button */
@supports not selector(:popover-open){.help-btn{display:none} .help-pop{display:block;margin:0 0 14px}}
@media print{.help-btn,.help-pop{display:none!important}}
/* The staging copy (core/staging.py): a striped line across the top of every page and a mark beside the name, so nobody
   takes it for the live site. Fixed colors: it has to read the same in the light and the dark theme. */
body.staging::before{content:"";position:fixed;top:0;left:0;right:0;height:5px;z-index:200;pointer-events:none;
  background:repeating-linear-gradient(135deg,#f2b233 0 14px,#1a1206 14px 28px)}
.pill.staging-mark{background:#f2b233;color:#1a1206;font-weight:800;letter-spacing:.06em;text-transform:uppercase;font-size:11px;padding:2px 9px;cursor:help}
.appbar .staging-mark{margin-left:6px} nav.side .staging-line{margin:-6px 8px 12px;font-size:12px;line-height:1.5}
@media print{body.staging::before{display:none}}
