/* GO Module Kit — the one stylesheet. No colours here: tokens only (tokens.css).
   Every module uses these classes. A module never adds its own stylesheet. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 var(--t-md)/1.45 var(--font);
  overflow-x: hidden;
}
a { color: var(--go-soft-ink); }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.k-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ── SHELL ─────────────────────────────────────────────────────────── */
.k-shell { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 100vh; }
.k-side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--nav); color: var(--nav-ink); z-index: 40;
}
/* The brand mark in its own colours, on the white plate it was drawn for — same for every workspace. */
.k-side-logo { display: flex; align-items: center; height: 76px; padding: 0 16px; }
.k-side-logo img { height: 46px; width: auto; max-width: 168px; object-fit: contain; background: #fff; border-radius: 10px; padding: 7px 12px; box-sizing: border-box; }
.k-nav { flex: 1; overflow-y: auto; padding: 8px 10px; }
.k-nav-group { margin: 16px 8px 6px; font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--nav-muted); }
.k-nav a, .k-side-foot a, .k-side-foot button {
  display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 12px;
  border-radius: var(--r-sm); color: var(--nav-ink); text-decoration: none;
  font: 500 var(--t-sm)/1.2 var(--font); border: 0; background: none; width: 100%; cursor: pointer;
  position: relative;
}
.k-nav a:hover, .k-side-foot a:hover, .k-side-foot button:hover { background: var(--nav-2); }
.k-nav a[aria-current="page"] { background: var(--nav-2); font-weight: 700; }
.k-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.k-nav .k-badge { margin-left: auto; }
/* A module with sections (Peter, 2 Nov: "no distinguish between what I'm looking at — it's hurting my eyes").
   The parent is one line; when it opens, its sections sit in their own lighter band, indented behind a rail,
   smaller and quieter than the parent, so the parent reads as the heading and the sections as its contents. */
.k-nav-sub { margin: 2px 0; border-radius: var(--r-sm); }
.k-nav-sub > summary {
  display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 12px;
  border-radius: var(--r-sm); color: var(--nav-ink); font: 500 var(--t-sm)/1.2 var(--font);
  cursor: pointer; list-style: none; position: relative;
}
.k-nav-sub > summary::-webkit-details-marker { display: none; }
.k-nav-sub > summary:hover { background: var(--nav-2); }
.k-nav-sub > summary[data-inside] { font-weight: 700; }
.k-nav-sub[open] { background: var(--nav-3); padding-bottom: 6px; }
.k-nav-sub[open] > summary { background: var(--nav-3); border-radius: var(--r-sm) var(--r-sm) 0 0; font-weight: 700; }
.k-nav-chev { margin-left: auto; display: flex; transition: transform .15s; opacity: .7; }
.k-nav-sub[open] .k-nav-chev { transform: rotate(180deg); }
.k-nav-sub > a {
  margin: 0 6px 0 18px; padding-left: 14px; min-height: var(--tap); width: auto;
  border-left: 2px solid var(--nav-rail); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--nav-muted); font-weight: 500; font-size: var(--t-sm);
}
.k-nav-sub > a .k-icon { opacity: .75; }
.k-nav-sub > a:hover { background: var(--nav-2); color: var(--nav-ink); }
.k-nav-sub > a[aria-current="page"] { background: var(--nav-2); color: var(--nav-ink); font-weight: 700; border-left-color: var(--brand); }
.k-nav-sub > a[aria-current="page"]::before { display: none; }
.k-nav-sub > a[aria-current="page"] .k-icon { opacity: 1; }
.k-side-foot { padding: 8px 10px 14px; border-top: 1px solid var(--nav-2); }
.k-side-foot form { margin: 0; }

.k-main { min-width: 0; display: flex; flex-direction: column; }
.k-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px;
  height: 64px; padding: 0 24px; background: var(--card); border-bottom: 1px solid var(--line);
}
.k-top-title { font-weight: 700; font-size: var(--t-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-top-search { flex: 1; max-width: 520px; margin: 0 auto; display: flex; }
.k-top-search input { border-radius: var(--r-pill) 0 0 var(--r-pill); }
.k-top-search button { border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.k-top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.k-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: var(--tap); height: var(--tap); border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; flex: none;
}
.k-iconbtn:hover { background: var(--soft); }
.k-iconbtn .k-badge { position: absolute; top: -6px; right: -6px; }
.k-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--amber-bg); color: var(--amber-ink); border: 1px solid var(--amber); font-size: var(--t-xs); font-weight: 700; }
.k-ws { display: inline-flex; align-items: center; gap: 8px; height: var(--tap); padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); cursor: pointer; color: var(--ink); font: 600 var(--t-sm) var(--font); list-style: none; }
.k-ws::-webkit-details-marker { display: none; }
.k-ws img { height: 22px; width: auto; max-width: 74px; object-fit: contain; }
.k-menu { position: relative; }
.k-menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 50;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 6px;
}
.k-menu-pop.is-left { left: 0; right: auto; }
.k-menu-pop form { margin: 0; }
.k-menu-pop a, .k-menu-pop button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 0 12px;
  border: 0; background: none; border-radius: var(--r-sm); color: var(--ink); text-decoration: none;
  font: 500 var(--t-sm) var(--font); cursor: pointer; text-align: left;
}
.k-menu-pop a:hover, .k-menu-pop button:hover { background: var(--soft); }
.k-menu-pop .is-danger { color: var(--red-ink); }
.k-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--red-bg); color: var(--red-ink); font-weight: 700; font-size: var(--t-xs); flex: none; position: relative; overflow: hidden; }
/* the sender's emblem sits over the initials; a missing one removes itself and the initials show */
.k-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 5px; background: var(--paper); border-radius: 50%; box-sizing: border-box; }
.k-who { display: flex; flex-direction: column; line-height: 1.2; font-size: var(--t-xs); color: var(--muted); }
.k-who b { color: var(--ink); font-size: var(--t-sm); }

.k-content { width: 100%; min-width: 0; max-width: 1330px; margin: 0 auto; padding: 24px 24px 48px; }
.k-dock { display: none; }
.k-scrim { display: none; }
.k-menu-btn { display: none; }
.k-only-phone { display: none; }

/* ── PAGE ──────────────────────────────────────────────────────────── */
.k-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.k-head h1 { font-size: var(--t-xl); font-weight: 750; letter-spacing: -.02em; }
.k-head p { margin: 6px 0 0; color: var(--muted); font-size: var(--t-sm); }
.k-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.k-back { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); margin: -8px 0 4px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: var(--t-sm); }
.k-stack { display: grid; gap: 16px; }
.k-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.k-section-title { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; font-size: var(--t-sm); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* ── CARD ──────────────────────────────────────────────────────────── */
.k-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 16px; min-width: 0; scroll-margin-top: 80px; }
.k-card > h2 { display: flex; align-items: center; gap: 10px; font-size: var(--t-lg); font-weight: 700; margin-bottom: 12px; }
.k-card > h2 .k-count { font-size: var(--t-sm); color: var(--muted); font-weight: 600; }
.k-card-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.k-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 16px; margin: 0; }
.k-facts div { min-width: 0; }
.k-facts dt { font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.k-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }

/* ── BUTTONS (Bible 96: actions are soft blue) ─────────────────────── */
/* A button or link marked hidden stays hidden (its own display rule otherwise wins): Penny's 'Open the clean PDF'
   showed on an empty receipt screen, 3 Nov. */
.k-btn[hidden], .k-link[hidden] { display: none; }
.k-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: 600 var(--t-sm)/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.k-btn:hover { background: var(--soft); }
.k-btn--go { background: var(--go); border-color: var(--go); color: var(--go-ink); }
.k-btn--go:hover { background: var(--go-press); }
.k-btn--soft { background: var(--go-soft); border-color: var(--blue-line); color: var(--go-soft-ink); }
.k-btn--danger { color: var(--red-ink); border-color: var(--red-line); }
.k-btn--danger:hover { background: var(--red-bg); }
.k-btn--wide { width: 100%; }
.k-btn[disabled], .k-btn.is-off { opacity: .5; cursor: not-allowed; }
.k-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.k-btn-row--end { justify-content: flex-end; }
.k-link { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--go-soft-ink); font-weight: 600; font-size: var(--t-sm); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ── LIGHTS: pills, dots ───────────────────────────────────────────── */
.k-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 700; border: 1px solid; white-space: nowrap; }
.k-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.k-dot.is-red { background: var(--red); }
.k-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--grey); flex: none; }
.k-dot.is-amber { background: var(--amber); } .k-dot.is-green { background: var(--green); } .k-dot.is-blue { background: var(--blue); }
.k-pill.is-red, .k-tint.is-red { background: var(--red-bg); color: var(--red-ink); border-color: var(--red-line); }
.k-pill.is-amber, .k-tint.is-amber { background: var(--amber-bg); color: var(--amber-ink); border-color: var(--amber-line); }
.k-pill.is-green, .k-tint.is-green { background: var(--green-bg); color: var(--green-ink); border-color: var(--green-line); }
.k-pill.is-grey, .k-tint.is-grey { background: var(--grey-bg); color: var(--grey-ink); border-color: var(--grey-line); }
.k-pill.is-blue, .k-tint.is-blue { background: var(--blue-bg); color: var(--blue-ink); border-color: var(--blue-line); }

/* ── STATUS CARDS: red needs me · amber waiting · green done ───────── */
.k-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.k-cards a {
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 104px; padding: 14px 16px;
  border: 1px solid; border-radius: var(--r-md); text-decoration: none;
}
.k-cards a[aria-current="true"] { box-shadow: 0 0 0 3px var(--focus); }
.k-cards .k-card-label { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: var(--t-sm); }
.k-cards .k-card-num { font-size: var(--t-xl); font-weight: 800; line-height: 1; }

/* ── THE FLOW CHART (Bible 101/99): numbered nodes, arrows, lights ── */
.k-flow { margin-bottom: 16px; }
.k-flow ol { --n: 5; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.k-flow li { position: relative; min-width: 0; }
.k-flow li + li::before {   /* the line + arrow into this node */
  content: ""; position: absolute; top: 31px; left: calc(-50% + 30px); right: calc(50% + 30px); height: 3px;
  background: var(--grey-line); border-radius: 2px;
}
.k-flow li + li::after {
  content: ""; position: absolute; top: 26px; right: calc(50% + 28px); width: 0; height: 0;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 8px solid var(--grey-line);
}
.k-flow li.is-after-done::before { background: var(--green); }
.k-flow li.is-after-done::after { border-left-color: var(--green); }
.k-node {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 10px; min-height: var(--tap);
  border-radius: var(--r-md); text-decoration: none; color: var(--ink); text-align: center;
}
a.k-node:hover { background: var(--soft); }
.k-node-ring { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 3px solid transparent; flex: none; }
.k-node-dot { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 2px solid; }
.k-node.is-here .k-node-ring { border-color: var(--focus); }
.k-node-n { font-size: var(--t-xs); font-weight: 700; color: var(--muted); }
.k-node-label { font-weight: 700; font-size: var(--t-sm); line-height: 1.25; }
.k-node-state { font-size: var(--t-xs); color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
.k-node-flag { font-size: var(--t-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--go-soft-ink); }
.k-node .k-node-dot { background: var(--grey-bg); color: var(--grey-ink); border-color: var(--grey-line); }
.k-node.is-red .k-node-dot { background: var(--red-bg); color: var(--red-ink); border-color: var(--red); }
.k-node.is-amber .k-node-dot { background: var(--amber-bg); color: var(--amber-ink); border-color: var(--amber); }
.k-node.is-green .k-node-dot { background: var(--green); color: var(--go-ink); border-color: var(--green); }

/* The NEXT STEP block: the biggest thing on the page (Bible 90/99) */
.k-next {
  display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 18px; margin-top: 8px;
  border-radius: var(--r-md); background: var(--go); color: var(--go-ink); text-decoration: none;
}
.k-next.is-done { background: var(--green); }
.k-next-kicker { font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .9; }
.k-next-title { font-size: var(--t-lg); font-weight: 750; line-height: 1.25; }
.k-next-sub { font-size: var(--t-sm); opacity: .95; }
.k-next-body { flex: 1; min-width: 0; }
.k-next-arrow { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--go-ink); color: var(--go); flex: none; }
.k-next.is-done .k-next-arrow { color: var(--green); }
.k-pass { margin-top: 6px; text-align: right; }

/* ── LIST (Bible 102 §5, Bible 98 A) ──────────────────────────────── */
.k-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.k-tools form { display: flex; gap: 8px; flex: 1; min-width: 0; }
.k-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
/* A module front page that opens onto its sections: one tile each, with its own lights. */
.k-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 20px; }
.k-section-tile { display: flex; flex-direction: column; gap: 12px; }
.k-section-head { display: flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--ink); text-decoration: none; font-size: var(--t-md); font-weight: 750; }
.k-section-tile .k-btn-row { flex-wrap: wrap; gap: 8px; }
.k-sub-h { font-size: var(--t-md); font-weight: 700; margin: 4px 0 10px; }
.k-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: var(--t-sm); font-weight: 600; text-decoration: none; }
.k-chip[aria-current="true"] { background: var(--go-soft); border-color: var(--blue-line); color: var(--go-soft-ink); }

.k-list { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.k-list th { background: var(--soft); text-align: left; padding: 8px 12px; font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.k-list th a { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; color: inherit; text-decoration: none; }
.k-list td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: var(--t-sm); }
.k-list tr:last-child td { border-bottom: 0; }
.k-list tbody tr:hover td { background: var(--soft); }
.k-list tr.is-ticked td { background: var(--go-soft); }
.k-col-tick { width: 52px; }
.k-col-num { text-align: right; white-space: nowrap; font-weight: 800; }
.k-col-fit { white-space: nowrap; width: 1%; }
.k-check { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); margin: -8px; cursor: pointer; }
.k-check input { width: 20px; height: 20px; accent-color: var(--go); cursor: pointer; }
.k-row-title { display: block; font-weight: 700; font-size: var(--t-md); color: var(--ink); text-decoration: none; line-height: 1.3; }
.k-row-title:hover { text-decoration: underline; }
.k-row-sub { display: block; color: var(--muted); font-size: var(--t-sm); }
.k-row-label { display: none; }
.k-bulk { display: none; position: sticky; top: 72px; z-index: 20; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; margin-bottom: 12px; border-radius: var(--r-md); background: var(--blue-bg); border: 1px solid var(--blue-line); color: var(--blue-ink); font-weight: 700; }
.k-bulk.is-on { display: flex; }
.k-bulk .k-btn-row { margin-left: auto; }
.k-pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; color: var(--muted); font-size: var(--t-sm); }
.k-pages nav { display: flex; flex-wrap: wrap; gap: 6px; }
.k-pages a, .k-pages span.is-here { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; }
.k-pages span.is-here { background: var(--go-soft); border-color: var(--blue-line); color: var(--go-soft-ink); }

/* simple stacked rows (tasks, documents, notices, search) */
.k-rows { list-style: none; margin: 0; padding: 0; }
.k-rows > li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.k-rows > li:first-child { border-top: 0; }
.k-rows .k-grow { flex: 1; min-width: 0; }
.k-rows .k-grow > * { overflow-wrap: anywhere; }
.k-rows a.k-rowlink { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: var(--tap); color: var(--ink); text-decoration: none; }
.k-rows .is-unread .k-row-title::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--go); vertical-align: middle; }
.k-done-title { text-decoration: line-through; color: var(--muted); }
.k-thumb { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; background: var(--soft); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }

/* ── FORMS (Bible 102 §3) ──────────────────────────────────────────── */
.k-form { display: grid; gap: 16px; }
.k-form-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.k-form-3 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.k-form-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.k-field { display: grid; gap: 6px; min-width: 0; }
.k-field > label, .k-label { font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.k-req { color: var(--red); margin-left: 2px; }
.k-hint { font-size: var(--t-xs); color: var(--muted); }
.k-input, .k-field input:not([type=checkbox]):not([type=file]), .k-field select, .k-field textarea, .k-top-search input {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink); font: 400 var(--t-md)/1.3 var(--font);
}
.k-field textarea { min-height: 96px; resize: vertical; }
.k-field input:focus, .k-field select:focus, .k-field textarea:focus, .k-top-search input:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.k-field.has-error input, .k-field.has-error select, .k-field.has-error textarea { border-color: var(--red); background: var(--red-bg); }
.k-error { color: var(--red-ink); font-size: var(--t-xs); font-weight: 600; }
.k-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.k-file input[type=file] { font: 400 var(--t-sm) var(--font); max-width: 100%; color: var(--muted); }
.k-file input[type=file]::file-selector-button { min-height: var(--tap); padding: 0 16px; margin-right: 10px; border-radius: var(--r-sm); border: 1px solid var(--blue-line); background: var(--go-soft); color: var(--go-soft-ink); font: 600 var(--t-sm) var(--font); cursor: pointer; }
.k-inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.k-inline .k-field { flex: 1 1 160px; }

/* ── NOTICES / TOASTS (Bible 102 §7) ──────────────────────────────── */
.k-toasts { display: grid; gap: 8px; margin-bottom: 16px; }
.k-toast { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-radius: var(--r-sm); border: 1px solid; font-weight: 600; font-size: var(--t-sm); }
.k-toast > span { flex: 1; min-width: 0; }
.k-toast .k-iconbtn { width: 40px; height: 40px; border: 0; background: transparent; color: inherit; }
.k-toast form { margin: 0; }
.k-toast.is-leaving { opacity: 0; transition: opacity .4s; }

/* ── EMPTY STATE ───────────────────────────────────────────────────── */
.k-empty { text-align: center; padding: 32px 16px; }
.k-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--go-soft); color: var(--go-soft-ink); margin-bottom: 12px; }
.k-empty h3 { font-size: var(--t-lg); margin-bottom: 6px; }
.k-empty p { color: var(--muted); margin: 0 0 16px; font-size: var(--t-sm); }

/* ── DIALOG (Bible 102 §6) ─────────────────────────────────────────── */
.k-dialog { width: min(480px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: var(--r-md); background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.k-dialog::backdrop { background: var(--scrim); }
.k-dialog h2 { font-size: var(--t-lg); margin-bottom: 8px; }
.k-dialog p { margin: 0 0 16px; color: var(--muted); }
.k-dialog .k-btn-row { justify-content: flex-end; margin-top: 16px; }

/* ── TIMELINE ──────────────────────────────────────────────────────── */
.k-timeline { list-style: none; margin: 0; padding: 0; }
.k-timeline li { position: relative; padding: 0 0 14px 22px; }
.k-timeline li::before { content: ""; position: absolute; left: 5px; top: 7px; bottom: -7px; width: 2px; background: var(--line); }
.k-timeline li:last-child::before { display: none; }
.k-timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--grey); }
.k-timeline li.is-override::after { border-color: var(--amber); background: var(--amber-bg); }
.k-timeline b { font-size: var(--t-sm); }
.k-timeline small { display: block; color: var(--muted); font-size: var(--t-xs); }
.k-timeline details summary { min-height: 32px; display: inline-flex; align-items: center; color: var(--go-soft-ink); font-size: var(--t-xs); font-weight: 600; cursor: pointer; }
.k-changes { margin: 4px 0 0; padding: 0; list-style: none; font-size: var(--t-xs); color: var(--muted); }
.k-changes li { padding: 0; } .k-changes li::before, .k-changes li::after { display: none; }

/* ── CALENDAR ──────────────────────────────────────────────────────── */
.k-cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.k-cal-bar h2 { font-size: var(--t-lg); margin-right: auto; }
.k-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--line); gap: 1px; }
.k-cal-dow { background: var(--soft); padding: 6px; text-align: center; font-size: var(--t-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.k-cal-day { background: var(--card); min-height: 96px; padding: 6px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; min-width: 0; }
.k-cal-day:hover { background: var(--soft); }
.k-cal-day.is-other { background: var(--soft); color: var(--muted); }
.k-cal-day.is-today .k-cal-n { background: var(--go); color: var(--go-ink); }
.k-cal-day[aria-current="date"] { box-shadow: inset 0 0 0 3px var(--focus); }
.k-cal-n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: var(--t-sm); }
.k-cal-item { display: flex; align-items: center; gap: 4px; font-size: var(--t-xs); line-height: 1.25; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.k-cal-item .k-dot { width: 8px; height: 8px; }
.k-cal-dots { display: none; gap: 3px; flex-wrap: wrap; }
.k-cal-dots .k-dot { width: 8px; height: 8px; }

/* ── HELP / PENNY ──────────────────────────────────────────────────── */
.k-help-steps { margin: 0; padding-left: 22px; } .k-help-steps li { margin: 6px 0; }
.k-penny-say { display: flex; gap: 12px; align-items: flex-start; }
.k-penny-face { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--go-soft); color: var(--go-soft-ink); flex: none; }
.k-bubble { padding: 12px 14px; border-radius: var(--r-md); background: var(--soft); border: 1px solid var(--line); font-size: var(--t-md); }

/* ── LOGIN ─────────────────────────────────────────────────────────── */
.k-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.k-login .k-card { width: min(420px, 100%); padding: 24px; }
.k-login-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.k-login-logo img { height: 48px; }

@media print {
  .k-side, .k-top, .k-dock, .k-head-actions, .k-next, .k-pass, form, .k-btn { display: none !important; }
  .k-shell { display: block; } body { background: var(--card); }
  .k-card { box-shadow: none; break-inside: avoid; }
}

/* ── TABLET ────────────────────────────────────────────────────────── */
@media (max-width: 1200px) { .k-shell { grid-template-columns: 195px minmax(0, 1fr); } }
@media (max-width: 1024px) { .k-grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ── PHONE (≤850px: drawer + bottom dock; Samsung 412×915) ────────── */
@media (max-width: 850px) {
  .k-shell { display: block; }
  .k-side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: min(280px, 86vw); transform: translateX(-102%); transition: transform .2s; }
  body.is-drawer .k-side { transform: none; }
  body.is-drawer .k-scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 35; }
  .k-menu-btn { display: inline-flex; }
  .k-top { padding: 0 12px; height: 60px; }
  .k-top-search, .k-top-title, .k-who { display: none; }
  .k-content { padding: 16px 16px 104px; }
  .k-only-phone { display: revert; }
  .k-dock {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--card); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .k-dock a, .k-dock button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px;
    color: var(--muted); text-decoration: none; font: 600 var(--t-xs) var(--font); border: 0; background: none; cursor: pointer; position: relative;
  }
  .k-dock [aria-current="page"] { color: var(--go-soft-ink); }
  .k-dock .k-badge { position: absolute; top: 2px; left: calc(50% + 6px); }
  .k-head h1 { font-size: 26px; }
  .k-head-actions { width: 100%; }
  .k-head-actions .k-btn { flex: 1 1 auto; }
  .k-form-2 { grid-template-columns: minmax(0, 1fr); }
  .k-form-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .k-form-3 > :first-child { grid-column: 1 / -1; }
  .k-form-4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .k-bulk { top: 66px; }

  .k-cards { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .k-cards a { min-height: 0; flex-direction: row; align-items: center; padding: 12px 16px; }
  .k-cards .k-card-num { font-size: 26px; order: -1; min-width: 44px; }
  .k-cards .k-card-label { flex: 1; }

  /* Flow chart turns to run top-to-bottom: same nodes, numbers, colours and words — geometry only. */
  .k-flow ol { grid-template-columns: minmax(0, 1fr); }
  .k-flow li + li::before { top: -10px; left: 33px; right: auto; width: 3px; height: 20px; }
  .k-flow li + li::after { top: 4px; left: 28px; right: auto; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--grey-line); border-bottom: 0; }
  .k-flow li.is-after-done::after { border-top-color: var(--green); border-left-color: transparent; }
  .k-node { flex-direction: row; align-items: center; text-align: left; gap: 10px; padding: 6px 8px; }
  .k-node-ring { width: 44px; height: 44px; }
  .k-node-dot { width: 38px; height: 38px; }
  .k-node-txt { display: grid; flex: 1; min-width: 0; }
  .k-node-n { display: none; }
  .k-node-flag { order: 3; }

  /* list rows become cards (Bible 102 §5.1 mobile) */
  .k-list, .k-list tbody, .k-list tr, .k-list td { display: block; width: 100%; }
  .k-list { background: none; border: 0; border-radius: 0; overflow: visible; }
  .k-list thead { display: none; }
  .k-list tr { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; padding: 6px 0; }
  .k-list td { border: 0; padding: 5px 12px 5px 12px; }
  .k-list td.k-col-tick { position: absolute; top: 8px; right: 8px; width: auto; padding: 0; }
  .k-list td.k-col-main { padding-right: 60px; }
  .k-list td.k-col-num { text-align: left; }
  .k-list td.k-col-act .k-btn { width: 100%; }
  .k-row-label { display: block; font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .k-list tbody tr:hover td { background: transparent; }
  .k-list tr.is-ticked { background: var(--go-soft); }
  .k-list tr.is-ticked td { background: transparent; }

  .k-cal-day { min-height: 56px; padding: 4px; align-items: center; }
  .k-cal-item { display: none; }
  .k-cal-dots { display: flex; justify-content: center; }
  .k-tools form { flex-basis: 100%; }
}

/* small helpers */
.k-grow { flex: 1; min-width: 0; }
.k-gap { margin-bottom: 16px; }
.k-inline .k-field--date { flex: 0 1 180px; }
.k-login-h { font-size: var(--t-xl); text-align: center; }
.k-top-gap { margin-top: 16px; }
.k-next-kicker, .k-next-title, .k-next-sub { display: block; }
@media (max-width: 850px) {
  .k-ws > span, .k-top .k-avatar { display: none; }
  .k-ws { padding: 0 10px; }
}
.k-node-txt { display: flex; flex-direction: column; align-items: inherit; min-width: 0; }
.k-side-foot .k-only-phone { display: none; }
@media (max-width: 850px) { .k-side-foot .k-only-phone { display: flex; } .k-node-txt { align-items: flex-start; } }
.k-btn-row--center { justify-content: center; }
.k-chip { min-height: var(--tap); }
.k-timeline details summary { min-height: var(--tap); }
.k-toast .k-iconbtn { width: var(--tap); height: var(--tap); }
.k-tickall { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); margin-bottom: 8px; padding-left: 8px; font-size: var(--t-sm); font-weight: 600; color: var(--muted); cursor: pointer; }
@media (max-width: 850px) { .k-top a.k-iconbtn.k-only-phone { display: inline-flex; } }
.k-public { max-width: 720px; }

/* Comms: a filing reference is one long line of codes — it wraps, never pushes the page sideways. */
.k-ref { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.k-refbox { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft); font-weight: 600; overflow-wrap: anywhere; }
.k-guess { color: var(--amber-ink); font-weight: 600; }
.k-words { white-space: pre-line; overflow-wrap: anywhere; }
.k-prose { margin: 0 0 12px; line-height: 1.55; overflow-wrap: anywhere; }
/* Money totals under a table or in an amounts card: label left, amount right, total in bold. */
.k-totals { margin: 12px 0 0; display: grid; gap: 4px; max-width: 360px; margin-left: auto; }
.k-totals > div { display: flex; justify-content: space-between; gap: 16px; font-size: var(--t-sm); }
.k-totals dt { color: var(--muted); }
.k-totals dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.k-totals > div:nth-child(3) { border-top: 1px solid var(--line); padding-top: 6px; font-size: var(--t-md); }
.k-totals > div:nth-child(3) dd { font-weight: 800; }

/* ── TASK BOARD ─────────────────────────────────────────────────────────────────────────────
   One column per status. On a phone the columns sit side by side and the board scrolls sideways
   inside itself (the page never does); each card also has a Move menu, because dragging needs a mouse. */
.k-taskbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 16px; }
.k-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); overflow: hidden; }
.k-seg a, .k-seg button { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px; border: 0; border-right: 1px solid var(--line);
  background: none; color: var(--ink); font: 600 var(--t-sm)/1 var(--font); text-decoration: none; cursor: pointer; }
.k-seg > :last-child, .k-seg form:last-child button { border-right: 0; }
.k-seg [aria-current], .k-seg [aria-pressed="true"] { background: var(--go-soft); color: var(--go-soft-ink); }
.k-seg button:disabled { cursor: default; }
.k-seg--wide { display: flex; flex-wrap: wrap; width: 100%; }
.k-seg--wide form { flex: 1 1 50%; display: flex; }
.k-seg--wide button { flex: 1; justify-content: center; border-bottom: 1px solid var(--line); }
.k-taskfilters { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 320px; min-width: 0; max-width: 100%; }
.k-taskfilters input, .k-taskfilters select { min-height: var(--tap); padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: inherit; min-width: 0; }
.k-taskfilters input { flex: 1 1 180px; }
.k-taskfilters select { flex: 0 1 180px; }
.k-taskfilters .k-btn { flex: 0 0 auto; }

.k-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto;
  padding-bottom: 8px; margin-bottom: 12px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.k-bcol { display: flex; flex-direction: column; min-width: 0; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-md); scroll-snap-align: start; }
.k-bcol.is-over { border-color: var(--blue-line); box-shadow: 0 0 0 3px var(--focus); }
.k-bcol-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); }
.k-bcol-head h2 { margin: 0; font-size: var(--t-md); font-weight: 750; }
.k-bcol-head .k-iconbtn { margin-left: auto; }
.k-bcol-list { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.k-bcol-empty { padding: 18px 8px; text-align: center; color: var(--muted); font-size: var(--t-sm); border: 1px dashed var(--line); border-radius: var(--r-sm); }

.k-tcard { position: relative; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: var(--r-sm); box-shadow: var(--shadow); }
.k-tcard.is-red { border-left-color: var(--red); }
.k-tcard.is-green { border-left-color: var(--green); }
.k-tcard[draggable="true"] { cursor: grab; }
.k-tcard.is-dragging { opacity: .5; }
.k-tcard-main { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; color: var(--ink); text-decoration: none; min-height: var(--tap); }
.k-tcard-title { font-weight: 700; font-size: var(--t-sm); overflow-wrap: anywhere; }
.k-tcard-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.k-tcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.k-tcard-foot .k-avatar { width: 30px; height: 30px; }
.k-tcard-due { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.k-tcard-due.is-late { color: var(--red-ink); }
.k-tcard-move { padding: 0 12px 10px; }
.k-tcard-move select { width: 100%; min-height: var(--tap); padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: 600 var(--t-xs)/1 var(--font); }
.k-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--soft); border: 1px solid var(--line); font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.k-tag.is-red { background: var(--red-bg); color: var(--red-ink); border-color: transparent; }
@media (max-width: 850px) { .k-board { grid-auto-columns: 82%; } .k-taskfilters select { flex: 1 1 140px; } }
.k-facts + h3 { margin-top: 18px; }
.k-terms { white-space: pre-line; overflow-wrap: anywhere; max-height: 360px; overflow-y: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft); font-size: var(--t-sm); line-height: 1.6; }
/* Line tables on quotes and invoices (audit 2 Nov, P3-33: they had no styling at all). Tight padding on a phone. */
.k-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.k-table th { text-align: left; font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.k-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.k-table td:not(:first-child), .k-table th:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 850px) { .k-table th, .k-table td { padding: 8px 4px; } }

/* ---------- Projects in full (2 Nov): tabs, stats, gauge, bars, Gantt, discussion ---------- */
.k-tabs { display: flex; flex-wrap: wrap; gap: 4px; overflow-x: auto; margin: 0 0 16px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); scrollbar-width: thin; }
.k-tabs a { flex: none; display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--t-sm); white-space: nowrap; }
.k-tabs a:hover { background: var(--soft); }
.k-tabs a[aria-current] { background: var(--go-soft); color: var(--go-soft-ink); }
.k-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 16px; }
.k-stat { margin: 0; min-width: 0; }
.k-stat h2 { font-size: var(--t-sm); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px; }
.k-stat p { margin: 0 0 4px; }
.k-stat-n { font-size: var(--t-xl); font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.k-stat-n.is-red { color: var(--red-ink); }
.k-stat-n.is-amber { color: var(--amber-ink); }
.k-stat--gauge { display: flex; align-items: center; gap: 14px; grid-column: span 2; }
.k-gauge { width: 112px; height: 112px; flex: none; transform: rotate(-90deg); }
.k-gauge circle { fill: none; stroke-width: 12; }
.k-gauge-track { stroke: var(--grey-bg); }
.k-gauge-fill { stroke: var(--amber); stroke-linecap: round; }
.k-gauge-fill.is-done { stroke: var(--green); }
.k-gauge text { transform: rotate(90deg); transform-origin: 60px 60px; fill: var(--ink); font: 700 24px var(--font); }
.k-meter { display: block; height: 10px; border-radius: var(--r-pill); background: var(--grey-bg); overflow: hidden; margin: 8px 0 4px; }
.k-meter > span { display: block; height: 100%; background: var(--go); border-radius: var(--r-pill); }
.k-meter.is-over > span { background: var(--red); }
.k-meter--row { height: 6px; max-width: 260px; margin: 6px 0 0; }
.k-bars { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.k-bars li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: var(--t-sm); }
.k-bars-label { color: var(--muted); font-weight: 600; }
.k-bars-track { height: 14px; border-radius: var(--r-pill); background: var(--grey-bg); overflow: hidden; }
.k-bars-fill { display: block; height: 100%; border-radius: var(--r-pill); background: var(--grey); }
.k-bars-fill.is-red { background: var(--red); } .k-bars-fill.is-amber { background: var(--amber); } .k-bars-fill.is-green { background: var(--green); } .k-bars-fill.is-blue { background: var(--blue); }
.k-bars-n { font-weight: 700; text-align: right; }
.k-people { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.k-people li { display: flex; align-items: center; gap: 8px; }
.k-people small { display: block; color: var(--muted); }
.k-msrow { flex-wrap: wrap; }
.k-full { flex-basis: 100%; }
.k-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: var(--t-xs); color: var(--muted); margin: 10px 0 0; }
.k-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.k-gantt-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.k-gantt { display: grid; grid-template-columns: minmax(150px, 220px) repeat(var(--cols), minmax(28px, 1fr)); grid-auto-rows: 40px; min-width: max-content; position: relative; }
.k-gantt-name { grid-column: 1; position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--card); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--t-sm); font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.k-gantt-corner { grid-row: 1; color: var(--muted); text-transform: uppercase; font-size: var(--t-xs); letter-spacing: .04em; z-index: 3; }
.k-gantt-head { grid-row: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: var(--t-xs); color: var(--muted); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--soft); line-height: 1.1; }
.k-gantt-head b { color: var(--ink); }
.k-gantt-head.is-weekend { background: var(--grey-bg); }
.k-gantt-head.is-today { background: var(--go-soft); color: var(--go-soft-ink); font-weight: 700; }
.k-gantt-lane { border-bottom: 1px solid var(--line); }
.k-gantt-today { border-left: 2px solid var(--focus); z-index: 1; pointer-events: none; }
.k-gantt-bar { align-self: center; height: 24px; margin: 0 2px; border-radius: var(--r-sm); background: var(--amber); color: var(--go-ink); display: flex; align-items: center; padding: 0 6px; font-size: var(--t-xs); font-weight: 700; text-decoration: none; overflow: hidden; white-space: nowrap; z-index: 1; min-width: 12px; }
.k-gantt-bar.is-green { background: var(--green); } .k-gantt-bar.is-red { background: var(--red); } .k-gantt-bar.is-blue { background: var(--blue); } .k-gantt-bar.is-grey { background: var(--grey); }
.k-gantt-bar.is-milestone { justify-self: center; width: 18px; height: 18px; min-width: 0; padding: 0; margin: 0; border-radius: 3px; transform: rotate(45deg); }
.k-gantt-ms-mark { display: inline-block; width: 10px; height: 10px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; flex: none; }
.k-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.k-thread > li { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.k-thread > li:last-child { border-bottom: 0; }
.k-thread--replies { margin: 10px 0 0 48px; gap: 10px; }
.k-thread--replies > li { border: 0; padding: 0; }
.k-msg { display: flex; gap: 10px; align-items: flex-start; }
.k-msg small { color: var(--muted); }
.k-msg .k-prose { margin: 4px 0 0; }
@media (max-width: 850px) {
  .k-stat--gauge { grid-column: auto; }
  .k-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .k-stat--gauge { grid-column: 1 / -1; }
  .k-stat-n { font-size: var(--t-lg); }
  .k-thread--replies { margin-left: 20px; }
  .k-gantt { grid-template-columns: 120px repeat(var(--cols), 28px); }
  .k-tabs { flex-wrap: nowrap; }
}

/* ---------- The public hire page (2 Nov) ---------- */
.k-site { background: var(--page); color: var(--ink); font-family: var(--font); margin: 0; }
.k-site-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; max-width: 1100px; margin: 0 auto; padding: 14px 16px; }
.k-site-logo img { height: 44px; display: block; }
.k-site-contact { display: flex; flex-wrap: wrap; gap: 8px; }
.k-site-main { max-width: 1100px; margin: 0 auto; padding: 0 16px 32px; display: grid; gap: 20px; }
.k-site-hero { padding: 24px 0 8px; }
.k-site-hero h1 { font-size: var(--t-xl); margin: 0 0 10px; }
.k-site-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.k-site-card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.k-site-card > a:first-child { color: var(--ink); text-decoration: none; }
.k-site-card img, .k-site-machine img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); background: var(--soft); display: block; }
.k-site-card h2 { margin: 10px 0 0; font-size: var(--t-lg); }
.k-site-card p { margin: 0; }
.k-site-card .k-btn { margin-top: auto; align-self: flex-start; }
.k-site-nophoto { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: var(--r-sm); background: var(--soft); color: var(--muted); }
.k-site-price .k-hint { margin-left: 4px; }
.k-site-machine { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.k-site-machine h1 { margin: 0 0 10px; }
.k-site-specs { margin: 0; display: grid; gap: 4px; }
.k-site-specs div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.k-site-specs dt { color: var(--muted); }
.k-site-specs dd { margin: 0; font-weight: 600; }
.k-site-foot { max-width: 1100px; margin: 0 auto; padding: 16px 16px 40px; color: var(--muted); font-size: var(--t-sm); border-top: 1px solid var(--line); }
.k-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.k-photo { display: block; max-width: 240px; width: 100%; border-radius: var(--r-sm); border: 1px solid var(--line); margin-bottom: 8px; }
.k-order input { width: 64px; min-height: var(--tap); text-align: center; }
@media (max-width: 850px) { .k-site-machine { grid-template-columns: minmax(0, 1fr); } .k-site-specs div { grid-template-columns: 1fr 1fr; } }

/* ---------- Customers and Sales, the GrowCRM way (2 Nov): wide lists, money tiles, filters ---------- */
.k-table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.k-table--list td:not(:first-child), .k-table--list th:not(:first-child) { text-align: left; }
.k-table--list td.k-num, .k-table--list th.k-num { text-align: right; }
.k-table--list a { font-weight: 600; }
.k-table--list tr:hover td { background: var(--soft); }
.k-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0 0 16px; }
.k-filters .k-field { margin: 0; flex: 1 1 150px; min-width: 0; }
.k-filters .k-field--wide { flex: 2 1 220px; }
.k-stat .k-stat-bar { display: block; height: 4px; border-radius: 2px; margin-top: 10px; background: var(--go-soft); }
.k-stat .k-stat-bar.is-green { background: var(--green-line); }
.k-stat .k-stat-bar.is-amber { background: var(--amber-line); }
.k-stat .k-stat-bar.is-red { background: var(--red-line); }
.k-stat .k-stat-bar.is-grey { background: var(--grey-line); }
.k-pick-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.k-pick-line select { flex: 1 1 220px; min-width: 0; }
@media (max-width: 850px) { .k-hide-phone { display: none; } }
@media (max-width: 850px) { .k-table--list .k-pill { white-space: normal; } }

