/* Design sweep, 2026-11-13 (polished-app-ui §10–26). Loads last and only
   re-points existing components at existing tokens; no new colors. */

/* §11 Numbers line up and don't jitter when live data refreshes. */
html{font-variant-numeric:tabular-nums}

/* §11 Section titles: 20px display face, 8px above their card. */
/* Doubled IDs outrank the older :is() rules, whose specificity is that of
   their strongest argument. */
#workspace#workspace .nx-section-head h2,#workspace#workspace .lab-setting-section>h2,
#overlay#overlay .drawer-panel .nx-feed .nx-section-head h2,#overlay#overlay .drawer-panel .people-section-title h3,
#overlay#overlay .drawer-panel .lab-section-heading h3,#overlay#overlay .drawer-panel .point-detail-section>h3,
#overlay#overlay .drawer-panel .email-detail>section>h3,#overlay#overlay .drawer-panel .context-section-heading h3{
 font-family:Fraunces,Georgia,serif!important;font-size:20px!important;line-height:28px!important;font-weight:600!important;letter-spacing:-.2px!important;font-variation-settings:"SOFT" 0,"WONK" 0}

/* §12 Brand color is for actions and the selected state, not identity.
   Avatars without a known person stay neutral; named people get a stable
   identity hue below (never the brand red). The scope badge is quiet and hidden when every
   program is in scope (it carries no information then). */
body :is(.lab-person-avatar,.person-initials,.nx-art-av){background:rgb(var(--c-sand-100))!important;color:rgb(var(--c-ink))!important;box-shadow:inset 0 0 0 1px rgb(var(--c-line))}
.lab-program-list a.is-scoped .lab-record-copy strong::after{background:rgb(var(--c-sand-100))!important;color:var(--sd-muted)!important}
.lab-program-list:not(:has(a:not(.is-scoped))) a.is-scoped .lab-record-copy strong::after{display:none}

/* §6.2 Tab labels on the glass bar read at ink/70, not muted. */
@media(max-width:899px){body .dock a:not([aria-current]){color:rgb(var(--c-ink)/.72)!important}}

/* §6.4 Toast: dark glass pill at the bottom, above the tab bar. */
body #toast{top:auto;bottom:calc(max(12px,calc(env(safe-area-inset-bottom) - 10px)) + 78px);left:50%;transform:translateX(-50%);
 width:max-content;max-width:min(448px,calc(100% - 32px));min-height:52px;padding:4px 4px 4px 20px;gap:8px;border-radius:999px;
 background:rgb(var(--c-shade)/.8);-webkit-backdrop-filter:blur(20px) saturate(1.6);backdrop-filter:blur(20px) saturate(1.6);
 border:1px solid rgb(255 255 255/.12);box-shadow:inset 0 1px 0 rgb(255 255 255/.14),0 18px 50px rgb(var(--c-shade)/.35),0 4px 14px rgb(var(--c-shade)/.2);
 color:rgb(255 255 255);font-size:14px;line-height:20px;font-weight:500}
