/* Karen OS, the Window Trendz Group business OS on the web: My day, Jobs, Orders, Installs,
   Invoices to chase, Karen's workflows and Peggy's admin pages.
   Karen green: soft green-grey ground, white cards with 14px corners, green buttons and links,
   Figtree. Status colours always come with words. No inline styles anywhere (CSP style-src 'self'). */

/* Figtree (SIL Open Font License, assets/fonts/Figtree-OFL.txt), self-hosted: one variable font, 400 to 800 */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("assets/fonts/Figtree-Latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("assets/fonts/Figtree-LatinExt.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --font: "Figtree", "Segoe UI Variable", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  --ground: #F5F7F4; --surface: #FFFFFF; --line: #E2E8E3; --divider: #EEF2EF; --ink: #16231D; --muted: #5B6B63;
  --green-900: #1E4A3D; --green-700: #2F6B55; --green-100: #E6F0EA; --green-hover: #275A47;
  --amber: #7A4F00; --amber-bg: #FFF1D6; --amber-bar: #D9A23A;
  --red: #A1251B; --red-bg: #FCE8E6;
  --blue: #1F5F99; --blue-bg: #E7EFF8;
  --input: #C9D3CC; --grey-ink: #3B4A43;
  --r-card: 14px; --r-ctl: 10px;
  /* Old names some pages still use */
  --bg: var(--ground); --panel: var(--surface); --text: var(--ink); --rule: var(--divider); --edge: var(--line);
  --accent: var(--green-700); --ok: var(--green-700); --warn: var(--amber); --err: var(--red);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--ground); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased;
  font-size: 15px; line-height: 1.45; overflow-x: hidden; }
[hidden] { display: none !important; }

/* Page titles: 24px on a phone up to 32px on a big screen */
h1 { font-size: clamp(24px, 14px + 1.5vw, 32px); font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 1.15; overflow-wrap: break-word; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; }
p { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 4px 0 12px; overflow-wrap: break-word; }
ol { font-size: 14px; line-height: 1.6; color: var(--muted); padding-left: 20px; margin: 6px 0; }
a { color: var(--green-700); text-underline-offset: 2px; }
a:hover { color: var(--green-900); }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; }

/* ---------- Layout: menu and pages ----------
   The menu: full (1280px and wider), a rail of icons with their names on hover or focus (901 to
   1279px), or a Menu button (900px and narrower). Nothing on a page ever makes it scroll
   sideways: wide things (the Installs week, tables) scroll inside their own card. */
#app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; overflow-x: clip; }

.side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 16px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
.brand .mark { width: 36px; height: 36px; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wm { font-size: 19px; font-weight: 800; color: var(--green-900); line-height: 1.1; }
.company { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menubtn { display: none; }

.navlist { display: flex; flex-direction: column; gap: 18px; flex: 1; }
kbd { font: 500 12px var(--font); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--surface); color: var(--muted); }
.navgroup { display: flex; flex-direction: column; gap: 2px; }
.navhead { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 12px 6px; }
.navlist a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: var(--r-ctl);
  font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; }
.navlist a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.navlist a span { flex: 1; }
.navlist a:hover { background: var(--ground); color: var(--ink); }
.navlist a.on { background: var(--green-100); color: var(--green-900); font-weight: 700; }
/* Sub folders under the Inbox (Leads, Calendar) */
.navlist a.navsub { min-height: 36px; padding-left: 28px; font-size: 14px; gap: 10px; }
.navlist a.navsub svg { width: 17px; height: 17px; }
@media (min-width: 901px) and (max-width: 1279px) { .navlist a.navsub { padding-left: 0; min-height: 40px; } }
.badge { font-size: 12px; font-weight: 700; color: #FFFFFF; background: var(--green-700); border-radius: 999px; padding: 2px 8px; line-height: 1.3; }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--green-700); color: #FFFFFF; font-weight: 700; font-size: 14px;
  display: grid; place-items: center; flex: none; }
