/*!
 * EventCalendar v5.14.1
 * https://github.com/vkurko/calendar
 */
.ec{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--ec-color-400:oklch(70.8% 0 0);--ec-color-300:oklch(87% 0 0);--ec-color-200:oklch(92.2% 0 0);--ec-color-100:oklch(97% 0 0);--ec-color-50:oklch(98.5% 0 0);--ec-bg-color:#fff;--ec-text-color:currentcolor;--ec-border-color:var(--ec-color-300);--ec-button-bg-color:var(--ec-bg-color);--ec-button-border-color:var(--ec-border-color);--ec-button-text-color:var(--ec-text-color);--ec-button-active-bg-color:var(--ec-color-200);--ec-button-active-border-color:var(--ec-color-400);--ec-button-active-text-color:var(--ec-button-text-color);--ec-today-bg-color:oklch(98.7% .026 102.212);--ec-highlight-color:oklch(98.4% .019 200.873);--ec-event-bg-color:oklch(70.7% .165 254.624);--ec-event-text-color:#fff;--ec-bg-event-color:var(--ec-color-300);--ec-bg-event-opacity:.3;--ec-event-col-gap:.375rem;--ec-now-indicator-color:oklch(63.7% .237 25.331);--ec-popup-bg-color:var(--ec-bg-color)}.ec-dark .ec{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--ec-color-400:oklch(43.9% 0 0);--ec-color-300:oklch(37.1% 0 0);--ec-color-200:oklch(26.9% 0 0);--ec-color-100:oklch(20.5% 0 0);--ec-color-50:oklch(14.5% 0 0);--ec-bg-color:var(--ec-color-100);--ec-today-bg-color:oklch(28.6% .066 53.813);--ec-highlight-color:oklch(30.2% .056 229.695);--ec-bg-event-opacity:.5}@media (prefers-color-scheme:dark){.ec-auto-dark .ec{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--ec-color-400:oklch(43.9% 0 0);--ec-color-300:oklch(37.1% 0 0);--ec-color-200:oklch(26.9% 0 0);--ec-color-100:oklch(20.5% 0 0);--ec-color-50:oklch(14.5% 0 0);--ec-bg-color:var(--ec-color-100);--ec-today-bg-color:oklch(28.6% .066 53.813);--ec-highlight-color:oklch(30.2% .056 229.695);--ec-bg-event-opacity:.5}}.ec-day{--ec-day-bg-color:var(--ec-bg-color);background-color:var(--ec-day-bg-color);border:1px solid var(--ec-border-color);border-block-start:none;border-inline-start:none}.ec-day.ec-today{--ec-day-bg-color:var(--ec-today-bg-color)}.ec-day.ec-highlight{--ec-day-bg-color:var(--ec-highlight-color)}.ec-time-grid .ec-body .ec-day{background-image:linear-gradient(to top, var(--ec-day-bg-color) 1px, transparent 1px), linear-gradient(to top, var(--ec-border-color) 1px, transparent 1px), linear-gradient(to right, var(--ec-day-bg-color) 1px, transparent 1px), linear-gradient(to top, var(--ec-border-color) 1px, transparent 1px);background-size:100% 100%, 100% calc(var(--ec-slot-height) * var(--ec-slot-label-periodicity)), 2px 100%, 100% var(--ec-slot-height)}.ec-timeline:not(.ec-month-view,.ec-year-view) .ec-body .ec-day{--ec-last-line-color:transparent;--ec-direction:to left}[dir=rtl] :is(.ec-timeline:not(.ec-month-view,.ec-year-view) .ec-body .ec-day){--ec-direction:to right}.ec-timeline:not(.ec-month-view,.ec-year-view) .ec-body .ec-day{background-image:linear-gradient(var(--ec-direction), var(--ec-last-line-color) 1px, transparent 1px), linear-gradient(var(--ec-direction), var(--ec-border-color) 1px, transparent 1px), linear-gradient(var(--ec-day-bg-color) 1px, transparent 1px), linear-gradient(var(--ec-direction), var(--ec-border-color) 1px, transparent 1px);background-size:100% 100%, calc(var(--ec-slot-width) * var(--ec-slot-label-periodicity)) 100%, 100% 2px, var(--ec-slot-width) 100%;border-inline:none}.ec-timeline:not(.ec-month-view,.ec-year-view) .ec-body .ec-day.ec-no-ieb{--ec-last-line-color:var(--ec-day-bg-color)}.ec-day-grid .ec-day{flex-direction:column;justify-content:space-between;min-block-size:5em;display:flex}.ec-day-grid .ec-uniform .ec-day{min-block-size:auto}.ec-list .ec-day{border-inline:none}.ec-list .ec-day:last-child{border:none}.ec-day.ec-no-ieb{border-inline-end:none}.ec-day.ec-no-beb{border-block-end:none}.ec-day-head{flex-direction:row-reverse;justify-content:space-between;display:flex}.ec-day-grid.ec-month-view .ec-day-head{padding:.375rem}.ec-day.ec-other-month .ec-day-head time{opacity:.3}.ec-list .ec-day-head{background-color:var(--ec-day-bg-color);border-block-end:1px solid var(--ec-border-color);flex-direction:unset;z-index:2;margin:0 0 -1px;padding:.5em 1.5em;position:sticky;inset-block-start:0}.ec-day-foot{padding:.18rem;font-size:.85em}.ec-day-foot a{cursor:pointer}.ec-disabled{position:relative}.ec-disabled:after{content:"";background-color:var(--ec-bg-event-color);opacity:var(--ec-bg-event-opacity);position:absolute;inset:0}.ec-toolbar{justify-content:space-between;align-items:center;margin-block-end:1em;display:flex}.ec-toolbar>*{flex-wrap:wrap;gap:.5rem .75rem;display:inline-flex}.ec-title{margin:0}.ec-button{background-color:var(--ec-button-bg-color);border:1px solid var(--ec-button-border-color);border-radius:.25rem;padding:.375rem .75rem;font-size:1rem;line-height:1.5}.ec-button:not(:disabled){color:var(--ec-button-text-color);cursor:pointer}.ec-button:not(:disabled):hover,.ec-button.ec-active{background-color:var(--ec-button-active-bg-color);border-color:var(--ec-button-active-border-color);color:var(--ec-button-active-text-color);z-index:1}.ec-button-group{vertical-align:top;display:inline-flex}.ec-button-group .ec-button:not(:first-child){border-start-start-radius:0;border-end-start-radius:0;margin-inline-start:-1px}.ec-button-group .ec-button:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.ec-icon{inline-size:1em;display:inline-block}.ec-icon.ec-prev:after,.ec-icon.ec-next:after{content:"";border-block-start:2px solid;border-inline-end:2px solid;block-size:.5em;inline-size:.5em;display:inline-block;position:relative}.ec-icon.ec-prev:after{inset-inline-start:3px;rotate:-135deg}[dir=rtl] .ec-icon.ec-prev:after{rotate:135deg}.ec-icon.ec-next:after{inset-inline-start:-3px;rotate:45deg}[dir=rtl] .ec-icon.ec-next:after{rotate:-45deg}.ec-sidebar{z-index:1;background-color:var(--ec-bg-color);border-inline-end:1px solid var(--ec-border-color);text-align:end;position:sticky;inset-inline-start:0;overflow:clip}.ec-header .ec-sidebar{border-block-end:1px solid var(--ec-border-color);padding-block:.375rem}.ec-time-grid .ec-sidebar{padding-inline:.75rem}.ec-time-grid .ec-body .ec-sidebar{--ec-direction:to left}[dir=rtl] :is(.ec-time-grid .ec-body .ec-sidebar){--ec-direction:to right}.ec-time-grid .ec-body .ec-sidebar{background-image:linear-gradient(var(--ec-direction), transparent .375rem, var(--ec-bg-color) .375rem), linear-gradient(to top, var(--ec-bg-color) 1px, transparent 1px), linear-gradient(to top, var(--ec-border-color) 1px, transparent 1px), linear-gradient(to right, var(--ec-bg-color) 1px, transparent 1px), linear-gradient(to top, var(--ec-border-color) 1px, transparent 1px);background-size:100% 100%, 100% 100%, 100% calc(var(--ec-slot-height) * var(--ec-slot-label-periodicity)), 2px 100%, 100% var(--ec-slot-height)}.ec-timeline .ec-body .ec-sidebar{grid-area:1/1/-1/2;grid-template-rows:subgrid;display:grid}.ec-row-head{border-block-end:1px solid var(--ec-border-color);min-block-size:1.5em;padding:.375em .75rem;display:flex}.ec-row-head:last-child{border:none}.ec-expander{inline-size:1.25em;margin-block-start:-1px;margin-inline-end:.25em}.ec-expander .ec-button{aspect-ratio:1;block-size:1.25em;padding:0;line-height:normal}.ec-slot{white-space:nowrap}.ec-time-grid .ec-slot{block-size:calc(var(--ec-slot-height) * var(--ec-slot-label-periodicity));position:relative;inset-block-start:-.5lh}.ec-timeline .ec-slot{grid-column:span var(--ec-slot-label-periodicity);text-overflow:ellipsis;padding:.18rem 0;font-size:.95em;overflow:clip}.ec-slots{grid-auto-flow:column;grid-auto-columns:var(--ec-slot-width);text-align:center;--ec-day-bg-color:var(--ec-bg-color);background-color:var(--ec-day-bg-color);border-block-end:1px solid var(--ec-border-color);display:grid}.ec-slots.ec-today{--ec-day-bg-color:var(--ec-today-bg-color)}.ec-slots.ec-highlight{--ec-day-bg-color:var(--ec-highlight-color)}.ec-slots{--ec-last-line-color:transparent;--ec-direction:to left}[dir=rtl] .ec-slots{--ec-direction:to right}.ec-slots{background-image:linear-gradient(var(--ec-direction), var(--ec-last-line-color) 1px, transparent 1px), linear-gradient(var(--ec-direction), var(--ec-border-color) 1px, transparent 1px);background-size:100% 100%, calc(var(--ec-slot-width) * var(--ec-slot-label-periodicity)) 100%}.ec-slots:last-child{--ec-last-line-color:var(--ec-day-bg-color)}.ec-events{grid-area:1/2/-1/-1;grid-template:subgrid / subgrid;isolation:isolate;pointer-events:none;display:grid}.ec-day-grid .ec-events{grid-column-start:1}.ec-event{color:var(--ec-event-text-color);box-sizing:border-box;box-shadow:0 0 1px 0 var(--ec-border-color);background-color:var(--ec-event-bg-color);z-index:1;pointer-events:all;inline-size:calc(100% - var(--ec-event-col-gap));border-radius:3px;padding:2px;font-size:.85em;line-height:1.5;display:flex;position:relative}.ec-time-grid .ec-event{grid-row:1}.ec-day-grid .ec-event,.ec-all-day .ec-event,.ec-timeline .ec-event{block-size:max-content;margin-block-end:var(--ec-event-col-gap)}:is(.ec-day-grid .ec-event,.ec-all-day .ec-event,.ec-timeline .ec-event).ec-start-clipped{border-start-start-radius:0;border-start-end-radius:3px;border-end-end-radius:3px;border-end-start-radius:0}:is(.ec-day-grid .ec-event,.ec-all-day .ec-event,.ec-timeline .ec-event).ec-end-clipped{border-start-start-radius:3px;border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:3px}.ec-list .ec-event{color:inherit;background-color:var(--ec-day-bg-color);border-radius:0;flex-direction:row;padding:.5em 1.5em}.ec-event.ec-preview{z-index:1000;-webkit-user-select:none;user-select:none;opacity:.8}.ec-event.ec-pointer{color:inherit;pointer-events:none;-webkit-user-select:none;user-select:none;z-index:0;box-shadow:none}.ec-event.ec-start-clipped{border-start-start-radius:0;border-start-end-radius:0}.ec-event.ec-end-clipped{border-end-end-radius:0;border-end-start-radius:0}.ec-event.ec-start-clipped.ec-end-clipped{border-radius:0}.ec-bg-event{background-color:var(--ec-bg-event-color);opacity:var(--ec-bg-event-opacity);grid-row:1;position:relative}.ec-draggable{cursor:pointer;-webkit-user-select:none;user-select:none}.ec-ghost{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none}.ec-event-body{flex-direction:column;inline-size:100%;display:flex}.ec-day-grid .ec-event-body,.ec-all-day .ec-event-body,.ec-timeline .ec-event-body{flex-direction:row}.ec-event-tag{border-radius:2px;inline-size:4px;margin-inline-end:8px}.ec-event-time{white-space:nowrap;flex-shrink:0;max-block-size:100%;margin:0 0 1px;overflow:hidden}.ec-day-grid .ec-event-time,.ec-timeline .ec-event-time{text-overflow:ellipsis;max-inline-size:100%;margin:0 3px 0 0}.ec-event-title{font-weight:inherit;margin:0;overflow:hidden}.ec-time-grid .ec-event-title{position:sticky;inset-block-start:var(--ec-header-height)}.ec-day-grid .ec-event-title,.ec-all-day .ec-event-title,.ec-timeline .ec-event-title{white-space:nowrap;text-overflow:ellipsis;min-block-size:1.5em;position:sticky;inset-inline-start:calc(var(--ec-sidebar-width) + .18em)}.ec-list .ec-event-title{font-size:1rem}.ec-resizer{-webkit-user-select:none;user-select:none;position:absolute}.ec-time-grid .ec-body .ec-resizer{cursor:ns-resize;block-size:50%;max-block-size:8px;inset:auto 0 0}.ec-time-grid .ec-body .ec-resizer.ec-start{inset:0 0 auto}.ec-day-grid .ec-resizer,.ec-all-day .ec-resizer,.ec-timeline .ec-resizer{cursor:ew-resize;inline-size:50%;max-inline-size:8px;inset:0 0 0 auto}:is(.ec-day-grid .ec-resizer,.ec-all-day .ec-resizer,.ec-timeline .ec-resizer).ec-start{inset:0 auto 0 0}.ec-dragging,.ec-dragging *{cursor:pointer!important}.ec-resizing-y,.ec-resizing-y *{cursor:ns-resize!important}.ec-resizing-x,.ec-resizing-x *{cursor:ew-resize!important}.ec-no-events{text-align:center;background-color:var(--ec-bg-color);padding:5em 0}.ec-now-indicator{pointer-events:none;will-change:inset;grid-row:2;position:relative}.ec-time-grid .ec-now-indicator{border-block-start:var(--ec-now-indicator-color) solid 2px;block-size:0;inline-size:100%}.ec-timeline .ec-now-indicator{border-inline-start:var(--ec-now-indicator-color) solid 2px;inline-size:0}.ec-timeline .ec-now-indicator:before{z-index:2;inset-block-start:calc(var(--ec-header-height) - 6.5px)}.ec-now-indicator:before{background:var(--ec-now-indicator-color);content:"";block-size:12px;inline-size:12px;z-index:1;border-radius:50%;margin-block-start:-7px;margin-inline-start:-7px;display:block;position:sticky;inset-inline-start:calc(var(--ec-sidebar-width) - 6.5px)}.ec-popup{box-sizing:border-box;background-color:var(--ec-popup-bg-color);border:1px solid var(--ec-border-color);block-size:max-content;min-block-size:8em;inline-size:125%;min-inline-size:12em;box-shadow:var(--ec-color-300) 0 10px 15px -3px, var(--ec-color-300) 0 4px 6px -4px;border-radius:.25rem;flex-direction:column;padding:.375rem .75rem .75rem;display:flex;position:relative}.ec-popup .ec-day-head{flex-direction:row;padding-inline:0}.ec-popup .ec-day-head a{cursor:pointer;font-size:1.5em;line-height:.8}.ec-popup .ec-events{--ec-event-col-gap:0;pointer-events:auto;display:block;overflow-y:auto}.ec-custom-scrollbars .ec-main::-webkit-scrollbar{background-color:#0000}.ec-custom-scrollbars .ec-main::-webkit-scrollbar-thumb{box-shadow:none;background-color:var(--ec-border-color);background-clip:padding-box;border:4px solid #0000;border-radius:8px}.ec-custom-scrollbars .ec-main::-webkit-scrollbar-thumb:hover{background-color:var(--ec-color-400)}.ec{flex-direction:column;display:flex}.ec-main{border:1px solid var(--ec-border-color);display:grid;overflow:auto}.ec-time-grid .ec-main{grid-template-columns:max-content repeat(var(--ec-grid-cols), var(--ec-col-width));grid-template-rows:repeat(2,max-content)}.ec-day-grid .ec-main{--ec-row-height:auto;grid-template-columns:repeat(var(--ec-grid-cols), minmax(0, 1fr));grid-template-rows:max-content repeat(var(--ec-grid-rows), var(--ec-row-height))}.ec-day-grid .ec-main.ec-uniform{--ec-row-height:minmax(0, 1fr);flex-grow:1;overflow:hidden}.ec-timeline .ec-main{grid-template-columns:max-content repeat(var(--ec-grid-cols), var(--ec-col-width));grid-template-rows:max-content var(--ec-grid-rows);flex-grow:1}.ec-header{grid-area:1/1/2/-1;grid-template-columns:subgrid;z-index:2;display:grid;position:sticky;inset-block-start:0}.ec-grid{grid-area:1/1/-1/-1;grid-template-columns:subgrid;display:grid}.ec-body .ec-grid{grid-template-rows:subgrid}.ec-time-grid .ec-grid,.ec-timeline .ec-grid{grid-column-start:2}.ec-all-day{grid-area:2/1/auto/-1;grid-template-columns:subgrid;min-block-size:var(--ec-slot-height);display:grid}.ec-col-group{grid-column:span var(--ec-col-group-span)}.ec-col-group,.ec-col-head{text-align:center;background-color:var(--ec-bg-color);border:1px solid var(--ec-border-color);text-overflow:ellipsis;border-block-start:none;border-inline-start:none;padding:.375rem .18em;overflow:clip}:is(.ec-col-group,.ec-col-head).ec-today{background-color:var(--ec-today-bg-color)}:is(.ec-col-group,.ec-col-head).ec-highlight{background-color:var(--ec-highlight-color)}.ec-col-group:nth-last-child(1 of .ec-col-group),.ec-col-head:nth-last-child(1 of .ec-col-head){border-inline-end:none}.ec-col-group>*,.ec-timeline .ec-col-head>*{position:sticky;inset-inline-start:calc(var(--ec-sidebar-width) + .18em)}.ec-body{grid-area:2/1/-1/-1;grid-template:subgrid / subgrid;display:grid}.ec-hidden{visibility:hidden}
/*$vite$:1*/
/* Energen command centre.
   Layout: black rail on the left (desktop), a sticky work bar on top, one working page at a time;
   on phones the rail becomes a bottom tab bar. Figures use a strict system face, tabular.
   Palette: Energen orange on true black and neutral greys (Corey, 30 Oct 2026: black and grey, not navy).
   --chrome is the dark of the rail, toasts, the save bar and the selected segment. */
:root {
  --bg: #f2f2f2;
  --surface: #ffffff;
  --surface-2: #f8f8f8;
  --surface-3: #efefef;
  --line: #e3e3e3;
  --line-strong: #cdcdcd;
  --ink: #121212;
  --ink-2: #3d3d3d;
  --muted: #6b6b6b;
  --brand: #fe4a00;
  --accent: #d23d00;
  --accent-hover: #b93500;
  --accent-ink: #b33400;
  --accent-soft: #fff0e7;
  --accent-line: #ffd2bb;
  --chrome: #121212;
  --chrome-2: #1f1f1f;
  --chrome-3: #2c2c2c;
  --nav-ink: #b5b5b5;
  --good: #11744a;
  --good-soft: #e5f4ec;
  --warn: #9a5800;
  --warn-soft: #fff3dc;
  --bad: #c01f33;
  --bad-soft: #fdebee;
  --info: #444444;
  --info-soft: #f0f0f0;
  --c1: #ef4c00;
  --c2: #2e5297;
  --c3: #808f31;
  --c4: #7a53b4;
  --c5: #00958c;
  --c6: #a3a3a3;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 1px rgba(0, 0, 0, .03);
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .08);
  --scrim: rgba(0, 0, 0, .42);
  --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 10px;
  --r-sm: 7px;
  --rail: 236px;
  --bar: 60px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0b; --surface: #151515; --surface-2: #1a1a1a; --surface-3: #222222; --line: #2b2b2b; --line-strong: #3c3c3c;
    --ink: #ededed; --ink-2: #c2c2c2; --muted: #969696; --brand: #ff5a1f; --accent: #d23d00; --accent-hover: #e04400;
    --accent-ink: #ff7a45; --accent-soft: #2a1409; --accent-line: #5a2a12; --chrome: #080808; --chrome-2: #191919; --chrome-3: #262626;
    --nav-ink: #a8a8a8; --good: #43c98a; --good-soft: #0f2a1e; --warn: #f0b04a; --warn-soft: #2c2110; --bad: #ff6b7b;
    --bad-soft: #33141a; --info: #b5b5b5; --info-soft: #1f1f1f; --c1: #ed5f18; --c2: #5d7dc8; --c3: #808f31; --c4: #8864c0;
    --c5: #09a198; --c6: #666666; --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-pop: 0 18px 44px rgba(0, 0, 0, .55);
    --scrim: rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0b; --surface: #151515; --surface-2: #1a1a1a; --surface-3: #222222; --line: #2b2b2b; --line-strong: #3c3c3c;
  --ink: #ededed; --ink-2: #c2c2c2; --muted: #969696; --brand: #ff5a1f; --accent: #d23d00; --accent-hover: #e04400;
  --accent-ink: #ff7a45; --accent-soft: #2a1409; --accent-line: #5a2a12; --chrome: #080808; --chrome-2: #191919; --chrome-3: #262626;
  --nav-ink: #a8a8a8; --good: #43c98a; --good-soft: #0f2a1e; --warn: #f0b04a; --warn-soft: #2c2110; --bad: #ff6b7b;
  --bad-soft: #33141a; --info: #b5b5b5; --info-soft: #1f1f1f; --c1: #ed5f18; --c2: #5d7dc8; --c3: #808f31; --c4: #8864c0;
  --c5: #09a198; --c6: #666666; --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-pop: 0 18px 44px rgba(0, 0, 0, .55);
  --scrim: rgba(0, 0, 0, .6); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 14px/1.45 var(--font-ui); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
a.ext { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; }
a.ext svg { width: 13px; height: 13px; flex: none; }
.sec-h { margin-bottom: -6px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 800; line-height: 1.2; }
h2 { font-size: 15px; font-weight: 750; }
h3 { font-size: 13.5px; font-weight: 700; }
p { margin: 0; }
.num, .money { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.eyebrow { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- shell ---------- */
.app { min-height: 100%; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
.rail { position: sticky; top: 0; height: 100vh; height: 100dvh; background: var(--chrome); color: var(--nav-ink); display: flex; flex-direction: column;
  padding: 16px 12px calc(14px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
.brand .mark { width: 30px; height: 24px; flex: none; }
.brand .word { height: 13px; width: auto; color: #fff; }
.brand small { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--nav-ink); font-weight: 700; margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, .08); margin: 10px 8px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--nav-ink); font-weight: 650; font-size: 13.5px; position: relative; }
.nav a:hover { background: var(--chrome-2); color: #fff; text-decoration: none; }
.nav a.on { background: var(--chrome-3); color: #fff; }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav .count { margin-left: auto; font: 700 11px/1 var(--font-num); padding: 3px 6px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #fff; }
.nav .count.hot { background: var(--brand); }
.rail-foot { margin-top: auto; padding: 12px 8px 0; font-size: 12px; display: flex; flex-direction: column; gap: 8px; }
.rail-foot .who { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 650; }
.rail-foot button { background: none; border: 0; padding: 0; color: var(--nav-ink); cursor: pointer; text-align: left; font-size: 12px; }
.rail-foot button:hover { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; height: var(--bar); background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.topbar .m-brand { display: none; }
.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 12px 0 36px; font-weight: 550; }
.search input:focus { background: var(--surface); border-color: var(--line-strong); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.search > svg { position: absolute; left: 11px; top: 10px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search kbd { position: absolute; right: 9px; top: 9px; }
#global-search { padding-right: 36px; text-overflow: ellipsis; } /* clear of the / hint; a placeholder too long for the box ends in … */
.results { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop);
  max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; z-index: 40; }
.results .grp { padding: 8px 10px 4px; }
.results button { display: flex; width: 100%; gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.results button:hover, .results button.on { background: var(--surface-3); }
.results .id { font: 700 12px var(--font-num); color: var(--muted); min-width: 64px; }
.results button.cmd { align-items: center; }
.results .id.ico { display: flex; align-items: center; min-width: 22px; }
@media (max-width: 720px) { .results button.cmd .grow { white-space: normal; } .results button.cmd .grow .small { display: block; margin-top: 1px; } }
.results .id.ico svg { width: 17px; height: 17px; color: var(--ink-2, var(--muted)); }
.results button.cmd.on .id.ico svg { color: var(--accent); }
.search .results kbd.go { position: static; flex: none; }
.results .hint { padding: 8px 10px 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.topbar .spacer { flex: 1; }
kbd { font: 650 11px var(--font-num); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--muted); background: var(--surface); }

.page { width: 100%; max-width: 1380px; margin: 0 auto; padding-block: 22px 48px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .lead { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); font-weight: 650; }
.crumbs a { color: var(--muted); }

.banner { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: var(--r); background: var(--info-soft); color: var(--info); font-size: 13px; border: 1px solid var(--line); }
.banner.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.banner svg { width: 18px; height: 18px; flex: none; }
.banner .grow { flex: 1; min-width: 0; }
.banner > .select { width: auto; flex: none; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; flex-wrap: wrap; }
.card-h .grow { flex: 1; min-width: 0; }
.card-h .sub { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.card-h h2 svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.card-b { padding: 4px 16px 16px; }
.card-b.flush { padding: 0; }
.card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.split.wide { grid-template-columns: minmax(0, 1fr) 400px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.hr { height: 1px; background: var(--line); margin: 4px 0; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
@media (min-width: 1181px) {
  .tiles:has(> :nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tiles:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tiles:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 721px) and (max-width: 1180px) {
  .tiles:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 13px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
@supports (grid-template-rows: subgrid) {
  .tile { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 4px; align-content: start; }
  .tile .lab { align-self: start; }
}
.tile .lab { font-size: 12px; color: var(--muted); font-weight: 650; }
.tile .val { font: 650 22px/1.15 var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--ink); }
.tile .foot { font-size: 12px; color: var(--muted); }
.tile.hot { border-color: var(--accent-line); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)); }
.tile.hot .val { color: var(--accent-ink); }
button.tile { text-align: left; cursor: pointer; font: inherit; }
button.tile:hover { border-color: var(--line-strong); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; justify-content: safe center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none !important; max-width: 100%; min-width: 0; }
.btn-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.btn:hover { background: var(--surface-3); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; gap: 5px; }
.btn.xs svg, .btn.sm svg { width: 15px; height: 15px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-group { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.btn-group button { border: 0; background: none; height: 32px; padding: 0 12px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn-group button + button { border-left: 1px solid var(--line); }
.btn-group button.on { background: var(--chrome); color: #fff; }
:root[data-theme="dark"] .btn-group button.on { background: var(--surface-3); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-group button.on { background: var(--surface-3); color: var(--ink); } }
.btn-group svg { width: 15px; height: 15px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.tabs button { border: 0; background: none; padding: 9px 12px 10px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .n { font: 700 11px var(--font-num); color: var(--muted); background: var(--surface-3); padding: 2px 6px; border-radius: 99px; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.field > span em { font-style: normal; color: var(--muted); font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--bad); font-weight: 650; }
.input, .select, textarea.input { width: 100%; height: 36px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); padding: 0 10px; font-weight: 550; min-width: 0; }
textarea.input { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.num { text-align: right; }
.input[readonly] { background: var(--surface-2); }
.input.sm, .select.sm { height: 30px; font-size: 13px; padding: 0 8px; border-radius: 7px; }
.select { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
.select.sm { background-position: calc(100% - 13px) 12px, calc(100% - 8px) 12px; padding-right: 24px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; flex: none; }
.money-in { position: relative; }
.money-in::before { content: "$"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font: 600 13px var(--font-num); }
.money-in .input { padding-left: 20px; text-align: right; font-family: var(--font-num); }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 750; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.pill svg { width: 13px; height: 13px; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill.solid { background: var(--accent); color: #fff; }
.pill.outline { background: transparent; border: 1px solid var(--line-strong); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.sample-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--line-strong); padding: 1px 6px; border-radius: 5px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-size: 11.5px; font-weight: 750; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.t th.r, .t td.r { text-align: right; }
.t th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.t th button:hover { color: var(--ink); }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: var(--surface-2); }
.t td .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 550; margin-top: 1px; }
.t td .sub.warn-t { color: var(--warn); } .t td .sub.bad-t { color: var(--bad); }
.t .id { font: 700 12.5px var(--font-num); color: var(--ink-2); white-space: nowrap; }
.t tr.alert td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.t tr.warnrow td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
/* columns that hold still (Table with widths): set by the column list, not by the rows on show, so a tab,
   a search or Show more never moves them. Long text wraps; nothing spills into the next column. */
table.t.fixed { table-layout: fixed; min-width: var(--tmin, 0px); }
.t.fixed th { width: var(--w, auto); overflow: hidden; text-overflow: ellipsis; }
.t.fixed td { overflow: hidden; overflow-wrap: anywhere; }
.t.fixed td .pill { white-space: normal; height: auto; min-height: 22px; padding-block: 3px; line-height: 1.25; border-radius: 11px; max-width: 100%; }
.t .pills { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
@media (max-width: 720px) { table.t.fixed { min-width: var(--tmin-m, 0px); } .t.fixed th { width: var(--wm, var(--w, auto)); } }
/* tablets and small laptops: a few lower-priority columns step out (the record number moves under the name) */
@media (min-width: 721px) and (max-width: 1279px) { .hide-t { display: none !important; } table.t.fixed { min-width: var(--tmin-t, 0px); } .t.fixed th { width: var(--wt, var(--w, auto)); } }
@media (min-width: 1280px) { .show-t { display: none !important; } }

/* list rows (action lists) */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); min-width: 0; }
.li:first-child { border-top: 0; }
.li .ic, .clock .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--ink-2); }
.li .ic svg, .clock .ic svg { width: 17px; height: 17px; }
.li .ic.bad, .clock .ic.bad { background: var(--bad-soft); color: var(--bad); }
.li .ic.warn, .clock .ic.warn { background: var(--warn-soft); color: var(--warn); }
.li .ic.good, .clock .ic.good { background: var(--good-soft); color: var(--good); }
.li .ic.accent { background: var(--accent-soft); color: var(--accent-ink); }
.li .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.li .title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .why { font-size: 12.5px; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.li .side { display: flex; align-items: center; gap: 8px; flex: none; }
.li.click { cursor: pointer; }
.li.click:hover { background: var(--surface-2); }
.more-row { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; }

/* empty states */
.empty { padding: 28px 18px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty svg { width: 28px; height: 28px; color: var(--line-strong); }
.empty b { color: var(--ink-2); font-size: 14px; }

/* ---------- boards ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.col { background: var(--surface-3); border-radius: var(--r); display: flex; flex-direction: column; min-height: 140px; max-height: calc(100vh - 230px); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; font-weight: 750; font-size: 13px; }
.col-h .n { font: 700 11.5px var(--font-num); color: var(--muted); }
.col-h .v { margin-left: auto; font: 650 12px var(--font-num); color: var(--muted); }
.col-b { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 40px; }
.col.drop { outline: 2px dashed var(--brand); outline-offset: -2px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-1); }
.kcard:hover { border-color: var(--line-strong); }
.kcard[draggable="true"] { cursor: grab; }
.kcard.dragging { opacity: .45; }
.kcard .top { display: flex; gap: 8px; align-items: baseline; }
.kcard .top .id { font: 700 11.5px var(--font-num); color: var(--muted); }
.kcard .top .v { margin-left: auto; font: 650 12.5px var(--font-num); }
.kcard .name { font-weight: 700; font-size: 13.5px; }
.kcard .meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kcard.alert { box-shadow: inset 3px 0 0 var(--bad), var(--shadow-1); }
.kcard.warnc { box-shadow: inset 3px 0 0 var(--warn), var(--shadow-1); }

/* ---------- calendar ----------
   The grid is Event Calendar (vkurko/calendar, MIT), the calendar Nest's team calendar runs on. Its look comes from its
   own --ec-* properties, re-declared here from our tokens and scoped to .cal-grid, so it wears Energen's palette in
   both themes. Items differ by FORM as well as colour, so the Show chips can name them: a job is a solid block in its
   crew's colour, a site visit is outlined in its person's colour, leave is hatched, a deadline is an amber (red when
   it can't slip) tint. The crew hours bar (.cap) is shared with Schedule and Insights. */
.cap { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; display: flex; }
.cap i { display: block; height: 100%; background: var(--c5); }
.cap i.over { background: var(--bad); }
.cap-t { font: 600 10.5px var(--font-num); color: var(--muted); display: flex; justify-content: space-between; }

.cal-card { overflow: clip; }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cal-nav { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cal-nav .btn-group button, .cal-views .btn-group button { height: 36px; }
.cal-nav .btn-group button { padding: 0 11px; }
.cal-title { font-size: 17px; font-weight: 750; white-space: nowrap; }
.cal-filter { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.cal-filter-label { flex: none; width: 40px; font-size: 11px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.cal-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.cal-chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
  font-weight: 700; font-size: 12.5px; white-space: nowrap; cursor: pointer; flex: none; }
.cal-chip:hover { border-color: var(--muted); }
.cal-chip:has(.cal-badge) { padding-left: 5px; }
.cal-chip.is-who.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.cal-chip.is-kind:not(.on) { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
.cal-chip.is-kind:not(.on) .cal-swatch { opacity: .4; }
.cal-chip.is-reset { border-style: dashed; color: var(--accent-ink); }
.cal-swatch { flex: none; width: 11px; height: 11px; border-radius: 3px; background: var(--ink-2); }
.cal-key-visit .cal-swatch { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.cal-key-leave .cal-swatch { background: repeating-linear-gradient(135deg, var(--line-strong) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cal-key-deadline .cal-swatch { background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn); }
.cal-key-done .cal-swatch { opacity: .4; }
.cal-hint { margin: 0; padding: 10px 16px 0; font-size: 12.5px; color: var(--muted); }
.btn-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .24); font-size: 11.5px; font-weight: 750; }

/* who it is: a crew's letter or a person's initials, in their colour (white on the colour held to 4.5:1 by the mix) */
.cal-badge { --cal-fill: color-mix(in srgb, var(--cal-who, var(--c6)) 78%, #000); display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: var(--cal-fill); color: #fff; font: 800 10.5px/1 var(--font-ui); letter-spacing: .02em; }
.cal-badge.lg { min-width: 38px; height: 38px; border-radius: 11px; font-size: 13.5px; }
.cal-badge-ic { background: var(--surface-3); color: var(--ink-2); }
.cal-badge-ic svg { width: 13px; height: 13px; }
.cal-badge.lg.cal-badge-ic svg { width: 19px; height: 19px; }
.cal-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cal-ic svg { width: 100%; height: 100%; }

/* the grid */
.cal-grid { padding: 12px; }
.cal-grid .ec {
  --ec-bg-color: var(--surface); --ec-text-color: var(--ink); --ec-border-color: var(--line);
  --ec-color-400: var(--line-strong); --ec-color-300: var(--line); --ec-color-200: var(--surface-3); --ec-color-100: var(--surface-2); --ec-color-50: var(--surface-2);
  --ec-today-bg-color: var(--surface); --ec-highlight-color: var(--surface);
  --ec-event-bg-color: var(--ink-2); --ec-event-text-color: #fff; --ec-bg-event-color: var(--surface-3); --ec-bg-event-opacity: 1;
  --ec-event-col-gap: 6px; --ec-now-indicator-color: var(--bad); --ec-popup-bg-color: var(--surface);
  color-scheme: inherit; font-size: 13px;
}
.cal-grid .ec-toolbar { display: none; }
.cal-grid:is(.cal-view-week, .cal-view-month) .ec { --ec-highlight-color: color-mix(in srgb, var(--accent-soft) 75%, var(--surface)); }
.cal-grid .ec-main { border-radius: 9px; }
.cal-grid .ec-col-head, .cal-grid .ec-header .ec-sidebar { background: var(--surface-2); }
.cal-grid .ec-col-head { padding: 8px 6px; }
.cal-grid .ec-col-head.ec-highlight { background: var(--ec-highlight-color); }
.cal-grid .ec-list .ec-day-head { --ec-day-bg-color: var(--surface-2); }
.cal-dh-dow { display: block; font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cal-dh-num { display: inline-block; min-width: 26px; height: 24px; margin-top: 2px; padding: 0 6px; border-radius: 99px; font: 750 15px/24px var(--font-num); color: var(--ink); }
.cal-dh-num.is-today { background: var(--brand); color: #fff; }
.cal-dh-hol { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 750; color: var(--warn); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-grid .ec-month-view .ec-col-head { font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* rows on the week board, columns in Day: the crew's letter, name and hours booked over the dates shown */
.cal-grid .ec-timeline .ec-sidebar { text-align: start; }
.cal-grid .ec-timeline .ec-row-head { min-height: 78px; padding: 10px 14px 10px 12px; align-items: center; }
.cal-res { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: start; }
.cal-res .cal-badge { min-width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.cal-res .cal-badge-ic svg { width: 16px; height: 16px; }
.cal-res-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cal-res-name { font-weight: 750; font-size: 13px; color: var(--ink); white-space: nowrap; }
.cal-res-sub { font: 600 11.5px var(--font-num); color: var(--muted); white-space: nowrap; }
.cal-res-sub.is-over { color: var(--bad); }
.cal-grid .ec-time-grid .ec-col-head .cal-res { justify-content: center; }
.cal-grid .ec-time-grid .ec-sidebar { font: 600 11px var(--font-num); color: var(--muted); }

/* items */
.cal-grid .ec-event.cal-ev { --cal-fill: color-mix(in srgb, var(--cal-who, var(--c6)) 78%, #000); background: var(--cal-fill); color: #fff; box-shadow: none; border-radius: 7px;
  padding: 5px 8px; font-size: 12px; line-height: 1.35; cursor: pointer; }
.cal-grid .ec-event.cal-ev.is-editable { cursor: grab; }
.cal-grid .cal-ev .ec-event-body { display: block; min-width: 0; overflow: hidden; }
.cal-ev-top { display: flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; }
.cal-ev-time { flex: none; font: 650 11.5px var(--font-num); opacity: .9; }
.cal-ev-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 750; }
.cal-ev-sub, .cal-ev-meta { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev-sub { opacity: .92; }
.cal-ev-meta { margin-top: 1px; font: 600 11px var(--font-num); opacity: .8; }
.cal-ev .cal-badge { min-width: 18px; height: 17px; padding: 0 4px; font-size: 10px; }
.cal-ev-job .cal-badge { background: #fff; color: var(--cal-fill); }
.cal-ev .cal-risk { width: 16px; height: 16px; padding: 2px; border-radius: 99px; background: #fff; color: var(--bad); }
.cal-ev .cal-done-ic { width: 14px; height: 14px; }
.cal-grid .ec-event.cal-ev-visit { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--cal-fill); }
.cal-grid .ec-event.cal-ev-visit .cal-ev-sub { color: var(--muted); opacity: 1; }
.cal-grid .ec-event.cal-ev-leave { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface-3) 6px 12px); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cal-grid .ec-event.cal-ev-deadline { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }
.cal-grid .ec-event.cal-ev-deadline.is-urgent { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 45%, transparent); }
.cal-grid .ec-event.cal-ev-holiday { background: var(--surface-3); color: var(--muted); cursor: default; }
.cal-grid .ec-event.cal-ev.is-done { opacity: .55; }
.cal-grid .ec-event.cal-ev.is-sel { outline: 2px solid var(--ink); outline-offset: 2px; z-index: 6; }
.cal-grid .ec-event.cal-ev:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* where a click lands (the pointer), what a drag shows, what a drag across empty time selects */
.cal-grid .ec-event.ec-pointer { background: color-mix(in srgb, var(--brand) 9%, transparent); color: var(--accent-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent); border-radius: 7px; }
.cal-ev-add { display: block; padding: 0 2px; font: 700 11.5px var(--font-num); white-space: nowrap; }
.cal-grid .ec-event.ec-preview { box-shadow: var(--shadow-pop); }
.cal-grid .ec-event.ec-preview:not(.cal-ev) { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--brand); }
/* a public holiday or the shutdown, shaded on every row; how full each crew is each day, a bar along its cell */
.cal-grid .ec-bg-event.cal-off { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--line-strong) 50%, transparent) 6px 12px); }
.cal-grid .ec-bg-event.cal-load { background: none; }
.cal-grid .ec-bg-event.cal-load::after { content: ""; position: absolute; left: 6px; right: 12px; bottom: 3px; height: 3px; border-radius: 3px;
  background: linear-gradient(to right, var(--c5) var(--load), var(--line) var(--load)); }
.cal-grid .ec-bg-event.cal-load.is-full::after { background: linear-gradient(to right, var(--warn) var(--load), var(--line) var(--load)); }
.cal-grid .ec-bg-event.cal-load.is-over::after { background: var(--bad); }
.cal-grid .ec-timeline .ec-events { padding-bottom: 6px; }
/* one line between days: the grid's own slot lines repeat every slotWidth, which isn't the stretched column's width */
.cal-grid .ec-timeline .ec-body .ec-day { background-image: none; border-inline-end: 1px solid var(--line); }
.cal-grid .ec-timeline .ec-body .ec-day.ec-no-ieb { border-inline-end: 0; }

/* Month */
.cal-grid .ec-day-grid .ec-day { min-height: 116px; }
.cal-grid .ec-day-grid .ec-day-head { padding: 6px 6px 4px; }
.cal-daynum { display: inline-block; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 99px; text-align: center; font: 700 12.5px/22px var(--font-num); color: var(--ink-2); }
.cal-daynum.is-today { background: var(--brand); color: #fff; }
.cal-grid .ec-day-grid .ec-event.cal-ev { padding: 3px 6px; }
.cal-grid .ec-day-foot { padding: 2px 6px 6px; }
.cal-grid .ec-day-foot a { font-weight: 750; font-size: 12px; color: var(--accent-ink); }
.cal-grid .ec-popup { border-radius: var(--r); border-color: var(--line); box-shadow: var(--shadow-pop); padding: 8px 10px 10px; }
.cal-grid .ec-popup .ec-day-head { font-weight: 750; padding: 2px 0 8px; }
.cal-grid .ec-popup .ec-event { margin-bottom: 5px; }

/* List: whole-row targets, the time, who, what, and the crew or person on the right */
.cal-grid .ec-list .ec-main { grid-template-columns: minmax(0, 1fr); }
.cal-grid .ec-list :is(.ec-day, .ec-event) { min-width: 0; }
.cal-grid .ec-list .ec-day-head { padding: 9px 14px; background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 750; align-items: center; }
.cal-ld-tag { margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 750; }
.cal-grid .ec-list .ec-event.cal-ev, .cal-grid .ec-list .ec-event.cal-ev-visit, .cal-grid .ec-list .ec-event.cal-ev-leave, .cal-grid .ec-list .ec-event.cal-ev-deadline, .cal-grid .ec-list .ec-event.cal-ev-holiday {
  background: var(--ec-day-bg-color); color: var(--ink); box-shadow: none; border-radius: 0; padding: 10px 14px; min-height: 56px; align-items: center; font-size: 13px; }
.cal-grid .ec-list .ec-event.cal-ev:hover { background: var(--surface-2); }
.cal-grid .ec-list .ec-event.cal-ev + .ec-event { border-top: 1px solid var(--line); }
.cal-grid .ec-list .ec-event-tag { display: none; }
.cal-grid .ec-list .cal-ev .ec-event-body { display: flex; flex-direction: row; align-items: center; gap: 12px; }
.cal-ev-swatch { flex: none; width: 4px; align-self: stretch; min-height: 32px; border-radius: 4px; background: var(--cal-fill); }
.cal-ev-visit .cal-ev-swatch { background: transparent; box-shadow: inset 0 0 0 1.5px var(--cal-fill); }
.cal-ev-leave .cal-ev-swatch { background: repeating-linear-gradient(135deg, var(--line-strong) 0 3px, transparent 3px 6px); }
.cal-ev-deadline .cal-ev-swatch { background: var(--warn); }
.cal-ev-deadline.is-urgent .cal-ev-swatch { background: var(--bad); }
.cal-ev-holiday .cal-ev-swatch { background: var(--line-strong); }
.cal-ev-when { flex: none; width: 62px; white-space: nowrap; font: 650 12.5px var(--font-num); color: var(--ink-2); }
.cal-ev-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cal-grid .ec-list .cal-ev-sub { color: var(--muted); opacity: 1; font-size: 12.5px; }
.cal-ev-who { flex: none; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.cal-grid .ec-list .cal-ev .cal-badge { min-width: 24px; height: 24px; font-size: 10.5px; }
.cal-grid .ec-list .cal-ev .cal-badge:not(.cal-badge-ic) { background: var(--cal-fill); color: #fff; }
.cal-grid .ec-list .cal-ev .cal-risk { background: var(--bad-soft); }
.cal-grid .ec-list .cal-badge-ic svg { width: 14px; height: 14px; }
.cal-mark-deadline { background: var(--warn-soft); color: var(--warn); }
.cal-mark-deadline.is-urgent { background: var(--bad-soft); color: var(--bad); }
.cal-grid .ec-list .ec-event.cal-ev-deadline .cal-ev-title { color: var(--warn); }
.cal-grid .ec-list .ec-event.cal-ev-deadline.is-urgent .cal-ev-title { color: var(--bad); }
.cal-grid .ec-no-events { padding: 48px 16px; color: var(--muted); font-weight: 650; }

/* the details panel floats, so it's in view wherever the item that opened it was */
.cal-detail { position: fixed; right: 24px; bottom: 24px; width: min(400px, calc(100vw - 48px)); max-height: calc(100vh - 120px); overflow-y: auto; z-index: 45;
  padding: 16px; box-shadow: var(--shadow-pop); animation: rise .14s ease-out; }
.cal-detail-head { display: flex; align-items: flex-start; gap: 12px; }
.cal-detail-kind { font-size: 11px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.cal-detail-when { margin-top: 2px; font-size: 15px; font-weight: 750; }
.cal-detail-sub { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.cal-detail-what { margin: 12px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.cal-detail-issues { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cal-detail-issues li { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: 8px; font-size: 12.5px; }
.cal-detail-issues li.bad { background: var(--bad-soft); color: var(--bad); }
.cal-detail-issues li.warn { background: var(--warn-soft); color: var(--warn); }
.cal-detail-issues svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.cal-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cal-quick .btn { height: 38px; }
.cal-detail-more { margin-top: 10px; }
.cal-detail-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 10px 0 0; font-size: 12.5px; }
.cal-detail-facts dt { color: var(--muted); }
.cal-detail-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* the pickers the calendar opens, and the plain list if the grid can't load */
button.li.cal-pick { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; }
button.li.cal-pick:first-child { border-top: 0; }
button.li.cal-pick > svg { width: 16px; height: 16px; flex: none; }
.cal-pick-pills { margin-top: 5px; gap: 5px; }
.cal-failed { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.cal-fb-day { padding: 10px 0 4px; border-top: 1px solid var(--line); }
.cal-fb-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; padding: 6px 0; font-size: 13px; }

@media (max-width: 720px) {
  .cal-toolbar { padding: 12px; gap: 10px; }
  .cal-nav { width: 100%; justify-content: space-between; gap: 10px; }
  .cal-title { order: -1; font-size: 15.5px; }
  .cal-views, .cal-views .btn-group { width: 100%; }
  .cal-views .btn-group button { flex: 1 1 0; justify-content: center; }
  .cal-nav .btn-group button, .cal-views .btn-group button { height: 44px; }
  .cal-nav .btn-group button { padding: 0 14px; }
  .cal-filter { padding: 8px 0 8px 12px; gap: 8px; }
  .cal-filter-label { width: auto; }
  .cal-chips { flex-wrap: nowrap; overflow-x: auto; padding-right: 28px; scrollbar-width: none; mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .cal-chips::-webkit-scrollbar { display: none; }
  .cal-chip { height: 40px; }
  .cal-hint { padding: 10px 12px 0; }
  .cal-grid { padding: 8px; }
  /* the board scrolls sideways under a narrow column of crew letters; Day's columns are headed by the letter alone */
  .cal-grid .ec-timeline .ec-main { --ec-col-width: minmax(118px, 1fr) !important; }
  .cal-grid .ec-timeline .ec-row-head { padding: 8px 7px; justify-content: center; }
  .cal-grid :is(.ec-timeline .ec-row-head, .ec-time-grid .ec-col-head) .cal-res-text { display: none; }
  .cal-grid .ec-time-grid .ec-col-head { padding: 8px 2px; }
  .cal-grid .ec-day-grid .ec-day { min-height: 76px; }
  .cal-grid .ec-day-grid .ec-event.cal-ev { min-height: 26px; padding: 3px 2px; justify-content: center; }
  .cal-ev-compact { display: block; overflow: hidden; text-align: center; font: 750 11px/18px var(--font-num); white-space: nowrap; }
  .cal-grid .ec-list .ec-event.cal-ev { padding: 10px 12px; }
  .cal-ev-when { width: 58px; }
  .cal-ev-who { display: none; }
  .cal-detail { left: 12px; right: 12px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); max-height: 62vh; }
  .cal-quick .btn { height: 44px; }
}
/* the narrowest phones (320 px): the dates take the first row and the arrows get the whole second row */
@media (max-width: 380px) {
  .cal-nav { flex-wrap: wrap; }
  .cal-nav .cal-title { flex-basis: 100%; }
  .cal-nav .btn-group { width: 100%; }
  .cal-nav .btn-group button { flex: 1 1 0; justify-content: center; }
}
:root[data-theme="dark"] .cal-badge, :root[data-theme="dark"] .cal-grid .ec-event.cal-ev { --cal-fill: color-mix(in srgb, var(--cal-who, var(--c6)) 80%, #000); }
:root[data-theme="dark"] .cal-grid:is(.cal-view-week, .cal-view-month) .ec { --ec-highlight-color: color-mix(in srgb, var(--accent-soft) 50%, var(--surface)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cal-badge, :root:not([data-theme="light"]) .cal-grid .ec-event.cal-ev { --cal-fill: color-mix(in srgb, var(--cal-who, var(--c6)) 80%, #000); }
  :root:not([data-theme="light"]) .cal-grid:is(.cal-view-week, .cal-view-month) .ec { --ec-highlight-color: color-mix(in srgb, var(--accent-soft) 50%, var(--surface)); }
}

/* ---------- record pages ---------- */
.rec-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.rec-head .grow { min-width: 240px; }
.rec-head h1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rec-head .idtag { font: 700 13px var(--font-num); color: var(--muted); background: var(--surface-3); padding: 3px 8px; border-radius: 6px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; }
.fact { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact .k { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.fact .v { font-weight: 650; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--muted); font-weight: 650; }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.timeline { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 8px 16px; position: relative; }
.tl::before { content: ""; position: absolute; left: 26px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tl:first-child::before { top: 16px; }
.tl:last-child::before { bottom: calc(100% - 16px); }
.tl .b { width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); margin: 4px 0 0 5px; position: relative; z-index: 1; }
.tl .b.accent { border-color: var(--brand); background: var(--brand); }
.tl .b.good { border-color: var(--good); background: var(--good); }
.tl .b.bad { border-color: var(--bad); }
.tl .tx { font-size: 13px; font-weight: 600; }
.tl .when { font-size: 11.5px; color: var(--muted); }
.checklist { display: flex; flex-direction: column; }
.checklist .ph { padding: 10px 16px 4px; }
.ck { display: flex; align-items: center; gap: 10px; padding: 7px 16px; cursor: pointer; }
.ck:hover { background: var(--surface-2); }
.ck input { width: 17px; height: 17px; accent-color: var(--good); margin: 0; flex: none; }
.ck.done span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.ck .when { margin-left: auto; font-size: 11.5px; color: var(--muted); }
/* read-only steps (the crew's view of the office's list): an icon in place of the box, nothing to click */
.ck.ro { cursor: default; }
.ck.ro:hover { background: none; }
.ck.ro > svg { width: 17px; height: 17px; flex: none; }
.ready { display: flex; flex-direction: column; }
.rd { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.rd:first-child { border-top: 0; }
.rd > svg { width: 18px; height: 18px; }
.rd .s { font-size: 12.5px; color: var(--muted); }
.ok-ic { color: var(--good); }
.warn-ic { color: var(--warn); }
.bad-ic { color: var(--bad); }
.clock { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.clock:first-child { border-top: 0; }
.clock .ring { width: 42px; height: 42px; flex: none; }
.money-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 16px; font-size: 13.5px; }
.money-sum .tot { font-weight: 800; font-size: 15px; border-top: 1px solid var(--line); padding-top: 8px; }
.money-sum .tot:not(.r) { margin-right: -12px; } /* the rule runs unbroken across the column gap */
.money-sum .r { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.money-sum .sub { display: block; margin-top: 1px; }

/* quote builder */
.qlines { width: 100%; border-collapse: collapse; }
.qlines th { font-size: 11.5px; color: var(--muted); font-weight: 750; text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.qlines td { padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.qlines .r { text-align: right; }
.qlines .detail { font-size: 12px; color: var(--muted); margin-top: 2px; }
.qlines .input { height: 32px; }
.qlines td.qty { width: 84px; } .qlines td.price { width: 128px; } .qlines td.tot { width: 108px; } .qlines td.x { width: 40px; }
.add-line { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 8px 4px; }
.picker { position: relative; }
.picker .results { top: 40px; min-width: 340px; }
.rebate { border: 1px solid var(--line); border-radius: 9px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.rebate .calc { font-size: 12.5px; color: var(--ink-2); }
.callout { border-radius: 9px; padding: 10px 12px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.callout.bad { background: var(--bad-soft); color: var(--bad); }
.callout.good { background: var(--good-soft); color: var(--good); }
.callout.info { background: var(--info-soft); color: var(--info); }
.margin-meter { height: 8px; border-radius: 8px; background: var(--surface-3); position: relative; overflow: visible; }
.margin-meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: var(--good); }
.margin-meter i.low { background: var(--warn); }
.margin-meter i.bad { background: var(--bad); }
.margin-meter b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: max(48px, env(safe-area-inset-top, 0px)) 16px 24px; overflow-y: auto; animation: fade .12s ease-out; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop); width: 100%; max-width: 640px; display: flex; flex-direction: column; animation: rise .16s ease-out; }
.modal.wide { max-width: 860px; }
.modal.narrow { max-width: 460px; }
.modal:focus { outline: none; } /* the dialog takes focus so Tab starts inside it; the ring would frame the whole card */
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 16px; }
.modal-h > svg { width: 20px; height: 20px; flex: none; color: var(--accent-ink); }
/* in a column, the mini search's flex basis would set its height */
.modal-b > .search.mini, .stack > .search.mini { flex: none; max-width: none; }
.modal-b { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-f .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.menu { position: absolute; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); padding: 6px; min-width: 220px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-weight: 650; text-align: left; }
.menu button:hover, .menu button:focus-visible { background: var(--surface-3); outline: none; }
.menu button svg { width: 17px; height: 17px; color: var(--muted); }
.menu button small { margin-left: auto; color: var(--muted); font-weight: 600; }
.pop { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); width: 300px; max-width: calc(100vw - 32px); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; background: var(--chrome); color: #fff; border-radius: 10px; padding: 10px 14px; font-weight: 650; font-size: 13px; box-shadow: var(--shadow-pop); display: flex; gap: 12px; align-items: center; animation: rise .16s ease-out; }
.toast.bad { background: var(--bad); }
.toast button { background: none; border: 0; color: #ffb48f; font-weight: 800; cursor: pointer; padding: 0; }

/* ---------- charts ---------- */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { font: 600 11px var(--font-num); fill: var(--muted); }
.chart .grid line { stroke: var(--line); } .chart .grid line.zero { stroke: var(--line-strong); }
.chart .axis line { stroke: var(--line-strong); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); font-weight: 650; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 2px; width: 14px; border-radius: 2px; }
.legend i.dash { height: 0; width: 14px; border-top: 2px dashed var(--ink-2); border-radius: 0; }
.legend i.dot { height: 0; width: 14px; border-top: 2px dotted var(--ink-2); border-radius: 0; }
.legend i.band { background: color-mix(in srgb, var(--c1) 22%, transparent); }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); border-radius: 9px; padding: 8px 10px; font-size: 12px; min-width: 160px; z-index: 20; }
.tip .tt { font-weight: 800; margin-bottom: 4px; }
.tip .tr { display: flex; gap: 10px; justify-content: space-between; }
.tip .tr b { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.chart-box { position: relative; }
.hbar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.hbar .bar { height: 10px; background: var(--surface-3); border-radius: 5px; overflow: hidden; display: flex; gap: 2px; }
.hbar .bar i { display: block; height: 100%; }
.hbar .r { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 650; }

/* flags */
.flag { display: grid; grid-template-columns: 4px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-1); }
.flag > i { background: var(--info); }
.flag.act > i { background: var(--bad); }
.flag.watch > i { background: var(--warn); }
.flag.done { opacity: .7; }
.flag .fb { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.flag .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.flag .cols p { font-size: 13px; color: var(--ink-2); }
.flag .live { font-size: 12.5px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); border-radius: 7px; padding: 6px 9px; }

/* bottom tabs (phones) */
.tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .split, .split.wide { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  :root { --rail: 72px; }
  .brand .word, .brand small, .nav a span, .nav .count, .rail-foot { display: none; }
  .brand { justify-content: center; padding: 4px 0 18px; }
  .nav a { justify-content: center; padding: 10px; }
  .nav a .badge-dot { position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
  .g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topbar { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); gap: 8px; }
  .topbar .m-brand { display: flex; align-items: center; }
  .topbar .m-brand svg { width: 28px; height: 22px; }
  .topbar .new-label, .topbar .spacer { display: none; }
  .search kbd { display: none; }
  #global-search { padding-right: 12px; }
  .page { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 16px calc(92px + env(safe-area-inset-bottom, 0px)); gap: 14px; }
  .g2, .g4, .form { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .val { font-size: 19px; }
  h1 { font-size: 19px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 750; color: var(--muted); padding: 4px 0; border: 0; background: none; cursor: pointer; position: relative; text-decoration: none; }
  .tabbar svg { width: 21px; height: 21px; }
  .tabbar .on { color: var(--accent-ink); }
  .tabbar .badge-dot { position: absolute; top: 2px; left: calc(50% + 7px); width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
  .board { grid-auto-columns: minmax(78vw, 1fr); }
  .col { max-height: none; }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .flag .cols { grid-template-columns: minmax(0, 1fr); }
  .hbar { grid-template-columns: 100px minmax(0, 1fr) 72px; }
  .modal { border-radius: 14px; }
  .scrim { padding: max(16px, env(safe-area-inset-top, 0px)) 10px 16px; }
  .modal-b, .modal-h, .modal-f { padding-left: 14px; padding-right: 14px; }
  .qlines td.price { width: 104px; } .qlines td.qty { width: 64px; }
  .hide-m { display: none !important; }
}
@media (min-width: 721px) { .show-m { display: none !important; } }

/* ---------- text tones and small parts ---------- */
.bad-t { color: var(--bad); }
.good-t { color: var(--good); }
.warn-t { color: var(--warn); }
.accent-t { color: var(--accent-ink); }
.pre { white-space: pre-wrap; }
input.tick { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; flex: none; cursor: pointer; }
.ic14 { width: 14px; height: 14px; flex: none; }
.rot90 { transform: rotate(90deg); }
.big-num { font: 650 26px/1.1 var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent-ink); cursor: pointer; font-weight: 700; font-size: 12px; }
.linkish:hover { text-decoration: underline; }
.fact .linkish { font-size: inherit; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain[disabled] .btn, fieldset.plain[disabled] .swatch { pointer-events: none; opacity: .5; }
.av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--accent); color: #fff; font: 800 11.5px var(--font-ui); letter-spacing: .02em; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .select { width: auto; max-width: 220px; }
.search.mini { flex: 0 1 300px; max-width: 100%; min-width: 180px; }
.search.mini input { height: 32px; font-size: 13px; border-radius: 8px; padding-left: 32px; background: var(--surface); border-color: var(--line-strong); }
.search.mini > svg { left: 10px; top: 8px; width: 16px; height: 16px; }
.timer { display: inline-flex; align-items: center; gap: 5px; font: 700 12px var(--font-num); color: var(--warn); background: var(--warn-soft); padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.timer.late { color: var(--bad); background: var(--bad-soft); }
.timer svg { width: 14px; height: 14px; }
.list.bordered { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
details.more > summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .12s; margin-right: 2px; }
details.more[open] > summary::before { transform: rotate(45deg); }
ol.steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.t.dense th, .t.dense td { padding: 7px 10px; }
.t.load { table-layout: fixed; }
.t.load th:first-child, .t.load td.crew { width: 34%; }
.t.load td.crew { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t.load td .cap { margin-bottom: 4px; }
.t.edit td { padding: 6px 8px; vertical-align: middle; }
.t.edit th { padding: 7px 8px; }

/* today */
.lane { padding: 10px 16px 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.lane:first-child { border-top: 0; }
.lane-h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.slot { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 7px; background: var(--surface-2); font-size: 12.5px; color: var(--ink); min-width: 0; }
.slot svg { width: 15px; height: 15px; flex: none; }
.slot.muted { color: var(--muted); }
a.slot:hover { background: var(--surface-3); text-decoration: none; }
.slot.risk { box-shadow: inset 3px 0 0 var(--bad); }

/* boards: slim summary column */
.board { display: flex; }
.board > .col { flex: 1 0 250px; min-width: 250px; }
.board > .col.slim { flex: 0 0 196px; min-width: 196px; }
.kcard.static { cursor: default; box-shadow: none; background: var(--surface-2); }
a.kcard.static { cursor: pointer; color: var(--ink); text-decoration: none; }
.kcard.static .name { font: 650 20px var(--font-num); }
.drop-hint { border: 1.5px dashed var(--line-strong); border-radius: 9px; padding: 16px 10px; text-align: center; font-size: 12px; color: var(--muted); }
.col.slim.drop .drop-hint { border-color: var(--brand); color: var(--accent-ink); }

/* charts extras */
.hb { position: relative; height: 8px; border-radius: 4px; background: var(--surface-3); flex: 1; min-width: 60px; }
.hb i { display: block; height: 100%; border-radius: 4px; }
.hb b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 2px; }
.tip .tr { padding: 1px 0; }
.tip .tr span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tip .sw { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.tip .tr.tot { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; font-weight: 800; }
.funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.fs { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.fs:first-child { border-left: 0; }
.fs .lab { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.fs b { font-size: 19px; font-weight: 650; }
.fs .now { font-size: 11.5px; color: var(--muted); }

/* quote builder extras */
.kind { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 6px; border-radius: 5px; background: var(--surface-3); color: var(--ink-2); flex: none; }
.kind.kit { background: var(--accent-soft); color: var(--accent-ink); }
.kind.labour { background: var(--info-soft); color: var(--info); }
.kind.custom { background: var(--warn-soft); color: var(--warn); }
.pop-in { position: absolute; top: 36px; left: 0; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); padding: 8px; width: min(440px, calc(100vw - 48px)); display: flex; flex-direction: column; gap: 6px; }
.pick-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; }
.pick-list button { display: flex; gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; padding: 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.pick-list button:hover { background: var(--surface-3); }
.pick-list .id { font: 700 11.5px var(--font-num); color: var(--muted); min-width: 66px; }
.title-in { font: inherit; font-weight: 800; color: var(--ink); border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 2px 6px; margin-left: -7px; min-width: 0; width: min(520px, 100%); }
.title-in:hover { border-color: var(--line); }
.title-in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.save-state { font-weight: 700; }
.save-state.saved { color: var(--good); }
.save-state.dirty { color: var(--warn); }
@media (min-width: 1181px) { .sticky-side { position: sticky; top: calc(var(--bar) + 16px); } }

/* setup */
.savebar { position: sticky; bottom: 16px; z-index: 25; display: flex; align-items: center; gap: 10px; background: var(--chrome); color: #fff; border-radius: 12px; padding: 10px 12px 10px 16px; box-shadow: var(--shadow-pop); font-weight: 700; }
.savebar > svg { width: 18px; height: 18px; flex: none; }
.savebar .btn.ghost { color: #fff; }
.savebar .btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--surface); }
.kit-ed { border: 1px solid var(--line); border-radius: 9px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.flag .live { border: 0; cursor: pointer; text-align: left; display: inline-flex; gap: 7px; align-items: center; align-self: flex-start; font: inherit; font-size: 12.5px; font-weight: 700; }
.flag .live svg { width: 15px; height: 15px; flex: none; }
.flag .live.ok { color: var(--good); background: var(--good-soft); cursor: default; }
.flag .select.sm { width: auto; }

/* ---------- shell extras ---------- */
.brand:hover { text-decoration: none; }
.brand .mark svg, .m-brand span svg { width: 100%; height: 100%; display: block; }
.brand .word { display: block; height: 13px; }
.brand .word svg { height: 13px; width: auto; display: block; color: #fff; }
.m-brand span { display: block; width: 30px; height: 24px; }
.rail-foot .who .av { width: 26px; height: 26px; font-size: 11px; }
.banners { width: 100%; max-width: 1380px; margin: 0 auto; padding: 16px max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 10px; }
.banners + .banners { padding-top: 10px; }
.banner.sample { background: var(--accent-soft); color: var(--ink); border-color: var(--accent-line); }
.banner.sample > svg { color: var(--accent-ink); }
.sample-pill { flex: none; border: 1px dashed var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border-radius: 7px; padding: 5px 8px; cursor: pointer; }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.more-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 12.5px; text-align: center; }
.more-item:hover { text-decoration: none; background: var(--surface-2); }
.more-item svg { width: 22px; height: 22px; color: var(--ink-2); }
.more-item.on { border-color: var(--brand); color: var(--accent-ink); }
.more-item.on svg { color: var(--accent-ink); }
body.locked { overflow: hidden; }
.skel { background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 40%, var(--surface-3) 80%); background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite; border-color: transparent; box-shadow: none; }
.tile.skel { height: 84px; }
.card.skel.tall { height: 420px; }
.skel.line { height: 26px; border-radius: 8px; }
.skel.w30 { width: min(320px, 70%); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- My day ---------- */
.page.narrow { max-width: 760px; }
.day-nav { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; box-shadow: var(--shadow-1); }
.day-nav .grow { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.25; }
.day-nav b { font-size: 16px; font-weight: 800; }
.stop { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-1); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.stop::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c5); }
.stop.visit::before { background: var(--c4); }
.stop.risk::before { background: var(--bad); }
.stop.done { opacity: .72; }
.stop.done::before { background: var(--good); }
.stop h3 { font-size: 18px; font-weight: 800; }
.stop-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stop-h .time { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.stop-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.stop-acts .btn { height: 44px; font-size: 14px; }
.stop-acts .btn[aria-disabled="true"] { cursor: default; color: var(--muted); }
.stop-notes { background: var(--surface-2); border-radius: 9px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); }
.stop-foot { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.stop-foot .btn { height: 42px; }
.stop-foot .btn.primary { flex: 1 1 160px; }
.parts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.parts li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; }
.parts .q { text-align: right; font-weight: 700; color: var(--ink-2); }
.checklist.tight { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.checklist.tight .ph { padding: 8px 12px 2px; }
.checklist.tight .ck { padding: 10px 12px; min-height: 44px; }
.next-up { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px dashed var(--line-strong); background: transparent; border-radius: var(--r); padding: 12px 14px; cursor: pointer; font-size: 13.5px; }
.next-up:hover { background: var(--surface); }
.next-up > span:nth-child(2) { flex: 1; min-width: 0; }
.next-up svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pick { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; cursor: pointer; min-height: 56px; }
.pick:hover { border-color: var(--line-strong); background: var(--surface-2); }
.pick > span:last-child { display: flex; flex-direction: column; min-width: 0; }

/* ---------- time, receipts and the pay run ----------
   The clock on My day is built for a gloved thumb: 48px buttons on a phone. A live dot (green, pulsing) means
   someone is on the clock. Chips pick one of a few options in a single tap. */
.stack.tight { gap: 8px; }
.grow2 { flex: 2 1 0; min-width: 0; }
.clock-now { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--good-soft); color: var(--ink); }
.clock-now .grow { display: flex; flex-direction: column; gap: 1px; }
.clock-now b { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-dot { display: inline-block; width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 45%, transparent); animation: live 1.8s ease-out infinite; }
.live-dot.sm { width: 7px; height: 7px; margin-right: 5px; vertical-align: 1px; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 45%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
/* Each button takes its label's width and the pair wraps when both don't fit, so "Clock on · <customer>" gets the
   whole row on a phone (with Something else full width under it) and never cuts the customer's name. */
.clock-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.clock-acts .btn { height: 44px; font-size: 14px; flex: 1 1 0; min-width: max-content; }
.clock-acts .btn.grow2 { flex: 2 1 auto; min-width: 0; }
.card-foot { padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.ts-grid .stale { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.ts-grid .stale svg { width: 15px; height: 15px; flex: none; }
.ts-list { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.ts-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 12px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ts-row:first-child { border-top: 0; }
.ts-row:not(:disabled):not(.static):hover { background: var(--surface-2); }
.ts-row:disabled { cursor: default; }
.ts-row.static { cursor: default; }
.ts-row .t { flex: none; min-width: 128px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.ts-row .num:last-child { flex: none; font-weight: 700; }
.ts-total { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); background: var(--surface-2); font-weight: 750; }
.wk { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.wk-day { padding: 10px 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.wk-day:first-child { border-top: 0; }
.wk-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 26px; }
.wk-h > .small { text-align: right; }
.wk-day .ts-row { border: 1px solid var(--line); border-radius: 8px; min-height: 38px; padding: 6px 10px; }
.wk-day .ts-row + .ts-row { margin-top: 0; }
.wk-extra { padding: 0 2px; }
.wk-acts { display: flex; gap: 4px; flex-wrap: wrap; margin-left: -6px; }
.wk-tot { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.clock-pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.clock-pick:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); }
.clock-pick:disabled { opacity: .55; cursor: default; }
.clock-pick .grow { display: flex; flex-direction: column; gap: 1px; }
.clock-pick b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clock-pick .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clock-pick .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-ink); }
.clock-pick .ic svg { width: 18px; height: 18px; }
.kind-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.clock-kind { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 64px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: 700 12.5px var(--font-ui); color: var(--ink-2); cursor: pointer; text-align: center; }
.clock-kind:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
.clock-kind:disabled { opacity: .5; cursor: default; }
.clock-kind svg { width: 20px; height: 20px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); font: 700 12.5px var(--font-ui); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.chip svg { width: 15px; height: 15px; color: var(--muted); }
.chip:hover { background: var(--surface-3); }
.chip.on { background: var(--chrome); border-color: var(--chrome); color: #fff; }
.chip.on svg { color: #fff; }
:root[data-theme="dark"] .chip.on { background: var(--accent-soft); border-color: var(--accent-ink); color: var(--ink); }
:root[data-theme="dark"] .chip.on svg { color: var(--accent-ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip.on { background: var(--accent-soft); border-color: var(--accent-ink); color: var(--ink); }
  :root:not([data-theme="light"]) .chip.on svg { color: var(--accent-ink); }
}
fieldset.plain[disabled] .chip { pointer-events: none; }
fieldset.plain[disabled] .chip:not(.on) { opacity: .5; }
.rcpt { display: flex; flex-direction: column; gap: 8px; }
.rcpt-img { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: zoom-in; overflow: hidden; }
.rcpt-img img { display: block; width: 100%; max-height: 240px; object-fit: contain; }
.rcpt-img.big { cursor: zoom-out; }
.rcpt-img.big img { max-height: none; }
.rcpt-img .rcpt-gone { display: none; padding: 18px; }
.rcpt-img.gone { cursor: default; }
.rcpt-img.gone img { display: none; }
.rcpt-img.gone .rcpt-gone { display: block; }
.rcpt-drop { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1.5px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); }
.rcpt-drop:has(.rcpt-prev) { flex-direction: row; align-items: flex-start; }
.rcpt-prev { width: 64px; height: 64px; flex: none; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.facts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.facts.two .fact { padding: 9px 12px; }
.facts.two .fact:nth-child(-n+2) { border-top: 0; }
.facts.two .fact:nth-child(2n) { border-left: 1px solid var(--line); }
ul.clash { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
.pr .pr-step { display: flex; gap: 14px; padding: 16px; border-top: 1px solid var(--line); min-width: 0; }
.pr .pr-step:first-child { border-top: 0; }
.pr-step h3 { font-size: 15px; font-weight: 800; }
.pr-n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 800 13px var(--font-num); background: var(--surface-3); color: var(--ink-2); }
.pr-n svg { width: 16px; height: 16px; }
.pr-step.ok .pr-n { background: var(--good-soft); color: var(--good); }
.pr-step.warn .pr-n { background: var(--warn-soft); color: var(--warn); }
.pr-step.idle h3 { color: var(--muted); }
.ts-grid td.r .live { color: var(--good); font-weight: 750; }
.ts-grid td.d { width: 52px; }
.ts-grid tfoot td { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 0; }
.cal-grid .ec-event.cal-ev-leave.is-requested { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--warn); color: var(--muted); }
.cal-grid .ec-event.cal-ev-leave.is-requested .cal-ev-title { font-style: italic; }
@media (max-width: 720px) {
  .clock-acts .btn { height: 48px; font-size: 15px; }
  .ts-row .t { min-width: 100px; font-size: 12.5px; }
  .ts-row .grow.ellipsis { white-space: normal; overflow: visible; line-height: 1.3; }
  .ts-grid th.d, .ts-grid td.d { display: none; }
  .kind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chip { height: 38px; }
  .pr .pr-step { padding: 14px 12px; gap: 10px; }
  .wk-h > .small { flex-basis: 100%; order: 3; text-align: left; }
}

@media (max-width: 1000px) {
  .funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fs:nth-child(4) { border-left: 0; }
  .fs:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .banners { padding: 12px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  .banner { flex-wrap: wrap; }
  .topbar .new-btn { width: 38px; padding: 0; }
  .board > .col { flex: 0 0 80vw; min-width: 0; }
  .board > .col.slim { flex: 0 0 62vw; }
  .search.mini { flex: 1 1 100%; }
  .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fs:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
  .fs:nth-child(2n) { border-left: 1px solid var(--line); }
  .fs:nth-child(-n+2) { border-top: 0; }
  .savebar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .qlines, .qlines tbody { display: block; width: 100%; }
  .qlines thead { display: none; }
  .qlines tr { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 8px; padding: 12px 8px; border-bottom: 1px solid var(--line); align-items: start; }
  .qlines td { border: 0; padding: 0; width: auto !important; }
  .qlines td.item { grid-column: 1 / -1; }
  .qlines td.tot { text-align: right; }
  .pop-in { width: calc(100vw - 48px); }
  .more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stop { padding: 12px 14px 14px; }
  .big-num { font-size: 22px; }
}

/* first paint, before the app script runs */
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-weight: 700; font-size: 13.5px; }
.boot-mark { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .9s linear infinite; }
.boot.failed .boot-mark { display: none; }
.boot.failed { color: var(--ink-2); text-align: center; padding: 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
.plan-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 10px; }
.plan-grid .pm { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 650; color: var(--muted); }
@media (max-width: 720px) { .plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- customer documents (quote, tax invoice): white paper in both themes, laid out like the PDF */
.doc-card .card-h .grow { flex: 1 1 210px; } /* on a phone the buttons drop below the title rather than squeezing it */
.paper-wrap { padding: 18px; background: var(--surface-2); border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }
.paper-wrap.flat { padding: 0; background: none; border: 0; }
.paper-c { container: paper / inline-size; }
.paper { --pp-ink: #16181b; --pp-ink2: #43464c; --pp-muted: #6c6f76; --pp-line: #e3e3e6; --pp-soft: #f5f5f6; --pp-brand: #fe4a00;
  color-scheme: light; background: #fff; color: var(--pp-ink); max-width: 820px; margin: 0 auto; padding: 38px 44px 26px; border-top: 5px solid var(--pp-brand);
  border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .07), 0 10px 28px rgba(0, 0, 0, .07); font-size: 13px; line-height: 1.45; }
.paper .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.paper .strong { font-weight: 700; color: var(--pp-ink); }
.paper .ink2 { color: var(--pp-ink2); }
.pp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.pp-logo svg { display: block; width: 236px; max-width: 100%; height: auto; }
.pp-title { text-align: right; flex: none; }
.pp-title .t { font-size: 30px; font-weight: 800; letter-spacing: -.015em; line-height: 1; }
.pp-stamp { display: inline-block; margin-top: 10px; padding: 2px 9px; border: 1.5px solid currentColor; border-radius: 4px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pp-muted); }
.pp-stamp.good { color: #11744a; }
.pp-lab, .pp-meta dt { font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--pp-muted); margin-bottom: 4px; }
.pp-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--pp-line); }
.pp-meta dd { margin: 0; font-weight: 700; }
.pp-parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 26px; font-size: 12.5px; overflow-wrap: anywhere; }
.pp-heading h3 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.pp-heading p { margin: 4px 0 0; color: var(--pp-muted); }
.pp-summary { display: flex; margin: 16px 0 24px; background: var(--pp-soft); border-left: 3px solid var(--pp-brand); border-radius: 0 6px 6px 0; }
.pp-summary > div { flex: none; padding: 12px 18px 12px 14px; }
.pp-summary > div.big { flex: 1 1 auto; }
.pp-summary .v { font-size: 15px; font-weight: 700; }
.pp-summary .big .v { font-size: 25px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.pp-summary .s { margin-top: 2px; font-size: 11px; color: var(--pp-muted); }
.pp-lines { width: 100%; border-collapse: collapse; }
.pp-lines th { padding: 0 10px 8px 0; border-bottom: 1.5px solid var(--pp-ink); text-align: left; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--pp-muted); }
.pp-lines td { padding: 11px 10px 11px 0; border-bottom: 1px solid var(--pp-line); vertical-align: top; }
.pp-lines th:last-child, .pp-lines td:last-child { padding-right: 0; }
.pp-lines .r { text-align: right; white-space: nowrap; }
.pp-part { margin-top: 2px; font-size: 12px; color: var(--pp-muted); }
.pp-totals-row { display: flex; gap: 30px; align-items: flex-start; margin-top: 14px; }
.pp-notes { flex: 1; font-size: 11.5px; color: var(--pp-ink2); }
.pp-notes p { margin: 0 0 8px; }
.pp-totals { flex: none; width: 350px; }
.pp-t { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 4px 0; }
.pp-t > span:first-child { min-width: 0; }
.pp-t small { display: block; font-size: 11px; color: var(--pp-muted); font-weight: 500; }
.pp-t .num { white-space: nowrap; }
.pp-t.sub { margin-top: 3px; padding-top: 7px; border-top: 1px solid var(--pp-line); font-weight: 700; }
.pp-t.strong { margin-top: 4px; padding-top: 8px; border-top: 1.5px solid var(--pp-ink); font-size: 15px; font-weight: 800; }
.pp-t.muted { color: var(--pp-muted); }
.pp-pay { margin-top: 20px; padding: 12px 16px; background: var(--pp-soft); border-radius: 6px; }
.pp-pay dl { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 4px 0 0; }
.pp-pay dt { font-size: 11px; color: var(--pp-muted); }
.pp-pay dd { margin: 0; font-weight: 700; }
.pp-missing { margin: 0 0 6px; font-size: 12px; color: #9a5800; }
.pp-sec h4, .pp-accept h4 { margin: 24px 0 8px; font-size: 14px; font-weight: 800; }
.pp-sec ol { margin: 0; padding-left: 20px; color: var(--pp-ink2); }
.pp-sec li { margin-bottom: 4px; padding-left: 2px; }
.pp-sec li::marker { color: var(--pp-brand); font-weight: 800; }
.pp-sec p { margin: 0; color: var(--pp-ink2); }
.pp-sec.small-print p { font-size: 11px; }
.pp-accept p { margin: 0 0 30px; color: var(--pp-ink2); }
.pp-sign-lines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; font-size: 11px; color: var(--pp-muted); }
.pp-sign-lines span { display: block; margin-bottom: 4px; border-top: 1px solid var(--pp-ink); }
.pp-signed { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.pp-signed img { display: block; max-width: 220px; max-height: 84px; }
.pp-foot { margin-top: 30px; padding-top: 10px; border-top: 1px solid var(--pp-line); font-size: 10.5px; color: var(--pp-muted); }
/* sending, accepting and signing */
.send-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: st; }
.send-steps li { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); counter-increment: st; }
.send-steps li::before { content: counter(st); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 99px; background: var(--brand); color: #fff; font: 800 12px var(--font-num); }
.send-steps b { font-size: 13.5px; }
.send-steps span { flex: 1; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.send-mail { border: 1px solid var(--line); border-radius: var(--r); }
.send-mail summary { padding: 10px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.send-mail pre { margin: 0; padding: 0 12px 12px; white-space: pre-wrap; font: 500 12.5px/1.5 var(--font-ui); color: var(--ink-2); }
.send-preview { padding: 12px; background: var(--surface-2); border-radius: var(--r); }
.send-preview .eyebrow { margin: 2px 4px 10px; }
.accept-sum { display: flex; align-items: flex-end; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r); }
.accept-sum .big-num { font-size: 24px; line-height: 1.2; }
.accept-how { display: flex; width: 100%; }
.accept-how button { flex: 1 1 auto; justify-content: center; white-space: nowrap; height: 36px; padding: 0 8px; }
.accepted { display: flex; flex-direction: column; gap: 10px; }
.accepted img { align-self: flex-start; max-width: 100%; max-height: 72px; padding: 6px 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); }
.sign-pad { position: relative; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r); }
.sign-pad canvas { display: block; width: 100%; height: 190px; touch-action: none; cursor: crosshair; border-radius: var(--r) var(--r) 0 0; }
.sign-wait { position: absolute; inset: 0 0 34px; display: grid; place-items: center; padding: 0 16px; text-align: center; font-size: 13px; color: #6c6f76; }
.sign-base { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px 8px; border-top: 1px dashed #c9c9cd; font-size: 12px; color: #6c6f76; }
.sign-base .linkish { color: #b33400; font-weight: 700; }
/* the paper lays itself out by its own width, not the window's: on a desktop quote page it sits in a narrow column */
@container paper (max-width: 680px) {
  .paper { padding: 28px 26px 20px; }
  .pp-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-parties { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
  .pp-summary { flex-wrap: wrap; }
  .pp-summary > div.big { flex-basis: 100%; }
  .pp-totals-row { flex-direction: column-reverse; gap: 8px; }
  .pp-totals { width: 100%; }
}
@container paper (max-width: 460px) {
  .paper { padding: 22px 16px 18px; font-size: 12.5px; }
  .pp-head { margin-bottom: 20px; }
  .pp-logo svg { width: 168px; }
  .pp-title .t { font-size: 22px; }
  .pp-parties { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pp-sign-lines { grid-template-columns: minmax(0, 1fr); gap: 26px; }
}
@media (max-width: 720px) {
  .paper-wrap { padding: 10px; }
  .send-steps { grid-template-columns: minmax(0, 1fr); }
  .sign-pad canvas { height: 170px; }
}

/* crews: tickets, a crew's day, cover, telling customers, sign-ins, what changed, the crew-view preview */
.tk { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.tk.fills { background: var(--good-soft); color: var(--good); }
.tk.expired { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; }
.cd-tk { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cd-sum { margin-top: -6px; }
.cd-people { display: flex; flex-direction: column; gap: 10px; }
.cd-person { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.cd-person .grow { flex: 1; min-width: 0; }
.cd-person.away { color: var(--muted); }
.cd-person.away .av { background: var(--surface-3); color: var(--muted); }
.tell { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); }
.tell p { margin: 0; }
.tk-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) 150px 30px; gap: 8px; align-items: center; }
.cover-li .meta, .li .meta.wrap { white-space: normal; }
/* a long move plan scrolls inside the form, so the summary and the Move button stay close */
.list.bordered.plan { max-height: 320px; overflow-y: auto; }
.signin .claims { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.signin .claim { display: flex; align-items: center; gap: 6px; }
.signin .side { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.signin-pv { gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); align-items: center; }
.signin-pv .select { width: auto; max-width: 260px; flex: 0 1 auto; }
.card.changes { border-color: var(--accent-line); box-shadow: inset 3px 0 0 var(--accent); }
.banner.preview { background: var(--ink); color: var(--surface); border-color: transparent; }
.cal-grid .ec-event.cal-ev-cover { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--cal-fill); background-image: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--cal-fill) 14%, transparent) 7px 9px); }
.cal-grid .ec-event.cal-ev-cover .cal-ev-sub { color: var(--muted); opacity: 1; }
.cal-grid .ec-list .ec-event.cal-ev-cover { background-image: none; }
.cal-ev-cover .cal-ev-swatch { background: repeating-linear-gradient(to bottom, var(--cal-fill) 0 4px, transparent 4px 7px); }
.cal-key-leave .cal-swatch { background: repeating-linear-gradient(135deg, var(--line-strong) 0 2px, transparent 2px 4px); }
@media (max-width: 720px) {
  .tk-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30px; }
  .tk-row > :first-child { grid-column: 1 / -1; }
  .signin { flex-wrap: wrap; }
  .signin .side { flex-basis: 100%; justify-content: flex-start; padding-left: 40px; }
  .signin .claims { align-items: flex-start; }
}
/* a title that must be read whole on a phone ("Install crew A tomorrow: needs …") */
.li .title.wrap { white-space: normal; }

/* ---------- My day, rebuilt (Version 9) ----------
   Top to bottom: Waiting on you (approvers), New for you, the clock, a receipt or leave in one tap, the day's work,
   tasks, and where the receipts and leave someone sent are up to. The day's work heads its own section, so moving
   between days never moves the clock. */
.myday .day-sec { display: flex; flex-direction: column; gap: 12px; }
.myday .day-nav { background: none; border: 0; box-shadow: none; padding: 6px 0 0; }
.myday .day-nav .grow { align-items: flex-start; text-align: left; gap: 2px; min-width: 0; }
.myday .day-nav h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.card.waiting { border-color: var(--accent-line); box-shadow: inset 3px 0 0 var(--accent); }
/* the admin's to-do list is read whole on a phone: titles wrap, the detail runs to two lines */
.card.waiting .li .title { white-space: normal; }
.card.waiting .li .meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.more-row.link { display: block; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--accent-ink); cursor: pointer; }
.more-row.link:hover { background: var(--surface-2); }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-b { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 64px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-1); cursor: pointer; font: inherit; color: inherit; }
.quick-b:hover { border-color: var(--line-strong); background: var(--surface-2); }
.quick-b .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.quick-b .ic svg { width: 19px; height: 19px; }
.quick-b .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quick-b b { font-size: 15px; font-weight: 800; }
.quick-b > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.clock-now.off { background: var(--surface-2); border: 1px solid var(--line); }
.off-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.clock-now .small { overflow-wrap: anywhere; }
.clock-dur { font-size: 18px; white-space: nowrap; flex: none; }
.ts-week { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 2px; }
.ts-week .grow { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.li .for { font-size: 13px; color: var(--ink-2); margin-top: 1px; overflow-wrap: anywhere; }
.li .for.muted { color: var(--muted); font-style: italic; }
/* amount over its pill, so a receipt's title and what it was for keep the width on a phone */
.li .side.stack { flex-direction: column; align-items: flex-end; gap: 4px; }
/* staff records */
.hr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hr-steps .checklist { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ck-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-right: 10px; }
.ck-row:first-child { border-top: 0; }
.ck-row .ck { flex: 1; min-width: 0; padding: 9px 12px; }
.ck-row .ck > span { display: flex; flex-direction: column; min-width: 0; }
.ck-row .ck .sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.ck-row.done .ck > span { color: var(--ink); }
.ck-row > .small:empty { display: none; }
@media (max-width: 720px) {
  /* approvals are read whole on a phone */
  .appr .li .title, .appr .li .meta { white-space: normal; }
  .hr-grid { grid-template-columns: minmax(0, 1fr); }
  .quick { grid-template-columns: minmax(0, 1fr); }
  .quick-b { min-height: 58px; }
  .clock-dur { font-size: 16px; }
  .ck-row { flex-wrap: wrap; row-gap: 0; padding: 0 10px 8px 0; }
  .ck-row .ck { flex-basis: 100%; padding-bottom: 2px; }
  .ck-row > .small { padding-left: 39px; }
  .ck-row > .btn { margin-left: 31px; }
}

/* ---- Admin page (#team), polished with the unslop method (CC BY 4.0, Damir Sokolovsky, github.com/heydamir/unslop):
   one accent per screen, figures in one right-aligned column, neutral chrome, sentence case, steady 4px rhythm. */
.admin .li .amt { min-width: 76px; text-align: right; font: 700 14px/20px var(--font-num); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.admin .li .side { gap: 8px; }
.admin .li .side .amt + .btn { margin-left: 8px; }
.admin .btn.ok { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.admin .btn.ok:hover { background: var(--ink-2); border-color: var(--ink-2); }
.admin .btn.ok svg { color: inherit; }
.admin .li .ic.warn { background: var(--surface-3); color: var(--warn); }
.admin .av { background: var(--surface-3); color: var(--ink-2); font-weight: 700; }
.admin .sample-tag { text-transform: none; letter-spacing: 0; font-size: 11.5px; font-weight: 600; }
.admin .t td.r, .admin .num { font-variant-numeric: tabular-nums; }
.admin .pr .pr-step { display: block; padding: 16px 20px; }
.admin .pr-h { display: flex; align-items: center; gap: 12px; min-height: 28px; }
.admin .pr-body { padding: 8px 0 0 40px; min-width: 0; }
.admin .pr-body:empty { display: none; }
@media (max-width: 720px) {
  .admin .appr .li { flex-wrap: wrap; row-gap: 8px; align-items: flex-start; }
  .admin .appr .li .side { flex-basis: 100%; padding-left: 44px; }
  .admin .appr .li .side .amt { min-width: 0; margin-right: auto; text-align: left; }
  .admin .pr .pr-step { padding: 16px 12px; }
  .admin .pr-body { padding-left: 0; padding-top: 12px; }
  .admin .pr .t th, .admin .pr .t td { padding-left: 6px; padding-right: 6px; }
  .admin .pr .t th:first-child, .admin .pr .t td:first-child { padding-left: 0; }
  .admin .pr .t .sub { font-size: 11.5px; }
}
.admin .pr-m .meta { white-space: normal; }
@media (max-width: 720px) { .admin .appr .btn.sm { height: 36px; padding: 0 14px; } }
@media (max-width: 720px) {
  .admin .btn-group { display: flex; width: 100%; }
  .admin .btn-group button { flex: 1 1 auto; justify-content: center; padding: 0 8px; white-space: nowrap; font-size: 12px; }
}

@media (max-width: 380px) {
  .admin .btn-group:has(> :nth-child(4)) { display: grid; grid-template-columns: 1fr 1fr; }
  .admin .btn-group:has(> :nth-child(4)) button { border-left: 0; }
  .admin .btn-group:has(> :nth-child(4)) button:nth-child(even) { border-left: 1px solid var(--line); }
  .admin .btn-group:has(> :nth-child(4)) button:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---- Training: the course page, a film, a quick check, and the way in on My day */
.training .stack { gap: 14px; }
.tr-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; flex: 1; min-width: 60px; }
.tr-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .4s ease; }
.tr-hero .tr-hero-b { display: flex; align-items: center; gap: 16px; }
.tr-hero h2 { margin: 4px 0 4px; font-size: 18px; line-height: 1.25; font-weight: 800; letter-spacing: -.005em; }
.tr-hero p { margin: 0; max-width: 46em; }
.tr-hero .tr-hero-p { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.tr-hero .tr-hero-p .small { white-space: nowrap; }
.tr-sec .card-h h2 { font-size: 15px; }
.tr-sec.other { opacity: .92; }
.tr-row { color: inherit; text-decoration: none !important; }
.tr-row:hover { background: var(--surface-2); }
.tr-row .body { flex: 1; min-width: 0; }
.tr-row .title { font-weight: 700; }
.tr-row .meta { font-size: 12.5px; color: var(--muted); }
.tr-row .side { color: var(--muted); display: flex; }
.tr-row .side svg { width: 18px; height: 18px; }
.tr-thumb { position: relative; flex: none; width: 92px; height: 58px; border-radius: 8px; overflow: hidden; background: var(--chrome); display: grid; place-items: center; color: #fff; }
.tr-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.tr-thumb.phone img { object-position: center 18%; }
.tr-thumb > svg { width: 20px; height: 20px; opacity: .8; }
.tr-thumb .len { position: absolute; right: 4px; bottom: 4px; font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 5px; background: rgba(0, 0, 0, .72); color: #fff; }
.tr-tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--good-soft); color: var(--good); }
.tr-tick svg { width: 15px !important; height: 15px !important; }
.tr-row.done .title { color: var(--ink-2); }
.tr-checkrow .ic { background: var(--accent-soft); color: var(--accent-ink); }
.tr-more { display: flex; justify-content: center; }
.tr-film { border-radius: var(--r); overflow: hidden; background: var(--chrome); box-shadow: var(--shadow-1); }
.tr-film video { display: block; width: 100%; height: auto; background: var(--chrome); }
.tr-film video::cue { font-family: var(--font-ui); font-weight: 600; background: rgba(0, 0, 0, .78); }
.tr-film.phone { max-width: min(360px, calc((100vh - 200px) * .4622)); min-width: 260px; margin: 0 auto; border-radius: 22px; border: 6px solid var(--chrome); }
.tr-film.none { aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center; color: #e9e9e9; padding: 20px; }
.tr-film.none.phone { aspect-ratio: 9 / 16; }
.tr-film.none > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tr-film.none svg { width: 28px; height: 28px; color: var(--brand); }
.tr-film.none .muted { color: #a9a9a9; }
.tr-script { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px; }
.tr-film.phone .tr-script { border-top: 0; }
.tr-script summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.tr-script p { margin: 8px 0 2px; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.tr-points { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.tr-points li { padding-left: 2px; line-height: 1.5; }
.tr-points li::marker { color: var(--accent-ink); font-weight: 800; }
.tr-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-acts .grow { flex: 1; }
.tr-done { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--good); padding: 0 6px; }
.tr-done svg { width: 17px; height: 17px; }
.tr-q { margin: 0; padding: 16px; border: 1px solid var(--line); min-inline-size: 0; }
.tr-q-h { display: flex; gap: 10px; align-items: baseline; font-weight: 750; font-size: 15px; line-height: 1.35; padding: 0; float: left; width: 100%; margin-bottom: 12px; }
.tr-q-h .num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; transform: translateY(-1px); }
.tr-opts { clear: both; display: flex; flex-direction: column; gap: 8px; }
.tr-opt { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 9px; cursor: pointer; background: var(--surface); line-height: 1.35; }
.tr-opt:hover { border-color: var(--ink-2); }
.tr-opt input { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; flex: none; }
.tr-opt span { flex: 1; }
.tr-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.tr-opt.right { border-color: var(--good); background: var(--good-soft); }
.tr-opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.tr-opt svg { width: 18px; height: 18px; flex: none; }
.tr-opt.right svg { color: var(--good); }
.tr-opt.wrong svg { color: var(--bad); }
.tr-opt:has(input:disabled) { cursor: default; }
.tr-why { margin: 10px 0 0; color: var(--ink-2); }
.tr-person .body { flex: 1; min-width: 0; }
.tr-person .title { font-weight: 700; }
.tr-person .meta { font-size: 12.5px; color: var(--muted); }
.tr-person-p { display: flex; align-items: center; gap: 10px; margin-top: 6px; max-width: 420px; }
.tr-person-p .small { white-space: nowrap; min-width: 150px; }
.tr-nudge { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--accent-line); box-shadow: var(--shadow-1); color: inherit; text-decoration: none !important; }
.tr-nudge:hover { background: var(--accent-soft); }
.tr-nudge .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-ink); }
.tr-nudge .ic svg { width: 19px; height: 19px; }
.tr-nudge .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-nudge .tr-bar { margin-top: 6px; max-width: 260px; }
.tr-nudge > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
@media (max-width: 720px) {
  .tr-hero .tr-hero-b { flex-direction: column; align-items: stretch; }
  .tr-hero .tr-hero-b .btn { height: 44px; }
  .tr-thumb { width: 72px; height: 48px; }
  .tr-film:not(.phone) { margin-inline: -4px; }
  .tr-film.phone { max-width: 100%; border-width: 0; border-radius: var(--r); }
  .tr-acts .btn { flex: 1 1 auto; height: 44px; }
  .tr-acts .grow { display: none; }
  .tr-opt { padding: 13px 12px; }
}
.tr-cap { background: var(--chrome); color: #f2f2f2; font-weight: 650; font-size: 14.5px; line-height: 1.45; text-align: center; padding: 8px 16px 10px; min-height: calc(2 * 1.45em + 18px); display: flex; align-items: center; justify-content: center; text-wrap: balance; }
.tr-film-foot { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; background: var(--surface); border-top: 1px solid var(--line); padding: 8px 12px; }
.tr-film-foot .tr-script { flex: 1; min-width: 160px; background: none; border: 0; padding: 6px 4px; }
.tr-cc { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.tr-cc svg { width: 18px; height: 18px; }
.tr-cc:hover { background: var(--surface-3); }
.tr-cc.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }

/* Refresh (hosted app only, top bar): spins while it reads everything again */
.topbar .refresh-btn { flex: none; color: var(--ink-2); }
.topbar .refresh-btn.busy svg { animation: spin .8s linear infinite; }
@media (max-width: 720px) { .topbar .refresh-btn { width: 38px; height: 38px; } }
@media (hover: none) { .topbar .refresh-btn:hover { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .topbar .refresh-btn.busy svg { animation-duration: 2.4s; } }

/* ---- emailing a quote, invoice or receipt from the app (hosted copy): EmailDocModal */
.send-form textarea { min-height: 180px; font: 500 13.5px/1.5 var(--font-ui); resize: vertical; }
.send-form input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.send-attach { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.send-attach > svg { width: 16px; height: 16px; flex: none; color: var(--muted); }

/* ---- tools on loan (27-tools.js) */
.tl-thumb { position: relative; width: 44px; height: 44px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line); }
.tl-thumb svg { width: 20px; height: 20px; }
.tl-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tl-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tl-cell > span:last-child { min-width: 0; }
.t.dense .tl-thumb { width: 36px; height: 36px; border-radius: 8px; }
.tl-row .side { align-self: center; }
.tl-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.tl-photos .rcpt-img img { height: 140px; max-height: none; object-fit: cover; }
.tl-photos .rcpt-img.big { grid-column: 1 / -1; }
.tl-photos .rcpt-img.big img { height: auto; max-height: 70vh; object-fit: contain; }
.tl-ph.rcpt-drop { min-height: 140px; justify-content: center; align-items: flex-start; }
.tl-ph .rcpt-prev { max-height: 80px; border-radius: 6px; }
.tl-none { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 14px; border: 1.5px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); color: var(--muted, var(--ink-2)); }
.tl-none svg { width: 22px; height: 22px; }
.tl-act { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.tl-act .select, .tl-act select { min-width: 200px; }
.tl-pick { cursor: pointer; }
.li .meta.tl-nums { white-space: normal; overflow-wrap: anywhere; font-family: var(--font-num); }
@media (max-width: 380px) { .admin .tl-filters button:nth-child(5) { grid-column: 1 / -1; } }
.tl-pick input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.input.mono { font-family: var(--font-num, ui-monospace, SFMono-Regular, Menlo, monospace); letter-spacing: .02em; }
@media (max-width: 720px) {
  .tl-row { flex-wrap: wrap; row-gap: 8px; }
  .tl-row .side { flex-basis: 100%; padding-left: 56px; justify-content: flex-start; }
  .tl-act .select, .tl-act select { min-width: 0; flex: 1 1 100%; }
  .tl-photos { grid-template-columns: repeat(2, 1fr); }
}

/* ---- fines and repayments (27-deductions.js) */
details.rules { display: block; background: var(--info-soft); color: var(--ink-2); border-radius: 9px; padding: 10px 12px; font-size: 13px; }
details.rules > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--ink); }
details.rules > summary::-webkit-details-marker { display: none; }
details.rules > summary svg { width: 18px; height: 18px; flex: none; }
details.rules ul { margin: 10px 0 10px 4px; padding-left: 18px; display: grid; gap: 6px; line-height: 1.45; }
details.rules .row { gap: 16px; }
.terms { border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: var(--r-sm); padding: 12px 14px; font-size: 14px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.hints { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.hint-b { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 8px 10px; color: var(--ink); font: inherit; cursor: pointer; min-width: 0; }
.hint-b:hover { border-color: var(--line-strong); }
.hint-b.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.hint-b .small { overflow-wrap: anywhere; }
.form.one { grid-template-columns: minmax(0, 1fr); }
.owed-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.owed-head > p { margin: 0; flex: 1 1 280px; }
.owed .li .title, .owed .li .meta { white-space: normal; overflow: visible; text-overflow: clip; }

/* ---- subscriptions and API costs (28-subs.js) */
.sub-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.sub-sum > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); min-width: 0; }
.sub-sum span { font-size: 12px; color: var(--ink-2); }
.sub-sum b { font-size: 16px; }

/* ---------- stock orders (29-stock.js) ---------- */
.so-lines { display: flex; flex-direction: column; gap: 8px; }
.so-grid { display: flex; flex-direction: column; gap: 6px; }
.so-h, .so-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 116px 96px 30px; gap: 8px; align-items: center; }
.so-h { font-size: 11.5px; font-weight: 750; color: var(--muted); padding: 0 2px; }
.so-h .r, .so-row .r { text-align: right; }
.so-tot { display: flex; justify-content: flex-end; gap: 12px; align-items: baseline; padding: 4px 38px 0 0; }
.li.alert { box-shadow: inset 3px 0 0 var(--bad); }
.li.warnrow { box-shadow: inset 3px 0 0 var(--warn); }
@media (max-width: 720px) {
  .so-h, .so-row { grid-template-columns: minmax(0, 1fr) 60px 96px 30px; }
  .so-h > :nth-child(4) { display: none; }
  .so-tot { padding-right: 38px; }
}

/* ---------- site photos and serials (30-evidence.js) ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; padding: 4px 16px 14px; }
.pf-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 9px; border: 1.5px dashed var(--line-strong); background: var(--surface-2); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; cursor: pointer; overflow: hidden; text-align: center; font: inherit; }
.pf-tile:hover:not([disabled]) { border-color: var(--brand); color: var(--ink); }
.pf-tile[disabled] { cursor: default; opacity: .7; }
.pf-tile svg { width: 20px; height: 20px; }
.pf-tile .pf-cap { font-size: 11.5px; font-weight: 700; line-height: 1.25; }
.pf-tile.has { border: 1px solid var(--line); padding: 0; background: #000; }
.pf-tile.has img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-tile.has .pf-cap { position: absolute; inset: auto 0 0 0; display: flex; gap: 4px; align-items: center; padding: 14px 7px 6px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); text-align: left; }
.pf-tile.has .pf-cap svg { width: 13px; height: 13px; flex: none; color: #6ee7a8; }
.pf-tile.busy { border-style: solid; border-color: var(--brand); color: var(--ink); }
.pf-tile.add { border-style: solid; }
.pf-view { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .86); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); }
.pf-view figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; }
.pf-view img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 8px; }
.pf-view figcaption { display: flex; gap: 10px; align-items: center; color: #fff; flex-wrap: wrap; }
.pf-view .btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .25); }
.input.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
@media (max-width: 720px) { .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- safety (31-safety.js) ---------- */
.sw-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sw-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.4; }
.sw-row + .sw-row { border-top: 1px solid var(--line); }
.sw-row b { font-weight: 700; }
.sw-row span { color: var(--muted); }
.inc-fs { display: grid; gap: 14px; }
@media (max-width: 720px) { .sw-row { grid-template-columns: 1fr; gap: 3px; } }