body #toast>span{min-width:0;flex:1;text-align:center;text-wrap:balance}
body #toast button{flex:none;width:44px;height:44px;min-height:44px;border-radius:999px;color:rgb(255 255 255/.8);background:transparent;border:0;box-shadow:none}
@media(min-width:900px){body #toast{bottom:24px}}
@media(prefers-reduced-transparency:reduce){body #toast{background:rgb(var(--c-shade));-webkit-backdrop-filter:none;backdrop-filter:none}}
[data-stercus-theme=dark] body #toast{background:rgb(12 9 7/.86)}

/* §6.6 Scrims dim with a tint only; a blurred full-screen scrim looks foggy. */
body .overlay-scrim,body[data-warm-appearance] #overlay>.overlay-scrim,:is(#setup-drawers,.setup-modal,#setup-discard)>.overlay-scrim,body:is([data-nx-add-open],[data-nx-add-closing])::after{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}

/* §14/§22 Touch targets are at least 44px, even when the glyph is smaller. */
body :is(.nx-section-head .nx-link,.nx-event-detail,.nx-more){position:relative}
body :is(.nx-section-head .nx-link,.nx-event-detail,.nx-more)::after{content:"";position:absolute;inset:-12px -8px}
body .nx-ct-btn.nx-ct-btn{min-width:44px!important;min-height:44px!important}
body :is(.nx-chip,.nx-dropchip>summary,.nx-w-quiet,.nexus-search-field,.brand.nexus-brand){min-height:44px}
body .nx-program-picker :is(button,[role=option],[role=menuitemradio]){min-height:44px}
/* Every text button and disclosure is at least 44px tall. */
html body :is(.button,.text-button.with-icon):not(.icon-button){min-height:44px!important}
html body details>summary{min-height:44px;display:flex;align-items:center}

/* §14 Secondary actions are quiet pills (surface + hairline), not tinted
   brand fills: Email / Call / Copy on records. */
html body .nx-ct-row .nx-ct-btn{background:var(--sd-surface)!important;color:var(--sd-text)!important;box-shadow:inset 0 0 0 1px var(--sd-divider),inset 0 1px 0 rgb(255 255 255/.85)!important}
[data-stercus-theme=dark] body .nx-ct-row .nx-ct-btn{box-shadow:inset 0 0 0 1px var(--sd-divider),inset 0 1px 0 rgb(255 255 255/.08)!important}

/* §12 App names and tags are plain text: their names already say which app;
   four accent colors on one card read as noise. */
html body .people-product-name{color:var(--sd-text)!important;font-size:16px!important;font-weight:600!important}
html body .directory-app{color:var(--sd-muted)!important;background:rgb(var(--c-sand-100))!important;border-color:transparent!important}

/* Program tabs: unselected labels at ink/75 so they pass 4.5:1 on the track. */
html body .nx-program-tab:not([aria-current]):not([aria-selected=true]) .nx-program-tab-label{color:rgb(var(--c-ink)/.76)}

/* §13 Programs list: one card per group, divider rows, not a card per program. */
#workspace .lab-program-list{gap:0!important;background:var(--sd-surface);border-radius:24px;box-shadow:var(--card-shadow);overflow:hidden}
#workspace .lab-program-list>.nx-program-card{margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important}
#workspace .lab-program-list>.nx-program-card+.nx-program-card{border-top:1px solid var(--sd-divider)!important}
#workspace .nx-program-shortcut{font-size:14px!important;font-weight:500!important;position:relative}
#workspace .nx-program-shortcut::after{content:"";position:absolute;inset:-4px 0}
#workspace :is(.lab-section-heading h2){font-family:Fraunces,Georgia,serif!important;font-size:20px!important;line-height:28px!important;font-weight:600!important;letter-spacing:-.2px!important}

/* Arriving at labs: the lab name keeps its width; status and contact
   buttons wrap under it in a narrow column instead of crushing it. */
.nx-arrive-row{flex-wrap:wrap;row-gap:8px}
.nx-arrive-row .nx-collect-copy{flex:1 1 160px;min-width:0}

/* Segmented controls: unselected labels at ink/75 (4.5:1 on the track); 44px tall. */
html body .lab-theme-options .button[aria-pressed=false],html body .nx-seg>a:not([aria-current]){color:rgb(var(--c-ink)/.76)!important}
html body .nx-seg>a{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
html body [role=menu] :is(button,a)[role^=menuitem]{min-height:44px}
/* §17 Fields are at least 44px tall; disclosure filters match. */
html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select){min-height:44px}
html body details>summary{min-height:44px!important}
#workspace#workspace .directory-app,#overlay#overlay .directory-app{color:var(--sd-muted)!important;background:rgb(var(--c-sand-100))!important;border-color:transparent!important}
#overlay#overlay .people-product-name,#workspace#workspace .people-product-name{color:var(--sd-text)!important}
html body .button.quiet[aria-label^=Previous],html body .button.quiet[aria-label^=Next]{min-width:44px!important;min-height:44px!important}

/* §15 Rows are two lines at most: the visit detail clamps to one line under
   the site name; the full list is one tap away on the site. */
#workspace .nx-collect-list .nx-collect-copy>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;overflow:hidden}
/* App source labels in feeds are muted text, not four accent colors. */
#workspace#workspace .nx-app-name,#overlay#overlay .nx-app-name{color:var(--sd-muted)!important;font-weight:600}
#overlay#overlay .people-product-name,#workspace#workspace .people-product-name{font-size:16px!important;line-height:24px!important;font-weight:600!important}
#workspace#workspace .directory-app,#overlay#overlay .directory-app{display:inline-flex;align-items:center;padding:4px 8px!important;border-radius:999px!important;font-size:12px!important;line-height:16px!important;font-weight:600!important}

/* People / Partners below 900px: the same search field and filter chips as
   desktop, instead of a collapsed "Find & filter" panel. */
@media (max-width:899px){
 body .directory-with-sidebar{display:block!important}
 body .directory-filter-sidebar{position:static!important;width:auto!important;max-width:none!important;margin:0 0 16px!important;padding:0!important;background:transparent!important;box-shadow:none!important;border:0!important}
 body .directory-filter-shell{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;border-radius:0!important}
 body .directory-filter-shell>summary{display:none!important}
 body .directory-filter-shell>:not(summary){display:revert}
 body .directory-filter-content{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px;padding:0!important;margin:0!important}
 body .directory-filter-search{flex:1 1 100%!important;min-height:44px!important;margin:0 0 4px!important;border-radius:999px!important;background:var(--sd-surface)!important;box-shadow:var(--card-shadow);border:0!important}
 body .directory-filter-group{position:relative;margin:0!important;border:0!important;padding:0!important;background:transparent!important;width:auto!important;flex:none}
 body .directory-filter-group>summary{display:inline-flex!important;align-items:center;gap:8px;min-height:44px;padding:0 12px 0 16px!important;border-radius:999px;background:var(--sd-surface);box-shadow:var(--card-shadow);font-size:14px;font-weight:600;cursor:pointer;list-style:none;white-space:nowrap;width:auto!important}
 body .directory-filter-group>summary::-webkit-details-marker{display:none}
 body .directory-filter-group:has(input:checked)>summary{background:var(--sd-selected);color:var(--sd-action);box-shadow:none}
 body .directory-filter-group>.directory-filter-options{position:absolute;z-index:40;top:calc(100% + 8px);left:0;min-width:240px;max-width:calc(100vw - 32px);max-height:320px;overflow:auto;padding:8px!important;border-radius:16px;background:var(--sd-surface);box-shadow:0 2px 6px rgb(var(--c-shade)/.08),0 16px 40px rgb(var(--c-shade)/.16)}
 body .directory-filter-group:last-of-type>.directory-filter-options{left:auto;right:0}
 body .directory-filter-footer{display:flex;gap:4px;margin:0 0 0 auto!important;padding:0!important;border:0!important}
}

/* Programs list, compact rows. The name opens the program; the shortcuts jump
   straight to a tab. Desktop: one 64px line. Phone: name, then one slim row of
   shortcut links. No tinted track; the list's divider rows do the grouping. */
#workspace .lab-program-list .nx-program-card-compact>.nx-program-card-main{padding:12px 16px!important;gap:12px!important}
#workspace .lab-program-list .nx-program-card-compact .lab-status-dot{display:none}
#workspace .lab-program-list .nx-program-card-compact>.nx-program-shortcuts-compact{display:flex!important;gap:4px!important;padding:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important}
#workspace .lab-program-list .nx-program-shortcuts-compact>.nx-program-shortcut{flex-direction:row!important;gap:6px!important;min-height:36px!important;height:36px;padding:0 12px!important;border-radius:999px!important;background:transparent!important;color:var(--sd-muted)!important;font-size:14px!important;line-height:20px!important;font-weight:500!important;box-shadow:none!important}
#workspace .lab-program-list .nx-program-shortcuts-compact>.nx-program-shortcut>.icon{width:16px;height:16px}
@media (hover:hover){#workspace .lab-program-list .nx-program-shortcuts-compact>.nx-program-shortcut:hover{background:var(--sd-selected)!important;color:var(--sd-text)!important}}
@media (min-width:900px){
 #workspace .lab-program-list .nx-program-card-compact{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center}
 #workspace .lab-program-list .nx-program-card-compact>.nx-program-card-main>.icon{display:none}
 #workspace .lab-program-list .nx-program-card-compact>.nx-program-shortcuts-compact{margin:0 12px 0 0!important;flex-wrap:nowrap}
}
@media (max-width:899px){
 #workspace .lab-program-list .nx-program-card-compact>.nx-program-card-main{padding:12px 16px 4px!important}
 #workspace .lab-program-list .nx-program-card-compact>.nx-program-card-main>.icon{display:none}
 #workspace .lab-program-list .nx-program-card-compact>.nx-program-shortcuts-compact{margin:0 8px 8px!important;flex-wrap:nowrap;justify-content:space-between}
 #workspace .lab-program-list .nx-program-shortcuts-compact>.nx-program-shortcut{padding:0 8px!important;font-size:12px!important;gap:4px!important;flex:none}
 #workspace .lab-program-list .nx-program-shortcuts-compact>.nx-program-shortcut>.icon{width:14px;height:14px}
}
#workspace .lab-program-list .nx-program-shortcuts-compact>.nx-program-shortcut{flex:none!important;width:auto!important}
#workspace .lab-program-list .nx-program-shortcut-label{white-space:nowrap;overflow-wrap:normal}
@media (max-width:899px){
 body .directory-filter-content{flex-direction:row!important;align-items:center!important;justify-content:flex-start!important}
 body .directory-filter-search{width:100%!important;max-width:none!important;align-self:stretch!important}
 body .directory-filter-group>summary .icon{width:12px;height:12px;transform:rotate(90deg);margin:0!important}
 body .directory-filter-group[open]>summary .icon{transform:rotate(-90deg)}
}
/* People and Partners share one header: title, then the program picker. */
@media (max-width:899px){body #workspace:has(.nx-seg) .page-heading{display:flex!important;flex-direction:column;align-items:stretch;grid-template-columns:none!important}body #workspace:has(.nx-seg) .page-heading>.title-actions{justify-content:flex-start}}


/* Filter rows: never more than two lines. "Clear filters" appears only when
   something is filtered. Desktop keeps one line (the chip wrapper is
   transparent to layout); phones put search on line 1 and every chip and
   action on one sideways-scrolling line 2, with menus floating above it. */
html body [data-directory-clear][disabled]{display:none!important}
.directory-filter-chips{display:contents}
@media (max-width:899px){
 body .directory-filter-content{display:block!important}
 body .directory-filter-search{margin:0 0 8px!important}
 body .directory-filter-chips{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:2px 16px 8px;scroll-padding-inline:16px}
 body .directory-filter-chips::-webkit-scrollbar{display:none}
 body .directory-filter-chips>*{flex:none}
 body .directory-filter-group>.directory-filter-options[data-menu-bounded]{position:fixed!important;top:var(--directory-menu-top,auto)!important;left:var(--directory-menu-left,16px)!important;right:auto!important;z-index:60}
 body .directory-filter-footer{margin:0!important;flex-wrap:nowrap}
 body .directory-filter-footer .text-button{white-space:nowrap}
}


/* Schedule day headers: tighter type, and the activity dot gets the same
   breathing room below it as the letter has above. */
html body .nx-sc-daypick button{min-height:0!important;padding:6px 0 8px!important;justify-content:flex-start}
html body .nx-sc-daypick button span{line-height:14px}
html body .nx-sc-daypick button b{line-height:20px}
html body .nx-sc-daypick .nx-cal-pip{margin-top:2px}
html body .nx-cal-dh{padding:8px 4px!important;gap:0}
html body .nx-cal-dh>span{line-height:14px}
html body .nx-cal-dh>b{line-height:20px}
html body .nx-cal-dh .nx-cal-pip{margin:2px auto 0}

/* Rotation calendar: the week/cell spinner uses the brand color so it reads
   on every cell tint in both themes. */
html body .nx-rot :is(.nx-rot-wk,.nx-rot-cell) .button-spinner{color:var(--sd-action)!important;border-color:currentColor!important;border-right-color:transparent!important;width:16px!important;height:16px!important}

/* Section header links ("All sites", "All programs") never wrap; the title
   side gives way instead. */
html body .nx-section-head{flex-wrap:nowrap}
html body .nx-section-head>h2{min-width:0}
html body .nx-section-head :is(.nx-link,.nx-count){white-space:nowrap;flex:none}

/* Programs list on phone (Taylor, round 3): shortcuts start under the program
   name, never under its icon, and keep a 16px inset from the row edge. Icon
   above label in four equal columns so all four fit that width. */
@media (max-width:899px){
 #workspace .lab-program-list .nx-program-card-compact>.nx-program-card-main{padding:12px 16px 8px!important}
 #workspace .lab-program-list .nx-program-card-compact>.nx-program-shortcuts-compact{display:grid!important;grid-template-columns:repeat(var(--nx-shortcut-count,4),minmax(0,1fr));gap:4px!important;margin:0 16px 12px 60px!important}
 #workspace .lab-program-list .nx-program-shortcuts-compact>.nx-program-shortcut{flex-direction:column!important;justify-content:center;gap:2px!important;height:auto!important;min-height:44px!important;padding:4px 0!important;border-radius:12px!important;font-size:12px!important;line-height:16px!important;width:100%!important}
 #workspace .lab-program-list .nx-program-shortcuts-compact>.nx-program-shortcut::after{inset:0}
}
/* Text links never wrap mid-label ("See all", "All sites"). */
html body :is(.nx-link,.nx-more,.nx-todo-go){white-space:nowrap}

/* Managers drawer: search, then one list of people (name first, email
   under it), selected people first. */
.nx-manager-form{display:flex;flex-direction:column;gap:16px}
.nx-manager-intro{margin:0;font-size:14px;line-height:20px;color:var(--sd-muted)}
.nx-manager-search{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:999px;background:var(--sd-field);color:var(--sd-muted)}
.nx-manager-search .icon{width:16px;height:16px;flex:none}
html body .nx-manager-search input{flex:1;min-width:0;min-height:44px;border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;font:inherit;font-size:16px;color:var(--sd-text)}
.nx-manager-search input:focus{outline:none}
.nx-manager-search:focus-within{box-shadow:0 0 0 3px rgb(var(--c-brand)/.18)}
.nx-manager-list{list-style:none;margin:0;padding:0;border:1px solid var(--sd-divider);border-radius:20px;overflow:hidden;background:var(--sd-surface)}
.nx-manager-list>li+li{border-top:1px solid var(--sd-divider)}
.nx-manager-list>li[hidden]+li{border-top:0}
.nx-manager-row{display:flex;align-items:center;gap:12px;min-height:64px;padding:12px 16px;cursor:pointer;transition:background .15s ease-out}
.nx-manager-row:has(input:checked){background:var(--sd-selected)}
@media (hover:hover){.nx-manager-row:hover{background:rgb(var(--c-sand-100)/.6)}.nx-manager-row:has(input:checked):hover{background:var(--sd-selected)}}
html body .nx-manager-row .person-initials{width:36px;height:36px;flex:0 0 36px;font-size:14px}
.nx-manager-copy{flex:1;min-width:0;display:flex;flex-direction:column}
.nx-manager-copy strong{font-size:16px;line-height:22px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nx-manager-copy small{font-size:14px;line-height:20px;color:var(--sd-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nx-manager-role{flex:none;padding:4px 8px;border-radius:999px;background:rgb(var(--c-sand-100));color:var(--sd-muted);font-size:12px;line-height:16px;font-weight:600}
html body .nx-manager-row input[type=checkbox]{flex:none;width:22px;height:22px;min-height:0;margin:0;accent-color:var(--sd-action)}
.nx-manager-empty{margin:0;text-align:center}

/* Button glows never clip: a tighter glow everywhere, an even tighter one
   inside drawers and sheets, and footers that leave room around it. */
html body .button.primary:not(.nx-w-primary){box-shadow:inset 0 1px 0 rgb(255 255 255/.4),0 4px 12px rgb(var(--c-brand)/.2)}
html body :is(.drawer-panel,dialog,.nx-editor) :is(.button.primary,button[type=submit]){box-shadow:inset 0 1px 0 rgb(255 255 255/.4),0 2px 8px rgb(var(--c-brand)/.22)!important}
html body .drawer-panel form .form-actions{padding-inline:4px!important}
/* The editor enhancer turns checkbox rows into switch fields (grid) and
   drawer labels into columns; the Managers list keeps one horizontal row. */
html body dialog form.nx-manager-form .nx-manager-row{display:flex!important;flex-direction:row!important;align-items:center!important;grid-template-columns:none!important;gap:12px!important;min-height:64px!important;padding:12px 16px!important;margin:0!important;border:0!important;border-radius:0!important}
html body dialog form.nx-manager-form .nx-manager-row>input{order:9;flex:none!important;margin:0 0 0 auto!important;align-self:center!important}
html body dialog form.nx-manager-form .nx-manager-copy .nx-manager-role{display:inline-block;margin-left:6px;vertical-align:1px}
html body dialog form.nx-manager-form>.nx-manager-search{flex-direction:row!important;align-items:center!important;gap:8px!important;padding:0 16px!important;min-height:44px!important;border-radius:999px!important;background:var(--sd-field)!important}
html body dialog form.nx-manager-form>.nx-manager-search>input{flex:1 1 auto!important;width:auto!important;min-width:0!important;margin:0!important}

/* Rotation weeks: the spinner takes the day number's place while loading. */
html body .nx-rot .nx-rot-wk .navigation-indicator-slot{display:flex;align-items:center;justify-content:center}
/* People/Partners tabs: the spinner floats just right of the label, so the
   tab never changes width. */
html body .nx-seg .nx-seg-label{position:relative;display:inline-block}
html body .nx-seg .nx-seg-spinner{position:absolute;left:calc(100% + 6px);top:50%;width:12px;height:12px;margin:-6px 0 0;border-width:2px;color:var(--sd-action)}

/* Safari: a sticky or animated child inside a clipped/scrolling container
   with corner-shape:superellipse is not painted (blank schedule header row,
   missing rotation spinner). Standard rounded corners, as already done for
   the map. */
/* Applied app-wide: Safari repeatedly failed to paint (or flickered) content
   under superellipse corners in scrolling, clipped, sticky or animated
   containers — the schedule header, rotation spinner, long chip menus and row
   icons. Standard rounded corners everywhere. */
html body *,html body *::before,html body *::after{corner-shape:round!important}

/* Partners: the tab switch and directory sit directly in the workspace (People
   wraps them), so center them on the same 1120px column as the heading. */
html body #workspace>.directory-with-sidebar{width:100%;max-width:1120px!important;margin-inline:auto!important}
html body #workspace>.nx-seg{margin-left:max(0px,calc((100% - 1120px)/2))!important;margin-right:auto!important}

/* Program picker search: one 40px field (the input inside doesn't add its
   own 44px on top of the field padding). */
html body .nx-program-picker-search{min-height:40px;padding:0 12px!important;box-sizing:border-box}
html body .nx-program-picker-search input{min-height:0!important;height:38px;line-height:20px}

/* Menus and dropdowns: fade + slight rise in (ease-out 180ms), fade out
   (ease-in 120ms). Uses translate/scale so existing positioning transforms are
   untouched. Reduced motion already disables transitions globally. */
:root{--menu-in:.18s cubic-bezier(.22,1,.36,1);--menu-out:.12s cubic-bezier(.4,0,1,1)}
html body :is(details.directory-filter-group,details.nx-dropchip)::details-content{transition:content-visibility .12s allow-discrete}
html body :is(details.directory-filter-group>.directory-filter-options,details.nx-dropchip>.nx-dropchip-menu){opacity:0;translate:0 -6px;scale:.98;transform-origin:top left;transition:opacity var(--menu-out),translate var(--menu-out),scale var(--menu-out);animation:none!important}
html body :is(details.directory-filter-group[open]>.directory-filter-options,details.nx-dropchip[open]>.nx-dropchip-menu){opacity:1;translate:0 0;scale:1;transition:opacity var(--menu-in),translate var(--menu-in),scale var(--menu-in)}
@starting-style{html body :is(details.directory-filter-group[open]>.directory-filter-options,details.nx-dropchip[open]>.nx-dropchip-menu){opacity:0;translate:0 -6px;scale:.98}}
/* The + menu's open and close are animated by add-menu-motion.js alone. A CSS transition here
   restarted from full opacity when the menu was hidden in Safari: the round 9 close flash. */
html body .lab-add-menu{transition:none!important}
html body .lab-add-menu[hidden]{display:none}
html body .lab-add-menu:not([hidden]){animation:none!important}
html body .select-popover{opacity:0;translate:0 -6px;transition:opacity var(--menu-out),translate var(--menu-out),display .12s allow-discrete,overlay .12s allow-discrete}
html body .select-popover:popover-open{opacity:1;translate:0 0;transition:opacity var(--menu-in),translate var(--menu-in),display .18s allow-discrete,overlay .18s allow-discrete}
@starting-style{html body .select-popover:popover-open{opacity:0;translate:0 -6px}}

/* Phone filter chips: room in the sideways-scrolling row for their shadows,
   and a softer shadow that fits it. */
@media (max-width:899px){
 html body .directory-filter-chips{padding:6px 16px 14px!important;margin:-6px -16px -8px!important}
 html body .directory-filter-group>summary{box-shadow:0 1px 2px rgb(var(--c-shade)/.06),0 3px 8px rgb(var(--c-shade)/.06)!important}
 html body .directory-filter-group:has(input:checked)>summary{box-shadow:none!important}
}

/* People rows on phone: two lines (name, association) with the app tag on the
   right beside the arrow, instead of a third line. */
@media (max-width:899px){
 html body #workspace .grouped-person-row{flex-wrap:nowrap!important;align-items:center!important;gap:12px!important;padding:12px 16px!important;min-height:64px}
 html body #workspace .grouped-person-row>.grouped-person-identity{flex:1 1 auto;min-width:0}
 html body #workspace .grouped-person-row .grouped-person-copy{flex:1 1 auto;min-width:0}
 html body #workspace .grouped-person-row .grouped-person-org{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html body #workspace .grouped-person-row>.directory-apps{order:2;flex:0 0 auto;width:auto!important;min-width:0!important;max-width:45%;grid-column:auto!important;padding:0!important;margin:0!important;flex-direction:column;align-items:flex-end;gap:4px}
 html body #workspace .grouped-person-row>.row-open{order:3;flex:none}
}

/* Program tiles (Programs page and Today): name and client, seven-day
   activity with a mini graph, and the program's tabs along the bottom. */
html body .nx-ptile-list,#workspace .nx-ptile-list.lab-program-list{display:grid!important;grid-template-columns:1fr;gap:12px!important;background:none!important;box-shadow:none!important;border-radius:0!important;overflow:visible!important;padding:0!important}
@media (min-width:700px){#workspace .nx-ptile-list.lab-program-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
.nx-col-main .nx-ptile-list{grid-template-columns:1fr}
.nx-ptile{display:flex;flex-direction:column;min-width:0;background:var(--sd-surface);border-radius:20px;box-shadow:var(--card-shadow);overflow:hidden}
[data-stercus-theme=dark] .nx-ptile{box-shadow:inset 0 0 0 1px rgb(255 255 255/.07)}
.nx-ptile.is-inactive .nx-ptile-name strong{color:var(--sd-muted)}
.nx-ptile-main{display:flex;flex-direction:column;gap:12px;padding:16px 16px 14px 20px;color:var(--sd-text);text-decoration:none;transition:background .15s ease-out}
@media (hover:hover){.nx-ptile-main:hover{background:rgb(var(--c-sand-100)/.55)}.nx-ptile-main:hover .nx-ptile-head>.icon{color:var(--sd-text)}}
.nx-ptile-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.nx-ptile-head>.icon{width:16px;height:16px;flex:none;margin-top:3px;color:var(--sd-muted)}
.nx-ptile-name{display:flex;flex-direction:column;min-width:0}
.nx-ptile-name strong{font-size:16px;line-height:22px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nx-ptile-name span{font-size:14px;line-height:20px;color:var(--sd-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nx-ptile-pulse{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;min-height:36px}
.nx-ptile-views{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 6px;font-size:14px;line-height:20px;color:var(--sd-muted)}
.nx-ptile-views b{font-family:Fraunces,Georgia,serif;font-size:24px;line-height:28px;font-weight:500;color:var(--sd-text);font-variation-settings:"SOFT" 0,"WONK" 0}
.nx-ptile-views.is-quiet{align-self:center}
.nx-ptile-views .loading-shape{width:120px;height:14px;border-radius:999px}
.nx-ptile-graph{flex:none}
.nx-ptile-graph .nx-spark{width:112px;height:36px}
.nx-ptile-tabs{display:grid;grid-template-columns:repeat(var(--nx-tab-count,4),minmax(0,1fr));border-top:1px solid var(--sd-divider)}
.nx-ptile-tabs a{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 4px;font-size:14px;line-height:20px;font-weight:500;color:var(--sd-muted);text-decoration:none;white-space:nowrap;transition:background .15s ease-out,color .15s ease-out}
.nx-ptile-tabs a+a{border-left:1px solid var(--sd-divider)}
.nx-ptile-tabs a .icon{width:16px;height:16px;flex:none}
@media (hover:hover){.nx-ptile-tabs a:hover{background:rgb(var(--c-sand-100)/.55);color:var(--sd-text)}}
@media (max-width:420px){.nx-ptile-tabs a{font-size:12px;gap:4px}.nx-ptile-tabs a .icon{width:14px;height:14px}}

/* Active and Inactive programs headers match: 20px display title, quiet
   count, small caret on the collapsible one. */
#workspace#workspace .lab-section-heading{display:flex;align-items:baseline;gap:8px;margin:0 0 8px!important;padding:0!important}
#workspace#workspace .lab-section-heading h2{font-family:Fraunces,Georgia,serif!important;font-size:20px!important;line-height:28px!important;font-weight:600!important;letter-spacing:-.2px!important;margin:0!important}
#workspace#workspace .lab-section-heading>span{font:500 14px/20px Inter,sans-serif!important;color:var(--sd-muted)!important}
#workspace#workspace .program-directory-disclosure>summary{padding:0!important;margin:24px 0 0!important;font:inherit!important;display:block!important}
#workspace#workspace .lab-inactive>summary .lab-section-heading:after{content:"";width:16px;height:16px;margin-left:2px;align-self:center;background:currentColor;color:var(--sd-muted);-webkit-mask:url('/assets/icons/chevron-right.svg') center/16px no-repeat;mask:url('/assets/icons/chevron-right.svg') center/16px no-repeat;transform:rotate(90deg);transition:transform .18s cubic-bezier(.22,1,.36,1)}
#workspace#workspace .lab-inactive[open]>summary .lab-section-heading:after{transform:rotate(-90deg)}

/* Add person and Import people drawers (Taylor, round 4): one type scale,
   one list style, quiet actions. */
#overlay#overlay .onboarding-pane .onboarding-steps{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 24px!important}
#overlay#overlay .onboarding-pane .onboarding-steps>span{font-size:12px!important;line-height:16px!important;font-weight:600!important;color:var(--sd-muted)}
#overlay#overlay .onboarding-pane .onboarding-steps>span[aria-current]{color:var(--sd-text)}
#overlay#overlay .onboarding-pane :is(.onboarding-section>h3,.association-picker-intro>h3){font-family:Fraunces,Georgia,serif!important;font-size:20px!important;line-height:28px!important;font-weight:600!important;margin:0 0 4px!important}
#overlay#overlay .onboarding-pane :is(.onboarding-section>p.small,.association-picker-intro>p.small,.onboarding-app-intro>p.small,.onboarding-step-body>p.small){font-size:14px!important;line-height:20px!important;margin:0 0 16px!important}
/* Association lists: name first (16px), type under it (14px muted). */
#overlay#overlay .association-choice-box{border:1px solid var(--sd-divider)!important;border-radius:16px!important;background:var(--sd-surface)!important;overflow:hidden}
#overlay#overlay .association-choice-row{display:flex!important;align-items:center!important;gap:12px!important;min-height:56px;padding:8px 16px!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important}
#overlay#overlay .association-choice-row>span{display:flex;flex-direction:column;min-width:0}
#overlay#overlay .association-choice-row strong{font-size:16px!important;line-height:22px!important;font-weight:500!important}
#overlay#overlay .association-choice-row small{font-size:14px!important;line-height:20px!important;color:var(--sd-muted)!important}
#overlay#overlay .association-choice-row input[type=checkbox]{flex:none;width:20px;height:20px;margin:0;accent-color:var(--sd-action)}
#overlay#overlay .association-choice-pagination:not(:has(button:not([disabled]))){display:none}
#overlay#overlay .association-choice-heading{margin:20px 0 8px!important}
/* App access: one list card, a row per app with its summary and a quiet
   action, instead of four tall tinted cards. */
#overlay#overlay .onboarding-pane .people-access-grid{display:flex!important;flex-direction:column;gap:0!important;border:1px solid var(--sd-divider);border-radius:16px;background:var(--sd-surface);overflow:hidden}
#overlay#overlay .onboarding-pane .people-access-card{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"pick action" "summary action";align-items:center;gap:2px 12px;min-height:64px;padding:12px 16px!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
#overlay#overlay .onboarding-pane .people-access-card+.people-access-card{border-top:1px solid var(--sd-divider)!important}
#overlay#overlay .onboarding-pane .people-access-card>.choice-row{grid-area:pick;display:flex!important;align-items:center;gap:12px;margin:0!important;padding:0!important;border:0!important;background:transparent!important;min-height:0!important;font-size:16px;font-weight:600}
#overlay#overlay .onboarding-pane .people-access-card>.choice-row input{width:20px;height:20px;margin:0;accent-color:var(--sd-action)}
#overlay#overlay .onboarding-pane .people-access-card>p{grid-area:summary;margin:0 0 0 32px!important;font-size:14px!important;line-height:20px!important}
#overlay#overlay .onboarding-pane .people-access-card>.button{grid-area:action;min-height:36px!important;padding:0 14px!important;border-radius:999px!important;background:rgb(var(--c-sand-100))!important;border:0!important;box-shadow:none!important;font-size:14px!important;font-weight:600!important;color:var(--sd-text)!important;white-space:nowrap;position:relative}
#overlay#overlay .onboarding-pane .people-access-card>.button::after{content:"";position:absolute;inset:-4px 0}
/* Review: one summary card with divider sections. */
#overlay#overlay .onboarding-review{border:1px solid var(--sd-divider);border-radius:16px;background:var(--sd-surface);padding:0 16px}
#overlay#overlay .onboarding-review>section{padding:16px 0!important;margin:0!important;border:0!important}
#overlay#overlay .onboarding-review>section+section{border-top:1px solid var(--sd-divider)!important}
#overlay#overlay .onboarding-review h3{font-family:Inter,sans-serif!important;font-size:16px!important;line-height:22px!important;font-weight:600!important}
#overlay#overlay .onboarding-review>section:first-child h3{font-family:Fraunces,Georgia,serif!important;font-size:20px!important;line-height:28px!important}
#overlay#overlay .onboarding-review p{margin:2px 0 0!important;font-size:14px!important;line-height:20px!important;color:var(--sd-muted)}
#overlay#overlay .onboarding-review+p,#overlay#overlay .onboarding-step-body>.small.muted:last-child{font-size:14px!important;line-height:20px!important}
/* Import people: the file chooser is a clear drop-zone style card. */
#overlay#overlay form[data-form=insight-import] label.field{display:flex!important;flex-direction:column;gap:8px;margin:16px 0!important}
#overlay#overlay form[data-form=insight-import] label.field>span{font-size:16px;font-weight:600}
#overlay#overlay form[data-form=insight-import] input[type=file]{min-height:96px!important;padding:16px!important;border:1.5px dashed rgb(var(--c-muted)/.45)!important;border-radius:16px!important;background:var(--sd-surface)!important;font-size:14px;color:var(--sd-muted);cursor:pointer}
#overlay#overlay form[data-form=insight-import] input[type=file]::file-selector-button{margin-right:12px;min-height:36px;padding:0 16px;border:0;border-radius:999px;background:rgb(var(--c-sand-100));color:var(--sd-text);font:600 14px/20px Inter,sans-serif;cursor:pointer}
#overlay#overlay form[data-form=insight-import] .onboarding-step-body>p.small{font-size:14px!important;line-height:20px!important}
/* A program graph that did not change on refresh stays drawn, no replayed entrance */
[data-pulse-settled] .nx-spark{animation:none!important;clip-path:none!important}
[data-pulse-settled] .nx-spark-dot{animation:none!important;opacity:1!important}
/* Desktop People/Partners: equal, roomier tabs so a loading spinner never crowds the pill edge */
@media (min-width:900px){html body .nx-seg>a{min-width:168px;padding:0 32px}}
/* Program page loading: real back link, name and tabs; shapes for the subtitle and content */
.loading-program-page .loading-program-sub{margin:4px 0 0}
.loading-program-page .loading-program-sub .loading-caption{width:220px;height:14px;margin:4px 0 0}
.loading-program-page .loading-program-name .loading-section-title{width:240px;height:32px}
.loading-program-page .nx-program-tabs{margin-bottom:24px}
.loading-program-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:12px}
.loading-program-stats>.loading-destination-card{padding:16px 20px;display:grid;gap:12px}
.loading-program-stats .loading-caption{width:60%;margin:0}.loading-program-stats .loading-section-title{width:45%;height:28px}
.loading-program-chart{padding:20px;display:grid;gap:16px;margin-bottom:24px}
.loading-program-chart .loading-caption{width:30%;margin:0}
.loading-program-graph{display:block;height:180px;width:100%;border-radius:12px}
@media (max-width:699px){.loading-program-stats{grid-template-columns:1fr 1fr}.loading-program-stats>:nth-child(3){display:none}.loading-program-graph{height:140px}}
/* Clear filters hides when disabled; its divider must hide with it (no stray line beside App access) */
html body .directory-filter-footer .text-button[disabled]+.text-button::before,html body .directory-filter-footer .text-button[hidden]+.text-button::before{display:none}
/* People/Partners skeleton matches the real, wider tab pill */
html body .loading-destination-segment{gap:0;padding:4px;width:344px;max-width:100%;height:52px;box-sizing:border-box}
html body .loading-destination-segment>.loading-pill{height:44px;flex:1}
html body .loading-destination-segment>.loading-pill:last-child{opacity:.35}
@media (max-width:899px){html body .loading-destination-segment{width:100%}}
/* Schedule visits: form-shaped skeleton while sites and collectors load */
.nx-plan-skeleton .loading-content{display:grid;gap:20px;padding-top:4px}
.nx-plan-skel-field{display:grid;gap:8px}
.nx-plan-skel-field>.loading-caption{width:30%;margin:0;height:12px}
.nx-plan-skel-input{display:block;height:50px;border-radius:14px}
.nx-plan-skel-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.nx-plan-skel-list{display:grid;border-radius:20px;background:var(--sd-surface);box-shadow:inset 0 0 0 1px rgb(var(--c-line)/.8);overflow:hidden}
.nx-plan-skel-row{display:flex;align-items:center;gap:12px;padding:14px 16px;border-top:1px solid rgb(var(--c-line)/.8)}
.nx-plan-skel-row:first-child{border-top:0}
.nx-plan-skel-row>.loading-line{width:55%;margin:0}
.nx-plan-skel-check{width:20px;height:20px;border-radius:6px;flex:none}

/* ---- Add flows, one shape (round 6 audit) ----
   Every add/edit drawer: serif title, one quiet round close, content that
   scrolls, and one footer pinned to the bottom with the primary on the right.
   Phone: full-height sheet, footer buttons share the width, primary last. */
#overlay#overlay .nx-editor{display:flex!important;flex-direction:column}
#overlay#overlay .nx-editor>form{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
#overlay#overlay .nx-editor>form>.form-actions{margin-top:auto!important;position:sticky;bottom:0}
#overlay#overlay .nx-editor .dialog-heading h2{font:600 26px/32px Fraunces,ui-serif,Georgia,serif!important;letter-spacing:-.3px}
#overlay#overlay .nx-editor .dialog-heading .eyebrow:empty{display:none}
/* A single "Partner details" section heading only repeats the title */
#overlay#overlay .nx-editor form[data-form=organization]>.organization-edit-section:only-of-type>h3{display:none}
/* Add person: the first step says what it is for; the stepper reads at 14px */
#overlay#overlay .onboarding-pane .onboarding-intro{margin:0 0 20px;font-size:16px;line-height:24px;color:var(--sd-muted);text-wrap:pretty}
#overlay#overlay .onboarding-pane .onboarding-steps>span{font-size:14px!important;line-height:20px!important;font-weight:500!important}
#overlay#overlay .onboarding-pane .onboarding-steps>span[aria-current]{font-weight:600!important}
#overlay#overlay .onboarding-pane .onboarding-step-body{display:grid;gap:16px;align-content:start}
#overlay#overlay .onboarding-pane .onboarding-step-body>.field{margin:0!important}
/* File fields: the visible name lives in the row; a chosen file is confirmed */
#overlay#overlay .nx-doc-field>span:not(.nx-doc-row){position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
#overlay#overlay .nx-doc-field{position:relative}
#overlay#overlay .nx-doc-field .nx-doc-row{min-height:64px;border:1.5px dashed rgb(var(--c-line));background:var(--sd-surface)}
#overlay#overlay .nx-doc-field.has-file .nx-doc-row{border-style:solid;border-color:rgb(var(--c-line))}
#overlay#overlay .nx-doc-field.has-file .nx-doc-copy span{color:var(--sd-text)}
@media (max-width:759px){
 #overlay#overlay .nx-editor>form>.form-actions{display:flex!important;gap:8px!important;padding-bottom:max(16px,env(safe-area-inset-bottom))!important}
 #overlay#overlay .nx-editor>form>.form-actions>:is(.button,button):not([hidden]){flex:1 1 0;justify-content:center;min-height:48px}
 #overlay#overlay .nx-editor>form>.form-actions>.onboarding-action-buttons{flex:1;display:flex;gap:8px}
 #overlay#overlay .nx-editor>form>.form-actions>.onboarding-action-buttons>:not([hidden]){flex:1 1 0;justify-content:center;min-height:48px}
 #overlay#overlay .nx-editor .dialog-heading h2{font-size:24px!important;line-height:30px!important}
}
/* Phone tab bar: press and drag to choose a tab (dock-drag.js). The lens lifts
   into a brighter drop with a highlight that slides against the motion. */
@media (max-width:899px){
 html body .dock{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
 html body .dock .dock-refract{position:absolute}
 html body .dock .lab-lens.is-dragging{transition:none!important;z-index:5}
 html body .dock .lab-lens-drop{position:relative;overflow:hidden}
 html body .dock .lab-lens-drop.lens-lifted{background:rgb(var(--c-surface)/.92)!important;box-shadow:0 8px 22px rgb(var(--c-shade)/.18),0 2px 4px rgb(var(--c-shade)/.08)!important}
 html body .dock .lab-lens-drop.lens-lifted::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:inset 0 1px rgb(255 255 255/.95),inset 0 -1.5px 1px rgb(255 255 255/.5),inset 0 0 0 1px rgb(255 255 255/.35),inset 0 0 9px 1px rgb(var(--c-shade)/.12);background:radial-gradient(60% 45% at calc(30% + var(--spec,0px)) 10%,rgb(255 255 255/.55),transparent 70%),radial-gradient(50% 32% at calc(70% + var(--spec,0px)) 96%,rgb(255 255 255/.22),transparent 70%)}
 [data-stercus-theme=dark] body .dock .lab-lens-drop.lens-lifted{box-shadow:0 8px 22px rgb(0 0 0/.45)!important}
 [data-stercus-theme=dark] body .dock .lab-lens-drop.lens-lifted::after{box-shadow:inset 0 1px rgb(255 255 255/.3),inset 0 -1.5px 1px rgb(255 255 255/.12),inset 0 0 0 1px rgb(255 255 255/.12),inset 0 0 9px 1px rgb(0 0 0/.35);background:radial-gradient(60% 45% at calc(30% + var(--spec,0px)) 10%,rgb(255 255 255/.16),transparent 70%),radial-gradient(50% 32% at calc(70% + var(--spec,0px)) 96%,rgb(255 255 255/.07),transparent 70%)}
 html body .dock .dock-magnify{position:absolute;inset:0;pointer-events:none}
 html body .dock .dock-magnify-row{position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;padding:0 4px}
 html body .dock .dock-magnify-cell{display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:100%;color:rgb(var(--c-ink)/.7);font-size:11px;font-weight:500}
 html body .dock .dock-magnify-cell.is-active{color:var(--sd-action);font-weight:700}
 html body .dock .dock-magnify-cell .icon{width:22px;height:22px}
 html body .dock>a.is-drag-over{color:var(--sd-action)!important}
}
@media (max-width:899px) and (prefers-reduced-transparency:reduce){html body .dock .lab-lens-drop.lens-lifted::after{background:none}}
/* Schedule visits: collectors fill in after the form is usable */
.nx-plan-crew-loading{display:flex;align-items:center;gap:8px;margin:4px 0;font-size:14px;color:var(--sd-muted)}
.nx-plan-crew-loading .button-spinner{width:14px;height:14px;color:var(--sd-action)}
/* Drawer headers paint a backdrop (::before) sized to the header. A header
   left unpositioned let it size to the whole panel and hide the form (Add
   partner showed only its title). Zero specificity: sticky headers keep sticky. */
:where(.drawer-panel)>:where(.drawer-heading,.dialog-heading){position:relative}

/* ==== Add flows, one family (round 6b) ====================================
   Add to-do, Add person, Import people, New program, Add partner and Schedule
   visits share one drawer: the same header, gutters, section titles, field
   rhythm and pinned footer. Desktop: right drawer. Phone: full screen. */
html body dialog .drawer-panel.nx-editor{--nx-ed-pad:28px;padding:0 var(--nx-ed-pad)!important}
@media (max-width:759px){html body dialog .drawer-panel.nx-editor{--nx-ed-pad:20px}}
/* header: serif title, round glass close, the same space above and below */
html body dialog .drawer-panel.nx-editor>:is(.dialog-heading,.drawer-heading){display:flex!important;align-items:center!important;justify-content:space-between;gap:12px;padding:32px 0 20px!important;margin:0!important;min-height:0!important}
@media (max-width:759px){html body dialog .drawer-panel.nx-editor>:is(.dialog-heading,.drawer-heading){padding:calc(env(safe-area-inset-top) + 16px) 0 16px!important}}
html body dialog .drawer-panel.nx-editor>:is(.dialog-heading,.drawer-heading) h2{margin:0!important;font:600 26px/32px Fraunces,ui-serif,Georgia,serif!important;letter-spacing:-.3px!important;color:var(--sd-text)}
@media (max-width:759px){html body dialog .drawer-panel.nx-editor>:is(.dialog-heading,.drawer-heading) h2{font-size:24px!important;line-height:30px!important}}
html body dialog .drawer-panel.nx-editor>:is(.dialog-heading,.drawer-heading) .eyebrow:empty{display:none}
html body dialog .drawer-panel.nx-editor>:is(.dialog-heading,.drawer-heading) .close{position:static!important;flex:none;width:44px!important;height:44px!important;border-radius:999px!important;display:grid!important;place-items:center;margin:0!important;background:rgb(var(--c-surface)/.58)!important;-webkit-backdrop-filter:blur(22px) saturate(1.8);backdrop-filter:blur(22px) saturate(1.8);border:1px solid rgb(255 255 255/.5)!important;box-shadow:inset 0 1px 0 rgb(255 255 255/.75),0 6px 20px rgb(var(--c-shade)/.1)!important}
[data-stercus-theme=dark] body dialog .drawer-panel.nx-editor>:is(.dialog-heading,.drawer-heading) .close{background:rgb(var(--c-surface)/.55)!important;border-color:rgb(255 255 255/.1)!important;box-shadow:inset 0 1px 0 rgb(255 255 255/.14),0 10px 30px rgb(0 0 0/.45)!important}
@media (prefers-reduced-transparency:reduce){html body dialog .drawer-panel.nx-editor>:is(.dialog-heading,.drawer-heading) .close{background:rgb(var(--c-surface))!important;backdrop-filter:none;-webkit-backdrop-filter:none}}
/* section titles: one style everywhere (17px semibold) with an optional help line */
html body dialog .drawer-panel.nx-editor :is(.nx-step-head-copy h3,.setup-edit-section-heading h3,.nx-todo-associations>h3,.nx-plan-block>legend,.association-picker-intro h3,.onboarding-section>h3,.onboarding-review section>h3){font:600 17px/24px Inter,ui-sans-serif,system-ui,sans-serif!important;letter-spacing:-.1px!important;color:var(--sd-text)!important;margin:0 0 4px!important}
html body dialog .drawer-panel.nx-editor .nx-step-head-copy{margin:4px 0 20px}
html body dialog .drawer-panel.nx-editor .nx-step-head-copy h3{font:600 20px/28px Fraunces,ui-serif,Georgia,serif!important;letter-spacing:-.2px!important}
html body dialog .drawer-panel.nx-editor .nx-step-head-copy p{margin:0;font-size:15px;line-height:22px;color:var(--sd-muted);text-wrap:pretty}
html body dialog .drawer-panel.nx-editor .onboarding-intro{display:none}
html body dialog .drawer-panel.nx-editor .onboarding-step-body>.association-picker .association-picker-intro h3{display:none}
/* fields: label 14px semibold above a 50px tinted field, 20px between fields */
html body dialog .drawer-panel.nx-editor form :is(.field,label.field){margin:0 0 20px!important}
html body dialog .drawer-panel.nx-editor form :is(.field>label:first-child,label.field>span:first-child,.nx-todo-form>label){font-size:14px!important;line-height:20px!important;font-weight:600!important;color:var(--sd-text)!important}
html body dialog .drawer-panel.nx-editor .setup-field-help,html body dialog .drawer-panel.nx-editor .field>p.small{font-size:13px!important;line-height:18px!important;color:var(--sd-muted)!important;margin:8px 0 0!important}
/* footer: pinned, hairline above; Cancel/Back left, the result button right */
html body dialog .drawer-panel.nx-editor :is(.form-actions,.nx-todo-save){position:sticky!important;bottom:0!important;z-index:3;display:flex!important;align-items:center;justify-content:flex-end;gap:12px!important;margin:auto calc(-1 * var(--nx-ed-pad)) 0!important;padding:16px var(--nx-ed-pad) max(20px,env(safe-area-inset-bottom))!important;background:var(--sd-surface)!important;border-top:1px solid rgb(var(--c-line))!important;box-shadow:none!important}
html body dialog .drawer-panel.nx-editor .onboarding-action-buttons{display:flex;gap:12px;align-items:center;justify-content:flex-end;width:100%}
html body dialog .drawer-panel.nx-editor :is(.form-actions,.nx-todo-save,.onboarding-action-buttons) .button.primary{min-width:148px;justify-content:center}
@media (max-width:759px){
 html body dialog .drawer-panel.nx-editor :is(.form-actions,.nx-todo-save,.onboarding-action-buttons)>:is(.button,button):not([hidden]){flex:1 1 0;min-height:50px!important;justify-content:center}
 html body dialog .drawer-panel.nx-editor :is(.form-actions,.nx-todo-save,.onboarding-action-buttons)>.button.primary:not([hidden]){flex:2 1 0}
}
/* Add to-do: the related-records search reads as a section, not fine print */
html body dialog .drawer-panel.nx-editor .nx-todo-associations{margin-top:8px;padding-top:20px;border-top:1px solid rgb(var(--c-line))}
html body dialog .drawer-panel.nx-editor .nx-todo-associations>p.small{font-size:14px!important;line-height:20px!important;margin:0 0 12px!important}
html body dialog .drawer-panel.nx-editor .nx-todo-form input[type=date]:invalid,html body dialog .drawer-panel.nx-editor .nx-todo-form input[type=date]:placeholder-shown{color:var(--sd-muted)}
/* Import people: what happens, as a short checklist */
html body dialog .drawer-panel.nx-editor .nx-import-facts{list-style:none;margin:4px 0 0;padding:16px 20px;border-radius:20px;background:rgb(var(--c-canvas));display:grid;gap:10px}
html body dialog .drawer-panel.nx-editor .nx-import-facts li{position:relative;padding-left:28px;font-size:14px;line-height:20px;color:var(--sd-text)}
html body dialog .drawer-panel.nx-editor .nx-import-facts li::before{content:"";position:absolute;left:0;top:1px;width:18px;height:18px;background:var(--sd-action);-webkit-mask:url('/assets/icons/check.svg') center/16px no-repeat;mask:url('/assets/icons/check.svg') center/16px no-repeat}
/* New program: essentials, then a closed "More details" */
html body dialog .drawer-panel.nx-editor .nx-more-details{margin:4px 0 8px;border-top:1px solid rgb(var(--c-line))}
html body dialog .drawer-panel.nx-editor .nx-more-details>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 0;min-height:44px}
html body dialog .drawer-panel.nx-editor .nx-more-details>summary::-webkit-details-marker{display:none}
html body dialog .drawer-panel.nx-editor .nx-more-details>summary>span{display:grid;gap:4px}
html body dialog .drawer-panel.nx-editor .nx-more-details>summary strong{font:600 17px/24px Inter,ui-sans-serif,system-ui,sans-serif}
html body dialog .drawer-panel.nx-editor .nx-more-details>summary small{font-size:13px;line-height:18px;color:var(--sd-muted)}
html body dialog .drawer-panel.nx-editor .nx-more-details>summary::after{content:"";flex:none;width:20px;height:20px;background:var(--sd-muted);-webkit-mask:url('/assets/icons/chevron-right.svg') center/16px no-repeat;mask:url('/assets/icons/chevron-right.svg') center/16px no-repeat;transform:rotate(90deg);transition:transform .2s cubic-bezier(.22,1,.36,1)}
html body dialog .drawer-panel.nx-editor .nx-more-details[open]>summary::after{transform:rotate(-90deg)}
html body dialog .drawer-panel.nx-editor .nx-program-essentials{border-top:0!important;padding-top:4px!important}
html body dialog .drawer-panel.nx-editor .field[hidden]{display:none!important}
/* Schedule visits: blocks breathe evenly */
html body dialog .drawer-panel.nx-editor .nx-plan>:is(.field,fieldset,label.nx-switch-row){margin:0 0 24px!important}
html body dialog .drawer-panel.nx-editor .nx-plan-block>legend{padding:0!important;margin-bottom:12px!important}
html body dialog .drawer-panel.nx-editor .onboarding-step-body>.association-picker>.association-picker-intro{display:none}
/* Add person, Access: the app checkbox becomes a switch; the summary lines up under the name */
#overlay#overlay .onboarding-pane .people-access-card:has(.nx-switch){grid-template-columns:1fr;grid-template-areas:"pick" "summary" "action"}
#overlay#overlay .onboarding-pane .people-access-card>.choice-row:has(.nx-switch){justify-content:space-between}
#overlay#overlay .onboarding-pane .people-access-card>.choice-row:has(.nx-switch)~p{margin:0!important}
#overlay#overlay .onboarding-pane .people-access-card:has(.nx-switch)>.button{justify-self:start;margin-top:8px!important}
#overlay#overlay .onboarding-pane .people-access-card>.choice-row input.nx-switch{width:52px;height:32px}
/* Native menus in every drawer (Schedule visits' Program, the Unavailable days program) read as dropdowns: caret, pointer */
html body dialog .drawer-panel select:not(.native-select){-webkit-appearance:none;appearance:none;cursor:pointer;padding-right:44px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a6a5d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 16px center!important;background-size:18px!important}
[data-stercus-theme=dark] body dialog .drawer-panel select:not(.native-select){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9998b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important}
html body dialog .drawer-panel.nx-editor select:invalid{color:var(--sd-muted)}
/* Program tiles: views and mini graph placeholder while activity loads */
.nx-ptile-views.is-loading{flex:1;min-width:0;display:flex;align-items:center}
.nx-ptile-skel-line{display:block;width:min(140px,70%);height:14px;border-radius:7px}
.nx-ptile-graph.is-loading{display:block}
.nx-ptile-skel-graph{display:block;width:112px;height:36px;border-radius:10px;opacity:.7}
/* Programs page (round 9): tile-shaped placeholders until every tile's activity is in; the tiles then arrive together. */
.nx-ptile-skeleton{--loading-fill:color-mix(in srgb,var(--sd-muted) 14%,var(--sd-surface));display:grid;gap:10px;align-content:start;padding:20px;min-height:176px}
.nx-ptile-skeleton .nx-ptile-skel-name{width:52%;height:16px}.nx-ptile-skeleton .nx-ptile-skel-client{width:34%;height:12px}
.nx-ptile-skel-pulse{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:14px}
.nx-ptile-skeleton .nx-ptile-skel-tabs{width:100%;height:40px;margin-top:6px;border-radius:12px;opacity:.6}
.nx-ptile.is-arriving{animation:nx-ptile-arrive .28s ease-out both}
@keyframes nx-ptile-arrive{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.nx-ptile.is-arriving{animation:none}}
/* Since yesterday, loading */
.nx-event-skeleton .nx-event-copy{display:grid;align-content:start;gap:10px;flex:1;min-height:46px;padding-top:4px}
.nx-event-skeleton .loading-line{width:80%;height:14px;margin:0}
.nx-event-skeleton .loading-caption{width:40%;height:12px;margin:0}
/* Real entries arrive in the same rows and fade in, without moving */
.nx-timeline.is-arriving .nx-events>li{animation:nx-timeline-in .24s ease-out both}
@keyframes nx-timeline-in{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.nx-timeline.is-arriving .nx-events>li{animation:none}}
.nx-event-skeleton .nx-event-dot{opacity:.35}
/* To do while its sources load (round 9): the card's own row shape, so the list lands without a jump in row height. */
.nx-todo[data-todo-loading]{--loading-fill:color-mix(in srgb,var(--sd-muted) 14%,var(--sd-surface))}
.nx-todo-skeleton .nx-todo-symbol{background:var(--loading-fill)}
.nx-todo-skeleton .nx-todo-copy{gap:8px}
.nx-todo-skeleton .loading-line{width:62%;height:14px;margin:0}
.nx-todo-skeleton .loading-caption{width:40%;height:12px;margin:0}
.nx-todo-skeleton+.nx-todo-skeleton .loading-line{width:48%}
.nx-todo-note{margin:8px 4px 0}
/* Tile, timeline and plan placeholders live outside .loading-skeleton, so give them the fill */
:is(.nx-ptile-pulse,.nx-timeline[data-timeline-loading],.nx-plan-skeleton,.nx-ptile-views,.nx-ptile-graph){--loading-fill:color-mix(in srgb,var(--sd-muted) 14%,var(--sd-surface))}

/* 12-hour time entry: hour : minutes, then a required AM/PM choice. */
html body .clock12{display:flex;align-items:center;gap:6px;min-width:0}
html body .clock12 :is(.clock12-hour,.clock12-minute){flex:none;width:56px!important;min-width:0!important;min-height:44px;padding:0 8px!important;box-sizing:border-box;border:1px solid var(--sd-border);border-radius:12px;background:var(--sd-field);color:var(--sd-text);font:inherit;font-size:16px;font-variant-numeric:tabular-nums;text-align:center}
html body .clock12 .clock12-colon{color:var(--sd-muted);font-weight:600}
html body .clock12 .clock12-period{display:inline-flex;margin-left:6px;padding:3px;gap:2px;border-radius:999px;background:var(--sd-field);border:1px solid var(--sd-border)}
html body .clock12 .clock12-period-btn{min-width:48px;min-height:38px;padding:0 12px;border:0;border-radius:999px;background:transparent;color:var(--sd-muted);font:inherit;font-size:14px;font-weight:600;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}
html body .clock12 .clock12-period-btn[aria-pressed=true]{background:var(--sd-surface);color:var(--sd-text);box-shadow:0 1px 2px rgb(0 0 0/.08),0 2px 8px rgb(0 0 0/.06),inset 0 0 0 1px var(--sd-border)}
html body .clock12 .clock12-period-btn:focus-visible,html body .clock12 :is(.clock12-hour,.clock12-minute):focus-visible{outline:2px solid var(--sd-focus);outline-offset:2px}
html body .clock12 .clock12-period-btn:disabled{cursor:default;opacity:.6}
@media (prefers-reduced-motion:reduce){html body .clock12 .clock12-period-btn{transition:none}}

/* One initials circle in every people list (2026-11-15). Same component and hue
   everywhere; only the size follows the row it sits in. */
html body :is(.nx-contact,.nx-attn-list,.nx-program-contact-row,.lab-record-row)>:is(.person-initials,.lab-person-avatar),
html body :is(.nx-program-contact-main,.nx-attn-list a)>:is(.person-initials,.lab-person-avatar){flex:0 0 38px;width:38px;height:38px;font:600 15px/1 Fraunces,Georgia,serif}
html body .nx-attn-list a>.person-initials{flex-basis:40px;width:40px;height:40px;font-size:16px}
html body .overview-recent-row>.person-initials{flex:0 0 32px;width:32px;height:32px;font-size:13px}
html body .nx-search-row>.person-initials{flex:0 0 28px;width:28px;height:28px;font-size:12px}
html body .nexus-search-result:has(>.person-initials){justify-content:flex-start}
html body .nexus-search-result>.person-initials{flex:0 0 32px;width:32px;height:32px;font-size:13px}
html body .nexus-search-result>.person-initials+span{flex:1;min-width:0}
html body .record-identity>.person-initials{flex:0 0 36px;width:36px;height:36px;font-size:15px;margin-right:12px;vertical-align:middle}
html body .team-members-panel .organization-member>.person-initials{width:36px;height:36px;font-size:15px}

/* ---------- Collapsible sidebar (2026-11-15) ----------
   Expanded: the toggle shares the bottom row with Settings.
   Collapsed: a 76px icon rail; search and Add stay one tap away, every icon
   gets a label on hover or keyboard focus. Ctrl/⌘ + \ toggles (rail-collapse.js). */
.nx-rail-toggle{display:none}
@media (min-width:900px){
  html body .shell-header .header-actions{flex-direction:row;align-items:center;gap:4px}
  html body .shell-header .header-actions #theme-button{flex:1;min-width:0}
  html body .nx-rail-toggle{display:grid;place-items:center;flex:none;width:44px;height:44px;border:0;border-radius:50%;background:transparent;color:var(--sd-muted);cursor:pointer;position:relative;transition:color .15s ease-out,background-color .15s ease-out}
  html body .nx-rail-toggle:focus-visible{outline:2px solid var(--sd-action);outline-offset:2px}
  @media (hover:hover){html body .nx-rail-toggle:hover{color:var(--sd-text);background:rgb(var(--c-line)/.45)}}

  /* motion: width and position glide; nothing ordinary runs over .32s */
  html body .shell-header:has(.nexus-search){transition:width .32s cubic-bezier(.22,1,.36,1),padding .32s cubic-bezier(.22,1,.36,1)}
  html body #workspace{transition:margin-left .32s cubic-bezier(.22,1,.36,1),width .32s cubic-bezier(.22,1,.36,1)}
  html body .dock{transition:width .32s cubic-bezier(.22,1,.36,1),left .32s cubic-bezier(.22,1,.36,1),top .32s cubic-bezier(.22,1,.36,1)}
  html body .dock .nav-label{transition:opacity .2s ease-out}
  html[data-nx-rail-instant] body :is(.shell-header,#workspace,.dock,.dock .nav-label,.dock .lab-lens){transition:none!important}

  /* collapsed */
  html[data-nx-rail=collapsed] body .shell-header:has(.nexus-search){width:76px!important;padding:48px 16px 24px!important}
  html[data-nx-rail=collapsed] body .shell-header .brand,
  html[data-nx-rail=collapsed] body .shell-header .nx-rail-row{display:none!important}
  html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools{flex-direction:column;align-items:center;gap:8px!important;margin:0!important}
  html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools .nexus-search{position:relative;flex:none;width:44px;height:44px;margin:0!important}
  html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools .nexus-search-field{position:absolute;left:0;top:0;width:44px;height:44px;min-height:44px!important;padding:0 0 0 13px!important;box-sizing:border-box;border-radius:999px;overflow:hidden;cursor:pointer;transition:width .28s cubic-bezier(.22,1,.36,1),box-shadow .2s ease-out}
  html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools .nexus-search-field input{width:0;min-width:0;opacity:0;padding:0;transition:opacity .15s ease-out}
  /* tapping the search icon opens a floating field beside the rail */
  html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools .nexus-search:focus-within{z-index:40}
  html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools .nexus-search:focus-within .nexus-search-field{width:300px;padding-right:16px!important;background:var(--sd-surface)!important;box-shadow:0 1px 2px rgb(var(--c-shade)/.06),0 12px 40px rgb(var(--c-shade)/.16)!important;cursor:text}
  html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools .nexus-search:focus-within .nexus-search-field input{width:auto;flex:1;opacity:1}
  /* the + stays put (the expanded rail hides it while search is focused) */
  html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools:has(input:focus) .nexus-search{margin-right:0!important}
  html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools:has(input:focus) .nx-rail-add{transform:none;opacity:1;pointer-events:auto}
  html[data-nx-rail=collapsed] body .shell-header .header-actions{flex-direction:column-reverse;gap:8px}
  html[data-nx-rail=collapsed] body #theme-button{width:44px!important;flex:none!important;padding:0!important;justify-content:center}
  html[data-nx-rail=collapsed] body #theme-button .nx-settings-label{display:none}
  html[data-nx-rail=collapsed] body .dock{left:12px!important;width:52px!important;top:168px!important}
  html[data-nx-rail=collapsed] body .dock>a{padding:0!important;justify-content:center;gap:0}
  html[data-nx-rail=collapsed] body .dock>a .nav-label{opacity:0;width:0;overflow:hidden;white-space:nowrap}
  html[data-nx-rail=collapsed] body #workspace{margin-left:76px!important;width:calc(100% - 76px)!important}
  html[data-nx-rail=collapsed] body .lab-add-menu{left:84px!important;top:156px!important}

  /* hover / focus labels for the icon rail */
  html[data-nx-rail=collapsed] body :is(.dock>a,.nx-rail-add,#theme-button){position:relative}
  html body .nx-rail-toggle::after,
  html[data-nx-rail=collapsed] body :is(.dock>a,.nx-rail-add,#theme-button)::after,
  html[data-nx-rail=collapsed] body .nexus-search:not(:focus-within)>.nexus-search-field::after{content:attr(data-nx-tip);position:absolute;left:calc(100% + 12px);top:50%;transform:translate(-4px,-50%);padding:6px 10px;border-radius:8px;background:rgb(var(--c-ink));color:rgb(var(--c-canvas));font:500 13px/18px Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:0;white-space:pre;pointer-events:none;opacity:0;z-index:50;box-shadow:0 6px 20px rgb(var(--c-shade)/.18);transition:opacity .12s ease-in,transform .12s ease-in}
  html body .nx-rail-toggle::after{left:auto;right:calc(100% + 8px);top:auto;bottom:calc(100% + 6px);transform:translateY(4px)}
  html[data-nx-rail=collapsed] body .nx-rail-toggle::after{left:calc(100% + 12px);right:auto;bottom:auto;top:50%;transform:translate(-4px,-50%)}
  html[data-nx-rail=collapsed] body .dock{overflow:visible}
  html[data-nx-rail=collapsed] body .shell-header .nexus-search-field{overflow:visible}
  html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools .nexus-search:focus-within .nexus-search-field{overflow:hidden}
}
@media (min-width:900px) and (hover:hover){
  html body .nx-rail-toggle:hover::after,
  html[data-nx-rail=collapsed] body :is(.dock>a,.nx-rail-add,#theme-button,.nexus-search:not(:focus-within)>.nexus-search-field):hover::after{opacity:1;transform:translate(0,-50%);transition:opacity .15s ease-out .35s,transform .15s ease-out .35s}
  html body .nx-rail-toggle:hover::after{transform:none}
  html[data-nx-rail=collapsed] body .nx-rail-toggle:hover::after{transform:translate(0,-50%)}
}
@media (min-width:900px){
  html body .nx-rail-toggle:focus-visible::after,
  html[data-nx-rail=collapsed] body :is(.dock>a,.nx-rail-add,#theme-button):focus-visible::after{opacity:1;transform:translate(0,-50%);transition:opacity .15s ease-out}
  html body .nx-rail-toggle:focus-visible::after{transform:none}
  html[data-nx-rail=collapsed] body .nx-rail-toggle:focus-visible::after{transform:translate(0,-50%)}
}
@media (min-width:900px) and (prefers-reduced-motion:reduce){
  html body :is(.shell-header,#workspace,.dock,.dock .nav-label,.nexus-search-field,.nexus-search-field input){transition:none!important}
  html body :is(.nx-rail-toggle,.dock>a,.nx-rail-add,#theme-button,.nexus-search-field)::after{transition:none!important}
}
@media (min-width:900px) and (forced-colors:active){html body :is(.nx-rail-toggle,.dock>a,.nx-rail-add,#theme-button,.nexus-search-field)::after{border:1px solid CanvasText;background:Canvas;color:CanvasText}}

/* ---------- Full-screen under the status bar (2026-11-15) ----------
   The home-screen app uses black-translucent, so the page runs under the status
   bar in every orientation (with "default", iOS shrank the page by the status-bar
   height after rotating, but not at launch). Everything at the top edge pads by
   env(safe-area-inset-top); a solid strip keeps scrolled content out from under
   the clock and gives iOS a solid colour to sample for the status bar. */
html body::before{content:"";position:fixed;left:0;right:0;top:0;height:env(safe-area-inset-top,0px);background:var(--sd-canvas);z-index:45;pointer-events:none}
html body .nx-cal-head{top:var(--nx-sticky-top,env(safe-area-inset-top,0px))}
@media (max-width:899px){
  html body .nx-site-drawer>.drawer-panel>.drawer-heading{padding-top:calc(24px + env(safe-area-inset-top,0px))!important}
}

/* Landscape camera corner (viewport-fix.js): only opted-in standalone controls
   (CAMERA_NUDGE) that would sit under the camera move left; card content keeps its
   place. The page keeps its full width and no top margin. */
/* Any marked control, wherever it lives: the page, the overlay, and the read drawers
   (site, missed visit) that open as their own dialogs on <body> (Taylor, 2026-11-20:
   their close button didn't move). Phones too, for the floating search and settings.
   :is(body,#workspace) matches every element yet keeps ID weight, so the drawer
   heading's own margin rules can't cancel the shift. */
html :is(body,#workspace) [data-camera-clear]{margin-right:calc(var(--nx-camera-shift) + var(--nx-camera-base-margin,0px))!important}

/* Round 3 (Taylor, 2026-11-15) */
/* The dimmed page behind a drawer is fixed to the screen. It was absolute and one
   screen tall, so on a scrolled page it dimmed only the top part. */
html body #admin-page-scrim{position:fixed!important;inset:0!important;min-height:100lvh}
/* Touch screens with the sidebar: the content area scrolls, the page doesn't
   (shell-scroll.js), so the sidebar, backdrop and drawers stay put. */
html[data-shell-scroll],html[data-shell-scroll] body{height:100%;overflow:hidden!important;overscroll-behavior:none}
html[data-shell-scroll] body #workspace{height:100dvh!important;max-height:100dvh;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;box-sizing:border-box;margin-top:0!important;margin-bottom:0!important}
/* Drawer headers: pinned flush to the drawer's top edge with their own room above
   the title (plus the status bar on full-screen sheets) and a solid fill the whole
   height, so nothing scrolls visibly above or behind them. */
html body dialog .drawer-panel:has(>:is(.drawer-heading,.dialog-heading)){padding-top:0!important}
html body dialog .drawer-panel>:is(.drawer-heading,.dialog-heading){position:sticky!important;top:0!important;margin-top:0!important;z-index:5;background-clip:border-box;flex-shrink:0!important;height:auto!important;max-height:none!important}
/* one header height for every drawer, the editors' standard (Taylor, 2026-11-15) */
html body dialog .drawer-panel:not(.nx-editor)>:is(.drawer-heading,.dialog-heading){padding-top:32px!important;padding-bottom:20px!important}
@media (max-width:760px),(display-mode:standalone){
  html:not([data-side-drawers]) body dialog .drawer-panel:not(.nx-editor)>:is(.drawer-heading,.dialog-heading){padding-top:calc(env(safe-area-inset-top) + 20px)!important}
}
/* Cover screen sheets: the close and any top-right actions sit left of the camera
   (viewport-fix.js nudges them), and the title wraps before it rather than under it. */
html[data-screen=cover] body dialog .drawer-panel>:is(.drawer-heading,.dialog-heading){min-width:0}
html[data-screen=cover] body dialog .drawer-panel>:is(.drawer-heading,.dialog-heading)>:first-child{min-width:0;flex:1 1 auto}
html[data-screen=cover] body dialog .drawer-panel>:is(.drawer-heading,.dialog-heading) h2{overflow-wrap:anywhere;text-wrap:balance}

/* Side drawers where there is room (viewport-fix.js sets data-side-drawers): the
   same floating 480 px panel as tablet and desktop, instead of the full-screen sheet. */
html[data-side-drawers] body #overlay.drawer{--drawer-gap:20px}
html[data-side-drawers] body :is(#overlay,.read-detail-overlay,.nx-site-drawer.read-detail-overlay)>.drawer-panel,
html[data-side-drawers] body[data-warm-appearance] #overlay .drawer-panel,
html[data-side-drawers] body #overlay.drawer .drawer-panel{
  inset:max(20px,calc(env(safe-area-inset-top) + 8px)) max(20px,env(safe-area-inset-right)) auto auto!important;
  width:min(480px,calc(100vw - 40px))!important;max-width:none!important;
  height:calc(100dvh - max(20px,calc(env(safe-area-inset-top) + 8px)) - max(20px,env(safe-area-inset-bottom)))!important;
  max-height:calc(100dvh - max(20px,calc(env(safe-area-inset-top) + 8px)) - max(20px,env(safe-area-inset-bottom)))!important;
  border:1px solid var(--sd-border)!important;border-radius:var(--r-drawer)!important;
  box-shadow:0 24px 80px rgb(42 32 27/.2)!important;padding:0 28px!important;--drawer-inline:28px}
html[data-side-drawers] body :is(#overlay,.read-detail-overlay) .drawer-panel>.drawer-heading{margin-inline:-28px!important;padding:32px 28px 20px!important;top:0}
html[data-side-drawers] body #overlay :is(.onboarding-base-pane,.onboarding-ancestor-pane){visibility:visible}
@media (max-width:899px){html[data-side-drawers] body #overlay .drawer-panel .setup-save-actions{margin-inline:-28px!important;padding-inline:28px!important}}
/* The same side drawers from the screen size alone (round 9, 2026-11-19): data-side-drawers is set
   by script on load, resize and display changes, and on the Duo it can lag an unfold, which left
   read drawers (Missed collection, Collection details) as full-screen pages while Edit site and the
   person drawer, sized by CSS, stayed floating. These media queries are sideDrawers() itself:
   full-screen rules apply (home-screen app, or 760 px or narrower), at least 600 × 520, not the
   cover screen. */
@media (display-mode:standalone) and (min-width:600px) and (min-height:520px),(min-width:600px) and (max-width:760px) and (min-height:520px){
html:not([data-screen=cover]) body :is(#overlay,.read-detail-overlay,.nx-site-drawer.read-detail-overlay)>.drawer-panel{
  inset:max(20px,calc(env(safe-area-inset-top) + 8px)) max(20px,env(safe-area-inset-right)) auto auto!important;
  width:min(480px,calc(100vw - 40px))!important;max-width:none!important;
  height:calc(100dvh - max(20px,calc(env(safe-area-inset-top) + 8px)) - max(20px,env(safe-area-inset-bottom)))!important;
  max-height:calc(100dvh - max(20px,calc(env(safe-area-inset-top) + 8px)) - max(20px,env(safe-area-inset-bottom)))!important;
  border:1px solid var(--sd-border)!important;border-radius:var(--r-drawer)!important;
  box-shadow:0 24px 80px rgb(42 32 27/.2)!important;padding:0 28px!important;--drawer-inline:28px}
html:not([data-screen=cover]) body :is(#overlay,.read-detail-overlay) .drawer-panel>.drawer-heading{margin-inline:-28px!important;padding:32px 28px 20px!important;top:0}
}

/* Loading pages (destination-loading.js), desktop and the Duo inner screen: the pill
   is the real picker's size, and Schedule keeps a place for "Schedule visits", so
   nothing shifts when the page arrives. */
html body .loading-destination .loading-page-add{display:none}
@media (min-width:900px){
  html body .loading-destination .loading-program-scope{width:167px;height:44px}
  html body .loading-destination .loading-program-actions{gap:8px}
  html body .loading-destination .loading-page-add{display:block;width:133px;height:44px;border-radius:999px}
}

/* Full-page editors on phones (design audit, 2026-11-15): the Save bar replaces the
   tab bar and + button while editing, so content no longer scrolls under three
   floating layers. Leaving still goes through the page's back link and its guard. */
@media(max-width:600px){
  html body:has(#workspace .floating-workspace-form) :is(.dock,.lab-add){display:none!important}
  html body #workspace .floating-workspace-form .setup-save-actions{inset-inline:0!important;bottom:0!important;border-width:1px 0 0!important;border-radius:0!important;box-shadow:none!important;padding:12px max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))!important}
  html body #workspace .floating-workspace-form{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
}

/* Shared sheet spec (design audit, 2026-11-15; sheet-chrome.js marks the parts).
   One title size for every drawer, record or editor; the header takes the panel's
   own background; a Back arrow leads the title; footers that weren't pinned are
   pinned, solid and full width, with a destructive action on the far left. */
html body dialog .drawer-panel>.dialog-heading h2{font-size:26px!important;line-height:32px!important;letter-spacing:-.01em}
@media(max-width:760px){html body dialog .drawer-panel>.dialog-heading h2{font-size:24px!important;line-height:30px!important}}
html body dialog .drawer-panel>.dialog-heading{background-color:var(--sheet-bg,inherit)!important}
html body dialog .drawer-panel>.dialog-heading>.sheet-back{order:-1;margin-left:-6px}
html body dialog .drawer-panel>.dialog-heading:has(>.sheet-back){justify-content:flex-start!important;gap:12px}
html body dialog .drawer-panel>.dialog-heading:has(>.sheet-back)>:not(.sheet-back){flex:1 1 auto;min-width:0}
html body dialog .drawer-panel .form-actions.sheet-footer{position:sticky;bottom:0;z-index:4;margin-top:24px;padding-block:16px max(16px,env(safe-area-inset-bottom));background:var(--sheet-bg,var(--sd-surface));box-shadow:0 0 0 100vmax var(--sheet-bg,var(--sd-surface)),0 -1px 0 100vmax var(--sd-divider);clip-path:inset(-1px -100vmax -100vmax -100vmax);display:flex;justify-content:flex-end;flex-wrap:wrap;gap:12px}
html body dialog .drawer-panel .form-actions>.sheet-destructive{order:-1;margin-right:auto}

/* Editors read the same everywhere (design audit batch 3, 2026-11-15).
   Inside a 480 px drawer the section index only pushed the form down; folded
   sections already make long editors scannable, and full pages keep the index.
   A bare fieldset no longer draws a box inside the sheet. Error slots that used
   the info notice look like errors. A field's own error sits under it. */
html body dialog .drawer-panel .setup-editor-index{display:none!important}
html body dialog .drawer-panel fieldset.program-form-body{border:0;padding:0;margin:0;min-width:0}
html body :is([data-todo-error],[data-import-error],[data-batch-error],[data-sample-review-error]):not([hidden]){color:var(--sd-tile-error);background:none;border:0;padding:0;font-size:14px}
html body form .field-error{margin:6px 0 0;font-size:13px;line-height:18px;min-height:0;color:var(--sd-tile-error)}
html body form [aria-invalid=true]:is(input,select,textarea){box-shadow:0 0 0 2px var(--sd-tile-error)!important}

/* The toast as a top-layer popover keeps its own placement (design audit batch 4). */
html body #toast[popover]{top:auto;right:auto;margin:0;padding:4px 4px 4px 20px;overflow:visible;color:rgb(255 255 255)}
html body #toast[popover]:popover-open{display:flex;align-items:center}

/* Polish (design audit batch 5, 2026-11-15).
   Checkbox and radio rows are full 44 px tap targets; the tour's buttons use the
   pill shape like every other button; select menus share the floating-menu
   corner and ink-tinted shadow; Settings clears the phone + button. */
html body dialog .drawer-panel :is(label:has(>input:is([type=checkbox],[type=radio])),.radio-group label,.nx-team-chip){min-height:44px;box-sizing:border-box}
html body dialog .drawer-panel .nx-team-chip{display:inline-flex;align-items:center}
html body .nx-welcome .nx-w-primary{border-radius:999px!important}
html body .nx-welcome .nx-w-text{border-radius:999px;padding:0 16px}
@media(hover:hover){html body .nx-welcome .nx-w-text:hover{background:rgb(var(--c-ink)/.06)}}
html body .select-popover{border-radius:14px;box-shadow:0 12px 40px rgb(var(--c-shade)/.14);border-color:var(--sd-divider)}
@media(max-width:899px){html body #workspace:has(.lab-setting-section){padding-bottom:calc(150px + env(safe-area-inset-bottom))!important}}

/* Compact schedule week (Taylor, 2026-11-15). Each event is one slim line: type
   icon, short time, status and one crew avatar. Two lines per day; the rest
   wait behind "+N more", which opens the row. Rows come out about a third of
   their old height. */
html body .nx-cal .nx-ev.nx-ev-slim{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;grid-template:none!important;min-height:26px;height:26px;padding:0 4px 0 5px;gap:3px;font-size:12px;line-height:26px;border-radius:8px;white-space:nowrap;overflow:hidden;margin:0 2px;flex-wrap:wrap!important;align-content:flex-start!important}
/* In a narrow day the avatar wraps to a hidden second line instead of being cut in half. */
html body .nx-cal .nx-ev.nx-ev-slim>*{height:26px;align-self:center}
html body .nx-cal .nx-ev-slim>*{grid-area:auto!important;position:static!important;margin-block:0!important}
html body .nx-cal .nx-ev-slim .nx-ev-glyph{display:inline-grid!important;place-items:center;width:14px;height:14px;flex:none}
html body .nx-cal .nx-ev-slim .nx-ev-glyph svg{width:14px;height:14px}
html body .nx-cal .nx-ev-slim .nx-ev-t{display:inline!important;flex:none;min-width:0;overflow:hidden;text-overflow:clip;font-variant-numeric:tabular-nums;font-weight:600;color:inherit;opacity:1}
html body .nx-cal .nx-ev-slim :is(.nx-ev-done,.nx-ev-part,.nx-ev-conf,.nx-ev-warn){flex:none;width:14px;height:14px;display:grid;place-items:center}
html body .nx-cal .nx-ev-slim :is(.nx-ev-done,.nx-ev-part,.nx-ev-conf,.nx-ev-warn) .icon{width:12px;height:12px}
html body .nx-cal .nx-ev-slim .nx-sc-avs{display:inline-flex!important;align-items:center;margin-left:auto;padding:0!important;flex:none;width:auto!important;gap:0}
html body .nx-cal .nx-ev-slim .nx-sc-av{width:17px;height:17px;font-size:7.5px;letter-spacing:-.02em;line-height:1;border:0!important;outline:0}
html body .nx-cal .nx-ev-slim .nx-sc-more{display:none}
html body .nx-cal .nx-ev.nx-ev-slim.is-extra{display:none!important}
html body .nx-cal .nx-cal-row.is-expanded .nx-ev.nx-ev-slim.is-extra{display:flex!important}
html body .nx-cal .nx-cal-row.is-expanded .nx-ev-more{display:none}
html body .nx-sc-avs .nx-sc-av{font-size:8px!important;letter-spacing:-.02em;line-height:1}
html body .nx-cal .nx-ev.nx-ev-more{min-height:22px;height:22px;padding:0 6px;margin:0 2px;font-size:11px;font-weight:600;color:var(--sd-muted);background:transparent;box-shadow:none;cursor:pointer;justify-content:flex-start}
@media(hover:hover){html body .nx-cal .nx-ev.nx-ev-more:hover{color:var(--sd-text);background:rgb(var(--c-ink)/.05)}}
html body .nx-cal .nx-cal-items{gap:4px 0;padding:6px 0}
html body .nx-cal .nx-cal-row .nx-cal-site a{line-height:1.25}
html body .nx-cal-legend .nx-cal-donekey{display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;color:var(--sd-success,#3d7a4a)}
html body .nx-calendar>.nx-cal-legend{margin:0 0 12px}
/* Phones list labelled chips one day at a time, so the legend stays below them. */
/* Below desktop the legend stays above the week as one line that scrolls sideways
   (Taylor, 2026-11-16); it wrapped to three or four lines on the Duo. */
@media(max-width:1099px){html body .nx-calendar>.nx-cal-legend{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;scroll-snap-type:x proximity;margin:0 0 12px;padding:2px 0}
html body .nx-calendar>.nx-cal-legend::-webkit-scrollbar{display:none}
html body .nx-calendar>.nx-cal-legend>*{flex:0 0 auto;white-space:nowrap;scroll-snap-align:start}
html body .nx-calendar>.nx-cal-legend[data-more-end]{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent)}
html body .nx-calendar>.nx-cal-legend[data-more-start]{-webkit-mask-image:linear-gradient(to right,transparent,#000 28px);mask-image:linear-gradient(to right,transparent,#000 28px)}
html body .nx-calendar>.nx-cal-legend[data-more-start][data-more-end]{-webkit-mask-image:linear-gradient(to right,transparent,#000 28px,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to right,transparent,#000 28px,#000 calc(100% - 28px),transparent)}}
/* Crew face pile: two overlapping circles, then +N. */
html body .nx-sc-pile{display:inline-flex;align-items:center}
html body .nx-sc-pile>.nx-sc-av+.nx-sc-av{margin-left:-4px;box-shadow:0 0 0 1.5px var(--sd-surface)!important}
/* A narrow day (Duo inner, small windows) keeps the lead face; wider days show the pile. */
html body .nx-cal .nx-ev.nx-ev-slim{container-type:inline-size}
@container (max-width:100px){html body .nx-cal .nx-ev-slim .nx-sc-pile>:not(:first-child){display:none}}
html body .nx-sc-pile>.nx-sc-av-more{background:rgb(var(--c-ink)/.12)!important;color:var(--sd-text)!important;font-weight:700}
html body .nx-cal-group>.nx-cal-fold{flex:0 0 auto;white-space:nowrap}
/* Crews ride one line; a longer list scrolls sideways as a rail (Taylor,
   2026-11-15) instead of wrapping. The first chip's auto margin keeps a short
   list right-aligned without hiding a long list's start. Edges fade only on the
   side with more crews (sheet-chrome.js marks them). */
html body .nx-cal-group .nx-cal-crew{flex:1 1 0;display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:6px;min-width:0;padding-block:6px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:none;-webkit-overflow-scrolling:touch}
html body .nx-cal-group .nx-cal-crew::-webkit-scrollbar{display:none}
html body .nx-cal-group .nx-cal-crew>:first-child{margin-left:auto}
html body .nx-cal-group .nx-cal-crew>*{flex:none;scroll-snap-align:start}
html body .nx-cal-group .nx-cal-crew[data-more-end]{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent)}
html body .nx-cal-group .nx-cal-crew[data-more-start]{-webkit-mask-image:linear-gradient(to right,transparent,#000 28px);mask-image:linear-gradient(to right,transparent,#000 28px)}
html body .nx-cal-group .nx-cal-crew[data-more-start][data-more-end]{-webkit-mask-image:linear-gradient(to right,transparent,#000 28px,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to right,transparent,#000 28px,#000 calc(100% - 28px),transparent)}
html body .nx-cal-group .nx-cal-crewchip{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px 0 4px;border-radius:999px;background:rgb(var(--c-ink)/.05);font-size:12px;font-weight:600;white-space:nowrap}
html body .nx-cal-group .nx-cal-crewchip .nx-sc-avs{padding:0!important}
html body .nx-cal-group .nx-cal-crewchip .nx-sc-more{display:none}

/* Remove in visit and collection-day editors looks like the shared danger button and
   stays on the far left of the footer (design audit, 2026-11-15). */
html body .form-actions>.nx-slot-remove{margin-right:auto;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border:1px solid var(--sd-tile-error);border-radius:999px;background:var(--sd-surface);color:var(--sd-tile-error);font-weight:600}
@media(hover:hover){html body .form-actions>.nx-slot-remove:hover:not(:disabled){background:color-mix(in srgb,var(--sd-tile-error) 10%,var(--sd-surface))}}

/* Crew chip near the top of visit drawers, same look as the schedule group headers. */
html body :is(.nx-act-crew,.nx-vr-status) .nx-cal-crewchip{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 12px 0 4px;border-radius:999px;background:rgb(var(--c-ink)/.05);font-size:13px;font-weight:600;white-space:nowrap}
html body :is(.nx-act-crew,.nx-vr-status) .nx-cal-crewchip .nx-sc-avs{padding:0!important}
html body .nx-act-crew{display:flex;flex-wrap:wrap;gap:8px;margin:-12px 0 20px}
html body .nx-act-crew .nx-cal-crewchip.is-none{color:var(--sd-tile-error);background:color-mix(in srgb,var(--sd-tile-error) 9%,transparent);padding:0 12px}
html body .nx-act-crew .nx-cal-crewchip.is-none .icon{width:14px;height:14px}
/* Sample drawer: start and collect shown as a linked pair, like install and uninstall. */
html body .nx-act-form [data-act-run] .nx-dep{margin:4px 0 20px}
html body .nx-act-run{margin:-4px 0 16px;font-size:13px;color:var(--sd-muted)}
html body .nx-act-run.is-warn{display:flex;gap:6px;align-items:center;color:var(--sd-tile-error)}
html body .nx-act-run.is-warn .icon{width:14px;height:14px;flex:none}

/* ---------- One backdrop for every overlay (2026-11-16) ----------
   Drawers in #overlay used the page scrim AND their own scrim (about 59% darker), while
   read drawers (schedule visit, site, to-do) used one (about 28%). Every drawer, sheet
   and modal now draws exactly one --nx-scrim layer. A confirm dialog over a drawer adds a
   lighter --nx-scrim-stack with no second blur. Menus and popovers stay undimmed (the +
   menu keeps its dim because it covers the screen like a sheet on phones).
   Blur: a light 3px only where it is cheap (fine pointer: desktop and trackpads). Phones,
   the Duo and Reduce Transparency get the dim alone, so opening a drawer never stutters. */
:root{--nx-scrim:rgb(24 18 14/.36);--nx-scrim-stack:rgb(24 18 14/.2);--nx-scrim-blur:none}
:root[data-stercus-theme=dark],[data-stercus-theme=dark]{--nx-scrim:rgb(0 0 0/.55);--nx-scrim-stack:rgb(0 0 0/.3)}
@media (hover:hover) and (pointer:fine){:root{--nx-scrim-blur:blur(3px)}}
@media (prefers-reduced-transparency:reduce){:root{--nx-scrim-blur:none}}
html[data-stercus-theme] body .overlay-scrim,html body #admin-page-scrim,html body:is([data-nx-add-open],[data-nx-add-closing])::after{background:var(--nx-scrim)!important;-webkit-backdrop-filter:var(--nx-scrim-blur)!important;backdrop-filter:var(--nx-scrim-blur)!important}
html[data-stercus-theme] body[data-warm-appearance] #overlay>.overlay-scrim{background:transparent!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html[data-stercus-theme] body :is(.nested-read-drawer,.sampling-point-overlay.site-child-drawer)>.overlay-scrim{background:transparent!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html body dialog::backdrop{background:var(--nx-scrim-stack);-webkit-backdrop-filter:none;backdrop-filter:none}
html body:not(:has(#overlay[open],dialog.read-detail-overlay[open],#setup-drawers[open],.setup-modal[open],.sampling-point-overlay[open])) :is(#discard-dialog,#setup-discard)::backdrop{background:var(--nx-scrim)}

/* Today, In the field: the progress bar spans the card under the figure, with its label on
   its own line, so 0 collected reads as an empty track, not a loading stub (2026-11-16). */
html body .nx-collect-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;column-gap:16px;row-gap:14px}
html body .nx-collect-head>.nx-collect-summary{display:contents}
html body .nx-collect-head .nx-collect-figure{grid-column:1;grid-row:1}
html body .nx-collect-head>.nx-week{grid-column:2;grid-row:1}
html body .nx-collect-head .nx-collect-progress{grid-column:1/-1;grid-row:2;flex-direction:column;align-items:stretch;gap:8px;white-space:normal}
html body .nx-collect-head .nx-progress{width:100%;height:8px;background:rgb(var(--c-ink)/.09)}
html body[data-stercus-theme=dark] .nx-collect-head .nx-progress,[data-stercus-theme=dark] body .nx-collect-head .nx-progress{background:rgb(255 255 255/.14)}
html body .nx-collect-head .nx-progress>span{min-width:0}

/* Primary hover follows the palette (Harbor, Fig, Cobalt) instead of a fixed clementine
   (2026-11-16), using the same 14% lift as the sidebar + button. */
html[data-stercus-theme]{--admin-action-hover:color-mix(in srgb,var(--sd-action),white 14%)}

/* Schedule visits: Sites says to choose a program first instead of sitting empty. */
html body .nx-plan-pickfirst{display:flex;align-items:center;gap:10px;margin:0;padding:16px;border:1px dashed rgb(var(--c-line));border-radius:14px;background:rgb(var(--c-ink)/.025);color:var(--sd-muted);font-size:14px}
html body .nx-plan-pickfirst[hidden]{display:none}
html body .nx-plan-pickfirst .icon{width:16px;height:16px;flex:none}

/* Repeat segmented control: the label hugs its thumb, so there is no extra strip under it
   (the 44 px row rule made labels taller than the 38 px thumb). */
html body .drawer-panel form .nx-plan-seg label{min-height:0!important;padding:0!important}

/* Face piles: every face gets the same ring, not just the second (2026-11-16). */
html body .nx-sc-pile>.nx-sc-av{box-shadow:0 0 0 1.5px var(--sd-surface)!important}

/* Visit drawer skeletons (2026-11-16): an editable visit loads on the same page background
   as the form it becomes, with the same small icon, site name, crew pill, fields,
   linked card and collector chips. Completed visits keep the canvas record look. */
html body .drawer-panel:has([data-schedule-visit-loading=form],.loading-skeleton[data-skeleton=form])>.drawer-heading{margin-bottom:0!important}
/* (Not the site drawer: its editor header keeps the loaded form's exact size while it loads, round 8.) */
html body dialog[open]:not(.nx-site-drawer) .drawer-panel:has(.loading-skeleton[data-skeleton=form]):not(:has([data-schedule-visit-loading=form]))>.drawer-heading.dialog-heading{padding-bottom:16px!important}
html body .nx-act-skel .loading-skeleton{padding:0;margin:0;background:none;border:0;box-shadow:none}
html body .nx-act-skel .nx-skel-input{height:48px;width:100%;border-radius:14px}
html body :is(.nx-act-skel,[data-schedule-visit-loading]) .nx-skel-pill{height:28px;border-radius:999px}
html body :is(.nx-act-skel,[data-schedule-visit-loading]) .nx-skel-h3{height:16px;width:140px;margin:0 0 10px;border-radius:5px}
html body :is(.nx-act-skel,[data-schedule-visit-loading]) .nx-skel-node{width:30px;height:30px;border-radius:10px}
html body .nx-act-skel .nx-skel-tag{width:72px;height:24px;border-radius:999px}
html body .nx-act-skel .nx-skel-chip{height:38px;border-radius:999px}
html body .nx-act-skel .nx-team-pick{border:0;padding:0;margin:0 0 20px}
html body .nx-act-skel .nx-team-pick>legend{padding:0;margin:0 0 10px}
html body .nx-act-skel .nx-slot-pair{margin-bottom:16px}
html body .nx-act-skel .nx-dep-copy{gap:4px}
html body [data-schedule-visit-loading=record] .nx-skel-facts{display:grid;gap:14px;padding:16px}

/* ---------- Drawers on the page background (Taylor, 2026-11-16) ----------
   Editor drawers were white, so white cards and light pills lost their edges and the
   drawers felt apart from Nexus. Every drawer now uses the canvas like pages do: cards,
   step rows and chips are white on it, fields are white with a hairline, and a field that
   sits inside a white card is tinted instead. */
html body .drawer-panel{--sheet-bg:var(--sd-canvas);--sd-field:var(--sd-surface);background:var(--sd-canvas)!important}
html body .drawer-panel>:is(.drawer-heading,.dialog-heading){background:var(--sd-canvas)!important}
html body .drawer-panel>.drawer-heading{box-shadow:0 -48px 0 0 var(--sd-canvas),0 1px 0 rgb(var(--c-line)/.8)!important}
html body dialog .drawer-panel.drawer-panel :is(.form-actions,.nx-todo-save,.record-editor-footer){background:var(--sd-canvas)!important}
html body .drawer-panel .onboarding-form .form-actions{box-shadow:0 1px 0 1px var(--sd-canvas)!important}
html body .drawer-panel .nx-step{background:var(--sd-surface)}
html body .drawer-panel .nx-step.is-on{background:var(--sd-surface);border-color:transparent;box-shadow:var(--card-shadow,0 1px 2px rgb(var(--c-shade)/.06),0 8px 24px rgb(var(--c-shade)/.07))}
html body .drawer-panel .nx-step.is-on :is(input[type=date],input[type=time]),html body .drawer-panel :is(.nx-card,.nx-slot-arrive) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea,.select-trigger){background:rgb(var(--c-canvas))!important}
html body .drawer-panel .nx-slot-arrive{background:var(--sd-surface);box-shadow:var(--card-shadow,0 1px 2px rgb(var(--c-shade)/.06),0 8px 24px rgb(var(--c-shade)/.07))}
html body dialog .drawer-panel form label.nx-team-chip:not(:has(input:checked)){background:var(--sd-surface)!important}
html body .drawer-panel :is(.nx-act-crew,.nx-vr-status) .nx-cal-crewchip:not(.is-none){background:var(--sd-surface);box-shadow:0 0 0 1px rgb(var(--c-line))}
[data-stercus-theme=dark] body .drawer-panel .nx-slot-arrive{background:var(--sd-surface)}

/* Drawer skeletons on the canvas: fields, chips and pills load as the white, hairline
   shapes they become; text stays as soft fill bars. */
html body .drawer-panel .loading-skeleton :is(.loading-input,.nx-skel-input,.nx-skel-chip,.nx-skel-pill){background:var(--sd-surface);box-shadow:inset 0 0 0 1px rgb(var(--c-line))}
html body .drawer-panel .loading-skeleton .loading-input{height:48px;border-radius:14px}

/* Select mode: the tick stays a 16 px circle inside one-line week chips; the chip's
   flex row was stretching it into an oval (2026-11-16). */
html body .nx-cal .nx-ev-slim .nx-ev-tick{flex:0 0 16px!important;width:16px!important;height:16px!important;min-width:16px;min-height:0!important;padding:0!important;align-self:center!important;border-radius:50%!important}

/* Field plan week (2026-11-16): sampling is a bar from start to end, across days when it
   runs over, with the start time at the left and the end time at the right. A collection
   that gathers several samples shows ×N. */
html body .nx-cal .nx-ev-slim.is-run .nx-ev-t-end{margin-left:auto;padding-left:6px}
html body .nx-cal .nx-ev-slim.is-run.is-span{justify-content:flex-start}
html body .nx-cal .nx-ev-slim .nx-ev-n{font-size:11px;font-weight:700;color:var(--sd-muted);margin-left:2px}

/* Unavailable days manager (2026-11-16). */
html body .nx-unav-intro{margin:0 0 16px;color:var(--sd-muted);font-size:14px}
html body .nx-unav-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}
html body .nx-unav-status:empty{display:none}
html body .nx-unav-status{margin:4px 0 12px;font-size:14px;color:var(--sd-muted)}
html body .nx-unav-list{list-style:none;margin:0;padding:4px 0!important}
html body .nx-unav-row{display:flex;align-items:center;gap:12px;min-height:56px;padding:10px 8px 10px 16px}
html body .nx-unav-row+.nx-unav-row{border-top:1px solid rgb(var(--c-line))}
html body .nx-unav-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
html body .nx-unav-copy strong{font-size:15px;font-weight:600}
html body .nx-unav-copy>span{font-size:14px;color:var(--sd-muted)}
html body .nx-unav-copy>.nx-unav-src{align-self:flex-start;margin-top:4px;padding:2px 10px;border-radius:999px;background:rgb(var(--c-ink)/.06);font-size:12px;font-weight:600;color:var(--sd-text)}
html body .nx-unav-edit{flex:none;min-height:44px}
html body .nx-unav .nx-vr-section{margin-top:20px}
html body .nx-unav .nx-vr-section h3{margin:0 0 8px;font-size:16px;font-weight:600}
html body .nx-plan-seg.nx-unav-seg{grid-template-columns:repeat(3,1fr)}
html body .nx-unav-where{margin:0 0 20px}
/* Visit drawer: the collection-crew switch sits on one line like the other form switches. */
html body .nx-act-form :is(.nx-act-samecrew,.nx-note-toggle){display:flex!important;flex-direction:row!important;align-items:center;justify-content:space-between;gap:16px;padding:0!important;margin:0 0 16px}
html body .nx-act-form :is(.nx-act-samecrew,.nx-note-toggle)>span{display:flex;flex-direction:column;gap:2px}
html body .nx-act-form :is(.nx-act-samecrew,.nx-note-toggle) small{font-size:13px;color:var(--sd-muted);font-weight:400}
html body .nx-plan-runend{border:0;padding:0;margin:16px 0 0}
html body .nx-plan-runend>legend{padding:0;margin:0 0 8px;font-weight:600}

/* ---------- Field plan review, round 2 (Taylor, 2026-11-16) ---------- */
/* Planner sample sections sit a full section apart; their extra fields sit right under the chips. */
html body .nx-plan-runend{margin:24px 0 0}
html body .nx-plan-runend>.nx-plan-which~.nx-plan-runfield{margin-top:12px}
html body .nx-plan-rchip input:disabled+span{opacity:.45;cursor:not-allowed}
html body .nx-plan-runfield>.field{margin:0}
html body .nx-plan-runend>.nx-plan-note{display:block;margin-top:8px}
/* Unavailable days: the program picker and the add button are separate rows. */
html body .nx-unav>.field{margin:0 0 16px}
/* Sites: a bordered, inset scroll box. Soft fades show at the top and bottom only while there
   is more to scroll (local backgrounds cover the shadows at each end); a thin scrollbar stays
   visible on desktop; long names truncate with the full name on hover or long press. */
html body .drawer-panel .nx-plan-sites{max-height:264px;overflow-y:auto;overscroll-behavior:contain;padding:8px;border:1px solid var(--sd-divider);border-radius:16px;
  background:linear-gradient(var(--sd-surface) 30%,rgb(255 255 255/0)) top/100% 40px no-repeat local,linear-gradient(rgb(255 255 255/0),var(--sd-surface) 70%) bottom/100% 40px no-repeat local,
  radial-gradient(farthest-side at 50% 0,rgb(var(--c-shade)/.14),transparent) top/100% 12px no-repeat scroll,radial-gradient(farthest-side at 50% 100%,rgb(var(--c-shade)/.14),transparent) bottom/100% 12px no-repeat scroll,var(--sd-surface);
  box-shadow:inset 0 1px 2px rgb(var(--c-shade)/.06);scrollbar-width:thin;scrollbar-color:rgb(var(--c-muted)/.45) transparent}
[data-stercus-theme=dark] body .drawer-panel .nx-plan-sites{background:linear-gradient(var(--sd-surface) 30%,rgb(0 0 0/0)) top/100% 40px no-repeat local,linear-gradient(rgb(0 0 0/0),var(--sd-surface) 70%) bottom/100% 40px no-repeat local,radial-gradient(farthest-side at 50% 0,rgb(0 0 0/.5),transparent) top/100% 12px no-repeat scroll,radial-gradient(farthest-side at 50% 100%,rgb(0 0 0/.5),transparent) bottom/100% 12px no-repeat scroll,var(--sd-surface)}
@media (hover:hover) and (pointer:fine){html body .drawer-panel .nx-plan-sites::-webkit-scrollbar{width:10px}html body .drawer-panel .nx-plan-sites::-webkit-scrollbar-thumb{background:rgb(var(--c-muted)/.4);border-radius:999px;border:3px solid var(--sd-surface)}html body .drawer-panel .nx-plan-sites::-webkit-scrollbar-track{background:transparent}}
html body .drawer-panel form .nx-plan-site{min-width:0}
html body .drawer-panel form .nx-plan-site>span{min-width:0;flex:1 1 auto}
html body .drawer-panel form .nx-plan-site.is-full>span{white-space:normal;overflow:visible}
html body .nx-plan-sitecount{margin:8px 0 0;font-size:13px;color:var(--sd-muted);font-variant-numeric:tabular-nums}
/* ---------- One selected state for every selectable chip (Taylor, 2026-11-16) ----------
   People chips, group filters and planner option chips: a 1.5px theme outline, a light theme
   fill, theme-coloured medium text and a check, so the state never rests on colour alone.
   People chips keep their initials and get a small check badge on the avatar's corner. */
html{--nx-sel-ink:var(--sd-action);--nx-sel-fill:color-mix(in srgb,var(--sd-action) 11%,var(--sd-surface))}
html[data-stercus-theme=dark]{--nx-sel-fill:color-mix(in srgb,var(--sd-action) 12%,var(--sd-surface));--nx-sel-ink:color-mix(in srgb,var(--sd-action) 70%,white)}
html body :is(dialog .drawer-panel form label.nx-team-chip:not(#nx-none):has(input:checked),.nx-plan-rchip input:checked+span,.nx-plan-group[aria-pressed=true],.nx-cal-filter button[aria-pressed=true]){border:1px solid var(--nx-sel-ink)!important;box-shadow:inset 0 0 0 .5px var(--nx-sel-ink)!important;background:var(--nx-sel-fill)!important;color:var(--nx-sel-ink)!important;font-weight:500!important}
html body :is(.nx-plan-group,.nx-cal-filter button)[aria-pressed=true]::before{content:"✓";margin-right:8px;font-size:12px}
html body .nx-plan-rchip input:checked+span::before{content:"✓";margin-right:8px;font-size:12px}
html body :is(.nx-plan-group,.nx-cal-filter button)[aria-pressed=true] small{color:inherit!important;opacity:.8}
html body :is(.nx-plan-group,.nx-cal-filter button):focus-visible{outline:2px solid var(--nx-sel-ink);outline-offset:2px}
html body dialog .drawer-panel form label.nx-team-chip:has(input:checked)::after{content:"";position:absolute;left:25px;top:3px;width:15px;height:15px;border-radius:50%;box-sizing:border-box;border:2px solid var(--nx-sel-fill);
  background:var(--nx-sel-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/9px no-repeat;pointer-events:none}
html[data-stercus-theme=dark] body dialog .drawer-panel form label.nx-team-chip:has(input:checked)::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23231b15' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E")}
html body dialog .drawer-panel form label.nx-team-chip:has(input:focus-visible){outline:2px solid var(--nx-sel-ink);outline-offset:2px}
/* ---------- Planner review timeline (Taylor, 2026-11-16) ----------
   A short vertical list: one row per step with its visit icon (the week chips' icons and
   colours) and a few words on when. A thin line joins the icons. */
html body .nx-plan-summary.has-timeline{background:var(--sd-surface);border:1px solid var(--sd-divider);padding:16px;gap:12px}
html body .nx-tl{display:flex;flex-direction:column;gap:8px;min-width:0;color:var(--sd-text)}
html body .nx-plan-summary .nx-tl-head{margin:0;font-size:13px;font-weight:600;color:var(--sd-muted);text-align:left;align-self:stretch}
html body .nx-plan-summary .nx-tl-steps{list-style:none;margin:0!important;padding:0!important;display:flex;flex-direction:column;gap:12px;background:none!important;box-shadow:none!important;border:0!important;border-radius:0!important;max-width:none;width:100%}
html body .nx-tl-step{display:flex;align-items:flex-start;gap:12px;position:relative}
/* The line runs from the bottom of each icon to the top of the next, whatever the row height. */
html body .nx-tl-step:not(:last-child)::after{content:"";position:absolute;left:11px;top:24px;bottom:-12px;width:2px;background:color-mix(in srgb,var(--sd-muted) 40%,transparent)}
html body .nx-tl-ic{width:24px!important;height:24px!important;border-radius:8px!important;margin:0!important;padding:0!important;justify-content:center}
html body .nx-tl-ic .nx-ev-glyph{width:15px!important;height:15px!important}
html body .nx-plan-summary .nx-tl-copy{display:flex;flex-direction:row!important;text-align:left;flex-wrap:wrap;align-items:baseline;column-gap:8px;min-width:0;line-height:24px}
html body .nx-plan-summary .nx-tl-copy strong{display:inline;font-size:15px;font-weight:600;color:var(--sd-text)}
html body .nx-plan-summary .nx-tl-copy>span{display:inline;font-size:14px;color:var(--sd-muted);font-variant-numeric:tabular-nums}
html body .nx-tl-copy em{font-style:normal;color:var(--sd-tile-error,#b3261e);display:inline-flex;align-items:center;gap:4px;margin-left:4px}
html body .nx-tl-copy em .icon{width:13px!important;height:13px!important;color:inherit!important}
html body .nx-tl-sum{font-size:13px;color:var(--sd-muted);font-variant-numeric:tabular-nums}
/* Visit drawers: the icon and site name sit close under the title (Taylor, 2026-11-16: 34px → 14px).
   The heading and body padding shrink rather than the content moving up, so nothing slides under
   the solid heading (a negative margin clipped the icon). Forms, records and skeletons alike. */
html body dialog .drawer-panel:has(>.read-detail-body>:is(.nx-act-form,.nx-act-skel,.nx-vr))>:is(.drawer-heading,.dialog-heading){padding-bottom:6px!important}
html body dialog .drawer-panel>.read-detail-body:has(>:is(.nx-act-form,.nx-act-skel,.nx-vr)){padding-top:8px!important}
/* Confirm dialogs (Discard, Remove…): the hover lift moved a button 1px into the dialog's scroll
   edge and clipped it (Taylor, 2026-11-16). These dialogs are short, so they don't scroll, and their
   buttons change colour on hover without moving. */
html body :is(#discard-dialog,#setup-discard){overflow:visible!important;border-radius:var(--r-dialog)!important}
html body :is(#discard-dialog,#setup-discard) :is(.button,button):hover{transform:none!important}
/* Planner option chips: the radio inside never paints, even when disabled (a grey dot showed on a
   disabled Site window). */
html body .nx-plan-rchip input{-webkit-appearance:none!important;appearance:none!important;opacity:0!important;width:0!important;height:0!important;margin:0!important;border:0!important;padding:0!important}
/* Visit notes (Taylor, 2026-11-16): an "Add a note" switch per planner step and in the visit drawer;
   the note box opens under it. The planner review quotes each step's note under its row. */
html body .nx-step-body .nx-note-toggle{margin-top:16px}
html body .nx-note-box{margin:8px 0 0}
html body .nx-act-form .nx-note-box{margin:-8px 0 16px}
html body dialog .drawer-panel form .nx-note-box textarea{display:block;width:100%;box-sizing:border-box;min-height:88px;padding:12px 16px;border:1px solid var(--sd-divider);border-radius:14px;background:var(--sd-surface);color:var(--sd-text);font:400 16px/1.45 Inter,system-ui,sans-serif;resize:vertical}
html body dialog .drawer-panel form .nx-note-box textarea:focus-visible{outline:2px solid var(--sd-action);outline-offset:2px}
html body .nx-plan-summary .nx-tl-note{flex-basis:100%;display:block;font-size:14px;line-height:1.4;color:var(--sd-text);margin:2px 0 0;overflow-wrap:anywhere}
/* Rotation: each week shows an icon for every kind of visit the group has (counts in the tooltip).
   Narrow cells show two icons and a +N. */
html body .nx-rot-cell{display:flex;align-items:center;justify-content:center;gap:3px;padding:0 4px}
html body .nx-rot-ic{display:inline-flex;flex:none;width:15px;height:15px;color:var(--sd-text)}
html body .nx-rot-ic svg{width:100%;height:100%}
html body .nx-rot-more{display:none;font-size:11px;font-weight:600;color:var(--sd-text)}
@media (max-width:899px){html body .nx-rot-ic.is-extra{display:none}html body .nx-rot-more{display:inline}html body .nx-rot-ic{width:13px;height:13px}}
/* A visit that was just saved glows twice so the change is easy to spot (Taylor, 2026-11-16). */
@keyframes nx-flash{0%,100%{box-shadow:0 0 0 0 transparent}30%,70%{box-shadow:0 0 0 3px color-mix(in srgb,var(--sd-action) 55%,transparent)}}
html body .nx-flash{animation:nx-flash 1.1s var(--ease-out,ease-out) 2}
@media (prefers-reduced-motion:reduce){html body .nx-flash{animation:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--sd-action) 55%,transparent)}}
/* To-dos (Taylor, 2026-11-16): a to-do icon on your own rows, people warnings that can be
   dismissed, and a tighter add/view drawer (Program, To-do, Description, Due date, Related to). */
.icon[data-icon="todo"]{mask-image:url("/redesign/assets/icons/todo.svg");-webkit-mask-image:url("/redesign/assets/icons/todo.svg")}
html body .nx-todo .nx-personal-todo>.nx-todo-symbol{flex:none}
html body .nx-todo-warning>a.nx-todo-open{color:inherit;text-decoration:none}
html body .nx-todo-warning>a.nx-todo-go{display:inline-flex;align-items:center;justify-content:center;width:20px;min-height:32px;color:var(--sd-muted)}
html body .nx-todo-warning .nx-todo-symbol{color:var(--sd-tile-warn,var(--sd-action))}
html body dialog .drawer-panel .nx-todo-form{gap:16px}
html body dialog .drawer-panel .nx-todo-form>label.field{margin:0!important;display:flex;flex-direction:column;gap:8px}
html body .nx-todo-form .nx-todo-optional{font-weight:400;color:var(--sd-muted);font-size:13px;margin-left:4px}
html body .nx-todo-form .nx-todo-hint{display:block;margin:0;font-size:13px;line-height:1.4;font-weight:400;color:var(--sd-muted)}
html body dialog .drawer-panel .nx-todo-form textarea{display:block;width:100%;box-sizing:border-box;min-height:88px;padding:12px 16px;border:1px solid var(--sd-divider);border-radius:14px;background:var(--sd-surface);color:var(--sd-text);font:400 16px/1.45 Inter,system-ui,sans-serif;resize:vertical}
html body .nx-todo-form .nx-todo-associations{display:flex;flex-direction:column;gap:8px;margin-top:8px!important;padding-top:16px;border-top:1px solid var(--sd-divider)}
html body .nx-todo-form .nx-todo-associations h3{margin:0;font-size:15px;font-weight:600}
html body .nx-todo-form .nx-todo-chips:empty{display:none}
html body .nx-todo-save .nx-todo-done-btn{white-space:nowrap}
/* Visits on unavailable days (Taylor, 2026-11-16): one card of rows; each opens the visit on Schedule. */
html body .nx-conflict-intro{margin:0 0 16px;color:var(--sd-muted);font-size:14px;line-height:1.45}
html body .nx-conflict-list{list-style:none;margin:0;padding:0;overflow:hidden}
html body .nx-conflict-list>li+li{border-top:1px solid var(--sd-divider)}
html body .nx-conflict-row{display:flex;align-items:center;gap:12px;padding:14px 16px;color:var(--sd-text);text-decoration:none;min-height:44px}
@media (hover:hover){html body .nx-conflict-row:hover{background:rgb(var(--c-ink)/.03)}}
html body .nx-conflict-row:focus-visible{outline:2px solid var(--sd-action);outline-offset:-2px}
html body .nx-conflict-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
html body .nx-conflict-copy strong{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .nx-conflict-copy>span{font-size:14px;color:var(--sd-muted)}
html body .nx-conflict-copy em{font-style:normal;font-size:13px;color:var(--sd-tile-error,#b3261e);display:inline-flex;align-items:center;gap:4px}
html body .nx-conflict-copy em .icon{width:13px;height:13px;color:inherit}
html body .nx-conflict-row>.icon{width:16px;height:16px;color:var(--sd-muted);flex:none}
/* A To do row that opens a drawer is a button; it looks exactly like the link rows. */
html body .nx-todo button.nx-todo-row{-webkit-appearance:none;appearance:none;width:100%;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;font:inherit;color:inherit;text-align:left;cursor:pointer;display:flex;align-items:center}
html body .nx-todo .nx-card>button.nx-todo-row+*,html body .nx-todo .nx-card>*+button.nx-todo-row{border-top:1px solid var(--sd-border)}
html body .nx-todo button.nx-todo-row:focus-visible{outline:2px solid var(--sd-action);outline-offset:-2px}
/* Week chips stay on one line (Taylor, 2026-11-16, Duo inner screen): a time never wraps under
   the chip; a range that can't fit is swapped for its start time by fitCalendarChips. */
html body .nx-cal .nx-ev.nx-ev-slim{flex-wrap:nowrap!important;min-width:0}
html body .nx-cal .nx-ev-slim .nx-ev-t{white-space:nowrap;flex:0 1 auto!important;min-width:0}
html body .nx-cal .nx-ev-sum{white-space:nowrap;min-width:0;overflow:hidden}
html body .nx-cal .nx-ev-sum.is-compact .nx-ev-l{display:none}
/* The sticky day header gets an opaque backing above it, so rows never show above or behind it
   while scrolling (it sticks below the safe-area top). The card clips it, so it only shows while
   the header is stuck and rows have scrolled past. ::before is the header's own background. */
html body .nx-cal-head::after{content:"";position:absolute;left:0;right:0;bottom:100%;height:100vh;background:var(--sd-canvas);pointer-events:none}
/* Background redraws (fresher data for the open page, Today's live refresh) don't replay entrance
   animations; a real navigation clears the mark and pages animate in again (Taylor, 2026-11-16).
   The just-saved highlight, spinners and loading shapes still animate. */
#workspace[data-quiet-paint] *:not(.nx-flash):not([class*="spin"]):not([class*="loading"]):not([class*="skeleton"]):not([class*="refresh"]):not([aria-busy="true"]),#workspace[data-quiet-paint] *:not(.nx-flash):not([class*="spin"]):not([class*="loading"]):not([class*="skeleton"]):not([class*="refresh"]):not([aria-busy="true"])::before,#workspace[data-quiet-paint] *:not(.nx-flash):not([class*="spin"]):not([class*="loading"]):not([class*="skeleton"]):not([class*="refresh"]):not([aria-busy="true"])::after{animation:none!important}
/* Collapsed rail: the + sits the same distance below search as the tabs sit from each other
   (62px centre to centre); search and the tabs stay where they are (Taylor, 2026-11-16). */
@media (min-width:900px){html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools .nx-rail-add{margin-top:10px}
 html[data-nx-rail=collapsed] body .shell-header .nx-rail-tools{margin-bottom:-10px}}
/* A people warning's detail says what to do, so it gets two lines instead of one. */
html body .nx-todo-warning .nx-todo-copy>span{white-space:normal!important;overflow:hidden;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-overflow:clip}
/* ---------- Today round 2 (2026-11-16): arrivals count, activity icons ---------- */
.icon[data-icon="sample"]{mask-image:url("/redesign/assets/icons/sc-sample.svg");-webkit-mask-image:url("/redesign/assets/icons/sc-sample.svg")}
.nx-arrive-row{flex-wrap:nowrap;align-items:center}
.nx-arrive-row .nx-arrive-status{align-self:flex-start;margin-top:8px}
.nx-arrive-count{flex:none;display:flex;flex-direction:column;align-items:flex-end;padding-right:16px;line-height:1}
.nx-arrive-count b{font-family:var(--font-display,Fraunces,serif);font-size:30px;font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-.5px;color:var(--sd-text)}
.nx-arrive-count small{margin-top:4px;font-size:12px;color:var(--sd-muted)}
.nx-event-icon{position:relative;z-index:1;flex:none;width:28px;height:28px;margin-top:-3px;border-radius:50%;display:grid;place-items:center;color:var(--app,var(--sd-muted));background:color-mix(in srgb,var(--app,var(--sd-muted)) 14%,var(--sd-surface))}
.nx-event-icon .icon{width:14px;height:14px}
.nx-event[data-warn] .nx-event-icon{color:#a8620f;background:color-mix(in srgb,#c27a1e 16%,var(--sd-surface))}
[data-stercus-theme=dark] .nx-event[data-warn] .nx-event-icon{color:#e2a24f}
.nx-event:has(>.nx-event-icon)::before{left:13px}
.nx-event:has(>.nx-event-icon):first-child::before{top:23px}
.nx-event:has(>.nx-event-icon):last-child::before{bottom:calc(100% - 23px)}
.nx-event-skeleton .nx-event-icon{background:rgb(var(--c-line));opacity:.6}

/* ---------- Nexus logo lockup (2026-11-17): glass mark + STERCUS over Nexus ---------- */
body .brand.nexus-brand.nx-lockup{align-items:center;gap:.5em;font-size:22px;line-height:1;text-decoration:none;color:var(--sd-text)}
body .nx-lockup .nx-lockup-mark{flex:none;width:1.75em;height:1.75em;background:url("/redesign/assets/brand/nexus-mark.svg?v=outline") center/contain no-repeat}
[data-stercus-theme=dark] body .nx-lockup .nx-lockup-mark{background-image:url("/redesign/assets/brand/nexus-mark-dark.svg?v=outline")}
/* The logo follows the colour theme (Settings > Appearance). */
html[data-palette=fig] body .nx-lockup .nx-lockup-mark{background-image:url("/redesign/assets/brand/nexus-mark-fig.svg?v=outline")}html[data-palette=fig][data-stercus-theme=dark] body .nx-lockup .nx-lockup-mark{background-image:url("/redesign/assets/brand/nexus-mark-fig-dark.svg?v=outline")}
html[data-palette=harbor] body .nx-lockup .nx-lockup-mark{background-image:url("/redesign/assets/brand/nexus-mark-harbor.svg?v=outline")}html[data-palette=harbor][data-stercus-theme=dark] body .nx-lockup .nx-lockup-mark{background-image:url("/redesign/assets/brand/nexus-mark-harbor-dark.svg?v=outline")}
html[data-palette=cobalt] body .nx-lockup .nx-lockup-mark{background-image:url("/redesign/assets/brand/nexus-mark-cobalt.svg?v=outline")}html[data-palette=cobalt][data-stercus-theme=dark] body .nx-lockup .nx-lockup-mark{background-image:url("/redesign/assets/brand/nexus-mark-cobalt-dark.svg?v=outline")}
body .nx-lockup .nx-lockup-text{display:flex;flex-direction:column;align-items:flex-start;gap:.16em}
body .nx-lockup .nx-lockup-org{font-family:Inter,system-ui,sans-serif;font-size:.42em;font-weight:600;letter-spacing:.22em;text-transform:uppercase;color:var(--sd-muted);line-height:1}
body .nx-lockup .nx-lockup-name{font-family:Inter,system-ui,sans-serif;font-size:1em;font-weight:700;letter-spacing:-.02em;color:var(--sd-text);line-height:1}
body.login-page .brand.nexus-brand.nx-lockup{font-size:28px}

/* ---------- Rail logo, round 2 (Taylor, 2026-11-17): compact mark + Nexus ----------
   Lined up with the nav, measured from the live rail: a nav link has 20px of padding and a
   21px icon, so the icon centre sits 30.5px and the label 53px from the rail's content edge.
   The 34px mark is centred on the icon column and "Nexus" starts at the label line. The rail
   content starts 44px down (48px collapsed); the page title row is centred at 60px, so the
   mark is nudged up to share that line. Collapsed: the mark alone, centred on the icons. */
@media (min-width:900px){
  html body .shell-header .brand.nx-lockup-compact{gap:5.5px;padding:0 0 12px!important;margin:-1px 0 0!important;font-size:27px}
  html body .shell-header .nx-lockup-compact .nx-lockup-mark{width:34px;height:34px;margin-left:13.5px}
  html body .shell-header .nx-lockup-compact .nx-lockup-name{font-size:27px;letter-spacing:-.025em}
  html[data-nx-rail=collapsed] body .shell-header .brand.nx-lockup-compact{display:flex!important;justify-content:center;padding:0 0 12px!important;margin:-5px 0 0!important}
  html[data-nx-rail=collapsed] body .shell-header .nx-lockup-compact .nx-lockup-mark{margin-left:0}
  html[data-nx-rail=collapsed] body .shell-header .nx-lockup-compact .nx-lockup-name{display:none}
  /* the collapsed nav sits at a fixed top (168px); the mark adds its 34px plus the 12px gap */
  html[data-nx-rail=collapsed] body:has(.shell-header .nx-lockup-compact) .dock{top:214px!important}
}

/* ---------- Opening screen (Taylor, 2026-11-17): the glass mark as a spinner ----------
   One bright spoke sweeps clockwise with a fading trail (1.1s); the centre dot stays solid.
   Reduce Motion gets a gentle pulse instead. Used while the workspace starts and while
   sign-in completes; that page's error text shows only if sign-in fails. */
/* "Preparing your workspace" after sign-in: the logo and loading bar fade from Nexus colours into
   the colour theme this browser saved (data-next-palette, set by auth-appearance.js). */
html[data-next-palette] body.nx-opening-screen .nx-lockup .nx-lockup-mark{position:relative;background:none}
html[data-next-palette] body.nx-opening-screen .nx-lockup-mark::before,html[data-next-palette] body.nx-opening-screen .nx-lockup-mark::after{content:"";position:absolute;inset:0;background:url("/redesign/assets/brand/nexus-mark.svg?v=outline") center/contain no-repeat;animation:nx-tint-out .9s cubic-bezier(.22,1,.36,1) .35s forwards}
html[data-next-palette][data-stercus-theme=dark] body.nx-opening-screen .nx-lockup-mark::before{background-image:url("/redesign/assets/brand/nexus-mark-dark.svg?v=outline")}
html[data-next-palette] body.nx-opening-screen .nx-lockup-mark::after{background-image:var(--nx-next-mark);opacity:0;animation-name:nx-tint-in}
html[data-next-palette] body.nx-opening-screen .nx-loader-bar>span{animation:nx-loader-slide .5s cubic-bezier(.45,0,.55,1) infinite alternate,nx-bar-tint .9s cubic-bezier(.22,1,.36,1) .35s forwards}
@keyframes nx-tint-in{to{opacity:1}}@keyframes nx-tint-out{to{opacity:0}}
@keyframes nx-bar-tint{to{background:var(--nx-next-accent)}}
html[data-next-palette=fig]{--nx-next-mark:url("/redesign/assets/brand/nexus-mark-fig.svg?v=outline");--nx-next-accent:#802F58}html[data-next-palette=fig][data-stercus-theme=dark]{--nx-next-mark:url("/redesign/assets/brand/nexus-mark-fig-dark.svg?v=outline");--nx-next-accent:#C76093}
html[data-next-palette=harbor]{--nx-next-mark:url("/redesign/assets/brand/nexus-mark-harbor.svg?v=outline");--nx-next-accent:#16686E}html[data-next-palette=harbor][data-stercus-theme=dark]{--nx-next-mark:url("/redesign/assets/brand/nexus-mark-harbor-dark.svg?v=outline");--nx-next-accent:#2A9298}
html[data-next-palette=cobalt]{--nx-next-mark:url("/redesign/assets/brand/nexus-mark-cobalt.svg?v=outline");--nx-next-accent:#2C52BE}html[data-next-palette=cobalt][data-stercus-theme=dark]{--nx-next-mark:url("/redesign/assets/brand/nexus-mark-cobalt-dark.svg?v=outline");--nx-next-accent:#5C84EC}
@media (prefers-reduced-motion:reduce){html[data-next-palette] body.nx-opening-screen .nx-lockup-mark::before{animation:none;opacity:0}html[data-next-palette] body.nx-opening-screen .nx-lockup-mark::after{animation:none;opacity:1}html[data-next-palette] body.nx-opening-screen .nx-loader-bar>span{animation:nx-opening-pulse 1.2s ease-in-out infinite alternate!important;background:var(--nx-next-accent)}}
.nx-opening{min-height:100dvh;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;padding:24px;text-align:center}
body.nx-opening-screen .login-shell,body.nx-opening-screen .login-container{min-height:100dvh;padding:0;margin:0;width:100%;max-width:none;display:block}
html body.nx-opening-screen #theme-button{display:none!important}
.nx-opening #exchange-progress{display:contents}.nx-opening #exchange-progress[hidden]{display:none}
/* Opening screen v2 (Taylor, 2026-11-17): the brand stays still (lockup), and a plain sliding bar
   shows progress, so the same screen works for every app whatever its logo. */
.nx-opening{gap:0}
html body .nx-lockup.nx-opening-lockup{display:flex;align-items:center;gap:.32em;font-size:40px;line-height:1}
.nx-opening-lockup .nx-lockup-mark{width:1.3em!important;height:1.3em!important}
.nx-opening-lockup .nx-lockup-name{letter-spacing:-.025em!important}
.nx-loader-bar{position:relative;display:block;width:136px;height:4px;margin-top:36px;border-radius:999px;overflow:hidden;background:rgb(var(--c-ink)/.09)}
.nx-loader-bar>span{position:absolute;inset:0 auto 0 0;width:40%;border-radius:inherit;background:var(--sd-action);animation:nx-loader-slide .5s cubic-bezier(.45,0,.55,1) infinite alternate}
[data-stercus-theme=dark] .nx-loader-bar{background:rgb(255 255 255/.1)}
@keyframes nx-loader-slide{from{transform:translateX(0)}to{transform:translateX(150%)}}
@keyframes nx-opening-pulse{0%{opacity:1}100%{opacity:.4}}
.nx-opening-title{margin:14px 0 0;font-family:Inter,system-ui,sans-serif;font-size:15px;font-weight:500;letter-spacing:0;line-height:1.3;color:var(--sd-muted)}
#exchange-progress:not([hidden])~.nx-opening-status{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.nx-opening #exchange-progress[hidden]~.nx-opening-title{margin-top:36px}
@media (max-width:600px){html body .nx-lockup.nx-opening-lockup{font-size:36px}}
@media (prefers-reduced-motion:reduce){
  /* the one exception to the app-wide 'no animation' rule: the bar sits centred and slowly fades */
  html body .nx-loader-bar>span{left:30%;transform:none;animation:nx-opening-pulse 1.2s ease-in-out infinite alternate!important}
}

/* Pull to refresh with the rail (Duo inner, iPad): the page's contents follow the finger inside the
   scroller; the scroller and the rail stay where they are. */
html body #workspace[data-nx-pulling]>*{translate:0 var(--nx-pull,0px)}
html body #workspace[data-nx-pull-anim]>*{transition:translate .34s cubic-bezier(.22,1,.36,1)}
@media (prefers-reduced-motion:reduce){html body #workspace[data-nx-pull-anim]>*{transition:none}}

/* ---------- Sign-in screen (Taylor, 2026-11-17) ----------
   Nexus lockup, "Sign in to your workspace", then one filled action (passkey), the Google pill and the
   email-code link. Passkey and code stay hidden until their back ends ship. */
html body.nx-signin{min-height:100dvh;margin:0;background:radial-gradient(70% 55% at 50% 0%,#FDE7DA 0%,rgb(var(--c-canvas)) 65%) fixed;color:var(--sd-text);font-family:Inter,system-ui,sans-serif}
[data-stercus-theme=dark] body.nx-signin{background:radial-gradient(120% 50% at 50% 0%,#3A2014 0%,rgb(var(--c-canvas)) 60%) fixed}
html body.nx-signin #theme-button{display:none!important}
.nx-signin-shell{min-height:100dvh;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;padding:max(24px,env(safe-area-inset-top)) 28px max(36px,env(safe-area-inset-bottom))}
.nx-signin-body{flex:1;width:min(360px,100%);display:flex;flex-direction:column;justify-content:center;gap:40px}
.nx-signin-head{display:flex;flex-direction:column;align-items:center;gap:22px;text-align:center}
html body .nx-lockup.nx-signin-lockup{display:flex;align-items:center;gap:.32em;margin:0;font-size:40px;line-height:1}
.nx-signin-lockup .nx-lockup-mark{width:1.3em!important;height:1.3em!important}
.nx-signin-titles{display:flex;flex-direction:column;gap:4px}
.nx-signin h1{margin:0;font-family:Inter,system-ui,sans-serif;font-size:20px;font-weight:600;letter-spacing:-.01em;line-height:1.3;color:var(--sd-text)}
.nx-signin-org{margin:0;font-size:15px;color:var(--sd-muted)}
.nx-signin-alert{margin:-16px 0 0;padding:12px 16px;border-radius:14px;font-size:14px;line-height:1.4;text-align:center;background:rgb(var(--c-line)/.55);color:var(--sd-text)}
.nx-signin-actions{display:flex;flex-direction:column;gap:12px}
.nx-signin-primary,.nx-signin-google{box-sizing:border-box;height:54px;border-radius:999px;display:flex;align-items:center;justify-content:center;gap:10px;font:600 16px Inter,system-ui,sans-serif;text-decoration:none;cursor:pointer;transition:transform .15s ease-out,box-shadow .15s ease-out}
.nx-signin-primary{border:0;background:#D9623A;color:#fff;box-shadow:0 6px 16px rgb(212 90 48/.26)}
[data-stercus-theme=dark] .nx-signin-primary{background:#E8774F;color:#1F130C;box-shadow:none}
.nx-signin-primary[hidden],.nx-signin-link[hidden]{display:none}
.nx-signin-google{border:1px solid #E4D8CB;background:#fff;color:#2A201B}
[data-stercus-theme=dark] .nx-signin-google{border-color:#3B2F26;background:#231B15;color:#F3EAE0}
.nx-signin-primary:active,.nx-signin-google:active{transform:scale(.97)}
@media (hover:hover){.nx-signin-google:hover{border-color:#D6C6B5}[data-stercus-theme=dark] .nx-signin-google:hover{border-color:#54443A}.nx-signin-primary:hover{box-shadow:0 8px 20px rgb(212 90 48/.32)}}
.nx-signin-primary:focus-visible,.nx-signin-google:focus-visible,.nx-signin-link:focus-visible{outline:2px solid var(--sd-action);outline-offset:3px}
.nx-signin-link{align-self:center;display:flex;align-items:center;min-height:44px;padding:0 12px;font-size:15px;font-weight:600;color:#B4532A;text-decoration:none}
[data-stercus-theme=dark] .nx-signin-link{color:#F09A74}
/* Email sign-in code (Taylor, 2026-11-17): email step, then six boxes that sign in on the last digit. */
.nx-signin-step{display:flex;flex-direction:column;gap:12px}
html body :is(.nx-signin-actions,.nx-signin-step,.nx-signin-error)[hidden]{display:none}
.nx-signin-field{display:flex;flex-direction:column;gap:8px;text-align:left;font-size:14px;font-weight:600;color:var(--sd-text)}
.nx-signin-field input{box-sizing:border-box;height:52px;padding:0 16px;border:1px solid #E4D8CB;border-radius:14px;background:#fff;color:#2A201B;font:400 16px Inter,system-ui,sans-serif}
[data-stercus-theme=dark] .nx-signin-field input{border-color:#3B2F26;background:#231B15;color:#F3EAE0}
.nx-signin-field input:focus-visible,.nx-code-boxes input:focus-visible{outline:2px solid var(--sd-action);outline-offset:2px}
.nx-code-boxes{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}
.nx-code-boxes input{box-sizing:border-box;width:100%;min-width:0;height:60px;padding:0;border:1px solid #E4D8CB;border-radius:14px;background:#fff;color:#2A201B;text-align:center;font:600 24px/1 Inter,system-ui,sans-serif;font-variant-numeric:tabular-nums;caret-color:var(--sd-action)}
[data-stercus-theme=dark] .nx-code-boxes input{border-color:#3B2F26;background:#231B15;color:#F3EAE0}
.nx-signin-hint{margin:0;font-size:13px;text-align:center;color:var(--sd-muted)}
.nx-signin-error{margin:0;padding:10px 14px;border-radius:12px;font-size:14px;line-height:1.4;text-align:center;background:rgb(194 60 40/.1);color:#9A2F1F}
[data-stercus-theme=dark] .nx-signin-error{background:rgb(240 120 96/.14);color:#F4A28C}
.nx-signin-row{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.nx-signin-step button.nx-signin-link{border:0;background:none;cursor:pointer;font-family:inherit}
.nx-signin-step button.nx-signin-link:disabled{color:var(--sd-muted);cursor:default}
.nx-signin-step[aria-busy] .nx-signin-primary{opacity:.7}
.nx-shake{animation:nx-shake .32s cubic-bezier(.36,.07,.19,.97)}
@keyframes nx-shake{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
@media (prefers-reduced-motion:reduce){.nx-shake{animation:none}}
@media (max-width:380px){.nx-code-boxes{gap:6px}.nx-code-boxes input{height:54px;font-size:22px}}
.nx-signin-foot{margin:0;font-size:13px;line-height:1.5;text-align:center;color:var(--sd-muted)}
@media (max-width:600px){.nx-signin h1{font-size:19px}}
@media (max-height:520px){.nx-signin-body{gap:24px}.nx-signin-head{gap:14px}html body .nx-lockup.nx-signin-lockup{font-size:32px}}

/* ---------- Today rows (Taylor, 2026-11-17) ----------
   One hover colour for every row on Today, in both modes: to-dos, field sites, program tiles and
   Since yesterday. A child action (Dismiss, Done, call, email) keeps its own hover instead. */
:root{--nx-row-hover:rgb(var(--c-ink)/.04)}
[data-stercus-theme=dark]{--nx-row-hover:rgb(255 255 255/.06)}
@media (hover:hover){
html body :is(.nx-todo .nx-todo-row,.nx-collect-list a,.nx-ptile-main,.nx-ptile-tabs a,.nx-event-row):hover{background:var(--nx-row-hover)!important}
html body :is(.nx-todo .nx-todo-row,.nx-collect-list a):has(.nx-todo-dismiss:hover,.nx-todo-quick-done:hover,.nx-ct-btn:hover,a[href^="mailto:"]:hover,a[href^="tel:"]:hover){background:transparent!important}
}
/* Since yesterday: the whole row opens the activity's details. */
html body .nx-events{padding:0}
html body .nx-event{padding:0}
/* First and last rows reach the card's edges, so their highlight fills it top and bottom. */
.nx-timeline .nx-card{overflow:hidden}
.nx-event:first-child>.nx-event-row{padding-top:20px}.nx-event:last-child>.nx-event-row{padding-bottom:20px}
.nx-event-row{display:flex;gap:16px;width:100%;margin:0;padding:12px 20px;border:0;border-radius:0;background:transparent;color:var(--sd-text);font:inherit;text-align:left;cursor:pointer;box-shadow:none;transition:background-color .15s ease-out}
.nx-event-row:focus-visible{outline:2px solid var(--sd-action);outline-offset:-2px}
html body .nx-event:has(>.nx-event-row)::before{left:33px}
html body .nx-event:has(>.nx-event-row):first-child::before{top:31px}
html body .nx-event:has(>.nx-event-row):last-child::before{bottom:calc(100% - 31px)}
.nx-event-row .nx-event-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.nx-event-line{font-size:16px;line-height:22px;color:var(--sd-text);overflow-wrap:anywhere}
.nx-event-who{font-weight:500}
@media (max-width:760px){.nx-event-row{padding:12px 16px}html body .nx-event:has(>.nx-event-row)::before{left:29px}}
.nx-detail .nx-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.94em;letter-spacing:0}
/* To-do drawer: opens at once with a form-shaped skeleton, then the form fades in. */
.nx-todo-skeleton .loading-content{display:flex;flex-direction:column;gap:10px;padding-top:4px}
.nx-todo-skeleton .loading-short{margin-top:10px}.nx-todo-skeleton .loading-short:first-child{margin-top:0}
.nx-todo-skel-field{height:48px;width:100%;border-radius:14px}.nx-todo-skel-area{height:112px;width:100%;border-radius:14px}
.nx-fill-in{animation:nx-fill-in .22s ease-out both}@keyframes nx-fill-in{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.nx-fill-in{animation:none}}
/* Program change: new rows and tiles rise into place, a few at a time. */
#workspace[data-scope-swap] :is(.nx-card>*,.nx-ptile,.nx-collect-list>li,.nx-events>li,.nx-chips>*){animation:nx-scope-in .32s cubic-bezier(.22,1,.36,1) both}
#workspace[data-scope-swap] :is(.nx-collect-list>li,.nx-events>li,.nx-ptile):nth-child(2){animation-delay:.03s}
#workspace[data-scope-swap] :is(.nx-collect-list>li,.nx-events>li,.nx-ptile):nth-child(3){animation-delay:.06s}
#workspace[data-scope-swap] :is(.nx-collect-list>li,.nx-events>li,.nx-ptile):nth-child(n+4){animation-delay:.09s}
@keyframes nx-scope-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){#workspace[data-scope-swap] *{animation:none!important}}
/* Program graphs are visible at rest; only the entrance hides them, so a refresh that switches
   animations off (quiet paint, settled pulses, Reduce Motion) never leaves a tile blank. */
html body .nx-spark{clip-path:none;animation:nx-wipe-in 1.1s cubic-bezier(.45,.05,.25,1) .15s both!important}
@keyframes nx-wipe-in{from{clip-path:inset(-4px 100% -4px -4px)}to{clip-path:inset(-4px -4px -4px -4px)}}
html body .nx-spark .nx-spark-dot{opacity:1;animation:nx-dot-in .25s ease-out 1.2s both!important}
@keyframes nx-dot-in{from{opacity:0}to{opacity:1}}
html body [data-pulse-settled] :is(.nx-spark,.nx-spark .nx-spark-dot){animation:none!important}
html body #workspace[data-quiet-paint] :is(.nx-spark,.nx-spark .nx-spark-dot){animation:none!important}
@media (prefers-reduced-motion:reduce){html body :is(.nx-spark,.nx-spark .nx-spark-dot){animation:none!important}}
/* A graph that has already drawn in this session appears drawn on every later paint (graph-motion.js). */
html body .nx-spark[data-graph-seen],html body .nx-spark[data-graph-seen] .nx-spark-dot,html body .nx-rank[data-graph-seen] .nx-rank-bar>span{animation:none!important}
.nx-sample-ids{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px;max-height:280px;overflow:auto}
.nx-sample-ids li{padding:4px 10px;border-radius:999px;background:rgb(var(--c-line)/.6);font-size:13px;color:var(--sd-text)}
/* In the field today: collections made so far. */
.nx-collect-made{margin:2px 0 0;font-size:13px;color:var(--sd-muted)}
html body .nx-event.nx-event-skeleton{padding:12px 20px}html body .nx-event.nx-event-skeleton:first-child{padding-top:20px}html body .nx-event.nx-event-skeleton:last-child{padding-bottom:20px}html body .nx-event.nx-event-skeleton::before{left:33px}
html body .nx-events>.nx-quiet{padding:20px}
html body .nx-event.nx-event-skeleton:first-child::before{top:31px}html body .nx-event.nx-event-skeleton:last-child::before{bottom:calc(100% - 31px)}

/* Unconfirmed saves (2026-11-17): Nexus confirms a lost reply itself; people see one calm
   note on the editor, never an operation ID or a "Check operation" button. */
.nx-save-note{display:flex;gap:12px;align-items:flex-start;margin:16px 0 0;padding:14px 16px;border-radius:16px;background:rgb(var(--c-line)/.45);color:var(--sd-text)}
.nx-save-note>.icon{flex:none;width:20px;height:20px;margin-top:1px;color:var(--sd-muted)}
.nx-save-note p{margin:0}
.nx-save-note-title{font-size:15px;font-weight:600;line-height:1.35}
.nx-save-note-text{margin-top:2px!important;font-size:14px;line-height:1.45;color:var(--sd-muted);text-wrap:pretty}
.nx-save-note[data-tone=wait]>.icon{animation:nx-save-breathe 2.4s ease-in-out infinite}
.nx-save-note[data-tone=failed]{background:rgb(194 60 40/.09)}
.nx-save-note[data-tone=failed]>.icon,.nx-save-note[data-tone=failed] .nx-save-note-title{color:#9A2F1F}
.nx-save-note[data-tone=attention]{background:rgb(196 132 36/.12)}
.nx-save-note[data-tone=attention]>.icon{color:#8A5A12}
[data-stercus-theme=dark] .nx-save-note[data-tone=failed]{background:rgb(240 120 96/.13)}
[data-stercus-theme=dark] .nx-save-note[data-tone=failed]>.icon,[data-stercus-theme=dark] .nx-save-note[data-tone=failed] .nx-save-note-title{color:#F4A28C}
[data-stercus-theme=dark] .nx-save-note[data-tone=attention]{background:rgb(230 170 70/.14)}
[data-stercus-theme=dark] .nx-save-note[data-tone=attention]>.icon{color:#E8B864}
.nx-text-link{display:inline-flex;align-items:center;min-height:44px;margin:-6px 0 -12px;padding:0;border:0;background:none;font:inherit;font-size:14px;font-weight:600;color:var(--sd-action);cursor:pointer}
.nx-text-link[disabled]{opacity:.5;cursor:default}
@media (hover:hover){.nx-text-link:hover{text-decoration:underline;text-underline-offset:3px}}
.nx-text-link:focus-visible{outline:2px solid var(--sd-focus,currentColor);outline-offset:2px;border-radius:6px}
@keyframes nx-save-breathe{0%,100%{opacity:1}50%{opacity:.45}}
@media (prefers-reduced-motion:reduce){.nx-save-note>.icon{animation:none!important}}
.people-change-attention .nx-text-link{margin:0}

/* Toasts: centered, balanced lines (no lone last word), with the dismiss button offset on the
   left so the text sits in the middle of the pill (Taylor, 2026-11-17). */
html body #toast[popover],body #toast{max-width:min(440px,calc(100% - 32px))}
html body #toast[popover]{padding-left:48px}
/* Closing a parked save is Admin-only; the server enforces it and says so to anyone else. */
.people-change-attention .nx-change-actions{display:flex;flex-wrap:wrap;gap:4px 16px;justify-content:flex-end}
.people-change-attention [data-people-close-operation][data-armed]{color:var(--sd-tile-error)}

/* Search loading (Taylor, 2026-11-17): a first search shows skeleton rows in the result shape;
   refining keeps the results, dimmed, while a small ring spins in the field. */
.nx-search-skeleton{padding:8px}
.nx-search-skel-row{display:flex;align-items:center;gap:12px;padding:10px 8px}
.nx-search-skel-row .nx-skel-dot{flex:none;width:32px;height:32px;border-radius:999px}
.nx-search-skel-row .nx-skel-lines{flex:1;display:grid;gap:6px}
.nx-search-skel-row .nx-skel-lines .loading-shape{height:10px;border-radius:6px}
.nx-search-skel-row .nx-skel-lines .loading-shape:first-child{width:60%}
.nx-search-skel-row .nx-skel-lines .loading-shape:last-child{width:38%}
.nx-search-panel[aria-busy=true]>.nx-search-group{opacity:.5;transition:opacity .15s ease-out}
:is(.nexus-search,.directory-filter-search){position:relative}
:is(.nexus-search[data-searching] .nexus-search-field,[data-searching] .directory-filter-search){position:relative}
/* The spinner takes the search icon's place, centred on the middle of the pill's rounded end
   (Taylor, 2026-11-17: it drew over the icon). A square as tall as the pill, pinned to its left
   end, spins a thin ring about that centre. */
:is(.nexus-search[data-searching] .nexus-search-field,[data-searching] .directory-filter-search)::after{content:"";position:absolute;left:0;top:0;bottom:0;aspect-ratio:1/1;border-radius:999px;background:conic-gradient(var(--sd-action) 0 100deg,rgb(var(--c-line)) 100deg 360deg);-webkit-mask:radial-gradient(circle at center,transparent 6.5px,#000 7px 9px,transparent 9.5px);mask:radial-gradient(circle at center,transparent 6.5px,#000 7px 9px,transparent 9.5px);animation:nx-spin .7s linear infinite;pointer-events:none}
:is(.nexus-search[data-searching] .nexus-search-field,[data-searching] .directory-filter-search)>.icon[data-icon=search]{opacity:0}
[data-searching] .directory-with-sidebar>:not(.directory-filter-sidebar){opacity:.55;transition:opacity .15s ease-out}
@media (prefers-reduced-motion:reduce){:is(.nexus-search[data-searching] .nexus-search-field,[data-searching] .directory-filter-search)::after{animation:none}}

/* ---------- Outline mark and Trace motion (Taylor approved, 2026-11-17) ----------
   Mockup: notes nexus-motion/suite-outline-trace.html ?look=outline, Nexus column. The mark is a
   flat 30% fill plus an app-colour outline; it draws itself on sign-in and loops while loading. */
.nx-trace{display:block;width:100%;height:100%;overflow:visible;color:#D65A3A}
[data-stercus-theme=dark] .nx-trace{color:#F38A60}
.nx-trace rect:nth-child(2){--i:1}.nx-trace rect:nth-child(3){--i:2}
.nx-trace-fill rect{fill:currentColor;fill-opacity:.3}
.nx-trace-line rect{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linejoin:round;stroke-dasharray:170;stroke-dashoffset:0}
html body .nx-lockup .nx-lockup-mark:has(.nx-trace){background:none}
/* Sign-in Trace entrance, about 0.9 s: outlines draw (0.5 s, 0.06 s apart) and stay; the fill comes
   in at 0.32 s; "Nexus" slides in at 0.62 s; the rest rises 12 px from 0.78 s. All tappable at once. */
body.nx-signin .nx-trace-line rect{animation:nx-trace-draw .5s ease-in-out both;animation-delay:calc(var(--i,0) * .06s)}
body.nx-signin .nx-trace-fill rect{animation:nx-trace-fill .35s ease-out both;animation-delay:calc(.32s + var(--i,0) * .06s)}
body.nx-signin .nx-signin-lockup .nx-lockup-name{animation:nx-trace-slide .55s cubic-bezier(.2,.8,.2,1) .62s both}
body.nx-signin .nx-signin-titles{animation:nx-trace-rise .5s cubic-bezier(.2,.8,.2,1) .78s both}
body.nx-signin .nx-signin-actions>:is(.nx-signin-primary,.nx-signin-google){animation:nx-trace-rise .5s cubic-bezier(.2,.8,.2,1) .88s both}
body.nx-signin .nx-signin-actions>.nx-signin-link{animation:nx-trace-rise .5s cubic-bezier(.2,.8,.2,1) .96s both}
body.nx-signin .nx-signin-foot{animation:nx-trace-rise .5s cubic-bezier(.2,.8,.2,1) 1.04s both}
@keyframes nx-trace-draw{from{stroke-dashoffset:170}to{stroke-dashoffset:0}}
@keyframes nx-trace-fill{from{fill-opacity:0}to{fill-opacity:.3}}
@keyframes nx-trace-slide{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}
@keyframes nx-trace-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
/* Opening screens ("Preparing your workspace", app start and sign-in completion): the Trace loop.
   2.4 s: outline draws 0–45%, fill to 30% over 30–60%, both hold to 80%, then fade; bars 0.12 s apart.
   Mark and words are one group in the exact centre of the viewport. */
html body .nx-opening{gap:20px;padding:0 24px}
.nx-opening-mark{display:block;flex:none;width:84px;height:84px}
.nx-opening .nx-trace-line rect{animation:nx-trace-loop 2.4s ease-in-out infinite;animation-delay:calc(var(--i,0) * .12s)}
.nx-opening .nx-trace-fill rect{fill-opacity:0;animation:nx-trace-loop-fill 2.4s ease-in-out infinite;animation-delay:calc(var(--i,0) * .12s)}
@keyframes nx-trace-loop{0%{stroke-dashoffset:170;opacity:1}45%{stroke-dashoffset:0;opacity:1}80%{stroke-dashoffset:0;opacity:1}100%{stroke-dashoffset:0;opacity:0}}
@keyframes nx-trace-loop-fill{0%,30%{fill-opacity:0}60%,80%{fill-opacity:.3}100%{fill-opacity:0}}
html body .nx-opening .nx-opening-title{margin:0;font-family:Inter,system-ui,sans-serif;font-size:17px;font-weight:600;letter-spacing:-.01em;line-height:1.3;color:var(--sd-text)}
html body .nx-opening #exchange-progress[hidden]{display:block}
.nx-opening #exchange-progress[hidden] .nx-trace rect{animation:none;fill-opacity:.3;stroke-dashoffset:0;opacity:1}
html body .nx-opening #exchange-progress[hidden]~.nx-opening-title{margin-top:0}
/* No glow on the opening screen (Taylor, round 8): the plain canvas, in every theme. */
#connected-opening.nx-opening-screen,body.nx-opening-screen{min-height:100dvh;background:rgb(var(--c-canvas))}
/* Inside the app the mark follows the chosen colour theme, like the sidebar mark. */
html[data-palette=fig] .nx-trace{color:#B35480}html[data-palette=fig][data-stercus-theme=dark] .nx-trace{color:#E089B6}
html[data-palette=harbor] .nx-trace{color:#348E94}html[data-palette=harbor][data-stercus-theme=dark] .nx-trace{color:#5FBFC4}
html[data-palette=cobalt] .nx-trace{color:#527CDA}html[data-palette=cobalt][data-stercus-theme=dark] .nx-trace{color:#8DAEF5}
/* After sign-in the mark eases from Nexus colours into the saved theme. */
html[data-next-palette] body.nx-opening-screen .nx-trace{animation:nx-trace-tint .9s cubic-bezier(.22,1,.36,1) .35s forwards}
@keyframes nx-trace-tint{to{color:var(--nx-next-a1)}}
html[data-next-palette=fig]{--nx-next-a1:#B35480}html[data-next-palette=fig][data-stercus-theme=dark]{--nx-next-a1:#E089B6}
html[data-next-palette=harbor]{--nx-next-a1:#348E94}html[data-next-palette=harbor][data-stercus-theme=dark]{--nx-next-a1:#5FBFC4}
html[data-next-palette=cobalt]{--nx-next-a1:#527CDA}html[data-next-palette=cobalt][data-stercus-theme=dark]{--nx-next-a1:#8DAEF5}
@media (prefers-reduced-motion:reduce){
 html body :is(.nx-signin,.nx-opening,.nx-opening-screen) :is(.nx-trace,.nx-trace rect,.nx-lockup-name,.nx-signin-titles,.nx-signin-actions>*,.nx-signin-foot){animation:none!important}
 .nx-opening .nx-trace-fill rect{fill-opacity:.3}
 html[data-next-palette] body.nx-opening-screen .nx-trace{color:var(--nx-next-a1)}
}

/* ---- + (Add) menu, round 5: "Add" caption, plain nouns in groups, inline icons ---- */
html body .lab-add-menu>.nx-add-head{margin:0;padding:6px 16px 2px;font-size:12px;line-height:16px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--sd-muted)}
html body .lab-add-menu>.nx-add-sep{flex:none;height:1px;margin:2px 12px;background:rgb(var(--c-line))}
html body .lab-add-menu>.nx-add-sep[hidden]{display:none}
html body .lab-add-menu .nx-add-glyph{flex:none;width:20px;height:20px;color:var(--sd-action)}
[data-stercus-theme=dark] body .lab-add-menu>.nx-add-sep{background:rgb(255 255 255/.12)}

/* ---------- iPhone Duo cover screen (2026-11-15) ----------
   cover-screen.js sets <html data-screen="cover"> only on the measured cover-screen
   size in portrait. The camera and system status own the top-right corner (about
   86 × 228 px), so nothing tappable stays there. Search and settings sit on the
   title line just left of the camera cutout (it starts about 400 px across), on
   every page (Taylor, 2026-11-15). */
@media (max-width:899px){
  html[data-screen=cover] body .shell-header:has(.nexus-search){display:flex!important;position:absolute!important;top:calc(var(--cover-line) - 22px)!important;right:79px!important;left:auto!important;bottom:auto!important;width:auto!important;height:44px!important;min-height:0!important;padding:0!important;margin:0!important;gap:8px!important;align-items:center!important;background:transparent!important;box-shadow:none!important;border:0!important;z-index:30}
  html[data-screen=cover] body #workspace .page-heading:has(:is([data-program-picker],.loading-program-scope)){flex-wrap:wrap!important;align-items:flex-start}
  html[data-screen=cover] body #workspace .page-heading>.title-actions:has(:is([data-program-picker],.loading-program-scope)){flex:1 0 100%!important;width:100%;display:flex;justify-content:flex-start!important;margin:12px 0 0!important}
  html[data-screen=cover] body #workspace .page-heading [data-program-picker]{flex:0 1 auto!important;width:auto!important;max-width:calc(100vw - 32px - 104px)}
  html[data-screen=cover] body #workspace .page-heading [data-program-picker] [data-program-picker-label]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
  html[data-screen=cover] body #workspace .loading-destination-with-scope>.page-heading>.loading-program-actions{margin:12px 0 0!important}
  html[data-screen=cover] body #workspace .page-heading .loading-program-scope{flex:0 0 auto!important;width:167px!important;height:44px!important;max-width:calc(100vw - 32px - 104px)}
  /* Title lines centre on the camera cutout itself (Taylor, 2026-11-15). The black
     pill runs 27–133 px, but below about 75 px it is Live Activity content; the
     cutout is 27–75 px. Taylor tuned the line to 47 px (4 px above its middle).
     Page titles (34 px line) start at 30 px; a page that opens with a back link
     (44 px) and drawer title rows (44 px: close, avatar, name) start at 25 px. */
  html[data-screen=cover]{--cover-line:47px}
  html[data-screen=cover] body #workspace{padding-top:30px!important}
  html[data-screen=cover] body #workspace:has(.setup-breadcrumb){padding-top:25px!important}
  html[data-screen=cover] body dialog .drawer-panel:not(#nx-cover)>:is(.drawer-heading,.dialog-heading){padding-top:25px!important;align-items:center!important;min-height:0!important;height:auto!important;max-height:none!important;flex-shrink:0!important}
  html[data-screen=cover] body dialog .drawer-panel:not(#nx-cover)>:is(.drawer-heading,.dialog-heading)>:first-child{display:flex;align-items:center;min-height:44px}
  html[data-screen=cover] body dialog .drawer-panel:not(#nx-cover)>:is(.drawer-heading,.dialog-heading) .close{margin-block:0!important;align-self:center!important}
  html[data-screen=cover] body dialog .drawer-panel.nx-editor:not(#nx-cover)>:is(.drawer-heading,.dialog-heading) h2{translate:0 -2px}
  /* the title wraps before search and settings; the rest of the heading before the camera */
  html[data-screen=cover] body #workspace .page-heading{padding-right:102px!important}
  html[data-screen=cover] body #workspace h1{max-width:calc(100vw - 199px)!important;box-sizing:border-box}
  html[data-screen=cover] body #workspace .setup-breadcrumb{padding-right:183px;box-sizing:border-box}
  /* search opens across the title line, stopping short of the camera */
  html[data-screen=cover] body[data-lab-search-open] .shell-header:has(.nexus-search){left:16px!important;right:79px!important;background:var(--sd-canvas)!important}
  html[data-screen=cover] body[data-lab-search-open] #workspace .page-heading>:first-child{visibility:hidden}
}


/* Per-person identity hues for initial circles (avatar-hue.js). Each pair is
   at least 5.8:1 in light and dark. Forced colors keeps the system pair. */
:root{--av-rose-bg:246 224 236;--av-rose-ink:138 44 96;--av-amber-bg:248 233 200;--av-amber-ink:122 78 12;--av-sage-bg:223 236 218;--av-sage-ink:58 98 52;--av-teal-bg:212 236 234;--av-teal-ink:22 96 96;--av-plum-bg:234 224 244;--av-plum-ink:92 58 140;--av-slate-bg:224 228 234;--av-slate-ink:64 74 92;--av-sky-bg:214 232 248;--av-sky-ink:26 86 140;}
:root[data-stercus-theme=dark]{--av-rose-bg:66 34 52;--av-rose-ink:240 196 222;--av-amber-bg:72 56 26;--av-amber-ink:246 216 160;--av-sage-bg:40 60 38;--av-sage-ink:196 226 186;--av-teal-bg:24 60 60;--av-teal-ink:176 228 224;--av-plum-bg:52 42 74;--av-plum-ink:214 200 246;--av-slate-bg:44 48 56;--av-slate-ink:208 214 226;--av-sky-bg:24 48 72;--av-sky-ink:180 214 246;}
body :is(.lab-person-avatar,.person-initials,.nx-art-av,.nx-sc-av)[data-hue=rose]{background:rgb(var(--av-rose-bg))!important;color:rgb(var(--av-rose-ink))!important;box-shadow:none}
body :is(.lab-person-avatar,.person-initials,.nx-art-av,.nx-sc-av)[data-hue=amber]{background:rgb(var(--av-amber-bg))!important;color:rgb(var(--av-amber-ink))!important;box-shadow:none}
body :is(.lab-person-avatar,.person-initials,.nx-art-av,.nx-sc-av)[data-hue=sage]{background:rgb(var(--av-sage-bg))!important;color:rgb(var(--av-sage-ink))!important;box-shadow:none}
body :is(.lab-person-avatar,.person-initials,.nx-art-av,.nx-sc-av)[data-hue=teal]{background:rgb(var(--av-teal-bg))!important;color:rgb(var(--av-teal-ink))!important;box-shadow:none}
body :is(.lab-person-avatar,.person-initials,.nx-art-av,.nx-sc-av)[data-hue=plum]{background:rgb(var(--av-plum-bg))!important;color:rgb(var(--av-plum-ink))!important;box-shadow:none}
body :is(.lab-person-avatar,.person-initials,.nx-art-av,.nx-sc-av)[data-hue=slate]{background:rgb(var(--av-slate-bg))!important;color:rgb(var(--av-slate-ink))!important;box-shadow:none}
body :is(.lab-person-avatar,.person-initials,.nx-art-av,.nx-sc-av)[data-hue=sky]{background:rgb(var(--av-sky-bg))!important;color:rgb(var(--av-sky-ink))!important;box-shadow:none}
@media(forced-colors:active){body :is(.lab-person-avatar,.person-initials,.nx-art-av,.nx-sc-av)[data-hue]{background:Canvas!important;color:CanvasText!important;border:1px solid CanvasText}}

/* Week chips are single lines now (compact week, 2026-11-15); see "Compact schedule week" below. */
.nx-sc-avs>.nx-sc-more{margin-left:4px;font-size:12px;font-weight:700;color:var(--sd-muted);font-variant-numeric:tabular-nums}
/* Program pagers: full 44px touch targets, the same size as the app's other buttons. */
body #workspace .pager-controls{gap:8px}
body #workspace .pager-controls .button.icon-button,body #workspace .program-sites-footer .pager-controls .button{width:44px;min-width:44px;height:44px;min-height:44px;padding:0!important;border-radius:999px}
body #workspace .pager-controls .button.icon-button .icon{width:18px;height:18px}
body #workspace .program-sites-footer>[data-program-action=import]{min-height:44px}
.people-profile-title{margin:0 0 4px;font-size:14px;color:var(--sd-muted);overflow-wrap:anywhere}
/* Row overflow (Taylor, 2026-11-17): hidden originals and the round glass More button + menu. */
html body [data-overflowed]{display:none!important}
html body .nx-overflow{display:inline-flex;flex:none;margin-left:0}html body .nx-overflow[hidden]{display:none!important}
html body .directory-filter-chips>.nx-overflow,html body .nx-section-head>.nx-overflow{margin-left:0}
html body .nx-overflow-btn{width:44px;height:44px;min-height:44px;padding:0;border-radius:999px;display:grid;place-items:center;color:var(--sd-text);background:rgb(var(--c-surface)/.58);-webkit-backdrop-filter:blur(22px) saturate(1.8);backdrop-filter:blur(22px) saturate(1.8);border:1px solid rgb(255 255 255/.5);box-shadow:inset 0 1px 0 rgb(255 255 255/.75),0 6px 20px rgb(var(--c-shade)/.1);cursor:pointer;transition:scale .15s cubic-bezier(.22,1,.36,1)}
html body .nx-overflow-btn:active{scale:.94}html body .nx-overflow-btn .icon{width:20px;height:20px}
html body .nx-overflow-btn[aria-expanded=true]{background:rgb(var(--c-surface)/.8)}
[data-stercus-theme=dark] body .nx-overflow-btn{background:rgb(var(--c-surface)/.55);border-color:rgb(255 255 255/.1);box-shadow:inset 0 1px 0 rgb(255 255 255/.14),0 6px 20px rgb(0 0 0/.3)}
html body .nx-overflow-menu{position:fixed;inset:auto;right:auto;bottom:auto;height:auto;max-height:calc(100dvh - 24px);overflow:auto;align-content:start;margin:0;z-index:2147483000;min-width:220px;max-width:min(320px,calc(100vw - 24px));padding:6px;border-radius:18px;border:1px solid var(--sd-divider);background:rgb(var(--c-surface));color:var(--sd-text);box-shadow:0 12px 40px rgb(var(--c-shade)/.18);display:grid;gap:2px}
html body .nx-overflow-menu[hidden]{display:none}
html body .nx-overflow-item{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:10px 14px;border:0;border-radius:12px;background:transparent;color:inherit;font:inherit;font-size:15px;font-weight:500;text-align:left;cursor:pointer;white-space:nowrap}
html body .nx-overflow-item .icon{width:18px;height:18px;flex:none;color:var(--sd-muted)}
html body .nx-overflow-item:disabled{opacity:.45;cursor:default}
html body .nx-overflow-item:focus-visible{outline:2px solid rgb(var(--c-brand));outline-offset:-2px}
@media (hover:hover){html body .nx-overflow-item:not(:disabled):hover{background:var(--sd-selected)}}
[data-stercus-theme=dark] body .nx-overflow-menu{box-shadow:0 12px 40px rgb(0 0 0/.45)}
@media (prefers-reduced-transparency:reduce){html body .nx-overflow-btn{background:rgb(var(--c-surface));-webkit-backdrop-filter:none;backdrop-filter:none}}
@media (prefers-reduced-motion:reduce){html body .nx-overflow-btn{transition:none}}
/* A picker beside the More button gives up width (and truncates its label) before anything wraps. */
html body .title-actions:has(>.nx-overflow:not([hidden])){flex-wrap:nowrap;min-width:0;max-width:100%}
html body .title-actions:has(>.nx-overflow:not([hidden]))>details.nx-program-picker{flex:0 1 auto;min-width:0}
html body .title-actions:has(.nx-overflow:not([hidden])){flex-wrap:nowrap;min-width:0}
html body .title-actions:has(.nx-overflow:not([hidden])) details.nx-program-picker{flex:0 1 auto;min-width:96px}
/* One scale on large touch screens: the Duo inner screen, tablets (Taylor, 2026-11-17: sizes
   varied by page and Sites rows looked huge). Every list row: 64px+ tall, 16px/600 title, 14px
   secondary line, 36px leading tile; page titles 28px. Chosen by both sides of the screen (short
   side 600+, long side 761+), not its width, so turning the device never changes text size
   (round 9: Duo portrait was 15/13/28, landscape 16/14/32). Phones stay out either way round. */
@media (pointer:coarse) and (min-width:761px) and (min-height:600px),(pointer:coarse) and (min-width:600px) and (min-height:761px){
 html body #workspace :is(.lab-record-row,.resource-row,.directory-row,.grouped-person-row,.setup-list-item,.overview-recent-row,.nx-site-person-row,.lab-settings-list a){min-height:64px;padding-top:12px;padding-bottom:12px;gap:12px}
 html body #workspace :is(.lab-record-row,.resource-row,.directory-row,.grouped-person-row,.setup-list-item,.overview-recent-row,.nx-site-person-row) :is(strong,.row-title,.resource-title){font-size:16px;line-height:1.35;font-weight:600}
 html body #workspace :is(.lab-record-row,.resource-row,.directory-row,.grouped-person-row,.setup-list-item,.overview-recent-row,.nx-site-person-row) :is(small,.small,.muted,p,span:not(.icon):not(strong *)){font-size:14px;line-height:1.4}
 html body #workspace :is(.lab-record-row,.resource-row,.setup-list-item)>:is(.lab-record-symbol,.resource-icon,.setup-icon){width:36px;height:36px;min-width:36px;border-radius:10px}
 html body #workspace :is(.nx-todo-row,.nx-collect-list a,.nx-attn-list li,.nx-arrive-row){min-height:56px}
 html body #workspace :is(.nx-todo-copy,.nx-collect-copy) strong{font-size:16px}
 html body #workspace :is(.nx-todo-copy,.nx-collect-copy)>span{font-size:14px}
 html body #workspace .page-heading h1,html body #workspace .nx-today-heading h1{font-size:28px;line-height:34px}
 html body #workspace :is(.nx-section-head h2,.section-heading h2,.overview-section-heading h2){font-size:17px;line-height:24px}
}
/* Search on in-between widths (Duo inner): a compact card under the pill. */
html body .nx-search-panel[data-mid]:has(>.nx-search-group){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:8px;align-items:start;padding:8px 8px 12px}
html body .nx-search-panel[data-mid]>.nx-search-group+.nx-search-group{margin-top:0;padding-top:0;border-top:0}
html body .nx-search-panel[data-mid]>.nx-search-group:first-child:not(:only-child){grid-column:1;grid-row:1/span 4}
html body .nx-search-panel[data-mid]>.nx-search-group:not(:first-child){grid-column:2}
html body .nx-search-panel[data-mid]>.nx-search-group:nth-child(n+3){margin-top:4px;padding-top:4px;border-top:1px solid var(--sd-border)}
html body .nx-search-panel[data-mid] .nx-search-row>.icon{margin:0 5px}
html body .nx-search-panel[data-mid]>.nx-search-group:only-child{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:8px}
html body .nx-search-panel[data-mid]>.nx-search-group:only-child>.nx-search-label{grid-column:1/-1}
html body .nx-search-panel[data-mid] .nx-search-row{min-height:56px;padding:8px 12px}
html body .nx-search-panel[data-mid] .nx-search-copy strong{font-size:15px}
html body .nx-search-panel[data-mid] .nx-search-copy span{font-size:13px}
/* An empty page subtitle takes no space. */
html body #workspace .page-heading p:empty{display:none}
/* Below 900px People's Import and Add person live in the + menu, so their empty row takes no space
   (Central review, 2026-11-18: big gap under the title). */
@media (max-width:899px){html body #workspace .people-directory-proposal .page-heading>.title-actions:not(:has(.nx-overflow:not([hidden]))){display:none}}
html body #workspace .pager[hidden]{display:none!important}
/* Wide People filter bar: search gives up width before anything wraps; overflow joins the line. */
@media (min-width:900px){
 html body .people-directory-proposal .directory-filter-content{flex-wrap:nowrap;align-items:center}
 html body .people-directory-proposal .directory-filter-content .directory-filter-search{flex:1 1 180px;min-width:140px}
 html body .people-directory-proposal .directory-filter-content :is(.directory-filter-group,.directory-filter-footer,.nx-overflow){flex:none}
 html body .people-directory-proposal .directory-filter-footer .text-button{white-space:nowrap}
}
/* Schedule at in-between widths (Duo inner, tablets; Taylor, 2026-11-18). Nothing is clipped:
   - the "updated by" line drops under the week switcher instead of running into the corner;
   - the visit legend wraps as compact chips instead of scrolling off the edge;
   - group crew chips wrap onto a second line instead of scrolling away. */
@media (max-width:1199px){
 html body .nx-sc-nav{flex-wrap:wrap;row-gap:6px}
 html body .nx-sc-nav>.nx-sc-navside{flex:1 1 100%;min-width:0;justify-content:space-between}
 html body .nx-sc-nav .nx-sc-updated{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
html body .nx-calendar>.nx-cal-legend{flex-wrap:wrap!important;overflow:visible!important;gap:6px 14px;-webkit-mask-image:none!important;mask-image:none!important}
html body .nx-calendar>.nx-cal-legend>*{flex:none;white-space:nowrap}
html body .nx-cal-group .nx-cal-crew{flex-wrap:wrap!important;overflow:visible!important;justify-content:flex-end;row-gap:6px;-webkit-mask-image:none!important;mask-image:none!important}
html body .nx-cal-group .nx-cal-crew>:first-child{margin-left:0}
/* Header buttons never break their label onto two lines; a row that is too tight sends quiet
   buttons to More instead (Taylor, 2026-11-18: Schedule visits wrapped after rotating). */
html body .title-actions :is(.button,.text-button){white-space:nowrap}
/* Sidebar logo: the outline mark drawn inline (no image swap), in the colour theme's brand colour.
   Its draw-in runs once per session (brand-trace.js). */
html body .shell-header .nx-lockup-mark:has(.nx-trace){background:none}
html body .shell-header .nx-lockup-mark .nx-trace{color:rgb(var(--c-brand))}
html body .shell-header .nx-lockup-mark.is-tracing .nx-trace-line rect{animation:nx-trace-draw .5s ease-in-out both;animation-delay:calc(var(--i,0) * .06s)}
html body .shell-header .nx-lockup-mark.is-tracing .nx-trace-fill rect{animation:nx-trace-fill .35s ease-out both;animation-delay:calc(.32s + var(--i,0) * .06s)}
@media (prefers-reduced-motion:reduce){html body .shell-header .nx-lockup-mark .nx-trace rect{animation:none!important}}
/* Until the sidebar knows whether it's collapsed, its logo isn't shown, so it never jumps. */
@media (min-width:900px){html:not([data-nx-rail]) body .shell-header .nx-lockup{visibility:hidden}}
/* Crew face piles: overlap only the ring, so both people's initials read (Central review,
   2026-11-18: "DR" showed as "D" under the front face). */
html body .nx-sc-avs .nx-sc-av+.nx-sc-av{margin-left:-3px!important}
/* A filter search that has given up width ends its placeholder with an ellipsis, never a hard cut. */
html body .directory-filter-search input{text-overflow:ellipsis}
/* Person page polish (Central review, 2026-11-18) */
/* Connected sign-ins: one row per app, name left, status right, 44px, divided. */
html body .people-management .people-support-connection{min-height:44px;padding:0;gap:12px;font-size:15px;border-bottom:1px solid var(--sd-divider)}
html body .people-management .people-support-connection:has(+ :not(.people-support-connection)),html body .people-management .people-support-connection:last-child{border-bottom:0}
html body .people-management .people-support-connection>span:first-child{font-weight:500;color:var(--sd-text)}
html body .people-management .people-support-connection>span+span{font-size:13px;color:var(--sd-muted)}
/* Security facts read as separate facts: "✓ MFA required · 1 passkey". */
html body .people-management .people-security-facts>span{gap:8px}
html body .people-management .people-security-facts>span+span::before{content:"·";color:var(--sd-muted);margin-right:0}
/* Account actions: quiet pills share one row when they fit; Revoke access sits apart below. */
html body .people-management .people-access-secondary{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
html body .people-management .people-access-secondary>.button{flex:0 0 auto;width:auto;min-height:44px;padding:0 14px;font-size:15px;white-space:nowrap}
html body .people-management .people-access-secondary>.people-revoke-access{flex:1 0 100%;justify-content:flex-start;padding-inline:4px;margin-top:4px;background:none}
/* One heading style for the lower sections. */
html body .people-management :is(.people-support-section h4,.people-support-references>summary){margin:20px 0 8px;font:600 15px/1.35 Inter,system-ui,sans-serif;letter-spacing:0;color:var(--sd-text)}
/* The person activity slot takes no space until it has something to show (Central review: 80px gap). */
html body .people-management [data-connected-person-activity]:empty{display:none}
html body .people-management .people-access-section:has(+ .people-technical, + [data-connected-person-activity]:empty){margin-bottom:24px}
html body .people-management .people-technical{margin-top:0}
/* Round 5: every app card shows its status from the one shared set, Active included, so the four
   cards read the same way (Taylor, 2026-11-18). */
.nx-access-summary .people-access-status[data-access-state="active"]{display:inline-flex}
.nx-access-body-bare{padding-top:4px}
.nx-access-body-bare .people-access-primary{padding-top:0}

/* Date and time fields, everywhere (round 5, Taylor's screenshot 2: the date sat
   too high). WebKit (Safari, iPhone, iPad) draws a date's text at the top of any
   spare height inside the control. Setup forms already use one box (the
   .setup-native-input label is the field and the bare input inside is exactly one
   line, centred). Every other date or time input gets the same zero-spare-height
   box: its content is exactly one 24px line, with 12px padding and a 1px border
   making the usual 50px field. */
html body input:is([type=date],[type=time],[type=datetime-local],[type=month]):not(.setup-native-input>*){box-sizing:border-box!important;height:auto!important;min-height:0!important;padding-top:12px!important;padding-bottom:12px!important;line-height:24px!important;font-size:16px!important}
html body input:is([type=date],[type=time],[type=datetime-local],[type=month])::-webkit-date-and-time-value{margin:0;min-height:24px;line-height:24px;text-align:left}
html body input:is([type=date],[type=time],[type=datetime-local],[type=month])::-webkit-datetime-edit{padding:0;line-height:24px}
html body input:is([type=date],[type=time],[type=datetime-local],[type=month])::-webkit-datetime-edit-fields-wrapper{padding:0}
html body input:is([type=date],[type=time],[type=datetime-local],[type=month])::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}
html body input:is([type=date],[type=time],[type=datetime-local],[type=month])::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}
html body input:is([type=date],[type=time],[type=datetime-local],[type=month])::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}
html body input:is([type=date],[type=time],[type=datetime-local],[type=month])::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}
html body input:is([type=date],[type=time],[type=datetime-local],[type=month])::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}
html body input:is([type=date],[type=time],[type=datetime-local],[type=month])::-webkit-datetime-edit-ampm-field{padding-top:0;padding-bottom:0}
/* Outside the stepped flows too (Edit site, Edit program): the label is the one box, centred. */
html body .setup-native-input{align-items:center!important;font-size:16px!important}
/* Round 5: Today's skeleton draws the greeting as a bar the height of the title line. */

/* ---------- Schedule: Visits filter chip and status key (Taylor, 2026-11-18, round 5) ----------
   The visit types left the key for a "Visits" chip in the filter row. Wide screens: search, the
   chips, then Select on one line. Narrow screens: search and Select, with the chips on their own
   line under them. Nothing wraps or truncates. When
   the line runs short, Select moves into the round ••• More (row-overflow.js; .nx-sc-searchline
   is in ROWS); the chips always stay whole. The key under the calendar is plain status
   markers, never buttons. */
html body .nx-sc-findrow{display:flex;align-items:center;flex-wrap:nowrap;gap:8px}
html body .nx-sc-searchline{display:contents}
html body .nx-sc-findrow .nx-sc-find{order:0;flex:0 1 340px;min-width:200px}
html body .nx-sc-filters{order:1;display:flex;align-items:center;gap:8px;flex:none;min-width:0}
html body .nx-sc-searchline>.nx-sc-selbtn{order:2;margin-left:auto;min-height:44px;flex:none;white-space:nowrap}
html body .nx-sc-searchline>.nx-overflow{order:3;margin-left:auto}
html body .nx-sc-filters>.nx-dropchip{flex:none}
html body .nx-sc-filters>.nx-dropchip>summary{white-space:nowrap}
/* Narrow screens: search and Select on the first line, the chips on their own line under it. */
@media(max-width:899px){html body .nx-sc-findrow{flex-direction:column;align-items:stretch}html body .nx-sc-searchline{display:flex;align-items:center;gap:8px;min-width:0}html body .nx-sc-findrow .nx-sc-find{flex:1 1 auto;min-width:160px}html body .nx-sc-searchline>.nx-sc-selbtn{margin-left:0}}
/* The menu: a header with Show all, then one 44px row per type: icon tile, name, check. */
html body .nx-typechip-menu{min-width:272px;max-height:none;padding:4px 8px 8px}
html body .nx-typechip-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:0 0 0 12px;font-size:13px;font-weight:600;color:var(--sd-muted)}
html body .nx-typechip-menu .nx-typechip-all{width:auto;min-height:44px;padding:0 12px;justify-content:center;color:rgb(var(--c-brand));font-weight:600}
html body .nx-typechip-menu .nx-typechip-all:disabled{visibility:hidden}
html body .nx-typechip-menu [role=menuitemcheckbox]{justify-content:flex-start;gap:12px;min-height:44px;padding:6px 12px 6px 8px;color:var(--sd-text);font-weight:500}
html body .nx-typechip-menu [role=menuitemcheckbox][aria-checked]{color:var(--sd-text);font-weight:500}
html body .nx-typechip-menu [role=menuitemcheckbox]>.icon{margin-left:auto;flex:none}
html body .nx-typechip-menu .nx-ev-mini{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:9px;transition:opacity .15s ease-out}
html body .nx-typechip-menu .nx-ev-mini>.nx-legend-glyph{display:block;width:16px;height:16px;color:color-mix(in srgb,var(--pc,rgb(var(--c-brand))) 80%,var(--sd-text))}
html body .nx-typechip-l{display:flex;flex-direction:column;gap:2px;min-width:0;line-height:1.25}
/* A type that's off: its icon fades and its name goes quiet; the check leaves. */
html body .nx-typechip-menu [aria-checked=false]>.nx-ev-mini{opacity:.4}
html body .nx-typechip-menu [aria-checked=false] .nx-typechip-l{color:var(--sd-muted)}
@media(prefers-reduced-motion:reduce){html body .nx-typechip-menu .nx-ev-mini{transition:none}}
/* The key sits under the calendar again, short enough to wrap without scrolling. */
html body .nx-calendar>.nx-cal-legend{margin:16px 4px 0;flex-wrap:wrap!important;overflow:visible!important;gap:8px 16px;-webkit-mask-image:none!important;mask-image:none!important}
html body .nx-calendar>.nx-cal-legend>*{flex:none;white-space:nowrap}
/* With no room below, a filter chip's menu opens upward (field-schedule.js adds .is-up on open). */
html body .nx-sc-filters>.nx-dropchip.is-up>.nx-dropchip-menu{top:auto;bottom:calc(100% + 6px);transform-origin:bottom left;translate:0 6px}
html body .nx-sc-filters>.nx-dropchip.is-up[open]>.nx-dropchip-menu{translate:0 0}
@starting-style{html body .nx-sc-filters>.nx-dropchip.is-up[open]>.nx-dropchip-menu{translate:0 6px}}
/* ---------- Since yesterday: rows without a details button (round 5c, 2026-11-18) ----------
   Activity without a source opens nothing, so its row is a plain list item. The full-bleed
   rule above (.nx-events/.nx-event padding 0) left those rows against the card's top edge and
   close together. They now sit like the clickable rows: the To do card's inner padding (20px
   at the edges, 16px on phones) and 12px above and below each event. */
html body .nx-timeline .nx-event:not(:has(>.nx-event-row)){padding:12px 20px}
html body .nx-timeline .nx-event:not(:has(>.nx-event-row)):first-child{padding-top:20px}
html body .nx-timeline .nx-event:not(:has(>.nx-event-row)):last-child{padding-bottom:20px}
html body .nx-timeline .nx-event:not(:has(>.nx-event-row)):has(>.nx-event-icon)::before{left:33px}
html body .nx-timeline .nx-event:not(:has(>.nx-event-row)):has(>.nx-event-icon):first-child::before{top:31px}
html body .nx-timeline .nx-event:not(:has(>.nx-event-row)):has(>.nx-event-icon):last-child::before{bottom:calc(100% - 31px)}
@media (max-width:760px){
 html body .nx-timeline .nx-event:not(:has(>.nx-event-row)){padding-inline:16px}
 html body .nx-timeline .nx-event:not(:has(>.nx-event-row)):has(>.nx-event-icon)::before{left:29px}
}
/* ---------- end Since yesterday rows ---------- */
/* ---------- Schedule Rotation on narrow screens (Central review, 2026-11-18) ----------
   The 78px label column let "No sampling group" run under the week cells. Under 900px each
   group's name (with its program dot and program or site count) has its own line above its
   cells, and the eight weeks share the card's width, so every column lines up with the week
   header and nothing scrolls sideways. Under 600px a cell shows its first visit icon and "+N". */
@media(max-width:899px){
 html body .nx-rot-card{overflow-x:visible}
 html body .nx-rot-row{grid-template-columns:repeat(var(--weeks),minmax(0,1fr));column-gap:4px;row-gap:6px}
 html body .nx-rot-head>.nx-rot-name{display:none}
 html body .nx-rot-row:not(.nx-rot-head)>.nx-rot-name{grid-column:1/-1;display:flex;align-items:baseline;gap:8px;min-width:0;padding:0 2px;font-size:13px;line-height:18px}
 html body .nx-rot-row:not(.nx-rot-head)>.nx-rot-name .nx-cal-dot{display:inline-block;flex:none;align-self:center}
 html body .nx-rot-row:not(.nx-rot-head)>.nx-rot-name small{display:block;min-width:0;font-size:12px}
 html body .nx-rot-row:not(.nx-rot-head)+.nx-rot-row{margin-top:8px}
 html body .nx-rot-cell{min-width:0;height:32px}
 html body .nx-rot-wk{min-width:0}
}
html body .nx-rot-more1{display:none;font-size:11px;font-weight:600;color:var(--sd-text)}
@media(max-width:599px){html body .nx-rot-ic~.nx-rot-ic,html body .nx-rot-more{display:none!important}html body .nx-rot-more1{display:inline}}
/* Mid widths (the Duo inner screen): two icons and "+N", so a busy week never clips its cell. */
@media(min-width:900px) and (max-width:1199px){html body .nx-rot-ic.is-extra{display:none}html body .nx-rot-more{display:inline}}
/* Narrow screens: the key's divider becomes a line break, so program colours and status markers
   each start their own line instead of a stray bar opening a line. */
@media(max-width:899px){html body .nx-calendar>.nx-cal-legend>.nx-cal-sep{flex:0 0 100%;width:auto;height:0;background:none}}
/* ---------- Schedule: compact contract progress under the calendar (Taylor, 2026-11-18, round 5) ----------
   One quiet line per program: dot and name, a thin bar, "1 of 40 collected · 2 scheduled · 37 to
   schedule". The contract end date is the line's tooltip, and a muted note on wide screens. Phones
   use two lines: name and bar, then the numbers. */
html body .nx-pg{display:flex;flex-direction:column;gap:2px;margin:16px 4px 0}
html body .nx-pg-row{display:grid;grid-template-columns:minmax(120px,220px) minmax(80px,160px) auto 1fr;align-items:center;column-gap:16px;min-height:32px;font-size:13px;color:var(--sd-muted)}
html body .nx-pg-name{display:flex;align-items:center;gap:8px;min-width:0}
html body .nx-pg-name strong{font-weight:600;color:var(--sd-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .nx-pg-name .nx-cal-dot{flex:none}
html body .nx-pg-bar{height:6px}
html body .nx-pg-text{display:flex;flex-wrap:nowrap;gap:0;margin:0;white-space:nowrap}
html body .nx-pg-text>*+*::before{content:"·";margin:0 6px;color:var(--sd-muted)}
html body .nx-pg-text b{color:var(--sd-text);font-weight:600;font-variant-numeric:tabular-nums}
html body .nx-pg-text .is-left b{color:#a05a12}
[data-stercus-theme=dark] body .nx-pg-text .is-left b{color:#e0a45e}
html body .nx-pg-text .is-full{color:var(--sd-success,#3f7a4d)}
html body .nx-pg-text a.is-missed{color:var(--sc-missed);text-decoration:none}
html body .nx-pg-text a.is-missed b{color:inherit}
html body .nx-pg-of{justify-self:end;font-size:12px;color:var(--sd-muted);white-space:nowrap}
@media(max-width:1099px){html body .nx-pg-of{display:none}html body .nx-pg-row{grid-template-columns:minmax(110px,200px) minmax(60px,140px) 1fr}}
@media(max-width:599px){html body .nx-pg{gap:10px}html body .nx-pg-row{grid-template-columns:minmax(0,1fr) 96px;row-gap:4px;column-gap:12px}html body .nx-pg-text{grid-column:1/-1;flex-wrap:wrap;white-space:normal}html body .nx-pg-text>*{white-space:nowrap}}
/* ---------- Schedule round 6: locked visits, past visits, crew pile, Rotation groups (Taylor, items 32-35) ---------- */
/* 32: a collected sample's transit state beside its status pill; the plain "not linked yet" note. */
html body .nx-vr-transit{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 12px;border-radius:999px;font-size:13px;font-weight:600;white-space:nowrap;background:color-mix(in srgb,#b9772a 14%,var(--sd-surface));color:#8a5410}
html body .nx-vr-transit[data-state=delivered]{background:color-mix(in srgb,var(--sd-success,#3f7a4d) 14%,var(--sd-surface));color:var(--sd-success,#3f7a4d)}
[data-stercus-theme=dark] body .nx-vr-transit{color:#e8b46e}
[data-stercus-theme=dark] body .nx-vr-transit[data-state=delivered]{color:#8fd19e}
html body .nx-vr-transit .icon{width:14px;height:14px}
html body .nx-vr-status:has(>.nx-vr-transit){display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}
html body .nx-vr-status>.nx-vr-transit{margin:0}
html body .nx-vr-note{display:flex;gap:10px;align-items:flex-start;margin:12px 0 0;padding:12px 14px;border-radius:14px;background:rgb(var(--c-ink)/.04);font-size:14px;line-height:1.45;color:var(--sd-text)}
html body .nx-vr-note .icon{flex:none;width:16px;height:16px;margin-top:2px;color:var(--sd-muted)}
html body .nx-vr-pill.is-past{background:rgb(var(--c-ink)/.06);color:var(--sd-text)}
html body .nx-past-visit .form-actions{justify-content:space-between}
/* 34: crews on one line at every width: a face pile and the count; the list opens in a popover. */
html body .nx-cal-group .nx-cal-crew{flex-wrap:nowrap!important;overflow:visible!important;justify-content:flex-end;align-items:center;gap:8px;-webkit-mask-image:none!important;mask-image:none!important}
html body .nx-crewpile{position:relative;display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 12px 0 4px;border:0;border-radius:999px;background:rgb(var(--c-ink)/.05);color:var(--sd-text);font:inherit;font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer}
html body .nx-crewpile::after{content:"";position:absolute;inset:-6px -2px}
html body .nx-crewpile .nx-sc-pile{padding:0!important}
html body .nx-crewpile[aria-expanded=true]{background:rgb(var(--c-ink)/.1)}
html body .nx-crewpile:focus-visible{outline:2px solid rgb(var(--c-brand));outline-offset:2px}
@media(hover:hover){html body .nx-crewpile:hover{background:rgb(var(--c-ink)/.09)}}
html body .nx-cal-group .nx-cal-nocrew{white-space:nowrap}
html body .nx-crew-pop{position:fixed;inset:auto;margin:0;padding:10px;min-width:220px;max-width:min(320px,calc(100vw - 24px));max-height:min(60vh,420px);overflow:auto;border:0;border-radius:16px;background:var(--sd-surface);color:var(--sd-text);box-shadow:0 12px 32px rgb(40 30 20/.18),0 2px 6px rgb(40 30 20/.08);outline:0}
[data-stercus-theme=dark] body .nx-crew-pop{border:1px solid rgb(255 255 255/.1);box-shadow:0 12px 40px rgb(0 0 0/.45)}
html body .nx-crew-pop[hidden]{display:none}
html body .nx-crew-pop-title{margin:0 4px 8px;font-size:12px;font-weight:600;color:var(--sd-muted)}
html body .nx-crew-pop-list{display:flex;flex-direction:column;gap:6px}
html body .nx-crew-pop .nx-cal-crewchip{display:flex;align-items:center;gap:8px;min-height:36px;padding:0 10px 0 4px;border-radius:12px;background:rgb(var(--c-ink)/.04);font-size:13px;font-weight:600}
html body .nx-crew-pop .nx-cal-crewchip .nx-sc-avs{padding:0!important}
/* 35: Rotation's first column is headed "Sampling group" and shows just the value, narrow. */
@media(min-width:900px){
 html body .nx-rot-row{grid-template-columns:minmax(104px,156px) repeat(var(--weeks),minmax(46px,1fr))}
 html body .nx-rot-colhead{align-self:end;padding:0 0 6px;font-size:12px;font-weight:600;color:var(--sd-muted);white-space:nowrap}
 html body .nx-rot-row .nx-rot-long{display:none}
}
html body .nx-rot-copy{display:flex;flex-direction:column;min-width:0;line-height:1.25}
html body .nx-rot-copy strong,html body .nx-rot-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .nx-rot-copy small{font-size:11px;color:var(--sd-muted)}
@media(max-width:899px){
 html body .nx-rot-row .nx-rot-short{display:none}
 html body .nx-rot-row:not(.nx-rot-head)>.nx-rot-name .nx-rot-copy{flex-direction:row;align-items:baseline;gap:8px}
 html body .nx-rot-copy small{font-size:12px}
}
/* 41: one line per Rotation row: the group, then the program muted after a dot. The program
   truncates, never the group; a long press (is-full) shows it all. Rows stay at cell height. */
html body .nx-rot-row:not(.nx-rot-head)>.nx-rot-name{min-height:28px;line-height:18px}
html body .nx-rot-row:not(.nx-rot-head)>.nx-rot-name .nx-rot-copy{flex-direction:row;align-items:baseline;gap:0;min-width:0;line-height:18px}
html body .nx-rot-copy strong{flex:none;overflow:visible}
html body .nx-rot-copy small{flex:0 1 auto;min-width:0}
html body .nx-rot-copy small::before{content:"·";margin:0 5px;color:var(--sd-muted)}
html body .nx-rot-name.is-full .nx-rot-copy{flex-wrap:wrap}
html body .nx-rot-name.is-full .nx-rot-copy small{white-space:normal;overflow:visible}
@media(min-width:900px){html body .nx-rot-copy small{font-size:12px}}
/* ---------- end Schedule round 6 ---------- */
/* ---------- Program contract total (Taylor, round 6, item 11) ----------
   Samples contracted and Contract end date sit side by side in the Sampling step; each keeps
   its own label, help and inline error. Very narrow screens stack them. */
html body .nx-field-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px;align-items:start}
html body .nx-field-pair>.field,html body .nx-field-pair>[data-editor-field]{min-width:0;margin-top:0}
html body .nx-field-pair input{font-size:16px;min-width:0;width:100%;box-sizing:border-box}
@media(max-width:359px){html body .nx-field-pair{grid-template-columns:1fr}}
html body .nx-pg-notes{margin-top:8px}
html body .nx-pg-note{display:flex;align-items:baseline;gap:8px;margin:0;padding:8px 0;font-size:13px;line-height:1.45;color:var(--sd-muted)}
html body .nx-pg-note .nx-cal-dot{flex:none;align-self:center}
html body .nx-pg-note a{color:rgb(var(--c-brand));font-weight:600;text-decoration:none;padding:12px 0;margin:-12px 0}
@media(hover:hover){html body .nx-pg-note a:hover{text-decoration:underline}}
/* ---------- end Program contract total ---------- */
/* ---------- Quick tour (round 6) ----------
   Five steps that always fit the screen: Back, Next and Skip are never scrolled
   out of reach. Phones in portrait: picture, words, then buttons in thumb reach.
   Landscape and short screens: the picture sits beside the words. Large screens:
   one centered group. Skip stays clear of the Duo camera corner.
   structure.css is hash-locked and still holds the first tour's rules; the
   margin, padding, border and font resets here neutralise them. */
html body .nx-tour{--tour-art:236px;--tour-copy:128px;--tour-camera:0px;box-sizing:border-box;width:100%;max-width:520px;height:100%;margin:0 auto;display:grid;grid-template-rows:auto minmax(0,1fr) auto;row-gap:16px;padding:calc(env(safe-area-inset-top) + 8px) calc(env(safe-area-inset-right) + 24px) calc(env(safe-area-inset-bottom) + 16px) calc(env(safe-area-inset-left) + 24px)}
html:is([data-camera-corner],[data-screen=cover]) body .nx-tour{--tour-camera:64px}
html body .nx-tour-top{display:flex;align-items:center;gap:12px;min-height:44px;padding-right:var(--tour-camera)}
html body .nx-tour-dots{display:flex;align-items:center;gap:6px}
html body .nx-tour-dots>span{width:8px;height:8px;border-radius:999px;background:rgb(var(--c-line))}
html body .nx-tour-dots>.is-done{background:rgb(var(--c-brand)/.4)}
html body .nx-tour-dots>.is-current{width:22px;background:var(--sd-action);animation:nx-tour-dot .3s cubic-bezier(.22,1,.36,1) both}
@keyframes nx-tour-dot{from{width:8px}to{width:22px}}
html body .nx-tour-count{font-size:14px;line-height:20px;color:var(--sd-muted);font-variant-numeric:tabular-nums}
html body .nx-tour .nx-tour-skip{margin-left:auto;color:var(--sd-muted)}
html body .nx-tour-step{min-height:0;display:flex;flex-direction:column;justify-content:center;gap:28px}
html body .nx-tour-step:has(.nx-tour-mark){align-items:stretch;text-align:inherit}
html body .nx-tour-step.from-right{animation:nx-from-right .32s cubic-bezier(.22,1,.36,1) both}
html body .nx-tour-step.from-left{animation:nx-from-left .32s cubic-bezier(.22,1,.36,1) both}
html body .nx-tour-art{flex:none;box-sizing:border-box;height:var(--tour-art);min-height:0;margin:0;display:grid;place-items:center;padding:16px 20px;border-radius:28px;background:var(--sd-surface);box-shadow:var(--card-shadow);overflow:hidden}
html body .nx-tour-art.is-bare{background:none;box-shadow:none;border:0}
/* Prose: proportional figures. The page-wide tabular-nums (top of this file) also widens
   Inter's hyphen, which put gaps around the one in "sign-in". */
html body .nx-tour-copy{min-height:var(--tour-copy);text-align:center;font-variant-numeric:normal}
html body .nx-tour-new{display:inline-block;margin:0 0 12px;padding:4px 10px;border-radius:999px;background:var(--sd-selected);color:var(--sd-action);font-size:12px;line-height:16px;font-weight:600;letter-spacing:.04em}
html body .nx-tour-copy h2{margin:0;font-family:Fraunces,serif;font-weight:600!important;font-size:28px;line-height:34px;letter-spacing:-.5px;color:var(--sd-text);text-wrap:balance}
html body .nx-tour-body{margin:8px auto 0;max-width:34ch;font-size:16px;line-height:24px;color:var(--sd-muted);text-wrap:pretty}
/* Centred on the line: middle sits on half the x-height; 1px up lands it on the capitals' centre. */
html body .nx-tour-plus{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--sd-action);color:var(--lab-ink-on-action,#fff);vertical-align:middle;position:relative;top:-1px}
html body .nx-tour-actions{display:flex;gap:12px;padding:0}
html body .nx-tour .nx-w-back{flex:none;min-height:52px!important;border-radius:999px!important;padding:0 24px!important}
/* Step 1 has nothing behind it: Back keeps its space so Next holds still, but isn't shown,
   focusable or announced. */
html body .nx-tour .nx-w-back[data-placeholder]{visibility:hidden}
html body .nx-tour .nx-w-primary{flex:1;width:auto;min-height:52px!important}
/* Step 1: the Nexus mark traces itself in. */
html body .nx-tour-mark{display:block;width:120px;height:120px}
html body .nx-tour-mark .nx-trace-line rect{animation:nx-trace-draw .8s ease-in-out both;animation-delay:calc(.12s + var(--i,0) * .1s)}
html body .nx-tour-mark .nx-trace-fill rect{animation:nx-trace-fill .5s ease-out both;animation-delay:calc(.6s + var(--i,0) * .1s)}
/* Steps 2–3: the red + and the Add menu it opens. */
html body .nx-art-add{display:flex;align-items:flex-end;gap:12px}
html body .nx-art-plus{flex:none;box-sizing:border-box;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;background:var(--sd-action);color:var(--lab-ink-on-action,#fff);border:1px solid color-mix(in srgb,var(--sd-action),white 32%);box-shadow:inset 0 1px 0 rgb(255 255 255/.35),0 7px 22px color-mix(in srgb,var(--sd-action) 34%,transparent)}
html body .nx-art-menu{display:flex;flex-direction:column;gap:2px;width:172px;padding:6px;border-radius:18px;background:var(--sd-surface);border:1px solid rgb(var(--c-line));box-shadow:0 2px 6px rgb(var(--c-shade)/.06),0 14px 36px rgb(var(--c-shade)/.14)}
html body .nx-art-menu .nx-add-head{margin:0;padding:4px 10px 2px;font-size:12px;line-height:16px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--sd-muted)}
html body .nx-art-menu .nx-add-sep{display:block;height:1px;margin:2px 10px;padding:0;background:rgb(var(--c-line))}
html body .nx-art-menu>[data-item]{display:flex;align-items:center;gap:10px;padding:5px 10px;border-radius:12px;font-size:15px;line-height:20px;font-weight:500;color:var(--sd-text)}
html body .nx-art-menu .nx-add-glyph{flex:none;width:20px;height:20px;color:var(--sd-action)}
html body .nx-art-menu>.is-picked{background:var(--sd-selected);box-shadow:inset 0 0 0 1.5px rgb(var(--c-brand)/.5)}
[data-stercus-theme=dark] body .nx-art-menu{border-color:rgb(255 255 255/.14);box-shadow:0 14px 36px rgb(0 0 0/.5)}
[data-stercus-theme=dark] body .nx-art-menu .nx-add-sep{background:rgb(255 255 255/.12)}
/* Steps 4–5: rows of visits and accounts. */
html body .nx-art-list{width:100%;max-width:340px;display:flex;flex-direction:column}
html body .nx-art-line{display:flex;align-items:center;gap:10px;min-height:44px;font-size:14px;line-height:18px;color:var(--sd-text)}
html body .nx-art-line+.nx-art-line{border-top:1px solid var(--sd-divider)}
html body .nx-art-line>b,html body .nx-art-visit>b{flex:1;min-width:0;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .nx-art-av{flex:none;box-sizing:border-box;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-family:inherit;font-size:12px;font-weight:600;line-height:1}
html body .nx-art-line .people-access-status{flex:none;white-space:nowrap}
html body .nx-art-day{flex:none;width:36px;display:flex;flex-direction:column;font-size:12px;line-height:16px;color:var(--sd-muted);font-variant-numeric:tabular-nums}
html body .nx-art-day b{font-weight:600;color:var(--sd-text)}
html body .nx-art-visit{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;padding:6px 0}
html body .nx-art-crew{display:flex;gap:4px}
html body .nx-art-crew .nx-art-av{width:22px;height:22px;font-size:10px}
html body .nx-art-av.is-empty{background:transparent!important;box-shadow:none!important;border:1.5px dashed rgb(var(--c-line))}
html body .nx-art-line>em{flex:none;font-style:normal;font-size:12px;font-weight:600;color:var(--sd-muted)}
html body .nx-art-line>em.is-open{color:rgb(var(--av-amber-ink))}
html body .nx-art-line .nx-vr-pill{flex:none;min-height:24px;gap:4px;padding:0 10px 0 8px;font-size:12px}
html body .nx-tour-check{width:14px;height:14px;stroke-width:2.2}
/* Shorter phones. */
@media (orientation:portrait) and (max-height:700px){
 html body .nx-tour{--tour-art:212px}
 html body .nx-tour-step{gap:20px}
 html body .nx-tour-copy h2{font-size:26px;line-height:32px}
}
@media (orientation:portrait) and (max-height:600px){
 html body .nx-tour{--tour-art:180px}
 html body .nx-tour-art>*{zoom:.85}
}
/* Landscape and short screens: picture beside the words, buttons at the right. */
@media (orientation:landscape) and (max-height:520px){
 html body .nx-tour{max-width:960px}
 html body .nx-tour-step,html body .nx-tour-step:has(.nx-tour-mark){display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);align-items:center;column-gap:40px}
 html body .nx-tour-art{height:auto;min-height:min(100%,240px);max-height:100%}
 html body .nx-tour-copy{min-height:0;text-align:left}
 html body .nx-tour-body{margin-left:0}
 html body .nx-tour-actions{justify-content:flex-end}
 html body .nx-tour .nx-w-primary{flex:0 0 auto;min-width:180px}
}
@media (orientation:landscape) and (max-height:480px){
 html body .nx-tour{row-gap:8px;padding-bottom:calc(env(safe-area-inset-bottom) + 12px)}
 html body .nx-tour-art{padding:8px 12px}
 html body .nx-tour-art>*{zoom:.85}
 html body .nx-tour-copy h2{font-size:24px;line-height:30px}
 html body .nx-tour .nx-w-back,html body .nx-tour .nx-w-primary{min-height:48px!important}
}
/* Large screens: one centered group instead of top-to-bottom. */
@media (min-width:600px) and (min-height:521px){
 html body .nx-welcome:has(>.nx-tour){display:grid;align-content:center}
 html body .nx-tour{--tour-art:280px;--tour-copy:136px;height:auto;max-width:560px;row-gap:40px;padding-top:calc(env(safe-area-inset-top) + 32px);padding-bottom:calc(env(safe-area-inset-bottom) + 32px)}
 html body .nx-tour-step{gap:32px}
 html body .nx-tour-copy h2{font-size:34px;line-height:40px}
 html body .nx-tour-art>*{zoom:1.1}
}
/* Reduce Motion: motion.css stops every animation, so steps simply swap and the mark shows drawn. */
/* ---------- Round 7: tour layout (overrides the round 6 block above) ----------
   Step 1: the mark, title and subtitle read as one group, and Next runs the full
   content width (nothing sits beside it). Landscape: the picture and words sit
   centred as one block, across and down, with Back and Next centred under it. */
html body .nx-tour .nx-w-back[data-placeholder]{display:none}
html body .nx-tour-step:has(.nx-tour-art.is-bare){gap:20px}
html body .nx-tour-art.is-bare{height:auto;padding:0}
html body .nx-tour-step:has(.nx-tour-art.is-bare) .nx-tour-copy{min-height:0}
@media (orientation:landscape) and (max-height:520px){
 html body .nx-tour{max-width:none;grid-template-rows:auto minmax(0,1fr) minmax(0,auto) auto minmax(0,1fr);row-gap:0}
 html body .nx-tour-top{grid-row:1}
 html body .nx-tour-step,html body .nx-tour-step:has(.nx-tour-mark){grid-row:3;grid-template-columns:minmax(0,400px) minmax(0,340px);justify-content:center;column-gap:48px}
 html body .nx-tour-art{height:240px;min-height:0;max-height:100%}
 html body .nx-tour-art.is-bare{height:auto}
 html body .nx-tour-actions{grid-row:4;width:100%;max-width:788px;margin:28px auto 0;justify-content:center}
 html body .nx-tour .nx-w-primary{min-width:200px}
}
@media (orientation:landscape) and (max-height:480px){
 html body .nx-tour-art{height:200px}
 html body .nx-tour-actions{margin-top:12px}
}
/* ---------- end Round 7: tour layout ---------- */

/* ---------- Round 8: tour step 1 ----------
   Item 3: on large screens the tour is one centred group, so a shorter step 1 moved the
   counter, Skip and Next. Step 1 now takes the same height as steps 2–5, with its mark
   and words centred inside it, so the chrome holds still from step to step. */
@media (min-width:600px) and (min-height:521px){
 html body .nx-tour-step:has(.nx-tour-art.is-bare){min-height:calc(var(--tour-art) + 32px + var(--tour-copy));justify-content:center}
}
/* Item 4: the step 1 mark plays a quicker cut of the deck's cover. One bar's outline
   traces in (the other two lie on top of it), the two fan out to 60° and 120° on the
   deck's own ease-in-out (its sampled keyframes, below), then the fills fade in.
   About 1.9s; the fan takes 0.9s. Colour is the theme's brand token. It plays each time
   step 1 is drawn (coming back to it redraws it), never on resize; with Reduce Motion,
   motion.css stops it and the finished mark shows. Only step 1; the welcome screen keeps
   its trace-in. */
html body .nx-tour-mark .nx-trace{color:rgb(var(--c-brand))}
/* Each fanning bar turns about its own centre, the mark's centre (50,50). Only while it can
   move: the origin would also shift the bars' own rotate(60 50 50) when motion is off. */
@media (prefers-reduced-motion:no-preference){html body .nx-tour-mark .nx-trace-line rect:is(:nth-child(2),:nth-child(3)){transform-box:fill-box;transform-origin:center}}
html body .nx-tour-mark .nx-trace-line rect{animation:nx-trace-draw .7s cubic-bezier(.65,0,.35,1) both}
html body .nx-tour-mark .nx-trace-line rect:nth-child(2){animation:nx-trace-draw .7s cubic-bezier(.65,0,.35,1) both,nx-fan-60 .9s linear .7s both}
html body .nx-tour-mark .nx-trace-line rect:nth-child(3){animation:nx-trace-draw .7s cubic-bezier(.65,0,.35,1) both,nx-fan-120 .9s linear .7s both}
html body .nx-tour-mark .nx-trace-fill rect{animation:nx-trace-fill .4s ease-out 1.5s both}
@keyframes nx-fan-60{0.0%{transform:rotate(0.0deg)}4.2%{transform:rotate(0.02deg)}8.3%{transform:rotate(0.14deg)}12.5%{transform:rotate(0.47deg)}16.7%{transform:rotate(1.11deg)}20.8%{transform:rotate(2.17deg)}25.0%{transform:rotate(3.75deg)}29.2%{transform:rotate(5.95deg)}33.3%{transform:rotate(8.89deg)}37.5%{transform:rotate(12.66deg)}41.7%{transform:rotate(17.36deg)}45.8%{transform:rotate(23.11deg)}50.0%{transform:rotate(30.0deg)}54.1%{transform:rotate(36.89deg)}58.3%{transform:rotate(42.64deg)}62.5%{transform:rotate(47.34deg)}66.7%{transform:rotate(51.11deg)}70.8%{transform:rotate(54.05deg)}75.0%{transform:rotate(56.25deg)}79.2%{transform:rotate(57.83deg)}83.3%{transform:rotate(58.89deg)}87.5%{transform:rotate(59.53deg)}91.7%{transform:rotate(59.86deg)}95.8%{transform:rotate(59.98deg)}100.0%{transform:rotate(60.0deg)}}
@keyframes nx-fan-120{0.0%{transform:rotate(0.0deg)}4.2%{transform:rotate(0.03deg)}8.3%{transform:rotate(0.28deg)}12.5%{transform:rotate(0.94deg)}16.7%{transform:rotate(2.22deg)}20.8%{transform:rotate(4.34deg)}25.0%{transform:rotate(7.5deg)}29.2%{transform:rotate(11.91deg)}33.3%{transform:rotate(17.78deg)}37.5%{transform:rotate(25.31deg)}41.7%{transform:rotate(34.72deg)}45.8%{transform:rotate(46.22deg)}50.0%{transform:rotate(60.0deg)}54.1%{transform:rotate(73.78deg)}58.3%{transform:rotate(85.28deg)}62.5%{transform:rotate(94.69deg)}66.7%{transform:rotate(102.22deg)}70.8%{transform:rotate(108.09deg)}75.0%{transform:rotate(112.5deg)}79.2%{transform:rotate(115.66deg)}83.3%{transform:rotate(117.78deg)}87.5%{transform:rotate(119.06deg)}91.7%{transform:rotate(119.72deg)}95.8%{transform:rotate(119.97deg)}100.0%{transform:rotate(120.0deg)}}
/* ---------- end Round 8: tour step 1 ---------- */

/* ---------- Round 7: welcome screen (.nx-splash) ----------
   Same language as the tour: the outline mark, a Fraunces title, Inter text, one
   primary action. Phones: the group sits centred, buttons in thumb reach at the
   bottom. Landscape and short screens: words beside the reasons, buttons centred
   under both. Large screens: one centred group. Never scrolls; safe areas kept. */
html body .nx-splash{box-sizing:border-box;width:100%;max-width:480px;height:100%;margin:0 auto;display:grid;grid-template-rows:minmax(0,1fr) auto;row-gap:24px;padding:calc(env(safe-area-inset-top) + 32px) calc(env(safe-area-inset-right) + 24px) calc(env(safe-area-inset-bottom) + 16px) calc(env(safe-area-inset-left) + 24px)}
html body .nx-splash-group{align-self:center;min-height:0;display:flex;flex-direction:column;gap:32px}
html body .nx-splash-head{display:flex;flex-direction:column;align-items:center;text-align:center}
html body .nx-splash-mark{display:block;width:64px;height:64px}
html body .nx-splash-mark .nx-trace-line rect{animation:nx-trace-draw .8s ease-in-out both;animation-delay:calc(.1s + var(--i,0) * .1s)}
html body .nx-splash-mark .nx-trace-fill rect{animation:nx-trace-fill .5s ease-out both;animation-delay:calc(.55s + var(--i,0) * .1s)}
html body .nx-splash-title{margin:20px 0 0;font-family:Fraunces,serif;font-weight:600!important;font-size:32px;line-height:40px;letter-spacing:-.6px;color:var(--sd-text);text-wrap:balance}
html body .nx-splash-sub{margin:8px 0 0;max-width:32ch;font-size:16px;line-height:24px;color:var(--sd-muted);text-wrap:balance;font-variant-numeric:normal}
html body .nx-splash-features{list-style:none;width:fit-content;max-width:min(100%,312px);margin:0 auto;padding:0;display:flex;flex-direction:column;gap:20px;font-variant-numeric:normal}
html body .nx-splash-features li{display:flex;align-items:center;gap:16px}
html body .nx-splash-features strong{display:block;font-size:16px;line-height:22px;font-weight:600;color:var(--sd-text)}
html body .nx-splash-features li>span:last-child>span{display:block;font-size:14px;line-height:20px;color:var(--sd-muted);text-wrap:pretty}
html body .nx-splash-actions{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;column-gap:8px;row-gap:8px}
html body .nx-splash .nx-w-primary{flex:1 0 100%;min-height:52px!important}
html body .nx-splash .nx-w-text{color:var(--sd-text);font-size:16px}
html body .nx-splash .nx-w-quiet{padding:0 12px;border-radius:999px}
/* Shorter phones. */
@media (orientation:portrait) and (max-height:720px){
 html body .nx-splash{padding-top:calc(env(safe-area-inset-top) + 20px);row-gap:20px}
 html body .nx-splash-group{gap:20px}
 html body .nx-splash-mark{width:48px;height:48px}
 html body .nx-splash-title{margin-top:12px;font-size:28px;line-height:34px}
 html body .nx-splash-sub{margin-top:6px}
 html body .nx-splash-features{gap:12px}
}
/* Landscape and short screens: words beside the reasons, all centred as one block. */
@media (orientation:landscape) and (max-height:520px){
 html body .nx-splash{max-width:920px;grid-template-rows:minmax(0,1fr) auto auto minmax(0,1fr);row-gap:0}
 html body .nx-splash-group{grid-row:2;display:grid;grid-template-columns:minmax(0,max-content) minmax(0,max-content);justify-content:center;align-items:center;column-gap:56px}
 html body .nx-splash-head{max-width:340px}
 html body .nx-splash-features{max-width:380px;margin:0}
 html body .nx-splash-head{align-items:flex-start;text-align:left}
 html body .nx-splash-actions{grid-row:3;width:100%;max-width:360px;margin:32px auto 0}
}
@media (orientation:landscape) and (max-height:480px){
 html body .nx-splash{padding-top:calc(env(safe-area-inset-top) + 16px);padding-bottom:calc(env(safe-area-inset-bottom) + 12px)}
 html body .nx-splash-mark{width:40px;height:40px}
 html body .nx-splash-title{margin-top:8px;font-size:26px;line-height:32px}
 html body .nx-splash-features{gap:10px}
 html body .nx-splash-features li>span:last-child>span{display:none}
 html body .nx-splash-actions{max-width:none;margin-top:16px;flex-wrap:nowrap}
 html body .nx-splash .nx-w-primary{order:3;flex:0 0 auto;width:auto;min-width:220px;min-height:48px!important}
 html body .nx-splash .nx-w-quiet{white-space:nowrap}
}
/* Large screens: one centred group. */
@media (min-width:600px) and (min-height:521px){
 html body .nx-welcome:has(>.nx-splash){display:grid;align-content:center}
 html body .nx-splash{height:auto;max-width:460px;row-gap:40px;padding-top:calc(env(safe-area-inset-top) + 40px);padding-bottom:calc(env(safe-area-inset-bottom) + 40px)}
 html body .nx-splash-group{gap:40px}
 html body .nx-splash-mark{width:72px;height:72px}
 html body .nx-splash-title{font-size:36px;line-height:44px}
}
/* ---------- end Round 7: welcome screen ---------- */
/* ---------- Round 8 proposal: Duo layouts ----------
   One centred column at a comfortable width on every screen at least 600 wide and
   521 tall (Duo inner screen either way round, tablets, desktops); two columns only
   on short phone landscape. Mid-height screens get a smaller picture so it all fits.
   Spanned across a hinge, each half gets its own part and nothing crosses the hinge. */
@media (min-width:600px) and (min-height:521px) and (max-height:760px){
 html body .nx-tour{--tour-art:min(280px,calc(100vh - 360px));--tour-copy:120px;row-gap:24px;padding-top:calc(env(safe-area-inset-top) + 24px);padding-bottom:calc(env(safe-area-inset-bottom) + 24px)}
 html body .nx-tour-step{gap:24px}
 html body .nx-tour-step:has(.nx-tour-art.is-bare){min-height:calc(var(--tour-art) + 24px + var(--tour-copy))}
 html body .nx-tour-copy h2{font-size:28px;line-height:34px}
 html body .nx-tour-art>*{zoom:1}
 html body .nx-splash{row-gap:24px;padding-top:calc(env(safe-area-inset-top) + 24px);padding-bottom:calc(env(safe-area-inset-bottom) + 24px)}
 html body .nx-splash-group{gap:24px}
 html body .nx-splash-mark{width:56px;height:56px}
 html body .nx-splash-title{margin-top:14px;font-size:32px;line-height:40px}
 html body .nx-splash-features{max-width:min(100%,440px);gap:14px}
}
@media (min-width:600px) and (min-height:521px) and (max-height:600px){
 html body .nx-tour-art>*{zoom:.8}
 html body .nx-splash-features li>span:last-child>span{display:none}
}
/* Spanned, hinge running down the middle: picture or greeting on the left screen,
   words and buttons on the right. Real devices report the halves (viewport segments);
   ?span=columns or ?span=rows previews a centred 34px hinge. */
html[data-span] body .nx-welcome:has(>:is(.nx-tour,.nx-splash)){display:block}
/* tour.js sets --seg-a (the first screen) and --seg-gap (the hinge) on <html>. */
html[data-span] body :is(.nx-tour,.nx-splash){max-width:none;width:100%;height:100%;margin:0;row-gap:0;column-gap:0;padding:calc(env(safe-area-inset-top) + 8px) 0 calc(env(safe-area-inset-bottom) + 24px)}
html[data-span] body :is(.nx-tour-step,.nx-splash-group){display:contents}
html[data-span] body .nx-tour-art{width:min(100% - 48px,440px);height:var(--tour-art);justify-self:center;align-self:center}
html[data-span] body .nx-tour-art.is-bare{height:auto}
html[data-span] body :is(.nx-tour-copy,.nx-splash-features,.nx-tour-actions,.nx-splash-actions){width:min(100% - 48px,440px);justify-self:center;margin:0}
html[data-span] body .nx-tour-copy{min-height:var(--tour-copy);margin-bottom:28px}
html[data-span] body .nx-tour-step:has(.nx-tour-art.is-bare) .nx-tour-copy{min-height:var(--tour-copy)}
html[data-span] body .nx-splash-features{margin-bottom:32px}
html[data-span=columns] body :is(.nx-tour,.nx-splash){display:grid;grid-template-columns:var(--seg-a) var(--seg-gap) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto minmax(0,1fr)}
html[data-span=columns] body .nx-tour-top{grid-column:1/-1;grid-row:1;padding:0 24px}
html[data-span=columns] body :is(.nx-tour-art,.nx-splash-head){grid-column:1;grid-row:2/6}
html[data-span=columns] body .nx-splash-head{align-self:center;justify-self:center;max-width:calc(100% - 48px)}
html[data-span=columns] body :is(.nx-tour-copy,.nx-splash-features){grid-column:3;grid-row:3}
html[data-span=columns] body :is(.nx-tour-actions,.nx-splash-actions){grid-column:3;grid-row:4}
html[data-span=rows] body :is(.nx-tour,.nx-splash){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:var(--seg-a) var(--seg-gap) minmax(0,1fr) auto auto minmax(0,1fr);padding-top:0}
html[data-span=rows] body :is(.nx-tour,.nx-splash)>*,html[data-span=rows] body :is(.nx-tour-step,.nx-splash-group)>*{grid-column:1}
html[data-span=rows] body .nx-tour-top{grid-row:1;align-self:start;padding:calc(env(safe-area-inset-top) + 8px) 24px 0}
html[data-span=rows] body :is(.nx-tour-art,.nx-splash-head){grid-row:1;align-self:center;justify-self:center}
html[data-span=rows] body .nx-tour-art{margin-top:40px}
html[data-span=rows] body :is(.nx-tour-copy,.nx-splash-features){grid-row:4}
html[data-span=rows] body :is(.nx-tour-actions,.nx-splash-actions){grid-row:5}
/* One-column tour (Duo, tablet, desktop): Back and Next sit centred under the content
   as one row, Back as quiet text and Next at a fixed width. Step 1's Next takes the
   same width, centred, so the row reads the same from step to step. */
@media (min-width:600px) and (min-height:521px){
 html body .nx-tour .nx-tour-actions{justify-content:center}
 html body .nx-tour .nx-w-primary{flex:0 0 auto;width:min(320px,100%)}
}
/* Spanned welcome: the reasons and the button share one width; both halves centre on
   the same line. */
html[data-span] body :is(.nx-splash-features,.nx-splash-actions){width:min(100% - 48px,400px);max-width:none}
html[data-span] body .nx-splash .nx-w-primary{width:100%}
/* ---------- end Round 8 proposal: Duo layouts ---------- */

/* ---------- Coordinates to 5 decimal places (Taylor, round 6) ----------
   A coordinate field keeps its full value. When it isn't focused and rounding changes the text,
   a display-only overlay shows the 5-decimal value over it (coords.js); focus shows the full value. */
html body .nx-coord-field{position:relative;display:block;min-width:0}
html body .nx-coord-field>input{width:100%}
html body .nx-coord-show{position:absolute;inset:0;display:none;align-items:center;overflow:hidden;white-space:nowrap;pointer-events:none;box-sizing:border-box;color:var(--sd-text)}
html body .nx-coord-field.is-rounded>.nx-coord-show{display:flex}
html body .nx-coord-field.is-rounded>input{color:transparent!important;-webkit-text-fill-color:transparent}
/* ---------- end Coordinates ---------- */
/* Schedule visits stepper (release 1, Taylor, 2026-11-20): five steps in one form. Panes switch with
   data-wiz-off (never [hidden], which readPlan skips). Tokens only. */
html body .nx-wiz [data-wiz-off]{display:none!important}
html body .nx-wiz .form-actions>[hidden],html body .nx-wiz [data-wiz-pane] [hidden]{display:none!important}
html body .nx-wiz-head{margin:0 0 20px}
html body .nx-wiz-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
html body .nx-wiz-steps li{min-width:0;margin:0;padding:0}
html body .drawer-panel form .nx-wiz-steps button{appearance:none;display:flex!important;flex-direction:column;align-items:stretch;gap:8px;width:100%;min-width:0;min-height:44px;margin:0;padding:0 0 4px;border:0!important;background:none!important;box-shadow:none!important;border-radius:6px;font:500 12px/1.25 Inter,ui-sans-serif,system-ui,sans-serif;color:var(--sd-muted);text-align:left;cursor:pointer}
html body .nx-wiz-steps button i{display:block;height:4px;border-radius:999px;background:var(--sd-divider);transition:background-color .25s ease-out}
html body .nx-wiz-steps li.is-done button i{background:color-mix(in srgb,var(--sd-action) 55%,var(--sd-surface))}
html body .nx-wiz-steps button[aria-current=step]{color:var(--sd-text);font-weight:600}
html body .nx-wiz-steps button[aria-current=step] i{background:var(--sd-action)}
html body .drawer-panel form .nx-wiz-steps button:disabled{cursor:default;opacity:1!important}
html body .nx-wiz-steps button span{display:block;text-wrap:balance}
html body .nx-wiz-steps button:focus-visible{outline:2px solid var(--sd-action);outline-offset:3px}
html body .nx-wiz-of{margin:12px 0 0;font:600 12px/16px Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.4px;text-transform:uppercase;color:var(--sd-muted)}
html body .nx-wiz-of-name{display:none}
html body .nx-wiz-intro{margin:0 0 20px}
html body .nx-wiz-h{margin:0 0 4px;font:600 20px/28px Fraunces,ui-serif,Georgia,serif;letter-spacing:-.2px;color:var(--sd-text)}
html body .nx-wiz-h:focus{outline:none}
html body .nx-wiz-h:focus-visible{outline:2px solid var(--sd-action);outline-offset:4px;border-radius:4px}
html body .nx-wiz-intro p{margin:0;font-size:15px;line-height:22px;color:var(--sd-muted);text-wrap:pretty}
html body .nx-wiz .nx-wiz-legend{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
html body .nx-wiz [data-wiz-pane]>:is(.field,fieldset,label.nx-switch-row){margin:0 0 24px!important}
html body .nx-wiz [data-wiz-pane]>:last-child{margin-bottom:8px!important}
/* footer: running summary left, Back/Cancel and the one primary button right */
html body .drawer-panel form.nx-wiz>.nx-wiz-foot{position:sticky!important;bottom:0;z-index:3;display:flex!important;align-items:center;gap:12px!important;flex-wrap:nowrap;background:var(--sheet-bg,var(--sd-surface))!important;border-top:1px solid var(--sd-divider)!important;padding:16px 0 max(20px,env(safe-area-inset-bottom))!important}
html body .nx-wiz-meta{flex:1 1 auto;min-width:0;margin:0!important;display:flex;flex-direction:column;gap:2px;font-size:13px;line-height:18px;color:var(--sd-muted);font-variant-numeric:tabular-nums}
html body .nx-wiz-meta b{font-size:14px;font-weight:600;color:var(--sd-text)}
html body .nx-wiz-meta span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .nx-wiz-why{display:flex!important;align-items:flex-start;gap:6px;white-space:normal!important;color:var(--sd-text)}
html body .nx-wiz-why .icon{flex:none;width:14px;height:14px;margin-top:2px;color:var(--sd-muted)}
html body .nx-wiz-foot>:is(.button,button){flex:none!important;min-height:48px}
html body .nx-wiz-foot>.button.primary{min-width:112px!important;justify-content:center}
html body .nx-wiz-foot>.button.primary:disabled{opacity:.45}
/* Unavailable days: a switch; on, three choices as rows in one card */
html body .nx-plan-closed>legend{margin-bottom:4px!important}
html body .nx-closed-lead{margin:0 0 12px;font-size:13px;color:var(--sd-muted)}
html body .nx-closed-opts{display:flex;flex-direction:column;border:1px solid var(--sd-divider);border-radius:18px;overflow:hidden;background:var(--sd-surface)}
html body .drawer-panel form .nx-closed-opt{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:12px;min-height:44px;margin:0!important;padding:14px 16px!important;border-top:1px solid var(--sd-divider);cursor:pointer}
html body .nx-closed-opt:first-child{border-top:0}
html body .nx-closed-opt:has(input:checked){background:var(--nx-sel-fill)}
html body .nx-closed-opt input,html body .nx-applies-card input{flex:none;width:20px;height:20px;margin:2px 0 0;accent-color:var(--sd-action)}
html body .nx-closed-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
html body .nx-closed-copy strong{font-size:15px;font-weight:600;color:var(--sd-text)}
html body .nx-closed-copy small{font-size:13px;line-height:18px;color:var(--sd-muted)}
/* Review */
html body .nx-rv-top{display:flex;flex-direction:column;gap:12px;margin:0 0 24px}
html body .nx-rv-top:empty{display:none}
html body .nx-rv-hero{display:flex;flex-direction:column;gap:6px;padding:20px;border-radius:24px;background:var(--nx-sel-fill);border:1px solid color-mix(in srgb,var(--sd-action) 22%,var(--sd-divider))}
html body .nx-rv-hero strong{font:600 34px/1.1 Fraunces,ui-serif,Georgia,serif;letter-spacing:-.5px;color:var(--sd-text);font-variant-numeric:tabular-nums}
html body .nx-rv-hero span{font-size:15px;color:var(--sd-text)}
html body .nx-rv-warn{display:flex;gap:12px;padding:14px 16px;border-radius:18px;background:color-mix(in srgb,var(--sd-tile-warning) 9%,var(--sd-surface));border:1px solid color-mix(in srgb,var(--sd-tile-warning) 34%,var(--sd-divider))}
html body .nx-rv-warn>.icon{flex:none;width:18px;height:18px;margin-top:2px;color:color-mix(in srgb,var(--sd-tile-warning) 75%,var(--sd-text))}
html body .nx-rv-warn>div{display:flex;flex-direction:column;gap:2px;font-size:14px;line-height:20px}
html body .nx-rv-warn strong{font-weight:600;color:var(--sd-text)}
html body .nx-rv-warn span{color:var(--sd-muted)}
html body .nx-rv-cap{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:32px;margin:0 0 8px;font-size:12px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;color:var(--sd-muted)}
html body .nx-rv-card{border:1px solid var(--sd-divider);background:var(--sd-surface);border-radius:20px;overflow:hidden;margin:0 0 24px}
html body .nx-rv-card .nx-plan-summary,html body .nx-rv-card .nx-plan-summary.has-timeline{margin:0!important;border:0!important;border-radius:0!important;background:none!important;padding:16px!important}
html body .nx-rv{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start;padding:14px 16px;border-top:1px solid var(--sd-divider)}
html body .nx-rv:first-child{border-top:0}
html body .nx-rv-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
html body .nx-rv-copy strong{font-size:15px;font-weight:600;color:var(--sd-text)}
html body .nx-rv-copy span{font-size:14px;line-height:20px;color:var(--sd-muted);overflow-wrap:anywhere}
html body .drawer-panel form .nx-rv-edit{appearance:none;display:inline-flex!important;align-items:center;min-height:44px;margin:-12px -8px -12px 0;padding:0 8px!important;border:0!important;background:none!important;box-shadow:none!important;font:600 14px Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:0;text-transform:none;color:var(--sd-action);cursor:pointer;border-radius:8px}
html body .nx-rv-cap .nx-rv-edit{margin:-6px -8px -6px 0!important}
@media (hover:hover){html body .drawer-panel form .nx-rv-edit:hover{text-decoration:underline}}
html body .nx-rv-edit:focus-visible{outline:2px solid var(--sd-action);outline-offset:0}
/* Edit visit: what this change applies to, as three cards */
html body .nx-applies{border:0;padding:0;margin:4px 0 24px!important;display:flex;flex-direction:column;gap:8px;min-width:0}
html body .nx-applies>legend{padding:0;margin:0 0 8px;font-size:14px;font-weight:600;color:var(--sd-text)}
html body .drawer-panel form .nx-applies-card{display:flex!important;flex-direction:row!important;align-items:center;gap:12px;min-height:56px;margin:0!important;padding:12px 16px!important;border-radius:18px;border:1px solid var(--sd-divider);background:var(--sd-field);cursor:pointer;transition:background-color .15s ease-out,border-color .15s ease-out}
html body .nx-applies-card input{margin:0}
html body .nx-applies-card:has(input:checked){background:var(--nx-sel-fill);border-color:var(--sd-action);box-shadow:inset 0 0 0 1px var(--sd-action)}
html body .nx-applies-card:has(input:focus-visible){outline:2px solid var(--sd-action);outline-offset:2px}
html body .nx-applies-copy{flex:1 1 auto;display:flex;flex-direction:column;gap:2px;min-width:0}
html body .nx-applies-copy strong{font-size:15px;font-weight:600;color:var(--sd-text)}
html body .nx-applies-copy small{font-size:13px;color:var(--sd-muted);font-variant-numeric:tabular-nums}
html body .nx-applies-n{flex:none;font:600 20px/1 Fraunces,ui-serif,Georgia,serif;color:var(--sd-text);font-variant-numeric:tabular-nums}
html body .nx-applies-card:has(input:checked) .nx-applies-n{color:var(--sd-action)}
@media (max-width:759px){
 html body .nx-wiz-steps button span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 html body .drawer-panel form .nx-wiz-steps button{min-height:24px;padding:10px 0!important;margin:-10px 0!important}
 html body .nx-wiz-of-name{display:inline}
 html body .drawer-panel form.nx-wiz>.nx-wiz-foot>:is(.button,button):not([hidden]){flex:none!important;min-height:48px}
 html body .nx-wiz-meta span{white-space:normal}
}
@media (prefers-reduced-motion:reduce){html body .nx-wiz-steps button i,html body .nx-applies-card{transition:none}}
/* short steps keep the footer at the bottom of the sheet */
html body .drawer-panel:has(>.read-detail-body>form.nx-wiz){display:flex;flex-direction:column}
html body .read-detail-body:has(>form.nx-wiz){flex:1 0 auto;display:flex;flex-direction:column}
html body .drawer-panel form.nx-wiz{flex:1 0 auto;display:flex;flex-direction:column}
html body .drawer-panel form.nx-wiz>.nx-wiz-foot{margin-top:auto!important}

/* ---------- Drawer footers, one rule for every drawer (Taylor, 2026-11-20) ----------
   The footer bled past the body with negative margins, but the body clips 4px inside the panel, so
   the planner's summary lost its first letters and Next touched the clipped edge. Now every footer
   sits in the body's own padding: its text starts where the fields start and its buttons end where
   they end, well inside the rounded corner, with room for hover tints and focus rings. The solid
   background (a spread shadow) and the hairline (an outset border image) still run edge to edge,
   clipped by the panel; the hairline hides when nothing scrolls below, as before. */
html body dialog .drawer-panel.nx-editor :is(.form-actions,.nx-todo-save):not(.sheet-footer),
html body .drawer-panel form.nx-wiz>.nx-wiz-foot{--nx-foot-bg:var(--sheet-bg,var(--sd-surface));margin-inline:0!important;padding-inline:0!important;border-top:1px solid transparent!important;border-image:linear-gradient(var(--sd-divider),var(--sd-divider)) 1 0 0 0/1px 0 0 0/0 100vmax;background:var(--nx-foot-bg)!important;box-shadow:0 0 0 100vmax var(--nx-foot-bg)!important;clip-path:inset(0 -100vmax -100vmax -100vmax);justify-content:flex-end;gap:12px!important}
html body dialog .drawer-panel[data-edges]:not([data-more-below]) :is(.form-actions,.nx-todo-save):not(.sheet-footer),
html body .drawer-panel[data-edges]:not([data-more-below]) form.nx-wiz>.nx-wiz-foot{border-image:none}
/* The planner's running summary: left, never clipped; the count on one line, the detail up to two. */
html body .drawer-panel form.nx-wiz>.nx-wiz-foot>.nx-wiz-meta{flex:1 1 0;min-width:0;align-self:center}
html body .drawer-panel .nx-wiz-meta b{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body .drawer-panel .nx-wiz-meta span:not(.nx-wiz-why){white-space:normal!important;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:clip}
html body .drawer-panel .nx-wiz-meta .nx-wiz-why{display:flex!important;overflow:hidden}
/* Confirmations: Discard (and confirmAction's named action) is the quiet destructive text, like Remove
   person, not a filled pill. Its hover tint and focus ring draw inside the actions row's own inset. */
html body :is(#discard-dialog,#setup-discard) #discard-changes,html body #setup-discard .button.danger{background:transparent!important;border-color:transparent!important;box-shadow:none!important;color:var(--sd-tile-error)!important;font-weight:600}
@media (hover:hover){html body :is(#discard-dialog,#setup-discard) #discard-changes:hover,html body #setup-discard .button.danger:hover{background:color-mix(in srgb,var(--sd-tile-error) 9%,var(--sd-surface))!important}}
html body :is(#discard-dialog,#setup-discard) #discard-changes:focus-visible,html body #setup-discard .button.danger:focus-visible{outline:2px solid var(--sd-tile-error)!important;outline-offset:2px!important}
html body :is(#discard-dialog,#setup-discard) .form-actions{padding:6px!important;margin:16px -6px -6px!important;max-width:calc(100% + 12px)}

/* One selected style for single-choice cards (Taylor, 2026-11-20): the access cards' 10% tint and
   2px outline, on the unavailable-day moves and the edit visit's "What this change applies to". */
html body .drawer-panel form .nx-closed-opt{position:relative}
html body .nx-closed-opt:has(input:checked),html body .drawer-panel form .nx-applies-card:has(input:checked){background:color-mix(in srgb,var(--sd-action) 10%,var(--sd-surface))!important}
html body .nx-closed-opt:has(input:checked)::after{content:"";position:absolute;inset:0;border:2px solid var(--sd-action);border-radius:inherit;pointer-events:none}
html body .nx-closed-opt:first-child{border-top-left-radius:17px;border-top-right-radius:17px}
html body .nx-closed-opt:last-child{border-bottom-left-radius:17px;border-bottom-right-radius:17px}
html body .nx-closed-opt:has(input:checked)+.nx-closed-opt{border-top-color:transparent}
html body .nx-applies-card:has(input:checked){border-color:var(--sd-action)!important;box-shadow:inset 0 0 0 1px var(--sd-action)!important}
html body .nx-applies-card:has(input:checked) .nx-applies-n{color:var(--sd-text)}
/* The unavailable-day switch, and its moves under it once on. */
html body .nx-plan-closed{margin-top:24px!important}
html body .nx-plan-closed .nx-closed-switch{margin:0!important}
html body .nx-plan-closed .nx-closed-opts{margin-top:12px}
html body .nx-closed-opts[hidden]{display:none!important}

/* Planner step 1: one column, so site names read in full (they wrap rather than truncate). */
html body .drawer-panel .nx-plan-sites{grid-template-columns:minmax(0,1fr)!important;max-height:min(340px,46vh)}
html body .drawer-panel form .nx-plan-site .nx-plan-site-name{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:20px}
html body .drawer-panel form .nx-plan-site .nx-plan-site-text small{white-space:normal}

/* Sampling-time cards (Taylor, 2026-11-20). One sampling time reads exactly like the single sample
   setup: no frame, no header. With 2+, each sampling time is an outlined card with a small header
   ("Sampling time 2 · Thu") and a remove ✕; Add another sampling time sits under the last card. */
html body .nx-samp-cards{display:flex;flex-direction:column;gap:12px}
html body .nx-samp.is-multi .nx-samp-card{padding:4px 16px 16px;border:1px solid var(--sd-divider);border-radius:16px;transition:border-color .2s ease-out}
html body .nx-samp.is-multi .nx-samp-card>.field{margin-top:4px}
html body .nx-samp-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;margin:0 -10px 4px 0}
html body .nx-samp-head[hidden]{display:none!important}
html body .nx-samp-title{font-size:15px;line-height:20px;font-weight:600;color:var(--sd-text);font-variant-numeric:tabular-nums}
html body .drawer-panel form .nx-samp-x{appearance:none;display:grid;place-items:center;flex:none;width:44px;height:44px;margin:0;padding:0!important;border:0!important;border-radius:999px;background:none!important;box-shadow:none!important;color:var(--sd-muted);cursor:pointer}
html body .nx-samp-x .icon{width:16px;height:16px}
@media (hover:hover){html body .drawer-panel form .nx-samp-x:hover{background:color-mix(in srgb,var(--sd-text) 6%,transparent)!important;color:var(--sd-text)}}
html body .nx-samp-x:focus-visible{outline:2px solid var(--sd-action);outline-offset:-2px}
html body .nx-samp-card.is-dup{border-color:var(--sd-tile-error)!important}
html body .nx-samp-card.is-dup .nx-dt-field{border-color:var(--sd-tile-error)!important}
html body .nx-samp-dup{display:flex;gap:6px;margin:8px 0 0;font-size:13px;line-height:18px;font-weight:500;color:var(--sd-tile-error)}
html body .nx-samp-dup[hidden]{display:none}
html body .drawer-panel form .nx-samp-add{gap:6px;margin:16px 0 0!important}
html body .nx-samp-add[hidden]{display:none!important}
html body .nx-samp-add .icon{width:16px;height:16px}
@media (prefers-reduced-motion:reduce){html body .nx-samp.is-multi .nx-samp-card{transition:none}}
html body .nx-rep-multi{display:block;margin:10px 0 0}
/* Repeats that two or more sampling times rule out: dimmed, and their radio never paints. */
html body .drawer-panel form .nx-plan-seg input:disabled{opacity:0!important;-webkit-appearance:none;appearance:none}
html body .drawer-panel form .nx-plan-seg label:has(input:disabled)>span{opacity:.4;cursor:default}
html body .nx-rep-multi[hidden]{display:none}


/* Planner step bar and "Step N of 5" stay in view (Taylor, 2026-11-20): sticky under the
   drawer heading (read-drawer.js sets --nx-drawer-head), solid, never glass. The scrolled
   hairline moves from the heading to below the bar. */
html body .drawer-panel form .nx-wiz-head{position:sticky;top:var(--nx-drawer-head,0px);z-index:4;margin:0 -24px 20px;padding:0 24px 12px;background:var(--sd-canvas);scroll-margin-top:var(--nx-drawer-head,0px)}
html body .drawer-panel.drawer-scrolled:has(form .nx-wiz-head)>.drawer-heading{box-shadow:0 -48px 0 0 var(--sd-canvas)!important}
html body .drawer-panel.drawer-scrolled form .nx-wiz-head{box-shadow:0 1px 0 rgb(var(--c-line)/.8)}

/* Phone: the step summary gets its own line above Back and Next, so it reads in full
   ("3 samples per site" / "Nov 23 – Dec 7") instead of squeezing beside the buttons. */
@media (max-width:480px){
 html body .drawer-panel form.nx-wiz>.nx-wiz-foot{flex-wrap:wrap;row-gap:10px}
 html body .drawer-panel form.nx-wiz>.nx-wiz-foot>.nx-wiz-meta{flex:1 0 100%;order:-1}
 html body .drawer-panel .nx-wiz-meta b{white-space:normal}
 html body .drawer-panel .nx-wiz-meta span:not(.nx-wiz-why){-webkit-line-clamp:1;white-space:nowrap!important;display:block}
}
/* Edit setup (release 2, Taylor 2026-11-20): the header button, Changed tags, and the Review's
   preview of added, moved and removed visits. Reuses the Review hero and card tokens above. */
html body .drawer-heading .nx-su-open{flex:none;align-self:center;margin:0 8px 0 auto!important;min-height:44px;padding:0 16px!important;border-radius:999px;gap:8px;font-size:15px;font-weight:600;white-space:nowrap;color:var(--sd-text);background:var(--sd-field)!important;border:1px solid var(--sd-divider)!important}
@media (hover:hover){html body .drawer-heading .nx-su-open:hover{background:var(--nx-sel-fill)!important}}
html body .drawer-heading .nx-su-open .icon{width:18px;height:18px}
html body .nx-changed-tag{display:inline-block;margin:0 0 0 8px;font-size:11px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;color:var(--sd-action);vertical-align:baseline}
html body .nx-wiz-steps li.has-changes button span::after{content:"";display:inline-block;width:6px;height:6px;margin:0 0 2px 6px;border-radius:50%;background:var(--sd-action);vertical-align:middle}
html body form[data-setup-edit] .nx-rv-top~:is(.nx-rv-cap,.nx-rv-card){display:none}
html body .nx-su-review{display:flex;flex-direction:column;gap:12px}
html body .nx-su-hero.is-none{background:var(--sd-field);border-color:var(--sd-divider)}
html body .drawer-panel form .nx-su-keep{margin:0!important;padding:14px 16px!important;min-height:64px;border-radius:18px;border:1px solid var(--sd-divider);background:var(--sd-field)}
html body .nx-su-lock{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-radius:18px;border:1px solid var(--sd-divider);background:var(--sd-field)}
html body .nx-su-lock>.icon{flex:none;width:18px;height:18px;margin-top:2px;color:var(--sd-muted)}
html body .nx-su-lock>div{display:flex;flex-direction:column;gap:2px;font-size:14px;line-height:20px;min-width:0}
html body .nx-su-lock strong{font-size:15px;font-weight:600;color:var(--sd-text)}
html body .nx-su-lock span{color:var(--sd-muted)}
html body .nx-su-cap{display:flex;align-items:center;gap:10px;margin:12px 0 0;font-size:16px;font-weight:600;color:var(--sd-text)}
html body .nx-su-cap small{font-size:14px;font-weight:400;color:var(--sd-muted)}
html body .nx-su-n{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:24px;padding:0 8px;border-radius:999px;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--sd-action);background:var(--nx-sel-fill)}
html body .nx-su-n.is-move{color:color-mix(in srgb,var(--sd-tile-warning) 70%,var(--sd-text));background:color-mix(in srgb,var(--sd-tile-warning) 14%,var(--sd-surface))}
html body .nx-su-card{border:1px solid var(--sd-divider);background:var(--sd-field);border-radius:20px;overflow:hidden}
html body .nx-su-row{display:flex;align-items:center;gap:12px;min-height:56px;padding:12px 16px;border-top:1px solid var(--sd-divider)}
html body .nx-su-row:first-child{border-top:0}
html body .nx-su-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
html body .nx-su-copy strong{font-size:15px;font-weight:600;color:var(--sd-text)}
html body .nx-su-copy span{font-size:14px;line-height:20px;color:var(--sd-muted);overflow-wrap:anywhere}
html body .nx-su-dates{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;flex:1 1 auto;min-width:0;font-size:15px;font-variant-numeric:tabular-nums}
html body .nx-su-dates small{flex-basis:100%;font-size:13px;color:var(--sd-muted)}
html body .nx-su-review s{color:var(--sd-muted);text-decoration-thickness:1.5px}
html body .nx-su-dates b{font-weight:600;color:var(--sd-text)}
html body .nx-su-arrow{color:var(--sd-muted)}
html body .nx-su-sites{flex:none;font-size:14px;color:var(--sd-muted);font-variant-numeric:tabular-nums}
html body .nx-su-row.is-removed .nx-ev{opacity:.6}

/* People search and paging (round 9). A search covers everyone; its total sits above the table.
   While a page loads the pager stays exactly where it was, "n of n" included: both arrows are
   disabled and the pressed one is a spinner (people-directory.js marks the pager data-paging,
   which outranks the hide-when-all-disabled rules here and in structure.css). */
html body .people-group-members>.people-results-count{margin:0 0 12px;padding-inline:4px;font-size:14px;line-height:20px;color:var(--sd-muted);font-variant-numeric:tabular-nums}
html body .pager[data-paging][data-paging][data-paging]{display:flex!important}
html body .pager[data-paging] .pager-controls[class][class]{display:flex!important}
html body .pager[data-paging] .pager-controls .button{cursor:progress}
html body .people-group-table[aria-busy=true]{cursor:progress}

/* Delete setup sits beside Edit setup as quiet destructive text (Taylor, 2026-11-20). */
html body .nx-su-delete{color:var(--sd-danger,rgb(var(--c-ember)))}
/* Delete setup sits at the bottom of Edit setup, under every step (Taylor, 2026-11-23). */
html body .nx-su-danger{margin:28px 0 4px;padding-top:20px;border-top:1px solid color-mix(in srgb,var(--sd-text) 10%,transparent);display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
html body .nx-su-danger .nx-su-delete{color:var(--sd-danger,rgb(var(--c-ember)));font-weight:600;min-height:44px;padding:0 20px;border-radius:999px}
html body .nx-su-danger p{margin:0;max-width:34ch;font-size:13px;line-height:1.4;color:var(--sd-muted)}

/* Delivery planning (Taylor, 2026-11-23): a Delivery chip on the day samples reach the lab, a
   warning when that day is a lab unavailable day, the Delivery block in each sampling-time card and
   the lab warning in the visit drawer. Quiet by default: an outlined chip in the program's colour. */
html body .nx-ev.nx-ev-delivery{--g:none;background:var(--sd-surface);color:var(--sd-text);box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--pc,var(--sd-action)) 50%,transparent);outline:0;border-radius:9px}
html body .nx-ev.nx-ev-delivery .nx-ev-glyph{color:color-mix(in srgb,var(--pc,var(--sd-action)) 80%,var(--sd-text))}
html body .nx-ev.nx-ev-delivery.has-custom .nx-ev-t{font-weight:700}
html body .nx-ev.nx-ev-delivery.has-labconf{background:color-mix(in srgb,var(--sd-tile-warning) 12%,var(--sd-surface));box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--sd-tile-warning) 70%,transparent)}
html body .nx-ev-labconf{flex:none;display:inline-grid;place-items:center;width:14px;height:14px;color:var(--sd-tile-warning)}
html body .nx-ev-labconf .icon{width:12px;height:12px;background:currentColor}
html body .nx-cal .nx-ev-slim .nx-ev-labconf{margin-left:auto}
html body .nx-ev.nx-ev-delivery.is-selected{box-shadow:inset 0 0 0 2px var(--sd-action)}
/* Icon tiles (Visits menu, key, review) match every other visit type: a filled tile, no outline (Taylor, 2026-11-23). */
html body .nx-ev.nx-ev-mini.nx-ev-delivery{background:color-mix(in srgb,var(--pc,var(--sd-action)) 15%,var(--sd-surface));box-shadow:none}
html body .nx-ev-sum.nx-ev-delivery{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--pc,var(--sd-action)) 40%,transparent)}
html body .nx-cal-labconfkey{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:6px;color:var(--sd-tile-warning);background:color-mix(in srgb,var(--sd-tile-warning) 14%,var(--sd-surface))}
html body .nx-cal-labconfkey .icon{width:12px;height:12px;background:currentColor}
html body .nx-plan-deliver .nx-plan-arrive{margin:0;display:flex;flex-direction:column;gap:12px}
/* Inside a sampling-time card (already a white card) the delivery block is a recessed warm well, not
   a second white card, so it reads as its own group (a hairline keeps its edge in dark); its time field and unchosen day chips are card-white (Taylor, 2026-11-23). */
html body .nx-plan-deliver .nx-slot-arrive{background:var(--sd-canvas);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sd-text) 9%,transparent);border:0;border-radius:var(--r-card-nested,20px)}
html body .nx-plan-deliver .nx-slot-arrive .nx-plan-rchip input:not(:checked)+span{background:var(--sd-surface)}
html body .nx-plan-deliver .nx-slot-arrive input[type=time]{background:var(--sd-surface)}
html body .nx-plan-deliver .nx-slot-custom{margin:0}
html body .nx-plan-deliver-fields{display:flex;flex-direction:column;gap:12px}
html body .nx-plan-deliver-fields[hidden]{display:none!important}
html body .nx-plan-days{gap:6px}
html body .drawer-panel form .nx-plan-days .nx-plan-rchip span{min-width:48px;justify-content:center;padding:0 12px}
html body .nx-plan-deliver-time{max-width:180px}
html body .nx-arrive-warn{margin:12px 0 0;display:flex;gap:8px;align-items:flex-start;font-size:14px;line-height:20px;color:color-mix(in srgb,var(--sd-tile-warning) 70%,var(--sd-text))}
html body .nx-arrive-warn[hidden]{display:none!important}
html body .nx-arrive-warn .icon{flex:none;width:16px;height:16px;margin-top:2px;background:currentColor}
html body .nx-unav-labblocks{display:flex;gap:8px;align-items:flex-start;margin:0 0 16px}
html body .nx-unav-labblocks[hidden]{display:none!important}
html body .nx-unav-labblocks .icon{flex:none;width:16px;height:16px;margin-top:2px}

/* Review unassigned samples (2026-11-24, NEXUS_UNASSIGNED_REVIEW_ENABLED). One card per site with
   divider rows, like the To do card; one quiet pill per suggested visit, the nearest one tinted. */
html body .nx-unassigned-intro{margin:0 0 24px;font-size:14px;line-height:20px;color:var(--sd-muted)}
html body .nx-unassigned-site+.nx-unassigned-site{margin-top:24px}
html body .nx-unassigned-site-name{display:flex;align-items:baseline;gap:8px;margin:0 0 8px;font:600 14px/20px Inter,sans-serif;color:var(--sd-text)}
html body .nx-unassigned-site-name .nx-count{margin:0;font-weight:500}
html body .nx-unassigned-list{list-style:none;margin:0;padding:0;overflow:hidden}
html body .nx-unassigned-row{display:grid;gap:4px;padding:16px;min-width:0;transition:opacity .2s ease-in,transform .2s ease-in}
html body .nx-unassigned-row+.nx-unassigned-row{border-top:1px solid var(--sd-border)}
html body .nx-unassigned-row.is-leaving{opacity:0;transform:translateX(12px)}
html body .nx-unassigned-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
html body .nx-unassigned-gtid{font-size:16px;line-height:22px;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
html body .nx-unassigned-chip{flex:none;font-size:12px;line-height:16px;font-weight:600;padding:4px 10px;border-radius:999px;white-space:nowrap;max-width:60%;overflow:hidden;text-overflow:ellipsis}
html body .nx-unassigned-chip[data-status=in_transit]{color:var(--sd-text);background:rgb(var(--c-canvas))}
html[data-stercus-theme=dark] body .nx-unassigned-chip[data-status=in_transit]{background:rgb(255 255 255/.08)}
html body .nx-unassigned-chip[data-status=collected]{color:#a05a12;background:rgb(196 120 30/.14)}
html body .nx-unassigned-chip[data-status=at_lab]{color:var(--sd-success,#3f7a4d);background:rgb(63 122 77/.12)}
html[data-stercus-theme=dark] body .nx-unassigned-chip[data-status=collected]{color:#f0b366;background:rgb(230 160 70/.16)}
html[data-stercus-theme=dark] body .nx-unassigned-chip[data-status=at_lab]{color:#7fcf8c;background:rgb(127 207 140/.14)}
html body .nx-unassigned-when{margin:0;font-size:14px;line-height:20px;color:var(--sd-text);font-variant-numeric:tabular-nums}
html body .nx-unassigned-meta,html body .nx-unassigned-none{margin:0;font-size:12px;line-height:16px;color:var(--sd-muted)}
html body .nx-unassigned-none{margin-top:4px}
html body .nx-unassigned-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
html body .nx-unassigned-actions:empty{display:none}
html body .drawer-panel .nx-unassigned-link.button{flex:0 0 auto;width:auto;min-height:36px;margin:0;padding:0 14px;font-size:14px;font-weight:600;border-radius:999px;border:1px solid var(--sd-border);background:transparent;color:var(--sd-text);box-shadow:none}
html body .drawer-panel .nx-unassigned-link.button[data-best]{color:var(--sd-action);border-color:color-mix(in srgb,var(--sd-action) 40%,transparent);background:color-mix(in srgb,var(--sd-action) 8%,transparent)}
html body .nx-unassigned-link[aria-busy=true]{opacity:.6}
html body .nx-unassigned-add.nx-text-link{margin:0;min-height:36px;gap:4px}
html body .nx-unassigned-add .icon{width:16px;height:16px;background:currentColor}
html body .nx-unassigned-error:not([hidden]){margin:8px 0 0;font-size:14px}
html body .nx-unassigned-empty .nx-allclear{margin:0}
@media (max-width:480px){html body .nx-unassigned-row{padding:14px 12px}html body .drawer-panel .nx-unassigned-link.button{flex:1 1 100%;justify-content:center}html body .nx-unassigned-chip{max-width:55%}}
@media (prefers-reduced-motion:reduce){html body .nx-unassigned-row{transition:none}}

/* Scroll-edge hairlines, everywhere (round 5b, Taylor's screenshot 7; scroll-edges.js
   marks the scrollers). A header's divider shows only once content has scrolled under
   it: drawers and sheets already key it off .drawer-scrolled (connected-enhancements.css).
   A footer's divider shows only while there is more content below it. Dividers switch,
   they don't animate. Before the first measurement ([data-edges] missing) they show as before. */
html body dialog .drawer-panel[data-edges]:not([data-more-below]) :is(.form-actions,.nx-todo-save,.setup-save-actions,.record-editor-footer,.drawer-footer){border-top-color:transparent!important}
html body dialog .drawer-panel[data-edges]:not([data-more-below]) .form-actions.sheet-footer{box-shadow:0 0 0 100vmax var(--sheet-bg,var(--sd-surface))!important}
/* Content keeps a gap above every pinned footer (sheet-chrome.js adds the spacer). */
html body dialog .drawer-panel .sheet-gap{flex:none;display:block;height:24px;margin:0;padding:0}
/* Pages: full-page editors pin their footer. On phones it's a bar with a top divider; on
   wider screens a floating card, whose shadow likewise only shows over content below. */
html[data-page-edges]:not([data-page-more-below]) #workspace form.nx-stepped .setup-save-actions{border-top-color:transparent!important;box-shadow:none!important}
@media (min-width:601px){html[data-page-edges]:not([data-page-more-below]) #workspace form.nx-stepped .setup-save-actions{border-top-color:var(--sd-divider)!important}}
/* Every setup drawer: 20px between fields. The form grid's gap (structure.css, hash-locked)
   came on top of each field's 20px margin, giving 36px (round 5b). */
html body .nx-editor .setup-form-grid{gap:0!important}

/* One footer rule (round 6, Taylor and Central), for every drawer and sheet with a pinned
   Cancel/Save row: Add and Edit site, program setup and Edit program, Add partner, person edit,
   import and the rest. sheet-chrome.js marks the panel, the footer and everything between them.
   - Nothing between the footer and the panel keeps bottom padding or margin, so the footer can
     reach the panel's bottom edge (page-editor padding, drawer padding, form padding all go).
   - The footer pins at bottom:0, flush, opaque, full width, with the safe area as its own bottom
     padding; only its top divider shows, and that follows the scroll edge (polish.css, #328).
   - Content clears it by the 24px .sheet-gap above it. */
/* (Weighted to win over each drawer's own padding, e.g. the site drawer's 28px and 36px, and the
   floating sheet's padding: round 8, a stacked Edit site showed the form 24px below its footer.) */
html body dialog[open] .drawer-panel[data-sheet-host][data-sheet-host][data-sheet-host][data-sheet-host]{padding-bottom:0!important;scroll-padding-bottom:96px}
html body dialog .drawer-panel[data-sheet-host] [data-sheet-path]{padding-bottom:0!important;margin-bottom:0!important}
html body dialog .drawer-panel[data-sheet-host] [data-sheet-footer][data-sheet-footer]{position:sticky!important;bottom:0!important;margin-bottom:0!important;padding-bottom:max(16px,env(safe-area-inset-bottom))!important;background:var(--sheet-bg,var(--sd-surface))!important;border-width:1px 0 0!important;border-radius:0!important;z-index:6}

/* A note under a card (".nx-card-foot" outside the card) has no divider above it: the line read
   as a stray hairline under the card (round 6: May need help, site drawer activity). Inside a
   card the divider stays. */
html body :not(.nx-card)>.nx-card-foot{border-top:0!important;padding:8px 4px 0!important}

/* Pagers say "1–2 of 2 partners" only when there is more than one page: a pager whose buttons
   are all disabled (everything already shows) is hidden, everywhere (round 6). The site picker
   marks its single page itself, so "Updating sites…" still shows while it loads. */
html body :is(.pager,.context-event-pagination):not(:has(button:not(:disabled):not([aria-disabled=true]))),html body .association-choice-pagination[data-one-page]{display:none!important}
/* Unavailable days: the Program picker and the Add button keep the first-load 16px gap after a
   day is added and the list redraws inside the sheet's form styles (round 6). */
html body .nx-unav>.field{margin:0!important}
html body .nx-unav>.field+.nx-unav-actions{margin-top:16px!important}

/* Search fields: one clear (×) button each (search-clear.js, round 6). 44px target, shown only
   while there is text; the browser's own cancel button is hidden so there is one control. */
html body .nx-search-clear-host{position:relative}
html body input.nx-search-clearable{padding-right:44px!important}
/* Rail search: no × while empty, so the placeholder gets that room and "Search" fits beside the + (Taylor, 2026-11-20). */
html body .nexus-search input.nx-search-clearable:placeholder-shown{padding-right:4px!important}
html body input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;display:none}
html body .nx-search-clear{position:absolute;right:0;top:50%;z-index:2;display:grid;place-items:center;width:44px;height:44px;margin:0;padding:0;border:0;border-radius:999px;background:none;box-shadow:none;color:var(--sd-muted);cursor:pointer;transform:translateY(-50%);-webkit-tap-highlight-color:transparent}
html body .nx-search-clear[hidden]{display:none!important}
html body .nx-search-clear .icon{width:16px;height:16px}
html body .nx-search-clear:focus-visible{outline:2px solid var(--sd-action);outline-offset:-6px}
@media (hover:hover){html body .nx-search-clear:hover{color:var(--sd-text)}}

/* ==== Round 7 (2026-11-18): floating stacked drawers (the loader glow was removed in round 8) ====
   Kept in one block; see tests/round7-glow-drawers.test.mjs. */
/* A floating column in a stacked layout (context-layers.js marks it data-context-float) always
   looks like a sheet: rounded, bordered and inset, the same as the drawer beside it. Before, the
   home-screen app's full-screen sheet rules made the second drawer a flat, square panel. */
html body dialog[open]>.drawer-panel.context-stack-panel[data-context-float]{border:1px solid var(--sd-border)!important;border-radius:var(--r-drawer)!important;box-shadow:0 24px 80px rgb(42 32 27/.2)!important;padding-top:0!important;padding-inline:28px!important;--drawer-inline:28px;overflow-y:auto;overscroll-behavior:contain}
html[data-stercus-theme=dark] body dialog[open]>.drawer-panel.context-stack-panel[data-context-float]{box-shadow:0 24px 80px rgb(0 0 0/.45)!important}
html body dialog[open]>.drawer-panel.context-stack-panel[data-context-float]>:is(.drawer-heading,.dialog-heading){margin-inline:-28px!important;padding:32px 28px 20px!important;border-radius:calc(var(--r-drawer) - 1px) calc(var(--r-drawer) - 1px) 0 0}

/* Long emails break only at their seams (emailHtml in html.js adds <wbr> after @ and before
   dots); a mid-word break happens only if one piece can't fit a line by itself. */
html body .people-profile-email,html body .detail-meta dd:has(>wbr){overflow-wrap:break-word}
/* App rows: the sign-in line stays on one line and truncates; the facts line wraps only between
   facts (only a fact too long for a whole line wraps inside itself, at a space), and a fact that starts a line drops its
   leading dot: each fact starts with a 16px lead-in holding its dot, and the line's first 16px are clipped. */
html body .nx-access-name{min-width:0}
html body .nx-access-name>.nx-signin{min-width:0;max-width:100%}
html body .nx-access-name>.nx-signin>.nx-signin-line{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body .nx-access-line{flex-wrap:wrap!important;gap:0!important;align-self:stretch;box-sizing:border-box;width:calc(100% + 16px);max-width:none;margin-left:-16px!important;clip-path:inset(0 0 0 16px)}
html body .nx-access-line>span{display:flex;flex:0 0 auto;max-width:100%}
html body .nx-access-line>span::before{content:"";flex:none;width:16px;margin:0!important;text-align:center}
html body .nx-access-line>span+span::before{content:"·"}
/* Site drawer title (read, editor, expanded and stacked): one line, truncated with an ellipsis
   before the Expand and Close buttons; the full name is in its title attribute (site-drawer.js). */
html body dialog.nx-site-drawer>.drawer-panel>.drawer-heading h2{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body dialog.nx-site-drawer>.drawer-panel>.drawer-heading>:first-child:not(h2):has(h2){flex:1 1 auto;min-width:0}
/* ==== end round 7 block ==== */

/* ==== Round 8 (2026-11-18): "Save <name>" on one line ====
   editors.js splits the label into .nx-submit-verb and .nx-submit-name. The button never wraps:
   the name truncates with an ellipsis, and in a footer too narrow for "Save" plus a few letters
   the name is dropped, leaving "Save". The full label is the button's aria-label and title. */
html body form .form-actions:has(.nx-submit-label){container:nx-submit-row/inline-size}
html body :is(button,.button):has(>.nx-submit-label){display:inline-flex;align-items:center;justify-content:center;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden}
html body .nx-submit-label{display:inline-flex;align-items:baseline;gap:.28em;min-width:0;overflow:hidden}
html body .nx-submit-verb{flex:none}
html body .nx-submit-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@container nx-submit-row (max-width:280px){html body .nx-submit-name{display:none}}
/* ==== end round 8 block ==== */
/* ==== round 9: Settings sub-pages (round 6, item 30) ==== */
/* System status opens from Settings: the rail keeps Settings highlighted, no tab is marked, and the
   phone header drops its Settings button there as on Settings itself (settings-route.js marks <html>). */
html[data-nx-settings] body #theme-button{color:var(--sd-action);background:var(--sd-surface);box-shadow:var(--card-shadow)}
html[data-nx-settings] body .dock .lab-lens{opacity:0!important}
@media (max-width:899px){html[data-nx-settings] body #theme-button{display:none}}
/* ==== end round 9 block ==== */
/* ==== round 9: System status (round 6, item 29) ==== */
/* The page is built from Settings' components (lab-setting-section, panel lab-settings-list,
   nx-settings-row, nx-account) and the People status chip, so its type scale is theirs. Only
   layout, tone and number figures are set here; no sizes of its own. */
/* Same centred 720px column as Settings, loaded and loading. */
@media (min-width:900px){html body:has(#workspace .nx-status-view) #workspace :is(.nx-settings-back,.page-heading,[data-monitor-page],.nx-status-view){width:100%;max-width:720px;margin-inline:auto!important}}
/* Text uses Inter's normal figures: the page-wide tabular-nums (top of this file) widens its
   hyphen ("Sign - in"). Only uptime numbers keep tabular figures so they line up. */
html body .nx-status-view{font-variant-numeric:normal}
html body .nx-status-view .lab-setting-section{max-width:none}
html body .nx-status-meta{flex:none;margin:0!important;font-variant-numeric:tabular-nums}
html body .nx-settings-row[data-state=setup] strong{color:var(--sd-muted)}
html body .nx-status-view .people-access-status{flex:none}
/* The summary's icon takes Today's to-do tones. */
html body .nx-status-summary[data-tone=good] .nx-todo-symbol{background:color-mix(in srgb,var(--sd-success,#3f7a4d) 14%,transparent);color:var(--sd-success,#3f7a4d)}
html body .nx-status-summary[data-tone=bad] .nx-todo-symbol{background:rgb(179 38 30/.1);color:var(--sd-danger,#b3261e)}
html body .nx-status-summary[data-tone=warn] .nx-todo-symbol{background:rgb(196 120 30/.14);color:#a05a12}
html body .nx-status-summary[data-tone=quiet] .nx-todo-symbol{background:rgb(var(--c-canvas));color:var(--sd-muted)}
[data-stercus-theme=dark] body .nx-status-summary[data-tone=warn] .nx-todo-symbol{background:rgb(230 160 70/.16);color:#f0b366}
[data-stercus-theme=dark] body .nx-status-summary[data-tone=bad] .nx-todo-symbol{background:rgb(255 110 95/.16);color:#ff8a7a}
html body .nx-status-history .nx-section-head{align-items:center;flex-wrap:wrap}
html body .nx-status-history .toolbar{margin:0;padding:0;gap:4px}
html body .nx-status-foot{margin:8px 4px 0}
/* Skeleton bars inside the same cards and rows. */
html body .nx-status-skel{display:block;height:14px;border-radius:7px;width:44%}
html body .nx-status-skel[data-size=heading]{height:20px;width:120px;margin:0 0 8px}
html body .nx-status-skel[data-size=title]{width:52%}
html body .nx-status-skel[data-size=sub]{width:30%;margin-top:8px}
html body .nx-status-skel[data-size=short]{width:32%}
html body .nx-status-skel[data-size=meta]{flex:none;width:56px}
html body .nx-status-view .nx-account-copy:has(.nx-status-skel),html body .nx-status-view .nx-settings-row>span:has(.nx-status-skel){flex:1}
html body .nx-account .nx-todo-symbol.loading-shape{border-radius:50%!important}
/* Phone: the refresh button sits at the right end of the title row, a 44px target, as on desktop.
   The usual right padding (room for the floating header buttons) isn't needed: here they sit beside
   the back button, a row above the title. */
@media (max-width:899px){
  html body:has(#workspace .nx-status-view) #workspace .page-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-right:0!important}
  html body:has(#workspace .nx-status-view) #workspace .page-heading>div{flex:1;min-width:0}
  html body:has(#workspace .nx-status-view) #workspace .page-heading .refresh-control{flex:none;margin:0 -10px 0 0}
}
html body:has(#workspace .nx-status-view) #workspace .page-heading [data-monitor-refresh]{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;display:grid;place-items:center}
/* ==== end round 9 System status block ==== */
/* ==== round 9: Settings rows and About Nexus (Taylor, Duo) ==== */
/* Every Settings card row centres its chevron and content vertically, and the first row of a card
   has no line above it. */
html body .lab-settings-list>a{align-items:center}
html body .lab-settings-list>:first-child{border-top:0}
/* About Nexus keeps the screen readout behind a closed "Device details" disclosure. */
html body .nx-device-details{margin-top:8px}
html body .nx-device-details>summary{cursor:pointer;min-height:44px;display:inline-flex;align-items:center;font-size:14px;font-weight:600;color:var(--sd-action-text-on-surface,var(--sd-action))}
html body .nx-device-details>summary::-webkit-details-marker{display:none}
html body .nx-device-details .nx-screen-facts{margin:0;overflow-wrap:anywhere}
/* ==== end round 9 Settings block ==== */

/* Auto-link (round 9): the label and evidence on auto-linked visits, and its preview drawer. */
.nx-autolink{display:grid;gap:10px;margin:14px 0 4px}
.nx-autolink-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:0;color:var(--muted,#6b6158);font-size:14px}
.nx-autolink-pill{display:inline-flex;align-items:center;gap:6px;min-height:26px;padding:0 10px;border-radius:999px;background:rgb(70 104 160/.12);color:#3c5f99;font-size:13px;font-weight:650;letter-spacing:.01em}
.nx-autolink-pill .icon{width:13px;height:13px}
.nx-autolink-actions{display:grid;gap:6px;justify-items:start}
.nx-autolink-actions p{margin:0}
.nx-autolink-entry{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px}
.nx-autolink-preview code,.sample-batch-row code{font-size:12px;color:var(--muted,#6b6158)}
@media (prefers-color-scheme:dark){:root:not([data-stercus-theme="light"]) .nx-autolink-pill{background:rgb(140 170 220/.16);color:#a9c1ea}}
:root[data-stercus-theme="dark"] .nx-autolink-pill{background:rgb(140 170 220/.16);color:#a9c1ea}
.nx-autolink-actions.sample-link-action{margin:2px 0 0;padding:0;border:0}

/* Person setup (2026-11-19): Add person and Edit person ask program first, then
   partner OR site, then that kind's choices. Same parts as Program setup and Add
   site (field labels, .nx-site-list rows, one card per list); tighter rhythm. */
#overlay#overlay .association-picker{display:grid;gap:20px;min-width:0}
#overlay#overlay .association-picker>*{margin:0!important}
#overlay#overlay .association-picker-intro>p{margin:0!important}
#overlay#overlay fieldset.association-kind{min-width:0;margin:0;padding:0;border:0}
#overlay#overlay fieldset.association-kind>legend{display:block;margin:0 0 8px;padding:0;font:600 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--sd-text)}
#overlay#overlay .association-mixed-note{margin:0 0 8px!important;font-size:14px!important;line-height:20px!important}
#overlay#overlay .association-program-note{display:block;font-size:14px;line-height:20px;color:var(--sd-muted)}
#overlay#overlay .association-picker .association-choice-group,#overlay#overlay .onboarding-scope-custom .association-choice-group{display:grid;gap:8px;min-width:0}
#overlay#overlay :is(.association-picker,.onboarding-scope-custom) .association-choice-heading{margin:0!important}
#overlay#overlay :is(.association-picker,.onboarding-scope-custom) .association-choice-heading h4{margin:0;font:600 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--sd-text)}
#overlay#overlay :is(.association-picker,.onboarding-scope-custom) .association-picker-search{min-height:44px;margin:0!important}
#overlay#overlay :is(.association-picker,.onboarding-scope-custom) .association-picker-search input{font-size:16px!important}
#overlay#overlay .onboarding-pane .onboarding-step-body>.nx-step-head-copy{margin:0 0 4px!important}
#overlay#overlay .onboarding-pane .onboarding-step-body>.nx-step-group{margin:0!important}
#overlay#overlay .onboarding-pane .onboarding-step-body>.nx-step-group+.nx-step-group{padding-top:20px;border-top:1px solid var(--sd-divider)}
#overlay#overlay .onboarding-pane .onboarding-step-body .nx-step-group-title{margin:0 0 8px!important;font:600 14px/20px Inter,ui-sans-serif,system-ui,sans-serif!important}
#overlay#overlay .onboarding-scope-custom{display:grid;gap:16px;margin-top:16px}
#overlay#overlay .onboarding-scope-custom>.field{margin:0!important}
#overlay#overlay .onboarding-scope-note{margin:0!important;font-size:14px!important;line-height:20px!important}
#overlay#overlay .association-picker-intro>p.small{font-size:14px!important;line-height:20px!important;color:var(--sd-muted)}
#overlay#overlay .association-picker-intro>h3{margin:0 0 4px!important}
/* Phone: Add person's progress is bars with "Step 2 of 4 · Associations" below, like
   longer stepped flows, so no label is cut off; an app's action sits under its summary. */
@media (max-width:600px){
 .nx-stepped.onboarding-form[data-nx-step-count="4"] .nx-steps>button{min-height:44px;padding-block:20px;margin-block:-20px}
 .nx-stepped.onboarding-form[data-nx-step-count="4"] .nx-steps>button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .nx-stepped.onboarding-form[data-nx-step-count="4"] .nx-steps-caption{display:block;margin-top:4px}
 #overlay#overlay .onboarding-pane .onboarding-step-body .people-access-card{grid-template-columns:minmax(0,1fr);grid-template-areas:"pick" "summary" "action";row-gap:4px}
 #overlay#overlay .onboarding-pane .onboarding-step-body .people-access-card>.button{justify-self:start;margin:8px 0 0 72px!important}
}
/* Apps rows on Add person: checkbox, the app's mark, then name and summary on one left edge
   (20px box + 12px + 28px mark + 12px = 72px). Same nx-app-mark as the person page. */
#overlay#overlay .onboarding-pane .onboarding-step-body .people-access-card>.choice-row>.nx-app-mark{flex:none;width:28px;height:28px;margin:-2px 0}
#overlay#overlay .onboarding-pane .onboarding-step-body .people-access-card:has(>.choice-row>.nx-app-mark)>p{margin:0 0 0 72px!important}
/* ---------- C16 (2026-11-19): Edit on past and collected visits ---------- */
/* The locked record keeps its look; Edit sits at the end, Remove (past visits only) stays apart on the left. */
html body .nx-past-visit .form-actions{justify-content:flex-end}
html body .nx-vr-actions{display:flex;justify-content:flex-end;gap:8px;margin:16px 0 0}
/* Collected visits in the editor: dates read as a locked card, not inputs. */
html body .nx-act-locked{display:grid;gap:8px;margin-bottom:12px}
html body .nx-act-locked .nx-vr-facts,html body .nx-act-locked-arrive{margin:0}
html body .nx-act-past{margin:0 0 8px}

/* Edit access, one look for every app (2026-11-19). Keystone, Action, Insight and Nexus
   use the Add person / Edit person parts: section titles, the shared selection style for every
   choice list (.nx-choice-list in setup-steps.css), and Nexus's standard switch rows. */
#overlay#overlay .nx-access-editor{display:grid;gap:24px;min-width:0}
#overlay#overlay .nx-access-editor>*{margin:0!important}
#overlay#overlay .nx-access-section{display:grid;gap:12px;min-width:0;margin:0!important;padding:0;border:0}
#overlay#overlay .nx-access-section+.nx-access-section{padding-top:24px;border-top:1px solid var(--sd-divider)}
#overlay#overlay .nx-access-title{margin:0!important;font:600 17px/24px Inter,ui-sans-serif,system-ui,sans-serif!important;letter-spacing:0;color:var(--sd-text)}
#overlay#overlay .nx-access-section .field{margin:0!important}
#overlay#overlay .nx-access-help{margin:0!important;font-size:14px!important;line-height:20px!important;color:var(--sd-muted)}
#overlay#overlay .nx-access-section [data-access-profile]:not([hidden]){display:grid;gap:12px;min-width:0}
#overlay#overlay .nx-access-editor .association-choice-group{display:grid;gap:8px;min-width:0;margin:0!important}
#overlay#overlay .nx-access-editor .association-choice-heading{margin:0!important}
#overlay#overlay .nx-access-editor .association-choice-heading h4{margin:0;font:600 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--sd-text)}
#overlay#overlay .nx-access-editor .association-choice-heading h4>small{display:block;font-size:12px;font-weight:400;color:var(--sd-muted);overflow-wrap:anywhere}
#overlay#overlay .nx-access-editor .association-choice-heading>span{font-size:14px;font-variant-numeric:tabular-nums;color:var(--sd-muted)}
#overlay#overlay .nx-access-editor .association-picker-search{min-height:44px;margin:0!important}
#overlay#overlay .nx-access-editor .association-picker-search input{font-size:16px!important}
#overlay#overlay .nx-access-editor [data-access-row][hidden],#overlay#overlay .nx-access-editor [data-access-choice][hidden],#overlay#overlay .nx-access-editor [data-access-group][hidden]{display:none!important}
#overlay#overlay .nx-access-editor .association-choice-row input[type=radio]{flex:none;width:20px;height:20px;margin:0;accent-color:var(--sd-action)}
#overlay#overlay .nx-access-editor .nx-site-option :is(strong,small){white-space:normal;overflow:visible}
/* A note only when the app's copy of their name or email differs from Nexus. */
#overlay#overlay .nx-access-note{display:flex;align-items:flex-start;gap:8px;padding:12px 16px;border-radius:14px;background:var(--sd-field);font-size:14px;line-height:20px;color:var(--sd-text)}
#overlay#overlay .nx-access-note>.icon{flex:none;width:16px;height:16px;margin-top:2px;color:var(--sd-muted)}
/* Insight: one search, then a card of sites per program. */
#overlay#overlay .nx-access-sites{display:grid;gap:12px;margin:0!important}
#overlay#overlay .nx-access-sites .people-site-count{margin:0 4px!important}
#overlay#overlay .nx-access-sites .people-site-groups{display:grid;gap:20px;margin:4px 0 0!important;padding:0;border:0;min-width:0}
#overlay#overlay .nx-access-sites .people-site-group{margin:0!important}
/* Action portals: the name is the row's own choice; once ticked, its role is a segmented
   choice (Nexus's .nx-plan-seg) and the default portal a small pill, both inside the row. */
#overlay#overlay .nx-access-editor .nx-access-portal{display:grid}
#overlay#overlay .nx-access-editor .nx-choice-head{display:flex;align-items:center;gap:12px;min-height:56px;margin:0!important;padding:8px 16px;border:0!important;background:transparent!important;box-shadow:none!important;cursor:pointer}
#overlay#overlay .nx-access-editor .nx-choice-head>input{flex:none;width:20px;height:20px;margin:0;accent-color:var(--sd-action)}
#overlay#overlay .nx-access-editor .nx-choice-head strong{font-size:16px;line-height:22px;font-weight:500;color:var(--sd-text)}
#overlay#overlay .nx-access-editor .nx-access-portal-options{display:none;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:0 16px 14px 48px}
#overlay#overlay .nx-access-editor .nx-access-portal:has(>.nx-choice-head>input:checked)>.nx-access-portal-options{display:flex}
/* The role control sits on the selected row's tint, so it has its own solid track and
   full-strength text: unselected labels in the body ink on the surface, the chosen role in
   the surface colour on the body ink. Ink and surface keep ≥14:1 in every palette, light and
   dark; the action colour with its ink fell under 4.5:1 in the dark palettes. */
#overlay#overlay .nx-access-editor .nx-access-roles{display:inline-grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(76px,auto);gap:2px;padding:3px;border-radius:12px;background:var(--sd-surface);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sd-text) 24%,var(--sd-surface))}
#overlay#overlay .nx-access-editor .nx-access-roles span{min-height:32px;padding:0 12px;border-radius:9px;font-size:14px;font-weight:500;white-space:nowrap;color:var(--sd-text)}
#overlay#overlay .nx-access-editor .nx-access-roles input:checked+span{background:var(--sd-text);color:var(--sd-surface);font-weight:600;box-shadow:none}
@media (hover:hover){#overlay#overlay .nx-access-editor .nx-access-roles input:not(:checked)+span:hover{background:color-mix(in srgb,var(--sd-text) 8%,var(--sd-surface))}}
#overlay#overlay .nx-access-editor .nx-access-portal-options>.nx-access-help{flex-basis:100%}
#overlay#overlay .nx-access-editor .nx-access-default{position:relative;display:inline-flex;align-items:center;min-height:32px;margin:0!important;padding:0 12px!important;border:1px solid var(--sd-divider)!important;border-radius:999px!important;background:var(--sd-surface)!important;box-shadow:none!important;font:500 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--sd-muted);cursor:pointer}
#overlay#overlay .nx-access-editor .nx-access-default>input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
#overlay#overlay .nx-access-editor .nx-access-default:has(input:checked){border-color:var(--sd-action)!important;color:var(--sd-action);font-weight:600}
#overlay#overlay .nx-access-editor .nx-access-default:has(input:focus-visible){outline:2px solid var(--sd-action);outline-offset:2px}
/* Sign-in: Nexus's standard switch rows in one card. */
#overlay#overlay :is(.nx-access-toggles,.nx-switch-card){display:grid;border:1px solid var(--sd-divider);border-radius:16px;overflow:hidden;background:var(--sd-surface)}
#overlay#overlay :is(.nx-access-toggles,.nx-switch-card)>.nx-switch-row{margin:0!important;padding:12px 16px;min-height:64px;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
#overlay#overlay :is(.nx-access-toggles,.nx-switch-card)>.nx-switch-row+.nx-switch-row{border-top:1px solid var(--sd-divider)!important}
#overlay#overlay :is(.nx-access-toggles,.nx-switch-card)>.nx-switch-row strong{font-weight:500}
#overlay#overlay .nx-access-toggles>.nx-switch-row:has(input:disabled){cursor:default}
#overlay#overlay .nx-access-toggles>.nx-switch-row input:disabled{opacity:.5}
@media (max-width:600px){#overlay#overlay .nx-access-editor .nx-access-portal-options{padding-left:16px}#overlay#overlay .nx-access-editor .nx-access-roles{display:grid;grid-auto-columns:auto;width:100%}}

/* Edit person pass (2026-11-19): the employee switch card sits like Add person's, and
   a hidden results-alerts row leaves no divider behind. */
#overlay#overlay .person-employee-card{margin:0 0 24px}
#overlay#overlay .nx-switch-card>.nx-switch-row[hidden]{display:none!important}
/* Confirmations (#discard-dialog, used by confirmAction too): the actions row carries
   its own inset, so a button's hover tint, outline, focus ring and pressed state
   always draw fully inside the dialog, at any width. */
html body :is(#discard-dialog,#setup-discard) .form-actions{overflow:visible!important;padding:6px!important;margin:14px -6px -6px!important;flex-wrap:wrap;justify-content:flex-end;gap:8px}
html body :is(#discard-dialog,#setup-discard) .form-actions>.button{flex:none;max-width:100%}
/* Edit person matches Add person's Associations step: 15/22 help line, 500-weight row titles. */
#overlay#overlay .association-picker-intro>p.small{font-size:15px!important;line-height:22px!important}
#overlay#overlay .association-picker .nx-choice strong{font-weight:500}

/* ---------- Program tab rail (Taylor, 2026-11-19) ----------
   Under 900px (phones, the Duo cover screen) the program tabs keep the desktop
   layout, icon left and label right, and the row scrolls sideways instead of
   squeezing. Tabs share the width while they fit and never wrap or truncate.
   tab-rail.js keeps the selected tab in view and sets data-overflow-start/end,
   which fade only the edge with more tabs past it (programs.css [data-scroll-rail]).
   Replaces the older phone rules (equal columns, icon over label). Desktop is unchanged. */
@media (max-width:899px){
 html body #workspace .setup-tabs.nx-program-tabs>.setup-tab-scroll{display:flex!important;flex-wrap:nowrap;gap:0!important;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-inline:24px;scrollbar-width:none}
 html body #workspace .setup-tabs.nx-program-tabs>.setup-tab-scroll::-webkit-scrollbar{display:none}
 html body #workspace .setup-tabs.nx-program-tabs>.setup-tab-scroll>a{flex:1 0 auto!important;width:auto!important;min-width:44px!important;min-height:44px!important;flex-direction:row!important;justify-content:center;gap:8px!important;padding:0 14px!important;font-size:14px!important;line-height:20px!important;white-space:nowrap!important;text-align:left;scroll-snap-align:start}
 html body #workspace .setup-tabs.nx-program-tabs>.setup-tab-scroll>a>.icon{width:16px!important;height:16px!important;flex:none}
 html body #workspace .nx-program-tabs .nx-program-tab-label{overflow:visible;overflow-wrap:normal;text-overflow:clip;max-width:none}
}
/* Sampling group under the site name, so long names keep their width (Taylor, 2026-11-20). */
.nx-plan-site .nx-plan-site-text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;padding:4px 0}
.nx-plan-site .nx-plan-site-text small{margin-left:0;line-height:16px}
body .drawer-panel form .nx-plan-site{min-height:44px}

/* The resulting date under Sampling ends and Collect day (Taylor, 2026-11-20). */
.nx-plan-date{margin:6px 0 0;font-size:14px;font-weight:600;color:var(--sd-text);font-variant-numeric:tabular-nums}
.nx-plan-date[hidden]{display:none}

/* Planner crew (Taylor, 2026-11-20): people at the chosen sites first, then everyone else; search past 10. */
.nx-crew-pick{display:grid;gap:12px}
.nx-crew-pick .nx-crew-find{margin:0}
.nx-crew-group{display:grid;gap:8px}
html body .nx-crew-group[hidden],html body .nx-crew-pick .nx-team-chip[hidden],html body .nx-crew-pick [hidden]{display:none!important}
.nx-crew-label{margin:0;font-size:12px;line-height:16px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--sd-muted)}
.nx-crew-none{margin:0;font-size:14px}

/* Visit change log (Taylor, 2026-11-20). */
.nx-vh-list{list-style:none;margin:0;padding:0}
.nx-vh-row{display:flex;flex-direction:column;gap:2px;padding:12px 16px;border-top:1px solid var(--sd-divider)}
.nx-vh-row:first-child{border-top:0}
.nx-vh-what{font-size:15px;font-weight:500;color:var(--sd-text)}
.nx-vh-meta,.nx-vh-note{font-size:13px;color:var(--sd-muted)}
.nx-vh-note{margin:8px 0 0}