/* ---------- Job reports (2 Nov): checklist answers, signature pad ---------- */
.k-seg label { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 14px; border-right: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: var(--t-sm); }
.k-seg label:last-child { border-right: 0; }
.k-seg label:has(input:checked) { background: var(--go-soft); color: var(--go-soft-ink); }
.k-seg input[type=radio] { width: 18px; height: 18px; accent-color: var(--go); }
.k-check-item { align-items: flex-start; }
.k-check-item .k-seg { margin: 6px 0; flex-wrap: wrap; }
.k-check-item .k-field { margin: 6px 0 0; }
.k-sign-pad { display: block; width: 100%; max-width: 600px; height: 180px; border: 2px dashed var(--line); border-radius: var(--r-sm); background: var(--card); touch-action: none; cursor: crosshair; }
.k-sign-pad.is-signed { border-style: solid; border-color: var(--go); }
.k-signature { display: block; max-width: 100%; height: auto; max-height: 140px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
fieldset.k-field { border: 0; padding: 0; margin: 0 0 12px; }
fieldset.k-field legend { font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.k-sign-pad { background: white; }
.k-seg label { position: relative; }
.k-seg input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.k-seg label:has(input:focus-visible) { outline: 3px solid var(--go); outline-offset: -3px; }
.k-table--list td:not(.k-num) { white-space: normal; overflow-wrap: anywhere; }

/* ── The machine file (2 Nov): the grease / oils picture with numbered points, the QR sticker, the three lights ── */
.k-diagram { position: relative; display: block; max-width: 100%; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--soft); }
.k-diagram img { display: block; width: 100%; height: auto; }
.k-diagram.is-editing { cursor: crosshair; }
.k-pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: var(--go); color: var(--go-ink); border: 2px solid var(--card); box-shadow: var(--shadow); font: 700 var(--t-sm) var(--font); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.k-pin.is-lit { background: var(--brand); }
.k-pins { counter-reset: pin; }
.k-pins li { align-items: flex-start; }
.k-pins .k-pin { position: static; transform: none; flex: none; }
.k-lights { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.k-light { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--soft); font-size: var(--t-sm); font-weight: 600; min-height: var(--tap); }
.k-light .k-dot { flex: none; }
.k-qr { width: min(100%, 320px); margin: 0 auto; }
.k-qr svg { width: 100%; height: auto; display: block; }
.k-qr svg path { fill: var(--ink); }
.k-sticker { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-md); padding: 20px; max-width: 420px; margin: 0 auto; text-align: center; }
.k-sticker h2 { margin: 12px 0 4px; }
.k-sticker p { margin: 0; font-size: var(--t-sm); color: var(--muted); }
.k-log li .k-row-sub { white-space: normal; }
@media print { .k-sticker { border-width: 3px; page-break-inside: avoid; } }

/* ══ MAIL — the whole webmail on the Kit (Peter, 2 Nov). Outlook's arrangement, the Kit's look. ══
   Three columns: mailboxes & folders · the list · the reading pane. The pane can sit on the right,
   below, or be off; the dividers drag. Every colour is a token. */
.k-mail { --mail-nav: 240px; --mail-list: 420px; --mail-split: 45%;
  /* density (Peter, 4 Nov: "the gaps between each email… too big… the screen looks unutilized") — one set of knobs,
     three settings in Mail settings: comfy · cosy · tight. Text size is its own knob (normal · small). */
  --mail-pad: 9px; --mail-avatar: 38px; --mail-row-min: var(--tap); --mail-folder: 40px; --mail-chip: 56px; --mail-lead: 1.35;
  display: grid; grid-template-columns: min(var(--mail-nav), 26%) var(--mail-gutter) minmax(0, 1fr); gap: 0;
  height: calc(100dvh - 64px - 48px); min-height: 520px; margin: -8px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.k-content:has(> .k-mail) { max-width: none; padding-bottom: 24px; }
/* Desk: Mail fills the whole working area — no page padding, no card border, no rounded corners (Peter, 9 Nov:
   "fill the whole screen up maximum for the desktop … too many borders"). The phone rules below are untouched. */
@media (min-width: 851px) {
  .k-content:has(> .k-mail) { padding: 0; }
  /* toasts float over the mail instead of pushing it down */
  .k-content:has(> .k-mail) > .k-toasts { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); width: min(720px, 90vw); margin: 0; z-index: 40; }
  .k-content > .k-mail { margin: 0; border: 0; border-radius: 0; height: calc(100dvh - 64px); min-height: 0; }
  html[data-side="hidden"] .k-content > .k-mail { height: calc(100dvh - 64px); }
}
.k-mail-nav { min-width: 0; overflow: auto; background: var(--mail-side, var(--soft)); color: var(--ink); border-right: 1px solid var(--line); padding: 8px 0 16px; }
.k-mail-gutter { cursor: col-resize; background: transparent; position: relative; }
.k-mail-gutter::after { content: ""; position: absolute; inset: 0 3px; background: var(--line); opacity: 0; transition: opacity .15s; }
.k-mail-gutter:hover::after, .k-mail-gutter.is-dragging::after { opacity: 1; }
.k-mail-body { display: grid; grid-template-columns: min(var(--mail-list), 48%) var(--mail-gutter) minmax(0, 1fr); min-width: 0; min-height: 0; }
.k-mail[data-pane="below"] .k-mail-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(min(var(--mail-list-floor), 50%), var(--mail-split)) var(--mail-gutter) minmax(0, 1fr); }
.k-mail[data-pane="below"] .k-mail-body > .k-mail-gutter { cursor: row-resize; }
.k-mail[data-pane="below"] .k-mail-body > .k-mail-gutter::after { inset: 3px 0; }
.k-mail[data-pane="top"] .k-mail-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) var(--mail-gutter) minmax(min(var(--mail-list-floor), 50%), var(--mail-split)); }
.k-mail[data-pane="top"] .k-mail-body > .k-mail-read { order: 1; border-bottom: 1px solid var(--line); }
.k-mail[data-pane="top"] .k-mail-body > .k-mail-gutter { order: 2; cursor: row-resize; }
.k-mail[data-pane="top"] .k-mail-body > .k-mail-gutter::after { inset: 3px 0; }
.k-mail[data-pane="top"] .k-mail-body > .k-mail-list { order: 3; border-right: 0; }
.k-mail[data-pane="off"] .k-mail-body { grid-template-columns: minmax(0, 1fr); }
.k-mail[data-pane="off"] .k-mail-body > .k-mail-gutter, .k-mail[data-pane="off"] .k-mail-read { display: none; }
/* the list never shrinks past its own header+lights+sortbar — otherwise no emails show at all */
.k-mail { --mail-list-floor: 340px; --mail-gutter: 14px; }
.k-mail-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--mail-main, var(--card)); color: var(--ink); border-right: 1px solid var(--line); }
.k-mail[data-pane="below"] .k-mail-list { border-right: 0; border-bottom: 1px solid var(--line); }
.k-mail-read { min-width: 0; min-height: 0; overflow: auto; background: var(--mail-pane, var(--card)); color: var(--ink); }
.k-mail-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.k-mail-top h1 { font-size: var(--t-lg); margin: 0; font-weight: 800; }
.k-mail-top .k-hint { margin-left: 2px; }
.k-mail-top select { min-height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: 600 var(--t-sm) var(--font); }
.k-mail-top .k-iconbtn { width: 38px; height: 38px; }
.k-mail-top .k-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* the six lights — ONE size, one row (Peter: "they're all different sizes, have them all the same") */
.k-mailchips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.k-mailchips a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 0; height: var(--mail-chip); padding: 4px 2px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); text-decoration: none; text-align: center; line-height: 1.1; }
.k-mailchips a b { font-size: var(--t-xs); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.k-mailchips a small { font-size: var(--t-sm); font-weight: 800; color: var(--muted); }
.k-mailchips a .k-dot { width: 8px; height: 8px; }
.k-mailchips a[aria-current="true"] { background: var(--go-soft); border-color: var(--blue-line); color: var(--go-soft-ink); }
.k-mailchips a[aria-current="true"] small { color: var(--go-soft-ink); }
/* when the list column is narrow the six lights go 3 × 2 — still one size each */
.k-mail-list { container-type: inline-size; }
@container (max-width: 620px) { .k-mailchips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* mailboxes stacked down the left, Outlook-style */
.k-mail-acct { border-bottom: 1px solid var(--line); }
.k-mail-acct > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: max(var(--mail-folder), 36px); padding: 6px 12px; cursor: pointer; font-weight: 800; font-size: var(--t-sm); color: var(--ink); }
.k-mail-acct > summary::-webkit-details-marker { display: none; }
.k-mail-acct > summary .k-nav-chev { margin-left: auto; opacity: .6; transition: transform .15s; }
.k-mail-acct[open] > summary .k-nav-chev { transform: rotate(90deg); }
.k-mail-acct > summary .k-avatar { width: 30px; height: 30px; font-size: 11px; background: var(--go-soft); color: var(--go-soft-ink); }
.k-mail-acct > summary small { display: block; font-weight: 500; color: var(--muted); font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-mail-acct > summary .k-grow { min-width: 0; }
.k-mail-folders { list-style: none; margin: 0 0 6px; padding: 0; }
.k-mail-folders a { display: flex; align-items: center; gap: 10px; min-height: var(--mail-folder); padding: 4px 12px 4px 22px; color: var(--ink); text-decoration: none; font-size: var(--t-sm); font-weight: 600; border-radius: 0; }
.k-mail-folders a:hover { background: var(--card); }
.k-mail-folders a[aria-current="page"] { background: var(--go-soft); color: var(--go-soft-ink); box-shadow: inset 3px 0 0 var(--go); }
.k-mail-folders .k-icon { opacity: .75; }
.k-mail-folders details { margin: 0; }
.k-mail-folders details > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: var(--mail-folder); padding: 4px 12px 4px 22px; cursor: pointer; font-size: var(--t-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.k-mail-folders details > summary::-webkit-details-marker { display: none; }
.k-mail-folders details details > summary { text-transform: none; letter-spacing: 0; font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.k-mail-folders details details > summary .k-nav-chev { opacity: .5; }
.k-mail-folders details[open] > summary .k-nav-chev { transform: rotate(90deg); }
.k-mail-folders .k-mail-sub a, .k-mail-folders .k-mail-sub summary { padding-left: 38px; }
.k-mail-folders .k-mail-sub .k-mail-sub a, .k-mail-folders .k-mail-sub .k-mail-sub summary { padding-left: 54px; }
.k-mail-nav .k-mail-fav { padding: 4px 12px 10px; display: grid; gap: 4px; }
.k-mail-nav .k-mail-fav a { display: flex; align-items: center; gap: 10px; min-height: var(--mail-folder); padding: 4px 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: var(--t-sm); font-weight: 700; }
.k-mail-nav .k-mail-fav a[aria-current="page"], .k-mail-nav .k-mail-fav a:hover { background: var(--card); }
.k-mail-nav .k-mail-fav .k-badge { margin-left: auto; position: static; }

/* the list */
.k-mail-rows { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; min-height: 0; }
.k-mail-rows > li { border-bottom: 1px solid var(--line); }
.k-mail-rows a.k-mail-row { display: grid; grid-template-columns: 4px var(--mail-avatar) minmax(0, 1fr) auto auto; gap: 0 10px; align-items: center; padding: var(--mail-pad) 12px var(--mail-pad) 8px; min-height: var(--mail-row-min); color: var(--ink); text-decoration: none; line-height: var(--mail-lead); }
.k-mail[data-density="cosy"] { --mail-pad: 5px; --mail-avatar: 30px; --mail-row-min: 0; --mail-folder: 34px; --mail-chip: 46px; --mail-lead: 1.3; }
.k-mail[data-density="tight"], .k-mail[data-density="compact"] { --mail-pad: 3px; --mail-avatar: 0px; --mail-row-min: 0; --mail-folder: 30px; --mail-chip: 40px; --mail-lead: 1.25; }
/* the last auto column is the flag button — without it the flag wrapped onto a second grid row and every row stood 68px tall (14 Nov) */
.k-mail[data-density="tight"] .k-mail-rows a.k-mail-row, .k-mail[data-density="compact"] .k-mail-rows a.k-mail-row { grid-template-columns: 4px minmax(0, 1fr) auto auto; }
/* a row that carries the small "auto" marker has one extra child — give it its own column,
   or sender/subject/time land in the wrong tracks and the row wraps (13 Nov: the Newcastle Herald row) */
.k-mail-rows a.k-mail-row:has(> .k-auto--row) { grid-template-columns: 4px auto var(--mail-avatar) minmax(0, 1fr) auto auto; }
.k-mail[data-density="tight"] .k-mail-rows a.k-mail-row:has(> .k-auto--row),
.k-mail[data-density="compact"] .k-mail-rows a.k-mail-row:has(> .k-auto--row) { grid-template-columns: 4px auto minmax(0, 1fr) auto auto; }
.k-mail[data-density="tight"] .k-mail-row .k-avatar, .k-mail[data-density="compact"] .k-mail-row .k-avatar { display: none; }
.k-mail[data-density="tight"] .k-mail-row .k-when { gap: 2px; }
.k-mail[data-density="tight"] .k-mail-row .k-prev { display: none; }
.k-mail[data-density="cosy"] .k-mailchips a small, .k-mail[data-density="tight"] .k-mailchips a small { font-size: var(--t-xs); }
.k-mail[data-density="cosy"] .k-mailchips, .k-mail[data-density="tight"] .k-mailchips { padding: 5px 10px; gap: 4px; }
.k-mail[data-density="cosy"] .k-mail-top, .k-mail[data-density="tight"] .k-mail-top { padding: 6px 10px; }
.k-mail[data-density="cosy"] .k-mail-pages, .k-mail[data-density="tight"] .k-mail-pages { padding: 4px 10px; }
.k-mail[data-density="cosy"] .k-mail-pages .k-btn, .k-mail[data-density="tight"] .k-mail-pages .k-btn { min-height: 34px; padding: 0 10px; }
.k-mail-row:hover { background: var(--soft); }
.k-mail-row[aria-current="true"] { background: var(--go-soft); }
.k-mail-row .k-mail-light { width: 4px; align-self: stretch; border-radius: 2px; background: var(--grey-line); }
.k-mail-row .k-mail-light.is-action { background: var(--amber); }
.k-mail-row .k-mail-light.is-review { background: var(--green); }
.k-mail-row .k-mail-light.is-low { background: var(--blue); }
.k-mail-row .k-mail-light.is-spam { background: var(--red); }
.k-mail-row .k-avatar { width: var(--mail-avatar); height: var(--mail-avatar); background: var(--go-soft); color: var(--go-soft-ink); }
.k-mail-row .k-who { display: flex; flex-direction: column; min-width: 0; }
/* The list reads clean and sharp: nothing under 13px, a read row is the page ink at normal weight (not a
   dimmed grey), unread is bold. Sizes step up on a phone. */
.k-mail-row { --row-name: 15px; --row-subj: 15px; --row-small: 13px; }
.k-mail-row .k-who b { font-size: var(--row-name); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-mail-row.is-unread .k-who b, .k-mail-row.is-unread .k-subj { font-weight: 700; color: var(--mail-unread, var(--ink)); }
.k-mail-row:not(.is-unread) .k-who b, .k-mail-row:not(.is-unread) .k-subj { font-weight: 500; color: var(--mail-read, var(--ink)); }
.k-mail-row .k-subj { font-size: var(--row-subj); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-mail-row .k-prev { font-size: var(--row-small); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-mail-row .k-when { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: var(--row-small); color: var(--muted); white-space: nowrap; }
.k-mail-row .k-rowtag { font-size: 11px; }
@media (max-width: 640px) { .k-mail-row { --row-name: 16px; --row-subj: 16px; --row-small: 13px; } .k-mail-row .k-convo, .k-mail-row .k-hint { font-size: 13px; } }
.k-mail-row .k-when .k-dot { width: 8px; height: 8px; }
.k-mail-row .k-clip { display: inline-flex; align-items: center; gap: 2px; }
.k-mail-row.is-unread .k-when time { color: var(--go-soft-ink); font-weight: 700; }
.k-mail-pages { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--muted); }

/* reading */
.k-mail-msg { padding: 16px 20px 32px; max-width: 980px; min-width: 0; overflow-x: hidden; }
.k-mail-msg h1 { font-size: var(--t-lg); margin: 0 0 10px; line-height: 1.25; overflow-wrap: anywhere; }
.k-mail-meta { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.k-mail-meta .k-avatar { width: 42px; height: 42px; background: var(--go-soft); color: var(--go-soft-ink); }
.k-mail-meta .k-grow { min-width: 0; font-size: var(--t-sm); }
.k-mail-meta .k-grow b { display: block; font-size: var(--t-md); }
.k-mail-meta .k-grow span { color: var(--muted); overflow-wrap: anywhere; }
.k-mail-meta time { color: var(--muted); font-size: var(--t-sm); white-space: nowrap; }
.k-mail-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; position: sticky; top: 0; background: var(--card); z-index: 2; }
.k-mail-actions .k-btn { min-height: 40px; padding: 0 12px; }
.k-mail-actions form { display: inline-flex; }
/* THE EMAIL ITSELF. Named apart from .k-mail-body (the three-column grid) - sharing that name put every email into the grid and cut newsletters off at the right. Fixed-width newsletter tables are forced to the pane's width. */
.k-mail-content { font-size: var(--t-md); line-height: 1.5; overflow-wrap: anywhere; overflow-x: auto; max-width: 100%; }
.k-mail-content img { max-width: 100% !important; height: auto !important; }
.k-mail-content table { max-width: 100% !important; width: auto !important; }
.k-mail-content table[width], .k-mail-content td[width], .k-mail-content th[width] { width: auto !important; max-width: 100% !important; }
.k-mail-content [style*="width"] { max-width: 100% !important; }
.k-mail-content center, .k-mail-content div { max-width: 100% !important; }
.k-mail-content blockquote { border-left: 3px solid var(--line); margin: 8px 0; padding: 0 0 0 12px; color: var(--muted); }
.k-mail-content pre, .k-mail-content .k-plain { white-space: pre-wrap; font: inherit; }
.k-mail-atts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.k-mail-atts a { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft); color: var(--ink); text-decoration: none; font-size: var(--t-sm); font-weight: 600; max-width: 100%; }
.k-mail-atts a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-mail-atts a small { color: var(--muted); font-weight: 500; }
.k-mail-empty { display: flex; align-items: center; justify-content: center; height: 100%; padding: 24px; }
.k-mail-ask { display: flex; align-items: flex-start; gap: 10px; }
.k-mail-ask .k-bubble { flex: 1; }
.k-mail-found { font-size: var(--t-sm); color: var(--muted); margin: 0 0 10px; }
.k-mail-found b { color: var(--ink); }
.k-mail-images { margin: 0 0 12px; }

/* phone: one column at a time — folders are a drawer, the message is its own page */
.k-mail-navbtn, .k-mail-nav > .k-only-phone, .k-mail-nav .k-mail-fav .k-only-phone { display: none; }
.k-mail-tools { margin-top: -6px; }
.k-mail-toolout { border: 1px solid var(--line); border-radius: var(--r-sm); margin: 0 0 12px; background: var(--soft); }
.k-mail-toolout-hd { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.k-mail-toolout .k-mail-content { padding: 10px 12px; white-space: pre-wrap; max-height: 360px; overflow: auto; }
.k-mail-toolout .k-thread-item { border-bottom: 1px solid var(--line); padding: 6px 0; }
.k-mail-toolout .k-thread-item small { color: var(--muted); display: block; }
.k-mail-learned { table-layout: fixed; } .k-mail-learned td { overflow-wrap: anywhere; }
.k-mail-acctlink { display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 6px 12px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 800; font-size: var(--t-sm); }
.k-mail-acctlink:hover { background: var(--card); }
.k-mail-acctlink .k-avatar { width: 30px; height: 30px; font-size: 11px; background: var(--go-soft); color: var(--go-soft-ink); }
.k-mail-acctlink small { display: block; font-weight: 500; color: var(--muted); font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-mail-acctlink .k-grow { min-width: 0; }
.k-mail-acctlink .k-nav-chev { margin-left: auto; opacity: .6; }
@media (max-width: 850px) {
  .k-mail { display: block; height: auto; min-height: 0; margin: -4px -4px 0; border-radius: var(--r-sm); }
  .k-mail-nav { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 88vw); z-index: 40; transform: translateX(-102%); transition: transform .2s; border-right: 1px solid var(--line); box-shadow: var(--shadow); }
  .k-mail.is-nav .k-mail-nav { transform: none; }
  .k-mail.is-nav .k-mail-scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 39; }
  .k-mail-gutter { display: none; }
  .k-mail-body { display: block; }
  .k-mail-list { border: 0; }
  .k-mail-read { display: none; }
  .k-mail-navbtn, .k-mail-nav > .k-only-phone, .k-mail-nav .k-mail-fav .k-only-phone { display: inline-flex; }
  .k-mail-rows { overflow: visible; }
  .k-mailchips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .k-mail-msg { padding: 12px 4px 24px; }
  .k-mail-top h1 { font-size: var(--t-md); }
}

/* ── What's free: the machine × day board (2 Nov). Scrolls inside its card on a phone; the page never does. ── */
.k-board-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.k-board { border-collapse: separate; border-spacing: 3px; min-width: 100%; }
.k-board th, .k-board td { padding: 0; text-align: center; }
.k-board thead th { font-size: var(--t-xs); color: var(--muted); font-weight: 600; min-width: 36px; }
.k-board thead th b { display: block; font-size: var(--t-sm); color: var(--ink); }
.k-board thead th.is-today b { color: var(--go-soft-ink); background: var(--go-soft); border-radius: var(--r-pill); }
.k-board thead th.is-weekend { opacity: .7; }
.k-board .k-board-name { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; padding-right: 10px; font-size: var(--t-sm); font-weight: 600; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.k-board .k-board-name a { color: var(--ink); text-decoration: none; }
.k-cell { display: block; width: 36px; height: 44px; border-radius: var(--r-sm); border: 1px solid transparent; }
.k-cell.is-green { background: var(--green-bg); border-color: var(--green-line); }
.k-cell.is-amber { background: var(--amber); }
.k-cell.is-red { background: var(--red); }
.k-cell.is-grey { background: var(--grey-bg); border-color: var(--grey-line); }
.k-board td.is-today .k-cell { box-shadow: inset 0 0 0 2px var(--go); }
a.k-cell:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ── THE JOB REPORT IS THE FORM (2 Nov): the working page looks like the PDF the customer gets ──
   Letterhead, red rule, status band, grey-label table, grey section bars, the work log, the two sign-offs —
   the old CRM's TEST report (#25). Paper colours stay paper at night (tokens.css .k-paper). */
/* The report is an <article class="k-paper">; Money's receipt chip is an <a class="k-paper"> — the two never share rules. */
article.k-paper { display: block; background: var(--paper); color: var(--paper-ink); border: 1px solid var(--paper-rule); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 16px; margin: 16px auto; max-width: 960px; }
.k-paper a { color: var(--go-soft-ink); }
.k-paper a.k-btn--go { color: var(--go-ink); }   /* 15 Nov: 'Record the SWMS' was blue words on a blue button */
.k-paper-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-bottom: 3px solid var(--paper-red); padding-bottom: 12px; }
.k-paper-logo { height: 44px; width: auto; display: block; margin-bottom: 6px; }
.k-paper-title { color: var(--paper-red); font-size: var(--t-xl); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
.k-paper-ref { margin: 4px 0 0; font-weight: 700; color: var(--paper-head); }
.k-paper-biz { display: flex; flex-direction: column; font-size: var(--t-xs); line-height: 1.6; color: var(--muted); text-align: right; }
.k-paper-biz strong { color: var(--paper-head); font-size: var(--t-sm); }
@media (max-width: 640px) { article.k-paper { padding: 12px; border-radius: var(--r-sm); } .k-paper-biz { text-align: left; } }
.k-paper-band { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; padding: 10px 12px; border-radius: var(--r-sm); font-size: var(--t-sm); font-weight: 700; }
.k-paper-band.is-green { background: var(--green-bg); border: 1px solid var(--green-line); color: var(--green-ink); }
.k-paper-band.is-amber { background: var(--amber-bg); border: 1px solid var(--amber-line); color: var(--amber-ink); }
.k-paper-here { margin: 0 0 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--blue-bg); border: 1px solid var(--blue-line); color: var(--blue-ink); font-size: var(--t-sm); }

/* the label/value table — one pair per line on a phone, two pairs side by side on a wide screen */
.k-kv { border-top: 1px solid var(--paper-rule); border-left: 1px solid var(--paper-rule); margin: 0 0 12px; font-size: var(--t-sm); }
.k-kv-row { display: grid; grid-template-columns: minmax(112px, 36%) 1fr; }
.k-kv-l, .k-kv-v { border-right: 1px solid var(--paper-rule); border-bottom: 1px solid var(--paper-rule); padding: 9px 10px; min-width: 0; overflow-wrap: anywhere; }
.k-kv-l { background: var(--paper-label); color: var(--paper-head); font-weight: 700; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.k-kv-l .k-pill { font-weight: 600; }
.k-kv-sub { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: 2px; }
@media (min-width: 760px) {
  .k-kv-row { grid-template-columns: 17% 33% 17% 33%; }
  .k-kv-row.is-wide { grid-template-columns: 17% 83%; }
}
.k-kv-row.is-here > .k-kv-l, .k-paper-sec.is-here > h2 { box-shadow: inset 4px 0 0 var(--go); }
.k-kv-row.is-here > .k-kv-v { background: var(--blue-bg); }
.k-kv-v .k-btn--wide { margin-top: 8px; }
/* A button inside the narrow value column of the paper form wraps its words instead of sticking out of the page. */
.k-kv-v .k-btn { max-width: 100%; white-space: normal; text-align: center; padding-top: 8px; padding-bottom: 8px; }
.k-kv--flat { margin: 0; border-left: 0; }
.k-paper-change { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: var(--t-sm); min-height: var(--tap); }
.k-paper-edit { margin-top: 10px; }
.k-paper-edit > summary { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--go-soft-ink); font-weight: 600; cursor: pointer; list-style: none; }
.k-paper-edit > summary::-webkit-details-marker { display: none; }
.k-paper-edit[open] > summary { margin-bottom: 10px; }
.k-paper-form { margin-top: 10px; }
.k-paper-amber { color: var(--amber-ink); }
.k-paper-choose { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* the three compliance levels as big readable cards — selected is obvious in day and night (Bible 10) */
.k-choices { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; min-width: 0; max-width: 100%; }
.k-choices legend { max-width: 100%; }
.k-choice { min-width: 0; }
.k-choices legend { font-weight: 700; margin-bottom: 8px; }
.k-choice { position: relative; display: block; padding: 12px 14px 12px 44px; border: 2px solid var(--line); border-radius: var(--r-md); background: var(--card); cursor: pointer; }
.k-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.k-choice::before { content: ""; position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); background: var(--card); box-sizing: border-box; }
.k-choice:has(input:checked)::before { border: 6px solid var(--go); }
.k-choice:has(input:focus-visible) { outline: 3px solid var(--go); outline-offset: 2px; }
.k-choice:has(input:checked) { border-color: var(--go); background: var(--go-soft); }
.k-choice-t { display: block; font-weight: 700; color: var(--ink); }
.k-choice-s { display: block; font-size: var(--t-sm); color: var(--muted); }

/* grey section bars, as on the printed report */
.k-paper-sec { border: 1px solid var(--paper-rule); border-radius: var(--r-sm); margin: 14px 0 0; overflow: hidden; background: var(--paper); }
.k-paper-sec > h2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 10px 12px; background: var(--paper-label); color: var(--paper-head); font-size: var(--t-md); }
.k-paper-sec > h2 > span { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); font-weight: 600; }
.k-paper-body { padding: 12px; }
.k-paper-note { margin: 0; padding: 10px 12px; color: var(--muted); font-size: var(--t-sm); font-style: italic; }
.k-paper-sub { margin: 0; padding: 8px 12px; font-size: var(--t-sm); color: var(--paper-head); border-top: 1px solid var(--paper-rule); background: var(--soft); }
.k-paper-checks { list-style: none; margin: 0; padding: 0; }
.k-paper-checks > li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-top: 1px solid var(--line); }
.k-paper-checks .k-dot { margin-top: 6px; flex: none; }
.k-paper-foot-act { padding: 12px; border-top: 1px solid var(--paper-rule); }
.k-paper-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; border-top: 1px solid var(--line); }
.k-paper-acts > details { flex: 1 1 100%; margin: 0; }
.k-paper-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.k-paper-table th { background: var(--paper-head); color: var(--paper); text-align: left; padding: 8px 10px; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; }
.k-paper-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.k-paper-table tr:nth-child(even) td { background: var(--soft); }
.k-paper-table .k-num { text-align: right; white-space: nowrap; }
.k-paper-recs { list-style: none; margin: 0; padding: 0; }
.k-paper-recs > li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-left: 4px solid var(--blue); border-bottom: 1px solid var(--line); }
.k-paper-recs > li.is-red { border-left-color: var(--red); }
.k-paper-signs { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .k-paper-signs { grid-template-columns: 1fr 1fr; } }
.k-paper-foot { margin: 18px 0 0; padding-top: 8px; border-top: 1px solid var(--paper-rule); text-align: center; font-size: var(--t-xs); color: var(--muted); }
.k-done-panel { border: 2px solid var(--green-line); background: var(--green-bg); }
.k-done-panel h2 { color: var(--green-ink); }
.k-caps { text-transform: uppercase; letter-spacing: .04em; font-size: var(--t-md); }
.k-flow-all > summary { display: flex; align-items: center; min-height: var(--tap); padding: 0 4px; font-weight: 700; color: var(--go-soft-ink); cursor: pointer; }
.k-flow-all[open] > summary { margin-bottom: 8px; }
.k-flow--fold .k-next { margin-top: 8px; }
.k-paper-signs .k-paper-sec { break-inside: avoid; }
/* the new / edit job report: answers typed straight into the report's rows */
.k-kv--form .k-kv-v input:not([type=checkbox]), .k-kv--form .k-kv-v select, .k-kv--form .k-kv-v textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink); font: 400 var(--t-md)/1.3 var(--font); }
.k-kv--form .k-kv-v textarea { resize: vertical; }
.k-kv--form .k-kv-v :is(input, select, textarea):focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.k-kv--form .k-kv-v > .k-kv-sub { margin: 8px 0 4px; }
.k-kv--form .k-kv-l label { cursor: pointer; }
.k-kv-pair { display: grid; gap: 8px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 760px) { .k-kv-pair { grid-template-columns: 1fr 1fr; } }
.k-kv-pair .k-kv-sub { margin: 0 0 4px; }
.k-paper-later { color: var(--muted); font-style: italic; }
.k-paper-sec.k-paper-later > h2 { opacity: .7; }
.k-paper-save { margin-top: 16px; justify-content: flex-end; }

/* THE NEW JOB REPORT AS STEPS (Peter, 2 Nov 2026: "each step more clean cut"). One numbered box per step, an arrow
   between them, nothing on the page that is not filled in now. Numbers are soft blue; traffic lights stay lights. */
.k-steps { margin: 12px 0 0; }
.k-step { border: 1px solid var(--paper-rule); border-radius: var(--r-sm); background: var(--paper); overflow: hidden; }
.k-step > h2 { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; background: var(--paper-label); color: var(--paper-head); font-size: var(--t-md); }
.k-step > h2 small { font-weight: 500; font-size: var(--t-sm); color: var(--muted); }
.k-step-n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--go-soft); color: var(--go-soft-ink); font-weight: 700; font-size: var(--t-sm); }
.k-step-body { padding: 12px; display: grid; gap: 10px; }
.k-step-body label.k-lbl { display: block; font-size: var(--t-xs); font-weight: 600; color: var(--paper-head); margin: 0 0 4px; }
.k-step-body input:not([type=checkbox]), .k-step-body select, .k-step-body textarea { width: 100%; min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: inherit; font-size: var(--t-sm); }
.k-step-body textarea { resize: vertical; }
.k-step-body :is(input, select, textarea):focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.k-step-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .k-step-grid { grid-template-columns: 1fr 1fr; } .k-step-grid.is-3 { grid-template-columns: 1fr 1fr 1fr; } }
.k-step-with { display: flex; gap: 8px; align-items: flex-end; }
.k-step-with > span { flex: 1 1 auto; min-width: 0; }
.k-step-with > a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 14px; border: 1px solid var(--go-soft); border-radius: var(--r-sm); background: var(--go-soft); color: var(--go-soft-ink); font-weight: 600; font-size: var(--t-sm); text-decoration: none; white-space: nowrap; }
.k-step-with > a[hidden] { display: none; }
.k-step-arrow { text-align: center; color: var(--muted); opacity: .5; font-size: var(--t-lg); line-height: 1; padding: 6px 0; }
.k-step-note { margin: 0; font-size: var(--t-xs); color: var(--muted); }
.k-step-after { margin: 14px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--soft); color: var(--muted); font-size: var(--t-sm); }
.k-step-body .has-error input, .k-step-body .has-error textarea { border-color: var(--red); }
/* ── MONEY (2 Nov): the spreadsheet. Properties across, rows down; numbers are links to the paper behind them. ── */
.k-sheet-wrap { padding: 0; overflow: hidden; }
.k-sheet { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.k-sheet th, .k-sheet td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: right; }
.k-sheet thead th { position: sticky; top: 0; background: var(--soft); font-size: var(--t-xs); font-weight: 700; letter-spacing: .02em; color: var(--muted); vertical-align: bottom; z-index: 1; }
.k-sheet thead th a { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--ink); text-decoration: none; min-height: var(--tap); justify-content: flex-end; max-width: 96px; white-space: normal; line-height: 1.15; }
.k-sheet .k-sheet-row { text-align: left; font-weight: 600; color: var(--ink); position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 150px; }
.k-sheet thead .k-sheet-row { background: var(--soft); z-index: 2; }
.k-sheet .k-sheet-row a { color: inherit; text-decoration: none; display: inline-block; min-height: 30px; line-height: 30px; }
.k-sheet td a { display: block; color: var(--ink); text-decoration: none; min-height: 30px; line-height: 30px; margin: -7px -8px; padding: 7px 8px; border-radius: var(--r-sm); }
.k-sheet td a:hover, .k-sheet td a:focus-visible { background: var(--go-soft); color: var(--go-soft-ink); }
.k-sheet td.is-zero a { color: var(--muted); }
.k-sheet td.is-amber a { background: var(--amber-bg); color: var(--amber-ink); }
.k-sheet td.is-red, .k-sheet .k-sheet-total.is-red { color: var(--red-ink); }
.k-sheet .k-sheet-group th { text-align: left; background: var(--soft); font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding-top: 12px; }
.k-sheet .k-sheet-sum th, .k-sheet .k-sheet-sum td { font-weight: 700; background: var(--soft); }
.k-sheet .k-sheet-net th, .k-sheet .k-sheet-net td { font-weight: 750; font-size: var(--t-md); border-bottom: 0; background: var(--card); }
.k-sheet .k-sheet-total { font-weight: 700; background: var(--soft); }
.k-sheet-wrap > .k-hint { padding: 10px 16px 14px; }
.k-sheet-wrap { overflow-x: auto; }   /* desktop only: 13 columns at 1920 fit; narrower desks scroll the card, the row names stay put */
.k-sheet-one { display: none; }
.k-sheet--one .k-sheet-row { min-width: 0; }
@media (max-width: 850px) {
  .k-sheet-wrap { display: none; }
  .k-sheet-one { display: block; }
  .k-sheet th, .k-sheet td { padding: 10px 6px; white-space: normal; }
}
/* the cell page: one line per row with its paper */
a.k-paper { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--soft); color: var(--ink); text-decoration: none; font-size: var(--t-xs); font-weight: 600; max-width: 100%; }
a.k-paper span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-rowform { display: inline-flex; gap: 6px; align-items: center; }
.k-rowform select { min-height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: inherit; font-size: var(--t-xs); padding: 0 6px; max-width: 150px; }
.k-papers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.k-amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.k-chips select.k-chip { max-width: 100%; min-width: 0; }
a.k-paper { max-width: 260px; }
.k-table--wrap { table-layout: fixed; }
.k-table--wrap th, .k-table--wrap td, .k-table--wrap td:not(:first-child), .k-table--wrap th:not(:first-child) { white-space: normal; overflow-wrap: anywhere; }