.whobox { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.who { font-size: 14px; font-weight: 600; }
.whoemail { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.signout { align-self: flex-start; border: 0; background: transparent; padding: 0; color: var(--green-700); font: 500 13px var(--font);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer; min-height: 24px; }

main { min-width: 0; }
.banner { margin: 0; padding: 12px 40px; background: var(--surface); border-bottom: 1px solid var(--line); }
.banner:empty { display: none; }
.view-in { padding: 32px 40px 60px; display: flex; flex-direction: column; gap: 20px; min-width: 0; max-width: 1600px; }
.view-in > p { margin: 0; }
.vhead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.vtitle { flex: 1 1 280px; min-width: 0; }
.vacts { display: flex; gap: 10px; flex-wrap: wrap; }
.dateline { font-size: 15px; margin: 4px 0 0; color: var(--muted); }
.vtitle .dateline:first-child { margin: 0 0 4px; }
.lede { max-width: 760px; font-size: 15px; }
.foot { font-size: 13px; }
.crumbs { margin: 0 0 4px; font-size: 14px; }
.crumbs a { font-weight: 600; text-decoration: none; }
.crumbs a::before { content: "‹ "; }

/* Peggy phones: its pages as tabs along the top */
.subnav { display: flex; gap: 6px; padding: 16px 40px 0; overflow-x: auto; scrollbar-width: thin; }
.subnav a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.subnav a:hover { border-color: var(--input); }
.subnav a.on { background: var(--green-900); border-color: var(--green-900); color: #FFFFFF; }
.subnav:not([hidden]) ~ .view .view-in { padding-top: 24px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); min-width: 0; }
/* Tables too wide for their card scroll inside it, never off the page */
.card.tbl, .card.ttable { overflow-x: auto; overflow-y: hidden; }
.card.pad { padding: 18px 22px; }
.card.pad > :first-child { margin-top: 0; }
.card h2 + p { margin-top: 2px; }
.narrowcard { max-width: 520px; }
.cardhead { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.cardhead h2 { flex: 1; margin: 0; font-size: 18px; }
.cardhead a { font-size: 14px; }
.cardhead.plain { border-bottom: 0; padding: 0 0 6px; }
.card:not(.pad) > .cardhead.plain { padding: 16px 22px 6px; }
.cardfoot { padding: 14px 22px; font-size: 14px; font-weight: 600; }
.cardfoot:empty { display: none; }
.count { font-size: 14px; color: var(--muted); font-weight: 600; }
.status { color: var(--ink); }
.sechead { margin: 6px 0 0; font-size: 18px; }

/* ---------- Fields and buttons ---------- */
label.l { display: block; font-size: 13px; font-weight: 600; color: var(--grey-ink); margin: 14px 0 6px; }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=time], input[type=date], input[type=password],
input[type=number], input[type=url], input[type=month], input[type=datetime-local], select, textarea {
  height: 44px; border: 1px solid var(--input); border-radius: var(--r-ctl); background: var(--surface);
  padding: 0 12px; font: 400 15px var(--font); color: var(--ink); width: 100%; min-width: 0; }
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #7C8A83; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green-700); outline-offset: -1px; border-color: var(--green-700); }
input:disabled { background: var(--divider); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--green-700); margin: 0; flex: none; }

.btn { font: 600 15px var(--font); min-height: 44px; padding: 0 18px; border-radius: var(--r-ctl); border: 1px solid var(--input);
  background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: var(--grey-ink); color: var(--ink); }
.btn.primary { background: var(--green-700); border-color: var(--green-700); color: #FFFFFF; font-weight: 700; }
.btn.primary:hover { background: var(--green-hover); border-color: var(--green-hover); color: #FFFFFF; }
.btn.outline { border-color: var(--green-700); color: var(--green-700); font-weight: 700; }
.btn.outline:hover { background: var(--green-100); color: var(--green-900); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn.icon { width: 44px; padding: 0; font-size: 20px; }
.link { border: 0; background: transparent; color: var(--green-700); cursor: pointer; font: 600 14px var(--font); padding: 0;
  text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--green-900); }
.link.danger { color: var(--red); }
.rm { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 15px; width: 40px; height: 40px; border-radius: var(--r-ctl); }
.rm:hover { background: var(--divider); color: var(--ink); }

.rowbtns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.msg { font-size: 14px; color: var(--muted); overflow-wrap: break-word; min-width: 0; }
.msg:empty { display: none; margin: 0; }   /* an empty message takes no room (and no gap in a column) */
.msg.err { color: var(--red); font-weight: 600; }
.list > .msg { margin: 0; padding: 24px 20px; }   /* a list that couldn't load: the same room as an empty one */
.msg.ok { color: var(--green-700); font-weight: 600; }
.narrow { max-width: 420px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 420px; }
.two.wide { max-width: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin-top: 14px; }
.check input { margin-top: 2px; }
details.help { font-size: 14px; color: var(--muted); }
details.help summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details.help p { max-width: 760px; }

/* ---------- Pills, status words ---------- */
.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--divider);
  color: var(--grey-ink); vertical-align: middle; white-space: nowrap; line-height: 1.3; }
.pill.warn, .pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.blue { background: var(--blue-bg); color: var(--blue); }
.pill.green { background: var(--green-100); color: var(--green-900); }
.pill.brand-wt { background: #E6F0EA; color: #1E4A3D; }
.pill.brand-c2u { background: #F6E6E9; color: #560F1C; }
.pill.brand-ed { background: #FBEADF; color: #8A3A0E; }
.pills { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 4px; }
.state { display: inline-flex; align-items: center; gap: 7px; }
.state i, .dot { width: 9px; height: 9px; border-radius: 50%; background: #9AA8A1; flex: none; display: inline-block; }
.state.good i, .dot.good { background: var(--green-700); }
.state.bad i, .dot.bad { background: var(--red); }
.state.warn i, .dot.warn { background: var(--amber-bar); }
.state.bad, span.bad { color: var(--red); font-weight: 600; }
.t-ok { color: var(--green-700); } .t-warn { color: var(--amber); } .t-err { color: var(--red); } .t-muted { color: var(--muted); }

/* Group switches drawn as pills (Backorders, Invoices to chase) */
.pills-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ptab { font: 600 14px var(--font); min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.ptab:hover { border-color: var(--input); }
.ptab.on { background: var(--green-900); border-color: var(--green-900); color: #FFFFFF; font-weight: 700; }
.ptab .tabn, .ptab b { font-size: 12px; font-weight: 700; }
.ptab.on .tabn { background: rgba(255,255,255,0.18); color: #FFFFFF; }

/* ---------- Avatars ---------- */
.pav { flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--green-700); color: #FFFFFF; font-weight: 700; font-size: 12px; }
.pav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pav.sm { width: 34px; height: 34px; }
.pav.lg { width: 72px; height: 72px; font-size: 24px; }
.pav.call { background: var(--red); color: #FFFFFF; }
.pav.free { background: var(--green-700); color: #FFFFFF; }
.pav.away { background: var(--amber-bg); color: var(--amber); }
.pav.off { background: var(--divider); color: var(--grey-ink); }
/* My day: a coloured ring for where they are */
.pav.ring { background: var(--divider); color: var(--ink); border: 3px solid #9AA8A1; }
.pav.ring.call { border-color: #B3261E; } .pav.ring.free { border-color: var(--green-700); }
.pav.ring.away { border-color: #C9A227; } .pav.ring.off { border-color: var(--line); color: var(--muted); }

/* ---------- Tiles ---------- */
/* As many tiles across as fit at 220px or more (four on a wide screen, two on a narrow one) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
#wfxero { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px; min-width: 0; color: var(--ink); text-decoration: none; }
a.tile:hover { border-color: var(--input); color: var(--ink); }
.tile .kicker { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }
.tile .val { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }
.tile .sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.tile .go { font-size: 13px; color: var(--green-700); font-weight: 600; }
.kicker { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- My day ---------- */
.daygrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dayside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dayside .card.pad { display: flex; flex-direction: column; gap: 12px; }
.dayside .cardhead.plain { gap: 10px; }
.needrow { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--divider); }
.needrow:last-child { border-bottom: 0; }
.needrow .pill { flex: none; min-width: 104px; text-align: center; }
.needrow .what { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.needrow .what b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.needrow .what span { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.needrow .btn { flex: none; }
.needrows .empty { padding: 18px 22px; }
.teamnow { display: flex; flex-direction: column; gap: 12px; }

/* Installer dashboard panel: bookings + Goods In (Finn, 10 Nov 2026) */
.instrow { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; font-size: 14px; }
.instrow b { flex: 0 0 auto; color: var(--muted, #667); font-weight: 600; }
.instrow small, .instrow i { color: var(--muted, #667); font-style: normal; font-size: 12px; }
.instgoods { padding: 10px 0 2px; border-top: 1px solid var(--line, #e2e2e2); margin-top: 8px; }
.instpoform { display: flex; gap: 8px; margin-top: 6px; }
.instpoform input { flex: 1 1 auto; min-width: 0; }
.tmrow { display: flex; align-items: center; gap: 12px; }
.tmrow .nm { flex: 1 1 auto; font-size: 15px; font-weight: 600; min-width: 7em; overflow-wrap: break-word; }
.tmrow .st { flex: 0 1 auto; min-width: 0; font-size: 14px; color: var(--muted); text-align: right; overflow-wrap: break-word; }
.tmrow .st.call { color: var(--red); } .tmrow .st.free { color: var(--green-700); }
.didlist { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.did { display: flex; gap: 10px; }
.did time { color: var(--muted); min-width: 64px; flex: none; white-space: nowrap; }
.did span { min-width: 0; overflow-wrap: break-word; }
.did.state { color: var(--green-700); font-weight: 600; align-items: center; }
.did.state.bad { color: var(--red); }
.did.state a { color: inherit; }
.needsect { display: flex; flex-direction: column; gap: 14px; }
.needsect > p { margin: 0; }

/* ---------- Jobs: search and the job page ---------- */
.results { display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
.resgroup h2 { font-size: 16px; margin: 0; padding: 14px 22px; border-bottom: 1px solid var(--line); }

.jobhead { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.jobhead .who { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.jobhead .who .pills { align-items: center; margin: 0; }
.jobhead .who .jobno { font-size: 14px; color: var(--muted); }
.jobhead .who p { margin: 0; font-size: 15px; }
.jobhead .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.progress { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 20px 22px; }
.stage { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stage i { height: 6px; border-radius: 3px; background: var(--line); }
.stage b { font-size: 13px; font-weight: 600; color: var(--muted); }
.stage span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.stage.done i { background: var(--green-700); } .stage.done b { color: var(--ink); font-weight: 700; }
.stage.part i { background: var(--amber-bar); } .stage.part b { color: var(--amber); font-weight: 700; }
.jgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.jcol { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.made { display: grid; grid-template-columns: minmax(0, 1fr) 120px 130px; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--divider); align-items: center; }
.made:last-child { border-bottom: 0; }
.made .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.made .what b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.made .what span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.made .st { font-size: 14px; font-weight: 700; }
.made .when { font-size: 14px; }
.hist { display: flex; flex-direction: column; gap: 12px; }
.hrow { display: flex; gap: 12px; font-size: 14px; }
.hrow time { color: var(--muted); width: 72px; flex: none; }
.hrow div { min-width: 0; overflow-wrap: anywhere; }
.hrow small { display: block; color: var(--muted); font-size: 13px; }
.mrow { display: flex; gap: 10px; font-size: 15px; }
.mrow span { flex: 1; color: var(--muted); }
.mrow b { font-weight: 700; }
.side-card { display: flex; flex-direction: column; gap: 10px; }
.side-card h2 { font-size: 18px; margin: 0; }
.side-card p { margin: 0; }

/* ---------- Installs ---------- */
.weeknav { display: flex; gap: 6px; align-items: center; flex: none; max-width: 100%; }
.weeklabel { font-size: 15px; font-weight: 700; padding: 0 8px; min-width: 120px; text-align: center; }
.legend { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 13px; color: var(--grey-ink); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ev-install { background: var(--green-700); } .ev-measure { background: var(--blue); } .ev-service { background: #8A5A00; } .ev-other { background: #5F6F67; }
/* The week: each day at least 140px wide; when that doesn't fit, the week scrolls sideways
   inside its card with the names staying put */
.card.week { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.wkrow { display: grid; grid-template-columns: 150px repeat(5, minmax(140px, 1fr)); min-width: 850px; border-bottom: 1px solid var(--divider); min-height: 110px; }
.wkrow:last-child { border-bottom: 0; }
.wkrow.head { background: var(--ground); border-bottom: 1px solid var(--line); min-height: 0; font-size: 13px; font-weight: 700; color: var(--grey-ink); }
.wkrow.head > span { padding: 12px 10px; }
.wkrow.head > span.today { color: var(--green-900); }
.wkrow.free { min-height: 0; }
.wkwho { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; position: sticky; left: 0; z-index: 1; background: var(--surface); }
.wkrow.head > span:first-child { position: sticky; left: 0; z-index: 1; background: var(--ground); }
.wkwho b { font-size: 15px; overflow-wrap: break-word; }
.wkwho span { font-size: 12px; color: var(--muted); }
.wkday { padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wkday.today { background: #FAFCFA; }
.ev { color: #FFFFFF; border-radius: 8px; padding: 8px; font-size: 12px; line-height: 1.35; text-decoration: none; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
/* Time and job on one line; words only break when one alone is wider than the block */
.ev strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { overflow-wrap: break-word; }
a.ev:hover { color: #FFFFFF; filter: brightness(1.12); }
.freecell { padding: 12px 10px; font-size: 13px; font-weight: 600; color: var(--green-700); }
.freecell.full { color: var(--red); }
.wkday-label { display: none; }
.calpick { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.calrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.calrow label.check { margin: 0; align-items: center; min-width: 0; }
.calrow label.check span { overflow-wrap: anywhere; }
.calrow.head { font-size: 13px; font-weight: 600; color: var(--grey-ink); }

/* ---------- Peggy: Overview ---------- */
.ovgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ovside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.nowrow { display: grid; grid-template-columns: 36px minmax(100px, 160px) minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 8px 22px; min-height: 52px; border-bottom: 1px solid var(--divider); }
.nowrow:last-child { border-bottom: 0; }
.nowrow .nm { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.nowrow .st { font-size: 14px; color: var(--muted); }
.nowrow .pc { font-size: 13px; text-align: right; }
.empty { padding: 14px 22px; font-size: 14px; color: var(--muted); margin: 0; }
.card.look { border-top: 4px solid var(--amber-bar); }
.card.look.clear { border-top-color: var(--green-700); }
.looklist { padding: 0 22px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.lookrow { display: flex; gap: 10px; }
.lookrow b { color: var(--amber); width: 92px; flex: none; }
.lookrow.ok b { color: var(--green-700); }
.linkrow { display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--divider); font-size: 14px; }
.linkrow .nm { flex: 1; font-weight: 600; }
.linkrow .st { color: var(--muted); text-align: right; }

/* ---------- Team and codes ---------- */
.view.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 100vh; }
.trow, .thead { display: grid; grid-template-columns: 44px minmax(0, 1fr) 70px 150px 70px; gap: 12px; padding: 0 18px; align-items: center; }
.thead { height: 42px; background: var(--ground); font-size: 13px; font-weight: 700; color: var(--grey-ink); }
.trow { min-height: 58px; padding-top: 8px; padding-bottom: 8px; border-top: 1px solid var(--divider); cursor: pointer; }
.trow:hover { background: #FAFCFA; }
.trow.sel { background: var(--green-100); box-shadow: inset 4px 0 0 var(--green-700); }
.trow .nm { display: flex; flex-direction: column; min-width: 0; }
.trow .nm strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.trow .nm small { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.trow .ext { font-size: 14px; }
.trow .pc { font-size: 13px; font-weight: 600; }
.trow .act { text-align: right; }
.youtag { font-size: 12px; font-weight: 700; color: var(--green-700); }

.edit { background: var(--surface); border-left: 1px solid var(--line); padding: 28px 24px; display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 0; align-self: start; min-height: 100vh; max-height: 100vh; overflow-y: auto; }
.ehead { display: flex; align-items: center; gap: 16px; }
.ehead h2 { margin: 0; overflow-wrap: anywhere; }
.ehead .links { display: flex; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.egrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.egrid .full { grid-column: 1 / -1; }
.egrid label.l { margin-top: 10px; }
.pw { display: flex; gap: 10px; align-items: center; }
.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg legend.l { padding: 0; margin: 10px 0 6px; }
.segbox { display: flex; border: 1px solid var(--input); border-radius: var(--r-ctl); overflow: hidden; }
.segopt { flex: 1; position: relative; cursor: pointer; }
.segopt + .segopt { border-left: 1px solid var(--input); }
.segopt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.segopt span { display: flex; align-items: center; justify-content: center; height: 42px; padding: 0 10px; font: 600 14px var(--font); text-align: center; }
.segopt:hover span { background: var(--ground); }
.segopt input:checked + span { background: var(--green-700); color: #FFFFFF; }
.segopt input:focus-visible + span { outline: 2px solid var(--green-700); outline-offset: -3px; }
.seg .note { font-size: 13px; color: var(--amber); margin: 6px 0 0; }
.eblock { border-top: 1px solid var(--divider); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.eblock label.l, .eblock .kicker { margin: 0; }
.eblock .note { font-size: 13px; color: var(--muted); margin: 0; }
.eblock .rowbtns { margin-top: 2px; }
.comp { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.comp span { min-width: 0; overflow-wrap: anywhere; }
.efoot { margin-top: auto; display: flex; gap: 12px; align-items: center; padding-top: 6px; }
.efoot .grow { flex: 1; }
.codebox { padding: 18px 22px; border-color: var(--green-700); }
.codebox > :first-child { margin-top: 0; }
.bigcode { font: 800 30px/1.2 var(--font); letter-spacing: 0.08em; color: var(--ink); user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.codebox .bigcode { margin: 4px 0 6px; }
#codelist { font-family: var(--mono); }

/* ---------- Tables ---------- */
.summary { display: flex; gap: 10px; flex-wrap: wrap; }
.summary:empty { display: none; }
.chip { font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.chip.bad { background: var(--red-bg); border-color: var(--red-bg); color: var(--red); }
.tbl { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 13px; color: var(--grey-ink); font-weight: 700; padding: 0 14px; height: 42px; background: var(--ground); white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid var(--divider); vertical-align: middle; }
tr.old td { color: var(--muted); }
th.group { white-space: normal; background: var(--surface); color: var(--muted); border-top: 1px solid var(--line); }
td small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: break-word; }
td small.t-err { color: var(--red); overflow-wrap: anywhere; }
table.stack td .cv { min-width: 0; overflow-wrap: break-word; }

/* ---------- Office hours ---------- */
.days { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 15px; }
.days label { display: flex; gap: 6px; align-items: center; min-height: 32px; }
.exc { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 40px; gap: 8px; align-items: center; margin-top: 8px; max-width: 600px; }
.exc.head { font-size: 13px; font-weight: 600; color: var(--grey-ink); }
.exc .own { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: -4px; }

/* ---------- Parts of Peggy ---------- */
.feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; font-size: 15px; }
.feat label { display: flex; gap: 10px; align-items: flex-start; }
.feat input { margin-top: 2px; }
.feat small { display: block; color: var(--muted); font-size: 13px; }

/* ---------- Brand logos and ringtones ---------- */
.logos { display: grid; gap: 12px; }
.logo-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 18px;
  display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.swatch { flex: none; width: 200px; max-width: 100%; height: 56px; display: flex; align-items: center; padding: 0 14px; border-radius: var(--r-ctl); }
.swatch img { width: 100%; height: 30px; object-fit: contain; object-position: left center; }
.logo-row .info { flex: 1; min-width: 160px; font-size: 14px; }
.logo-row .info strong { display: block; font-size: 15px; }
.logo-row .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-row .play { min-width: 76px; }

/* ---------- Phones and calls ---------- */
.lines, #tags, #codes { display: grid; gap: 8px; max-width: 600px; }
.lrow { display: grid; grid-template-columns: 80px minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.lrow > span { font-weight: 600; font-size: 15px; }
.trow2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.crow { display: grid; grid-template-columns: 28px minmax(0, 1fr) 40px 40px 40px; gap: 6px; align-items: center; }
.crow > span { font-weight: 700; font-size: 15px; text-align: center; }
.crow .rm:disabled { opacity: 0.3; cursor: default; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.tag { font-size: 13px; border-radius: 999px; background: var(--divider); padding: 3px 10px; }
.tag b { font-weight: 700; }
select { padding-right: 6px; }
input[type=range] { width: 100%; max-width: 420px; accent-color: var(--green-700); }

/* ---------- Phone book ---------- */
progress { width: 100%; max-width: 420px; height: 8px; accent-color: var(--green-700); margin-top: 12px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { font: 600 14px var(--font); min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.tab:hover { border-color: var(--input); }
.tab.on { background: var(--green-900); border-color: var(--green-900); color: #FFFFFF; font-weight: 700; }
.tabn { font-size: 12px; font-weight: 700; color: var(--grey-ink); background: var(--divider); border-radius: 999px; padding: 1px 8px; }
.tab.on .tabn, .ptab.on .tabn { background: rgba(255,255,255,0.18); color: #FFFFFF; }
.tabn:empty { display: none; }
.pbpanel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pbpanel > p.msg { margin: 0; }
.pbbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pbbar input { flex: 1; min-width: 200px; max-width: 480px; }
.cgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 820px; }
.cnums { display: grid; gap: 8px; max-width: 420px; margin-bottom: 8px; }
.cnum { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.cnum .main { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: -4px; }
.cwarn { border-left: 4px solid var(--amber-bar); border-radius: 6px; padding: 8px 12px; background: var(--amber-bg); color: var(--ink); max-width: 760px; }
.cwarn:empty { display: none; }
td.nums { white-space: nowrap; }
td.nums span { display: block; }
td.acts { white-space: nowrap; text-align: right; }
td.acts .link + .link { margin-left: 14px; }
.pager { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.pager:empty { display: none; }

/* ---------- Sign-in and not-allowed screens ---------- */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.gate-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 32px 26px; text-align: center; }
.gate-card img { display: block; }
.gate-card h1 { margin-top: 10px; font-size: 28px; }
.gate-card .rowbtns { justify-content: center; }
.gate-card .small { font-size: 13px; }
.wordmark { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wordmark .wm { font-size: 40px; }
.gate-card .wordmark img { width: 72px; height: auto; }
.wmsub { font-size: 13px; font-weight: 600; color: var(--muted); }
/* Sign-in: a greeting, one button, the brands underneath */
#signin .wordmark .wm { font-size: 32px; }
#signin .gate-card .wordmark img { width: 56px; }
.gate-lead { margin: 20px 0; color: var(--muted); }
.gbtn { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.gbtn .gmark { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; }
.gbtn .gmark svg { display: block; }
.gbtn:disabled { opacity: 0.75; cursor: progress; }
#signin .msg:not(:empty) { margin: 12px 0 0; }
.gate-foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--divider); }
.gate-brands { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.gate-brands img { display: block; border-radius: 50%; }
.gate-foot .small { margin: 0; }
/* Sign-in, split: a photo of our own work on the left, the card on the right. On a phone the photo is a band across the top. */
.gate.gate-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; padding: 0; }
.testbar:not([hidden]) ~ .gate-split { min-height: calc(100svh - 33px); }
.gate-photo { position: relative; margin: 0; min-height: 100%; overflow: hidden; background: var(--green-900); }
.gate-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; opacity: 0; transition: opacity 0.6s ease; }
.gate-photo img.in { opacity: 1; }
.gate-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 24px 20px; color: #FFFFFF; font-size: 13px; font-weight: 600;
  background: linear-gradient(to top, rgba(10, 30, 24, 0.55), rgba(10, 30, 24, 0)); }
.gate-side { display: flex; align-items: center; justify-content: center; padding: 32px 24px; min-width: 0; }
.gate-split .gate-card { border: 0; background: transparent; padding: 0; max-width: 380px; }
@media (max-width: 900px) {
  .gate.gate-split { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .gate-photo { min-height: 0; height: 32vh; max-height: 260px; }
  .gate-photo figcaption { padding: 32px 16px 28px; }
  .gate-side { align-items: flex-start; padding: 0 16px 24px; }
  .gate-split .gate-card { position: relative; margin-top: -20px; background: var(--surface); border: 1px solid var(--line); padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) { .gate-photo img { transition: none; } }

/* ---------- Invoices to chase ---------- */
.acbar select { width: auto; min-width: 170px; }
.check.inline { margin-top: 0; align-items: center; white-space: nowrap; min-height: 44px; }
fieldset.about { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.about legend { padding: 0; }
fieldset.about .check { margin-top: 6px; }
.ph, td.nums .ph { display: flex; gap: 10px; align-items: baseline; white-space: nowrap; }
.pbbar input[type=checkbox] { flex: none; min-width: 0; }
.ph .link { font-size: 13px; }
.ehead .grow { flex: 1; min-width: 0; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 0; font-size: 14px; }
.facts dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.facts dd small { display: block; font-size: 13px; }
.eblock .nums { display: flex; flex-direction: column; gap: 4px; }
.link.left { text-align: left; font-weight: 500; }
.aclog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.aclog li { display: flex; flex-direction: column; gap: 2px; border-left: 3px solid var(--line); padding-left: 10px; }
.aclog b { font-weight: 600; }
.aclog span { color: var(--muted); overflow-wrap: anywhere; }
.rowbtns.quick { margin-top: 8px; }
.lrow.wide { grid-template-columns: minmax(0, 1fr) minmax(0, 220px) 0; max-width: 640px; }
.lrow.wide small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.msg.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Orders: Needs a person, Backorders, Supplier ETAs ---------- */
.calm { margin: 0; font-size: 15px; color: var(--ink); }
.cardlinks { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin-top: 2px; }
.cardlinks span { color: var(--muted); }
.linelist { margin: 0; padding: 0 0 0 16px; font-size: 13px; color: var(--ink); line-height: 1.4; }
.linelist li + li { margin-top: 2px; }
table.stack td { vertical-align: top; }
table.stack td strong { font-weight: 600; }
td.nowrap { white-space: nowrap; }
td.errtext { overflow-wrap: anywhere; min-width: 200px; }
tr.hasans td { border-bottom: 0; }
tr.ansrow td { border-top: 0; background: var(--green-100); padding-top: 0; }
.ansbox { display: flex; flex-direction: column; gap: 6px; padding: 14px 0 6px; max-width: 760px; }
.ansbox .kicker { margin: 0; }
.ansbox .rowbtns { margin-top: 6px; }
.ansbox label.l { margin: 8px 0 4px; }
.ansbox .msg { margin: 4px 0 0; }
.actbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.actbtns .btn.on { background: var(--green-700); border-color: var(--green-700); color: #FFFFFF; }
.ansfields { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 0 12px; }
.ansfields .full { grid-column: 2; }
.confirm { font-size: 15px; color: var(--ink); margin: 0; max-width: 640px; }
.needlist, .bolist, .wfgroups { display: flex; flex-direction: column; gap: 12px; }
.needcard { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; border-left: 5px solid var(--amber-bar); }
.needcard.done { border-left-color: var(--green-700); }
.needhead { display: flex; gap: 16px; align-items: flex-start; }
.needhead .grow { flex: 1; min-width: 0; }
.needhead h2 { margin: 2px 0 0; overflow-wrap: anywhere; }
.needwhen { text-align: right; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.needwhen small { color: var(--muted); font-size: 13px; }
.facts.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.needissues { font-size: 14px; }
.needcard .rowbtns { margin-top: 0; }
.needcard .ansbox { border-top: 1px solid var(--divider); padding-top: 12px; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { font: 600 14px var(--font); min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; }
.fchip b { font-size: 12px; background: var(--divider); border-radius: 999px; padding: 1px 8px; }
.fchip:hover { border-color: var(--input); }
.fchip.on { background: var(--green-900); border-color: var(--green-900); color: #FFFFFF; }
.fchip.on b { background: rgba(255,255,255,0.18); color: #FFFFFF; }
.tiles .card.wide { grid-column: 1 / -1; }
/* Backorders: one card per job and fabric */
.bocard { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.bocard.urgent { border: 2px solid var(--green-700); padding: 17px 19px; }
.bomain { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.bowho { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bowho .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bowho .top b { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.bowho .top a { color: var(--ink); text-decoration: none; }
.bowho .top a:hover { color: var(--green-700); text-decoration: underline; }
.bowho .sub { font-size: 14px; color: var(--muted); }
.boask { font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.boask small { color: var(--muted); font-size: 13px; }
.bodates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.bodates div { display: flex; flex-direction: column; gap: 2px; }
.bodates span { font-size: 12px; color: var(--muted); }
.bodates b { font-size: 15px; font-weight: 700; }
.bodates small { font-size: 12px; }
.bofoot { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; }
.bofoot .linelist { flex: 1; min-width: 220px; }
.bocard .ansbox { border-top: 1px solid var(--divider); padding-top: 12px; }

/* ---------- Narrower screens ---------- */
/* The menu as a rail of icons. Each name shows beside its icon on hover or keyboard focus (and
   is still read out by screen readers); who's signed in shows the same way from the avatar. */
@media (min-width: 901px) and (max-width: 1279px) {
  #app { grid-template-columns: 76px minmax(0, 1fr); }
  .side { padding: 16px 10px; overflow: visible; z-index: 20; }
  .brand { padding: 0 0 14px; justify-content: center; }
  .brand-txt { display: none; }
  .navlist { gap: 8px; }
  .searchbtn { width: 52px; height: 48px; padding: 0; justify-content: center; margin: 0 auto; }
  .searchbtn .grow, .searchbtn kbd { display: none; }
  .navgroup { gap: 4px; }
  .navhead { font-size: 0; height: 1px; padding: 0; margin: 2px 12px 6px; background: var(--line); }
  .navlist a { width: 52px; min-height: 48px; padding: 0; margin: 0 auto; justify-content: center; position: relative; }
  .navlist a span { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); flex: none; white-space: nowrap;
    padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #FFFFFF; font-size: 13px; font-weight: 600;
    opacity: 0; pointer-events: none; z-index: 40; box-shadow: 0 4px 14px rgba(22, 35, 29, 0.2); }
  .navlist a:hover span, .navlist a:focus-visible span { opacity: 1; }
  .navlist a .badge { position: absolute; top: 3px; right: 0; min-width: 18px; padding: 0 5px; font-size: 11px; line-height: 18px; text-align: center; }
  .side-foot { padding: 12px 0 0; justify-content: center; position: relative; }
  .whobox { position: absolute; left: 100%; bottom: 0; width: 250px; z-index: 40; padding: 12px 14px; gap: 2px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: 0 6px 20px rgba(22, 35, 29, 0.14);
    opacity: 0; pointer-events: none; }
  .side-foot:hover .whobox, .side-foot:focus-within .whobox { opacity: 1; pointer-events: auto; }
  .view-in { padding: 28px 32px 56px; }
  .banner { padding: 12px 32px; }
  .subnav { padding: 16px 32px 0; }
}
/* A short window: the rail scrolls, so the names can't stick out beside it */
@media (min-width: 901px) and (max-width: 1279px) and (max-height: 680px) {
  .side { overflow-y: auto; overflow-x: hidden; }
  html:not(.topnav) .navlist a span, html:not(.topnav) .whobox { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); opacity: 1; }
}
@media (max-width: 1200px) {
  .ovgrid, .daygrid, .jgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .view.split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .edit { position: static; min-height: 0; max-height: none; margin: 0 32px 56px; border: 1px solid var(--line); border-radius: var(--r-card); }
  .view.split .view-in { padding-bottom: 18px; }
  .bomain { grid-template-columns: minmax(0, 1fr); }
  .bodates { text-align: left; max-width: 420px; }
}
@media (max-width: 900px) {
  #app { display: block; }
  .side { position: sticky; top: 0; z-index: 10; height: auto; overflow: visible; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; }
  .menubtn { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border: 1px solid var(--input); border-radius: var(--r-ctl);
    background: var(--surface); color: var(--ink); font: 600 15px var(--font); cursor: pointer; flex: none; }
  .navlist { display: none; padding: 14px 0 4px; max-height: calc(100vh - 66px); overflow-y: auto; }
  .side.open .navlist { display: flex; }
  .navlist a { min-height: 46px; }
  .banner { padding: 12px 16px; }
  .view-in { padding: 24px 16px 48px; }
  .subnav { padding: 14px 16px 0; }
  .edit { margin: 0 16px 48px; padding: 20px 16px; }
  .facts.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 16px; }
  .wkrow { grid-template-columns: 140px repeat(5, minmax(140px, 1fr)); min-width: 840px; }
}
@media (max-width: 720px) {
  .feat { grid-template-columns: 1fr; }
  .tiles { gap: 10px; }
  .tile { padding: 14px; }
  .tile .val { font-size: 28px; }
  .trow, .thead { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 0 12px; }
  .trow .ext, .thead .ext, .trow .act, .thead .act { display: none; }
  .trow .pav { width: 32px; height: 32px; }
  .nowrow { grid-template-columns: 32px minmax(0, 1fr) auto; padding: 8px 14px; gap: 10px; }
  .nowrow .st { grid-column: 2 / -1; grid-row: 2; margin-top: -6px; }
  .nowrow .pav { grid-row: 1 / span 2; }
  .cardhead, .looklist, .linkrow, .needrow, .resrow, .cardfoot, .made { padding-left: 14px; padding-right: 14px; }
  .card.pad { padding: 16px 14px; }
  .needrow { flex-wrap: wrap; gap: 8px 12px; }
  .needrow .pill { min-width: 0; }
  .needrow .what { flex-basis: 100%; }
  .needx { padding: 2px 14px 16px 18px; }
  .acx { padding: 4px 14px 16px; }
  .needrow .btn { margin-left: auto; }
  .made { grid-template-columns: minmax(0, 1fr) auto; }
  .made .when { grid-column: 1 / -1; color: var(--muted); margin-top: -8px; }
  /* Installs: one block per person, each day under it */
  .wkrow.head { display: none; }
  .wkrow { display: block; padding: 4px 0 10px; min-width: 0; }
  .wkwho { position: static; background: transparent; }
  .wkday { padding: 4px 14px; }
  .wkday:empty, .wkday.none { display: none; }
  .wkday-label { display: block; font-size: 12px; font-weight: 700; color: var(--grey-ink); }
  .wkrow.free { display: flex; flex-wrap: wrap; gap: 0 12px; }
  .wkrow.free .wkwho { flex-basis: 100%; }
  .freecell { padding: 2px 14px; }
  .calrow { grid-template-columns: 1fr 1fr; }
  .calrow label.check { grid-column: 1 / -1; }
  .calrow.head { display: none; }
  /* The Orders and Workflows tables become one small block per row */
  table.stack thead { display: none; }
  table.stack, table.stack tbody { display: block; }
  table.stack tr { display: block; border-top: 1px solid var(--divider); padding: 10px 14px; }
  table.stack td { display: flex; gap: 10px; border: 0; padding: 3px 0; }
  table.stack td .cv { flex: 1; min-width: 0; }
  table.stack td::before { content: attr(data-label); flex: 0 0 104px; font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 2px; }
  table.stack td:not([data-label])::before { content: none; }
  table.stack td.acts { text-align: left; padding-top: 6px; }
  table.stack td:empty { display: none; }
  table.stack tr.hasans { border-bottom: 0; }
  table.stack tr.ansrow { border-top: 0; padding-top: 0; background: var(--green-100); }
  table.stack tr.ansrow td { display: block; background: transparent; }
  .tbl table.stack { min-width: 0; }
  .needhead { flex-direction: column; gap: 6px; }
  .needwhen { text-align: left; }
  .ansfields { grid-template-columns: minmax(0, 1fr); }
  .ansfields .full { grid-column: 1; }
}
@media (max-width: 560px) {
  .two, .two.wide, .egrid, .cgrid { grid-template-columns: 1fr; }
  .vhead .vacts { width: 100%; }
  .vhead .vacts .btn, #ovadd { flex: 1; }
  .lookrow { flex-direction: column; gap: 2px; }
  .lookrow b { width: auto; }
  #health thead { display: none; }
  #health tr { display: block; border-top: 1px solid var(--divider); padding: 8px 12px; }
  #health td { display: flex; gap: 10px; border: 0; padding: 3px 0; }
  #health td::before { content: attr(data-label); flex: 0 0 96px; font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 2px; }
  #health td:empty { display: none; }
  #health tr.grouprow { padding: 0; }
  #health tr.grouprow th { display: block; height: auto; padding: 10px 12px; }
  .exc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; }
  .exc .nm { grid-column: 1 / -1; }
  .exc.head { display: none; }
  .bigcode { font-size: 26px; }
  .swatch { width: 100%; }
  .lrow { grid-template-columns: 64px minmax(0, 1fr) 40px; }
  .trow2 { grid-template-columns: minmax(0, 1fr) 40px; }
  .trow2 select { grid-column: 1; }
  .facts { grid-template-columns: 1fr 1fr; }
  .lrow.wide { grid-template-columns: minmax(0, 1fr); }
  .acbar select { width: 100%; }
  .progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bodates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jobhead .acts { width: 100%; }
  .jobhead .acts .btn { flex: 1; }
  .weeknav { width: 100%; justify-content: space-between; }
  .bigsearch input { font-size: 16px; }
  .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tile .val { font-size: 24px; }
}
@media (min-width: 721px) {
  table.stack td[data-label="Job"] { min-width: 150px; }
  table.stack td[data-label="Ask"] { min-width: 170px; }
  table.stack td[data-label="Lines"], table.stack td[data-label="Problems"] { min-width: 240px; }
  table.stack td[data-label="Workflow"] { min-width: 280px; }
}
.tile .val { overflow-wrap: normal; }
.tbl { position: relative; }
/* My day as a workspace: the picked item opens in place, under its row */
.needrow.pick { cursor: pointer; }
.needrow.pick:hover { background: #FAFCFA; }
.needrow.sel { background: var(--green-100); box-shadow: inset 4px 0 0 var(--green-700); }
.needrow.pick:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; }
.needrow.sel { border-bottom-color: transparent; }
.needrow > .btn { pointer-events: none; }
/* The open item and its row read as one block: a pale ground and the green bar down the left */
.needrow.sel { background: #F7FAF8; }
.needx { padding: 0 22px 16px 26px; border-bottom: 1px solid var(--divider); background: #F7FAF8; box-shadow: inset 4px 0 0 var(--green-700); }
.needx:last-child { border-bottom: 0; border-radius: 0 0 var(--r-card) var(--r-card); }
#daypanelbody, .acx { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* What's open, top to bottom: where it's at, a few facts, Karen's suggestion, Something else */
.xhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13px; color: var(--muted); padding-top: 2px; }
.xhead a { font-weight: 600; }
.situation { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); max-width: 68ch; overflow-wrap: break-word; }
/* Facts: label over value, two to four across */
.factrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(124px, calc((100% - 60px) / 4)), 1fr)); gap: 10px 20px; margin: 0; font-size: 14px; max-width: 720px; }
.factrow > div { min-width: 0; }
.factrow dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.factrow dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: break-word; }
details.xlines { font-size: 14px; }
details.xlines summary { cursor: pointer; font-weight: 600; color: var(--green-700); min-height: 32px; display: inline-flex; align-items: center; }
details.xlines[open] summary { margin-bottom: 6px; }
details.xlines .linelist { margin-top: 2px; }
details.xlines .linelist li, .linelist li { overflow-wrap: break-word; }
/* Karen's suggestion: a white card with a green edge, her mark, what she'd do, and one button */
.suggest { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; border: 1px solid #CFE2D6; border-radius: 12px; background: var(--surface); min-width: 0; max-width: 760px; }
.sughead { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--green-900); }
.sughead img { width: 20px; height: 20px; flex: none; }
.sugrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-top: 4px; }
.sugrow .sugfield { flex: 0 1 200px; }
.link.more { min-height: 44px; padding: 0 4px; color: var(--green-700); font-weight: 600; text-decoration: none; }
.link.more:hover { text-decoration: underline; }
.suggest .rowbtns { margin-top: 6px; }
.suggest .btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
.sugtext { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--ink); overflow-wrap: break-word; }
.sugwhy { margin: 0; font-size: 14px; color: var(--grey-ink); }
.sugfield { max-width: 240px; min-width: 0; }
.sugfield label.l { margin: 0 0 6px; }
.suggest.confirmbox { background: var(--amber-bg); border-color: #E9D3A6; }
.ansmore { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; }
.sugback { font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: break-word; }
.link.quiet { color: var(--grey-ink); font-weight: 600; min-height: 32px; text-decoration: none; }
.link.quiet:hover { color: var(--ink); text-decoration: underline; }
fieldset.choices { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
fieldset.choices legend { padding: 0; margin: 0 0 6px; }
label.radio { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--surface); font-size: 15px; cursor: pointer; max-width: 420px; }
label.radio:hover { border-color: var(--input); }
label.radio:has(input:checked) { border-color: var(--green-700); background: var(--green-100); font-weight: 600; }
.ansbox { gap: 10px; }
.ansbox .rowbtns { margin-top: 2px; }
.morebtns { margin-top: 0; }
.xfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-top: 16px; padding-top: 6px;
  border-top: 1px solid var(--divider); font-size: 14px; }
.xfoot a, .xfoot .link { min-height: 40px; display: inline-flex; align-items: center; }
.xfoot:only-child { margin-top: 0; }
.acx .xfoot { margin-top: 0; justify-content: flex-end; }
.acx { padding: 4px 20px 18px; border-top: 1px solid var(--divider); background: #FBFDFB; }
.acx > .eblock:first-child, .acx .eblock.first { border-top: 0; padding-top: 12px; }
tr.ansrow .suggest { background: var(--surface); }
/* Undo for a few seconds after something is done */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: #FFFFFF; border-radius: var(--r-ctl); padding: 8px 8px 8px 18px; font-size: 15px; max-width: calc(100vw - 32px);
  box-shadow: 0 6px 24px rgba(22, 35, 29, 0.25); }
.toast .btn { background: transparent; color: #FFFFFF; border-color: rgba(255,255,255,0.5); }
.toast .btn:hover { background: rgba(255,255,255,0.12); color: #FFFFFF; }
/* Secondary actions under a small More menu */
details.more { position: relative; }
details.more summary { list-style: none; cursor: pointer; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: " ▾"; font-size: 11px; }
details.more .menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; min-width: 180px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-ctl); box-shadow: 0 6px 20px rgba(22, 35, 29, 0.12); padding: 6px; display: flex; flex-direction: column; }
details.more .menu button { min-height: 44px; border: 0; background: transparent; text-align: left; padding: 0 12px; border-radius: 8px;
  font: 500 14px var(--font); color: var(--ink); cursor: pointer; }
details.more .menu button:hover, details.more .menu button:focus-visible { background: var(--ground); }
/* Touch screens: every target at least 44px */
@media (pointer: coarse) {
  .btn.small, .ptab, .tab, .fchip, .subnav a, .rm { min-height: 44px; }
  .signout, .link, .crumbs a, .cardlinks a { min-height: 44px; display: inline-flex; align-items: center; }
}
/* My day: the daily saying, quiet under the greeting */
.saying { margin: 8px 0 0; display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: 15px; font-style: italic; }
.saying .en { font-size: 13px; font-style: normal; }
/* Demo mode: a bar across the top the whole time */
.demobar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 6px 16px; background: var(--amber-bg); color: var(--amber); font-weight: 700; font-size: 14px; border-bottom: 1px solid #E9D3A6; }
.demobar .btn { background: var(--surface); }
body.demo .side { top: 52px; height: calc(100vh - 52px); }
/* The test copy (karen-env.js): one amber line above everything, like the demo bar but scrolling away with the page */
.testbar { padding: 6px 16px; background: var(--amber-bg); color: var(--amber); font-weight: 700; font-size: 14px; text-align: center; border-bottom: 1px solid #E9D3A6; }
@media (max-width: 900px) { .testbar { font-size: 13px; padding: 6px 12px; } }
@media (max-width: 900px) { .demobar { position: static; font-size: 13px; padding: 6px 12px; } body.demo .side { top: 0; height: auto; } }
#daypanelbody .ansbox { padding: 0; }
/* Opening something scrolls it clear of the sticky bars */
.needrow, .acgroup, .ansbox, .bocard, .needcard { scroll-margin-top: 80px; }
.acx > .eblock, .acx > details { max-width: 760px; }
/* Status chips (lib.js statusChip): a dot and a few words; the details on hover, focus or a tap */
.schip-wrap { position: relative; display: inline-flex; vertical-align: middle; max-width: 100%; }
.schip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; max-width: 100%; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 13px var(--font); line-height: 1.2; text-align: left; white-space: nowrap; }
button.schip { cursor: pointer; }
button.schip:hover { border-color: var(--input); }
.schip i { width: 8px; height: 8px; border-radius: 50%; background: #9AA8A1; flex: none; }
.schip.ok i { background: var(--green-700); }
.schip.warn { background: var(--amber-bg); border-color: #E9D3A6; color: var(--amber); }
.schip.warn i { background: var(--amber-bar); }
.schip.bad { background: var(--red-bg); border-color: #F1C7C2; color: var(--red); }
.schip.bad i { background: var(--red); }
.schip-pop { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 45; width: max-content; max-width: min(340px, calc(100vw - 32px));
  flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--ink); color: #FFFFFF;
  font-size: 13px; font-weight: 400; line-height: 1.45; text-align: left; overflow-wrap: anywhere; box-shadow: 0 6px 20px rgba(22, 35, 29, 0.22); }
.schip-wrap:hover .schip-pop, .schip:focus-visible + .schip-pop, .schip[aria-expanded="true"] + .schip-pop { display: flex; }
.dateline .schip-wrap, .msg .schip-wrap { margin-top: 2px; }
@media (pointer: coarse) { button.schip { min-height: 44px; } }
/* ---------- My day: owners and hand-off (home.js) ---------- */
/* Mine · To sort · Everyone, above Needs you */
.daymodes { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 12px; }
.modechip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--input); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.modechip .n { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--divider); color: var(--grey-ink); font-size: 13px; text-align: center; }
.modechip[aria-pressed="true"] { background: var(--green-700); border-color: var(--green-700); color: #FFFFFF; }
.modechip[aria-pressed="true"] .n { background: rgba(255, 255, 255, 0.22); color: #FFFFFF; }
.modechip:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; }
/* One item: its row, the owner and small menu beside it, the hand-off line under it */
.needitem { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--divider); min-width: 0; }
.needitem:last-child { border-bottom: 0; }
.needitem > .needrow { flex: 1 1 0; min-width: 0; border-bottom: 0; }
.needitem.sel { background: #F7FAF8; box-shadow: inset 4px 0 0 var(--green-700); }
.needitem.sel > .needrow.sel { box-shadow: none; }
.needitem:has(+ .needx:not([hidden])) { border-bottom-color: transparent; }
.needacts { display: flex; align-items: center; gap: 8px; padding: 8px 22px 8px 0; flex: none; }
.needacts:empty { display: none; }
.ownface { display: inline-flex; }
.ownface .pav { width: 32px; height: 32px; font-size: 12px; }
.chip.tosort { background: var(--amber-bg); border-color: var(--amber-bg); color: var(--amber); white-space: nowrap; }
.handed { flex-basis: 100%; margin: -8px 0 0; padding: 0 22px 12px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.handed q { color: var(--grey-ink); font-style: italic; }
.needrow.handrow { flex-wrap: wrap; row-gap: 2px; color: inherit; text-decoration: none; width: 100%; text-align: left; font: inherit; background: none; border: 0; border-bottom: 1px solid var(--divider); cursor: pointer; }
.handrow:hover { background: var(--ground); }
.handrow .hr-main { flex: 1 1 260px; font-size: 15px; }
.handrow .hr-sub { font-size: 13px; color: var(--muted); }
.handrow .hr-by { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.handrow .hr-by q { color: var(--grey-ink); font-style: italic; }
@media (max-width: 900px) {
  .daymodes { padding: 0 14px 12px; gap: 6px; }
  .modechip { padding: 0 12px; gap: 6px; }
  .needacts { padding-right: 14px; }
  .handed { padding: 0 14px 12px; }
}
.needacts .btn.handbtn, .xhand .btn { min-height: 44px; }
.needacts details.more .menu { min-width: 220px; }
.xhand { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-right: auto; }
/* Hand to…: the faces to pick from, then an optional note */
.handpop { flex-basis: 100%; margin: 0 22px 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface);
  box-shadow: 0 6px 20px rgba(22, 35, 29, 0.10); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.handq { margin: 0; font-size: 14px; font-weight: 700; }
.handfaces { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.handface { min-height: 44px; padding: 10px 6px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink);
  font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.handface:hover { border-color: var(--green-700); background: var(--green-100); }
.handface:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; }
.handface .pav { width: 44px; height: 44px; }
.handface .hn { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.handface .hs { font-size: 12px; color: var(--muted); line-height: 1.3; overflow-wrap: break-word; }
.handface.off { opacity: 0.55; cursor: not-allowed; background: var(--ground); }
.handface.off:hover { border-color: var(--line); background: var(--ground); }
.handto { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; overflow-wrap: anywhere; }
.handnote { min-height: 44px; padding: 0 12px; border: 1px solid var(--input); border-radius: var(--r-ctl); font: inherit; font-size: 15px; width: 100%; box-sizing: border-box; }
.handnote:focus-visible { outline: 2px solid var(--green-700); outline-offset: 1px; }
.handgo { display: flex; flex-wrap: wrap; gap: 8px; }
.handwhy:empty { display: none; }
@media (max-width: 900px) { .handpop { margin: 0 14px 14px; } }
/* Team right now: faces take a dragged item */
.teamnow .tmrow > .pav { width: 44px; height: 44px; }
.tmrow.drop { flex-wrap: wrap; border-radius: var(--r-ctl); margin: -4px -6px; padding: 4px 6px; border: 2px solid transparent; }
.teamnow.dragging .tmrow.can { border-color: var(--line); border-style: dashed; }
.teamnow.dragging .tmrow.cant { opacity: 0.45; }
.tmrow.over { border-color: var(--green-700) !important; border-style: solid !important; background: var(--green-100); }
.tmrow .awaytag { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: 12px; font-weight: 700; vertical-align: middle; }
.tmrow .dropsay { flex-basis: 100%; padding-left: 56px; font-size: 13px; color: var(--muted); }
.tmrow.over .dropsay { color: var(--green-900); font-weight: 600; }
.tmpop .handpop { margin: 0; }

/* ---------- My day above the fold: the work shows without scrolling ---------- */
/* Header: "Kia ora Finn · Friday, 2 October" on one line, the saying as one quiet line */
#v-day .view-in { gap: 14px; }
#v-day .vtitle { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
#v-day #dayhello { order: 1; font-size: 24px; }
#v-day .vtitle .dateline { order: 2; margin: 0; font-size: 15px; }
#v-day .saying { order: 3; flex-basis: 100%; margin: 2px 0 0; flex-direction: row; flex-wrap: wrap; gap: 0 10px; font-size: 14px; }
#v-day .saying[role="button"] { cursor: pointer; min-height: 24px; }
#v-day .saying:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; border-radius: 4px; }
#v-day .saying .en { display: none; font-size: 13px; }
#v-day .saying.open .en { display: inline; }
@media (min-width: 1440px) { #v-day .saying .en { display: inline; } }
/* One row of count chips that filter Needs you */
.daychips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.countchip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.countchip b { font-weight: 800; font-size: 15px; }
.countchip.hot b { color: var(--red); }
.countchip:hover { border-color: var(--input); }
.countchip[aria-pressed="true"] { background: var(--green-100); border-color: var(--green-700); color: var(--green-900); }
.countchip:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; }
.chipnote { font-size: 13px; color: var(--muted); }
/* Needs you: the Mine / To sort / Everyone switch sits in the card's header */
.cardhead:has(#daymodes) { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.cardhead:has(#daymodes) > .msg { display: none; }
.cardhead .daymodes { padding: 0; }
.nextup { display: block; font-style: normal; font-size: 12px; font-weight: 700; text-transform: none; color: var(--green-700); }
.needrow .what em.nextup { font-size: 12px; color: var(--green-700); }
/* Right column: compact, and it stays put on wide screens */
#v-day .dayside { gap: 14px; }
#v-day .dayside .card.pad { padding: 14px 18px; gap: 8px; }
#v-day .teamnow { gap: 6px; }
#v-day .tmrow .st { font-size: 13px; }
@media (min-width: 1201px) {
  #v-day .dayside { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  body.demo #v-day .dayside { top: 68px; max-height: calc(100vh - 84px); }
  .teamstrip { display: none; }
}
/* Narrower: the team is one row of faces above the list; the side card goes */
.teamstrip { min-width: 0; }
.tsrow { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.tsface { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; padding: 4px; border: 2px solid transparent; border-radius: var(--r-ctl); position: relative; }
.tsface .pav { width: 44px; height: 44px; }
.tsface .tn { font-size: 12px; font-weight: 600; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsface .awaytag { position: absolute; top: 0; right: 0; padding: 0 5px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: 10px; font-weight: 700; }
.teamstrip.dragging .tsface.can { border-color: var(--line); border-style: dashed; }
.teamstrip.dragging .tsface.cant { opacity: 0.45; }
.tsface.over { border-color: var(--green-700); border-style: solid; background: var(--green-100); }
.teamstrip .handpop { margin: 8px 0 0; }
@media (max-width: 1200px) {
  #v-day .dayside > .card:has(#dayteam) { display: none; }
}
@media (max-width: 720px) {
  #v-day .view-in { gap: 10px; padding-top: 16px; }
  #v-day #dayhello { font-size: 22px; }
  .countchip { padding: 0 12px; gap: 6px; }
  .cardhead:has(#daymodes) h2 { flex-basis: 100%; }
}
@media (max-width: 720px) {
  /* Phones: the count chips as one row that scrolls inside itself, the open row's Close lives in its footer */
  .daychips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .daychips::-webkit-scrollbar { display: none; }
  .countchip { flex: none; }
  .chipnote { display: none; }
  .needrow.sel > .btn { display: none; }
  .cardhead:has(#daymodes) { gap: 8px; }
  .cardhead:has(#daymodes) h2 { font-size: 16px; }
}
/* The open item: its row drops the details the panel repeats, and Close lives in the panel's footer */
#dayneeds .needrow.sel > .btn { display: none; }
#dayneeds .needrow.sel .what > span { display: none; }
#dayneeds .needrow.sel { padding-top: 12px; padding-bottom: 8px; }
#daypanel .factrow { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px 16px; }
#daypanel #daypanelbody { gap: 10px; }
#v-day .view-in { padding-top: 20px; }
.countchip { padding: 0 12px; gap: 6px; font-size: 13px; }
@media (max-width: 1439px) { .chipnote { display: none; } }
/* In the open item, Karen's suggestion (the main button) comes straight after the situation;
   the facts and lines follow it */
#daypanelbody > * { order: 3; }
#daypanelbody > .xhead, #daypanelbody > .situation { order: 0; }
#daypanelbody > .ansbox, #daypanelbody > .suggest, #daypanelbody > .rowbtns, #daypanelbody > .msg { order: 1; }
#daypanelbody > .factrow, #daypanelbody > .note { order: 2; }
@media (max-width: 720px) {
  /* Phones: the "Needs you" chip above already names the list */
  .cardhead:has(#daymodes) h2 { display: none; } /* still names the card (aria-labelledby) */
  .cardhead:has(#daymodes) { padding-top: 8px; padding-bottom: 8px; }
  #v-day .view-in { gap: 8px; padding-top: 12px; }
  .tsface { min-width: 50px; padding: 2px; }
  .tsface .tn { font-size: 11px; }
}
@media (max-width: 720px) {
  #dayneeds .needrow.sel { padding-top: 8px; padding-bottom: 4px; gap: 4px 12px; }
  #daypanel #daypanelbody { gap: 8px; }
}

/* ==========================================================================
   Calm pass (2026-10-02). Gmail/Linear calm: lists on white with hairline dividers, quiet
   type labels (a coloured dot and a word), tabs and filters as plain text with an underline,
   row actions as small icons on hover or focus, one filled button per open item. Spacing on
   8/12/16. Touch screens keep 44px targets (pointer: coarse).
   ========================================================================== */

/* Cards and boxes: a hairline, no shadows, a little less padding */
.card, .tile, .logo-row { border-color: var(--divider); box-shadow: none; }
.cardhead { padding: 12px 16px; border-bottom-color: var(--divider); }
.cardhead h2 { font-size: 16px; }
.card:not(.pad) > .cardhead.plain { padding: 12px 16px 4px; }
.card.pad { padding: 16px; }
.cardfoot { padding: 12px 16px; font-weight: 500; }
.empty, .needrows .empty { padding: 16px; }
.sechead { font-size: 16px; }
.lede { font-size: 14px; }
details.more .menu, .handpop { box-shadow: 0 4px 14px rgba(22, 35, 29, 0.08); border-color: var(--line); }

/* Buttons: secondary ones lose their heavy edge; outline ones go quiet */
.btn { border-color: var(--line); }
.btn:hover { border-color: var(--input); background: var(--ground); }
.btn.primary:hover { background: var(--green-hover); }
.btn.outline { border-color: var(--line); color: var(--green-700); font-weight: 600; }
.btn.outline:hover { background: var(--green-100); border-color: var(--green-100); }
.btn.small { min-height: 36px; padding: 0 12px; }
.link.quiet { color: var(--grey-ink); font-weight: 500; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.link.quiet:hover { color: var(--ink); text-decoration: underline; }

/* Small icon buttons (row actions, More, Close) with a tooltip from title */
.iconbtn { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--grey-ink);
  cursor: pointer; display: inline-grid; place-items: center; flex: none; font: inherit; }
.iconbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn:hover, details.more[open] > summary.iconbtn { background: var(--divider); color: var(--ink); }
.iconbtn:focus-visible { outline: 2px solid var(--green-700); outline-offset: 1px; }
details.more summary.iconbtn::after { content: none; }
details.more .menu a { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; font: 500 14px var(--font);
  color: var(--ink); text-decoration: none; }
details.more .menu a:hover, details.more .menu a:focus-visible { background: var(--ground); }

/* Tabs (Mine / To sort / Everyone, Backorders groups, Invoices, Peggy pages, phone book): plain
   text on a hairline rail, the one you're on underlined in green */
.pills-tabs, .tabs, .subnav, .daymodes { gap: 0 20px; border-bottom: 1px solid var(--divider); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.pills-tabs::-webkit-scrollbar, .tabs::-webkit-scrollbar, .subnav::-webkit-scrollbar, .daymodes::-webkit-scrollbar { display: none; }
.ptab, .tab, .subnav a, .modechip, .fchip { min-height: 40px; height: auto; padding: 0 2px; border: 0; border-radius: 0; background: transparent; color: var(--muted);
  font-weight: 600; box-shadow: inset 0 -2px 0 transparent; flex: none; gap: 6px; white-space: nowrap; }
.ptab:hover, .tab:hover, .subnav a:hover, .modechip:hover, .fchip:hover { color: var(--ink); border-color: transparent; background: transparent; }
.ptab.on, .tab.on, .subnav a.on, .modechip[aria-pressed="true"], .fchip.on { background: transparent; color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--green-700); }
.ptab .tabn, .ptab b, .tab .tabn, .modechip .n, .fchip b, .ptab.on .tabn, .tab.on .tabn, .modechip[aria-pressed="true"] .n, .fchip.on b {
  background: transparent; color: var(--muted); padding: 0; min-width: 0; font-size: 13px; font-weight: 600; }
.ptab:focus-visible, .tab:focus-visible, .subnav a:focus-visible, .modechip:focus-visible, .fchip:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; border-radius: 4px; }
/* Filters (Risk Finder issues): the same text, no rail */
.fchips { gap: 0 20px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.subnav { padding-top: 12px; }

/* Labels: a coloured dot and a word, not a filled pill. Status colours keep their word colour. */
.pill { background: transparent; padding: 0; border-radius: 0; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9AA8A1; flex: none; }
.pill.warn, .pill.amber { background: transparent; color: var(--amber); } .pill.warn::before, .pill.amber::before { background: var(--amber-bar); }
.pill.red { background: transparent; color: var(--red); } .pill.red::before { background: var(--red); }
.pill.blue { background: transparent; color: var(--blue); } .pill.blue::before { background: var(--blue); }
.pill.green { background: transparent; color: var(--green-700); } .pill.green::before { background: var(--green-700); }
.pill.brand-wt, .pill.brand-c2u, .pill.brand-ed { background: transparent; color: var(--muted); font-weight: 500; }
.pill.brand-wt::before { background: #2F6B55; } .pill.brand-c2u::before { background: #8C2436; } .pill.brand-ed::before { background: #C25E1F; }
.pills { gap: 4px 12px; }
.chip { border-color: var(--divider); }
/* Status chips ("Karen's lists up to date"): a dot and words, no box */
.schip { border-color: transparent; background: transparent; padding: 0 4px; }
.schip.warn, .schip.bad { background: transparent; border-color: transparent; }
button.schip:hover { border-color: transparent; text-decoration: underline; }
.tile { border-color: transparent; padding: 16px; }
.tiles { gap: 12px; }

/* ---------- My day ---------- */
/* Count filters as one line of text: Needs you 12 · Backorders 2 · … */
.daychips { gap: 0; }
.countchip { position: relative; min-height: 32px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 500; gap: 5px; flex: none; }
.countchip:first-child { padding-left: 0; }
.countchip + .countchip { margin-left: 8px; }
.countchip + .countchip::before { content: "·"; position: absolute; left: -7px; color: #9AA8A1; font-weight: 400; }
.countchip b { font-size: 14px; font-weight: 600; color: var(--ink); }
.countchip.hot b { color: var(--red); }
.countchip:hover { color: var(--ink); border-color: transparent; }
.countchip[aria-pressed="true"] { background: transparent; border-color: transparent; color: var(--ink); font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--green-700); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.countchip[aria-pressed="true"] b { font-weight: 700; }
.countchip:focus-visible { outline-offset: 0; }
.chipnote { margin-left: 16px; }

/* Needs you header: title on the left, the text tabs sitting on the header's bottom line */
.cardhead:has(#daymodes) { align-items: flex-end; padding-top: 8px; padding-bottom: 0; }
.cardhead:has(#daymodes) h2 { padding-bottom: 10px; }
.cardhead .daymodes { border-bottom: 0; margin-bottom: -1px; }
.modechip { min-height: 44px; }

/* Rows: the whole row opens the item. Type label | what | owner, actions on hover */
#dayneeds .needitem { position: relative; }
.needitem:hover:not(.sel), .needitem:focus-within:not(.sel) { background: #F8FAF8; }
.needrow { gap: 12px; padding: 12px 16px; }
.needrow.pick:hover { background: transparent; }
.needrow .what b { font-size: 15px; }
.needrow .what span { font-size: 13px; }
.kind { flex: none; width: 112px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.kind i { width: 7px; height: 7px; border-radius: 50%; background: #9AA8A1; flex: none; }
.kind.amber i { background: var(--amber-bar); } .kind.red i { background: var(--red); } .kind.blue i { background: var(--blue); } .kind.green i { background: var(--green-700); }
.pav.xs { width: 24px; height: 24px; font-size: 10px; background: var(--divider); color: var(--grey-ink); }
.ownface { flex: none; }
.ownface .pav { width: 24px; height: 24px; font-size: 10px; }
.ownsort { flex: none; font-size: 12px; font-weight: 600; color: var(--amber); white-space: nowrap; }
.needacts { position: absolute; top: 10px; right: 12px; padding: 2px; gap: 2px; border-radius: 8px; background: #F8FAF8;
  opacity: 0; pointer-events: none; }
.needitem:hover > .needacts, .needitem:focus-within > .needacts, .needacts:has(details[open]) { opacity: 1; pointer-events: auto; }
.needacts.open { opacity: 1; pointer-events: auto; background: transparent; }
.needacts details.more .menu { min-width: 220px; }
.needitem.sel { background: #F7FAF8; box-shadow: inset 3px 0 0 var(--green-700); }
.needx { box-shadow: inset 3px 0 0 var(--green-700); padding: 0 16px 12px 19px; }
#dayneeds .needrow.sel { padding-right: 56px; }
#dayneeds .needrow.sel .ownface, #dayneeds .needrow.sel .ownsort { display: none; }
.handed { padding: 0 16px 12px; margin-top: -6px; }
.handpop { margin: 0 16px 12px; padding: 12px; }
/* Needs a person: each row is a link to its page */
a.needrow.go { color: var(--ink); text-decoration: none; }
a.needrow.go:hover { background: #F8FAF8; color: var(--ink); }
a.needrow.go:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; }
.rowgo { flex: none; font-size: 13px; font-weight: 600; color: var(--green-700); white-space: nowrap; }

/* The open item: Karen's suggestion (one filled button) on white, no box edge; the rest as text links */
.suggest { border-color: transparent; padding: 12px 16px; gap: 6px; border-radius: 10px; }
.suggest.confirmbox { border-color: transparent; }
.sugrow { gap: 8px 16px; }
.xfoot { border-top: 0; margin-top: 8px; padding-top: 0; justify-content: flex-start; gap: 0 20px; }
.xhand { margin-right: 0; gap: 0 20px; }
.xfoot a, .xfoot .link { min-height: 32px; }
.morebtns { gap: 0 20px; }
.acx { position: relative; }
.acx .xfoot { position: absolute; top: 4px; right: 8px; margin: 0; }
#daypanel .xfoot { padding-left: 0; }

/* Side cards on My day: lighter */
#v-day .dayside .card.pad { padding: 12px 16px; }
#v-day .dayside .cardhead.plain h2 { font-size: 16px; }

/* Touch screens: row actions live inside the opened item; targets stay 44px */
@media (hover: none), (pointer: coarse) {
  .needacts:not(.open) { display: none; }
}
@media (pointer: coarse) {
  .iconbtn { width: 44px; height: 44px; }
  .countchip { min-height: 44px; }
  .ptab, .tab, .fchip, .subnav a, .modechip { min-height: 44px; }
  .needacts.open { top: 4px; right: 4px; }
  .link.quiet, .xfoot a, .xfoot .link { min-height: 44px; }
}
@media (max-width: 720px) {
  .needrow { padding: 12px; }
  #dayneeds .needrow { flex-wrap: wrap; gap: 2px 8px; }
  #dayneeds .needrow .kind { order: 0; width: auto; font-size: 12px; }
  #dayneeds .needrow .ownface, #dayneeds .needrow .ownsort { order: 1; margin-left: auto; }
  #dayneeds .needrow .what { order: 2; flex-basis: 100%; }
  a.needrow.go { flex-wrap: wrap; gap: 2px 8px; }
  a.needrow.go .kind { width: auto; font-size: 12px; }
  a.needrow.go .rowgo { margin-left: auto; order: 1; }
  a.needrow.go .what { order: 2; flex-basis: 100%; }
  .needx { padding: 0 12px 12px 15px; }
  .cardhead { padding: 12px; }
  .cardhead:has(#daymodes) { padding: 0 12px; }
  .daymodes { gap: 0 16px; }
  .handed { padding: 0 12px 12px; }
  .handpop { margin: 0 12px 12px; }
}

/* ---------- Lists that share the pattern: Backorders, Invoices to chase, Needs a person ---------- */
/* One white list with hairline dividers instead of a stack of bordered cards */
.bolist, .needlist { gap: 0; }
.bolist > .card, .needlist > .card { border-radius: 0; border-width: 1px 1px 0; border-color: var(--divider); }
.bolist > .card:first-child, .needlist > .card:first-child { border-radius: var(--r-card) var(--r-card) 0 0; }
.bolist > .card:last-child, .needlist > .card:last-child { border-bottom-width: 1px; border-radius: 0 0 var(--r-card) var(--r-card); }
.bolist > .card:only-child, .needlist > .card:only-child { border-radius: var(--r-card); }
.bocard { padding: 16px; gap: 12px; cursor: pointer; }
.bocard.urgent { border: 1px solid var(--divider); border-bottom-width: 0; padding: 16px; box-shadow: inset 3px 0 0 var(--amber-bar); }
.bolist > .bocard.urgent:last-child { border-bottom-width: 1px; }
.bocard:hover { background: #F8FAF8; }
.bocard:has(.ansbox) { cursor: auto; background: var(--surface); }
.bowho .top b { font-size: 16px; }
.needcard { border-left-width: 1px; border-left-color: var(--divider); box-shadow: inset 3px 0 0 var(--amber-bar); padding: 16px; }
.needcard.done { box-shadow: inset 3px 0 0 var(--green-700); border-left-color: var(--divider); }
.acx { padding: 4px 16px 16px; background: #F7FAF8; }
/* Per-row main actions in a list are tonal, not filled: the filled one belongs to the open item */
.bofoot .btn.primary, .needcard .rowbtns .btn.primary {
  background: var(--green-100); border-color: var(--green-100); color: var(--green-900); min-height: 36px; padding: 0 14px; font-size: 14px; }
.bofoot .btn.primary:hover:hover, .needcard .rowbtns .btn.primary:hover { background: #D6E7DD; border-color: #D6E7DD; color: var(--green-900); }
@media (pointer: coarse) {
  .bofoot .btn.primary, .needcard .rowbtns .btn.primary { min-height: 44px; }
}
th { background: var(--surface); color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--divider); }
.card.tbl, .card.ttable, .card.etawrap { border-color: var(--divider); }
@media (max-width: 720px) {
  .bocard, .bocard.urgent, .needcard { padding: 12px; }
  .acx { padding: 4px 12px 12px; }
}
/* Calm pass: small fixes */
.chipnote { flex-basis: 100%; margin: 2px 0 0; }
.countchip[aria-pressed="true"] { text-decoration: none; box-shadow: inset 0 -2px 0 var(--green-700); border-radius: 0; }
.xhand:empty { display: none; }
.teamnow .tmrow > .pav, #v-day .teamnow .tmrow > .pav { width: 32px; height: 32px; border-width: 2px; font-size: 11px; }
.view-in { gap: 16px; }
.lede { font-size: 13px; }
@media (max-width: 720px) { .view-in > .lede, .needsect > .lede { display: none; } }

/* ---------- Calm pass, all sections: shared bits that cascade ---------- */
/* Inside any opened item, everything but the one filled button reads as a quiet text link */
:is(.needx, .acx, .sx, .frx, .pox, .stx, .ansbox, .suggest) .btn:not(.primary):not(.on):not(.big) {
  border-color: transparent; background: transparent; color: var(--grey-ink); font-weight: 500; padding: 0 6px; min-height: 36px; }
:is(.needx, .acx, .sx, .frx, .pox, .stx, .ansbox, .suggest) .btn:not(.primary):not(.on):not(.big):hover { background: transparent; color: var(--ink); text-decoration: underline; }
:is(.sx, .frx, .pox, .stx) { box-shadow: inset 3px 0 0 var(--green-700); }
:is(.sx, .frx, .pox, .stx) .xfoot { border-top: 0; }
/* Row families in Samples, Freight, Purchase orders, Stock and Jobs: same row as My day */
:is(.srow, .frow, .porow, .strow, .resrow) { padding: 12px 16px; gap: 12px; min-height: 56px; }
:is(.srow, .frow, .porow, .strow):hover, .resrow:hover { background: #F8FAF8; }
:is(.srow, .frow, .porow) > .pill { min-width: 112px; font-size: 13px; }
:is(.srow, .frow, .porow, .strow) .what > span, .resrow .what span { font-size: 13px; }
/* Their per-row buttons: tonal, and only on hover or focus (on a touch screen, in the opened item) */
:is(.srow, .frow, .porow) .acts { gap: 4px; }
:is(.srow, .frow, .porow) .acts .btn { min-height: 36px; padding: 0 12px; font-size: 14px; }
:is(.srow, .frow, .porow) .acts .btn.primary { background: var(--green-100); border-color: var(--green-100); color: var(--green-900); }
:is(.srow, .frow, .porow) .acts .btn:not(.primary) { border-color: transparent; background: transparent; color: var(--grey-ink); }
:is(.srow, .frow, .porow):not(:hover):not(:focus-within):not(.sel) .acts:not(:has(details[open])) { opacity: 0; }
@media (hover: none), (pointer: coarse) { :is(.srow, .frow, .porow) .acts { display: none; } }
.code { background: transparent; padding: 0; color: var(--muted); }
/* Notices: a soft tint, no heavy edge */
.cwarn { border-left-width: 3px; }
/* Tables: header as quiet text on white */
.card.tbl th, .card.ttable th, table th { background: var(--surface); }
th.group { border-top-color: var(--divider); }
/* Segmented choices (Peggy edit panel, Music rooms) keep the green fill only for the chosen one */
.segbox { border-color: var(--line); }
.segopt + .segopt { border-left-color: var(--line); }
/* Job page: lighter stage bar and side cards */
.stage i { height: 4px; }
.progress { padding: 16px; }
.made { padding: 12px 16px; }
/* Installs: softer event blocks */
.ev { border-radius: 6px; }
.wkrow.head { background: var(--surface); border-bottom-color: var(--divider); }
.wkrow.head > span:first-child { background: var(--surface); }
/* Peggy: the team table and edit panel */
.thead { background: var(--surface); border-bottom: 1px solid var(--divider); }
.trow.sel { box-shadow: inset 3px 0 0 var(--green-700); }
.edit { border-left-color: var(--divider); }
.nowrow { padding: 8px 16px; }
.card.look { border-top-width: 1px; border-top-color: var(--divider); box-shadow: inset 0 3px 0 var(--amber-bar); }
.card.look.clear { box-shadow: inset 0 3px 0 var(--green-700); }
.looklist { padding: 0 16px 16px; }
.linkrow { padding: 12px 16px; }
.eblock { border-top-color: var(--divider); }
.side { border-right-color: var(--divider); }
@media (max-width: 720px) {
  :is(.srow, .frow, .porow, .strow, .resrow) { padding: 12px; }
  .nowrow, .linkrow { padding-left: 12px; padding-right: 12px; }
}
/* Narrow screens: row buttons live in the opened item, so the row stays one tap target */
@media (max-width: 900px) { :is(.srow, .frow, .porow):not(.sel) .acts { display: none; } }

/* Settings → Features (app.js): one row per part of Karen, a quiet on/off switch on the right */
.fts { overflow: hidden; }
.ftrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; padding: 12px 16px; border-top: 1px solid var(--divider); }
.ftrow:first-child { border-top: 0; }
.ftlabel { display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: pointer; }
.ftname { font-weight: 700; color: var(--ink); }
.ftdoes, .ftneeds { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ftrow.off .ftname { color: var(--grey-ink); }
.ftstate { font-size: 13px; color: var(--muted); min-width: 5.5em; text-align: right; order: 2; }
input[type=checkbox].ftswitch { order: 3; appearance: none; -webkit-appearance: none; margin: 0; width: 40px; height: 24px; border-radius: 999px; background: var(--input); position: relative; cursor: pointer; transition: background .15s ease; flex: none; }
input[type=checkbox].ftswitch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform .15s ease; }
input[type=checkbox].ftswitch:checked { background: var(--green-700); }
input[type=checkbox].ftswitch:checked::after { transform: translateX(16px); }
.ftswitch:disabled { opacity: .5; cursor: default; }
.ftswitch:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ftswitch, .ftswitch::after { transition: none; } }
@media (pointer: coarse) { .ftrow { min-height: 56px; } input[type=checkbox].ftswitch { width: 48px; height: 28px; } input[type=checkbox].ftswitch::after { width: 22px; height: 22px; } input[type=checkbox].ftswitch:checked::after { transform: translateX(20px); } }
@media (max-width: 520px) { .ftstate { display: none; } .ftrow { padding: 12px; } }
/* Demo mode: preview what staff see */
.demobar .demostaff { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Calm pass 2 (My day v3, quiet badges, simpler open items, Jobs home)
   ========================================================================== */

/* Menu badges: quiet grey counts. Red only for overdue or urgent. No green or amber pills. */
.badge, .badge.amber { background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; padding: 0 4px; }
.badge.red { background: transparent; color: var(--red); font-weight: 700; }
@media (min-width: 901px) and (max-width: 1279px) { .navlist a .badge { background: var(--surface); border-radius: 999px; } }

/* My day: greeting with the living K, progress, Next up, Then */
#v-day .vtitle { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
#v-day .vtitle .dateline { order: 0; margin: 0; font-size: 14px; color: var(--muted); }
.hellorow { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kdaymark { width: 44px; height: 44px; }
.hellotxt { min-width: 0; }
#v-day #dayhello { font-size: 26px; line-height: 1.15; order: 0; }
.karenline { margin: 2px 0 0; font-size: 14px; line-height: 1.35; color: var(--grey-ink); overflow-wrap: anywhere; }
.dayprogress { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.dayprogress[hidden] { display: none; }
.dayprogress .bar { width: 140px; max-width: 40vw; height: 6px; border-radius: 999px; background: var(--divider); overflow: hidden; flex: none; }
.dayprogress .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green-700); }
#v-day .saying { display: none; }
@media (min-width: 1100px) and (min-height: 820px) { #v-day .saying:not([hidden]) { display: flex; order: 4; margin: 4px 0 0; } }

.daymain { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.focuscard { padding: 14px 0 0; }
.focuscard.none { padding: 0; }
.focuscard.none .eyebrow { display: none; }
.eyebrow { margin: 0; padding: 0 16px; font-size: 12px; font-weight: 700; text-transform: none; color: var(--green-700); }
.focuscard .needitem { box-shadow: none; background: transparent; }
.focuscard .needrow { padding: 6px 16px 8px; }
.focuscard .needrow .what b { font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.focuscard .needx { box-shadow: none; padding: 0 16px 16px; }
.focuscard .needitem.sel { box-shadow: none; background: transparent; }
#dayneeds .needrow.sel .what > span { display: block; }
#dayneeds .needrow.sel { padding-top: 8px; padding-bottom: 8px; background: transparent; }
.thencard .cardhead { flex-wrap: wrap; align-items: flex-end; gap: 4px 16px; padding-bottom: 0; }
.thencard .cardhead h2, .thencard .cardhead:has(#daymodes) h2 { padding-bottom: 10px; display: block; flex-basis: auto; }
.thencard .cardhead > .link { margin-left: auto; padding-bottom: 10px; font-size: 13px; }
.thencard .cardhead .daymodes { order: 3; flex-basis: 100%; }
.tgroup { margin: 0; padding: 14px 16px 4px; font-size: 12px; font-weight: 700; text-transform: none; color: var(--muted); border-top: 1px solid var(--divider); }
.tgroup span { margin-left: 6px; font-weight: 500; letter-spacing: 0; }
#daythen .tgroup:first-child { border-top: 0; }
/* The type label lives in the detail line: a dot and a word, then the detail */
.needrow .kinds { display: inline-flex; align-items: center; gap: 5px; color: var(--grey-ink); font-weight: 500; }
.kd { width: 7px; height: 7px; border-radius: 50%; background: #9AA8A1; flex: none; display: inline-block; }
.kd.amber { background: var(--amber-bar); } .kd.red { background: var(--red); } .kd.blue { background: var(--blue); } .kd.green { background: var(--green-700); }
.needrow .what b { overflow-wrap: anywhere; }
#dayneeds .needrow { flex-wrap: nowrap; }
#dayneeds .needrow .what { order: 0; flex-basis: auto; }
#dayneeds .needrow .ownface, #dayneeds .needrow .ownsort { order: 1; margin-left: 0; }

/* The open item: one sentence, one big button, the rest under More */
.btn.big { min-height: 48px; padding: 0 24px; font-size: 16px; }
.suggest.bigsug { background: transparent; padding: 4px 0 0; }
.suggest.bigsug .sughead { margin-bottom: 8px; }
details.xmore { margin-top: 4px; }
details.xmore > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; color: var(--green-700); font-weight: 600; font-size: 14px; }
details.xmore > summary::-webkit-details-marker { display: none; }
details.xmore > summary:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; border-radius: 4px; }
details.xmore[open] > summary .chev { display: inline-block; transform: rotate(180deg); }
.xmorebody { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 4px; }
.xmorebody .xfoot { margin-top: 0; }
@media (pointer: coarse) { details.xmore > summary { min-height: 44px; } }

/* Team right now: one compact row of faces */
#v-day .dayside { position: static; max-height: none; overflow: visible; }
#v-day .dayside > .card:has(#dayteam) { display: block; }
.tsrow { display: flex; flex-wrap: wrap; gap: 4px 6px; position: relative; padding-bottom: 2px; }
.tsface { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; padding: 4px; border: 2px solid transparent; border-radius: var(--r-ctl); cursor: default; }
.tsface:focus-visible { outline: 2px solid var(--green-700); outline-offset: 1px; }
.tsav { position: relative; display: block; }
.tsav .pav { width: 40px; height: 40px; font-size: 12px; border-width: 2px; background: var(--divider); color: var(--ink); border-color: transparent; }
.tsav .pav.ring.call { border-color: var(--red); border-width: 3px; }
.sdot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #9AA8A1; border: 2px solid var(--surface); box-sizing: border-box; }
.sdot.free { background: var(--green-700); } .sdot.call { background: var(--red); } .sdot.away { background: var(--amber-bar); } .sdot.off { background: #9AA8A1; }
.tsface .tn { font-size: 12px; font-weight: 600; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsface .awaytag { position: absolute; top: 0; right: 0; padding: 0 5px; border-radius: 999px; background: var(--divider); color: var(--grey-ink); font-size: 10px; font-weight: 700; }
.tsmenu { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 6; margin-top: 4px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl);
  box-shadow: 0 6px 20px rgba(22, 35, 29, 0.12); align-items: center; gap: 4px 12px; flex-wrap: wrap; cursor: default; }
.tsface:hover > .tsmenu, .tsface:focus-within > .tsmenu, .tsface.open > .tsmenu { display: flex; }
.tsmenu b { font-size: 14px; }
.tsbtns { display: inline-flex; gap: 4px; }
.tsbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--green-700); cursor: pointer; }
.tsbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tsbtn:hover { background: var(--green-100); }
.tsbtn.off { color: #9AA8A1; cursor: default; }
.tsbtn.off:hover { background: transparent; }
.tsmenu .tscap { font-size: 13px; color: var(--muted); }
@media (pointer: coarse) { .tsbtn { width: 44px; height: 44px; } .tsface { min-width: 56px; } }
.teamnow.dragging .tsface.can { border-color: var(--line); border-style: dashed; }
.teamnow.dragging .tsface.cant { opacity: 0.45; }
.tsface.over { border-color: var(--green-700); border-style: solid; background: var(--green-100); }
.did.bad span { color: var(--red); }
.did.bad time { color: var(--muted); }

/* Jobs: your recent jobs and jobs needing something, as calm rows */
.jobhome { display: flex; flex-direction: column; gap: 20px; }
.jobhome[hidden] { display: none; }
.jsect h2 { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.jlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.jrow { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--divider); color: var(--ink); text-decoration: none; min-height: 44px; }
.jrow:last-child { border-bottom: 0; }
.jrow:hover { background: #F8FAF8; color: var(--ink); }
.jrow:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; }
.jrow .what { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jrow .what b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.jrow .what span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.jrow .arrow { color: var(--muted); }

/* Job page header: one filled Call, the rest quiet links */
.jobhead .acts { align-items: center; gap: 8px 20px; }
.jlinks { display: inline-flex; flex-wrap: wrap; gap: 0 20px; }
@media (max-width: 720px) {
  .jobhead .acts .btn { flex: none; }
  .jobhead .acts .btn.primary { width: 100%; }
  #v-day #dayhello { font-size: 22px; }
  .kdaymark { width: 36px; height: 36px; }
  .focuscard .needrow .what b { font-size: 17px; }
  .thencard .cardhead:has(#daymodes) h2 { display: block; flex-basis: auto; }
}

/* Next up stays short: the detail line is one line while the item is open */
.focuscard .needrow.sel .what > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
@media (min-width: 900px) { #v-day .view-in { padding-top: 12px; } }
/* Short screens: keep Next up and a few Then rows in view */
@media (min-width: 900px) and (max-height: 800px) {
  #v-day .dayprogress, #v-day .dateline { display: none; }
  #v-day .vhead { margin-bottom: 8px; }
  #dayneeds .focuscard .needrow.sel .what > span { display: none; }
  #dayneeds { gap: 12px; }
  .thencard .cardhead { flex-wrap: nowrap; align-items: center; padding-bottom: 4px; }
  .thencard .cardhead h2, .thencard .cardhead:has(#daymodes) h2 { padding-bottom: 0; }
  .thencard .cardhead .daymodes { order: 0; flex-basis: auto; }
  .thencard .cardhead > .link { padding-bottom: 0; }
  #daythen .needrow .what > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  #daythen .needrow { padding-top: 8px; padding-bottom: 8px; }
  .tgroup { padding-top: 8px; }
}

/* ---------- Hierarchy pass (Oct 2026): one loud thing, each fact once (karen-os-design section 0) ---------- */
/* Rows: who (bold), one quiet line, and when on the right. Colour only when it's late. */
.needrow .kinds { color: var(--grey-ink); font-weight: 600; }
.needrow .kinds .kd { display: none; }
.needwhen { flex: none; max-width: 38%; text-align: right; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.needwhen.late { color: var(--red); font-weight: 700; }
.needrow .what > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ownface { opacity: 0.8; }
/* The open item says it all: its row keeps just the name */
#dayneeds .needrow.sel .what > span, #dayneeds .needrow.sel .needwhen { display: none; }
/* The greeting is one line under the name; no extra lines above the work */
.dayhead .dateline { margin-bottom: 2px; }
#v-day .saying { display: none; }
/* Team right now and What Karen did today: secondary */
.dayside .card h2 { font-size: 14px; color: var(--grey-ink); font-weight: 700; }
.dayside .card { box-shadow: none; }
#daykaren .cardhead img { width: 18px; height: 18px; }
.didlist { font-size: 13px; }
@media (max-width: 760px) {
  #dayneeds .needrow, #needs-more .needrow { flex-wrap: wrap; }
  #dayneeds .needrow .what, #needs-more .needrow .what { flex: 1 1 100%; }
  .needwhen { max-width: none; flex: 1 1 auto; text-align: left; order: 2; white-space: normal; }
  .needrow .what > span { white-space: normal; }
}
/* Caller page: the one thing that matters about a missed call, in words, not a pill */
#callerpage .callwarn { margin: 0 0 4px; color: var(--red); font-weight: 700; font-size: 14px; }
#callerpage .callnote { margin: 0 0 4px; color: var(--muted); font-size: 14px; }

/* ==========================================================================
   Shared patterns (design guide section 0). Every page uses these; sections keep
   only their own layout. Template: the Leads page (title + one line, one outline
   action + one "Take next" button, search, tabs, a white list of rows).
   ========================================================================== */

/* A1 Page frame. Work pages use the screen (Finn, 13 Nov 2026: "a lot of the pages seem to have a narrow width thing going on"): lists and
   tables up to 1600px, wide pages up to 1800px. Forms and settings keep their reading width (.narrow, .setcol), and long text keeps its own
   measure inside the page. */
.view-in { max-width: 1600px; padding: 32px 40px 60px; }
.view-in.wide { max-width: 1800px; }
/* Admin and settings lists read better at the old width: a row's name and its status shouldn't sit 1,500px apart */
:is(#v-settings-connections, #v-settings-features, #v-karen-ai, #v-who-does-what, #v-workflows) .view-in { max-width: 1240px; }
.view-in.full { max-width: none; }
.view-in.narrow { max-width: 760px; }
@media (max-width: 720px) { .view-in { padding: 20px 16px 40px; } }

/* A2 Page header */
.vhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin: 0; }
.vtitle { flex: 1 1 320px; min-width: 0; }
.vtitle h1 { margin: 0; font-size: clamp(24px, 14px + 1.5vw, 32px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
.vtitle .dateline, .dateline { margin: 6px 0 0; font-size: 15px; font-weight: 400; color: var(--muted); }
.dateline .stale { color: var(--amber); font-weight: 600; }
.vacts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: none; }
.vacts .btn { min-height: 44px; }
@media (max-width: 720px) { .vacts { width: 100%; } .vacts .btn.primary { flex: 1 1 auto; } }

/* A3 Search (sits under the header) */
.search { position: relative; display: block; width: 100%; max-width: 560px; }
.search input { width: 100%; height: 44px; padding: 0 14px 0 42px; border: 1px solid var(--input); border-radius: var(--r-ctl); background: var(--surface);
  font: 400 15px var(--font); color: var(--ink); box-sizing: border-box; }
.search input:focus { outline: 2px solid var(--green-700); outline-offset: -1px; border-color: var(--green-700); }
.search::before { content: ""; position: absolute; left: 15px; top: 50%; width: 13px; height: 13px; margin-top: -9px; border: 2px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search::after { content: ""; position: absolute; left: 28px; top: 50%; width: 2px; height: 7px; margin-top: 2px; background: var(--muted); transform: rotate(-45deg); pointer-events: none; border-radius: 1px; }
@media (max-width: 720px) { .search { max-width: none; } }

/* A4 Tabs: one line, scrolls, never wraps */
.tabs { display: flex; gap: 0 24px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--divider); margin: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { font: 600 15px var(--font); min-height: 44px; padding: 0 2px; border: 0; border-radius: 0; background: transparent; color: var(--muted);
  box-shadow: inset 0 -2px 0 transparent; flex: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; text-decoration: none; }
.tab:hover { color: var(--ink); }
.tab.on, .tab[aria-selected="true"] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--green-700); }
.tab .tabn, .tab.on .tabn { font-size: 13px; font-weight: 500; color: var(--muted); background: transparent; padding: 0; }

/* A5 List and rows. Columns in this order, leaving out what a page doesn't have:
   mark · who · when · money · act (or status) */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; min-width: 0; }
.list > .lrow, .lrow.row { display: grid; grid-template-columns: var(--lrow-cols, minmax(0, 1fr) auto); align-items: center; gap: 4px 20px;
  padding: 14px 20px; min-height: 64px; box-sizing: border-box; border-bottom: 1px solid var(--divider); color: var(--ink); text-decoration: none;
  cursor: pointer; background: var(--surface); text-align: left; width: 100%; font: inherit; border-left: 0; border-right: 0; border-top: 0; }
.list > .lrow:last-child { border-bottom: 0; }
.list > .lrow:hover { background: #FAFCFA; color: var(--ink); }
.list > .lrow:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; }
.list > .lrow.cur { background: var(--green-100); }
/* A column heading row for a list (the new look, 22 Nov 2026): sentence case, muted, never clickable. Give it the same cells as the rows, and class "r" on a
   figure column so it lines up on the right. Hidden on a phone, where rows stack. */
.list > .lrow.lhead { cursor: default; min-height: 0; padding-top: 9px; padding-bottom: 9px; border-bottom: 1px solid var(--line); background: var(--surface); }
.list > .lrow.lhead:hover { background: var(--surface); }
.list > .lrow.lhead > span { font-size: 13px; font-weight: 500; color: var(--muted); }
.list > .lrow.lhead > .r { text-align: right; justify-self: end; }
@media (max-width: 720px) { .list > .lrow.lhead { display: none; } }
.list.cols-who-act { --lrow-cols: minmax(0, 1fr) 160px; }
.list.cols-who-when-act { --lrow-cols: minmax(0, 1fr) 170px 150px; }
.list.cols-who-when-money-act { --lrow-cols: minmax(0, 1fr) 160px 130px 130px; }
.list.cols-mark-who-when-status { --lrow-cols: 120px minmax(0, 1fr) 140px 110px; }
.list.cols-who-money-act { --lrow-cols: minmax(0, 1fr) 130px 140px; }
.lrow-mark { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow-who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lrow-who > b { font-size: 15px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow-who > span { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow-when { font-size: 14px; font-weight: 500; color: var(--grey-ink); white-space: nowrap; }
.lrow-when.late { color: var(--red); font-weight: 700; }
.lrow-money { font-size: 15px; font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lrow-act { font-size: 14px; font-weight: 600; color: var(--green-700); text-align: right; white-space: nowrap; text-decoration: none; }
.lrow-act:is(button) { border: 0; background: transparent; cursor: pointer; padding: 0; font: 600 14px var(--font); min-height: 40px; }
.lrow-status { font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; justify-self: end; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .list.act-on-hover > .lrow .lrow-act { opacity: 0.7; } .list.act-on-hover > .lrow:hover .lrow-act, .list.act-on-hover > .lrow:focus-within .lrow-act { opacity: 1; } }
@media (max-width: 720px) {
  .list > .lrow, .lrow.row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 16px; }
  .lrow-mark { grid-column: 1 / -1; }
  .lrow-who > b, .lrow-who > span { white-space: normal; }
  .lrow-when { grid-column: 1; }
  .lrow-money, .lrow-act, .lrow-status { grid-column: 2; }
}
.listbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }

/* A6 The pop-up (KarenPop in lib.js; sections may also build the same markup) */
dialog.pop { width: min(600px, calc(100% - 24px)); max-height: calc(100% - 32px); margin: auto; padding: 32px 36px; border: 0; border-radius: 18px;
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(22, 35, 29, 0.35); overflow: auto; box-sizing: border-box; }
dialog.pop[open] { display: flex; flex-direction: column; gap: 18px; }
dialog.pop::backdrop { background: rgba(22, 35, 29, 0.45); }
.pop-x { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ground); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer; }
.pop-x:hover { background: var(--divider); }
.pop-ctx { margin: 0; padding-right: 52px; font-size: 13px; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.pop-h { margin: 0; padding-right: 52px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; }
.pop-ctx + .pop-h { margin-top: -12px; }
.pop-big { display: flex; flex-direction: column; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pop-big-n { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pop-big-l { font-size: 13px; color: var(--muted); }
.pop-ctx + .pop-h + .pop-big { margin-top: -4px; }
.pop-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.pop-facts > div { min-width: 0; }
.pop-facts dt { font-size: 13px; color: var(--muted); }
.pop-facts dd { margin: 0; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pop-facts dd.late { color: var(--red); }
.pop-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pop-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pop-go .btn.primary { min-width: 220px; min-height: 52px; font-size: 16px; font-weight: 800; }
.pop-go .btn:not(.primary) { min-height: 44px; }
.pop-msg:empty { display: none; }
.pop-msg { margin: -6px 0 0; }
.pop-more { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 2px; }
.pop-more .link { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--grey-ink); text-decoration: none; }
.pop-more .link:hover { color: var(--ink); text-decoration: underline; }
body.pop-open { overflow: hidden; }
@media (max-width: 720px) {
  dialog.pop { padding: 22px 18px; width: calc(100% - 16px); }
  dialog.pop[open] { gap: 14px; }
  .pop-h { font-size: 21px; }
  .pop-big-n { font-size: 32px; }
  .pop-go .btn.primary { flex: 1 1 100%; }
}

/* A7 Fold: one per opened item, no box */
details.fold { border: 0; padding: 0; }
details.fold > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  font-size: 14px; font-weight: 600; color: var(--grey-ink); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.15s; margin: 0 2px; }
details.fold[open] > summary::before { transform: rotate(45deg); }
details.fold > summary:hover { color: var(--ink); }
details.fold > .fold-body { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; }
dialog.pop details.fold { border-top: 1px solid var(--divider); padding-top: 8px; }
@media (prefers-reduced-motion: reduce) { details.fold > summary::before { transition: none; } }

/* A8 Buttons: one filled per screen or pop-up; ⋮ menus for the rest */
.btn.icon { width: 44px; min-width: 44px; padding: 0; justify-content: center; font-size: 20px; line-height: 1; }
.btn.more-dots::before { content: "⋮"; font-size: 20px; }
.link { text-decoration: none; }
.link:hover { text-decoration: underline; }
.need { font-size: 14px; font-weight: 600; color: var(--red); margin: 0; }

/* A9 Section heading */
h2.sechead, .sechead { margin: 8px 0 0; font-size: 16px; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; }
.sechead .tabn, .sechead .n { margin-left: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.view-in > .sechead:first-child { margin-top: 0; }

/* A10 Status: a dot and one word */
.dotw { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.dotw .dot, .dotw::before { flex: none; }
.dotw.good::before, .dotw.warn::before, .dotw.bad::before, .dotw.off::before, .dotw.info::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9AA8A1; }
.dotw.good::before { background: var(--green-700); }
.dotw.warn::before { background: var(--amber-bar); }
.dotw.bad::before { background: var(--red); }
.dotw.info::before { background: var(--blue); }
.dotw.bad { color: var(--red); font-weight: 600; }

/* A12 Date quick picks (KarenDatePick in lib.js) */
.dpick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dpick-o { min-height: 40px; padding: 0 14px; border: 1px solid var(--input); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 600 14px var(--font); cursor: pointer; }
.dpick-o:hover { border-color: var(--grey-ink); }
.dpick-o[aria-pressed="true"] { background: var(--green-100); border-color: var(--green-700); color: var(--green-900); }
.dpick-in { height: 40px; border: 1px solid var(--input); border-radius: var(--r-ctl); padding: 0 10px; font: 400 15px var(--font); }
.dpick-val { font-size: 15px; font-weight: 700; color: var(--ink); margin-left: 4px; }
.dpick-val:empty { display: none; }
@media (pointer: coarse) { .dpick-o { min-height: 44px; } }

/* A13 Empty, loading, errors */
.empty { padding: 24px 20px; font-size: 15px; color: var(--muted); margin: 0; }
.list > .empty { border: 0; }

/* A14 Helper text: one line; longer behind a fold */
.hint { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* A15 Toast: bottom left of the content, one line, never over a pop-up */
.toast { left: calc(264px + 24px); right: auto; transform: none; bottom: 16px; max-width: 420px; min-height: 48px; box-sizing: border-box; font-size: 14px;
  padding: 6px 6px 6px 16px; gap: 12px; }
.toast #toasttext { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast #toastundo { flex: none; min-height: 36px; border: 0; color: #BFE3CF; font-weight: 700; }
dialog[open] .toast { position: fixed; top: 16px; bottom: auto; left: 50%; transform: translateX(-50%); }
@media (min-width: 901px) and (max-width: 1279px) { .toast { left: calc(76px + 24px); } }
@media (max-width: 900px) { .toast { left: 16px; right: 16px; max-width: none; } }

/* A16 Sidebar: the white panel always reaches the bottom */
@media (min-width: 1280px) { #app { background: linear-gradient(90deg, var(--surface) 0, var(--surface) 263px, var(--divider) 263px, var(--divider) 264px, transparent 264px); } }
@media (min-width: 901px) and (max-width: 1279px) { #app { background: linear-gradient(90deg, var(--surface) 0, var(--surface) 75px, var(--divider) 75px, var(--divider) 76px, transparent 76px); } }

/* A17 Menu badges: muted unless it needs doing now */
.navlist a .badge.info { background: transparent; color: var(--muted); font-weight: 600; }

/* A18 Settings pages: one 720px column of full-width cards, Save in the card footer */
.setcol { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.setcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.setcard > h2 { margin: 0; font-size: 16px; font-weight: 700; }
.setcard > h2 + .hint { margin-top: -8px; }
.setfoot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; border-top: 1px solid var(--divider); margin: 4px -20px -20px; padding: 10px 20px; }
@media (max-width: 720px) { .setcard { padding: 16px; } .setfoot { margin: 4px -16px -16px; padding: 10px 16px; } }
/* A ⋮ menu has no ▾ */
details.more > summary.more-dots::after, details.more > summary.btn.icon::after, details.more > summary.iconbtn::after, details.more > summary.ib-ico::after, details.more > summary.ib-caret::after { content: none; }

/* The menu folded to icons on a wide screen too: press the K at the top (Finn, 22 Oct 2026). The same rail as
   901 to 1279px wide, under html.navmini; remembered per computer (app.js). */
@media (min-width: 1280px) {
  html.navmini .navlist a.navsub { padding-left: 0; min-height: 40px; }
}
@media (min-width: 1280px) {
  html.navmini #app { grid-template-columns: 76px minmax(0, 1fr); }
  html.navmini .side { padding: 16px 10px; overflow: visible; z-index: 20; }
  html.navmini .brand { padding: 0 0 14px; justify-content: center; }
  html.navmini .brand-txt { display: none; }
  html.navmini .navlist { gap: 8px; }
  html.navmini .searchbtn { width: 52px; height: 48px; padding: 0; justify-content: center; margin: 0 auto; }
  html.navmini .searchbtn .grow, html.navmini .searchbtn kbd { display: none; }
  html.navmini .navgroup { gap: 4px; }
  html.navmini .navhead { font-size: 0; height: 1px; padding: 0; margin: 2px 12px 6px; background: var(--line); }
  html.navmini .navlist a { width: 52px; min-height: 48px; padding: 0; margin: 0 auto; justify-content: center; position: relative; }
  html.navmini .navlist a span { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); flex: none; white-space: nowrap;
    padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #FFFFFF; font-size: 13px; font-weight: 600;
    opacity: 0; pointer-events: none; z-index: 40; box-shadow: 0 4px 14px rgba(22, 35, 29, 0.2); }
  html.navmini .navlist a:hover span, html.navmini .navlist a:focus-visible span { opacity: 1; }
  html.navmini .navlist a .badge { position: absolute; top: 3px; right: 0; min-width: 18px; padding: 0 5px; font-size: 11px; line-height: 18px; text-align: center; }
  html.navmini .side-foot { padding: 12px 0 0; justify-content: center; position: relative; }
  html.navmini .whobox { position: absolute; left: 100%; bottom: 0; width: 250px; z-index: 40; padding: 12px 14px; gap: 2px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: 0 6px 20px rgba(22, 35, 29, 0.14);
    opacity: 0; pointer-events: none; }
  html.navmini .side-foot:hover .whobox, html.navmini .side-foot:focus-within .whobox { opacity: 1; pointer-events: auto; }
  html.navmini .view-in { padding: 28px 32px 56px; }
  html.navmini .banner { padding: 12px 32px; }
  html.navmini .subnav { padding: 16px 32px 0; }
}
@media (min-width: 1280px) and (max-height: 680px) {
  html.navmini .side { overflow-y: auto; overflow-x: hidden; }
  html.navmini .navlist a span, html.navmini .whobox { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); opacity: 1; }
}
@media (min-width: 1280px) {
  html.navmini .navlist a .badge { background: var(--surface); border-radius: 999px; }
}
@media (min-width: 1280px) {
  html.navmini .toast { left: calc(76px + 24px); }
}
@media (min-width: 1280px) {
  html.navmini #app { background: linear-gradient(90deg, var(--surface) 0, var(--surface) 75px, var(--divider) 75px, var(--divider) 76px, transparent 76px); }
}
.brand .mark.kfold { cursor: pointer; border-radius: 10px; }
.brand .mark.kfold:hover { background: var(--ground); }
.brand .mark.kfold:focus-visible { outline: 2px solid var(--green-700, #2f6b4a); outline-offset: 2px; }

/* The round brand badge in front of a row's title (PeggyLib.brandBadge): Issues, Needs a person and My day */
.brandbd { width: 24px; height: 24px; border-radius: 50%; margin-right: 10px; vertical-align: -6px; object-fit: cover; user-select: none; }