/* ── PENNY ON THE PHONE (2 Nov): the screen for everything. Big thumb tiles, the current job first, the Ask bar on top. ── */
.k-penny { max-width: 640px; margin: 0 auto; }
.k-penny-ask { display: flex; gap: 8px; margin: 4px 0 14px; }
.k-penny-ask input { flex: 1; min-width: 0; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--ink); font: 400 var(--t-md)/1.3 var(--font); }
.k-penny-ask input:focus { outline: 3px solid var(--focus); outline-offset: 0; }
.k-penny-ask .k-btn { min-width: 52px; min-height: 52px; justify-content: center; }
.k-penny-now { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r-md); background: var(--go); color: var(--go-ink); text-decoration: none; margin-bottom: 6px; }
.k-penny-now strong { font-size: var(--t-lg); }
.k-penny-now span { font-size: var(--t-sm); opacity: .92; }
.k-penny-now-k { text-transform: uppercase; letter-spacing: .05em; font-size: var(--t-xs) !important; font-weight: 700; }
.k-penny-now-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 700; font-size: var(--t-md) !important; opacity: 1 !important; }
.k-penny-none { margin: 0 0 6px; padding: 10px 14px; border-radius: var(--r-md); background: var(--soft); color: var(--muted); font-size: var(--t-sm); }
.k-penny-h { margin: 18px 2px 8px; font-size: var(--t-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.k-penny-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .k-penny-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.k-penny-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 84px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.k-penny-tile strong { font-size: var(--t-md); line-height: 1.2; }
.k-penny-tile span { font-size: var(--t-sm); color: var(--muted); line-height: 1.3; }
.k-penny-tile .k-icon { color: var(--go); }
.k-penny-tile.is-action { min-height: 112px; background: var(--go-soft); border-color: var(--blue-line); }
.k-penny-tile:active { transform: scale(.98); }
.k-penny-reading { margin: 10px 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--blue-bg); color: var(--ink); font-weight: 700; }
.k-penny-reading.is-busy::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--blue); border-right-color: transparent; border-radius: 50%; animation: k-spin .8s linear infinite; }
@keyframes k-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .k-penny-reading.is-busy::before { animation: none; } }
.k-penny-receipt-view { margin: 10px 0 0; cursor: zoom-in; }
.k-penny-receipt-view img { display: block; width: 100%; max-height: 55vh; object-fit: contain; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); }
.k-penny-receipt-view.is-open { cursor: zoom-out; }
.k-penny-receipt-view.is-open img { max-height: none; }
.k-penny-receipt-view figcaption { margin-top: 6px; font-size: var(--t-sm); color: var(--muted); }
.k-penny-camera { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 140px; border: 2px dashed var(--blue-line); border-radius: var(--r-md); background: var(--go-soft); color: var(--go-soft-ink); font-weight: 700; cursor: pointer; text-align: center; padding: 12px; }
.k-door { margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--page); color: var(--ink); font-family: var(--font); }
.k-door-box { text-align: center; padding: 24px; }
.k-door-logo { height: 44px; margin-bottom: 8px; }
/* MONEY (2 Nov): "Pick a few…" — the property tick list sits under the chips, full width. */
.k-chip-details { flex: 1 1 100%; }
.k-chip-details > summary { list-style: none; cursor: pointer; width: max-content; }
.k-chip-details > summary::-webkit-details-marker { display: none; }
.k-chip-details[open] > summary { background: var(--go-soft); color: var(--go-soft-ink); }
/* A photo of the house (2 Nov): avatar beside the name, a thumbnail in the column head. */
.k-house-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.k-house-avatar { flex: none; width: 56px; height: 56px; border-radius: var(--r-md); overflow: hidden; background: var(--soft); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.k-house-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
h2.k-house-head .k-house-avatar { width: 40px; height: 40px; }
.k-house-mini { width: 36px; height: 36px; border-radius: var(--r-sm); object-fit: cover; display: block; margin-bottom: 4px; }
/* The house columns on the Cashflow sheet: one straight row. Same width, same tile, light in the same corner, name on two lines. */
.k-sheet thead th.k-house-col { width: 92px; min-width: 92px; max-width: 92px; text-align: center; padding: 8px 4px 6px; }
.k-sheet thead th.k-house-col a { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; max-width: none; width: 100%; min-height: 0; }
.k-house-tile { position: relative; width: 44px; height: 44px; border-radius: var(--r-sm); overflow: visible; display: flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); color: var(--muted); flex: 0 0 auto; }
.k-house-tile img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--r-sm) - 1px); display: block; }
.k-house-tile .k-dot { position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; border: 2px solid var(--soft); box-sizing: content-box; }
.k-house-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: calc(1.15em * 2); line-height: 1.15; text-align: center; white-space: normal; font-size: var(--t-xs); font-weight: 700; color: var(--ink); width: 100%; }
/* Penny settings: the phone beside its settings */
.k-penny-set-grid { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .k-penny-set-grid { grid-template-columns: 436px minmax(0, 1fr); } .k-penny-phone { position: sticky; top: 12px; } }
.k-penny-phone { width: 100%; max-width: 436px; margin: 0 auto; padding: 12px; border-radius: 36px; background: var(--nav); box-shadow: var(--shadow); }
.k-penny-phone iframe { display: block; width: 100%; height: min(860px, 80vh); border: 0; border-radius: 26px; background: var(--page); }
@media (max-width: 1099px) { .k-penny-phone { display: none; } }
.k-penny-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.k-penny-rows > li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.k-penny-rows > li { flex-wrap: wrap; }
.k-penny-rows .k-input { flex: 1 1 150px; min-width: 0; }
.k-penny-rows [data-up] { margin-left: auto; }
.k-penny-rows .k-iconbtn .k-icon { transform: rotate(180deg); }
.k-penny-rows .k-iconbtn.k-flip .k-icon { transform: none; }
.k-penny-set { text-align: center; margin: 22px 0 6px; }
.k-penny-set a { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); color: var(--muted); }
.k-penny-ask-bottom { position: sticky; bottom: 72px; margin-top: 16px; padding: 8px 0 0; background: var(--page); }
.k-penny-ask-bottom .k-penny-ask { margin: 0; }
@media (min-width: 851px) { .k-penny-ask-bottom { bottom: 0; } }
.k-mail-file-house { display: inline-block; }
.k-mail-file-house > summary { list-style: none; cursor: pointer; }
.k-mail-file-house > summary::-webkit-details-marker { display: none; }
.k-mail-file-house[open] { flex: 1 1 100%; }
/* TEACH (2 Nov): the paper with boxes drawn on it. */
#teach-houses .k-rows select { min-height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: inherit; font-size: var(--t-xs); padding: 0 6px; max-width: 220px; }
/* HIDE THE MENU (Peter, 2 Nov: "you can't shut the sidebar and make it bigger"). Desktop only; remembered. */
.k-side-toggle { display: none; }
@media (min-width: 851px) {
  .k-side-toggle { display: inline-flex; }
  html[data-side="hidden"] .k-shell { grid-template-columns: 0 minmax(0, 1fr); }
  html[data-side="hidden"] .k-side { width: 0; overflow: hidden; }
  html[data-side="hidden"] .k-content { max-width: none; }
}
/* TEACH, split (2 Nov): houses and boxes on the left, the paper on the right. Eight house colours. */
.k-linkbtn { background: none; border: 0; padding: 0; color: var(--go-soft-ink); font: inherit; font-size: var(--t-xs); text-decoration: underline; cursor: pointer; min-height: 32px; }


/* THE PAPER, READ (statement page): one table in the paper's order, a coloured house heading above its lines. */
.k-table.k-read th, .k-table.k-read td, .k-table.k-read td:not(:first-child), .k-table.k-read th:not(:first-child) { vertical-align: middle; text-align: left; white-space: normal; padding: 7px 10px; }
.k-table.k-read th.k-num, .k-table.k-read td.k-num { text-align: right; white-space: nowrap; }
.k-table.k-read .k-read-house th { text-align: left; background: var(--soft); font-size: var(--t-base, 15px); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); padding: 10px 12px; border-top: 2px solid var(--line); }
.k-read .k-read-house th b { font-weight: 700; }
.k-read .k-read-house .k-dot { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.k-read .k-read-house.is-unknown th { background: var(--red-bg); }
.k-read .k-read-house .k-rowform { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }
.k-read .k-read-date { white-space: nowrap; color: var(--muted); }
.k-read .k-read-sub td { color: var(--muted); font-size: .92em; border-bottom: 1px solid var(--line); }
.k-read .k-read-total td { font-weight: 700; border-top: 2px solid var(--ink); }
.k-read select { max-width: 100%; }
.k-read td.k-amount form { margin-left: 6px; }
/* Phone: each line stacks — what the paper says, then date · spreadsheet row · the amount. Nothing squeezed sideways. */
@media (max-width: 640px) {
  .k-table.k-read thead { display: none; }
  .k-table.k-read tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
  .k-table.k-read tbody td, .k-table.k-read tbody th { display: block; border: 0; padding: 0; }
  .k-table.k-read td.k-read-desc { flex: 1 1 100%; order: 0; }
  .k-table.k-read td.k-read-date { flex: 0 0 auto; order: 1; font-size: .85em; }
  .k-table.k-read td.k-read-row { flex: 1 1 auto; order: 2; }
  .k-table.k-read td.k-num { flex: 0 0 auto; order: 3; margin-left: auto; font-weight: 600; }
  .k-table.k-read td.k-num.is-empty { display: none; }
  .k-table.k-read td.k-num[data-label]::before { content: attr(data-label) " "; font-weight: 400; color: var(--muted); font-size: .85em; }
  .k-table.k-read td.k-num form { display: inline; }
  .k-table.k-read .k-read-house th { flex: 1 1 100%; }
  .k-table.k-read .k-read-house th form { float: none !important; display: flex; margin: 6px 0 0; }
  .k-table.k-read .k-read-sub td:first-child, .k-table.k-read .k-read-total td:first-child { flex: 1 1 100%; }
  .k-table.k-read .k-read-sub td.k-num, .k-table.k-read .k-read-total td.k-num { margin-left: 0; }
  .k-table.k-read .k-rowform { margin: 0; } .k-table.k-read td.k-read-row select { max-width: 48vw; }
  .k-table.k-read td.k-read-desc { line-height: 1.3; }
}
.k-table.k-read .k-read-house select { width: auto; max-width: 260px; }

/* ONE SCREEN for a statement (3 Nov): the paper left, the table right, one light on top. */
.k-light { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 12px 16px; border-left: 6px solid var(--grey); }
.k-light--green { border-left-color: var(--green); } .k-light--red { border-left-color: var(--red); } .k-light--amber { border-left-color: var(--amber); }
.k-light-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-width: 0; }
.k-light-main h2 { margin: 0; font-size: var(--t-lg, 18px); }
.k-light-main .k-dot { width: 16px; height: 16px; }
.k-light-figs { display: flex; gap: 18px; color: var(--muted); font-size: .95em; }
.k-light-figs b { color: var(--ink); font-variant-numeric: tabular-nums; } .k-light-figs em { font-style: normal; font-weight: 600; } .k-light-figs small { display: block; font-size: .8em; }
.k-light-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.k-pop { position: relative; } .k-pop > summary { list-style: none; cursor: pointer; } .k-pop > summary::-webkit-details-marker { display: none; }
.k-pop[open] > form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 12px; width: min(380px, 90vw); }

.k-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
.k-split.is-wide { grid-template-columns: 1fr; }
.k-split-paper { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.k-split.is-wide .k-split-paper { position: static; max-height: none; }
.k-paper-bar { display: flex; align-items: center; gap: 12px; padding: 4px 6px 8px; font-size: .9em; }
.k-paper-name { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-paper-page { display: block; width: 100%; height: auto; background: var(--card); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.k-paper-empty { padding: 24px; text-align: center; }
.k-paper-docs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.k-file--inline { display: flex; gap: 6px; align-items: center; margin-left: auto; } .k-file--inline input[type=file] { max-width: 180px; font-size: .85em; }
.k-split-read { min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 12px; }
.k-split-read .k-table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.k-split-read .k-read-add { margin-top: 0; }

/* Cells you can type in: look like text until you click. */
.k-cell { margin: 0; } .k-cell-in { width: 100%; border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 6px; font: inherit; color: inherit; }
.k-cell-in:hover { border-color: var(--line); background: var(--card); } .k-cell-in:focus { border-color: var(--blue); background: var(--card); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.k-cell-in.is-saving { opacity: .5; } .k-cell-num { text-align: right; font-variant-numeric: tabular-nums; width: 110px; font-weight: 600; }
.k-table.k-read tbody tr[style*="--hc"] td:first-child { box-shadow: inset 4px 0 0 var(--hc); }
.k-table.k-read .k-read-house th { box-shadow: inset 4px 0 0 var(--hc); }
.k-read-housepick { float: right; } .k-read-move { display: inline-block; margin-left: 6px; } .k-read-move select { max-width: 90px; color: var(--muted); font-size: .85em; }
.k-read-x { display: inline; margin-left: 4px; }
.k-table.k-read .k-read-paper td { color: var(--muted); border-top: 0; }
.k-table.k-read .k-read-total td { border-bottom: 0; }

@media (max-width: 900px) {
  .k-split { grid-template-columns: 1fr; }
  .k-split-paper { position: static; max-height: 60vh; }
  .k-light-figs { width: 100%; justify-content: space-between; }
  .k-read-housepick { float: none; display: flex; margin-top: 6px; }
}

.k-drop { display: inline-block; } .k-drop-label { cursor: pointer; } .k-drop-label.is-busy { opacity: .6; pointer-events: none; }
.k-split-read .k-card.k-form { margin: 0; }
.k-read-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin: 0 0 12px; background: var(--red-bg); border-radius: 10px; }

/* TIDY bar under every box of writing (Kit rule, 3 Nov). */
.k-tidy { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--t-xs); color: var(--muted); }
.k-tidy .k-linkbtn { font-size: inherit; } .k-tidy.is-busy .k-linkbtn { opacity: .5; pointer-events: none; } .k-tidy-say { margin-left: 4px; }

/* The one big button on a public page (the Paid page): a fingernail hit. */
.k-btn--big { min-height: 56px; font-size: 18px; padding: 14px 24px; width: 100%; justify-content: center; }

/* Settings → the bill email: wording on the left, how it reads on the right. */
.k-split--settings { margin-top: 8px; }
.k-mail-sample { background: var(--soft); }
/* The sample email on Money settings. It was .k-mail-body - the same name as the Mail screen's three-column grid - and its pre-wrap turned every newline in the list markup into a blank line: 85px of air per row (Peter, 4 Nov: "the gaps between each email... too big"). */
.k-mail-sample .k-mail-sample-body { white-space: pre-wrap; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 14px; line-height: 1.5; margin: 8px 0; }

/* Cards that carry dollars (Expenses): the amount is the big number; the count sits under it. */
.k-cards .k-card-sub { font-size: var(--t-xs); color: var(--muted); }
@media (max-width: 600px) {
  .k-cards .k-card-num { font-size: 20px; min-width: 0; }
  .k-cards .k-card-sub { margin-left: auto; }
}

/* ── KIT: THE SAME CONTROLS EVERYWHERE (Peter, 3 Nov: "everything uniform, same structure") ──────────────── */
/* A field never stretches its box to its neighbour's height: a select beside an input is the same 44px. */
.k-field { align-content: start; }
/* Controls inside a table are Kit controls, not the browser's bare ones. */
.k-table select, .k-table input:not([type=checkbox]):not([type=radio]):not([type=file]) { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: 400 var(--t-sm)/1.3 var(--font); max-width: 100%; }
.k-table select:focus, .k-table input:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.k-table input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--go); cursor: pointer; }
.k-table td .k-tickall { margin: 0; padding: 0; }
/* FOLD ROWS: a list row that opens (settings lists). Title and sub on the left, one chevron on the right, 44px to tap.
   No browser triangle. Open = the form underneath. Same as the mailbox and folder folds. */
.k-rows > li > details { flex: 1; min-width: 0; }
.k-rows > li > details > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; min-height: var(--tap); cursor: pointer; padding: 2px 0; }
.k-rows > li > details > summary::-webkit-details-marker { display: none; }
.k-rows > li > details > summary .k-row-title { grid-column: 1; }
.k-rows > li > details > summary .k-row-sub { grid-column: 1; }
.k-rows > li > details > summary::after { content: ""; grid-column: 2; grid-row: 1 / span 2; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-right: 8px; transition: transform .15s; }
.k-rows > li > details[open] > summary::after { transform: rotate(-135deg); }
.k-rows > li > details > .k-form, .k-rows > li > details > form { margin: 8px 0 12px; }
/* A house's picture: one square for every house; empty = the house icon, tap it to put a photo in. */
.k-house-pic { flex: none; width: 40px; height: 40px; border-radius: var(--r-sm); overflow: hidden; background: var(--soft); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; position: relative; }
.k-house-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k-house-pic input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.k-house-pic:hover, .k-house-pic:has(input:focus-visible) { outline: 3px solid var(--focus); }

/* FIELD LIGHTS (Peter, 3 Nov: "if something's filled and it's good, have a light green"). Every box tells you at a glance:
   green = filled in and good · amber = still needed · red = needed and left empty after you went past it. Light, not loud. */
.k-field.is-green > input:not([type=checkbox]):not([type=file]), .k-field.is-green > select, .k-field.is-green > textarea { border-color: var(--green-line); background: var(--green-bg); box-shadow: inset 4px 0 0 var(--green); }
.k-field.is-amber > input:not([type=checkbox]):not([type=file]), .k-field.is-amber > select, .k-field.is-amber > textarea { border-color: var(--amber-line); box-shadow: inset 4px 0 0 var(--amber); }
.k-field.is-red > input:not([type=checkbox]):not([type=file]), .k-field.is-red > select, .k-field.is-red > textarea { border-color: var(--red-line); background: var(--red-bg); box-shadow: inset 4px 0 0 var(--red); }
/* The tidy helpers are buttons, not underlined words. */
.k-tidy { gap: 8px; margin-top: 6px; }
.k-tidy .k-linkbtn { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; min-height: 32px; background: var(--card); color: var(--ink); font-weight: 600; }
.k-tidy .k-linkbtn:hover { background: var(--soft); }
/* A row-form in a settings list: picture · name box · tick · count · Save, one line, wraps on the phone. */
.k-rowform--cat { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.k-rowform--cat input[name=name] { flex: 1; min-width: 160px; min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: inherit; }
.k-rowform--cat .k-tickall { margin: 0; }
.k-cat-pic { font-size: 20px; width: 32px; text-align: center; }
.k-move > summary { list-style: none; display: inline-flex; }
.k-move > summary::-webkit-details-marker { display: none; }
.k-move[open] { flex-basis: 100%; }
.k-move > form { margin-top: 8px; }
/* Controls in a one-line row form are Kit controls too. */
.k-rowform select, .k-rowform input:not([type=checkbox]):not([type=file]):not([type=radio]) { min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: 400 var(--t-md)/1.3 var(--font); max-width: 100%; }

/* A button inside a narrow form cell wraps its words instead of running off a phone screen (human run, 3 Nov: the job
   report's 'Record exception and continue'). */
.k-kv-v .k-btn, .k-paper-form .k-btn { white-space: normal; max-width: 100%; height: auto; text-align: center; padding-top: 8px; padding-bottom: 8px; }
.k-login-again { text-align: center; margin-top: 12px; font-size: var(--t-sm); color: var(--muted); }

/* ── THE VIEWER: an attachment opened over the screen (kit.js). PDF pages are canvases; a picture is a picture. ── */
.k-viewer { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--scrim); }
.k-viewer-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.k-viewer-bar b { flex: 1 1 160px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-sm); }
.k-viewer-bar .k-btn { min-height: 40px; padding: 0 12px; }
.k-viewer-body { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; -webkit-overflow-scrolling: touch; }
.k-viewer-body img { max-width: 100%; height: auto; background: var(--card); box-shadow: var(--shadow); }
.k-viewer-body canvas { background: var(--card); box-shadow: var(--shadow); max-width: none; }
.k-viewer-note { color: var(--nav-ink); font-size: var(--t-sm); margin: 24px 0; }
.k-viewer-note a { color: var(--nav-ink); }
@media (max-width: 850px) { .k-viewer-bar { padding: 6px 8px; } .k-viewer-bar .k-btn { padding: 0 9px; font-size: var(--t-xs); } .k-viewer-body { padding: 6px; } }

/* ── MAIL SETTINGS: the look (Peter, 4 Nov - the original webmail's knobs, with a live preview). ── */
.k-look { display: grid; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--soft); }
.k-mail.k-lookprev { display: grid; grid-template-columns: 112px minmax(0, 1fr) minmax(0, 1.15fr); height: 236px; min-height: 0; margin: 0; pointer-events: none; user-select: none; border-radius: var(--r-sm); }
.k-lookprev .k-mail-nav { padding: 4px 0 8px; }
.k-lookprev .k-mail-folders a { min-height: 30px; padding: 2px 10px; font-size: var(--t-xs); gap: 6px; }
.k-lookprev .k-mailchips { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 6px 8px; gap: 4px; }
.k-lookprev .k-mailchips a { height: 36px; }
.k-lookprev .k-mail-rows { overflow: hidden; }
.k-lookprev .k-mail-read { overflow: hidden; }
.k-lookprev .k-badge { font-size: 10px; padding: 0 6px; min-width: 0; height: 18px; line-height: 18px; }
@media (max-width: 850px) { .k-mail.k-lookprev { grid-template-columns: 84px minmax(0, 1fr); height: 220px; } .k-lookprev .k-mail-read { display: none; } .k-lookprev .k-mailchips a b { font-size: 10px; } }
.k-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.k-preset { display: grid; gap: 4px; padding: 8px; border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.k-preset:hover { border-color: var(--grey); }
.k-preset[aria-pressed="true"] { border-color: var(--go); box-shadow: 0 0 0 3px var(--go-soft); }
.k-preset b { font-size: var(--t-sm); font-weight: 700; }
.k-preset small { font-size: var(--t-xs); color: var(--muted); line-height: 1.2; }
.k-preset-sw { display: grid; grid-template-columns: 22px 1fr 1.2fr; height: 38px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.k-preset-sw i { display: block; position: relative; }
.k-preset-sw u { position: absolute; left: 6px; top: 6px; width: 26px; height: 7px; border-radius: 4px; }
.k-sizestep { display: flex; align-items: center; gap: 8px; }
.k-sizestep .k-btn { width: 52px; padding: 0; font-weight: 800; font-size: var(--t-md); }
.k-sizestep span { flex: 1; text-align: center; font-weight: 700; font-size: var(--t-sm); }
.k-swrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.k-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); background: var(--sw, transparent); padding: 0; cursor: pointer; position: relative; display: grid; place-items: center; }
.k-swatch:hover { transform: scale(1.1); }
.k-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.k-swatch[data-default] { background: conic-gradient(from 90deg, var(--amber), var(--red), var(--blue), var(--green), var(--amber)); }
.k-swatch--custom { background: var(--card); color: var(--muted); font-weight: 800; font-size: var(--t-md); overflow: hidden; }
.k-swatch--custom input { position: absolute; inset: -30%; width: 160%; height: 160%; opacity: 0; cursor: pointer; }
.k-swatch--custom span { pointer-events: none; }
.k-crows { display: grid; gap: 2px; }
.k-crow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 2px 4px; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.k-crow:last-child { border-bottom: 0; }
.k-crow-tools { display: inline-flex; align-items: center; gap: 8px; }
.k-crow-clear { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--muted); cursor: pointer; font-size: 12px; }
.k-cchip { width: 44px; height: 30px; border-radius: 7px; border: 1px solid var(--line); overflow: hidden; position: relative; cursor: pointer; background: var(--card); }
.k-crow.is-set .k-cchip { box-shadow: 0 0 0 2px var(--go-soft); border-color: var(--go); }
.k-cchip input { position: absolute; inset: -25%; width: 150%; height: 150%; border: 0; padding: 0; cursor: pointer; background: none; }
/* the preview rides along: pinned under the top bar while the knobs scroll beneath it */
.k-lookprev-wrap { position: sticky; top: 72px; z-index: 5; display: grid; gap: 6px; margin: -14px -14px 0; padding: 10px 14px 10px; background: var(--soft); border-bottom: 1px solid var(--line); border-radius: var(--r-md) var(--r-md) 0 0; }
@media (max-width: 850px) { .k-lookprev-wrap { top: 60px; margin: -14px -14px 0; padding: 8px 10px; } .k-mail.k-lookprev { height: 150px; } .k-lookprev .k-mail-folders a { min-height: 26px; } }
/* mailboxes that are his in the other workspace: listed quietly, opening one switches workspace */
.k-mail-else { border-top: 1px solid var(--line); padding: 6px 0 4px; }
.k-mail-else-hd { padding: 6px 12px 2px; font-size: var(--t-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.k-mail-else form { margin: 0; }
.k-mail-else button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--mail-folder); padding: 6px 12px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; opacity: .8; }
.k-mail-else button:hover { background: var(--card); opacity: 1; }
.k-mail-else button .k-avatar { width: 30px; height: 30px; font-size: 11px; background: var(--grey-bg); color: var(--grey-ink); }
.k-mail-else button b { display: block; font-size: var(--t-sm); font-weight: 700; }
.k-mail-else button small { display: block; color: var(--muted); font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-mail-else button .k-grow { min-width: 0; }

/* ---------- Comms: Find a document (6 Nov) ---------- */
.k-chip .k-count { color: var(--muted); font-weight: 600; font-size: var(--t-xs); }
.k-chips details { display: contents; }
.k-chips details > summary { list-style: none; cursor: pointer; }
.k-chips details > summary::-webkit-details-marker { display: none; }
.k-chips details[open] > summary { display: none; }
@media (max-width: 760px) {
  .k-rows--stack > li { flex-wrap: wrap; }
  .k-rows--stack > li > a.k-rowlink { flex: 1 1 100%; }
}
/* Comms opens on "Everything, filed together" (Peter's preview, 6 Nov): folders, then cards or a list. */
.k-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.k-folders details { display: contents; }
.k-folders details > summary { list-style: none; cursor: pointer; }
.k-folders details > summary::-webkit-details-marker { display: none; }
.k-folders details[open] > summary { display: none; }
.k-folder { display: grid; gap: 4px; align-content: start; min-height: 76px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--ink); text-decoration: none; text-align: left; }
.k-folder:hover { background: var(--soft); }
.k-folder[aria-current="true"] { background: var(--go-soft); border-color: var(--blue-line); color: var(--go-soft-ink); }
.k-folder-name { font-weight: 700; font-size: var(--t-sm); overflow-wrap: anywhere; }
.k-folder-sub { font-size: var(--t-xs); color: var(--muted); }
.k-more { margin-top: 4px; }
.k-more > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; }
.k-more .k-label { display: block; margin: 10px 0 6px; }
.k-found-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; }
.k-found-head h2 { margin: 0; font-size: var(--t-lg); }
.k-found { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.k-found-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--ink); text-align: left; font: inherit; cursor: pointer; min-width: 0; }
.k-found-card:hover { border-color: var(--blue-line); }
.k-found-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.k-found-paper { display: flex; align-items: center; justify-content: center; height: 116px; background: var(--soft); flex: none; overflow: hidden; }
.k-found-paper img { width: 100%; height: 100%; object-fit: cover; }
.k-found-sheet { display: grid; gap: 6px; align-content: start; width: 78px; height: 92px; padding: 10px; background: var(--card); border: 1px solid var(--line); font-size: 10px; line-height: 1.2; color: var(--muted); overflow: hidden; }
.k-found-sheet b { font-size: 9px; letter-spacing: .08em; overflow: hidden; white-space: nowrap; }
.k-found-sheet i { display: block; border-top: 2px solid var(--line); }
.k-found-info { display: grid; gap: 6px; padding: 14px; min-width: 0; }
.k-found-info > * { overflow-wrap: anywhere; }
.k-tag { display: inline-block; padding: 3px 7px; border-radius: var(--r-sm); background: var(--soft); font-size: var(--t-xs); margin: 1px 0; }
.k-found-status { display: flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 600; }
.k-found-status.is-green { color: var(--green-ink); }
.k-found-status.is-amber { color: var(--amber-ink); }
.k-found-status.is-red { color: var(--red-ink); }
.k-found.is-list { grid-template-columns: minmax(0, 1fr); }
.k-found.is-list .k-found-card { flex-direction: row; }
.k-found.is-list .k-found-paper { width: 104px; height: auto; min-height: 116px; }
.k-dialog--wide { width: min(640px, calc(100vw - 32px)); }
.k-dialog--wide .k-btn-row { margin-top: 12px; flex-wrap: wrap; }
.k-dialog--wide .k-facts { margin: 12px 0; }

/* ---------- Comms as his SPY COMMS spreadsheet (6 Nov): gridlines, header bands, a pick row, sheet tabs ---------- */
.k-ss-wrap { padding: 0; overflow: hidden; overflow-x: auto; }
.k-ss--rows { min-width: 880px; }
.k-ss-title { padding: 12px 16px; text-align: center; font-weight: 800; font-size: var(--t-md); letter-spacing: .05em; text-transform: uppercase; background: var(--go-soft); color: var(--go-soft-ink); border-bottom: 1px solid var(--line); }
.k-ss-title-sub { font-weight: 600; font-size: var(--t-xs); letter-spacing: 0; text-transform: none; opacity: .85; margin-left: 8px; }
.k-ss-note { padding: 8px 16px; margin: 0; }
.k-ss-picks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.k-ss-picks--filter { grid-template-columns: repeat(6, minmax(0, 1fr)) auto; }
.k-ss-pick--search { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); }
.k-ss-picks--save { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.2fr) auto; border-bottom: 0; border-top: 1px solid var(--line); }
.k-ss-pick { display: grid; grid-template-rows: auto 1fr; min-width: 0; border-right: 1px solid var(--line); }
.k-ss-pick:last-child { border-right: 0; }
.k-ss-pick > label { padding: 7px 10px; background: var(--soft); border-bottom: 1px solid var(--line); font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-ss-pick > select, .k-ss-pick > input { width: 100%; min-width: 0; min-height: 48px; padding: 0 10px; border: 0; border-radius: 0; background: var(--card); color: var(--ink); font: 600 var(--t-sm)/1.3 var(--font); }
.k-ss-pick > input[type=file] { padding: 12px 10px; font-weight: 400; }
.k-ss-pick > select:focus, .k-ss-pick > input:focus { outline: 3px solid var(--focus); outline-offset: -3px; }
.k-ss-pick.is-set > select { background: var(--green-bg); color: var(--green-ink); }
.k-ss-pick.has-error > label { color: var(--red-ink); }
.k-ss-pick--go > .k-btn-row { padding: 2px 8px; align-items: center; flex-wrap: nowrap; }
.k-ss-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line); }
.k-ss-bar-h { grid-column: 1 / -1; padding: 7px 10px; text-align: center; background: var(--soft); border-bottom: 1px solid var(--line); font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.k-ss-bar-v { padding: 12px 16px; text-align: center; font-weight: 700; font-size: var(--t-md); overflow-wrap: anywhere; }
.k-ss-bar > .k-btn { margin: 6px 10px 6px 0; }
.k-ss { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.k-ss th, .k-ss td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: break-word; }
.k-ss .k-ref { overflow-wrap: anywhere; }
.k-ss tr > :first-child { border-left: 0; }
.k-ss tr > :last-child { border-right: 0; }
.k-ss thead tr:first-child th { border-top: 0; }
.k-ss tbody tr:last-child td, .k-ss tfoot tr:last-child td { border-bottom: 0; }
.k-ss thead th, .k-ss tbody th { background: var(--soft); font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.k-ss .k-ss-group th { text-align: center; font-size: var(--t-sm); font-weight: 800; background: var(--go-soft); color: var(--go-soft-ink); }
.k-ss td.k-ss-code { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.k-ss td.k-ss-code a, .k-ss-links a { color: var(--go-soft-ink); text-decoration: none; display: inline-block; min-height: 28px; line-height: 28px; }
.k-ss td.k-ss-code a:hover, .k-ss-links a:hover { text-decoration: underline; }
.k-ss-links { white-space: nowrap; }
.k-ss-links a + a { margin-left: 10px; }
.k-ss-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.k-ss-status { white-space: nowrap; }
.k-ss-desc .k-linkbtn { font-size: var(--t-sm); font-weight: 700; color: var(--ink); text-decoration: none; text-align: left; min-height: 28px; }
.k-ss-desc .k-linkbtn:hover { text-decoration: underline; }
.k-ss-desc .k-row-sub { display: block; }
.k-ss--rows tbody tr:hover td { background: var(--soft); }
.k-ss tr.is-now td { background: var(--green-bg); }
.k-ss tr.is-off td { color: var(--muted); }
.k-ss select, .k-ss input:not([type=hidden]) { width: 100%; min-width: 0; min-height: 40px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: 400 var(--t-sm)/1.3 var(--font); }
.k-ss td form .k-row-sub { display: block; margin-top: 2px; }
.k-ss-add td { background: var(--amber-bg); }
.k-ss-addgo { white-space: nowrap; }
.k-ss-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.k-ss-col { display: grid; gap: 16px; min-width: 0; }
.k-ss-col > .k-card { margin: 0; }
.k-ss-narrow { display: none; }
.k-dialog--wide .k-ss { margin: 12px 0; }
.k-dialog--wide .k-ss th { width: 130px; }
@media (max-width: 1150px) {
  .k-ss-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .k-ss--rows { min-width: 0; }
  .k-ss-picks, .k-ss-picks--filter, .k-ss-picks--save { grid-template-columns: minmax(0, 1fr); }
  .k-ss-pick { grid-template-rows: none; grid-template-columns: 112px minmax(0, 1fr); border-right: 0; border-bottom: 1px solid var(--line); }
  .k-ss-pick:last-child { border-bottom: 0; }
  .k-ss-pick > label { border-bottom: 0; border-right: 1px solid var(--line); display: flex; align-items: center; white-space: normal; }
  .k-ss-pick--grow, .k-ss-pick--search { grid-template-columns: minmax(0, 1fr); }
  .k-ss-pick--grow > label, .k-ss-pick--search > label { border-right: 0; border-bottom: 1px solid var(--line); }
  .k-ss-pick--go > label { display: none; }
  .k-ss-pick--go { grid-template-columns: minmax(0, 1fr); }
  .k-ss-pick--go > .k-btn-row { padding: 8px; }
  .k-ss-cols { grid-template-columns: minmax(0, 1fr); }
  .k-ss-wide { display: none; }
  .k-ss-narrow { display: block; }
  .k-ss th, .k-ss td { padding: 8px; }
  .k-ss thead th { white-space: normal; }
  .k-ss-wrap { overflow-x: auto; }
  .k-ss tfoot, .k-ss-add, .k-ss-add td { display: block; width: 100%; border-left: 0; border-right: 0; }
  .k-ss td.k-ss-code { white-space: normal; }
  .k-ss--rows { table-layout: fixed; }
  .k-ss--rows th:first-child { width: 104px; }
  .k-ss--rows th:last-child { width: 62px; }
  .k-ss-links a { display: block; margin: 0; }
  .k-ss-links a + a { margin-left: 0; }
  .k-dialog--wide .k-ss th { width: 96px; white-space: normal; }
}
.k-ss--rows td.k-ss-desc { min-width: 280px; }
@media (max-width: 640px) { .k-ss--rows td.k-ss-desc { min-width: 0; } }

/* ---------- Documents, easier on the eye (6 Nov): quiet folders, smaller even cards, one light per card ---------- */
.k-folders { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 6px 0 14px; }
.k-folder { display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 6px 12px; border-radius: var(--r-pill); background: var(--soft); border-color: transparent; }
.k-folder:hover { border-color: var(--line); }
.k-folder svg { flex: none; color: var(--muted); }
.k-folder-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-folder-sub { flex: none; }
.k-found { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.k-found-card { border-color: transparent; box-shadow: 0 1px 2px var(--scrim); }
.k-found-card:hover { border-color: var(--line); box-shadow: var(--shadow); }
.k-found-paper { height: 84px; background: var(--page); border-bottom: 1px solid var(--line); }
.k-found-sheet { width: 56px; height: 66px; padding: 7px; gap: 4px; font-size: 8px; border-radius: 3px; }
.k-found-sheet b { font-size: 7px; }
.k-found-info { gap: 3px; padding: 12px 14px 14px; align-content: start; flex: 1; }
.k-found-title { font-weight: 650; font-size: var(--t-sm); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-found-meta { font-size: var(--t-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-found-status { margin-top: 6px; font-weight: 600; }
.k-found-status.is-green { color: var(--muted); }
.k-found-head h2 { font-size: var(--t-md); font-weight: 650; color: var(--muted); }
.k-found.is-list { gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.k-found.is-list .k-found-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; align-items: center; }
.k-found.is-list .k-found-card:last-of-type { border-bottom: 0; }
.k-found.is-list .k-found-paper { width: 64px; min-height: 64px; height: 64px; border-bottom: 0; background: transparent; }
.k-found.is-list .k-found-sheet { width: 40px; height: 48px; padding: 5px; font-size: 0; }
.k-found.is-list .k-found-sheet b { display: none; }
.k-found.is-list .k-found-info { padding: 10px 14px 10px 0; }
.k-found.is-list .k-found-status { margin-top: 2px; }

/* ---------- Documents set out like Google Drive (6 Nov): search pill, chips, folders, files as grid or list ---------- */
.k-drive-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.k-drive-search { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.k-drive-search:focus-within { border-color: var(--focus); box-shadow: var(--shadow); }
.k-drive-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 var(--t-md)/1.3 var(--font); min-height: 48px; }
.k-drive-crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin: 0 0 12px; font-size: var(--t-lg); }
.k-drive-crumbs h1 { margin: 0; font-size: var(--t-lg); font-weight: 600; }
.k-drive-crumbs a { color: var(--muted); text-decoration: none; border-radius: var(--r-sm); padding: 4px 6px; margin: -4px -6px; }
.k-drive-crumbs a:hover { background: var(--soft); color: var(--ink); }
.k-drive-sep { color: var(--muted); }
.k-drive-here { font-weight: 600; }
.k-drive-chips { align-items: center; margin-bottom: 18px; }
.k-drive-chips select.k-chip { border-radius: var(--r-sm); font-weight: 500; padding-right: 8px; cursor: pointer; }
.k-drive-chips select.k-chip[aria-current="true"] { background: var(--go-soft); border-color: var(--blue-line); color: var(--go-soft-ink); font-weight: 600; }
.k-drive-chips .k-grow { flex: 1; }
.k-drive-view { display: inline-flex; align-items: center; gap: 0; min-height: var(--tap); padding: 0; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--muted); cursor: pointer; overflow: hidden; }
.k-drive-view svg { box-sizing: content-box; padding: 11px 14px; }
.k-drive-view svg:first-child { background: var(--go-soft); color: var(--go-soft-ink); }
.is-list-on .k-drive-view svg:first-child { background: transparent; color: var(--muted); }
.is-list-on .k-drive-view svg:last-child { background: var(--go-soft); color: var(--go-soft-ink); }
.k-drive-h { margin: 0 0 10px; font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.k-drive-n { font-weight: 400; font-size: var(--t-xs); color: var(--muted); }
.k-drive-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 22px; }
.k-drive-folder { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: var(--r-md); background: var(--soft); border: 1px solid transparent; color: var(--ink); text-decoration: none; font-size: var(--t-sm); font-weight: 500; }
.k-drive-folder:hover { background: var(--go-soft); color: var(--go-soft-ink); }
.k-drive-ico { flex: none; color: var(--muted); }
.k-drive-folder:hover .k-drive-ico { color: inherit; }
.k-drive-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.k-drive-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.k-drive-cols { display: none; }
.k-drive-file { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; padding: 10px; min-width: 0; border: 1px solid transparent; border-radius: var(--r-md); background: var(--soft); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.k-drive-file:hover { background: var(--go-soft); }
.k-drive-file:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.k-drive-file-name { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 28px; font-size: var(--t-sm); font-weight: 500; }
.k-drive-type { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 22px; border-radius: 4px; font-size: 9px; font-weight: 800; letter-spacing: .02em; background: var(--blue-bg); color: var(--blue-ink); }
.k-drive-type.is-pdf { background: var(--red-bg); color: var(--red-ink); }
.k-drive-type.is-img { background: var(--amber-bg); color: var(--amber-ink); }
.k-drive-type.is-sheet { background: var(--green-bg); color: var(--green-ink); }
.k-drive-type.is-mail { background: var(--grey-bg); color: var(--grey-ink); font-size: 12px; }
.k-drive-thumb { display: flex; align-items: center; justify-content: center; height: 132px; border-radius: var(--r-sm); background: var(--card); overflow: hidden; }
.k-drive-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.k-drive-sheet { display: grid; gap: 7px; align-content: start; width: 84px; height: 104px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 3px; font-size: 9px; color: var(--muted); overflow: hidden; }
.k-drive-sheet i { display: block; border-top: 2px solid var(--line); }
.k-drive-sheet i:nth-child(2) { width: 80%; } .k-drive-sheet i:nth-child(4) { width: 60%; }
.k-drive-sheet b { font-weight: 600; margin-top: 4px; line-height: 1.2; }
.k-drive-where, .k-drive-size { display: none; }
.k-drive-date { font-size: var(--t-xs); color: var(--muted); }
.k-drive-status { display: none; }
.k-drive-status.is-red, .k-drive-status.is-amber { display: flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 600; grid-row: 3; justify-self: end; grid-column: 1; }
.k-drive-status.is-red { color: var(--red-ink); } .k-drive-status.is-amber { color: var(--amber-ink); }
.k-drive-file .k-drive-date { grid-row: 3; grid-column: 1; }
/* list view: one line a file, as Drive's list */
.k-drive-files.is-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
.k-drive-files.is-list .k-drive-cols, .k-drive-files.is-list .k-drive-file { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.6fr) 104px 72px 132px; grid-template-rows: none; align-items: center; gap: 12px; padding: 0 12px; }
.k-drive-files.is-list .k-drive-cols { min-height: 40px; font-size: var(--t-xs); font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.k-drive-files.is-list .k-drive-file { min-height: 52px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.k-drive-files.is-list .k-drive-file:hover { background: var(--soft); }
.k-drive-files.is-list .k-drive-thumb { display: none; }
.k-drive-files.is-list .k-drive-where, .k-drive-files.is-list .k-drive-size, .k-drive-files.is-list .k-drive-status { display: flex; align-items: center; gap: 6px; grid-row: auto; grid-column: auto; justify-self: start; font-size: var(--t-xs); font-weight: 400; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-drive-files.is-list .k-drive-where { display: block; }
.k-drive-files.is-list .k-drive-date { grid-row: auto; grid-column: auto; }
.k-drive-files.is-list .k-drive-status.is-red { color: var(--red-ink); font-weight: 600; } .k-drive-files.is-list .k-drive-status.is-amber { color: var(--amber-ink); font-weight: 600; }
@media (max-width: 760px) {
  .k-drive-folders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-drive-files { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-drive-thumb { height: 104px; }
  .k-drive-files.is-list .k-drive-cols, .k-drive-files.is-list .k-drive-file { grid-template-columns: minmax(0, 1fr) 92px; }
  .k-drive-files.is-list .k-drive-cols span:nth-child(2), .k-drive-files.is-list .k-drive-cols span:nth-child(4), .k-drive-files.is-list .k-drive-cols span:nth-child(5),
  .k-drive-files.is-list .k-drive-where, .k-drive-files.is-list .k-drive-size, .k-drive-files.is-list .k-drive-status { display: none; }
  .k-drive-top .k-btn-row { flex: 1 1 100%; }
}
.k-drive-chips select.k-chip { max-width: 170px; text-overflow: ellipsis; }
.k-drive-files.is-list .k-drive-where { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 1150px) and (min-width: 761px) {
  .k-drive-files.is-list .k-drive-cols, .k-drive-files.is-list .k-drive-file { grid-template-columns: minmax(0, 1fr) 104px 72px 132px; }
  .k-drive-files.is-list .k-drive-cols span:nth-child(2), .k-drive-files.is-list .k-drive-where { display: none; }
}
/* the date and "Needs an answer" each get their own line on a card (they sat on top of each other on his phone, 6 Nov) */
.k-drive-file { grid-template-rows: auto 1fr auto auto; }
.k-drive-status.is-red, .k-drive-status.is-amber { grid-row: 4; justify-self: start; }
.k-drive-files.is-list .k-drive-file { grid-template-rows: none; }
.k-drive-files.is-list .k-drive-status.is-red, .k-drive-files.is-list .k-drive-status.is-amber { grid-row: auto; }

/* Comms codes: rename in place — the name is editable, the code beside it is not (Peter, 7 Nov).
   The row WRAPS: the boxes sit beside the name when there is room and drop to their own line when
   there is not, so the name column is never squeezed until it reads one letter per line. */
.k-rows > li.k-row--named { flex-wrap: wrap; row-gap: 10px; }
.k-rows > li.k-row--named > .k-grow { flex: 1 1 260px; min-width: 220px; }
.k-row-rename { display: flex; gap: 8px; align-items: center; flex: 1 1 380px; min-width: 0; }
.k-row-rename input { flex: 1 1 140px; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: inherit; font: inherit; }
.k-row-rename .k-btn { white-space: nowrap; }

/* A project's conversation: five columns on a desk, stacked on a phone, so nothing is clipped
   (Peter, 7 Nov — same lesson as the code rows). */
@media (max-width: 1000px) {
  .k-drive-files.k-conv .k-drive-cols { display: none; }
  .k-drive-files.k-conv .k-drive-file {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name date" "from papers" "codes codes";
    row-gap: 2px; padding: 10px 12px; align-items: start;
  }
  .k-drive-files.k-conv .k-drive-file-name { grid-area: name; }
  .k-drive-files.k-conv .k-drive-date { grid-area: date; white-space: nowrap; }
  .k-drive-files.k-conv .k-drive-where:nth-of-type(1) { grid-area: from; }
  .k-drive-files.k-conv .k-drive-size { grid-area: papers; text-align: right; }
  .k-drive-files.k-conv .k-drive-where:last-child { grid-area: codes; font-size: var(--t-xs); color: var(--muted); }
}

/* A project's email threads: a closed row you open to read the messages (Peter, 7 Nov). */
.k-thread > details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.k-thread > details > summary::-webkit-details-marker { display: none; }
.k-thread > details > summary::before { content: "▸"; color: var(--muted); flex: 0 0 auto; }
.k-thread > details[open] > summary::before { content: "▾"; }
.k-thread > details > summary:hover .k-row-title { text-decoration: underline; }
.k-thread-head { min-width: 0; }
.k-thread > details > ul { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.k-thread .k-pill { margin: 4px 6px 0 0; display: inline-flex; align-items: center; gap: 5px; }

/* A project thread reads like the mail screen, but has no folder column — so the body takes the
   whole width instead of being squeezed into the folder track (Peter, 7 Nov). */
/* The project's own three panes: its conversations, the messages, the email. */
.k-mailnav-head { margin: 12px 12px 4px; font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
.k-projnav-top { padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.k-projnav-ref { display: block; font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; color: var(--go); text-decoration: none; }
.k-projnav-ref:hover { text-decoration: underline; }
.k-projnav-title { margin: 2px 0 0; font-weight: 600; line-height: 1.3; }
.k-mail-nav .k-mailnav-head { display: flex; align-items: center; justify-content: space-between; }
.k-mail-nav .k-mailnav-head span { font-weight: 600; color: var(--muted); }
.k-projnav { display: grid; grid-template-columns: minmax(0, 1fr); }
.k-projnav a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; min-height: var(--tap); min-width: 0;
  color: inherit; text-decoration: none; border-left: 3px solid transparent; border-bottom: 1px solid var(--line); }
.k-projnav a:last-child { border-bottom: 0; }
.k-projnav a:hover { background: var(--bg); }
.k-projnav a[aria-current] { background: var(--bg); border-left-color: var(--go); }
.k-projnav a[aria-current] .k-projnav-name { font-weight: 700; }
.k-avatar--sm { width: 28px; height: 28px; font-size: 11px; flex: 0 0 auto; }
.k-projnav-body { min-width: 0; flex: 1; }
.k-projnav-top-line { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.k-projnav-name { min-width: 0; font-size: var(--t-sm); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-projnav-when { flex: 0 0 auto; margin-left: auto; color: var(--muted); font-size: var(--t-xs);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-projnav-sub { display: flex; gap: 6px; align-items: center; margin-top: 3px;
  color: var(--muted); font-size: var(--t-xs); white-space: nowrap; }
/* The sender gives way, the date never does — he reads this column by date (Peter, 8 Nov). */
.k-projnav-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.k-projnav a[aria-current] .k-projnav-when { color: var(--ink); font-weight: 700; }
.k-projnav-n { flex: 0 0 auto; align-self: center; min-width: 20px; padding: 1px 6px; border-radius: 999px;
  background: var(--line); color: var(--muted); font-size: var(--t-xs); font-weight: 700; text-align: center; }
.k-projnav a[aria-current] .k-projnav-n { background: var(--go); color: #fff; }
.k-projnav .k-dot { margin-top: 5px; flex: 0 0 auto; }

/* THE TRAIL — a project read head to toe (Peter, 7 Nov).
   The side colour says which thread, so a change of subject is visible while scrolling. It is a
   separate set of hues on purpose: red, amber and green mean STATUS everywhere in GO (Bible 96). */
.k-trail { display: grid; gap: 10px; margin-top: 12px; }
.k-trail-month { position: sticky; top: 0; z-index: 2; margin: 14px 0 2px; padding: 6px 12px;
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: var(--bg); border-radius: var(--r-sm); }
.k-trail-item { position: relative; background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--trail, var(--line)); border-radius: var(--r-sm); padding: 12px 14px; }
.k-trail-item header { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.k-trail-item header b { font-size: var(--t-md); }
.k-trail-item header time { color: var(--muted); font-size: var(--t-xs); white-space: nowrap; }
.k-trail-subject { margin: 2px 0 8px; color: var(--muted); font-size: var(--t-sm); }
.k-trail-said { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.k-trail-quoted { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 10px; padding: 10px 12px;
  border-left: 3px solid var(--line); color: var(--muted); font-size: var(--t-sm); max-height: 420px; overflow: auto; }
.k-trail-papers, .k-trail-tools { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.k-trail-mark { display: flex; gap: 10px; align-items: center; padding: 10px 14px;
  background: var(--tint, var(--card)); border: 1px dashed var(--line); border-radius: var(--r-sm); }
.k-trail-mark small { display: block; color: var(--muted); font-size: var(--t-xs); }
.k-trail-item.is-h0 { --trail: #3b82f6; } .k-trail-item.is-h1 { --trail: #8b5cf6; }
.k-trail-item.is-h2 { --trail: #0ea5e9; } .k-trail-item.is-h3 { --trail: #d946ef; }
.k-trail-item.is-h4 { --trail: #6366f1; } .k-trail-item.is-h5 { --trail: #14b8a6; }
.k-trail-item.is-h6 { --trail: #f97316; } .k-trail-item.is-h7 { --trail: #64748b; }

/* THE TRAIL, by conversation (Peter, 8 Nov): a band names each conversation, a clear gap sits between
   them, and inside it the messages read like mail. */
.k-trail { display: grid; gap: 26px; margin-top: 12px; }
.k-conv { background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--trail, var(--line)); border-radius: var(--r-sm); overflow: hidden; }
.k-conv > details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--bg); }
.k-conv > details > summary::-webkit-details-marker { display: none; }
.k-conv > details > summary::before { content: "▸"; color: var(--muted); flex: 0 0 auto; }
.k-conv > details[open] > summary::before { content: "▾"; }
.k-conv > details > summary:hover b { text-decoration: underline; }
.k-conv-head { min-width: 0; }
.k-conv-head b { display: block; font-size: var(--t-md); }
.k-conv-head small { display: block; color: var(--muted); font-size: var(--t-xs); margin-top: 2px; }
.k-conv-mail { padding: 4px 0; }
.k-mailblock { display: flex; gap: 12px; padding: 14px; border-top: 1px solid var(--line); }
.k-mailblock:first-child { border-top: 0; }
.k-mailblock-body { min-width: 0; flex: 1; }
.k-mailblock header { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.k-mailblock header time { color: var(--muted); font-size: var(--t-xs); white-space: nowrap; }
@media (max-width: 620px) {
  .k-mailblock header { flex-wrap: wrap; }
  .k-mailblock > .k-avatar { display: none; }
}

/* An email read inside a project: it lives in someone else's mailbox, so the one honest action is to go
   there (Peter, 8 Nov — "you can't reply to Jim at Spyco ... get rid of all that can't reply"). */
.k-inproject { align-items: center; gap: 10px; flex-wrap: wrap; }
.k-inproject-who { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--t-sm); }
.k-inproject-who b { color: var(--ink); }
.k-inproject form { margin: 0; }

/* ── PROJECT TABS: a top row and a quieter second row (Peter, 8 Nov) ──────────
   The first try put Money and More behind drop-downs. The strip scrolls sideways, so it clipped
   them and he could not open either one — "I can't see the drop downs... I can't use it". Nothing
   is hidden now: the secondary screens are simply smaller and sit underneath, under their heading. */
.k-subtabs { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: -8px 0 16px; padding: 0 6px; }
.k-subtabs-group { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.k-subtabs-head { margin-right: 6px; font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
.k-subtabs a { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: var(--r-sm);
  color: var(--muted); text-decoration: none; font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.k-subtabs a:hover { background: var(--soft); color: var(--ink); }
.k-subtabs a[aria-current] { background: var(--go-soft); color: var(--go-soft-ink); }

/* ── THE SCHEDULE ─────────────────────────────────────────────────────────── */
.k-cardhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.k-cardhead h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.k-mstone { margin-top: 12px; }
.k-pillword { flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; font-size: var(--t-xs); font-weight: 700; }
.k-pillword.is-green { background: var(--green-bg, #e6f5ec); color: var(--green-ink, #146c38); }
.k-pillword.is-amber { background: var(--amber-bg, #fdf1dd); color: var(--amber-ink, #8a5a00); }
.k-pillword.is-red { background: var(--red-bg, #fdeaea); color: var(--red-ink, #99201c); }
.k-pillword.is-grey { background: var(--line); color: var(--muted); }
.k-mstone-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px;
  margin: 12px 0; padding: 12px; background: var(--bg); border-radius: var(--r-sm); }
.k-mstone-dates dt { font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
.k-mstone-dates dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.k-slip { margin-left: 6px; font-size: var(--t-xs); font-weight: 700; }
.k-slip.is-red { color: var(--red-ink, #99201c); }
.k-slip.is-green { color: var(--green-ink, #146c38); }
.k-mstone-go { margin: 10px 0 0; }
.k-mstone-go a { display: inline-flex; align-items: center; gap: 6px; }

/* ── PROJECT DOCUMENTS ────────────────────────────────────────────────────── */
.k-docsearch { margin: 12px 0; }
.k-tablewrap { overflow-x: auto; }
.k-papers { width: 100%; border-collapse: collapse; }
.k-papers th, .k-papers td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.k-papers th { font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.k-papers td { font-size: var(--t-sm); }
.k-papers td:nth-child(4), .k-papers td:nth-child(5), .k-papers td:nth-child(6) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.k-btn--sm { padding: 5px 10px; min-height: 0; font-size: var(--t-xs); }

/* Which milestone a conversation sits under — set from the conversation itself (Peter, 8 Nov). */
.k-convmark { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.k-convmark select { max-width: 260px; padding: 6px 8px; font-size: var(--t-xs);
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); }
.k-mailnav-note { margin: 10px 12px; padding: 8px 10px; background: var(--bg);
  border-radius: var(--r-sm); font-size: var(--t-xs); color: var(--muted); }
.k-mail-nav .k-mailnav-head .k-dot { margin-right: 6px; }

@media (max-width: 850px) {
  .k-convmark { margin-left: 0; width: 100%; }
  .k-convmark select { max-width: none; width: 100%; }
  .k-mstone-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-subtabs { gap: 6px 14px; }
}

/* ── THE TIMELINE (Peter, 8 Nov — built from the demo he sent through) ────────
   Every job on one chart. A project is a band he can fold shut; a milestone is a bar from what
   was promised to what actually happened, so a slip reads as a long bar, not a date to work out.
   Picking one opens what sits under it beside the chart — on a phone, up from the bottom. */
.k-tl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.k-tl-zoom { display: inline-flex; gap: 2px; }
.k-tl-zoom .k-btn[aria-pressed="true"], .k-tl-tools .k-btn.is-on { background: var(--go-soft); color: var(--go-soft-ink); }
.k-tl-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.k-tl-layout.is-open { grid-template-columns: minmax(0, 1fr) 360px; }
.k-tl-card { padding: 0; overflow: hidden; }
.k-tl-scroll { overflow: auto; }
.k-tl { min-width: 760px; }

.k-tl-row { display: grid; grid-template-columns: 260px minmax(460px, 1fr);
  min-height: 46px; border-bottom: 1px solid var(--line); }
.k-tl-row:last-child { border-bottom: 0; }
.k-tl-row.is-head { min-height: 34px; background: var(--bg); font-size: var(--t-xs); color: var(--muted); }
.k-tl-row.is-band { background: var(--bg); }
.k-tl-name { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; min-width: 0; background: var(--card); color: inherit; text-align: left;
  border: 0; border-right: 1px solid var(--line); font: inherit; font-size: var(--t-sm); }
.k-tl-row.is-head .k-tl-name, .k-tl-row.is-band .k-tl-name { background: var(--bg); font-weight: 700; }
button.k-tl-name { cursor: pointer; }
button.k-tl-name:hover { background: var(--soft); }
button.k-tl-name[aria-pressed="true"] { background: var(--go-soft); color: var(--go-soft-ink); }
.k-tl-caret { flex: 0 0 auto; color: var(--muted); }
.k-tl-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 400; color: var(--muted); font-size: var(--t-xs); }
.k-tl-name > :not(.k-tl-sub) { flex: 0 0 auto; }

.k-tl-track { position: relative; min-width: 0; }
.k-tl-head { position: absolute; top: 9px; transform: translateX(-50%); white-space: nowrap; }
.k-tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--go);
  opacity: .5; pointer-events: none; }
.k-tl-nowkey { display: inline-block; width: 2px; height: 12px; background: var(--go); opacity: .6; }
.k-tl-bar { position: absolute; top: 50%; transform: translateY(-50%); min-width: 18px; height: 44px;
  padding: 0; border: 0; background: transparent; cursor: pointer; }
.k-tl-bar i { display: block; height: 15px; margin-top: 14px; border-radius: 5px; background: var(--tone); }
.k-tl-bar.is-green { --tone: var(--green-ink, #16a34a); }
.k-tl-bar.is-amber { --tone: var(--amber-ink, #d08a1e); }
.k-tl-bar.is-red { --tone: var(--red-ink, #dc2626); }
.k-tl-bar.is-grey { --tone: var(--muted); }
.k-tl-bar:hover i { filter: brightness(1.12); }
.k-tl-bar[aria-pressed="true"] i { outline: 2px solid var(--ink); outline-offset: 2px; }
.k-tl-off { position: absolute; top: 50%; left: 10px; transform: translateY(-50%); color: var(--muted); font-size: var(--t-xs); }

.k-tl-panel { position: sticky; top: 12px; max-height: calc(100vh - 90px); overflow: auto; padding: 14px 16px 18px; }
.k-tl-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.k-tl-panel-head h2 { display: flex; align-items: center; gap: 8px; margin: 4px 0 2px; font-size: var(--t-lg); }
.k-tl-dates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin: 12px 0; padding: 10px; background: var(--bg); border-radius: var(--r-sm); }
.k-tl-dates dt { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.k-tl-dates dd { margin: 2px 0 0; font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.k-tl-drawer { border-top: 1px solid var(--line); padding: 8px 0; }
.k-tl-drawer > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: center; padding: 6px 0; font-weight: 700; font-size: var(--t-sm); }
.k-tl-drawer > summary::-webkit-details-marker { display: none; }
.k-tl-drawer > summary span { padding: 1px 8px; border-radius: 999px; background: var(--line);
  color: var(--muted); font-size: var(--t-xs); }
.k-tl-item { display: flex; align-items: center; gap: 8px; padding: 8px 6px; min-height: var(--tap);
  color: inherit; text-decoration: none; border-radius: var(--r-sm); font-size: var(--t-sm); }
a.k-tl-item:hover { background: var(--bg); }
.k-tl-item small { flex: 0 0 auto; color: var(--muted); font-size: var(--t-xs); }
.k-tl-item .k-grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-tl-panel-go { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }

@media (max-width: 900px) {
  .k-tl-layout.is-open { grid-template-columns: minmax(0, 1fr); }
  .k-tl-row { grid-template-columns: 150px minmax(420px, 1fr); }
  .k-tl-panel { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; top: auto;
    max-height: 76vh; border-radius: var(--r-md) var(--r-md) 0 0; box-shadow: 0 -8px 36px rgba(0,0,0,.22); }
  .k-tl-dates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media print {
  .k-side, .k-top, .k-tl-tools, .k-tl-panel, .k-back, .k-head-actions { display: none !important; }
  .k-tl-scroll { overflow: visible; }
  .k-tl { min-width: 0; }
  .k-tl-card { border: 0; }
}

/* A milestone with no date yet is still reachable from the chart (Peter, 8 Nov). */
.k-tl-nodate { position: absolute; top: 50%; left: 10px; transform: translateY(-50%);
  min-height: var(--tap); padding: 0 10px; background: transparent; border: 1px dashed var(--line);
  border-radius: var(--r-sm); color: var(--muted); font: inherit; font-size: var(--t-xs); cursor: pointer; }
.k-tl-nodate:hover { border-color: var(--go); color: var(--ink); }
.k-tl-nodate[aria-pressed="true"] { border-style: solid; border-color: var(--go); color: var(--ink); }

/* ── FOUR LOOKS, ONE CHART (Peter, 8 Nov: "can I have all of them?") ─────────
   He and Jim read a chart differently, so the look is the person's and is saved against them.
   Whichever is on, clicking anything opens the same panel. */
.k-tl-looks, .k-tl-when { display: inline-flex; gap: 2px; }
.k-tl-looks .k-btn[aria-pressed="true"], .k-tl-when .k-btn[aria-pressed="true"] { background: var(--go-soft); color: var(--go-soft-ink); }
.k-face { flex: 0 0 auto; display: inline-grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700; font-style: normal;
  border: 2px solid var(--card); }

/* LANES — soft bars, no grid lines, months as pale bands. */
.k-lanes { position: relative; min-width: 720px; padding: 0 14px 12px; }
.k-lanes-head { position: relative; height: 24px; margin-left: 34px; font-size: var(--t-xs); color: var(--muted); }
.k-lanes-head span { position: absolute; top: 6px; padding-left: 4px; white-space: nowrap; }
.k-lanes-body { position: relative; margin-left: 34px; }
.k-lanes-band { position: absolute; top: 0; bottom: 0; background: var(--bg); pointer-events: none; }
.k-lanes-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--go); opacity: .45; pointer-events: none; }
.k-lane { position: relative; height: 42px; }
.k-lane > .k-face { position: absolute; left: -34px; top: 9px; }
.k-lane-bar { position: absolute; top: 7px; height: 28px; min-width: 28px; border: 0; border-radius: 14px;
  display: flex; align-items: center; padding: 0 12px; cursor: pointer; font: inherit; font-size: var(--t-xs);
  font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.k-lane-bar.is-green { background: var(--green-ink, #16a34a); }
.k-lane-bar.is-amber { background: var(--amber-ink, #d08a1e); }
.k-lane-bar.is-red { background: var(--red-ink, #dc2626); }
.k-lane-bar.is-grey { background: var(--muted); }
.k-lane-bar.is-tiny { width: 28px; padding: 0; }
.k-lane-bar:hover { filter: brightness(1.1); }
.k-lane-bar[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.k-lane-label { position: absolute; top: 13px; border: 0; background: transparent; padding: 0; cursor: pointer;
  font: inherit; font-size: var(--t-xs); color: var(--ink); white-space: nowrap; }
.k-lane-label:hover { text-decoration: underline; }
.k-lane-out { position: absolute; top: 12px; left: 0; border: 0; background: transparent; padding: 0;
  color: var(--muted); font: inherit; font-size: var(--t-xs); }
.k-lane-out.is-click { cursor: pointer; }
.k-lane-out.is-click:hover { color: var(--ink); text-decoration: underline; }
.k-lane.is-band { height: auto; padding: 10px 0 2px; }
.k-lane-band { border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit;
  font-weight: 700; font-size: var(--t-sm); color: var(--ink); }

/* SPINE — vertical, dates down the left, never scrolls sideways. */
.k-spine { display: grid; grid-template-columns: 104px 24px minmax(0, 1fr); gap: 0 10px; padding: 8px 14px 14px; }
.k-spine-band { grid-column: 1 / -1; padding: 12px 0 4px; }
.k-spine-band button { border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit;
  font-weight: 700; color: var(--ink); }
.k-spine-when { text-align: right; padding-top: 16px; color: var(--muted); font-size: var(--t-xs);
  font-variant-numeric: tabular-nums; }
.k-spine-rail { position: relative; }
.k-spine-rail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  margin-left: -1px; background: var(--line); }
.k-spine-rail .k-dot { position: absolute; left: 50%; top: 20px; transform: translateX(-50%);
  width: 11px; height: 11px; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.k-spine-item { border: 0; background: transparent; font: inherit; color: inherit; text-align: left;
  cursor: pointer; width: 100%; padding: 10px 12px; margin: 3px 0; border-radius: var(--r-sm); }
.k-spine-item:hover { background: var(--bg); }
.k-spine-item[aria-pressed="true"] { background: var(--go-soft); }
.k-spine-top { display: flex; align-items: center; gap: 8px; }
.k-spine-top b { font-size: var(--t-sm); }
.k-spine-slip { display: block; width: 200px; max-width: 100%; height: 6px; margin-top: 7px;
  border-radius: 99px; background: var(--line); position: relative; }
.k-spine-slip i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.k-spine-item small { display: block; margin-top: 5px; color: var(--muted); font-size: var(--t-xs); }

/* MONTHS — months as columns, milestones as cards. */
.k-months { display: flex; gap: 10px; padding: 12px 14px 14px; min-width: 740px; }
.k-months-col { flex: 1 0 150px; background: var(--bg); border-radius: var(--r-sm); padding: 8px; }
.k-months-col.is-now { outline: 2px solid var(--go); }
.k-months-col h3 { margin: 2px 0 8px; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.k-months-card { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--muted);
  background: var(--card); border-radius: var(--r-sm); padding: 8px 10px; margin-bottom: 6px;
  cursor: pointer; font: inherit; }
.k-months-card.is-green { border-left-color: var(--green-ink, #16a34a); }
.k-months-card.is-amber { border-left-color: var(--amber-ink, #d08a1e); }
.k-months-card.is-red { border-left-color: var(--red-ink, #dc2626); }
.k-months-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.k-months-card[aria-pressed="true"] { outline: 2px solid var(--go); }
.k-months-card b { display: block; font-size: var(--t-xs); line-height: 1.35; }
.k-months-card span { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.k-months-card .k-face { width: 20px; height: 20px; font-size: 9px; }
.k-months-card small { color: var(--muted); font-size: 10px; }

/* GRID — the tight traditional one. */
.k-grid { min-width: 820px; font-size: var(--t-xs); }
.k-grid-row { display: grid; grid-template-columns: 230px 110px 78px 78px minmax(0, 1fr);
  align-items: center; min-height: 32px; border-bottom: 1px solid var(--line); }
.k-grid-row.is-head { background: var(--bg); color: var(--muted); min-height: 28px;
  letter-spacing: .04em; text-transform: uppercase; font-size: 10px; }
.k-grid-row.is-band { background: var(--bg); font-weight: 700; }
.k-grid-nm { display: flex; align-items: center; gap: 7px; padding: 5px 10px; min-width: 0;
  border: 0; background: transparent; color: inherit; font: inherit; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.k-grid-nm { cursor: pointer; }
button.k-grid-nm:hover { color: var(--go); }
button.k-grid-nm[aria-pressed="true"] { background: var(--go-soft); color: var(--go-soft-ink); }
.k-grid-dt { display: flex; align-items: center; gap: 6px; padding: 4px 8px; color: var(--muted);
  font-variant-numeric: tabular-nums; }
.k-grid-dt .k-face { width: 20px; height: 20px; font-size: 9px; }
.k-grid-tr { position: relative; height: 32px; }
.k-grid-row.is-head .k-grid-tr span { position: absolute; top: 8px; padding-left: 4px; white-space: nowrap; }
.k-grid-bar { position: absolute; top: 11px; height: 10px; min-width: 8px; border: 0; border-radius: 3px;
  padding: 0; cursor: pointer; }
.k-grid-bar.is-green { background: var(--green-ink, #16a34a); }
.k-grid-bar.is-amber { background: var(--amber-ink, #d08a1e); }
.k-grid-bar.is-red { background: var(--red-ink, #dc2626); }
.k-grid-bar.is-grey { background: var(--muted); }

@media (max-width: 900px) {
  .k-spine { grid-template-columns: 78px 20px minmax(0, 1fr); }
}

/* ── THE SPREADSHEET LOOK (Peter, 8 Nov, holding up his Smartsheet template) ──
   Milestones are the grey group rows; their tasks sit under them numbered 1.1, 1.2, with the
   duration and how much is done. Zebra striping and a banded ruler, because the first attempt was
   "all white and whatever else" and he could not read it. */
.k-gantt-sheet { min-width: 940px; font-size: var(--t-xs); }
.k-gantt-row { display: grid; grid-template-columns: 300px 108px 84px 84px 56px 96px minmax(0, 1fr);
  align-items: center; min-height: 30px; border-bottom: 1px solid var(--line); }
.k-gantt-row:nth-of-type(even) { background: var(--bg); }
.k-sheet-head { position: sticky; top: 0; z-index: 3; background: var(--card); }
.k-gantt-row.is-head { background: var(--bg); color: var(--muted); min-height: 26px;
  font-size: 10px; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; }
.k-gantt-row.is-big { min-height: 22px; background: var(--card); border-bottom: 0; }
.k-gantt-row.is-group { background: color-mix(in srgb, var(--line) 45%, transparent); font-weight: 600; }
.k-gantt-row.is-project { background: var(--bg); font-weight: 700; }
.k-gantt-row.is-task .k-sheet-nm { padding-left: 26px; }
.k-sheet-nm { display: flex; align-items: center; gap: 7px; padding: 5px 10px; min-width: 0;
  border: 0; background: transparent; color: inherit; font: inherit; text-align: left;
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.k-sheet-nm, a.k-sheet-nm { cursor: pointer; }
button.k-sheet-nm:hover, a.k-sheet-nm:hover { color: var(--go); }
button.k-sheet-nm[aria-pressed="true"] { background: var(--go-soft); color: var(--go-soft-ink); }
.k-sheet-wbs { flex: 0 0 auto; min-width: 26px; color: var(--muted); font-variant-numeric: tabular-nums; }
.k-sheet-dt { display: flex; align-items: center; gap: 6px; padding: 4px 8px; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-sheet-dt .k-face { width: 20px; height: 20px; font-size: 9px; }
.k-sheet-tr { position: relative; height: 30px; border-left: 1px solid var(--line); }
.k-sheet-tick { position: absolute; top: 7px; padding-left: 5px; white-space: nowrap; overflow: hidden;
  border-left: 1px solid var(--line); height: 16px; }
.k-gantt-row:not(.is-head):not(.is-big) .k-sheet-tr { background:
  repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--ticks, 14) - 1px),
    var(--line) calc(100% / var(--ticks, 14) - 1px) calc(100% / var(--ticks, 14))); }
.k-sheet-phase { position: absolute; top: 2px; height: 18px; line-height: 18px; text-align: center;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff;
  border-radius: 3px; overflow: hidden; }
.k-sheet-phase.p0 { background: #1f4d7a; } .k-sheet-phase.p1 { background: #2f7368; }
.k-sheet-phase.p2 { background: #8a5a1e; }
.k-sheet-bar { position: absolute; top: 10px; height: 10px; min-width: 8px; border: 0; border-radius: 3px;
  padding: 0; cursor: pointer; }
.k-sheet-bar.is-green { background: var(--green-ink, #16a34a); }
.k-sheet-bar.is-amber { background: var(--amber-ink, #d08a1e); }
.k-sheet-bar.is-red { background: var(--red-ink, #dc2626); }
.k-sheet-bar.is-grey { background: var(--muted); }
.k-sheet-bar.is-task { top: 13px; height: 6px; opacity: .72; cursor: default; }
.k-pct { position: relative; display: block; width: 76px; height: 16px; border-radius: 3px;
  background: var(--line); overflow: hidden; }
.k-pct i { position: absolute; left: 0; top: 0; bottom: 0; }
.k-pct.is-full i { background: color-mix(in srgb, var(--green-ink, #16a34a) 55%, transparent); }
.k-pct.is-part i { background: color-mix(in srgb, var(--amber-ink, #d08a1e) 55%, transparent); }
.k-pct b { position: relative; display: block; text-align: center; line-height: 16px;
  font-size: 10px; font-weight: 700; color: var(--ink); }

/* Bar labels and foldable milestone groups — the two things worth taking from the Bryntum
   portfolio demo Peter sent through (8 Nov). The name sits beside its bar, and a milestone with
   tasks under it folds shut on its own caret. */
.k-sheet-say { position: absolute; top: 7px; white-space: nowrap; pointer-events: none;
  font-size: 11px; color: var(--ink); }
.k-sheet-say.is-task { color: var(--muted); }
.k-sheet-span { position: absolute; top: 7px; height: 16px; border-radius: 3px;
  background: color-mix(in srgb, var(--muted) 18%, transparent);
  border-left: 3px solid color-mix(in srgb, var(--muted) 55%, transparent);
  border-right: 3px solid color-mix(in srgb, var(--muted) 55%, transparent); }
.k-sheet-fold { flex: 0 0 auto; width: 14px; text-align: center; color: var(--muted); cursor: pointer; }
.k-sheet-fold:hover { color: var(--ink); }
.k-sheet-fold.is-none { cursor: default; }
.k-sheet-count { flex: 0 0 auto; margin-left: 6px; padding: 0 6px; border-radius: 999px;
  background: var(--line); color: var(--muted); font-size: 10px; font-weight: 700; }

/* ── THE CHART'S OWN COLOURS (Peter, 8 Nov: "it's visually hard to read where it is red") ────
   One set of tones for every look, each with a solid bar colour, a readable ink and a wash to sit
   behind it. The old reds were a thin mid-red on white with nothing behind them. */
.k-tl-layout, .k-tl-card {
  --t-green: #15803d; --t-green-ink: #0f5f2e; --t-green-wash: #e8f5ec;
  --t-amber: #b45309; --t-amber-ink: #8a4208; --t-amber-wash: #fcf1e3;
  --t-red:   #b3261e; --t-red-ink:   #8c1d18; --t-red-wash:   #fbe9e7;
  --t-grey:  #6b7580; --t-grey-ink:  #4e5760; --t-grey-wash:  #eef1f4;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .k-tl-layout, :root:not([data-theme="light"]) .k-tl-card {
    --t-green: #3fbd6b; --t-green-ink: #7ddba1; --t-green-wash: #11301f;
    --t-amber: #e0952f; --t-amber-ink: #f0bd73; --t-amber-wash: #33260f;
    --t-red:   #ef5350; --t-red-ink:   #ff9b97; --t-red-wash:   #3a1715;
    --t-grey:  #8a94a0; --t-grey-ink:  #aeb7c1; --t-grey-wash:  #1d232b;
  }
}
:root[data-theme="dark"] .k-tl-layout, :root[data-theme="dark"] .k-tl-card {
  --t-green: #3fbd6b; --t-green-ink: #7ddba1; --t-green-wash: #11301f;
  --t-amber: #e0952f; --t-amber-ink: #f0bd73; --t-amber-wash: #33260f;
  --t-red:   #ef5350; --t-red-ink:   #ff9b97; --t-red-wash:   #3a1715;
  --t-grey:  #8a94a0; --t-grey-ink:  #aeb7c1; --t-grey-wash:  #1d232b;
}

/* ── SPREADSHEET, rebuilt to read like the portfolio chart he sent (8 Nov) ───
   Taller rows with air in them, a real chevron in its own cell, the bar carrying its own progress
   fill, and a milestone with no duration drawn as a diamond instead of a sliver. */
.k-gantt-row { grid-template-columns: 330px 112px 86px 86px 72px 54px minmax(0, 1fr); min-height: 38px; }
.k-gantt-row.is-head { min-height: 30px; }
.k-gantt-row.is-big { min-height: 24px; }
.k-gantt-row:nth-of-type(even) { background: transparent; }
.k-gantt-row:not(.is-head):not(.is-big):hover { background: var(--bg); }
.k-gantt-row.is-group { background: transparent; border-bottom: 1px solid var(--line); font-weight: 400; }
.k-gantt-row.is-group .k-sheet-title { font-weight: 700; }
.k-gantt-row.tone-red { background: var(--t-red-wash); }
.k-gantt-row.tone-red:hover { background: color-mix(in srgb, var(--t-red-wash) 80%, var(--ink) 4%); }
.k-gantt-row.tone-amber.is-group { background: color-mix(in srgb, var(--t-amber-wash) 60%, transparent); }

.k-sheet-nm { gap: 6px; padding: 5px 10px 5px 8px; }
.k-gantt-row.is-task .k-sheet-nm { padding-left: 30px; }
.k-sheet-wbs { min-width: 34px; font-size: 11px; }
.k-sheet-fold { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px;
  padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted);
  cursor: pointer; transition: transform .12s; }
.k-sheet-fold:hover { background: var(--line); color: var(--ink); }
.k-sheet-fold[aria-expanded="false"] svg { transform: rotate(-90deg); }
.k-sheet-fold.is-none { width: 22px; cursor: default; }
.k-sheet-kind { flex: 0 0 auto; width: 13px; height: 13px; border-radius: 3px; background: var(--t-grey); }
.k-sheet-kind.is-green { background: var(--t-green); } .k-sheet-kind.is-amber { background: var(--t-amber); }
.k-sheet-kind.is-red { background: var(--t-red); }
.k-sheet-kind.is-dot { width: 9px; height: 9px; border-radius: 50%; margin: 0 2px; }
.k-sheet-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 0; background: transparent; padding: 0; font: inherit; color: inherit; text-align: left;
  text-decoration: none; cursor: pointer; }
.k-sheet-title:hover { color: var(--go); text-decoration: underline; }
button.k-sheet-title[aria-pressed="true"] { color: var(--go); text-decoration: underline; }
.k-sheet-dt.is-num { justify-content: flex-end; }
.k-sheet-tr { height: 38px; }
.k-gantt-row.is-head .k-sheet-tr { height: 30px; }

.k-sheet-bar { top: 12px; height: 15px; border-radius: 4px; overflow: hidden; }
.k-sheet-bar.is-green { background: color-mix(in srgb, var(--t-green) 36%, transparent); }
.k-sheet-bar.is-amber { background: color-mix(in srgb, var(--t-amber) 36%, transparent); }
.k-sheet-bar.is-red { background: color-mix(in srgb, var(--t-red) 36%, transparent); }
.k-sheet-bar.is-grey { background: color-mix(in srgb, var(--t-grey) 36%, transparent); }
.k-sheet-bar > i { display: block; height: 100%; border-radius: 4px 0 0 4px; }
.k-sheet-bar.is-green > i { background: var(--t-green); }
.k-sheet-bar.is-amber > i { background: var(--t-amber); }
.k-sheet-bar.is-red > i { background: var(--t-red); }
.k-sheet-bar.is-grey > i { background: var(--t-grey); }
.k-sheet-bar.is-task { top: 15px; height: 9px; opacity: 1; }
.k-sheet-pip { position: absolute; top: 12px; width: 15px; height: 15px; margin-left: -7px; padding: 0;
  border: 0; border-radius: 3px; transform: rotate(45deg); cursor: pointer; }
.k-sheet-pip.is-green { background: var(--t-green); } .k-sheet-pip.is-amber { background: var(--t-amber); }
.k-sheet-pip.is-red { background: var(--t-red); } .k-sheet-pip.is-grey { background: var(--t-grey); }
.k-sheet-say { top: 11px; font-size: 11.5px; }
.k-sheet-span { top: 14px; height: 11px; }
.k-sheet-tick { border-left: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.k-gantt-row:not(.is-head):not(.is-big) .k-sheet-tr { background:
  repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--ticks, 14) - 1px),
    color-mix(in srgb, var(--line) 55%, transparent) calc(100% / var(--ticks, 14) - 1px) calc(100% / var(--ticks, 14))); }

/* ── The same tones carried through the other three looks ──────────────────── */
.k-lane-bar.is-green { background: var(--t-green); }
.k-lane-bar.is-amber { background: var(--t-amber); }
.k-lane-bar.is-red   { background: var(--t-red); }
.k-lane-bar.is-grey  { background: var(--t-grey); }
.k-lane.tone-red { background: var(--t-red-wash); border-radius: var(--r-sm); }

.k-spine-item.tone-red { background: var(--t-red-wash); }
.k-spine-item.tone-red small { color: var(--t-red-ink); font-weight: 600; }
.k-spine-item.tone-red:hover { background: color-mix(in srgb, var(--t-red-wash) 82%, var(--ink) 5%); }
.k-spine-rail .k-dot.is-red { background: var(--t-red, var(--red)); }
.k-spine-rail .k-dot.is-green { background: var(--t-green); }
.k-spine-rail .k-dot.is-amber { background: var(--t-amber); }

.k-months-card.is-red { border-left-color: var(--t-red); background: var(--t-red-wash); }
.k-months-card.is-red small { color: var(--t-red-ink); font-weight: 600; }
.k-months-card.is-amber { border-left-color: var(--t-amber); background: color-mix(in srgb, var(--t-amber-wash) 60%, transparent); }
.k-months-card.is-green { border-left-color: var(--t-green); }

.k-dot.is-red { background: var(--t-red, var(--red)); }  /* --t-red only exists inside .k-tl-layout; everywhere else fall back to the Kit red */
.k-legend .k-dot.is-red { background: var(--t-red, var(--red)); }

/* ── PENNY NOTIFICATIONS (8 Nov): the phone chat beside the switches; on the phone the chat sits on top. ── */
.k-alerts-grid { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .k-alerts-grid { grid-template-columns: 420px minmax(0, 1fr); } .k-alerts-phone { position: sticky; top: 12px; } }
.k-alerts-chat { border-radius: 22px; overflow: hidden; background: var(--nav); box-shadow: var(--shadow); padding: 8px; }
.k-alerts-chat-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; color: var(--go-ink); }
.k-alerts-chat-head strong { display: block; font-size: var(--t-md); }
.k-alerts-chat-head span:last-child { font-size: var(--t-xs); opacity: .7; }
.k-alerts-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--go); color: var(--go-ink); font-weight: 800; }
.k-alerts-chat-body { background: var(--green-bg); border-radius: 16px; padding: 10px; max-height: min(620px, 62vh); overflow: auto; display: grid; gap: 8px; align-content: start; }
:root[data-theme="dark"] .k-alerts-chat-body { background: var(--nav-2); }
.k-alerts-day { justify-self: center; font-size: var(--t-xs); font-weight: 700; color: var(--go-ink); background: rgba(0,0,0,.28); border-radius: var(--r-pill); padding: 2px 10px; margin: 2px 0 4px; }
.k-alerts-bubble { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 8px; align-items: start; max-width: 92%; padding: 8px 10px 6px; border-radius: 14px 14px 14px 4px; background: var(--go-ink); color: var(--ink); box-shadow: 0 1px 1px rgba(0,0,0,.12); font-size: 15px; line-height: 1.35; }
:root[data-theme="dark"] .k-alerts-bubble { background: var(--nav-3); color: var(--go-ink); }
.k-alerts-bubble .k-dot { margin-top: 5px; }
.k-alerts-bubble p { margin: 0; overflow-wrap: anywhere; }
.k-alerts-time { display: block; text-align: right; font-size: 11px; color: var(--muted); margin-top: 2px; }
.k-alerts-open { grid-column: 1 / -1; display: block; text-align: center; margin: 4px -10px -6px; padding: 8px; border-top: 1px solid rgba(0,0,0,.08); color: var(--go); font-weight: 700; font-size: 14px; border-radius: 0 0 14px 4px; }
.k-alerts-quiet { display: flex; align-items: center; gap: 8px; justify-self: center; margin: 14px 0; padding: 8px 14px; border-radius: var(--r-pill); background: rgba(0,0,0,.28); color: var(--go-ink); font-weight: 600; font-size: var(--t-sm); }
.k-alerts-status { display: flex; align-items: center; gap: 8px; margin: 10px 6px 0; }
.k-alerts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.k-alerts-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); min-height: var(--tap); }
.k-alerts-row--big { border: 0; padding: 4px 2px; cursor: pointer; }
.k-alerts-row.is-off .k-alerts-words { opacity: .55; }
.k-alerts-words { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.k-alerts-words strong { display: flex; align-items: center; gap: 6px; font-size: var(--t-md); line-height: 1.25; }
.k-alerts-words > span { color: var(--muted); font-size: var(--t-sm); line-height: 1.3; }
.k-alerts-row > .k-btn--sm { flex: none; white-space: nowrap; min-height: 36px; }
@media (max-width: 480px) { .k-alerts-row { flex-wrap: wrap; } .k-alerts-row > .k-btn--sm { margin-left: calc(50px + 12px); } }
.k-alerts-group > h2 { flex-wrap: wrap; }
.k-alerts-group > h2 .k-alerts-all:first-of-type { margin-left: auto; }
#penny-alerts.is-quiet .k-alerts-group { opacity: .55; }
/* the switch: a real checkbox, drawn as a slider, 50×30, tap-sized */
.k-switch { position: relative; display: inline-flex; flex: none; width: 50px; height: 30px; cursor: pointer; }
.k-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.k-switch span { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--grey); transition: background .15s; }
.k-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--go-ink); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.k-switch input:checked + span { background: var(--green); }
.k-switch input:checked + span::after { transform: translateX(20px); }
.k-switch input:focus-visible + span { outline: 2px solid var(--focus, var(--go)); outline-offset: 2px; }

/* ════ THE CHART, GIVEN SOME LIFE (Peter, 8 Nov — third time of asking) ══════
   "It's a bit flat... still very white... Lanes is rubbish." Every look now has three things it
   did not: a tone WASH on every row, not just the red ones; real DEPTH — borders, soft shadows,
   rounded shells — instead of ink floating on white; and a left-hand side to read off. */

/* The splitter: drag where the table stops and the chart starts. */
.k-sheet-row { grid-template-columns: var(--sheet-nm, 330px) 112px 86px 86px 72px 54px minmax(0, 1fr); }
.k-sheet-grip { position: absolute; left: -5px; top: 0; bottom: 0; width: 11px; z-index: 4;
  border: 0; background: transparent; padding: 0; cursor: col-resize; }
.k-sheet-grip::after { content: ""; position: absolute; inset: 0 4px; border-radius: 2px;
  background: var(--go); opacity: 0; transition: opacity .15s; }
.k-sheet-grip:hover::after, .k-sheet-grip.is-dragging::after, .k-sheet-grip:focus-visible::after { opacity: .8; }

/* Every look sits in a shell with a bit of weight to it. */
.k-tl-card { background: var(--card); }
.k-sheet-head { box-shadow: 0 1px 0 var(--line), 0 6px 12px -10px rgba(0, 0, 0, .4); }
.k-sheet-row.is-head { background: color-mix(in srgb, var(--line) 55%, var(--card)); color: var(--ink); }
.k-sheet-row.tone-green { background: color-mix(in srgb, var(--t-green-wash) 48%, var(--card)); }
.k-sheet-row.tone-amber { background: color-mix(in srgb, var(--t-amber-wash) 62%, var(--card)); }
.k-sheet-row.tone-grey  { background: color-mix(in srgb, var(--t-grey-wash) 55%, var(--card)); }
.k-sheet-row.tone-red   { background: var(--t-red-wash); }
.k-sheet-row.is-task { background: var(--card); }
.k-sheet-row.is-task.tone-amber { background: color-mix(in srgb, var(--t-amber-wash) 34%, var(--card)); }
.k-sheet-row.is-task.tone-red { background: color-mix(in srgb, var(--t-red-wash) 55%, var(--card)); }
.k-sheet-bar { box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.k-sheet-pip { box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }

/* ── LANES, rebuilt ───────────────────────────────────────────────────────── */
.k-lanes { min-width: 760px; }
.k-lane-row { display: grid; grid-template-columns: var(--sheet-nm, 300px) minmax(0, 1fr);
  min-height: 46px; border-bottom: 1px solid var(--line); }
.k-lane-row.is-head { min-height: 32px; background: color-mix(in srgb, var(--line) 38%, var(--card));
  font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700;
  position: sticky; top: 0; z-index: 3; }
.k-lane-row.is-band { background: var(--bg); }
.k-lane-row.tone-green { background: color-mix(in srgb, var(--t-green-wash) 45%, var(--card)); }
.k-lane-row.tone-amber { background: color-mix(in srgb, var(--t-amber-wash) 60%, var(--card)); }
.k-lane-row.tone-grey  { background: color-mix(in srgb, var(--t-grey-wash) 50%, var(--card)); }
.k-lane-row.tone-red   { background: var(--t-red-wash); }
.k-lane-row:hover { filter: brightness(.985); }
.k-lane-nm { display: flex; align-items: center; gap: 9px; padding: 6px 12px; min-width: 0;
  border: 0; background: transparent; color: inherit; font: inherit; font-size: var(--t-sm);
  text-align: left; cursor: pointer; border-right: 1px solid var(--line); }
.k-lane-row.is-head .k-lane-nm { font: inherit; cursor: default; }
.k-lane-nm:hover .k-lane-title { color: var(--go); text-decoration: underline; }
.k-lane-nm[aria-pressed="true"] .k-lane-title { color: var(--go); font-weight: 700; }
.k-lane-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-lane-tr { position: relative; min-width: 0; background:
  repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--ticks, 12) - 1px),
    color-mix(in srgb, var(--line) 60%, transparent) calc(100% / var(--ticks, 12) - 1px) calc(100% / var(--ticks, 12))); }
.k-lane-row.is-head .k-lane-tr { background: none; }
.k-lane-tick { position: absolute; top: 10px; padding-left: 6px; white-space: nowrap; overflow: hidden;
  border-left: 1px solid var(--line); height: 14px; }
.k-lanes-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--go); opacity: .5; }
.k-lane-bar { position: absolute; top: 9px; height: 28px; min-width: 26px; border: 0; border-radius: 14px;
  display: flex; align-items: center; padding: 0 13px; cursor: pointer; font: inherit; font-size: 11px;
  font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .2); }
.k-lane-bar.is-tiny { width: 26px; padding: 0; }
.k-lane-bar:hover { filter: brightness(1.12); }
.k-lane-bar[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.k-lane-say { position: absolute; top: 15px; font-size: 11px; color: var(--ink); white-space: nowrap; pointer-events: none; }
.k-lane-out { position: absolute; top: 15px; left: 12px; color: var(--muted); font-size: var(--t-xs); }

/* ── SPINE, given a body ──────────────────────────────────────────────────── */
.k-spine-when { padding-top: 20px; }
.k-spine-when, .k-spine-rail { position: relative; }
.k-spine-item { margin: 6px 0; padding: 11px 13px; border: 1px solid var(--line);
  border-left: 4px solid var(--t-grey); border-radius: var(--r-sm); background: var(--card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.k-spine-item.tone-green { border-left-color: var(--t-green); background: color-mix(in srgb, var(--t-green-wash) 45%, var(--card)); }
.k-spine-item.tone-amber { border-left-color: var(--t-amber); background: color-mix(in srgb, var(--t-amber-wash) 60%, var(--card)); }
.k-spine-item.tone-red   { border-left-color: var(--t-red); background: var(--t-red-wash); }
.k-spine-item.tone-grey  { border-left-color: var(--t-grey); background: color-mix(in srgb, var(--t-grey-wash) 55%, var(--card)); }
.k-spine-item:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, .1); transform: translateY(-1px); }
.k-spine-item[aria-pressed="true"] { outline: 2px solid var(--go); }
.k-spine-item.tone-green small { color: var(--t-green-ink); }
.k-spine-item.tone-amber small { color: var(--t-amber-ink); font-weight: 600; }
.k-spine-item.tone-red small { color: var(--t-red-ink); font-weight: 700; }
.k-spine-when { text-align: right; }
.k-spine-when::after { content: ""; }
.k-spine { padding: 10px 16px 18px; }

/* ── MONTHS, given a body ─────────────────────────────────────────────────── */
.k-months-col { background: color-mix(in srgb, var(--line) 24%, var(--card));
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 0 8px; }
.k-months-col h3 { margin: 0 0 8px; padding: 8px 10px; border-radius: var(--r-md) var(--r-md) 0 0;
  background: color-mix(in srgb, var(--line) 55%, var(--card)); color: var(--ink); font-size: 10.5px; }
.k-months-col.is-now { outline: 2px solid var(--go); outline-offset: -1px; }
.k-months-col.is-now h3 { background: var(--go); color: #fff; }
.k-months-card { margin: 0 8px 8px; border: 1px solid var(--line); border-left-width: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.k-months-card.is-green { background: color-mix(in srgb, var(--t-green-wash) 55%, var(--card)); }
.k-months-card.is-amber { background: color-mix(in srgb, var(--t-amber-wash) 70%, var(--card)); }
.k-months-card.is-grey  { background: color-mix(in srgb, var(--t-grey-wash) 60%, var(--card)); border-left-color: var(--t-grey); }
.k-months-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, .12); transform: translateY(-1px); }
.k-months-card.is-green small { color: var(--t-green-ink); }
.k-months-card.is-amber small { color: var(--t-amber-ink); font-weight: 600; }

/* ── COMMS READS LIKE THE GANTT (Peter, 8 Nov) ───────────────────────────────
   The same spine on both screens: milestone, then what sits under it, in the same order and under
   the same numbers. Press a milestone on the chart, come to Comms, and it is in the same place. */
.k-convtree { display: grid; grid-template-columns: minmax(0, 1fr); padding-bottom: 8px; overflow-x: hidden; }   /* grid items default to min-width:auto and pushed the column 90px wider than itself */
.k-convgroup { min-width: 0; border-bottom: 1px solid var(--line); }
.k-convgroup-list { grid-template-columns: minmax(0, 1fr); }
.k-convgroup-list > a { min-width: 0; }
.k-convgroup-head { display: flex; align-items: center; gap: 7px; padding: 9px 12px 9px 6px;
  background: color-mix(in srgb, var(--line) 30%, var(--card)); }
.k-convgroup.tone-green .k-convgroup-head { background: color-mix(in srgb, var(--t-green-wash) 55%, var(--card)); }
.k-convgroup.tone-amber .k-convgroup-head { background: color-mix(in srgb, var(--t-amber-wash) 68%, var(--card)); }
.k-convgroup.tone-red .k-convgroup-head { background: var(--t-red-wash); }
.k-convgroup.tone-grey .k-convgroup-head { background: color-mix(in srgb, var(--t-grey-wash) 60%, var(--card)); }
.k-convgroup.is-empty .k-convgroup-head { opacity: .62; }
.k-convgroup.is-loose .k-convgroup-head { background: var(--bg); }
.k-convfold { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px;
  padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; }
.k-convfold:hover { background: var(--line); color: var(--ink); }
.k-convfold[aria-expanded="false"] svg { transform: rotate(-90deg); }
.k-convfold.is-none { cursor: default; }
.k-convwbs { flex: 0 0 auto; min-width: 18px; color: var(--muted); font-size: 11px;
  font-variant-numeric: tabular-nums; }
.k-convgroup-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: inherit; text-decoration: none; font-size: var(--t-xs); font-weight: 700; }
a.k-convgroup-name:hover, button.k-convgroup-name:hover { color: var(--go); }
button.k-convgroup-name { border: 0; background: transparent; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
a.k-convgroup-n { text-decoration: none; }
a.k-convgroup-n:hover { background: var(--go-soft); color: var(--go-soft-ink); }
.k-convgroup-n { flex: 0 0 auto; min-width: 20px; padding: 1px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--muted);
  font-size: 10px; font-weight: 700; text-align: center; }
.k-convgroup-list { display: grid; }
.k-convgroup-list[hidden] { display: none; }   /* the chevron did nothing: display:grid beat the hidden attribute (Peter, 8 Nov) */
.k-convgroup-list .k-projnav a,
.k-convgroup-list > a { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px 9px 30px;
  min-height: var(--tap); color: inherit; text-decoration: none; border-top: 1px solid var(--line);
  border-left: 3px solid transparent; }
.k-convgroup-list > a:hover { background: var(--bg); }
.k-convgroup-list > a[aria-current] { background: var(--go-soft); border-left-color: var(--go); }
.k-convgroup-list > a[aria-current] .k-projnav-name { font-weight: 700; }

/* ── THE PENNY BOT (8 Nov): the bot, your phone, who Penny can reach. ── */
.k-bot-grid { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; max-width: 860px; }
.k-bot-status { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 4px; line-height: 1.35; }
.k-bot-status .k-dot { margin-top: 5px; }
.k-bot-status .k-hint { display: block; margin-top: 2px; }
.k-bot-code { font-size: 34px; font-weight: 800; letter-spacing: .18em; text-align: center; padding: 14px; margin: 4px 0; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--soft); user-select: all; }
.k-bot-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.k-bot-people > li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); min-height: var(--tap); }
.k-bot-who { flex: 1 1 auto; min-width: 0; display: grid; }
.k-bot-who .k-hint { overflow-wrap: anywhere; }
.k-bot-people form { margin-left: auto; flex: none; }

/* Filing the loose conversations, and saying plainly which ones the machine guessed. */
.k-convfile { display: grid; gap: 6px; margin: 10px 12px; }
.k-convfile .k-hint { font-size: 11px; line-height: 1.35; }
.k-guess { flex: 0 0 auto; padding: 0 5px; border-radius: 3px; background: var(--t-amber-wash);
  color: var(--t-amber-ink); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.k-mail-empty p { margin: 0 0 10px; }
.k-bot-number { display: flex; gap: 6px; align-items: center; margin-left: auto; flex: none; }
.k-bot-number .k-input { width: 150px; min-height: 36px; }
@media (max-width: 480px) { .k-bot-people > li { flex-wrap: wrap; } .k-bot-number { margin-left: 24px; } }

/* ── THE ARROW WAS TOO SMALL TO HIT (Peter, 8 Nov: "pressing the arrow is not working") ──────
   22×22 against GO's own 46px tap standard, wedged between the number and the title — miss it by
   three pixels and you hit the title, which opens the panel instead of folding. It is now the full
   height of its row, wide enough to hit, and it says so when the pointer is over it. */
.k-sheet-fold, .k-convfold {
  width: 30px; height: 34px; border-radius: var(--r-sm);
  color: var(--muted); transition: background .12s, color .12s;
}
.k-sheet-fold svg, .k-convfold svg { width: 17px; height: 17px; transition: transform .14s; }
.k-sheet-fold:not(.is-none):hover, .k-convfold:not(.is-none):hover {
  background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink);
}
.k-sheet-fold:focus-visible, .k-convfold:focus-visible { outline: 2px solid var(--go); outline-offset: -2px; }
.k-sheet-fold:not(.is-none)::after, .k-convfold:not(.is-none)::after {
  content: ""; position: absolute; inset: -6px -4px;   /* a bigger target than it looks */
}
.k-sheet-fold, .k-convfold { position: relative; }
.k-sheet-fold.is-none, .k-convfold.is-none { width: 30px; }
@media (pointer: coarse) {
  .k-sheet-fold, .k-convfold { width: 44px; height: 44px; }
  .k-sheet-fold.is-none, .k-convfold.is-none { width: 44px; }
  .k-sheet-row { min-height: 46px; }
  .k-sheet-tr { height: 46px; }
}

/* ── THE TABLE STAYS PUT WHILE THE CHART SCROLLS ────────────────────────────
   Scrolling right to follow a bar was taking the names and dates off the left-hand edge with it,
   so he was looking at bars with nothing to say what they were. The table side is pinned now, the
   way it is in the portfolio chart he sent. Each cell inherits its row's colour so nothing shows
   through from underneath. */
.k-sheet-row > * { background: inherit; }
.k-sheet-row { background-color: var(--card); }
.k-sheet-nm { position: sticky; left: 0; z-index: 2; }
.k-sheet-dt { position: sticky; z-index: 2; }
.k-sheet-dt:nth-child(2) { left: var(--sheet-nm, 330px); }
.k-sheet-dt:nth-child(3) { left: calc(var(--sheet-nm, 330px) + 112px); }
.k-sheet-dt:nth-child(4) { left: calc(var(--sheet-nm, 330px) + 198px); }
.k-sheet-dt:nth-child(5) { left: calc(var(--sheet-nm, 330px) + 284px); }
.k-sheet-dt:nth-child(6) { left: calc(var(--sheet-nm, 330px) + 356px);
  box-shadow: 1px 0 0 var(--line), 6px 0 10px -8px rgba(0, 0, 0, .45); }
.k-sheet-head .k-sheet-row > * { z-index: 4; }
.k-sheet-head { z-index: 5; }

.k-lane-row > * { background: inherit; }
.k-lane-row { background-color: var(--card); }
.k-lane-nm { position: sticky; left: 0; z-index: 2;
  box-shadow: 1px 0 0 var(--line), 6px 0 10px -8px rgba(0, 0, 0, .45); }
.k-lane-row.is-head .k-lane-nm { z-index: 4; }

/* ── the Important bar on top of an email that Penny sent you to (8 Nov) ── */
.k-mail-alertbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 12px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--red-line); background: var(--red-bg); color: var(--red-ink); }
.k-mail-alertbar.is-done { border-color: var(--green-line); background: var(--green-bg); color: var(--green-ink); }
.k-mail-alertbar-words { flex: 1 1 200px; min-width: 0; display: grid; gap: 2px; line-height: 1.3; }
.k-mail-alertbar-words > span { font-size: var(--t-sm); }
.k-mail-alertbar form { display: contents; }

/* The pinned columns must be SOLID — a wash that mixes down to transparent lets the bars show
   straight through them (found walking it, 8 Nov). */
.k-sheet-row:not(.is-head):not(.is-big):hover { background: color-mix(in srgb, var(--bg) 92%, var(--ink)); }
.k-sheet-row.tone-red { background: color-mix(in srgb, var(--t-red-wash) 92%, var(--card)); }
.k-lane-row.tone-red { background: color-mix(in srgb, var(--t-red-wash) 92%, var(--card)); }
.k-sheet-row.is-group { background-color: color-mix(in srgb, var(--line) 18%, var(--card)); }
.k-sheet-row.is-group.tone-green { background: color-mix(in srgb, var(--t-green-wash) 48%, var(--card)); }
.k-sheet-row.is-group.tone-amber { background: color-mix(in srgb, var(--t-amber-wash) 62%, var(--card)); }
.k-sheet-row.is-group.tone-red { background: color-mix(in srgb, var(--t-red-wash) 92%, var(--card)); }
.k-sheet-row.is-group.tone-grey { background: color-mix(in srgb, var(--t-grey-wash) 55%, var(--card)); }

/* "Done" was being clipped to "DON" in its 54px column. */
.k-sheet-row { grid-template-columns: var(--sheet-nm, 330px) 112px 86px 86px 60px 66px minmax(0, 1fr); }
.k-sheet-dt:nth-child(5) { left: calc(var(--sheet-nm, 330px) + 284px); }
.k-sheet-dt:nth-child(6) { left: calc(var(--sheet-nm, 330px) + 344px); }
.k-alerts-boxes { margin: 0 0 10px; }
.k-alerts-box { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 8px 0 12px; }
.k-alerts-boxlist { display: grid; gap: 2px; margin-left: 8px; border-left: 2px solid var(--line); }
.k-alerts-boxlist[hidden] { display: none; }
.k-alerts-boxes > .k-alerts-box, .k-alerts-boxes .k-alerts-box { text-transform: none; letter-spacing: 0; font-size: var(--t-md); font-weight: 500; color: var(--ink); }
/* Important list on the phone (Penny's "have a look"): the subject gets the whole width; state + Dealt with sit under it. */
@media (max-width: 600px) {
  .k-rows > li { flex-wrap: wrap; row-gap: 6px; }
  .k-rows a.k-rowlink { flex: 1 1 100%; }
  .k-rows > li > form { margin-left: auto; }
}
/* file buttons: the input hides inside a real button; picking a file submits (kit.js data-autosubmit) */
.k-file-btn { position: relative; overflow: hidden; cursor: pointer; }
.k-file-btn input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }

/* ── ONE GANTT (8 Nov): the project's own bar on the all-jobs chart, and the quieter category line
   under the status chips on the list. */
.k-sheet-span.is-project { top: 11px; height: 16px; border-radius: 3px; border: 0;
  background: color-mix(in srgb, var(--go) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--go) 55%, transparent); }
.k-chips--quiet { margin-top: -6px; }
.k-chips--quiet .k-chip { font-size: var(--t-xs); }
.k-cardhead .k-hint { margin-left: auto; }
.k-sheet.no-owner .is-owner { display: none; }
.k-sheet.no-owner .k-sheet-row { grid-template-columns: var(--sheet-nm, 480px) 86px 86px 60px 66px minmax(0, 1fr); }
.k-sheet.no-owner .k-sheet-dt:nth-child(3) { left: var(--sheet-nm, 480px); }
.k-sheet.no-owner .k-sheet-dt:nth-child(4) { left: calc(var(--sheet-nm, 480px) + 86px); }
.k-sheet.no-owner .k-sheet-dt:nth-child(5) { left: calc(var(--sheet-nm, 480px) + 172px); }
.k-sheet.no-owner .k-sheet-dt:nth-child(6) { left: calc(var(--sheet-nm, 480px) + 232px); }
/* The Gantt on a phone (412): the name column takes 46% and the four date columns go, so the bars
   are on the screen beside the names instead of a swipe away. Weeks / Months still scroll. */
@media (max-width: 850px) {
  .k-sheet, .k-sheet.no-owner { min-width: 0; }
  .k-sheet .k-sheet-row, .k-sheet.no-owner .k-sheet-row { grid-template-columns: var(--sheet-nm, 46vw) minmax(0, 1fr); }
  .k-sheet .k-sheet-dt { display: none; }
  .k-sheet-nm { box-shadow: 1px 0 0 var(--line); }
  .k-sheet-wbs { min-width: 22px; }
  .k-sheet-fold.is-none { width: 0; }
  .k-tl-tools .k-btn[data-tl="print"], .k-tl-tools a.k-btn[href$=".xlsx"] { display: none; }
  .k-sheet-say { display: none; }   /* the name is already in the column beside the bar */
}
.k-sheet-say.is-left { text-align: right; }
.k-sheet-phase { min-width: 0; } .k-sheet-phase:empty { display: none; }
.k-drive-type.is-dwg { background: var(--go-soft); color: var(--go-soft-ink); }
.k-drive-type.is-doc { background: var(--grey-bg); color: var(--grey-ink); }
.k-drive-file[hidden], .k-drive-folders[hidden], .k-drive-h[hidden] { display: none; }   /* grid/flex display must not beat hidden */
button.k-drive-folder { font: inherit; cursor: pointer; text-align: left; }
.k-drive-crumbs h1 button.k-link { font: inherit; text-decoration: none; color: inherit; }
.k-chip[hidden] { display: none; }

/* ── QUOTES IN — the proposals side by side on a project's Money tab (8 Nov) ─────────────── */
.k-quotes { min-width: 0; font-size: var(--t-sm); }
.k-quotes th.k-q-row { position: sticky; left: 0; z-index: 1; background: var(--card); text-align: left; font-weight: 600; color: var(--ink); min-width: 240px; max-width: 300px; white-space: normal; }
.k-quotes [hidden] { display: none; }
.k-chips [data-qsite][aria-current="true"] { background: var(--go-soft); color: var(--go-soft-ink); }
.k-quotes thead th.k-q-row { background: var(--soft); z-index: 2; }
.k-quotes td { vertical-align: middle; }
.k-quotes th.k-quotes-sup { text-align: center; white-space: normal; min-width: 150px; vertical-align: bottom; }
.k-quotes th.k-quotes-sup a { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink); text-decoration: none; font-size: var(--t-sm); font-weight: 700; max-width: 180px; }
.k-quotes th.k-quotes-sup a small { font-weight: 500; color: var(--muted); font-size: var(--t-xs); }
.k-quotes th.k-quotes-sup.is-declined a { opacity: .5; text-decoration: line-through; }
.k-quotes th.k-quotes-agreed, .k-quotes td.k-quotes-agreed { background: color-mix(in srgb, var(--go) 7%, var(--card)); font-weight: 700; }
.k-quotes td.k-quotes-cell { text-align: right; padding: 0; }
.k-quotes td.k-quotes-cell > a, .k-quotes td.k-quotes-cell .k-quotes-tick { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 44px; width: 100%; margin: 0; padding: 4px 10px; border: 0; background: transparent; color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; text-decoration: none; cursor: pointer; border-radius: 0; }
.k-quotes td.k-quotes-cell > a small { color: var(--muted); font-size: 10px; white-space: normal; text-align: right; max-width: 150px; }
.k-quotes td.k-quotes-cell .k-quotes-tick svg, .k-quotes td.k-quotes-cell > a svg { opacity: .18; flex: 0 0 auto; }
.k-quotes td.k-quotes-cell .k-quotes-tick:hover svg { opacity: .6; }
.k-quotes td.k-quotes-cell.is-picked .k-quotes-tick svg, .k-quotes td.k-quotes-cell.is-picked > a svg { opacity: 1; color: var(--green-ink, #16a34a); }
.k-quotes td.k-quotes-cell.is-cheapest { background: var(--green-bg); }
.k-quotes td.k-quotes-cell.is-picked { background: color-mix(in srgb, var(--go) 10%, var(--card)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--go) 60%, transparent); }
.k-quotes td.k-quotes-cell.is-picked .k-quotes-amt { font-weight: 700; }
.k-quotes th.k-q-row form.k-cell { display: block; width: auto; height: auto; border: 0; }
.k-quotes th.k-q-row .k-cell-in { width: 100%; min-width: 180px; border: 1px solid transparent; background: transparent; font: inherit; font-weight: 600; color: inherit; padding: 4px 6px; border-radius: var(--r-sm); }
.k-quotes th.k-q-row .k-cell-in:hover, .k-quotes th.k-q-row .k-cell-in:focus { border-color: var(--line); background: var(--card); outline: 0; }
.k-quotes td.is-red { color: var(--red-ink); font-weight: 700; }
.k-quotes td.k-quotes-acts { text-align: center; }
.k-quotes-foot { padding: 12px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.k-quotes-foot h3 { margin: 0; font-size: var(--t-sm); }
.k-quotes-foot .k-rows li { display: flex; align-items: center; gap: 10px; }
.k-quotes-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) auto; gap: 10px; align-items: end; }
@media (max-width: 850px) { .k-quotes-add { grid-template-columns: minmax(0, 1fr); } }
.k-qlines tr.is-optional td { color: var(--muted); }
.k-qlines tr.is-picked td { background: color-mix(in srgb, var(--go) 8%, transparent); }
.k-quotes-tick.is-row { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.k-quotes-tick.is-row[aria-pressed="true"] { background: var(--green-ink, #16a34a); border-color: var(--green-ink, #16a34a); color: #fff; }
.k-qlines .k-cell { display: block; width: auto; height: auto; border: 0; }
.k-qlines .k-cell-in { width: 100%; min-width: 120px; border: 1px solid transparent; background: transparent; font: inherit; color: inherit; padding: 4px 6px; border-radius: var(--r-sm); }
.k-qlines .k-cell-in.k-cell-num { text-align: right; min-width: 90px; font-variant-numeric: tabular-nums; }
.k-qlines .k-cell-in:hover, .k-qlines .k-cell-in:focus { border-color: var(--line); background: var(--card); outline: 0; }
.k-split.k-qsplit { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.k-qlines { font-size: var(--t-xs); }
.k-table.k-qlines th, .k-table.k-qlines td { padding: 3px 5px; vertical-align: middle; }
.k-table.k-qlines thead th { white-space: nowrap; font-size: 10px; }
.k-qlines select, .k-qlines .k-rowform select { width: auto; max-width: 170px; min-height: 32px; font-size: var(--t-xs); padding: 0 4px; }
.k-qlines .k-rowform { margin: 0; }
.k-qlines .k-cell-in { min-width: 150px; max-width: 260px; font-size: var(--t-xs); padding: 3px 5px; }
.k-qlines .k-cell-in.k-cell-num { min-width: 84px; max-width: 100px; }
.k-qlines .k-quotes-tick.is-row { width: 30px; height: 30px; }
.k-qlines tfoot th { text-align: right; font-size: var(--t-xs); }
.k-qlines .k-linkbtn, .k-qlines button { white-space: nowrap; }
.k-qlines .k-linkbtn { min-height: 28px; }
.k-qlines select[name="scope_id"] { max-width: 150px; }
.k-qlines select[name="site"] { max-width: 104px; }
.k-qlines select[name="optional"] { max-width: 110px; }
.k-qlines .k-cell-in { min-width: 140px; }
.k-split-read .k-table-wrap { overflow-x: auto; }
.k-quotes-packs { display: grid; gap: 3px; padding: 6px 8px; }
.k-quotes-pack { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 30px; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: inherit; font-size: var(--t-xs); cursor: pointer; text-align: left; }
.k-quotes-pack span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-quotes-pack b { font-variant-numeric: tabular-nums; }
.k-quotes-pack svg { opacity: .18; flex: 0 0 auto; }
.k-quotes-pack:hover { border-color: var(--go); }
.k-quotes-pack[aria-pressed="true"] { background: color-mix(in srgb, var(--go) 12%, var(--card)); border-color: var(--go); }
.k-quotes-pack[aria-pressed="true"] svg { opacity: 1; color: var(--green-ink, #16a34a); }
.k-quotes-loose td { text-align: left; white-space: normal; padding: 8px 12px; background: var(--amber-bg); }
.k-quotes-loose th.k-q-row { background: var(--amber-bg); }
.k-quotes-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 4px 0; }
.k-quotes-ask-who { font-weight: 700; min-width: 140px; }
.k-quotes-ask-what { color: var(--muted); }
.k-quotes-ask select { min-height: 34px; max-width: 240px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: inherit; font-size: var(--t-xs); padding: 0 6px; }
.k-quotes-ask[hidden] { display: none; }

/* ── THE CLASSIC RIBBON (Peter, 8 Nov: "I like the ribbon part" — his mockup REVMA_Outlook_Ribbon.html).
   Mail settings → Layout: GO (the grid above) or Classic ribbon. Same three panes; a tab strip + ribbon across the top
   and a module rail down the far left. Colours come from the person's Look (chrome / ribbon / side / main / pane);
   with nothing picked it wears GO's own tokens. The email itself always sits on paper (--paper), whatever the frame. ── */
.k-mail[data-layout="ribbon"] { grid-template-columns: 74px min(var(--mail-nav), 26%) var(--mail-gutter) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.k-mail[data-layout="ribbon"] > .k-ribbon { grid-column: 1 / -1; grid-row: 1; }
.k-mail[data-layout="ribbon"] > .k-mail-rail { grid-column: 1; grid-row: 2; }
.k-mail[data-layout="ribbon"] > .k-mail-nav { grid-column: 2; grid-row: 2; }
.k-mail[data-layout="ribbon"] > .k-mail-gutter { grid-column: 3; grid-row: 2; }
.k-mail[data-layout="ribbon"] > .k-mail-body { grid-column: 4; grid-row: 2; }
.k-mail[data-layout="ribbon"] > .k-mail-scrim { grid-column: 1; grid-row: 1; }
.k-ribbon { --ink: var(--mail-chrome-ink, var(--ink-std)); --muted: var(--mail-chrome-dim, var(--muted-std)); background: var(--mail-chrome, var(--soft)); color: var(--ink); min-width: 0; }
.k-ribbon-tabs { display: flex; align-items: center; gap: 2px; padding: 4px 10px 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.k-ribbon-tabs::-webkit-scrollbar { display: none; }
.k-ribbon-tabs [role="tab"] { min-height: 38px; padding: 0 12px; border: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; background: transparent; color: var(--ink); font: 600 var(--t-sm) var(--font); cursor: pointer; }
.k-ribbon-tabs [role="tab"]:hover { background: var(--mail-chrome-hover, var(--card)); }
.k-ribbon-tabs [role="tab"][aria-selected="true"] { background: var(--mail-ribbon, var(--card)); color: var(--mail-ribbon-ink, var(--ink-std)); }
.k-ribbon-status { margin-left: 12px; font-size: var(--t-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.k-ribbon-brand { margin-left: auto; padding-left: 12px; font-size: var(--t-xs); font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.k-ribbon-bar { --ink: var(--mail-ribbon-ink, var(--ink-std)); --muted: var(--mail-ribbon-dim, var(--muted-std)); --line: var(--mail-ribbon-line, var(--line-std)); background: var(--mail-ribbon, var(--card)); color: var(--ink); margin: 0 10px 8px; border-radius: var(--r-sm); min-height: 92px; overflow-x: auto; overflow-y: hidden; }
.k-ribbon-panel { display: flex; align-items: stretch; padding: 6px 4px; min-height: 92px; }
.k-ribbon-panel[hidden] { display: none; }
.k-rgroup { display: grid; grid-template-rows: minmax(0, 1fr) auto; align-content: space-between; text-align: center; padding: 0 7px; white-space: nowrap; }
.k-rgroup + .k-rgroup { border-left: 1px solid var(--line); }
.k-rgroup > small { color: var(--muted); font-size: 11px; padding-top: 3px; }
.k-rbtns { display: flex; align-items: stretch; gap: 2px; }
.k-rbtn { display: inline-grid; grid-template-rows: auto auto; justify-items: center; align-content: center; gap: 4px; min-height: 58px; min-width: 56px; padding: 6px 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); font: 500 13px/1.15 var(--font); text-decoration: none; cursor: pointer; }
.k-rbtn:hover { background: var(--mail-ribbon-hover, var(--soft)); }
.k-rbtn[aria-pressed="true"], .k-rbtn[aria-current="page"] { background: var(--go-soft); color: var(--go-soft-ink); }
.k-rbtn[aria-disabled="true"] { opacity: .45; cursor: default; }
.k-rbtn-ic { display: inline-flex; color: var(--go); }
.k-rbtn[aria-pressed="true"] .k-rbtn-ic, .k-rbtn[aria-current="page"] .k-rbtn-ic { color: var(--go-soft-ink); }
.k-mail-rail { --ink: var(--mail-chrome-ink, var(--ink-std)); --muted: var(--mail-chrome-dim, var(--muted-std)); display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; background: var(--mail-chrome, var(--soft)); background: color-mix(in srgb, var(--mail-chrome, var(--soft)) 86%, black); color: var(--ink); min-width: 0; overflow: auto; }
.k-mail-rail a { display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: 11px; }
.k-mail-rail a small { font-size: 10px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-mail-rail a:hover { background: var(--mail-chrome-hover, var(--card)); }
.k-mail-rail a[aria-current="page"] { background: var(--go-soft); color: var(--go-soft-ink); }
/* the ribbon IS the Reply / Delete / Archive row, so the pane keeps only its More menu (categories, open on its own) */
/* Peter, 13 Nov: "if I open up an email, have a look, how do I reply? It's not easy, I have to go
   find it." This rule hid Reply, Reply all, Forward, Archive and Delete on an open email whenever
   the ribbon was on, leaving him a lone More button. Outlook shows both. So does this now. */
/* The ribbon carries New and Send/Receive, so those come off the list header - but HOW FAR BACK stays.
   Peter, 13 Nov: "you had buttons before that I could drop down and have selected days and all this
   rubbish all disappears". Burying it in the Folder tab meant going hunting every time. */
.k-mail[data-layout="ribbon"] .k-mail-top .k-right { display: flex; }
.k-mail[data-layout="ribbon"] .k-mail-top .k-right > a { display: none; }
/* the email on paper inside the frame */
.k-mail[data-layout="ribbon"] .k-mail-read { padding: 14px; }
.k-mail[data-layout="ribbon"] .k-mail-msg { --ink: var(--paper-ink); --card: var(--paper); --line: var(--paper-rule); --soft: var(--paper-rule); background: var(--paper); color: var(--paper-ink); border-radius: var(--r-sm); padding: 16px 20px 28px; }
.k-mail[data-layout="ribbon"] .k-mail-msg .k-mail-content { background: transparent; }
.k-mail[data-layout="ribbon"] .k-mail-empty { color: var(--ink); }
/* HALF A SCREEN (851-1100px) - Peter, 11 Nov. With the window beside something else the fixed icon rail, folders and
   list ate the width and left the email about 140px: unreadable. The rail steps aside and the two left panes give way,
   so the email always keeps the bulk of the screen. His dragged widths still apply the moment there is room for them. */
@media (min-width: 851px) and (max-width: 1100px) {
  .k-mail[data-layout="ribbon"] { grid-template-columns: 0 min(var(--mail-nav), 24%) var(--mail-gutter) minmax(0, 1fr); }
  .k-mail[data-layout="ribbon"] > .k-mail-rail { display: none; }
  .k-mail-body { grid-template-columns: min(var(--mail-list), 40%) var(--mail-gutter) minmax(0, 1fr); }
  .k-ribbon-bar { scrollbar-width: thin; }
  /* the row of tools above the email wrapped onto three rows here and pushed the email off the screen */
  .k-mail-actions { gap: 4px; padding: 8px 0 9px; margin-bottom: 10px; }
  .k-mail-actions .k-btn { min-height: 32px; padding: 0 9px; font-size: var(--t-sm); }
  .k-mail[data-layout="ribbon"] .k-mail-read { padding: 10px; }
  .k-mail[data-layout="ribbon"] .k-mail-msg { padding: 12px 14px 24px; }
}
@media (max-width: 850px) {
  .k-mail[data-layout="ribbon"] { display: block; }
  .k-mail-rail { display: none; }
  .k-ribbon-bar { margin: 0 6px 6px; }
  .k-ribbon-brand { display: none; }
  .k-mail[data-layout="ribbon"] .k-mail-read { padding: 0; }
  .k-mail[data-layout="ribbon"] .k-mail-msg { padding: 12px 8px 24px; }
}
/* the settings preview wears a small ribbon when that layout is picked */
.k-lookprev .k-ribbon { display: none; grid-column: 1 / -1; }
.k-lookprev[data-layout="ribbon"] { grid-template-rows: auto minmax(0, 1fr); }
.k-lookprev[data-layout="ribbon"] .k-ribbon { display: block; }
.k-lookprev .k-ribbon-tabs { padding: 2px 6px 0; }
.k-lookprev .k-ribbon-tabs [role="tab"] { min-height: 22px; padding: 0 8px; font-size: 10px; }
.k-lookprev .k-ribbon-bar { min-height: 0; margin: 0 6px 4px; }
.k-lookprev .k-ribbon-panel { min-height: 0; padding: 3px 2px; }
.k-lookprev .k-rbtn { min-height: 30px; min-width: 34px; padding: 2px 4px; font-size: 9px; gap: 1px; }
.k-lookprev .k-rbtn .k-icon { width: 12px; height: 12px; }
.k-lookprev .k-rgroup > small { font-size: 8px; }
.k-lookprev[data-layout="ribbon"] .k-mail-read { padding: 6px; }
.k-lookprev[data-layout="ribbon"] .k-mail-msg { --ink: var(--paper-ink); --card: var(--paper); --line: var(--paper-rule); background: var(--paper); color: var(--paper-ink); border-radius: var(--r-sm); }

/* THE PREVIEW HAS NO MODULE RAIL. Without this it inherits the real ribbon grid
   (rail · folders · gutter · body), so its list lands in the 74px rail column and the
   reading pane in the 8px gutter — the mangled preview of 13 Nov. Its own three
   columns, whatever the layout, and the panes pinned to them. */
.k-mail.k-lookprev[data-layout="ribbon"] { grid-template-columns: 112px minmax(0, 1fr) minmax(0, 1.15fr); grid-template-rows: auto minmax(0, 1fr); }
.k-mail.k-lookprev > .k-mail-nav { grid-column: 1; }
.k-mail.k-lookprev > .k-mail-list { grid-column: 2; border-right: 1px solid var(--line); }
.k-mail.k-lookprev > .k-mail-read { grid-column: 3; }
.k-mail.k-lookprev[data-layout="ribbon"] > .k-mail-nav,
.k-mail.k-lookprev[data-layout="ribbon"] > .k-mail-list,
.k-mail.k-lookprev[data-layout="ribbon"] > .k-mail-read { grid-row: 2; }
@media (max-width: 850px) {
  .k-mail.k-lookprev[data-layout="ribbon"] { grid-template-columns: 84px minmax(0, 1fr); }
}

/* A PHOTO ON A CHECKLIST LINE (Peter, 10 Nov): "take a photo so you got references for next time". */
.k-check-shots { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.k-check-shot { position: relative; margin: 0; width: 72px; height: 72px; }
.k-check-shot img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); display: block; }
.k-check-shot form { position: absolute; top: -6px; right: -6px; margin: 0; }
.k-check-shot .k-iconbtn { width: 26px; height: 26px; min-height: 0; background: var(--card); border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.k-check-add { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 14px; border: 1px dashed var(--blue-line); border-radius: var(--r-md); background: var(--go-soft); color: var(--go-soft-ink); font-weight: 700; font-size: var(--t-sm); cursor: pointer; }
.k-check-add:hover { border-style: solid; }
.k-check-add:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.k-check-add.is-picked { border-style: solid; background: var(--green-bg, var(--go-soft)); }

/* "Before it can be finalised" — the one thing and the button that does it. On a phone the button goes under
   the words so a step name never breaks mid-word (Peter, 10 Nov: "Work comple/ted"). */
.k-mustdo > li { align-items: center; gap: 10px; }
.k-mustdo .k-row-title { overflow-wrap: normal; word-break: keep-all; }
.k-mustdo .k-btn { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 560px) {
  .k-mustdo > li { flex-wrap: wrap; }
  .k-mustdo > li .k-grow { flex: 1 1 100%; }
  .k-mustdo > li .k-btn { margin-left: 22px; }
}
.k-check-add.is-busy { opacity: .7; }
.k-check-add.is-bad { border-color: var(--red-line, #b4231f); border-style: solid; }
.k-check-shots .k-error { flex: 1 1 100%; }

/* "Next:" is the thing you press, not a label (Peter, 10 Nov: "no flow"). */
.k-paper-here { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.k-paper-here .k-btn { flex: 0 0 auto; }
/* The checklist's folded line is a sentence, not a row of flex items — inline-flex was scrambling the
   word order when it wrapped (Peter, 10 Nov). */
.k-cl > summary { display: block; font-weight: 600; line-height: 1.45; padding: 10px 14px; text-align: left; }
.k-cl > summary strong { font-weight: 800; }
.k-cl[open] > summary { margin-bottom: 10px; }

/* ------------------------------------------------------------------------------------------------
   A FIELD WRITTEN AS A WRAPPING LABEL (Peter, 10 Nov). Most screens write a field as
   <div class="k-field"><label>Words</label><input> — but Health, Mail settings and the booking page
   write it as <label class="k-field"><span>Words</span><input class="k-input">, which is the same
   thing with one less tag. Both now read the same on the screen: the words small and up above, the
   grid wrapping to the width it has, and an error in red under the box it belongs to.
------------------------------------------------------------------------------------------------ */
.k-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; align-items: start; }
.k-fields .k-field { margin: 0; }
.k-field--wide { grid-column: 1 / -1; }
label.k-field > span:first-child:not(.k-sr):not(.k-hint) { font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.k-err { display: block; color: var(--red-ink); font-size: var(--t-xs); font-weight: 600; }
.k-btn.is-danger { color: var(--red-ink); border-color: var(--red-line); }
.k-btn.is-danger:hover { background: var(--red-bg); }
@media (max-width: 640px) {
  .k-fields { grid-template-columns: minmax(0, 1fr); }
}

/* A FOLD'S OWN LINE IS A CONTROL (found by the Health walk, 10 Nov). .k-linkbtn is 32px, which is
   fine for a word at the end of a sentence but not for "What is on it, day by day" — the thing you
   press to open a fold. On a <summary> it gets a proper tap target like every other control. */
summary.k-linkbtn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); }

/* A ROW'S TITLE IS WHAT YOU TAP ON A PHONE (same walk). A list row's title link was 21 to 42px
   high, under the 44px a thumb needs, on the meal plan, the ready-made weeks and every other k-rows
   list. On a narrow screen it gets the Kit's own tap height; with a mouse nothing changes. */
@media (max-width: 640px) {
  a.k-row-title { display: flex; align-items: center; min-height: var(--tap); }
}

/* ASSET PHOTOS (Peter, 11 Nov): a wall of what the thing actually looks like — both sides, the plate, the meter. */
.k-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; list-style: none; margin: 8px 0 0; padding: 0; }
.k-shots > li { position: relative; margin: 0; }
.k-shots img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); }
.k-shots form { position: absolute; top: 6px; right: 6px; margin: 0; }

/* ══ MAIL: THE WINDOW, THE LIST BAR AND THE RIGHT-CLICK MENU ═══════════════════════════════════════
   Peter, 11 Nov: "Contacts, that should be able to close it, same as the inbox and all that. You'll be
   able to close it and open it. I want to be able to do a full screen of it because it's emails. It's a
   bit closed" — and "all the features most webmail apps have, put it together". Every colour is a token. */

/* ── Each part of the frame closes on its own. The grid keeps its shape; the closed column goes to 0. ── */
.k-mail[data-rail="off"][data-layout="ribbon"] { grid-template-columns: 0 min(var(--mail-nav), 26%) var(--mail-gutter) minmax(0, 1fr); }
.k-mail[data-rail="off"] > .k-mail-rail { display: none; }
.k-mail[data-folders="off"] { grid-template-columns: 18px minmax(0, 1fr); }
.k-mail[data-folders="off"][data-layout="ribbon"] { grid-template-columns: 74px 18px minmax(0, 1fr); }
.k-mail[data-folders="off"][data-rail="off"][data-layout="ribbon"] { grid-template-columns: 0 18px minmax(0, 1fr); }
.k-mail[data-folders="off"] > .k-mail-nav, .k-mail[data-folders="off"] > .k-mail-gutter[data-resize="nav"] { display: none; }
.k-mail[data-folders="off"] > .k-mail-body { grid-column: auto; }
.k-mail[data-layout="ribbon"][data-folders="off"] > .k-mail-reopen { grid-column: 2; grid-row: 2; }
.k-mail[data-layout="ribbon"][data-folders="off"] > .k-mail-body { grid-column: 3; grid-row: 2; }
/* the sliver that brings the folders back */
.k-mail-reopen { display: none; align-items: center; justify-content: center; width: 18px; border: 0; border-right: 1px solid var(--line); background: var(--mail-side, var(--soft)); color: var(--ink); cursor: pointer; padding: 0; }
.k-mail-reopen:hover { background: var(--card); }
.k-mail[data-folders="off"] > .k-mail-reopen { display: flex; }
/* the ribbon folded away: the tabs stay, the buttons go (Outlook's own habit) */
.k-mail[data-ribbon="off"] .k-ribbon-bar { display: none; }
.k-mail[data-ribbon="off"] .k-ribbon-tabs { padding-bottom: 4px; }
.k-ribbon-win { display: flex; align-items: center; gap: 2px; margin-left: auto; padding-left: 8px; }
.k-ribbon-win .k-iconbtn { width: 34px; height: 34px; border-color: transparent; background: transparent; color: var(--ink); }
.k-ribbon-win .k-iconbtn:hover { background: var(--mail-chrome-hover, var(--card)); }
.k-ribbon-win .k-iconbtn[aria-pressed="false"] { opacity: .55; }
.k-ribbon-win [data-win="ribbon"] .k-icon { transform: rotate(90deg); transition: transform .15s; }
.k-mail[data-ribbon="off"] .k-ribbon-win [data-win="ribbon"] .k-icon { transform: rotate(-90deg); }
.k-ribbon-brand { margin-left: 0; }
.k-mail-win { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.k-mail[data-layout="ribbon"] .k-mail-win { display: none; }

/* ── FULL SCREEN. GO's top bar, menu and phone dock step out of the way and Mail owns the window. ── */
html[data-mailfull="1"] .k-top, html[data-mailfull="1"] .k-side, html[data-mailfull="1"] .k-dock { display: none; }
html[data-mailfull="1"] .k-shell { grid-template-columns: minmax(0, 1fr); }
html[data-mailfull="1"] .k-content { padding: 0; max-width: none; }
html[data-mailfull="1"] .k-content > .k-mail { height: 100dvh; min-height: 0; margin: 0; border: 0; border-radius: 0; }
html[data-mailfull="1"] .k-toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); width: min(720px, 90vw); margin: 0; z-index: 60; }
.k-win-full[aria-pressed="true"] { background: var(--go-soft); color: var(--go-soft-ink); }

/* ── THE LIST BAR: tick all, how it is sorted, unread / flagged, and the bulk buttons. ── */
.k-mail-bar { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 4px 10px 4px 8px; border-bottom: 1px solid var(--line); background: var(--mail-main, var(--card)); color: var(--ink); flex-wrap: wrap; }
.k-mail-bar-pick { display: flex; align-items: center; gap: 8px; }
.k-mail-bar-count { font-size: var(--t-xs); font-weight: 800; color: var(--go-soft-ink); }
.k-mail-bar-when, .k-mail-bar-do { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.k-mail-bar-when[hidden], .k-mail-bar-do[hidden] { display: none; }
.k-btn--thin { min-height: 32px; padding: 0 9px; font-size: var(--t-xs); letter-spacing: 0; text-transform: none; }
.k-btn--thin b { margin-left: 5px; font-size: 11px; opacity: .75; }
.k-btn--thin[aria-pressed="true"] { background: var(--go-soft); border-color: var(--blue-line); color: var(--go-soft-ink); }
.k-mail-sort > summary { list-style: none; }
.k-mail-sort > summary::-webkit-details-marker { display: none; }
.k-mail[data-density="tight"] .k-mail-bar, .k-mail[data-density="cosy"] .k-mail-bar { min-height: 36px; padding: 2px 8px; }

/* ── TICK BOXES on the rows. A real box, 20px, with a 44px reach around it for a thumb. ── */
.k-tick { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 28px; min-height: 28px; cursor: pointer; }
.k-tick input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.k-tick span { width: 18px; height: 18px; border: 1.5px solid var(--grey-line); border-radius: 4px; background: var(--card); display: block; }
.k-tick input:checked + span { background: var(--go); border-color: var(--go); box-shadow: inset 0 0 0 2px var(--card); }
.k-tick input:indeterminate + span { background: var(--grey-line); border-color: var(--grey-line); box-shadow: inset 0 0 0 2px var(--card); }
.k-tick input:focus-visible + span { outline: 2px solid var(--go); outline-offset: 2px; }
.k-mail-rows > li { display: flex; align-items: stretch; }
.k-mail-rows > li > .k-mail-tick { flex: 0 0 auto; padding-left: 6px; }
.k-mail-rows > li > .k-mail-row { flex: 1 1 auto; min-width: 0; }
.k-mail-rows > li.is-ticked { background: var(--go-soft); }
.k-mail[data-density="tight"] .k-mail-tick, .k-mail[data-density="compact"] .k-mail-tick { width: 24px; padding-left: 4px; }

/* ── THE FLAG on a row: quiet until it is on, like every mail app. ── */
.k-mail-row .k-mail-flag { display: inline-flex; align-items: center; justify-content: center; width: 28px; min-height: 28px; margin-left: 4px; border: 0; background: transparent; color: var(--grey-line); cursor: pointer; border-radius: var(--r-sm); opacity: 0; }
.k-mail-row:hover .k-mail-flag, .k-mail-row:focus-within .k-mail-flag, .k-mail-row .k-mail-flag[aria-pressed="true"] { opacity: 1; }
.k-mail-row .k-mail-flag[aria-pressed="true"] { color: var(--amber); }
.k-mail-row .k-mail-flag:hover { background: var(--soft); color: var(--amber); }
.k-mail-row.is-flagged { box-shadow: inset -3px 0 0 var(--amber); }
@media (hover: none) { .k-mail-row .k-mail-flag { opacity: 1; } }

/* ── DRAGGING AN EMAIL ONTO A FOLDER. ── */
.k-mail.is-dragging-mail .k-mail-folders a { outline: 1px dashed var(--blue-line); outline-offset: -2px; }
.k-mail-folders a.is-drop { background: var(--go-soft); color: var(--go-soft-ink); outline: 2px solid var(--go); outline-offset: -2px; }

/* ── THE RIGHT-CLICK MENU (Peter, 5 Nov — the one thing the old webmail had and this did not). ── */
.k-ctx { position: fixed; z-index: 80; min-width: 230px; padding: 5px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.k-ctx[hidden] { display: none; }
.k-ctx button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); font: 600 var(--t-sm) var(--font); text-align: left; cursor: pointer; }
.k-ctx button:hover, .k-ctx button:focus-visible { background: var(--go-soft); color: var(--go-soft-ink); outline: none; }
.k-ctx button[hidden] { display: none; }
.k-ctx button.is-danger { color: var(--red-ink); }
.k-ctx button.is-danger:hover { background: var(--red-bg); color: var(--red-ink); }
.k-ctx .k-icon { opacity: .75; flex: 0 0 auto; }
.k-ctx hr { height: 1px; margin: 4px 2px; border: 0; background: var(--line); }

/* ── Phone: the window buttons and the sliver are a desk idea; the drawer already does this job. ── */
@media (max-width: 850px) {
  .k-mail-reopen, .k-mail-win, .k-ribbon-win { display: none !important; }
  .k-mail[data-folders="off"], .k-mail[data-rail="off"] { grid-template-columns: minmax(0, 1fr); }
  .k-mail[data-folders="off"] > .k-mail-nav { display: block; }
  .k-mail-bar { padding: 4px 8px; }
  .k-mail-bar-when, .k-mail-bar-do { margin-left: 0; width: 100%; }
  .k-ctx { min-width: 200px; }
}

/* ── A POPPED-OUT EMAIL: its own window, no CRM frame, Close instead of Back. ── */
html[data-popout="1"] .k-content { padding: 0; }
html[data-popout="1"] .k-content > .k-toasts { margin: 8px; }
.k-popbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--soft); color: var(--ink); position: sticky; top: 0; z-index: 10; }
.k-popbar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-md); }
/* (the bar now lives inside the Mail block and always shows there — phone included, where it is the Back button) */
/* The popbar sits in Mail's own colours when the email fills the screen, so it reads as one room with the list. */
.k-mail .k-popbar { background: var(--mail-side, var(--soft)); color: var(--mail-side-ink, var(--ink)); border-color: var(--mail-side-line, var(--line)); }
.k-mail .k-popbar .k-btn { background: var(--card); color: var(--ink); border-color: var(--line); }

/* The bar never wraps: one row that slides sideways if it must, and in a narrow list column
   the buttons drop to their icons alone (every one keeps its words for a screen reader). */
.k-mail-bar { flex-wrap: nowrap; }
/* Only the bulk row scrolls. The browse row holds the Sort menu, and a scrolling box would clip the
   menu when it drops open — so that row shrinks by dropping its words instead (see the container rule). */
.k-mail-bar-when { flex-wrap: nowrap; min-width: 0; }
.k-mail-bar-do { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.k-mail-bar-do::-webkit-scrollbar { display: none; }
.k-mail-bar .k-btn--thin { flex: 0 0 auto; }
@container (max-width: 560px) {
  .k-mail-bar-do .k-btn--thin > span, .k-mail-bar-when > a > span { display: none; }
  .k-mail-bar-do .k-btn--thin, .k-mail-bar-when > a { padding: 0 7px; }
  .k-mail-bar-when .k-mail-sort > summary { padding: 0 8px; }
}


/* ── AUTO-FILING (Peter, 12 Nov): priority chips + File to job / Make expense, the "auto" marker, the job picker,
      Needs sorting, the draft bar. Tokens only. ─────────────────────────────────────────────────────────────── */
.k-mail-file { position: static; margin-top: -6px; align-items: center; }
.k-mailchip-row { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; background: var(--card); }
.k-mailchip-row form { display: inline-flex; }
.k-mailchip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: var(--t-sm); font-weight: 600; cursor: pointer; }
.k-mailchip-row form:last-child .k-mailchip { border-right: 0; }
.k-mailchip[aria-pressed="true"] { background: var(--go-soft); color: var(--go-soft-ink); }
.k-mailchip:hover { background: var(--soft); }
.k-auto { display: inline-flex; align-items: center; padding: 0 6px; min-height: 18px; border-radius: var(--r-pill); background: var(--soft); border: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.k-auto--row { align-self: center; margin-left: -4px; }
.k-mail-filed { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--t-sm); }
.k-jobpick .k-field { margin-bottom: 8px; }
.k-jobpick-list { list-style: none; margin: 0; padding: 0; max-height: 56vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.k-jobpick-list li + li { border-top: 1px solid var(--line); }
.k-jobpick-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 8px 12px; border: 0; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.k-jobpick-item:hover, .k-jobpick-item:focus-visible { background: var(--go-soft); }
.k-jobpick-item small { display: block; color: var(--muted); font-size: var(--t-xs); }
.k-jobpick-item.is-suggested { background: var(--amber-bg); }
.k-sortrows > li { flex-wrap: wrap; }
.k-sortrow-do { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px 22px; }
.k-sortrow-do form { display: inline-flex; }
.k-sort-file { position: relative; }
.k-jobpop { position: absolute; z-index: 30; width: min(560px, calc(100vw - 32px)); padding: 12px; }
.k-draftbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-left: 4px solid var(--amber); }
.k-draftbar .k-btn-row { margin: 0; }
.k-draftbar form { display: inline-flex; }
@media (max-width: 849px) {
  .k-mailchip { padding: 0 10px; }
  .k-sortrow-do { padding-left: 0; }
  .k-jobpop { position: fixed; left: 16px; right: 16px; top: 72px; width: auto; max-height: calc(100vh - 100px); overflow: auto; }
}

/* ══ THE HANDLES ON THE DIVIDERS ═══════════════════════════════════════════════════
   Peter, 13 Nov: "wouldn't it be easier if there's an arrow or a button, and that closes
   that side, and you press and it opens it ... at the moment you got 1, 2, 3, 4 buttons
   at the top there, fuck knows what they do."
   So every divider carries its own arrow. It points AT the side it will close; closed, it
   points back the other way to bring it in. The four window buttons in the ribbon still
   work and stay in step - nobody has to go hunting for them.
   NOTE the chevron icon points UP as drawn, so left is -90 and right is +90. */
.k-mail-gut-btn, .k-mail-rail-btn {
  display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
  color: var(--muted); background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: 0 1px 3px rgba(0,0,0,.14);
  transition: color .15s, background .15s, border-color .15s;
}
.k-mail-gut-btn:hover, .k-mail-rail-btn:hover { color: var(--go-soft-ink); background: var(--go-soft); border-color: var(--blue-line); }
.k-mail-gut-btn:focus-visible, .k-mail-rail-btn:focus-visible { outline: 2px solid var(--blue-line); outline-offset: 2px; }
.k-mail-gut-btn .k-icon, .k-mail-rail-btn .k-icon { width: 13px; height: 13px; transition: transform .15s; }

.k-mail-gut-btn { position: absolute; z-index: 6; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 20px; height: 46px; }
.k-mail[data-pane="below"] .k-mail-body > .k-mail-gutter > .k-mail-gut-btn,
.k-mail[data-pane="top"]   .k-mail-body > .k-mail-gutter > .k-mail-gut-btn { width: 46px; height: 20px; }

/* WHICH WAY IT POINTS. The chevron is drawn pointing DOWN: left is +90, right is -90, up is 180. */
/* the folders column closes to the LEFT */
.k-mail-gutter[data-resize="nav"] > .k-mail-gut-btn .k-icon { transform: rotate(90deg); }
.k-mail[data-folders="off"] .k-mail-gutter[data-resize="nav"] > .k-mail-gut-btn .k-icon { transform: rotate(-90deg); }
/* the reading pane closes toward wherever it sits */
.k-mail[data-pane="right"] .k-mail-body > .k-mail-gutter > .k-mail-gut-btn .k-icon { transform: rotate(-90deg); }
.k-mail[data-pane="right"][data-read="off"] .k-mail-body > .k-mail-gutter > .k-mail-gut-btn .k-icon { transform: rotate(90deg); }
.k-mail[data-pane="below"] .k-mail-body > .k-mail-gutter > .k-mail-gut-btn .k-icon { transform: none; }
.k-mail[data-pane="below"][data-read="off"] .k-mail-body > .k-mail-gutter > .k-mail-gut-btn .k-icon { transform: rotate(180deg); }
.k-mail[data-pane="top"] .k-mail-body > .k-mail-gutter > .k-mail-gut-btn .k-icon { transform: rotate(180deg); }
.k-mail[data-pane="top"][data-read="off"] .k-mail-body > .k-mail-gutter > .k-mail-gut-btn .k-icon { transform: none; }

/* THE READING PANE, CLOSED. Its own state, so closing it does not lose WHERE he keeps it -
   opening it again puts it back on the right, below or on top exactly as before. The divider
   stays put so the arrow is always there to press. */
.k-mail[data-read="off"] .k-mail-read { display: none; }
.k-mail[data-read="off"] .k-mail-body { grid-template-columns: minmax(0, 1fr) var(--mail-gutter); grid-template-rows: minmax(0, 1fr); }
.k-mail[data-pane="top"][data-read="off"] .k-mail-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--mail-gutter) minmax(0, 1fr); }
.k-mail[data-pane="below"][data-read="off"] .k-mail-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) var(--mail-gutter); }
.k-mail[data-read="off"] .k-mail-body > .k-mail-gutter { cursor: default; }
.k-mail[data-read="off"] .k-mail-body > .k-mail-gutter::after { opacity: 0 !important; }
.k-mail[data-read="off"] .k-mail-list { border-right: 0; border-bottom: 0; }
/* the pane switched off in settings: there is nothing to open, so no arrow rather than a dead one */
.k-mail[data-pane="off"] .k-mail-body > .k-mail-gut-btn, .k-mail[data-pane="off"] .k-mail-gut-btn[data-win="read"] { display: none; }

/* THE MODULE BAR'S OWN ARROW. The rail scrolls, so the arrow rides at the top of it rather
   than overhanging the edge, where the scroll box would cut it in half. */
.k-mail-rail-btn { flex: 0 0 auto; align-self: center; width: 26px; height: 22px; margin-bottom: 4px; }
.k-mail-rail-btn .k-icon { transform: rotate(90deg); }
.k-mail[data-rail="off"] .k-mail-rail-btn .k-icon { transform: rotate(-90deg); }
/* closed, the bar leaves a sliver carrying its arrow - never nothing to press */
.k-mail[data-rail="off"][data-layout="ribbon"] { grid-template-columns: 34px min(var(--mail-nav), 26%) var(--mail-gutter) minmax(0, 1fr); }
.k-mail[data-rail="off"][data-folders="off"][data-layout="ribbon"] { grid-template-columns: 34px 18px minmax(0, 1fr); }
.k-mail[data-rail="off"] > .k-mail-rail { display: flex; padding: 8px 4px; }
.k-mail[data-rail="off"] > .k-mail-rail > *:not(.k-mail-rail-btn) { display: none; }

/* a phone is one column and a drawer - no dividers, so no handles */
@media (max-width: 850px) { .k-mail-gut-btn, .k-mail-rail-btn { display: none; } }

/* the folders' reopen sliver uses the same arrow language as the dividers: it points RIGHT,
   because that is the way the column comes back in */
.k-mail-reopen .k-icon { transform: rotate(-90deg); }

/* HOW FAR BACK - said in words, so there is nothing to work out */
.k-mail-range { display: flex; align-items: center; gap: 6px; }
.k-mail-range > span { font-size: var(--t-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.k-mail-range select { font-weight: 700; }
@container (max-width: 520px) { .k-mail-range > span { display: none; } }

/* ══ HOW MAIL FILES — the picture (Peter, 13 Nov: "I'm a visual person ... do a mock-up") ══════════
   Traffic lights and arrows only. No colour invented: green/amber/red are the lights, blue is an
   action, grey is out of the way. */
.k-hif-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.k-hif-node {
  display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 4px 12px; align-items: start;
  padding: 12px 14px; border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--r-md); background: var(--card);
}
.k-hif-node > * { grid-column: 2; }
.k-hif-light { grid-column: 1; grid-row: 1 / -1; width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; }
.k-hif-node > b { font-size: var(--t-md); font-weight: 800; }
.k-hif-node > small { color: var(--muted); font-size: var(--t-sm); }
.k-hif-to { font-weight: 800; font-size: var(--t-sm); }
.k-hif-to::before { content: "\2192"; opacity: .5; margin-right: 6px; }
.k-hif-makes { font-size: var(--t-xs); color: var(--muted); }
.k-hif-node.is-green { border-left-color: var(--green); } .k-hif-node.is-green .k-hif-light { background: var(--green); } .k-hif-node.is-green .k-hif-to { color: var(--green); }
.k-hif-node.is-amber { border-left-color: var(--amber); } .k-hif-node.is-amber .k-hif-light { background: var(--amber); } .k-hif-node.is-amber .k-hif-to { color: var(--amber); }
.k-hif-node.is-blue  { border-left-color: var(--blue-line); } .k-hif-node.is-blue .k-hif-light { background: var(--go-soft-ink); } .k-hif-node.is-blue .k-hif-to { color: var(--go-soft-ink); }
.k-hif-node.is-grey  { border-left-color: var(--line); } .k-hif-node.is-grey .k-hif-light { background: var(--muted); } .k-hif-node.is-grey .k-hif-to { color: var(--muted); }

/* the demo rows, shown exactly as the list draws them. The row grid leans on variables that only
   exist inside .k-mail, so they are repeated here or the rows collapse into stripes. */
.k-hif-demo {
  --mail-pad: 9px; --mail-avatar: 38px; --mail-row-min: var(--tap); --mail-lead: 1.35;
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--card);
}
.k-hif-rows { overflow: visible; }
.k-hif-rows > li { display: block; border-bottom: 1px solid var(--line); }
.k-hif-rows > li:last-child { border-bottom: 0; }
.k-hif-rows > li > .k-mail-row { display: grid; grid-template-columns: 4px var(--mail-avatar) minmax(0, 1fr) auto; gap: 0 10px; align-items: center; cursor: default; }
.k-hif-rows > li > .k-mail-row:has(> .k-auto--row) { grid-template-columns: 4px auto var(--mail-avatar) minmax(0, 1fr) auto; }
.k-hif-note { display: block; padding: 0 12px 10px 22px; font-size: var(--t-xs); color: var(--muted); }

.k-hif-open { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; background: var(--card); }
.k-hif-openhead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.k-hif-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.k-hif-open .k-hif-note { padding: 8px 0 0; }

.k-hif-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.k-hif-steps > li { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); position: relative; }
.k-hif-steps > li + li::before { content: "\2192"; position: absolute; left: -11px; top: 50%; transform: translateY(-50%); opacity: .5; font-weight: 700; }
.k-hif-n { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--go-soft); color: var(--go-soft-ink); font-weight: 800; font-size: var(--t-xs); }
.k-hif-steps b { font-size: var(--t-sm); font-weight: 800; }
.k-hif-steps small { color: var(--muted); font-size: var(--t-xs); }

.k-hif-lights { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.k-hif-stat { padding: 12px; border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--r-md); background: var(--card); display: grid; gap: 2px; }
.k-hif-stat b { font-size: var(--t-xl, 24px); font-weight: 800; line-height: 1.1; }
.k-hif-stat small { color: var(--muted); font-size: var(--t-xs); }
.k-hif-stat.is-green { border-left-color: var(--green); } .k-hif-stat.is-green b { color: var(--green); }
.k-hif-stat.is-amber { border-left-color: var(--amber); } .k-hif-stat.is-amber b { color: var(--amber); }
.k-hif-stat.is-grey  { border-left-color: var(--line); }  .k-hif-stat.is-grey b { color: var(--muted); }

@media (max-width: 850px) {
  .k-hif-steps { grid-template-columns: minmax(0, 1fr); }
  .k-hif-steps > li + li::before { content: "\2193"; left: 50%; top: -11px; transform: translateX(-50%); }
  .k-hif-lights { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.k-hif-catchup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.k-note.is-green { padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--r-md); background: var(--card); font-weight: 600; }

/* ══ THE SIX LIGHTS AS ONE THIN STRIP ═════════════════════════════════════════════
   Peter, 13 Nov, his Outlook beside GO Mail: "my eyes are happy and it's easy ... I look at
   yours and I'm getting a headache and straining." Six tall boxes in two rows were eating
   110px off the top of every list and shouting louder than the mail. Outlook puts a thin
   line of filters there, so this does too: one row, label and count on the same line,
   scrolls sideways if the column is narrow rather than stacking. */
.k-mail[data-density="tight"] .k-mailchips,
.k-mail[data-density="compact"] .k-mailchips,
.k-mail[data-density="cosy"] .k-mailchips {
  display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  gap: 4px; padding: 5px 10px; grid-template-columns: none;
}
.k-mail[data-density="tight"] .k-mailchips::-webkit-scrollbar,
.k-mail[data-density="compact"] .k-mailchips::-webkit-scrollbar,
.k-mail[data-density="cosy"] .k-mailchips::-webkit-scrollbar { display: none; }
.k-mail[data-density="tight"] .k-mailchips a,
.k-mail[data-density="compact"] .k-mailchips a,
.k-mail[data-density="cosy"] .k-mailchips a {
  flex: 0 0 auto; flex-direction: row; gap: 5px; height: 26px; padding: 0 9px;
  border-radius: 999px; white-space: nowrap;
}
.k-mail[data-density="tight"] .k-mailchips a b,
.k-mail[data-density="compact"] .k-mailchips a b,
.k-mail[data-density="cosy"] .k-mailchips a b { font-size: var(--t-xs); font-weight: 600; max-width: none; }
.k-mail[data-density="tight"] .k-mailchips a small,
.k-mail[data-density="compact"] .k-mailchips a small,
.k-mail[data-density="cosy"] .k-mailchips a small { font-size: var(--t-xs); font-weight: 700; }
/* the column is narrow on a phone - there the strip still scrolls, it never stacks */
@container (max-width: 620px) {
  .k-mail[data-density="tight"] .k-mailchips,
  .k-mail[data-density="compact"] .k-mailchips,
  .k-mail[data-density="cosy"] .k-mailchips { grid-template-columns: none; }
}

/* what a job cost us — the supplier bills filed onto it from Mail (13 Nov) */
.k-jobcosts .k-hint { display: block; }
.k-jobcost-bill { display: flex; align-items: center; gap: 4px; }
.k-jobcost-bill input { width: 92px; min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: 700 var(--t-sm) var(--font); }

/* WHERE WE ARE — the three-column board (13 Nov) */
.k-wwa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.k-wwa-col { border-top: 4px solid var(--line); }
.k-wwa-col.is-green { border-top-color: var(--green); }
.k-wwa-col.is-amber { border-top-color: var(--amber); }
.k-wwa-col.is-red   { border-top-color: var(--red); }
.k-wwa-col h2 { display: flex; align-items: center; gap: 8px; font-size: var(--t-md); margin: 0 0 10px; }
.k-wwa-col ol { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.k-wwa-col li { font-size: var(--t-sm); line-height: 1.45; }
.k-wwa-col li small { display: block; color: var(--muted); font-size: 11px; font-family: ui-monospace, monospace; margin-top: 2px; }
.k-wwa-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.k-wwa-plain li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; align-items: start; font-size: var(--t-sm); line-height: 1.45; }
.k-wwa-plain .k-dot { margin-top: 6px; }
@media (max-width: 1000px) { .k-wwa { grid-template-columns: minmax(0, 1fr); } }

/* THE EXPENSE TAG ON A ROW, and Expenses as a filter rather than a fourth light (13 Nov).
   An invoice is "Do something" AND an expense, so what it IS rides on the row as a tag while
   the light says only how urgent it is. */
.k-rowtag { align-self: center; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); background: var(--soft); }
.k-rowtag--money { color: var(--go-soft-ink); background: var(--go-soft); border-color: var(--blue-line); }
.k-mail-rows a.k-mail-row:has(> .k-rowtag):not(:has(> .k-auto--row)) { grid-template-columns: 4px auto var(--mail-avatar) minmax(0, 1fr) auto auto; }
.k-mail-rows a.k-mail-row:has(> .k-auto--row):has(> .k-rowtag) { grid-template-columns: 4px auto auto var(--mail-avatar) minmax(0, 1fr) auto auto; }
/* the filter sits apart from the three lights */
.k-mailchips .k-mailchip-filter { margin-left: auto; }
.k-mail[data-density="tight"] .k-mailchips .k-mailchip-filter,
.k-mail[data-density="cosy"] .k-mailchips .k-mailchip-filter { margin-left: 10px; border-style: dashed; }

/* MORE — the six occasional buttons, folded (13 Nov) */
.k-mail-more { margin-top: 2px; }
.k-mail-more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
.k-mail-more > summary::-webkit-details-marker { display: none; }
.k-mail-more[open] > summary { background: var(--go-soft); color: var(--go-soft-ink); border-color: var(--blue-line); }
.k-mail-more .k-mail-tools { margin-top: 8px; }

/* At tight/cosy density the avatar is not drawn at all, so a tagged row has ONE FEWER grid item than
   at comfy. Without these the sender and subject land in the 0px avatar column and vanish (13 Nov). */
.k-mail[data-density="tight"] .k-mail-rows a.k-mail-row:has(> .k-rowtag):not(:has(> .k-auto--row)),
.k-mail[data-density="compact"] .k-mail-rows a.k-mail-row:has(> .k-rowtag):not(:has(> .k-auto--row)) {
  grid-template-columns: 4px auto minmax(0, 1fr) auto;
}
.k-mail[data-density="tight"] .k-mail-rows a.k-mail-row:has(> .k-auto--row):has(> .k-rowtag),
.k-mail[data-density="compact"] .k-mail-rows a.k-mail-row:has(> .k-auto--row):has(> .k-rowtag) {
  grid-template-columns: 4px auto auto minmax(0, 1fr) auto;
}
/* the Tools fold rides on the same line as File to job / Make expense, not a line of its own */
.k-mail-more { display: inline-block; margin-top: 0; }

/* .k-mail-actions is position:sticky, and a sticky child paints straight through a closed <details>
   in Chrome - so all six "folded" tools were still sitting on the screen. Caught by the walk, 13 Nov. */
.k-mail-more:not([open]) .k-mail-tools { display: none; }
.k-mail-more .k-mail-tools { position: static; }

/* the tray, one row per sender (13 Nov) */
.k-sender-count { margin-left: 8px; font-size: var(--t-xs); font-weight: 700; color: var(--go-soft-ink); background: var(--go-soft); border: 1px solid var(--blue-line); border-radius: 999px; padding: 1px 8px; }
.k-sender-subjects { color: var(--muted); font-style: italic; }

/* ── THE REPLY BOX, BUILT TO MATCH GMAIL (13 Nov) ─────────────────────────────
   He sent the Gmail screenshot and asked for that shape: a bordered card at the
   foot of the email, the recipient on top, then the typing area, then ONE blue
   Send pill on the bottom left and a bin on the right. Same screen throughout. */
.k-reply { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 10px; }
.k-reply.is-shut { display: none; }
.k-reply-face { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; margin-top: 4px;
  background: var(--go-soft); color: var(--go-soft-ink); font-weight: 700; font-size: var(--t-sm);
  display: flex; align-items: center; justify-content: center; }
.k-reply-card { flex: 1 1 auto; min-width: 0; display: block; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; }

.k-reply-to { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px;
  border-bottom: 1px solid var(--line); color: var(--muted); }
.k-reply-to > .k-icon { flex: 0 0 auto; }
.k-reply-to input { flex: 1 1 auto; min-width: 0; border: 0; background: none; font: inherit;
  font-size: var(--t-sm); color: var(--ink); padding: 6px 4px; border-radius: var(--r-sm); }
.k-reply-to input:focus { outline: 2px solid var(--focus); outline-offset: 0; background: var(--soft); }
.k-reply-out { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--r-sm); color: var(--muted); }
.k-reply-out:hover { background: var(--soft); color: var(--ink); }

.k-reply textarea { display: block; width: 100%; box-sizing: border-box; border: 0; resize: vertical;
  font: inherit; font-size: var(--t-md); line-height: 1.55; color: var(--ink); background: var(--card);
  padding: 12px 14px; min-height: 150px; }
.k-reply textarea:focus { outline: 0; }

.k-reply-bar { display: flex; align-items: center; gap: 4px; padding: 8px 10px 10px 12px; }
.k-reply-send { border-radius: var(--r-pill); min-width: 94px; min-height: 38px; justify-content: center;
  font-weight: 600; padding: 0 20px; }
.k-reply-send[disabled] { opacity: .5; }
.k-reply-bar .k-iconbtn { width: 34px; height: 34px; }
.k-reply-bin { margin-left: auto; }
.k-reply-bin:hover { background: var(--red-bg); color: var(--red-ink); }
.k-reply-bar .k-hint { font-size: var(--t-xs); min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding: 0 6px; }
/* TALK IT, THEN TIDY IT (16 Nov). Its own row under the box, above Send, so nothing squashes on a phone:
   Talk · Tidy it up · what it is doing · and, once it has written it, the three ways back. */
.k-reply-talk { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 8px 10px 0 12px; }
.k-reply-mic.is-live { background: var(--red-bg); color: var(--red-ink); border-color: var(--red-line); }
.k-reply-mic.is-live .k-icon { animation: k-mic-beat 1.1s ease-in-out infinite; }
@keyframes k-mic-beat { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .k-reply-mic.is-live .k-icon { animation: none; } }
.k-reply-tidy[disabled] { opacity: .5; }
.k-reply-state { font-size: var(--t-xs); color: var(--go-soft-ink); min-width: 0; flex: 1 1 140px; }
.k-reply-state.is-live { color: var(--blue-ink); font-weight: 600; }
.k-reply-state.is-ok { color: var(--green-ink); font-weight: 600; }
.k-reply-state.is-bad { color: var(--red-ink); font-weight: 600; }
.k-reply-after { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.k-reply-after .k-linkbtn { white-space: nowrap; }

@media (max-width: 560px) {
  .k-reply { gap: 8px; }
  .k-reply-face { display: none; }
  .k-reply-bar .k-hint { display: none; }
  /* The state line is the one that must NOT hide on a phone: it is how he knows it is listening. */
  .k-reply-talk { padding-left: 10px; }
  .k-reply-state { flex-basis: 100%; }
  .k-reply-after { flex-basis: 100%; }
}

/* CONVERSATIONS (13 Nov). One row per conversation, the rest folded under it, the way Outlook has it.
   The list item is a flex row (tick + row), so the fold has to be told to take a line of its own -
   otherwise it sits beside the email and the list reads as gibberish in a narrow pane. */
.k-mail-rows > li:has(> .k-convo) { flex-wrap: wrap; }
.k-mail-rows > li > .k-convo { flex: 1 0 100%; min-width: 0; }

.k-convo-n { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px;
  margin-left: 6px; padding: 0 5px; border-radius: var(--r-pill); background: var(--grey-bg);
  color: var(--grey-ink); font-size: 11px; font-weight: 700; line-height: 1; }
.k-mail-row.is-unread .k-convo-n { background: var(--go-soft); color: var(--go-soft-ink); }

.k-convo > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 3px 12px 5px 26px; font-size: var(--t-xs); color: var(--muted); }
.k-convo > summary::-webkit-details-marker { display: none; }
.k-convo > summary:hover { color: var(--go); text-decoration: underline; }
.k-convo > summary .k-icon { flex: 0 0 auto; transition: transform .12s ease; }
.k-convo[open] > summary .k-icon { transform: rotate(180deg); }
.k-convo:not([open]) .k-convo-rest { display: none; }

.k-convo-rest { list-style: none; margin: 0 0 4px; padding: 0; }
.k-convo-row { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; column-gap: 8px;
  align-items: baseline; padding: 5px 12px 6px 22px; margin-left: 14px; text-decoration: none;
  color: var(--ink); border-left: 2px solid var(--line); font-size: var(--t-sm); }
.k-convo-row:hover { background: var(--soft); }
.k-convo-row .k-mail-light { grid-column: 1; grid-row: 1 / span 2; align-self: stretch; }
.k-convo-who { grid-column: 2; grid-row: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-convo-row time { grid-column: 3; grid-row: 1; color: var(--muted); font-size: var(--t-xs); white-space: nowrap; }
.k-convo-sub { grid-column: 2 / -1; grid-row: 2; color: var(--muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.k-convo-row.is-unread .k-convo-who, .k-convo-row.is-unread .k-convo-sub { font-weight: 600; color: var(--ink); }

/* BACK TO THE TOP - at the bottom of a long email, where he ends up. */
.k-totop-row { display: flex; justify-content: center; margin: 14px 0 6px; }
.k-totop-row .k-btn .k-icon { transform: rotate(-90deg); }

/* A shut <details> still paints its children in this app (same as the Tools fold), so say it plainly. */
.k-convo:not([open]) .k-convo-rest { display: none; }

/* ── THE FRAME OPENS AND SHUTS FROM ONE PLACE (13 Nov) ─────────────────────────
   Peter: "you got one at the top where the mail one is, and you got one halfway
   down. Can you have them all at the top? It's just easy to know where it is."
   The dividers still drag to size a column - they just no longer carry a button
   of their own, and nothing hides down the side of the screen. */
.k-mail-gut-btn, .k-mail-rail-btn, .k-mail-reopen { display: none !important; }

/* THE "MORE" MENU WAS UNREADABLE. It is an absolutely-positioned popup and the reading pane
   scrolls (overflow:auto), so the pane cut it in half. Inside the pane it opens as a block
   under the button instead - it pushes the email down and can never be clipped. */
.k-mail-read .k-menu[open] > .k-menu-pop,
[data-mail-pane] .k-menu[open] > .k-menu-pop,
.k-mail-actions .k-menu[open] > .k-menu-pop {
  position: static; width: auto; min-width: 0; margin: 6px 0 2px;
  box-shadow: none; border: 1px solid var(--line); border-radius: var(--r-sm);
  display: flex; flex-wrap: wrap; gap: 2px; padding: 4px;
}
.k-mail-read .k-menu[open] > .k-menu-pop > *,
[data-mail-pane] .k-menu[open] > .k-menu-pop > *,
.k-mail-actions .k-menu[open] > .k-menu-pop > * { flex: 0 0 auto; }
.k-mail-read .k-menu[open],
[data-mail-pane] .k-menu[open],
.k-mail-actions .k-menu[open] { flex: 1 0 100%; }

/* DELETE AND ARCHIVE ON THE ROW, THE GMAIL WAY (13 Nov). First go sat them beside the flag over
   the date and he hated it on sight: "have a look where you put it, make it cleaner, that's shit."
   Gmail swaps the date out for a clean set of icons at the right edge on hover. So does this. */
.k-mail-rowacts { display: flex; align-items: center; gap: 2px; }
.k-mail-rowact { display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 0; background: none; border-radius: 50%;
  color: var(--muted); cursor: pointer; }
.k-mail-rowact:hover { background: var(--soft); color: var(--ink); }
.k-mail-rowact[data-rowact="delete"]:hover { background: var(--red-bg); color: var(--red-ink); }

/* The icons take the date's place, so nothing is added to the row and nothing shifts. The flag
   steps aside with the date - it is on the row for good when the mouse is away. */
.k-mail-rows a.k-mail-row { position: relative; }
.k-mail-rowacts { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  z-index: 1; opacity: 0; pointer-events: none; }
.k-mail-rows > li:hover .k-mail-rowacts,
.k-mail-rows > li:focus-within .k-mail-rowacts { opacity: 1; pointer-events: auto; }
.k-mail-rows > li:hover a.k-mail-row > .k-when,
.k-mail-rows > li:hover a.k-mail-row > .k-mail-flag,
.k-mail-rows > li:focus-within a.k-mail-row > .k-when,
.k-mail-rows > li:focus-within a.k-mail-row > .k-mail-flag { visibility: hidden; }
/* No hover on a phone, so they simply sit there beside the date. */
@media (hover: none) {
  .k-mail-rowacts { position: static; transform: none; opacity: 1; pointer-events: auto; }
  .k-mail-rows > li:hover a.k-mail-row > .k-when, .k-mail-rows > li:hover a.k-mail-row > .k-mail-flag { visibility: visible; }
}

/* Third time this has bitten: a shut <details> still paints its panel in this app. Say it plainly,
   or every item inside More shows all the time and the button pile is back. */
.k-menu:not([open]) > .k-menu-pop { display: none !important; }
.k-reply-penny { min-height: 34px; padding: 0 12px; border-radius: var(--r-pill); font-size: var(--t-sm); }
.k-btn--stop { border-color: var(--amber-line); color: var(--amber-ink); background: var(--amber-bg); }
.k-btn--stop:hover { background: var(--amber-bg); border-color: var(--amber); }
.k-toast-undo { margin-left: 10px; border: 0; background: none; padding: 2px 6px; border-radius: var(--r-sm);
  font: inherit; font-weight: 700; color: inherit; text-decoration: underline; cursor: pointer; }
.k-toast-undo:hover { background: rgba(255,255,255,.35); }

/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════
   GO MAIL — THE ONE SHAPE (Peter, 13 Nov). Gmail's shape on Outlook's greys, compact, one row of buttons.
   "This email setup, we're going to push it through the whole CRM." Everything below is the Mail screen's look;
   the colours still come from Mail settings (Looks) as --mail-* variables, so nothing here types a colour. */

/* THE GO LAYOUT'S GRID: the one bar across the top, then mailboxes · divider · (list · divider · email). */
.k-mail[data-layout="go"] { grid-template-rows: auto minmax(0, 1fr); }
.k-mail[data-layout="go"] > .k-mail-topbar { grid-column: 1 / -1; grid-row: 1; }
.k-mail[data-layout="go"] > .k-mail-nav { grid-column: 1; grid-row: 2; }
.k-mail[data-layout="go"] > .k-mail-gutter { grid-column: 2; grid-row: 2; }
.k-mail[data-layout="go"] > .k-mail-body { grid-column: 3; grid-row: 2; }
.k-mail[data-layout="go"] > .k-mail-scrim { grid-column: 1; grid-row: 1; }
.k-mail[data-layout="go"][data-folders="off"] > .k-mail-reopen { grid-column: 1; grid-row: 2; }
.k-mail[data-layout="go"][data-folders="off"] { grid-template-columns: 18px 0 minmax(0, 1fr); }
.k-mail[data-layout="go"][data-folders="off"] > .k-mail-nav, .k-mail[data-layout="go"][data-folders="off"] > .k-mail-gutter { display: none; }

/* THE ONE BAR */
.k-mail-topbar { --ink: var(--mail-chrome-ink, var(--ink-std)); --muted: var(--mail-chrome-dim, var(--muted-std)); --line: var(--mail-chrome-line, var(--line-std));
  display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 5px 10px; background: var(--mail-chrome, var(--soft)); color: var(--ink); border-bottom: 1px solid var(--line); min-width: 0; }
.k-mail-topbar .k-iconbtn { width: 34px; height: 34px; color: var(--ink); }
.k-mail-topbar .k-iconbtn:hover, .k-mail-topbar .k-iconbtn[aria-pressed="true"] { background: var(--mail-chrome-hover, var(--card)); }
.k-mail-search { flex: 1 1 auto; max-width: 640px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--mail-main, var(--card)); color: var(--mail-main-dim, var(--muted)); }
.k-mail-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--mail-main-ink, var(--ink-std)); font: 500 var(--t-sm) var(--font); outline: none; }
.k-mail-search input::placeholder { color: var(--mail-main-dim, var(--muted)); }
.k-mail-search:focus-within { border-color: var(--go); box-shadow: 0 0 0 2px var(--go-soft); }
.k-mail-new { min-height: 34px; padding: 0 14px; border-radius: var(--r-sm); white-space: nowrap; }
.k-mail-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.k-mail-topbar .k-mail-win { margin-left: 4px; padding-left: 6px; border-left: 1px solid var(--line); }
.k-mail[data-layout="go"] .k-mail-top .k-mail-navbtn { display: none; }

/* THE LIST HEAD: folder name small, how-far-back at the right, nothing else */
.k-mail[data-layout="go"] .k-mail-top { padding: 6px 10px 4px; border-bottom: 0; min-height: 0; }
.k-mail[data-layout="go"] .k-mail-top h1 { font-size: var(--t-md); font-weight: 800; }
.k-mail[data-layout="go"] .k-mail-top .k-hint { font-size: var(--t-xs); }
.k-mail[data-layout="go"] .k-mail-top select { min-height: 28px; font-size: var(--t-xs); padding: 0 6px; }

/* THE THREE LIGHTS AS TABS (Gmail's row: an underline, a dot, a count) */
.k-mail[data-layout="go"] .k-mailchips { display: flex; gap: 0; padding: 0 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.k-mail[data-layout="go"] .k-mailchips::-webkit-scrollbar { display: none; }
.k-mail[data-layout="go"] .k-mailchips a { flex: 0 0 auto; flex-direction: row; gap: 6px; height: auto; min-height: 36px; padding: 0 10px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: var(--muted); white-space: nowrap; }
.k-mail[data-layout="go"] .k-mailchips a b { font-size: var(--t-sm); font-weight: 700; }
.k-mail[data-layout="go"] .k-mailchips a small { font-size: var(--t-xs); font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); background: var(--soft); color: var(--muted); }
.k-mail[data-layout="go"] .k-mailchips a:hover { background: var(--soft); }
.k-mail[data-layout="go"] .k-mailchips a[aria-current="true"] { color: var(--go-soft-ink); border-bottom-color: var(--go); background: transparent; }
.k-mail[data-layout="go"] .k-mailchips a[aria-current="true"] small { background: var(--go-soft); color: var(--go-soft-ink); }
/* the filter row: sort · Expenses · Unread · Flagged — small pills, all one size */
.k-mail[data-layout="go"] .k-mail-bar { padding: 4px 8px; }
.k-mail[data-layout="go"] .k-mail-bar .k-btn--thin { min-height: 26px; padding: 0 9px; font-size: var(--t-xs); border-radius: var(--r-pill); }
.k-mail[data-layout="go"] .k-mail-bar .k-btn--thin small { font-weight: 700; color: var(--muted); }
.k-mail[data-layout="go"] .k-mail-bar .k-btn--thin[aria-pressed="true"] { background: var(--go-soft); color: var(--go-soft-ink); border-color: var(--blue-line); }
.k-mail[data-layout="go"] .k-mail-bar .k-btn--thin[aria-pressed="true"] small { color: var(--go-soft-ink); }

/* THE ROWS: light · sender · subject — preview · time, tags under the time. Compact. */
.k-mail[data-layout="go"] .k-mail-rows a.k-mail-row { gap: 0 8px; }
.k-mail[data-layout="go"] .k-mail-rows a.k-mail-row:has(> .k-auto--row), .k-mail[data-layout="go"] .k-mail-rows a.k-mail-row:has(> .k-rowtag) { grid-template-columns: 4px var(--mail-avatar) minmax(0, 1fr) auto auto; }
.k-mail[data-layout="go"][data-density="tight"] .k-mail-rows a.k-mail-row, .k-mail[data-layout="go"][data-density="tight"] .k-mail-rows a.k-mail-row:has(> .k-rowtag) { grid-template-columns: 4px minmax(0, 1fr) auto auto; }
.k-mail[data-layout="go"] .k-mail-row .k-when { display: grid; justify-items: end; gap: 2px; }
.k-mail[data-layout="go"] .k-mail-row .k-when time { display: inline-flex; align-items: center; gap: 3px; }
.k-rowtags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.k-rowtags:empty { display: none; }
.k-rowtag--where { color: var(--go-soft-ink); background: var(--go-soft); border-color: var(--blue-line); text-transform: none; letter-spacing: 0; font-size: 10px; }
.k-rowtag--money { text-transform: none; letter-spacing: 0; font-size: 10px; }
.k-rowtag--server { color: var(--muted); background: var(--soft); border-color: var(--line); text-transform: none; letter-spacing: 0; font-size: 10px; }
.k-mail[data-layout="go"] .k-mail-rows a.k-mail-row[aria-current="true"] { box-shadow: inset 3px 0 0 var(--go); }

/* THE EMAIL: one bar, then the subject, the sender, where it went, the reply, the email on paper */
.k-mail[data-layout="go"] .k-mail-read { padding: 0; }
.k-mail[data-layout="go"] .k-mail-msg { padding: 0 0 28px; max-width: none; }
.k-mail-bar1 { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; padding: 5px 10px; margin: 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 6; background: var(--mail-pane, var(--card)); }
.k-bar1-do, .k-bar1-file { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; }
.k-bar1-file { gap: 6px; }
.k-bar1-sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.k-bar1-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 9px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); font: 600 var(--t-sm) var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; list-style: none; }
.k-bar1-btn::-webkit-details-marker { display: none; }
.k-bar1-btn:hover { background: var(--soft); }
.k-bar1-btn.is-go { color: var(--go-soft-ink); }
.k-bar1-btn .k-icon { color: var(--go); }
.k-bar1-btn.is-go .k-icon { color: var(--go-soft-ink); }
.k-mail-bar1 form { display: inline-flex; }
.k-mail-bar1 .k-btn { min-height: 32px; }
.k-bar1-more[open] > .k-bar1-btn { background: var(--soft); }
.k-mail-actions.k-mail-bar1 .k-menu[open] > .k-menu-pop { position: absolute; top: calc(100% + 4px); left: 0; right: auto; display: flex; flex-direction: column; flex-wrap: nowrap; width: max-content; min-width: 240px; max-width: min(360px, 90vw); max-height: 70vh; overflow: auto; }
.k-mail-actions.k-mail-bar1 .k-menu[open] { flex: 0 0 auto; position: relative; }
.k-bar1-light > summary { cursor: pointer; }
.k-bar1-light .k-menu-pop .k-mailchip { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; text-align: left; width: 100%; min-height: 44px; padding: 6px 12px; border: 0; }
.k-bar1-light .k-menu-pop .k-mailchip b { font-weight: 700; }
.k-bar1-light .k-menu-pop .k-mailchip small { grid-column: 2; font-weight: 500; color: var(--muted); font-size: var(--t-xs); }
.k-bar1-light .k-menu-pop .k-mailchip[aria-pressed="true"] { background: var(--go-soft); color: var(--go-soft-ink); }
.k-bar1-light .k-menu-pop form { display: block; }
.k-bar1-light .k-menu-pop, .k-bar1-more .k-menu-pop { left: auto; right: 0; }
.k-mail-bar1 .k-chip { min-height: 30px; padding: 0 11px; font-size: var(--t-sm); border-radius: var(--r-sm); white-space: nowrap; }
.k-chip.is-amber { background: var(--amber-soft, #fbefd3); border-color: var(--amber-line, #e0b35a); color: var(--amber-ink, #6b4a00); }
.k-chip.is-green { background: var(--green-soft, #e3f1e8); border-color: var(--green-line, #a9d8b9); color: var(--green-ink, #1f6b3a); }
.k-chip.is-grey { background: var(--soft); color: var(--muted); }
.k-menu-form { padding: 6px 12px; display: grid; gap: 6px; font: 600 var(--t-sm) var(--font); }
.k-menu-form label { display: inline-flex; align-items: center; gap: 8px; }
.k-menu-form .k-rowform { display: flex; gap: 6px; }
.k-menu-form select { min-width: 0; flex: 1; }
.k-mail[data-layout="go"] .k-mail-msg > h1, .k-mail[data-layout="go"] .k-mail-msg > .k-mail-meta, .k-mail[data-layout="go"] .k-mail-msg > .k-mail-where, .k-mail[data-layout="go"] .k-mail-msg > .k-mail-atts,
.k-mail[data-layout="go"] .k-mail-msg > .k-mail-images, .k-mail[data-layout="go"] .k-mail-msg > .k-mail-reply, .k-mail[data-layout="go"] .k-mail-msg > .k-reply, .k-mail[data-layout="go"] .k-mail-msg > .k-mail-content,
.k-mail[data-layout="go"] .k-mail-msg > .k-totop-row, .k-mail[data-layout="go"] .k-mail-msg > .k-mail-toolout { margin-left: 16px; margin-right: 16px; }
.k-mail[data-layout="go"] .k-mail-msg > h1 { margin-top: 12px; font-size: calc(var(--t-lg) * .95); }
.k-mail[data-layout="go"] .k-mail-meta { margin-bottom: 8px; }
.k-mail[data-layout="go"] .k-mail-meta .k-avatar { width: 36px; height: 36px; }
.k-mail-where { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; padding: 6px 10px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft); font-size: var(--t-sm); color: var(--ink); }
.k-mail-where .k-dot { width: 10px; height: 10px; }
.k-mail-where .k-dim { color: var(--muted); }
.k-mail-where .k-auto { margin-left: 4px; }
.k-mail-where-do { margin-left: auto; display: inline-flex; gap: 10px; align-items: center; }
.k-mail-where-do form { display: inline; }
.k-mail-where-do button.k-link { border: 0; background: none; padding: 0; font: inherit; color: var(--go-soft-ink); cursor: pointer; text-decoration: underline; }
/* the email itself on white paper inside the grey frame, the way the ribbon layout already had it */
.k-mail[data-layout="go"] .k-mail-msg > .k-mail-content { --ink: var(--paper-ink); --card: var(--paper); --line: var(--paper-rule); background: var(--paper); color: var(--paper-ink); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 18px 20px; }
.k-mail[data-layout="go"] .k-mail-empty { color: var(--ink); }

/* GREYS ON THE PANES. The pane colour is the frame; the list and folders take theirs from settings. */
.k-mail[data-layout="go"] .k-mail-read { --ink: var(--mail-pane-ink, var(--ink-std)); --muted: var(--mail-pane-dim, var(--muted-std)); --line: var(--mail-pane-line, var(--line-std)); --soft: var(--mail-pane-hover, var(--soft-std)); --card: var(--mail-pane-hover, var(--card-std)); }

/* CONTRAST (settings → Look): soft, normal, strong. Text and lines only; the colours he picked stay. */
/* "Soft" is calm ink on a calm page — never a filter over the screen. The old contrast(.94) washed every
   pixel of Mail grey-on-grey; on his phone it read as blurry (Peter, 15 Nov: "it's fucking blurry"). */
.k-mail[data-contrast="soft"]:not([data-theme="dark"]) { --ink-std: #333b47; --muted-std: #5f6978; --line-std: #e3e6ea; }
.k-mail[data-contrast="strong"]:not([data-theme="dark"]) { --ink-std: #0b0e12; --muted-std: #3f4752; --line-std: #9aa3ae; }
.k-mail[data-contrast="strong"]:not([data-theme="dark"]) .k-mail-nav, .k-mail[data-contrast="strong"]:not([data-theme="dark"]) .k-mail-list, .k-mail[data-contrast="strong"]:not([data-theme="dark"]) .k-mail-read, .k-mail[data-contrast="strong"]:not([data-theme="dark"]) .k-mail-topbar { --mail-side-ink: #0b0e12; --mail-main-ink: #0b0e12; --mail-pane-ink: #0b0e12; --mail-chrome-ink: #0b0e12; --mail-side-dim: #3f4752; --mail-main-dim: #3f4752; --mail-pane-dim: #3f4752; --mail-chrome-dim: #3f4752; --mail-side-line: #9aa3ae; --mail-main-line: #9aa3ae; --mail-pane-line: #9aa3ae; --mail-chrome-line: #9aa3ae; }
/* AT NIGHT the same three settings use light inks. Before this, Soft and Strong set day inks whatever the theme, so on a
   dark preset the top bar's buttons (Refresh, Settings…) came out dark-on-dark — Peter, 15 Nov: "unreadable". */
.k-mail[data-contrast="soft"][data-theme="dark"] { --ink-std: #d9dde3; --muted-std: #9aa3b0; --line-std: #3a3f46; }
.k-mail[data-contrast="strong"][data-theme="dark"] { --ink-std: #ffffff; --muted-std: #c9ced6; --line-std: #5a6170; }
.k-mail[data-contrast="strong"][data-theme="dark"] .k-mail-nav, .k-mail[data-contrast="strong"][data-theme="dark"] .k-mail-list, .k-mail[data-contrast="strong"][data-theme="dark"] .k-mail-read, .k-mail[data-contrast="strong"][data-theme="dark"] .k-mail-topbar { --mail-side-ink: #ffffff; --mail-main-ink: #ffffff; --mail-pane-ink: #ffffff; --mail-chrome-ink: #ffffff; --mail-side-dim: #c9ced6; --mail-main-dim: #c9ced6; --mail-pane-dim: #c9ced6; --mail-chrome-dim: #c9ced6; --mail-side-line: #5a6170; --mail-main-line: #5a6170; --mail-pane-line: #5a6170; --mail-chrome-line: #5a6170; }
/* and the top bar's buttons always take the bar's own ink, so they can never vanish into it */
.k-mail .k-mail-topbar .k-iconbtn, .k-mail .k-mail-topbar .k-iconbtn .k-icon, .k-mail .k-mail-topbar .k-iconbtn svg { color: var(--ink); }
.k-mail .k-mail-topbar .k-iconbtn { border-color: var(--line); }
.k-mail[data-contrast="strong"] .k-mail-rows a.k-mail-row.is-unread .k-who b { font-weight: 800; }

/* PHONE: the bar's words go, the icons stay; the light and the two chips stay in reach */
@media (max-width: 850px) {
  .k-mail-topbar { padding: 4px 8px; gap: 6px; }
  .k-mail-new span { display: none; }
  .k-mail-new { padding: 0 10px; }
  .k-mail-topbar-right .k-iconbtn:not(:last-child) { display: none; }
  .k-bar1-btn span { display: none; }
  .k-bar1-btn { padding: 0 8px; }
  .k-bar1-btn.is-go span { display: inline; }
  .k-mail-bar1 { padding: 4px 6px; gap: 4px; }
  .k-mail-bar1 .k-chip { min-height: 30px; padding: 0 9px; font-size: var(--t-xs); }
  .k-mail[data-layout="go"] .k-mail-msg > h1, .k-mail[data-layout="go"] .k-mail-msg > .k-mail-meta, .k-mail[data-layout="go"] .k-mail-msg > .k-mail-where, .k-mail[data-layout="go"] .k-mail-msg > .k-mail-atts,
  .k-mail[data-layout="go"] .k-mail-msg > .k-mail-content, .k-mail[data-layout="go"] .k-mail-msg > .k-totop-row, .k-mail[data-layout="go"] .k-mail-msg > .k-mail-toolout { margin-left: 8px; margin-right: 8px; }
  .k-mail[data-layout="go"] .k-mail-msg > .k-mail-content { padding: 12px; }
  .k-mail-where-do { margin-left: 0; flex-basis: 100%; }
}
/* the one shape, second pass: tighter where it wrapped at his 1456 */
.k-mail[data-layout="go"] .k-mail-read { container-type: inline-size; }
@container (max-width: 640px) { .k-bar1-btn:not(.is-go) span { display: none; } .k-bar1-btn { padding: 0 8px; } }
@container (max-width: 440px) { .k-mail-bar1 .k-chip span { display: none; } }
.k-mail[data-layout="go"] .k-mailchips a { padding: 0 7px; }
.k-mail[data-layout="go"] .k-mailchips a small { padding: 0 5px; }
.k-mail[data-layout="go"] .k-mail-list { container-type: inline-size; }
@container (min-width: 480px) { .k-mail[data-layout="go"] .k-mail-bar-when > a > span { display: inline; } }
/* the mailboxes column, compact: one line per mailbox, the address under it only when there is room */
.k-mail[data-density="tight"] .k-mail-acct > summary, .k-mail[data-density="tight"] .k-mail-acctlink { min-height: 32px; padding: 3px 10px; }
/* 14 Nov: the address stays under the mailbox name at every density — "put underneath what the email address is, all of them, so we know". */
.k-mail[data-density="tight"] .k-mail-acct > summary .k-avatar, .k-mail[data-density="tight"] .k-mail-acctlink .k-avatar { width: 22px; height: 22px; font-size: 9px; }
.k-mail[data-density="tight"] .k-mail-acct > summary .k-grow, .k-mail[data-density="tight"] .k-mail-acctlink .k-grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-mail[data-density="tight"] .k-mail-fav a { min-height: 30px; padding: 3px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-mail[data-density="tight"] .k-mail-nav { padding-top: 4px; }
@container (max-width: 560px) { .k-mail[data-layout="go"] .k-mailchips a:not([aria-current="true"]) small { display: none; } .k-mail[data-layout="go"] .k-mailchips a { padding: 0 6px; } }
@media (max-width: 850px) { .k-mail-topbar .k-only-desk { display: none !important; } }
/* READABLE ON ANY COLOUR HE PICKS (Peter, 13 Nov, on the Classic greys: the top-right buttons and the email's
   buttons vanished). Every button in the one bar and the email bar takes its colour from the surface it sits on. */
.k-mail .k-mail-topbar .k-iconbtn { background: transparent; border-color: var(--line); color: var(--ink); }
.k-mail .k-mail-topbar .k-iconbtn .k-icon, .k-mail .k-mail-topbar .k-iconbtn svg { color: inherit; }
.k-mail .k-mail-topbar .k-iconbtn[aria-pressed="true"] { background: var(--mail-chrome-hover, var(--card)); }
.k-mail .k-mail-read .k-mail-bar1 .k-bar1-btn, .k-mail .k-mail-read .k-mail-bar1 .k-bar1-btn .k-icon, .k-mail .k-mail-read .k-mail-bar1 .k-bar1-btn svg { color: var(--ink); }
.k-mail .k-mail-read .k-mail-bar1 .k-bar1-btn.is-go { font-weight: 800; }
.k-mail .k-mail-read .k-mail-bar1 .k-bar1-btn .k-icon { opacity: .85; }
.k-mail .k-mail-read .k-mail-bar1 .k-bar1-btn:hover { background: var(--soft); }
.k-mail .k-mail-read .k-mail-bar1 .k-chip:not(.is-amber):not(.is-green) { background: var(--soft); color: var(--ink); border-color: var(--line); }
.k-mail .k-mail-read .k-mail-bar1 .k-chip.is-grey { color: var(--ink); }
.k-mail .k-mail-read .k-mail-where .k-link, .k-mail .k-mail-read .k-mail-where-do button.k-link { color: var(--ink); }
.k-mail .k-mail-list .k-mailchips a { color: var(--muted); }
.k-mail .k-mail-list .k-mailchips a[aria-current="true"] { color: var(--ink); }
.k-mail .k-mail-list .k-mail-bar .k-btn--thin { color: var(--ink); background: var(--card); border-color: var(--line); }
/* BOUGHT FOR A JOB? — the strip on an expense (13 Nov). Big buttons: it is pressed on the phone. */
.k-forjob { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 14px; margin-bottom: 12px; }
.k-forjob-say { display: inline-flex; align-items: center; gap: 8px; }
.k-forjob-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.k-forjob-btns form { display: inline-flex; }
.k-forjob-btns .k-btn small { font-weight: 600; opacity: .8; margin-left: 4px; }
.k-forjob-other select, .k-forjob-change select { min-height: 40px; max-width: 260px; }
.k-forjob-change { margin-left: auto; }
@media (max-width: 850px) { .k-forjob { padding: 10px; } .k-forjob-btns .k-btn { min-height: 44px; } .k-forjob-change { margin-left: 0; width: 100%; } .k-forjob-change select { max-width: none; width: 100%; } }
/* THE BELONGS LINE — Module Kit (13 Nov). One line under the title: light · what it is · what it is on · the action. */
.k-belongs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; padding: 7px 12px; margin: -4px 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft); font-size: var(--t-sm); color: var(--ink); }
.k-belongs .k-dot { width: 10px; height: 10px; flex: none; }
.k-belongs .k-dim { color: var(--muted); }
.k-belongs .k-link { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.k-belongs-do { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.k-belongs-do form { display: inline-flex; }
.k-belongs-do .k-btn--thin { min-height: 28px; padding: 0 9px; font-size: var(--t-xs); }
.k-belongs-pick { min-height: 28px; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font: 600 var(--t-xs) var(--font); max-width: 180px; }
@media (max-width: 850px) { .k-belongs { padding: 8px 10px; } .k-belongs-do { margin-left: 0; width: 100%; } .k-belongs-do .k-btn--thin { min-height: 38px; font-size: var(--t-sm); } .k-belongs-pick { min-height: 38px; max-width: none; flex: 1; } }
/* the old name on the Mail screen is the same line */
.k-mail-where { margin-top: 0; }
.k-belongs > span { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; }
.k-belongs > span > .k-link { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 850px) {
  .k-belongs { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: start; }
  .k-belongs > .k-dot { margin-top: 5px; }
  .k-belongs > b { grid-column: 2; }
  .k-belongs > span { grid-column: 2; display: flex; }
  .k-belongs > span::first-letter { visibility: hidden; }
  .k-belongs-do { grid-column: 1 / -1; }
  .k-belongs-do form { flex: 1 1 100%; display: flex; }
  .k-belongs-do .k-btn--thin { flex: 1; justify-content: center; }
}
@media (max-width: 850px) { .k-belongs > .k-dot { grid-row: 1; grid-column: 1; } .k-belongs > b { grid-row: 1; } .k-belongs-pick { width: 100%; max-width: 100%; min-width: 0; } .k-belongs-do form { min-width: 0; } }

/* THE STANDARD LIST — Module Kit (13 Nov). One table for every list. Compact, grey, the light first. */
.k-std-tabs { display: flex; gap: 0; padding: 0 6px; border-bottom: 1px solid var(--line); background: var(--soft); border-radius: var(--r-sm) var(--r-sm) 0 0; overflow-x: auto; scrollbar-width: none; }
.k-std-tabs::-webkit-scrollbar { display: none; }
.k-std-tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 10px; color: var(--muted); font-weight: 700; font-size: var(--t-sm); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.k-std-tabs a small { font-size: var(--t-xs); font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.k-std-tabs a:hover { background: var(--card); }
.k-std-tabs a[aria-current="true"] { color: var(--go-soft-ink); border-bottom-color: var(--go); }
.k-std-tabs a[aria-current="true"] small { background: var(--go-soft); color: var(--go-soft-ink); border-color: var(--blue-line); }
.k-std-tabs + .k-std-wrap .k-std { border-top: 0; border-radius: 0 0 var(--r-sm) var(--r-sm); }
.k-std-wrap { overflow-x: auto; }
.k-std { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: var(--t-sm); }
.k-std th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 7px 10px; background: var(--soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.k-std td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.k-std tbody tr:last-child td { border-bottom: 0; }
.k-std tbody tr:hover td { background: var(--go-soft); }
.k-std tbody tr[aria-current="true"] td { box-shadow: inset 3px 0 0 var(--go); }
.k-std-light { width: 26px; padding-right: 0 !important; }
.k-std-light .k-dot { width: 11px; height: 11px; }
.k-std-num a { font-weight: 800; color: var(--go-soft-ink); text-decoration: none; white-space: nowrap; }
.k-std-main { display: block; color: var(--ink); font-weight: 600; }
.k-std-sub { display: block; color: var(--muted); font-size: var(--t-xs); margin-top: 1px; }
.k-std-amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.k-std-amt .k-std-main { font-weight: 700; }
.k-std-date { white-space: nowrap; }
.k-std-st { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.k-std-go { width: 30px; text-align: right; }
.k-std-go a { color: var(--muted); display: inline-flex; }
.k-std-links { min-width: 120px; }
.k-ltag { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 3px; padding: 1px 6px; margin: 1px 3px 1px 0; text-decoration: none; border: 1px solid var(--line); background: var(--soft); color: var(--ink); white-space: nowrap; }
.k-ltag.is-blue { background: var(--go-soft); color: var(--go-soft-ink); border-color: var(--blue-line); }
.k-ltag.is-amber { background: #fbefd3; color: #6b4a00; border-color: #e0b35a; }
.k-ltag.is-green { background: #e3f1e8; color: #1f6b3a; border-color: #a9d8b9; }
.k-ltag.is-red { background: #fbe3e3; color: #7a1f1f; border-color: #e8a0a0; }
a.k-ltag:hover { filter: brightness(.96); }
.k-std td.k-std-what { max-width: 320px; }
.k-std td.k-std-what .k-std-main, .k-std td.k-std-who .k-std-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
/* PHONE: the same row, stacked — number and status on the first line, the rest under, Linked tags last. */
@media (max-width: 850px) {
  .k-std thead { display: none; }
  .k-std, .k-std tbody, .k-std tr { display: block; }
  .k-std tr { display: grid; grid-template-columns: 22px 1fr auto; grid-template-areas: "light num status" "light what what" "light who money" "light links links"; gap: 2px 8px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
  .k-std td { display: block; padding: 0; border: 0; }
  .k-std-light { grid-area: light; padding-top: 3px !important; }
  .k-std-num { grid-area: num; } .k-std-status { grid-area: status; } .k-std-what { grid-area: what; } .k-std-who { grid-area: who; } .k-std-amt { grid-area: money; } .k-std-links { grid-area: links; min-width: 0; }
  .k-std-date, .k-std-go { display: none; }
  .k-std-amt .k-std-sub { display: none; }
  .k-std td.k-std-what .k-std-main, .k-std td.k-std-who .k-std-main { white-space: normal; max-width: none; }
  .k-std-st { font-size: var(--t-xs); }
}
.k-std-links { min-width: 170px; }
/* the Belongs line uses the Linked column's boxes, a touch bigger so they read on a record */
.k-belongs .k-ltag--big { font-size: 11.5px; padding: 3px 8px; margin: 0; display: inline-flex; align-items: center; gap: 4px; white-space: normal; }
.k-belongs > b { margin-right: 2px; }
@media (max-width: 850px) { .k-belongs > .k-ltag--big { grid-column: 2; justify-self: start; } }
/* MADE FROM AN EMAIL — the four-line check (13 Nov) */
.k-fromail { border: 2px solid var(--blue-line); background: var(--go-soft); padding: 12px 14px; margin-bottom: 12px; }
.k-fromail-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--go-soft-ink); }
.k-fromail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 14px; margin: 0 0 10px; }
.k-fromail-grid > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; min-width: 0; }
.k-fromail-grid dt { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.k-fromail-grid dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.k-fromail-grid dd small { display: block; font-weight: 500; color: var(--muted); }
@media (max-width: 850px) { .k-fromail-grid { grid-template-columns: 1fr 1fr; } }

/* THE 13 BOXES on a house (Cashflow, 14 Nov): Jul … Jun + Year end, one light each. Same boxes at every width; they wrap on a phone. */
.k-slots-card { margin-bottom: 16px; }
.k-slots-card h2 { display: flex; align-items: center; gap: 8px; }
.k-slots { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.k-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: var(--tap); padding: 8px 2px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-size: var(--t-xs); }
.k-slot .k-slot-m { font-weight: 700; }
.k-slot .k-slot-w { color: var(--muted); font-size: 10px; }
.k-slot.is-red { background: var(--red-bg); border-color: var(--red-line); }
.k-slot.is-amber { background: var(--amber-bg); border-color: var(--amber-line); }
.k-slot.is-green { background: var(--green-bg); border-color: var(--green-line); }
.k-slot.is-grey { opacity: .7; }
.k-slot:hover { border-color: var(--blue-line); }
@media (max-width: 760px) { .k-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); } .k-slot { font-size: var(--t-xs); } }


/* ══ CONVERSATIONS (Peter, 14 Nov) — the mail as email trails, the way his accountant's office reads it ═══════════
   The same Mail frame; a different list and a different pane. Lights: amber your move · blue waiting on them ·
   green done · red overdue. Bubbles: ours on the right in soft blue, theirs on the left on white. */
.k-mailchips--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@container (max-width: 620px) { .k-mailchips--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.k-threads-find { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
.k-threads-find input[type="search"] { flex: 1; min-width: 0; min-height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); padding: 0 10px; font: inherit; }
.k-thread-rows .k-thread-group { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px 4px; background: var(--soft); color: var(--ink); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.k-thread-group-name { font-size: var(--t-xs); font-weight: 800; letter-spacing: .02em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-thread-group-n { margin-left: auto; font-size: var(--t-xs); color: var(--muted); white-space: nowrap; }
.k-thread-group-n .is-amber { color: var(--amber); }
.k-mail-row .k-mail-light.is-amber { background: var(--amber); }
.k-mail-row .k-mail-light.is-blue { background: var(--blue); }
.k-mail-row .k-mail-light.is-green { background: var(--green); }
.k-mail-row .k-mail-light.is-red { background: var(--red); }
.k-thread-row .k-who b { white-space: normal; display: flex; align-items: center; gap: 6px; }
.k-thread-row .k-thread-who { color: var(--ink); font-weight: 600; }
.k-thread-row .k-thread-pin { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: var(--t-xs); color: var(--amber); font-weight: 600; }
.k-thread-row .k-when { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: var(--t-xs); color: var(--muted); }
.k-mail[data-density="tight"] .k-thread-row .k-who b, .k-mail[data-density="compact"] .k-thread-row .k-who b { white-space: nowrap; }

/* the pane */
.k-thread { max-width: 900px; }
.k-thread-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 6px; }
.k-thread-head h1 { margin: 0; }
.k-thread-pin-box { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--amber-line, var(--line)); background: var(--amber-bg); color: var(--amber-ink); flex-wrap: wrap; }
.k-thread-pin-box.is-blue { background: var(--blue-bg); color: var(--blue-ink); border-color: var(--blue-line); }
.k-thread-pin-box.is-green { background: var(--green-bg); color: var(--green-ink); border-color: var(--green-line); }
.k-thread-pin-box.is-red { background: var(--red-bg); color: var(--red-ink); border-color: var(--red-line, var(--line)); }
.k-thread-pin-form { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; min-width: 0; }
.k-thread-pin-form .k-thread-needed { flex: 1 1 220px; min-width: 0; }
.k-thread-pin-form input[type="text"], .k-thread-pin-form input[type="date"] { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); padding: 0 10px; font: inherit; }
.k-thread-pin-form .k-thread-due { flex: 0 0 150px; }
.k-thread-people { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.k-thread-person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); font-size: var(--t-xs); font-weight: 600; color: var(--ink); }
.k-thread-person small { color: var(--muted); font-weight: 500; }
.k-thread-person.is-out { opacity: .55; }
.k-thread-person.is-out .k-avatar { background: var(--grey-bg); color: var(--grey-ink); }
.k-thread-person.is-ours .k-avatar { background: var(--go-soft); color: var(--go-soft-ink); }
.k-thread-trail { display: flex; flex-direction: column; gap: 10px; }
.k-thread-day { display: flex; justify-content: center; margin: 8px 0 2px; }
.k-thread-day span { font-size: var(--t-xs); font-weight: 700; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 2px 10px; }
.k-bubble { max-width: 86%; align-self: flex-start; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; background: var(--card); padding: 8px 12px 6px; min-width: 0; }
.k-bubble.is-ours { align-self: flex-end; background: var(--go-soft); border-color: var(--blue-line); border-radius: 14px 14px 4px 14px; }
.k-bubble.is-unread { box-shadow: inset 3px 0 0 var(--amber); }
.k-bubble-head { display: flex; align-items: center; gap: 8px; font-size: var(--t-xs); color: var(--muted); margin-bottom: 4px; min-width: 0; }
.k-bubble-head b { color: var(--ink); font-size: var(--t-sm); }
.k-bubble-head .k-bubble-to { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.k-bubble-head time { margin-left: auto; white-space: nowrap; }
.k-bubble-subject { font-size: var(--t-xs); font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.k-bubble-text { font-size: var(--t-sm); line-height: 1.45; overflow-wrap: anywhere; color: var(--ink); }
.k-bubble-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.k-bubble-foot { font-size: var(--t-xs); color: var(--muted); margin-top: 6px; }
.k-bubble-foot a { color: var(--go-soft-ink); text-decoration: none; font-weight: 600; }
.k-bubble-foot a:hover { text-decoration: underline; }
.k-today-sec h2 { display: flex; align-items: center; gap: 8px; font-size: var(--t-md); margin: 0 0 8px; }
.k-today-sec .k-rows time { white-space: nowrap; font-size: var(--t-xs); }
@media (max-width: 850px) {
  .k-bubble { max-width: 94%; }
  .k-thread-pin-form .k-thread-due { flex: 1 1 140px; }
  .k-thread-rows .k-thread-group { position: static; }
}

/* the trail sits on paper inside the grey frame, the way the email body does — never the frame's dim ink */
.k-mail[data-layout="go"] .k-thread .k-bubble, .k-mail[data-layout="go"] .k-thread .k-thread-pin-form input, .k-mail[data-layout="go"] .k-thread .k-thread-person, .k-mail[data-layout="go"] .k-thread .k-thread-day span { --ink: var(--paper-ink, var(--ink-std)); --muted: var(--paper-dim, var(--muted-std)); background: var(--paper, var(--card-std)); color: var(--paper-ink, var(--ink-std)); border-color: var(--paper-rule, var(--line-std)); }
/* OURS stays on paper too (Peter, 15 Nov: "I can't read it" — navy bubble, dark ink under the grey preset). Our side is told by the blue edge, never by a dark fill. */
.k-mail[data-layout="go"] .k-thread .k-bubble.is-ours { background: var(--paper, var(--card-std)); border-color: var(--paper-rule, var(--line-std)); box-shadow: inset -3px 0 0 var(--blue); }
.k-mail[data-layout="go"] .k-thread .k-bubble .k-bubble-text, .k-mail[data-layout="go"] .k-thread .k-bubble .k-bubble-head b { color: var(--paper-ink, var(--ink-std)); }
.k-mail[data-layout="go"] .k-thread .k-bubble .k-bubble-head, .k-mail[data-layout="go"] .k-thread .k-bubble .k-bubble-foot, .k-mail[data-layout="go"] .k-thread .k-bubble-subject { color: var(--paper-dim, var(--muted-std)); }
.k-mail[data-layout="go"] .k-thread .k-thread-pin-form input::placeholder { color: var(--paper-dim, var(--muted-std)); }
.k-mail[data-layout="go"] .k-thread .k-thread-head h1, .k-mail[data-layout="go"] .k-thread .k-thread-head .k-hint { color: var(--ink); }
.k-threads-one { padding: 0; }
.k-threads-one .k-thread { max-width: none; }
/* the trail inside an open email: a one-line strip under Belongs, the panel under the email */
.k-trail-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; padding: 7px 12px; border-radius: var(--r-sm); border: 1px solid var(--amber-line); background: var(--amber-bg); color: var(--amber-ink); font-size: var(--t-sm); text-decoration: none; min-height: 38px; }
.k-trail-strip.is-blue { background: var(--blue-bg); color: var(--blue-ink); border-color: var(--blue-line); }
.k-trail-strip.is-green { background: var(--green-bg); color: var(--green-ink); border-color: var(--green-line); }
.k-trail-strip.is-red { background: var(--red-bg); color: var(--red-ink); border-color: var(--red-line); }
.k-trail-strip-go { margin-left: auto; font-weight: 700; }
.k-trail-wrap { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.k-thread--inemail { padding: 0; max-width: none; }
.k-thread-head--inemail { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--t-sm); margin-bottom: 8px; }
.k-thread-head--inemail .k-link { margin-left: auto; }
.k-thread--inemail .k-thread-trail { max-height: 560px; overflow: auto; padding-right: 4px; }
/* the trails on a record and on Home */
.k-trails-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.k-trails-head h2 { margin: 0; font-size: var(--t-md); display: flex; align-items: center; gap: 8px; }
.k-trails-head .k-link { margin-left: auto; }
.k-trails-lights { display: flex; gap: 4px; flex-wrap: wrap; }
.k-trails-body { display: grid; grid-template-columns: minmax(280px, 38%) minmax(0, 1fr); gap: 14px; align-items: start; }
.k-trails-list { max-height: 560px; overflow: auto; }
.k-trails-list a.k-rowlink[aria-current="true"] { background: var(--go-soft); border-radius: var(--r-sm); }
.k-trails-list .k-row-sub b { font-weight: 600; color: var(--ink); }
.k-trails-list .is-amber-ink { color: var(--amber-ink); font-weight: 600; }
.k-trails-pane .k-thread { padding: 0; max-width: none; }
.k-trails-pane .k-thread-trail { max-height: 480px; overflow: auto; padding-right: 4px; }
.k-trails-pane .k-thread-head h1 { font-size: var(--t-md); }
@media (max-width: 850px) { .k-trails-body { grid-template-columns: 1fr; } .k-trails-list { max-height: none; } }

/* the flag sits in its own column at the end of the row; the gap before it stays small */
.k-mail-rows a.k-mail-row > .k-mail-flag { margin-left: 0; }
/* a conversation row wraps so the fold can sit under it — but the row itself must stay on the tick's line (14 Nov: a blank band with a lone tick box above every conversation) */
.k-mail-rows > li:has(> .k-convo) > .k-mail-row { flex: 1 1 0; min-width: 0; }
/* ONE LINE on the email (14 Nov): the light, whose move, one button. The trail is a shut line under the email. */
.k-trail-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; padding: 6px 12px; border-radius: var(--r-sm); border: 1px solid var(--amber-line); background: var(--amber-bg); color: var(--amber-ink); font-size: var(--t-sm); min-height: 42px; }
.k-trail-line.is-blue { background: var(--blue-bg); color: var(--blue-ink); border-color: var(--blue-line); }
.k-trail-line.is-green { background: var(--green-bg); color: var(--green-ink); border-color: var(--green-line); }
.k-trail-line.is-red { background: var(--red-bg); color: var(--red-ink); border-color: var(--red-line); }
.k-trail-line-say { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-trail-line-do { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.k-trail-line-do form { margin: 0; }
.k-trail-needs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: -4px 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper, var(--card)); }
.k-trail-needs input[type="text"] { flex: 1 1 240px; min-height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; font: inherit; background: var(--paper, var(--card)); color: var(--paper-ink, var(--ink)); }
.k-trail-needs input[type="date"] { min-height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 8px; font: inherit; background: var(--paper, var(--card)); color: var(--paper-ink, var(--ink)); }
.k-trail-fold { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.k-trail-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 42px; font-weight: 700; font-size: var(--t-sm); color: var(--ink); }
.k-trail-fold > summary::-webkit-details-marker { display: none; }
.k-trail-fold > summary::before { content: "›"; display: inline-block; width: 14px; transition: transform .15s; opacity: .6; }
.k-trail-fold[open] > summary::before { transform: rotate(90deg); }
.k-trail-fold:not([open]) > .k-trail-wrap { display: none; }
.k-trail-fold .k-trail-wrap { margin-top: 6px; border-top: 0; padding-top: 0; }
.k-trail-fold .k-thread-trail { max-height: 560px; overflow: auto; padding-right: 4px; }
.k-mail[data-layout="go"] .k-trail-fold .k-bubble { --ink: var(--paper-ink, var(--ink-std)); background: var(--paper, var(--card-std)); color: var(--paper-ink, var(--ink-std)); border-color: var(--paper-rule, var(--line-std)); }
.k-mail[data-layout="go"] .k-trail-fold .k-bubble.is-ours { background: var(--paper, var(--card-std)); border-color: var(--paper-rule, var(--line-std)); box-shadow: inset -3px 0 0 var(--blue); }
.k-mail[data-layout="go"] .k-trail-fold .k-bubble .k-bubble-text, .k-mail[data-layout="go"] .k-trail-fold .k-bubble .k-bubble-head b { color: var(--paper-ink, var(--ink-std)); }
.k-mail[data-layout="go"] .k-trail-fold .k-thread-day span { background: var(--paper, var(--card-std)); color: var(--paper-dim, var(--muted-std)); }
.k-mail[data-layout="go"] .k-trail-fold .k-bubble .k-bubble-head, .k-mail[data-layout="go"] .k-trail-fold .k-bubble .k-bubble-foot, .k-mail[data-layout="go"] .k-trail-fold .k-bubble-subject, .k-mail[data-layout="go"] .k-trail-fold .k-bubble-to { color: var(--paper-dim, var(--muted-std)); }
.k-mail[data-layout="go"] .k-trail-fold .k-bubble .k-ltag.is-grey { background: var(--paper, var(--card-std)); color: var(--paper-dim, var(--muted-std)); border-color: var(--paper-rule, var(--line-std)); }
.k-trail-needs[hidden] { display: none; }


/* ── QUIET ROWS — the Outlook look (Peter, 15 Nov). From his own Outlook and Roundcube screenshots next to GO Mail:
      theirs is a grey page, nearly no colour, and a row is name · subject · one line · date. Ours had a coloured stripe,
      a logo bubble, blue tags, orange counters and three coloured dots on every row — "it hurts my fucking eyes".
      So with data-quiet="1" (MailPref 'quiet', on by default): nothing on a row but the words; unread is bold with a
      thin edge in the one accent; the three lights are plain words on one tab line; the list bar and the row of
      buttons above an open email are plain words too. Colours stay the person's own (Looks presets); this block only
      takes things OFF. Off = the fuller rows come back exactly as they were. Tokens only. ──────────────────────── */
.k-mail[data-quiet="1"] { --mail-avatar: 0px; }
.k-mail[data-quiet="1"] .k-mail-rows a.k-mail-row,
.k-mail[data-quiet="1"] .k-mail-rows a.k-mail-row:has(> .k-auto--row),
.k-mail[data-quiet="1"] .k-mail-rows a.k-mail-row:has(> .k-rowtag) { grid-template-columns: minmax(0, 1fr) auto auto; gap: 0 10px; padding-left: 16px; }
.k-mail[data-quiet="1"] .k-mail-row .k-mail-light, .k-mail[data-quiet="1"] .k-mail-row .k-avatar,
.k-mail[data-quiet="1"] .k-convo-row .k-mail-light, .k-mail[data-quiet="1"] .k-auto { display: none; }
.k-mail[data-quiet="1"] .k-convo-row { grid-template-columns: minmax(0, 1fr) auto; padding-left: 16px; }
.k-mail[data-quiet="1"] .k-convo-row .k-convo-who { grid-column: 1; } .k-mail[data-quiet="1"] .k-convo-row time { grid-column: 2; } .k-mail[data-quiet="1"] .k-convo-row .k-convo-sub { grid-column: 1 / -1; }
.k-mail[data-quiet="1"] .k-mail-row.is-unread { box-shadow: inset 3px 0 0 var(--mail-acc, var(--go)); }
.k-mail[data-quiet="1"] .k-mail-row.is-unread .k-who b { font-weight: 500; }
.k-mail[data-quiet="1"] .k-mail-row.is-unread .k-subj { font-weight: 600; }
.k-mail[data-quiet="1"] .k-mail-row:not(.is-unread) .k-who b { font-weight: 400; }
.k-mail[data-quiet="1"] .k-mail-row:not(.is-unread) .k-subj { font-weight: 400; }
.k-mail[data-quiet="1"] .k-mail-row.is-unread .k-when time { color: var(--muted); font-weight: 500; }
.k-mail[data-quiet="1"] .k-mail-row .k-who b .k-convo-n { background: transparent; color: var(--muted); font-weight: 500; min-width: 0; height: auto; padding: 0; margin-left: 4px; }
.k-mail[data-quiet="1"] .k-mail-row .k-who b .k-convo-n::before { content: "("; } .k-mail[data-quiet="1"] .k-mail-row .k-who b .k-convo-n::after { content: ")"; }
/* ONE small grey word in the corner at most (Expense, a job ref) — never a row of coloured pills */
.k-mail[data-quiet="1"] .k-rowtags { display: flex; justify-content: flex-end; }
.k-mail[data-quiet="1"] .k-rowtag { background: transparent; color: var(--muted); border: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-size: 11px; font-weight: 500; padding: 0 5px; border-radius: 3px; }
.k-mail[data-quiet="1"] .k-rowtag:not(:first-child) { display: none; }
.k-mail[data-quiet="1"] .k-mail-row[aria-current="true"] { background: var(--go-soft); box-shadow: inset 3px 0 0 var(--mail-acc, var(--go)); }
/* the folder names: no orange counters, a grey number */
.k-mail[data-quiet="1"] .k-badge { background: transparent; color: var(--muted); font-weight: 500; min-width: 0; height: auto; padding: 0; }
.k-mail[data-quiet="1"] .k-mail-acct > summary .k-avatar { display: none; }
.k-mail[data-quiet="1"] .k-mail-top h1 { font-weight: 600; }
/* the three lights as one line of plain words, the open one underlined in the accent */
.k-mail[data-quiet="1"] .k-mailchips { display: flex; gap: 0; padding: 0 6px; }
.k-mail[data-quiet="1"] .k-mailchips a { flex: 0 0 auto; flex-direction: row; gap: 6px; height: 38px; padding: 0 10px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-weight: 500; }
.k-mail[data-quiet="1"] .k-mailchips a b { font-weight: 500; font-size: var(--t-sm); } .k-mail[data-quiet="1"] .k-mailchips a small { font-size: var(--t-xs); font-weight: 500; }
.k-mail[data-quiet="1"] .k-mailchips a .k-dot { display: none; }
.k-mail[data-quiet="1"] .k-mailchips a[aria-current="true"] { background: transparent; color: var(--ink); box-shadow: inset 0 -2px 0 var(--mail-acc, var(--go)); }
.k-mail[data-quiet="1"] .k-mailchips a[aria-current="true"] b { font-weight: 600; }
/* the list bar: sort and the filters as words, pressed = underlined, not a blue pill */
.k-mail[data-quiet="1"] .k-mail-bar .k-btn--thin { border-color: transparent; background: transparent; color: var(--muted); font-weight: 500; }
.k-mail[data-quiet="1"] .k-mail-bar .k-btn--thin:hover { background: var(--soft); }
.k-mail[data-quiet="1"] .k-mail-bar .k-btn--thin[aria-pressed="true"] { background: transparent; color: var(--ink); box-shadow: inset 0 -2px 0 var(--mail-acc, var(--go)); border-radius: 0; }
.k-mail[data-quiet="1"] .k-mail-bar .k-btn--thin b, .k-mail[data-quiet="1"] .k-mail-bar .k-btn--thin small { opacity: .8; }
/* above the open email: one row of words, no pills, no coloured icons */
.k-mail[data-quiet="1"] .k-bar1-btn .k-icon, .k-mail[data-quiet="1"] .k-bar1-btn.is-go .k-icon { color: var(--muted); }
.k-mail[data-quiet="1"] .k-bar1-btn.is-go { color: var(--ink); }
.k-mail[data-quiet="1"] .k-mail-read .k-mail-bar1 .k-chip.k-chip.k-chip { border-color: transparent; background: transparent; color: var(--ink); font-weight: 600; padding: 0 9px; }
.k-mail[data-quiet="1"] .k-mail-read .k-mail-bar1 .k-chip.k-chip.k-chip:hover { background: var(--soft); }
.k-mail[data-quiet="1"] .k-mail-bar1 .k-chip .k-icon { color: var(--muted); }
.k-mail[data-quiet="1"] .k-mail-read .k-mail-bar1 .k-bar1-light > summary.k-chip.k-chip.k-chip { color: var(--muted); font-weight: 500; }
.k-mail[data-quiet="1"] .k-mail-bar1 .k-bar1-light > summary .k-dot { width: 8px; height: 8px; }
.k-mail[data-quiet="1"] .k-mail-meta .k-avatar .k-avatar-img { display: none; }
/* the email on its own page (Penny's Open, "open on its own"): the Mail look without the Mail grid */
.k-mail.k-mail-solo { display: block; height: auto; min-height: 0; margin: 0; grid-template-columns: none; }
.k-mail.k-mail-solo > .k-mail-read { display: block; overflow: visible; }
.k-mail-solo .k-mail-alertbar { margin: 12px 12px 0; }
/* THE LIST BAR THAT FITS (15 Nov): Unread · (space) · Filter ▾ · By date — one row at every width, nothing cut off */
.k-mail-bar-when { margin-left: 0; flex: 1 1 auto; min-width: 0; gap: 2px; }
.k-mail-bar-when .k-grow { flex: 1 1 auto; }
.k-mail-bar-when .k-btn--thin { white-space: nowrap; }
.k-mail-bar-when > a > span, .k-mail-bar-when summary > span { display: inline; }
.k-mail-filtermenu .k-menu-pop a small, .k-mail-filtermenu .k-menu-pop a .k-count { margin-left: auto; color: var(--muted); font-weight: 600; }
.k-mail-filtermenu .k-menu-pop a[aria-current="true"] { background: var(--go-soft); color: var(--go-soft-ink); }
.k-mail-bar .k-mail-filtermenu .k-menu-pop, .k-mail-bar .k-mail-sort .k-menu-pop { left: auto; right: 0; min-width: 220px; }
/* quiet: the amber rings on Important / Needs sorting go grey like every other count; the "All" count was the page size, not the folder */
.k-mail[data-quiet="1"] .k-mail-nav .k-badge, .k-mail[data-quiet="1"] .k-mail-fav .k-badge, .k-mail[data-quiet="1"] .k-mail-fav a .k-badge { background: transparent; border: 0; color: var(--muted); font-weight: 500; min-width: 0; height: auto; padding: 0; }
.k-mail[data-quiet="1"] .k-mailchips a[href*="cat=all"] small { display: none; }
/* night scrollbars: dark track, not the browser's white one */
.k-mail[data-theme="dark"], .k-mail[data-theme="dark"] * { scrollbar-color: #4a4f57 transparent; scrollbar-width: thin; }
/* THE OPEN ONE STANDS OUT (Peter, 15 Nov, on Conversations: "when I open it up I want that a different colour … it all
   blends into one"). One token for the open row everywhere in Mail — the list, Conversations, the trails: the accent
   mixed firmly into the surface, so it reads as "this one" in day or night, whatever colours he picked. */
.k-mail .k-mail-list, .k-mail .k-mail-read, .k-mail .k-mail-nav, .k-threads, .k-trails-list { --mail-open: color-mix(in srgb, var(--mail-acc, var(--go)) 30%, var(--card)); }
.k-mail .k-mail-row[aria-current="true"], .k-mail[data-quiet="1"] .k-mail-row[aria-current="true"], .k-mail .k-thread-row[aria-current="true"],
.k-mail .k-convo-row[aria-current="true"], .k-trails-list a.k-rowlink[aria-current="true"] { background: var(--mail-open); box-shadow: inset 3px 0 0 var(--mail-acc, var(--go)); color: var(--ink); }
.k-mail .k-mail-row[aria-current="true"] .k-who b, .k-mail .k-mail-row[aria-current="true"] .k-subj, .k-mail .k-thread-row[aria-current="true"] .k-who b, .k-mail .k-thread-row[aria-current="true"] .k-subj { color: var(--ink); }
.k-mail .k-mail-row[aria-current="true"]:hover { background: var(--mail-open); }
/* AN OPENED CONVERSATION READS AS ONE BLOCK (Peter, 15 Nov: "I pressed the button … it doesn't distinguish"). When the
   fold is open the whole group — the newest row, the "N earlier" line and the earlier emails — sits on one tinted
   block with the accent down its edge, and the earlier ones step in under a connector line, the way Outlook shows an
   expanded conversation. Shut, nothing changes. */
.k-mail .k-mail-rows > li:has(> .k-convo[open]) { background: color-mix(in srgb, var(--mail-acc, var(--go)) 9%, var(--card)); box-shadow: inset 3px 0 0 var(--mail-acc, var(--go)); }
.k-mail .k-mail-rows > li:has(> .k-convo[open]) > a.k-mail-row { background: transparent; box-shadow: none; }
.k-mail .k-mail-rows > li:has(> .k-convo[open]) > a.k-mail-row[aria-current="true"] { background: var(--mail-open); }
.k-mail .k-convo[open] > summary { color: var(--ink); font-weight: 600; padding-left: 28px; }
.k-mail .k-convo[open] .k-convo-rest { margin: 0 0 6px 28px; border-left: 2px solid color-mix(in srgb, var(--mail-acc, var(--go)) 55%, transparent); }
.k-mail .k-convo[open] .k-convo-row, .k-mail[data-quiet="1"] .k-convo[open] .k-convo-row { margin-left: 0; border-left: 0; padding: 6px 12px 7px 14px; font-size: var(--t-sm); }
.k-mail .k-convo[open] .k-convo-row .k-convo-who { font-size: var(--t-sm); }
.k-mail .k-convo[open] .k-convo-row .k-convo-sub { font-size: var(--t-xs); }
.k-mail .k-convo[open] .k-convo-row[aria-current="true"] { background: var(--mail-open); box-shadow: inset 3px 0 0 var(--mail-acc, var(--go)); }
.k-mail .k-convo[open] .k-convo-row:hover { background: var(--soft); }

/* THE GANTT STAYS IN ITS LANES (Peter, 15 Nov: "move the slider, it does on the whole job … stuff overlapping"). The
   table columns are sticky but were see-through, so the scrolled chart painted under them and bar names ran across
   them. Now every table cell is opaque and sits above the chart, the chart clips to its own track, and only the
   chart moves when the slider moves. */
.k-gantt-row { background: var(--card); }
.k-gantt-row.is-head, .k-gantt-row.is-project { background: var(--bg); }
.k-gantt-row:not(.is-head):not(.is-big):hover { background: var(--bg); }
.k-gantt-row.tone-red { background: color-mix(in srgb, var(--t-red-wash) 100%, var(--card)); }
.k-gantt-row.tone-amber.is-group { background: color-mix(in srgb, var(--t-amber-wash) 60%, var(--card)); }
.k-gantt-row.tone-red:hover { background: color-mix(in srgb, var(--t-red-wash) 80%, var(--ink) 4%); }
.k-sheet-nm, .k-sheet-dt { background: inherit; z-index: 3; }
.k-sheet-head .k-sheet-nm, .k-sheet-head .k-sheet-dt { z-index: 6; background: var(--bg); }
.k-gantt-row.is-big .k-sheet-nm, .k-gantt-row.is-big .k-sheet-dt { background: var(--card); }
.k-sheet-tr { overflow: hidden; z-index: 1; }
.k-gantt-row.is-head .k-sheet-tr { overflow: visible; }
.k-sheet-grip { left: 0; }
.k-sheet-say { max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.k-tl-scroll { scrollbar-width: thin; }
/* the Gantt header: the column names are opaque and above the month ticks; the ticks stay inside the track */
.k-gantt-sheet .k-sheet-head .k-gantt-row > .k-sheet-nm, .k-gantt-sheet .k-sheet-head .k-gantt-row > .k-sheet-dt { background: var(--soft, #f1f3f4); z-index: 8; }
.k-gantt-sheet .k-sheet-head .k-gantt-row.is-big > .k-sheet-nm, .k-gantt-sheet .k-sheet-head .k-gantt-row.is-big > .k-sheet-dt { background: var(--card); }
.k-gantt-sheet .k-sheet-head .k-gantt-row > .k-sheet-tr { z-index: 2; overflow: hidden; }
.k-gantt-sheet .k-sheet-head .k-gantt-row.is-head > .k-sheet-tr { overflow: hidden; }
.k-gantt-sheet .k-sheet-head .k-gantt-row.is-head > .k-sheet-tr > .k-sheet-grip { left: 0; width: 8px; }
.k-gantt-sheet .k-sheet-head .k-gantt-row.is-head > .k-sheet-tr > .k-sheet-grip::after { inset: 0 2px; }
.k-gantt-sheet .k-gantt-row:not(.is-head):not(.is-big) > .k-sheet-nm, .k-gantt-sheet .k-gantt-row:not(.is-head):not(.is-big) > .k-sheet-dt { z-index: 7; }
.k-gantt-sheet .k-gantt-row:not(.is-head):not(.is-big) > .k-sheet-tr { z-index: 1; }
.k-gantt-sheet .k-gantt-row > .k-sheet-nm, .k-gantt-sheet .k-gantt-row > .k-sheet-dt { align-self: stretch; }
/* the Gantt tool row never pushes the phone sideways: the zoom buttons scroll in their own strip */
@media (max-width: 850px) { .k-tl-tools { flex-wrap: wrap; } .k-tl-when { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; } .k-tl-when .k-btn { flex: 0 0 auto; } }
/* the proof line under a task in the stage panel: the email that ticked it */
.k-tl-proof { margin: -4px 0 6px 22px; padding-top: 0; font-size: var(--t-xs); color: var(--muted); border-top: 0; }
.k-tl-proof .k-icon { color: var(--muted); }
.k-tl-proof.is-hand { pointer-events: none; }

/* ATTACHED PICTURES under an open email (Mail settings → Reading an email → "Show attached pictures").
   Peter, 16 Nov round: photos off a job should read as photos, not as a row of file names. */
.k-mail-pics { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 12px 2px; }
.k-mail-pics a { display: block; max-width: 220px; text-decoration: none; color: var(--muted); }
.k-mail-pics img { display: block; width: 100%; height: auto; max-height: 200px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft); }
.k-mail-pics small { display: block; font-size: var(--t-xs); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* SAVED REPLIES on the reply box (Roundcube's Responses). One row of plain buttons under the typing area. */
.k-reply-saved { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 0; }
