/* GeoHQ — calm, flat business styling. Fonts are self-hosted (no third-party requests). */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(/fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --bg: #f2f2f5;
  --surface: #ffffff;
  --surface-2: #f2f2f5;
  --hover: #ececf0;
  --line: #e3e3e8;
  --line-2: #d1d1d6;
  --ink: #1c1c1e;
  --ink-2: #3a3a3c;
  --muted: #6c6c71;
  --accent: #18693f;
  --accent-hover: #12552f;
  --accent-ink: #ffffff;
  --accent-soft: #e6f2ea;
  --accent-text: #146038;
  --ok: #1a7a43;   --ok-soft: #e3f3e8;
  --amber: #8f5300; --amber-soft: #fcf0d9;
  --red: #c4271d;  --red-soft: #fde8e6;
  --blue: #0a5fd1; --blue-soft: #e5effd;
  --slate: #55555a; --slate-soft: #ededf0;
  --dot: #ff3b30;
  --focus: #0a66e0;
  --radius: 14px;
  --radius-sm: 9px;
  --glass: rgba(255, 255, 255, .72);
  --glass-solid: rgba(255, 255, 255, .92);
  --glass-2: rgba(250, 250, 252, .82);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 0 0 .5px rgba(0, 0, 0, .02);
  --lift-shadow: 0 10px 30px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .05);
  --menu-shadow: 0 18px 50px rgba(0, 0, 0, .16), 0 2px 8px rgba(0, 0, 0, .08), 0 0 0 .5px rgba(0, 0, 0, .08);
  --spring: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --bounce: cubic-bezier(.34, 1.4, .64, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --hover: #2a2a2d; --line: #2f2f33; --line-2: #48484c;
    --ink: #f5f5f7; --ink-2: #d1d1d6; --muted: #98989f; --accent: #34c06a; --accent-hover: #46cf7a; --accent-ink: #04140a;
    --accent-soft: #15301f; --accent-text: #5fd48c; --ok: #4fd17f; --ok-soft: #14301e; --amber: #ffb340; --amber-soft: #3a2a10;
    --red: #ff6961; --red-soft: #3b1a18; --blue: #64a8ff; --blue-soft: #132842; --slate: #b4b4ba; --slate-soft: #2c2c2e;
    --dot: #ff453a; --focus: #64a8ff; --glass: rgba(28, 28, 30, .72); --glass-2: rgba(22, 22, 24, .8); --glass-solid: rgba(38, 38, 40, .94);
    --card-shadow: 0 0 0 .5px rgba(255, 255, 255, .04); --lift-shadow: 0 12px 34px rgba(0, 0, 0, .55), 0 0 0 .5px rgba(255,255,255,.06);
    --menu-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 .5px rgba(255,255,255,.1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --hover: #2a2a2d; --line: #2f2f33; --line-2: #48484c;
    --ink: #f5f5f7; --ink-2: #d1d1d6; --muted: #98989f; --accent: #34c06a; --accent-hover: #46cf7a; --accent-ink: #04140a;
    --accent-soft: #15301f; --accent-text: #5fd48c; --ok: #4fd17f; --ok-soft: #14301e; --amber: #ffb340; --amber-soft: #3a2a10;
    --red: #ff6961; --red-soft: #3b1a18; --blue: #64a8ff; --blue-soft: #132842; --slate: #b4b4ba; --slate-soft: #2c2c2e;
    --dot: #ff453a; --focus: #64a8ff; --glass: rgba(28, 28, 30, .72); --glass-2: rgba(22, 22, 24, .8); --glass-solid: rgba(38, 38, 40, .94);
    --card-shadow: 0 0 0 .5px rgba(255, 255, 255, .04); --lift-shadow: 0 12px 34px rgba(0, 0, 0, .55), 0 0 0 .5px rgba(255,255,255,.06);
    --menu-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 .5px rgba(255,255,255,.1);
    color-scheme: dark;
}

/* ------------------------------------------------ base */
* { box-sizing: border-box; }
/* Icons with no size of their own (the giant pencil / padlock bug): default to text size. Zero specificity, so any rule that sizes an icon wins. */
:where(svg[aria-hidden="true"][stroke="currentColor"]:not([width])) { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
html, body { margin: 0; min-height: 100%; max-width: 100%; overflow-x: hidden; overflow-x: clip; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
a { color: var(--accent-text); text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: var(--ink); max-width: 100%; }
@media (max-width: 899px) { input, textarea, select { font-size: 16px !important; } } /* stops iPhone zooming in on tap */
img { display: block; max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 400; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

.mono { font-family: var(--mono); font-size: .88em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.bold { font-weight: 600; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.row.tight { gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stack.tight { gap: 6px; }
.stack.loose { gap: 20px; }
.between { justify-content: space-between; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hidden { display: none !important; }
.label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pos { color: var(--ok); } .neg { color: var(--red); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ------------------------------------------------ shell */
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
.shell > * { min-width: 0; }
.sidebar { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: calc(8px + var(--safe-t)) var(--gutter) 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .co-btn { display: flex; align-items: center; gap: 8px; min-width: 0; background: none; border: 0; padding: 4px 6px 4px 0; border-radius: 8px; cursor: pointer; }
.topbar .co-btn .name { font-weight: 700; font-size: 16px; }
.topbar .co-btn.desk-co { display: none; }
.topbar.has-banner { min-height: 58px; background-image: linear-gradient(90deg, var(--surface) 0, var(--surface) 12%, color-mix(in srgb, var(--surface) 55%, transparent) 38%, transparent 62%), var(--banner);
  background-size: cover; background-position: center var(--banner-y, 50%); background-repeat: no-repeat; }
.topbar.has-banner .icon-btn, .topbar.has-banner .desk-co { background: color-mix(in srgb, var(--surface) 88%, transparent); }
.topbar.has-banner .searchbox { background: color-mix(in srgb, var(--surface) 92%, transparent); }
@media (min-width: 900px) { .topbar.has-banner { min-height: 72px; background-image: linear-gradient(90deg, var(--surface) 0, color-mix(in srgb, var(--surface) 40%, transparent) 22%, transparent 45%), var(--banner); } }
.banner-preview { height: 110px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--ink-2); flex: none; position: relative; text-decoration: none; }
.icon-btn:hover { background: var(--hover); }
.icon-btn svg { width: 21px; height: 21px; }
.brandmark { display: inline-block; width: 30px; height: 30px; flex: none; }
.brandmark svg, .brandmark img { width: 100%; height: 100%; display: block; }
/* Green marker, white tick — swapped in dark mode */
.brandmark .lm-pin { fill: #18693f; }
.brandmark .lm-tick { stroke: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brandmark .lm-pin { fill: #ffffff; } :root:not([data-theme="light"]) .brandmark .lm-tick { stroke: #18693f; } }
:root[data-theme="dark"] .brandmark .lm-pin { fill: #ffffff; }
:root[data-theme="dark"] .brandmark .lm-tick { stroke: #18693f; }
main#view { padding: 18px var(--gutter) calc(96px + var(--safe-b)); max-width: 1120px; margin: 0 auto; width: 100%; min-width: 0; }
main#view:focus { outline: none; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + var(--safe-b)); }
.navbtn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; border: 0; background: none;
  color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; border-radius: 8px; cursor: pointer; }
.navbtn svg { width: 22px; height: 22px; }
.navbtn.on { color: var(--accent-text); }
.navbtn .count { position: absolute; top: 1px; left: calc(50% + 5px); }
.navbtn:active { background: var(--hover); }
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .shell { grid-template-columns: 236px minmax(0, 1fr); }
  .bottomnav { display: none; }
  .sidebar { display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; height: 100vh; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; }
  .sidebar .co-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: left; }
  .sidebar .co-btn:hover { background: var(--hover); }
  .sidebar .co-btn .name { font-weight: 700; }
  .sidebar .navbtn { flex-direction: row; gap: 11px; padding: 8px 10px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
  .sidebar .navbtn svg { width: 19px; height: 19px; color: var(--muted); }
  .sidebar .navbtn:hover { background: var(--hover); }
  .sidebar .navbtn.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
  .sidebar .navbtn.on svg { color: var(--accent-text); }
  .sidebar .navbtn .count { position: static; margin-left: auto; }
  .sidebar .navsec { margin: 14px 10px 4px; }
  .topbar { padding: 10px var(--gutter); }
  .topbar .co-btn, .topbar .mobile-only { display: none; }
  .topbar .co-btn.desk-co { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; }
  .topbar .co-btn.desk-co:hover { background: var(--hover); }
  main#view { padding: 26px var(--gutter) 60px; }
}
.searchbox { display: none; }
@media (min-width: 900px) {
  .searchbox { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 420px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: text; font-size: 14px; }
  .searchbox:hover { border-color: var(--line-2); }
  .searchbox svg { width: 17px; height: 17px; }
  .searchbox kbd { margin-left: auto; font: 500 11px var(--font); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; margin-bottom: 10px; padding: 4px 6px 4px 0; border-radius: 6px; }
.back:hover { color: var(--ink); }
.back svg { width: 16px; height: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .grid.two { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } .grid.halves { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }

/* ------------------------------------------------ cards, lists */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.tint { background: var(--surface-2); }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--line-2); }
.list > .item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border: 0; border-top: 1px solid var(--line); background: none; width: 100%;
  text-align: left; text-decoration: none; color: inherit; cursor: pointer; min-width: 0; }
.list > .item:first-child { border-top: 0; }
.list > a.item:hover, .list > button.item:hover { background: var(--hover); }
.list > .item.static { cursor: default; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty svg { width: 30px; height: 30px; margin: 0 auto 8px; display: block; opacity: .7; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }
.warn, .info-box { border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.warn { background: var(--amber-soft); color: var(--amber); }
.info-box { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.err-msg { color: var(--red); font-size: 14px; min-height: 0; }
.err-msg:empty { display: none; }
.ok-msg { color: var(--ok); font-size: 14px; }

/* ------------------------------------------------ buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .1s; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.btn.primary.busy::after { border-color: #fff transparent #fff transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span, .field > .lbl { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea, .input {
  width: 100%; height: 40px; padding: 0 11px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.field textarea, textarea.input { height: auto; min-height: 90px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); outline: none; }
.field input[aria-invalid="true"], .input[aria-invalid="true"] { border-color: var(--red); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236a6963' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px !important; }
.form-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .form-grid .full { grid-column: 1 / -1; } }
.search { position: relative; display: block; }
.search input { padding-left: 36px; }
.search svg { position: absolute; left: 11px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-wrap .pw-toggle { position: absolute; right: 4px; top: 4px; height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--accent-text); font-weight: 600; font-size: 13px; cursor: pointer; }
.pw-meter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
.pw-meter i { height: 4px; border-radius: 2px; background: var(--line); }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--red); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--amber); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: #6b9c2a; }
.pw-meter[data-s="4"] i { background: var(--ok); }
.pw-rules { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 10px; font-size: 12.5px; color: var(--muted); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { content: "✓ "; }
.switch { position: relative; width: 42px; height: 24px; flex: none; display: inline-block; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background-color .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.setting:first-of-type { border-top: 0; }
.setting .d { font-size: 13px; color: var(--muted); }
.check { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; transition: background-color .15s, border-color .15s; }
.check svg { width: 14px; height: 14px; color: #fff; opacity: 0; }
.check.on { background: var(--ok); border-color: var(--ok); }
.check.on svg { opacity: 1; }
.check.round { border-radius: 50%; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button, .seg a { border: 0; background: none; padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; white-space: nowrap; text-decoration: none; }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { opacity: .65; font-weight: 500; }
@media (min-width: 900px) { .chips { margin: 0; padding: 0; flex-wrap: wrap; } }
.tabs { position: relative; display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 10px 10px 9px; border: 0; background: none; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; text-decoration: none; display: flex; gap: 6px; align-items: center; transition: color .15s; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-color: var(--accent); }
.tabs.has-ink .tab.on { border-color: transparent; }
.tab-ink { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--accent); pointer-events: none; transition: transform .25s ease, width .25s ease; }
@media (min-width: 900px) { .tabs { margin: 0; padding: 0; } }

/* ------------------------------------------------ badges, pills, avatars */
.count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--dot); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.dot-unread { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); display: inline-block; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--slate-soft); color: var(--slate); white-space: nowrap; }
.pill.st-planned { background: var(--blue-soft); color: var(--blue); }
.pill.st-active { background: var(--ok-soft); color: var(--ok); }
.pill.st-hold { background: var(--amber-soft); color: var(--amber); }
.pill.st-done { background: var(--slate-soft); color: var(--slate); }
.pill.pr-high { background: var(--amber-soft); color: var(--amber); }
.pill.pr-urgent { background: var(--red-soft); color: var(--red); }
.pill.lock { background: var(--surface-2); color: var(--muted); }
.pill svg { width: 12px; height: 12px; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.due svg { width: 13px; height: 13px; }
.due.soon { color: var(--amber); } .due.late { color: var(--red); font-weight: 600; }
.avatar { --c: #57564f; position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; display: inline-grid; place-items: center;
  font-weight: 700; font-size: 13px; flex: none; overflow: visible; line-height: 1; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar.xs { width: 22px; height: 22px; font-size: 9px; } .avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 17px; } .avatar.xl { width: 88px; height: 88px; font-size: 30px; }
.avatar .on-dot { position: absolute; right: -1px; bottom: -1px; width: 31%; height: 31%; min-width: 8px; min-height: 8px; border-radius: 50%; background: #9a9991; border: 2px solid var(--surface); }
.avatar .on-dot.on { background: #2f9e44; }
[data-person] { cursor: pointer; }
.person-link { color: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.person-link:hover { text-decoration: underline; }
.stackav { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.stackav .avatar { border: 2px solid var(--surface); margin-left: -7px; }
.stackav .avatar:last-child { margin-left: 0; }
.stackav .more { background: var(--surface-2); color: var(--muted); }
.people-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.person-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 4px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 500; font-size: 13.5px; }
.person-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.team-swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; display: inline-block; }
.star-btn { border: 0; background: none; padding: 4px; border-radius: 6px; cursor: pointer; color: var(--line-2); display: inline-grid; place-items: center; flex: none; }
.star-btn svg { width: 19px; height: 19px; }
.star-btn:hover { color: var(--muted); background: var(--hover); }
.star-btn.on { color: #d29b0a; }
.star-btn.on svg { fill: currentColor; }

/* ------------------------------------------------ work cards */
.jobcard { display: flex; flex-direction: column; gap: 9px; text-decoration: none; color: inherit; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); position: relative; min-width: 0; transition: border-color .15s; }
.jobcard:hover { border-color: var(--line-2); }
.jobcard h3 { font-size: 15px; }
.jobcard .ref { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.jobcard .bar { position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; }
.jobcard .meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.jobcard .meta svg { width: 14px; height: 14px; }
.progress { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.projcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 150px; position: relative; }
.projcard:hover { border-color: var(--line-2); }
.projcard .swatch { width: 100%; height: 4px; border-radius: 2px; margin: -4px 0 2px; }
.projcard .desc { color: var(--muted); font-size: 13.5px; }
.projcard .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.projcard.archived { opacity: .75; }
.status-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.status-picker button { border: 1px solid var(--line-2); background: var(--surface); height: 32px; padding: 0 12px; border-radius: 99px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.status-picker button.on.st-planned { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.status-picker button.on.st-active { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.status-picker button.on.st-hold { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }
.status-picker button.on.st-done { background: var(--slate-soft); border-color: var(--slate); color: var(--slate); }
.task { border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.task-main { flex: 1; min-width: 0; border: 0; background: none; text-align: left; cursor: pointer; padding: 2px 0; }
.task-main .t { font-weight: 600; overflow-wrap: anywhere; }
.struck { text-decoration: line-through; color: var(--muted); }
.task-body { padding: 4px 14px 16px 46px; display: flex; flex-direction: column; gap: 14px; }
.cl-item { display: flex; align-items: center; gap: 9px; padding: 3px 0; }
.cl-item span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.inline-add { display: flex; gap: 8px; }
.inline-add .input { flex: 1; min-width: 0; }
.cost-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 8px; align-items: center; }
.totals .row { justify-content: space-between; padding: 4px 0; }
.totals .big { font-size: 22px; font-weight: 700; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.hist li:first-child { border-top: 0; }
.hist time { color: var(--muted); white-space: nowrap; font-size: 12.5px; margin-left: auto; padding-left: 8px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--line-2); }
.kpi .v { font-size: 24px; font-weight: 700; display: block; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi.alert .v { color: var(--red); }

/* ------------------------------------------------ chat */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) { .chat-layout { grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - 140px); } .chat-layout > .card { overflow-y: auto; } }
.chan-group { padding: 10px 16px 4px; }
.chan { display: flex; gap: 10px; align-items: center; padding: 9px 16px; text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.chan:hover { background: var(--hover); }
.chan.on { background: var(--accent-soft); }
.chan-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; flex: none; }
.chan-ico svg { width: 17px; height: 17px; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  height: calc(100dvh - 120px - var(--safe-b) - var(--safe-t)); }
@media (min-width: 900px) { .chat-pane { height: 100%; } }
.chat-pane.embedded { height: min(66vh, 620px); }
.chat-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.daysep { align-self: center; font-size: 12px; color: var(--muted); font-weight: 600; margin: 12px 0 6px; }
.sys { align-self: center; font-size: 12.5px; color: var(--muted); text-align: center; margin: 4px 12px; }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar { visibility: hidden; }
.msg.last .avatar { visibility: visible; }
.bubble { background: var(--surface-2); padding: 7px 11px; border-radius: 14px; overflow-wrap: anywhere; white-space: pre-wrap; min-width: 0; }
.msg.mine .bubble { background: var(--accent); color: var(--accent-ink); }
.msg.mine .bubble a { color: inherit; }
.msg-who { font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 2px 44px; }
.msg-time { font-size: 11px; color: var(--muted); align-self: center; flex: none; }
.bubble-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; margin: -3px -7px 4px; max-width: 260px; }
.bubble-photos.one { grid-template-columns: minmax(0, 1fr); }
.bubble-photos button { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.bubble-photos.one button { aspect-ratio: auto; max-height: 280px; }
.bubble-photos img { width: 100%; height: 100%; object-fit: cover; }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; min-width: 0; resize: none; max-height: 140px; min-height: 40px; height: 40px; padding: 9px 12px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); line-height: 1.35; }
.composer textarea:focus { border-color: var(--accent); outline: none; }
.composer .btn { border-radius: 50%; width: 40px; height: 40px; padding: 0; }
.attach-preview { display: flex; gap: 6px; padding: 8px 8px 0; overflow-x: auto; align-items: center; }
.attach-thumb { position: relative; width: 56px; height: 56px; flex: none; border-radius: 8px; overflow: hidden; }
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attach-thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; padding: 0; cursor: pointer; }
.attach-thumb button svg { width: 12px; height: 12px; }

/* ------------------------------------------------ pings */
.ping { display: block; position: relative; padding: 14px 16px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; cursor: pointer; }
.ping:first-child { border-top: 0; }
.ping:hover { background: var(--hover); }
.ping.unread { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.ping .corner { position: absolute; top: 14px; right: 14px; }
.ping h3 { padding-right: 20px; }
.ping .body { color: var(--ink-2); font-size: 14px; margin-top: 3px; }
.ping .by { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.att-strip { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.att-strip::-webkit-scrollbar { display: none; }
.att-thumb { width: 56px; height: 56px; border-radius: 7px; overflow: hidden; flex: none; border: 1px solid var(--line); background: var(--surface-2); padding: 0; cursor: zoom-in; }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-doc { display: inline-flex; align-items: center; gap: 7px; height: 56px; max-width: 200px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); flex: none; text-decoration: none; color: inherit; font-size: 12.5px; }
.att-doc .ext { font: 700 10px var(--font); text-transform: uppercase; color: #fff; background: var(--slate); border-radius: 4px; padding: 3px 4px; flex: none; }
.att-doc .ext.pdf { background: #b3261e; } .att-doc .ext.doc, .att-doc .ext.docx, .att-doc .ext.odt, .att-doc .ext.rtf { background: #1f57a4; }
.att-doc .ext.xls, .att-doc .ext.xlsx, .att-doc .ext.ods, .att-doc .ext.csv { background: #1a7a43; } .att-doc .ext.ppt, .att-doc .ext.pptx { background: #b8550b; }
.att-doc .nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.att-more { font-size: 12.5px; color: var(--muted); flex: none; padding: 0 4px; }
.att-list { display: flex; flex-direction: column; gap: 8px; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.att-row .prog { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 4px; }
.att-row .prog i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.att-grid button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; padding: 0; background: var(--surface-2); cursor: zoom-in; }
.att-grid img { width: 100%; height: 100%; object-fit: cover; }

/* calendar: see the Apple-style block at the end */
.agenda .item .when { width: 70px; flex: none; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------ spreadsheets */
.sheet-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.sheet-table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 13.5px; }
.sheet-table th, .sheet-table td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; text-align: left; }
.sheet-table th { background: var(--surface-2); font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 7px 8px; position: sticky; top: 0; white-space: nowrap; cursor: pointer; user-select: none; }
.sheet-table td:last-child, .sheet-table th:last-child { border-right: 0; }
.sheet-table tr:last-child td { border-bottom: 0; }
.sheet-table input, .sheet-table select { width: 100%; height: 34px; border: 0; background: transparent; padding: 0 8px; border-radius: 0; font-size: 13.5px; }
.sheet-table input:focus, .sheet-table select:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--surface); }
.sheet-table td.num input { text-align: right; font-family: var(--mono); }
.sheet-table td.act { width: 40px; text-align: center; }
.sheet-table td:nth-child(1) { min-width: 150px; } .sheet-table td:nth-child(2) { min-width: 112px; } .sheet-table td:nth-child(6) { min-width: 110px; }
.sheet-table tr.income td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.sheet-table tr.expense td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.sheet-table tfoot td { padding: 8px; font-weight: 700; background: var(--surface-2); }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font: 11px var(--font); }
.chart .grid line { stroke: var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legend i.dash { height: 0; border-top: 2px dashed var(--accent); border-radius: 0; width: 14px; vertical-align: 3px; }

/* ------------------------------------------------ team map */
#map { height: 380px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); position: relative; }
@media (min-width: 900px) { #map { height: 460px; } }
.map-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); font-size: 14px; }
.mk-person { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); overflow: hidden; background: #57564f; color: #fff; display: grid; place-items: center; font: 700 13px var(--font); cursor: pointer; }
.mk-person img { width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; display: block; }
.maplibregl-popup-content, .leaflet-popup-content-wrapper { font: 13.5px/1.4 var(--font); color: #1d1d1b; border-radius: 8px !important; }
.leaflet-container .mk-person img { max-width: none !important; }
.loc-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.loc-banner > svg { width: 22px; height: 22px; color: var(--accent-text); flex: none; }

/* ------------------------------------------------ photos & viewer */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(30%, 140px), 1fr)); gap: 6px; }
.photo-tile, .add-photo-tile { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 8px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; display: block; width: 100%; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 4px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-tile .prog { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.5); overflow: hidden; }
.photo-tile .prog i { display: block; height: 100%; width: 0; background: #fff; transition: width .2s; }
.photo-tile.uploading img { opacity: .55; }
.photo-tile .fail { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: #fff; background: rgba(160,30,20,.75); padding: 6px; text-align: center; }
.add-photo-tile { border: 1.5px dashed var(--line-2); background: var(--surface); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.add-photo-tile svg { width: 22px; height: 22px; }
.photo-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.photo-strip .photo-tile, .photo-strip .add-photo-tile { width: 72px; flex: none; }
.pick-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.pick-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 110px; padding: 14px 10px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; cursor: pointer; text-align: center; }
.pick-btn svg { width: 26px; height: 26px; color: var(--accent-text); }
.pick-btn small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.pick-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.viewer { position: fixed; inset: 0; z-index: 250; background: #0b0b0a; color: #fff; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: fade .15s; }
.viewer-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 10px 8px; }
.viewer-top .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.viewer-top .who span { font-size: 12.5px; opacity: .75; }
.vbtn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; text-decoration: none; flex: none; }
.vbtn svg { width: 19px; height: 19px; }
.viewer-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 8px; touch-action: pan-y; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.viewer-stage .nav { position: absolute; top: 50%; transform: translateY(-50%); }
.viewer-stage .prev { left: 10px; } .viewer-stage .next { right: 10px; }
@media (hover: none) { .viewer-stage .nav { display: none; } }
.viewer-bottom { padding: 8px 14px calc(12px + var(--safe-b)); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.viewer-bottom input { width: min(560px, 100%); height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; padding: 0 12px; }
.viewer-bottom .vcount { font-size: 12.5px; opacity: .7; }

/* ------------------------------------------------ avatar cropper */
.crop-stage { position: relative; width: min(320px, 100%); aspect-ratio: 1; margin: 0 auto; overflow: hidden; border-radius: 10px; background: #111; touch-action: none; cursor: grab; user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; pointer-events: none; }
.crop-stage .ring { position: absolute; inset: 8%; border-radius: 50%; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .58); border: 2px solid rgba(255,255,255,.9); pointer-events: none; }
.crop-controls { display: flex; align-items: center; gap: 10px; margin: 14px auto 0; width: min(320px, 100%); }
.crop-controls input[type=range] { flex: 1; accent-color: var(--accent); }
.crop-preview { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.crop-preview canvas { border-radius: 50%; border: 1px solid var(--line); }

/* ------------------------------------------------ sheets (dialogs), menus, toasts */
#sheet-root { position: relative; z-index: 100; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15, 15, 13, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease-out; }
.sheet { width: 100%; max-height: 92dvh; overflow-y: auto; background: var(--surface); border-radius: 14px 14px 0 0; padding: 8px 18px calc(18px + var(--safe-b)); animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); }
.sheet .grab { width: 36px; height: 4px; border-radius: 99px; background: var(--line-2); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.sheet-foot { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; }
@media (max-width: 559px) { .sheet-foot .btn { flex: 1; } }
.sheet-backdrop.leaving { animation: fade-out .2s ease-in forwards; pointer-events: none; }
.sheet-backdrop.leaving .sheet { animation: sheet-down .2s ease-in forwards; }
@media (min-width: 700px) {
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet { max-width: 560px; border-radius: 12px; padding: 20px 22px; animation: pop .18s ease-out; border: 1px solid var(--line); }
  .sheet.wide { max-width: 760px; }
  .sheet .grab { display: none; }
  .sheet-backdrop.leaving .sheet { animation: fade-out .15s ease-in forwards; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes pop { from { opacity: 0; transform: scale(.98); } }
.menu-pop { position: fixed; z-index: 150; min-width: 220px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--menu-shadow); padding: 6px; animation: pop .12s ease-out; }
.menu-pop .mi, .menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 6px; text-align: left; font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--ink); }
.menu-pop .mi:hover, .menu a:hover, .menu button:hover { background: var(--hover); }
.menu-pop .mi svg, .menu svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.menu-pop .sep { height: 1px; background: var(--line); margin: 5px 0; }
.menu-pop .head { padding: 8px 10px 6px; }
.menu { display: flex; flex-direction: column; }
#toasts { position: fixed; z-index: 300; top: calc(12px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: var(--bg); padding: 11px 14px; border-radius: 9px; font-weight: 500; font-size: 14px; box-shadow: var(--menu-shadow); animation: toast-in .2s ease-out; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.toast.err { background: var(--red); color: #fff; }
.toast .act { border: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; }
.toast svg { width: 16px; height: 16px; flex: none; opacity: .7; }
.toast.leaving { animation: fade-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ------------------------------------------------ search overlay */
.search-pop { position: fixed; inset: 0; z-index: 140; background: rgba(15,15,13,.4); display: flex; justify-content: center; align-items: flex-start; padding: calc(10px + var(--safe-t)) 10px 10px; animation: fade .12s; }
.search-panel { width: min(640px, 100%); background: var(--surface); border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--menu-shadow); overflow: hidden; display: flex; flex-direction: column; max-height: 80dvh; }
@media (min-width: 700px) { .search-pop { padding-top: 12vh; } }
.search-panel .q { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.search-panel .q svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.search-panel .q input { flex: 1; height: 52px; border: 0; background: none; font-size: 16px; outline: none; min-width: 0; }
.search-results { overflow-y: auto; padding: 6px; }
.search-results .grp { padding: 8px 10px 4px; }
.search-results .res { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; text-decoration: none; color: inherit; cursor: pointer; }
.search-results .res.sel, .search-results .res:hover { background: var(--accent-soft); }
.search-results .res .ic { width: 30px; height: 30px; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); flex: none; }
.search-results .res .ic svg { width: 16px; height: 16px; }

/* ------------------------------------------------ auth */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: start; padding: max(6vh, 24px) 16px 40px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand .brandmark { width: 36px; height: 36px; }
.auth-brand b { font-size: 20px; }
.auth h1 { font-size: 22px; margin-bottom: 4px; }
.auth .card { padding: 22px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.consent input { margin-top: 3px; width: 17px; height: 17px; flex: none; accent-color: var(--accent); }
.invite-banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-text); border-radius: var(--radius); margin-bottom: 14px; font-size: 14px; }
.invite-banner svg { width: 20px; height: 20px; flex: none; }
.foot-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 22px; font-size: 13px; }
.foot-links a { color: var(--muted); }
.code-box { font: 600 26px var(--mono); letter-spacing: .14em; padding: 10px 14px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 8px; text-align: center; }
.linkbox { display: flex; gap: 6px; }
.linkbox input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px !important; height: 34px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 8px; background: var(--surface-2); color: var(--ink-2); }

/* ------------------------------------------------ legal */
.legal { max-width: 720px; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { margin: 24px 0 8px; font-size: 17px; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 20px; }
.legal .updated { color: var(--muted); font-size: 13.5px; }
.legal .support { margin-top: 28px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.legal-wrap { min-height: 100dvh; display: flex; justify-content: center; padding: 24px 16px 60px; }

/* ------------------------------------------------ page motion (short and quiet) */
.in-view { animation: view-in .18s ease-out both; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--hover), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.boot { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); }

/* company profile */
.coprof-join{margin-top:44px;flex:none}
@media (max-width:560px){.coprof-join{margin-top:2px;width:100%}}

/* =====================================================================
   Apple-style layer: glass chrome, springy motion, softer surfaces.
   ===================================================================== */
body { font-size: 15px; letter-spacing: -.005em; }
h1 { font-family: var(--font-display); font-size: 28px; letter-spacing: -.022em; font-weight: 700; }
h2 { font-family: var(--font-display); letter-spacing: -.015em; }
.page-head h1 { font-size: 30px; }
@media (max-width: 899px) { .page-head h1 { font-size: 28px; } }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

/* glass top bar, tab bar and sidebar */
.topbar { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--line); }
.topbar.has-banner { background-color: var(--surface); }
.bottomnav { background: var(--glass-2); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); border-top: .5px solid var(--line); }
.navbtn { transition: color .2s; }
.navbtn svg { transition: transform .45s var(--bounce); }
.navbtn:active { background: none; }
.navbtn:active svg { transform: scale(.82); transition-duration: .12s; }
.navbtn.on svg { transform: scale(1.06); }
.navbtn .count.pop, .sidebar .navbtn .count.pop { animation: badge-pop .45s var(--bounce); }
@keyframes badge-pop { from { transform: scale(.3); opacity: 0; } }
@media (min-width: 900px) {
  .sidebar { background: var(--glass-2); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border-right: .5px solid var(--line); }
  .sidebar .navbtn { border-radius: 8px; transition: background-color .2s, color .2s; }
  .sidebar .navbtn.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
  .sidebar .co-btn { border: 0; background: transparent; box-shadow: none; }
  .sidebar .co-btn:hover { background: var(--hover); }
  .sidebar #side-me { cursor: pointer; }
}

/* surfaces */
.card, .jobcard, .projcard, .kpi, .loc-banner { border-color: transparent; box-shadow: var(--card-shadow); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .jobcard, :root[data-theme="dark"] .projcard, :root[data-theme="dark"] .kpi { border-color: rgba(255,255,255,.04); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.card, .jobcard, .projcard, .kpi) { border-color: rgba(255,255,255,.04); } }
a.card, .jobcard, .projcard, a.kpi, .chan, .ping, .list > .item, .search-results .res { transition: transform .4s var(--spring), box-shadow .4s var(--spring), background-color .2s; }
@media (hover: hover) {
  a.card:hover, .jobcard:hover, .projcard:hover, a.kpi:hover { transform: translateY(-2px); box-shadow: var(--lift-shadow); border-color: transparent; }
  /* pressed: only with a mouse. On a touch screen, putting a finger on a card to scroll counts as pressing it, which made cards shift while scrolling */
  a.card:active, .jobcard:active, .projcard:active, a.kpi:active { transform: scale(.98); transition-duration: .15s; }
}
/* info boxes that aren't buttons (Submitted, Started, totals…) never move */
div.kpi, span.kpi { transform: none !important; transition: none; }
@media (hover: none) { a.card:active, .jobcard:active, .projcard:active, a.kpi:active { transform: none; background-color: var(--hover); } }
.list > a.item:active, .list > button.item:active, .chan:active, .ping:active { background: var(--hover); }
.kpi .v { font-family: var(--font-display); font-size: 28px; letter-spacing: -.02em; }

/* buttons: filled, Apple-style */
.btn { border-radius: 10px; border-color: transparent; background: rgba(120, 120, 128, .12); transition: background-color .2s, transform .35s var(--bounce), box-shadow .2s, opacity .2s; }
.btn:hover { background: rgba(120, 120, 128, .2); }
.btn:active { transform: scale(.95); transition-duration: .1s; }
.btn.primary { box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.12); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: rgba(120, 120, 128, .12); }
.btn.danger.solid { box-shadow: none; }
:root[data-theme="dark"] .btn:not(.primary):not(.ghost):not(.solid) { background: rgba(120, 120, 128, .24); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.primary):not(.ghost):not(.solid) { background: rgba(120, 120, 128, .24); } }
.icon-btn { border-radius: 50%; transition: background-color .2s, transform .35s var(--bounce); }
.icon-btn:active { transform: scale(.88); }
.field input, .field select, .field textarea, .input { border-radius: 10px; }
.chip { transition: background-color .2s, color .2s, transform .35s var(--bounce); }
.chip:active { transform: scale(.94); }
.check { transition: background-color .2s, border-color .2s, transform .35s var(--bounce); }
.check.on { animation: check-pop .4s var(--bounce); }
@keyframes check-pop { 40% { transform: scale(1.18); } }
.switch { width: 46px; height: 28px; }
.switch i::after { width: 24px; height: 24px; left: 2px; top: 2px; box-shadow: 0 2px 5px rgba(0,0,0,.2), 0 0 0 .5px rgba(0,0,0,.04); transition: transform .35s var(--spring); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:checked + i { background: #34c759; }
.star-btn { transition: color .2s, transform .4s var(--bounce); }
.star-btn:active { transform: scale(.7); }
.star-btn.on svg { animation: check-pop .45s var(--bounce); }

/* segmented controls with a sliding thumb */
.seg { position: relative; background: rgba(118, 118, 128, .12); border: 0; border-radius: 9px; padding: 2px; }
:root[data-theme="dark"] .seg { background: rgba(118, 118, 128, .24); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg { background: rgba(118, 118, 128, .24); } }
.seg button, .seg a { position: relative; z-index: 1; border-radius: 7px; transition: color .25s; color: var(--ink-2); }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); }
.seg.has-thumb .on { background: transparent; box-shadow: none; }
.seg-thumb { position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 0; border-radius: 7px; background: var(--surface); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04);
  transition: transform .45s var(--spring), width .45s var(--spring); pointer-events: none; }
:root[data-theme="dark"] .seg-thumb, :root[data-theme="dark"] .seg .on { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.seg-thumb, .seg .on) { background: #636366; } }
.tab-ink { transition: transform .45s var(--spring), width .45s var(--spring); }

/* sheets, menus */
.sheet-backdrop { background: rgba(0, 0, 0, .32); animation: fade .3s ease-out; }
.sheet { border-radius: 18px 18px 0 0; animation: sheet-up .5s var(--spring); box-shadow: 0 -10px 40px rgba(0,0,0,.12); }
.sheet .grab { width: 38px; height: 5px; background: var(--line-2); cursor: grab; touch-action: none; }
.sheet-backdrop.leaving .sheet { animation: sheet-down .3s var(--ease-out) forwards; }
@media (min-width: 700px) {
  .sheet { border-radius: 16px; border: 0; box-shadow: var(--menu-shadow); animation: sheet-pop .42s var(--spring); }
  .sheet-backdrop.leaving .sheet { animation: sheet-pop-out .2s ease-in forwards; }
}
@keyframes sheet-pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }
@keyframes sheet-pop-out { to { opacity: 0; transform: scale(.96); } }
.menu-pop { border: 0; border-radius: 13px; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
  transform-origin: top right; animation: menu-in .32s var(--spring); }
.menu-pop .mi { border-radius: 7px; }
.menu-pop .mi:hover { background: var(--accent); color: var(--accent-ink); }
.menu-pop .mi:hover svg { color: inherit; }
@keyframes menu-in { from { opacity: 0; transform: scale(.92); } }
.search-pop { background: rgba(0,0,0,.25); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.search-panel { border: 0; border-radius: 16px; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); animation: sheet-pop .38s var(--spring); }

/* toasts and notification banners: frosted, follow light/dark */
#toasts { width: min(420px, calc(100% - 20px)); top: calc(8px + var(--safe-t)); gap: 8px; }
.toast { background: var(--glass-solid); color: var(--ink); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-radius: 16px; padding: 12px 16px; box-shadow: var(--menu-shadow); animation: banner-in .55s var(--spring); }
.toast.err { background: color-mix(in srgb, var(--red) 92%, transparent); color: #fff; }
.toast.leaving { animation: banner-out .3s var(--ease-out) forwards; }
@keyframes banner-in { from { opacity: 0; transform: translateY(-120%) scale(.9); } }
@keyframes banner-out { to { opacity: 0; transform: translateY(-110%) scale(.94); } }
.nbanner { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 11px 14px 11px 12px; border-radius: 20px; cursor: pointer;
  background: var(--glass-solid); color: var(--ink); -webkit-backdrop-filter: saturate(180%) blur(26px); backdrop-filter: saturate(180%) blur(26px);
  box-shadow: var(--menu-shadow); animation: banner-in .6s var(--spring); touch-action: pan-x; user-select: none; transition: transform .45s var(--spring), opacity .3s; }
.nbanner .avatar { width: 40px; height: 40px; font-size: 14px; }
.nbanner .nb-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.nbanner .nb-ico svg { width: 21px; height: 21px; }
.nbanner .nb-main { flex: 1; min-width: 0; }
.nbanner .nb-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.nbanner .nb-top b { font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nbanner .nb-top .where { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nbanner .nb-top time { margin-left: auto; font-size: 12px; color: var(--muted); flex: none; }
.nbanner .nb-text { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nbanner:active { transform: scale(.97); }
.nbanner.leaving { animation: banner-out .32s var(--ease-out) forwards; }
.nbanner.opening { animation: banner-open .38s var(--spring) forwards; }
@keyframes banner-open { to { opacity: 0; transform: scale(1.08) translateY(30px); } }
::view-transition-group(nb-morph) { animation-duration: .5s; animation-timing-function: var(--spring); }
::view-transition-old(nb-morph), ::view-transition-new(nb-morph) { height: 100%; object-fit: cover; }

/* page transitions (View Transitions where supported, otherwise a CSS fallback) */
main#view { view-transition-name: main; }
/* Computers: the top bar and side menu stay put while the page slides. (Phones don't use page transitions at all, see canVT in ui.js,
   so the fixed tab bar is never part of one; the bottom bar is deliberately not named here.) */
@media (min-width: 900px) { .topbar { view-transition-name: topbar; } .sidebar { view-transition-name: sidebar; } }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(main) { animation-duration: .36s; animation-timing-function: var(--spring); }
html[data-nav="forward"]::view-transition-old(main) { animation: .36s var(--spring) both vt-out-left; }
html[data-nav="forward"]::view-transition-new(main) { animation: .36s var(--spring) both vt-in-right; }
html[data-nav="back"]::view-transition-old(main) { animation: .36s var(--spring) both vt-out-right; }
html[data-nav="back"]::view-transition-new(main) { animation: .36s var(--spring) both vt-in-left; }
html[data-nav="tab"]::view-transition-old(main) { animation: .18s ease-out both vt-fade-out; }
html[data-nav="tab"]::view-transition-new(main) { animation: .36s var(--spring) both vt-rise; }
@keyframes vt-out-left { to { opacity: 0; transform: translateX(-18%); } }
@keyframes vt-in-right { from { opacity: 0; transform: translateX(28%); } }
@keyframes vt-out-right { to { opacity: 0; transform: translateX(22%); } }
@keyframes vt-in-left { from { opacity: 0; transform: translateX(-16%); } }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-rise { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.in-view.nav-forward { animation: vt-in-right .42s var(--spring) both; }
.in-view.nav-back { animation: vt-in-left .42s var(--spring) both; }
.in-view.nav-tab { animation: vt-rise .36s var(--spring) both; }
/* content settles in, one after another */
.enter .cards > *, .enter .list > *, .enter #projlist .cards > *, .enter .kpis > *, .enter .ping, .enter .chan, .enter .dir-item { animation: rise .5s var(--spring) both; }
.enter :is(.cards, .list, .kpis) > :nth-child(2), .enter .ping:nth-child(2), .enter .chan:nth-child(2) { animation-delay: .03s; }
.enter :is(.cards, .list, .kpis) > :nth-child(3), .enter .ping:nth-child(3), .enter .chan:nth-child(3) { animation-delay: .06s; }
.enter :is(.cards, .list, .kpis) > :nth-child(4), .enter .ping:nth-child(4), .enter .chan:nth-child(4) { animation-delay: .09s; }
.enter :is(.cards, .list, .kpis) > :nth-child(5), .enter .ping:nth-child(5), .enter .chan:nth-child(5) { animation-delay: .12s; }
.enter :is(.cards, .list, .kpis) > :nth-child(6), .enter .ping:nth-child(6), .enter .chan:nth-child(6) { animation-delay: .15s; }
.enter :is(.cards, .list, .kpis) > :nth-child(n+7), .enter .ping:nth-child(n+7), .enter .chan:nth-child(n+7) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------ chat, iMessage-style */
.chat-pane { border: 0; box-shadow: var(--card-shadow); }
.chat-top { position: relative; z-index: 2; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--line); }
.chat-head-btn { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border: 0; background: none; padding: 2px 6px 2px 2px; margin: -2px 0; border-radius: 10px; cursor: pointer; text-align: left; color: inherit; transition: background-color .2s; }
.chat-head-btn:hover { background: var(--hover); }
.chat-head-btn .who-line { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head-btn .who-line.typing { color: var(--accent-text); font-weight: 600; }
.msgs { padding: 14px 12px; gap: 2px; scroll-behavior: smooth; }
.msg { max-width: 82%; }
.bubble { border-radius: 19px; padding: 8px 13px; line-height: 1.38; font-size: 15px; background: rgba(120, 120, 128, .14); }
:root[data-theme="dark"] .bubble { background: #2c2c2e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble { background: #2c2c2e; } }
.msg.mine .bubble { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff) 0%, var(--accent) 100%); color: var(--accent-ink); }
.msg.last:not(.mine) .bubble { border-bottom-left-radius: 6px; }
.msg.mine.last .bubble { border-bottom-right-radius: 6px; }
.msg.pending .bubble { opacity: .65; }
.msg.failed .bubble { background: var(--red-soft); color: var(--red); }
.msg.new.mine { animation: msg-send .55s var(--spring) both; transform-origin: bottom right; }
.msg.new:not(.mine) { animation: msg-recv .55s var(--spring) both; transform-origin: bottom left; }
@keyframes msg-send { from { opacity: 0; transform: translate(10px, 18px) scale(.86); } }
@keyframes msg-recv { from { opacity: 0; transform: translate(-6px, 10px) scale(.9); } }
.msg-time { opacity: 0; transition: opacity .2s; }
.msg:hover .msg-time, .msg.last .msg-time { opacity: 1; }
.typing-row { display: flex; align-items: flex-end; gap: 8px; padding: 2px 0 8px; min-height: 0; } /* same left edge as the messages above */
.typing-row:empty { display: none; }
.typing-row .who { font-size: 12px; color: var(--muted); align-self: center; }
.typing-bubble { display: inline-flex; gap: 4px; align-items: center; padding: 11px 13px; border-radius: 19px 19px 19px 6px; background: rgba(120, 120, 128, .14); animation: msg-recv .45s var(--spring) both; }
:root[data-theme="dark"] .typing-bubble { background: #2c2c2e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .typing-bubble { background: #2c2c2e; } }
.typing-bubble i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing-dot 1.2s infinite ease-in-out; }
.typing-bubble i:nth-child(2) { animation-delay: .15s; } .typing-bubble i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.typing-row .stackav .avatar { width: 26px; height: 26px; font-size: 10px; }
.composer { gap: 8px; padding: 8px 10px calc(8px); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--line); }
.composer textarea { border-radius: 20px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.composer textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.composer .send-btn { transition: transform .4s var(--bounce), opacity .2s, background-color .2s; }
.composer .send-btn[data-empty] { opacity: .45; transform: scale(.9); }
.composer .send-btn svg { transition: transform .4s var(--spring); }
.composer .send-btn.fly svg { animation: send-fly .55s var(--spring); }
@keyframes send-fly { 35% { transform: translate(14px, -14px) scale(.6); opacity: 0; } 36% { transform: translate(-10px, 10px) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.chan .typing { color: var(--accent-text); font-weight: 600; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: .5px solid var(--line); }
.member-row:first-child { border-top: 0; }

/* ------------------------------------------------ photo & file viewer */
.viewer { background: rgba(0, 0, 0, var(--vbg, 1)); animation: none; transition: background-color .3s; }
.viewer.closing { --vbg: 0; transition: background-color .32s ease; }
.viewer .viewer-top, .viewer .viewer-bottom { transition: opacity .25s; }
.viewer.chrome-off .viewer-top, .viewer.chrome-off .viewer-bottom, .viewer.dragging .viewer-top, .viewer.dragging .viewer-bottom { opacity: 0; pointer-events: none; }
.viewer-stage { touch-action: none; overflow: hidden; }
.viewer-stage img { will-change: transform; transform-origin: center; transition: transform .45s var(--spring); }
.viewer-stage img.no-anim { transition: none; }
.viewer-top { background: linear-gradient(rgba(0,0,0,.55), transparent); position: relative; z-index: 2; }
.viewer-bottom { background: linear-gradient(transparent, rgba(0,0,0,.55)); position: relative; z-index: 2; }
.vbtn { background: rgba(120,120,128,.32); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .35s var(--bounce), background-color .2s; }
.vbtn:active { transform: scale(.88); }
.vbtn.done { width: auto; padding: 0 16px; border-radius: 20px; font-weight: 600; font-size: 15px; }
.vbtn.done svg { display: none; }
.viewer-hint { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); font-size: 12px; color: rgba(255,255,255,.6); pointer-events: none; }
.docview { position: fixed; inset: 0; z-index: 250; background: var(--bg); display: grid; grid-template-rows: auto minmax(0, 1fr); animation: sheet-up .5s var(--spring); }
.docview.leaving { animation: sheet-down .3s var(--ease-out) forwards; }
.docview-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 12px 8px; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--line); }
.docview-top .nm { flex: 1; min-width: 0; font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docview iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.docview .doc-card { margin: auto; text-align: center; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 360px; }
.docview .doc-card .ext { font: 800 16px var(--font); text-transform: uppercase; color: #fff; background: var(--slate); border-radius: 12px; width: 76px; height: 92px; display: grid; place-items: center; box-shadow: var(--lift-shadow); }
.docview .doc-card .ext.pdf { background: #c4271d; } .docview .doc-card .ext:is(.doc, .docx, .odt, .rtf) { background: #0a5fd1; } .docview .doc-card .ext:is(.xls, .xlsx, .ods, .csv) { background: #1a7a43; } .docview .doc-card .ext:is(.ppt, .pptx) { background: #c4570b; }
.att-doc { cursor: pointer; font: inherit; font-size: 12.5px; text-align: left; }

/* ------------------------------------------------ calendar, Apple-style */
.cal-top { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-title { flex: 1; min-width: 0; }
.cal-title h1 { font-size: 32px; line-height: 1.1; white-space: nowrap; }
.cal-title h1 .yr { color: var(--accent-text); font-weight: 600; }
.cal-title .sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.cal-ctrls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-nav { display: inline-flex; align-items: center; gap: 2px; }
.cal-nav .btn { height: 34px; }
.cal-nav .btn.icon { width: 34px; border-radius: 50%; background: transparent; color: var(--accent-text); }
.cal-nav .btn.icon:hover { background: rgba(120,120,128,.12); }
.cal-nav .today-btn { border-radius: 17px; color: var(--accent-text); }
@media (max-width: 699px) {
  .cal-top { align-items: center; }
  .cal-title h1 { font-size: 28px; }
  .cal-ctrls { width: 100%; justify-content: space-between; flex-wrap: nowrap; }
  .cal-ctrls .seg { flex: 1; min-width: 0; justify-content: space-between; } .cal-ctrls .seg button { flex: 1; padding: 6px 4px; }
  .cal-ctrls .seg { flex: 1; } .cal-ctrls .seg button { flex: 1; }
}
.cal-anim { animation: rise .45s var(--spring) both; }
.cal-anim.from-right { animation: cal-from-right .45s var(--spring) both; }
.cal-anim.from-left { animation: cal-from-left .45s var(--spring) both; }
@keyframes cal-from-right { from { opacity: 0; transform: translateX(40px); } }
@keyframes cal-from-left { from { opacity: 0; transform: translateX(-40px); } }
.cal-surface { background: var(--surface); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; touch-action: pan-y; }
.cal-dows { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 10px 6px 4px; }
.cal-dows span { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cal-dows span.we { opacity: .7; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-cell { position: relative; min-width: 0; min-height: 112px; padding: 6px 5px 6px; border: 0; border-top: .5px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; transition: background-color .2s; }
.cal-cell:not(:nth-child(7n)) { border-right: .5px solid var(--line); }
.cal-cell:hover { background: color-mix(in srgb, var(--hover) 70%, transparent); }
.cal-cell.other .dn { color: var(--muted); opacity: .55; }
.cal-cell.we { background: color-mix(in srgb, var(--surface-2) 40%, transparent); }
.cal-cell .dn { align-self: flex-end; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; display: grid; place-items: center; font-size: 14px; font-weight: 500; transition: background-color .25s, color .25s, transform .4s var(--bounce); }
.cal-cell.today .dn { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cal-cell.sel:not(.today) .dn { background: var(--ink); color: var(--bg); font-weight: 700; }
.cal-cell.sel .dn { transform: scale(1.06); }
.cal-cell .evs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-pill { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 12px; line-height: 1.25; padding: 2px 6px 2px 5px; border-radius: 5px; border: 0; text-decoration: none; color: var(--ink); cursor: pointer; text-align: left; font-weight: 500;
  background: color-mix(in srgb, var(--c) 16%, transparent); transition: transform .3s var(--bounce), background-color .2s; }
.cal-pill:hover { background: color-mix(in srgb, var(--c) 26%, transparent); }
.cal-pill:active { transform: scale(.96); }
.cal-pill::before { content: ""; width: 3px; align-self: stretch; border-radius: 2px; background: var(--c); flex: none; }
.cal-pill .t { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.cal-pill .x { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-more { font-size: 11.5px; color: var(--muted); padding: 0 6px; }
.cal-dots { display: none; justify-content: center; gap: 3px; height: 6px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
@media (max-width: 699px) {
  .cal-grid { padding: 0 2px 6px; }
  .cal-cell { min-height: 54px; padding: 4px 0 6px; align-items: center; border: 0 !important; background: none !important; gap: 4px; }
  .cal-cell .dn { align-self: center; width: 34px; height: 34px; border-radius: 50%; font-size: 17px; padding: 0; }
  .cal-cell .evs { display: none; }
  .cal-dots { display: flex; }
}
.cal-agenda { margin-top: 14px; }
.cal-agenda-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 8px; }
.cal-agenda-head h2 { font-size: 20px; }
.ag-item { display: flex; align-items: stretch; gap: 12px; padding: 12px 14px; border: 0; border-top: .5px solid var(--line); background: none; width: 100%; text-align: left; color: inherit; text-decoration: none; cursor: pointer; font: inherit; transition: background-color .2s; }
.ag-item:first-child { border-top: 0; }
.ag-item:hover { background: var(--hover); }
.ag-item .bar { width: 4px; border-radius: 2px; background: var(--c); flex: none; }
.ag-item .tm { width: 58px; flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.35; }
.ag-item .tm b { color: var(--ink); font-weight: 600; display: block; }
.ag-item .ti { font-weight: 600; }
.ag-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 14px; }
/* week strip (phones) */
.wk-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; padding: 8px 4px; }
.wk-day { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0 6px; border-radius: 12px; cursor: pointer; color: inherit; font: inherit; }
.wk-day .dw { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.wk-day .dn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 500; transition: background-color .25s, transform .4s var(--bounce); }
.wk-day.today .dn { color: var(--accent-text); font-weight: 700; }
.wk-day.sel .dn { background: var(--ink); color: var(--bg); font-weight: 700; transform: scale(1.05); }
.wk-day.sel.today .dn { background: var(--accent); color: var(--accent-ink); }
/* timeline (day view, and week view on computers) */
.tl { display: grid; grid-template-columns: 54px minmax(0, 1fr); position: relative; }
.tl.week { grid-template-columns: 54px repeat(7, minmax(0, 1fr)); }
.tl-head { position: sticky; top: 0; z-index: 3; display: contents; }
.tl-colhead { padding: 8px 4px 6px; text-align: center; border-bottom: .5px solid var(--line); background: var(--surface); cursor: pointer; }
.tl-colhead .dw { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.tl-colhead .dn { font-size: 20px; font-weight: 600; width: 34px; height: 34px; margin: 2px auto 0; display: grid; place-items: center; border-radius: 50%; }
.tl-colhead.today .dn { background: var(--accent); color: var(--accent-ink); }
.tl-allday { border-bottom: .5px solid var(--line); padding: 4px 3px; display: flex; flex-direction: column; gap: 2px; min-height: 30px; min-width: 0; }
.tl-gutter-lbl { font-size: 10.5px; color: var(--muted); padding: 8px 6px 0; text-align: right; border-bottom: .5px solid var(--line); }
.tl-hours { position: relative; }
.tl-hour { height: 52px; position: relative; font-size: 11px; color: var(--muted); text-align: right; padding-right: 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.tl-col { position: relative; border-left: .5px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) .5px, transparent .5px, transparent 52px); min-width: 0; }
.tl-col.today { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
.tl-ev { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 6px; font-size: 12px; line-height: 1.25; overflow: hidden; border: 0; text-align: left; cursor: pointer; color: var(--ink);
  background: color-mix(in srgb, var(--c) 20%, var(--surface)); box-shadow: inset 3px 0 0 var(--c); transition: transform .3s var(--bounce), box-shadow .2s; animation: rise .45s var(--spring) both; }
.tl-ev:hover { z-index: 2; box-shadow: inset 3px 0 0 var(--c), var(--lift-shadow); }
.tl-ev:active { transform: scale(.97); }
.tl-ev b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-ev span { color: var(--muted); font-size: 11px; }
.tl-now { position: absolute; left: -6px; right: 0; height: 2px; background: var(--dot); z-index: 2; pointer-events: none; }
.tl-now::before { content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
.tl-scroll { max-height: min(68vh, 760px); overflow-y: auto; overscroll-behavior: contain; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 12px 4px 0; }
.cal-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--c); }
.viewer, .docview { z-index: 320; }
#toasts { z-index: 330; }
body:has(.viewer, .docview) #toasts .nbanner { display: none; }
body:has(.viewer, .docview) #toasts { top: auto; bottom: calc(76px + var(--safe-b)); }

/* ------------------------------------------------ tab bar editor (jiggle mode) */
.tab-editor { position: fixed; inset: 0; z-index: 260; background: var(--bg); display: flex; flex-direction: column; animation: sheet-up .5s var(--spring); }
.tab-editor.leaving { animation: sheet-down .3s var(--ease-out) forwards; }
.te-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 10px; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--line); }
.te-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 18px 16px calc(24px + var(--safe-b)); }
@media (min-width: 760px) { .te-body { flex-direction: row; justify-content: center; align-items: flex-start; gap: 40px; padding-top: 34px; } }
.te-phone { width: min(330px, 100%); border-radius: 38px; padding: 10px; background: #1c1c1e; box-shadow: 0 30px 60px rgba(0,0,0,.25), inset 0 0 0 2px #3a3a3c; flex: none; }
.te-screen { height: min(330px, 40vh); border-radius: 28px 28px 0 0; background: var(--bg); overflow: hidden; position: relative; }
.te-mock-top { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; font-weight: 700; font-size: 14px; background: var(--surface); border-bottom: .5px solid var(--line); }
.te-mock-top .brandmark { width: 20px; height: 20px; }
.te-mock-main { padding: 12px 14px; }
.te-mock-sub { font-size: 10px; color: var(--muted); }
.te-mock-h { font: 700 20px var(--font-display); letter-spacing: -.02em; margin-bottom: 10px; }
.te-mock-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.te-mock-kpis i, .te-mock-card { display: block; height: 44px; border-radius: 10px; background: var(--surface); box-shadow: var(--card-shadow); }
.te-mock-card { height: 70px; margin-bottom: 8px; } .te-mock-card.short { height: 40px; }
.te-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 8px 4px 14px; border-radius: 0 0 28px 28px; background: var(--glass-2); border-top: .5px solid var(--line); min-height: 76px; }
.te-side { width: min(420px, 100%); }
.te-help { margin: 0 4px 16px; }
.te-tray { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; padding: 16px 10px; border-radius: 20px; background: var(--surface); box-shadow: var(--card-shadow); min-height: 96px; }
.te-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  animation: te-wiggle .26s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
.te-item.fixed { animation: none; cursor: default; opacity: .6; }
.te-item .te-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--accent-text); background: var(--accent-soft); transition: transform .3s var(--bounce), box-shadow .2s; }
.te-item.tray .te-ico { width: 54px; height: 54px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 30%, transparent); }
.te-item.bar .te-ico { background: transparent; width: 36px; height: 30px; }
.te-item .te-ico svg { width: 22px; height: 22px; }
.te-item.tray .te-ico svg { width: 26px; height: 26px; }
.te-item .te-lbl { font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.te-item.bar .te-lbl { font-size: 10.5px; color: var(--muted); }
.te-item.ghost { visibility: hidden; }
.te-item.swap .te-ico { transform: scale(.85); box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.te-badge { position: absolute; top: -2px; left: calc(50% - 30px); z-index: 2; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center;
  font: 700 17px/1 var(--font); cursor: pointer; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .3s var(--bounce); }
.te-item.bar .te-badge { left: calc(50% - 24px); top: -6px; width: 20px; height: 20px; font-size: 16px; }
.te-badge:active { transform: scale(.8); }
.te-badge.minus { background: #8e8e93; } .te-badge.plus { background: #34c759; }
.te-float { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; animation: none; transform-origin: center; filter: drop-shadow(0 12px 18px rgba(0,0,0,.25)); }
.te-float .te-badge { display: none; }
.tab-editor.dragging .te-item { cursor: grabbing; }
@keyframes te-wiggle { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@media (prefers-reduced-motion: reduce) { .te-item { animation: none; } }

/* No double-tap-to-zoom anywhere (pinch to zoom still works) */
html, body, button, a, input, select, textarea, label, [data-act], .cal-cell, .wk-day { touch-action: manipulation; }
.viewer-stage, .te-item, .cal-surface, .sheet .grab { touch-action: none; }
.cal-surface { touch-action: pan-y; }

/* ------------------------------------------------ job tick box, summary, photos; project flow */
.job-tick { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--line-2); background: var(--surface); display: grid; place-items: center; padding: 0; cursor: pointer;
  color: #fff; transition: background-color .25s, border-color .25s, transform .4s var(--bounce); touch-action: manipulation; }
.job-tick svg { width: 16px; height: 16px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .4s var(--bounce); }
.job-tick:hover { border-color: var(--ok); }
.job-tick:active { transform: scale(.85); }
.job-tick.on { background: #34c759; border-color: #34c759; }
.job-tick.on svg { opacity: 1; transform: none; }
.jobcard.is-done { background: color-mix(in srgb, #34c759 7%, var(--surface)); }
.jobcard.is-done h3 { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.job-sum { font-size: 13.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.4; }
.job-media { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.job-media .jm { position: relative; aspect-ratio: 4 / 3; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.job-media img { width: 100%; height: 100%; object-fit: cover; }
.job-media b { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-size: 15px; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.flow-step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.flow-step::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: -16px; width: 2.5px; border-radius: 2px; background: color-mix(in srgb, #ff3b30 35%, var(--line)); }
.flow-step:last-child::before { display: none; }
.flow-step.link-done::before { background: #34c759; }
.flow-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-top: 12px; position: relative; z-index: 1;
  background: #ff3b30; color: #fff; font: 700 13px var(--font); box-shadow: 0 0 0 4px var(--bg), 0 2px 8px color-mix(in srgb, #ff3b30 40%, transparent);
  transition: background-color .35s, box-shadow .35s; }
.flow-step.done .flow-dot { background: #34c759; box-shadow: 0 0 0 4px var(--bg), 0 2px 8px color-mix(in srgb, #34c759 40%, transparent); }
.flow-step.just-done .flow-dot { animation: check-pop .5s var(--bounce); }
.flow-step::before { transition: background-color .35s; }
.jobcard { transition: background-color .35s, transform .4s var(--spring), box-shadow .4s var(--spring); }
.flow-dot svg { width: 17px; height: 17px; stroke-width: 3; }
.flow-mini { display: flex; align-items: center; gap: 0; flex-wrap: wrap; row-gap: 6px; }
.flow-mini i { width: 11px; height: 11px; border-radius: 50%; background: #ff3b30; flex: none; position: relative; margin-right: 9px; transition: background-color .3s; }
.flow-mini i::after { content: ""; position: absolute; left: 11px; top: 4.5px; width: 9px; height: 2px; background: var(--line-2); }
.flow-mini i:last-of-type::after { display: none; }
.flow-mini i.done { background: #34c759; }
.page-head > .grow { flex: 1 1 60%; min-width: min(100%, 220px); }
.page-head h1 { overflow-wrap: break-word; }
/* bigger finger target for the job tick box (Apple recommends 44px) */
.job-tick { position: relative; }
.job-tick::after { content: ""; position: absolute; inset: -9px; }
@media (pointer: coarse) { .job-tick { width: 28px; height: 28px; } }
/* calendar markers: short coloured bars instead of dots */
.cal-marks { display: none; flex-direction: column; align-items: center; gap: 2px; width: 100%; min-height: 0; }
.cal-marks.always { display: flex; min-height: 20px; }
.cal-marks i { display: block; width: 72%; max-width: 30px; height: 5px; border-radius: 3px; background: var(--c); }
.cal-marks em { font: 700 10px/1 var(--font); font-style: normal; color: var(--ink-2); background: rgba(120,120,128,.18); border-radius: 6px; padding: 1px 5px; }
@media (max-width: 699px) { .cal-marks { display: flex; min-height: 20px; } .cal-cell { min-height: 64px; } }
.wk-day .cal-marks { width: 80%; }

/* ================================================================ time tracking (Home, timesheets, admin) */
.chips.wrap { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
.chip .cdot { width: 9px; height: 9px; }
.chip.add { border-style: dashed; color: var(--muted); }
.cdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cdot.lg { width: 14px; height: 14px; }
.btn.xl { height: 54px; font-size: 16.5px; border-radius: 14px; gap: 9px; }
.btn.xl svg { width: 20px; height: 20px; }
.btn.disabled, .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.pill.live { background: var(--red-soft); color: var(--red); }
.pill.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.st-new { background: var(--blue-soft); color: var(--blue); }
.pill.st-seen { background: var(--slate-soft); color: var(--slate); }
.pill.st-doing { background: var(--amber-soft); color: var(--amber); }
@keyframes rec { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.count.rec { min-width: 10px; width: 10px; height: 10px; padding: 0; }
.navbtn .count.rec { top: 4px; left: calc(50% + 8px); }
.sidebar .navbtn .count.rec { position: static; margin-left: auto; }

.home-head { margin-bottom: 16px; }
.home-head .sub { color: var(--muted); font-size: 14px; }
.home-grid { display: grid; gap: 22px; }
@media (min-width: 1000px) { .home-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }

.timer-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 4px; transition: border-color .3s, box-shadow .3s; }
.timer-card.is-running { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 8%, transparent); }
.timer-card.is-lunch { border-color: color-mix(in srgb, #4fb3e8 50%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, #4fb3e8 10%, transparent); }
.proj-pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); cursor: pointer; text-align: left; color: inherit; font: inherit; }
.proj-pick:hover { border-color: var(--line-2); }
.timer { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 26px 8px 14px; text-align: center; }
@media (min-width: 560px) { .timer { flex-direction: row; text-align: left; gap: 26px; padding: 26px 14px 16px; } }
.bigbtn { --size: 168px; width: var(--size); height: var(--size); flex: none; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 38%, transparent), inset 0 -6px 0 rgba(0,0,0,.12); position: relative;
  transition: border-radius .5s var(--spring), background-color .35s, box-shadow .35s, transform .3s var(--bounce); -webkit-tap-highlight-color: transparent; }
.bigbtn svg { width: 74px; height: 74px; stroke-width: 2.6; transition: transform .45s var(--spring); }
.bigbtn:hover { transform: scale(1.02); }
.bigbtn:active { transform: scale(.94); }
.bigbtn:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.bigbtn.running { border-radius: 34px; background: var(--red); color: #fff; box-shadow: 0 10px 28px color-mix(in srgb, var(--red) 40%, transparent), inset 0 -6px 0 rgba(0,0,0,.14); }
.bigbtn.running svg { width: 64px; height: 64px; fill: currentColor; stroke-width: 0; }
.bigbtn.running::after { content: ""; position: absolute; inset: -8px; border-radius: 42px; border: 2px solid var(--red); opacity: .25; }
@keyframes ring { 0% { transform: scale(.94); opacity: .55; } 100% { transform: scale(1.12); opacity: 0; } }
@media (max-width: 380px) { .bigbtn { --size: 140px; } .bigbtn svg { width: 62px; height: 62px; } }
.timer-info { min-width: 0; flex: 1; max-width: 100%; }
.timer-info .elapsed { font-size: 40px; font-weight: 700; letter-spacing: -.01em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.timer-info .what { font-size: 19px; font-weight: 700; margin-top: 4px; }
.plan-msg { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--ok-soft); color: var(--ok); }
.plan-msg.near { background: var(--amber-soft); color: var(--amber); }
.plan-msg.over { background: var(--red-soft); color: var(--red); }
.plan-msg svg { width: 14px; height: 14px; }
.quick { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 0 4px 6px; }
.quick .btn { flex: 1; max-width: 220px; }

.choose-card h2 { font-size: 20px; }
.choose-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.choose-btn { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; text-align: left; color: inherit; font: inherit; min-height: 58px; }
.choose-btn:hover { border-color: var(--accent); }
.choose-btn .team-swatch { width: 10px; height: 30px; border-radius: 3px; flex: none; }
.cp-list .item.on { background: var(--accent-soft); }
.cp-list .item .team-swatch { width: 10px; height: 30px; border-radius: 3px; flex: none; }

.day-card .day-total { font-size: 26px; font-weight: 700; line-height: 1.2; }
.day-card .day-total .muted { font-size: 15px; font-weight: 500; }
.day-card .progress.day { height: 8px; border-radius: 4px; margin: 12px 0 10px; }
.verdict { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.verdict.ok { background: var(--ok-soft); color: var(--ok); }
.verdict.warn, .verdict.short { background: var(--amber-soft); color: var(--amber); }
.verdict.over { background: var(--blue-soft); color: var(--blue); }
.progress.over > i, .progress.day.over > i { background: var(--blue); }
.progress.thin { height: 3px; margin-top: 7px; max-width: 260px; }
.progress.thin.over > i { background: var(--red); }

.daybar { position: relative; height: 22px; border-radius: 6px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.daybar.empty { height: 8px; }
.daybar > i { position: absolute; top: 0; bottom: 0; border-radius: 3px; min-width: 2px; }
.daybar > i.live { background-image: linear-gradient(90deg, transparent 60%, rgba(255,255,255,.35)) !important; background-blend-mode: overlay; }
.daybar > em { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--red); border-radius: 1px; }
.daybar .ticks { position: absolute; inset: 0; pointer-events: none; }
.daybar .ticks b { position: absolute; top: 4px; transform: translateX(-50%); font-size: 9.5px; font-weight: 600; color: var(--muted); opacity: .7; }
.who-row .daybar { height: 14px; margin-top: 6px; }
.who-row .daybar .ticks { display: none; }

.logrow { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px 11px 14px; border-top: 1px solid var(--line); }
.logrow:first-child { border-top: 0; }
.logrow .when { width: 46px; flex: none; font-size: 13px; line-height: 1.35; display: flex; flex-direction: column; }
.logrow .when span { color: var(--muted); }
.logrow .cbar { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.logrow .note { color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.logrow .dur { flex: none; padding-top: 1px; white-space: nowrap; }
.logrow .edited { color: var(--muted); margin-left: 3px; font-family: var(--font); }
.logrow.live { background: color-mix(in srgb, var(--red) 5%, transparent); }
.logrow.live .when span { color: var(--red); font-weight: 600; }
.logrow .btn.icon { margin: -4px -4px -4px 0; }
.finish-wrap .finish { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); }
.finish-wrap .finish:hover { border-color: var(--accent); color: var(--accent-text); }
.card.finished { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.mini-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.mini-kpis div { background: var(--surface-2); border-radius: 10px; padding: 10px 4px; }
.mini-kpis b { display: block; font-size: 18px; }
.mini-kpis span { font-size: 12px; color: var(--muted); }

.plan .row b { font-size: 15px; }
.plan .verdict-x, .plan .verdict { all: unset; font-size: 12.5px; font-weight: 600; color: var(--ok); }
.plan.near .verdict { color: var(--amber); }
.plan.over .verdict { color: var(--red); }
.plan .progress { height: 7px; margin-top: 7px; }
.plan.near .progress > i { background: var(--amber); }
.plan.over .progress > i { background: var(--red); }
.plan-line { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }

.task-add { display: flex; gap: 8px; }
.task-add .input[name=title] { flex: 1; min-width: 0; }
.task-add select { width: auto; max-width: 112px; }
@media (max-width: 480px) { .task-add { flex-wrap: wrap; } .task-add .input[name=title] { flex-basis: 100%; } .task-add select { flex: 1; max-width: none; } }
.trow { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-top: 1px solid var(--line); }
.trow:first-child { border-top: 0; }
.trow.done { opacity: .62; }
.trow .tplan { display: inline-flex; align-items: center; gap: 4px; }
.trow .tplan svg { width: 13px; height: 13px; }
.trow .tplan.over { color: var(--red); font-weight: 600; }
.live-dot { color: var(--red); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.playbtn { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--accent-text); display: grid; place-items: center; cursor: pointer; transition: transform .3s var(--bounce), background-color .2s; }
.playbtn svg { width: 16px; height: 16px; fill: currentColor; margin-left: 2px; }
.playbtn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.playbtn:active { transform: scale(.9); }
.playbtn.on { background: var(--red); border-color: var(--red); color: #fff; border-radius: 11px; }
.playbtn.on svg { margin: 0; }
.tab.tab-add { color: var(--accent-text); font-weight: 600; margin-left: auto; align-items: center; }
.tab.tab-add svg { width: 14px; height: 14px; }

.tl-day h3 { font-size: 15px; }
.tl-person { padding: 10px 0; border-top: 1px solid var(--line); }
.tl-person:first-of-type { border-top: 0; padding-top: 0; }
.tl-entries { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.tl-entries li { display: flex; gap: 8px; align-items: baseline; }
.tl-entries .mono { color: var(--muted); white-space: nowrap; flex: none; }
.tl-entries .cdot { width: 8px; height: 8px; align-self: center; }

.stop-sum { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); margin-bottom: 12px; }
.stop-sum .big { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stop-actions .btn { flex: 1 1 200px; height: 46px; }
details.earlier summary { cursor: pointer; color: var(--accent-text); font-weight: 600; font-size: 14px; }
.finish-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; text-align: center; }
.finish-sum div { background: var(--surface-2); border-radius: 12px; padding: 12px 6px; }
.finish-sum b { display: block; font-size: 20px; }
.finish-sum span { font-size: 12px; color: var(--muted); }

.month-nav { display: inline-flex; align-items: center; gap: 8px; }
.month-nav b { min-width: 132px; text-align: center; }
.ts-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ts-actions .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .ts-actions .btn { flex: 1 1 100%; } }
.tsday { border-top: 1px solid var(--line); }
.tsday:first-child { border-top: 0; }
.tsday.we .tsday-head .d b { color: var(--muted); }
.tsday-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; background: none; cursor: pointer; text-align: left; color: inherit; font: inherit; min-height: 50px; }
.tsday-head:hover { background: var(--hover); }
.tsday-head .d { width: 56px; flex: none; font-size: 14px; }
.tsday-head .mono { font-weight: 600; white-space: nowrap; }
.tsday-head .ot { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tsday-head .ot.pos { background: var(--blue-soft); color: var(--blue); }
.tsday-head .ot.neg { background: var(--amber-soft); color: var(--amber); }
.tsday-head .appr { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--ok); white-space: nowrap; }
.tsday-head .appr svg { width: 12px; height: 12px; }
.tsday-head .chev { color: var(--muted); display: flex; transition: transform .25s var(--spring); }
.tsday.open .tsday-head .chev { transform: rotate(90deg); }
.tsday.open .tsday-head { background: var(--surface-2); }
.tsday-body { padding: 12px 14px 16px; background: var(--surface-2); }
.tsday-body .card.flush { background: var(--surface); }
.day-notes { display: grid; gap: 8px; margin-bottom: 12px; }
@media (min-width: 700px) { .day-notes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.day-notes div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.day-notes p { margin: 4px 0 0; white-space: pre-wrap; font-size: 14px; }
@media (max-width: 480px) { .tsday-head { gap: 7px; padding: 12px 10px; } .tsday-head .d { width: 46px; } .tsday-head .grow { font-size: 12px; } }

.who-row { align-items: flex-start !important; }
.st { font-weight: 700; color: var(--ink-2); }
.st.live { color: var(--red); }
.st.lunch { color: #2e93c9; }
.st.done { color: var(--ok); }
.st.off { color: var(--muted); font-weight: 500; }
.note-card { border-top: 1px solid var(--line); padding-top: 10px; }
.note-card:first-child { border-top: 0; padding-top: 0; }
.note-card p { margin: 6px 0 0; font-size: 13.5px; white-space: pre-wrap; }
.nk { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; margin-right: 6px; background: var(--surface-2); color: var(--muted); }
.nk.good { background: var(--ok-soft); color: var(--ok); }
.nk.bad { background: var(--red-soft); color: var(--red); }
.num-cols { display: flex; gap: 14px; flex: none; text-align: right; }
.num-cols span { display: flex; flex-direction: column; min-width: 46px; }
.num-cols b { font-size: 14px; }
.num-cols i { font-style: normal; font-size: 11px; color: var(--muted); }
@media (max-width: 560px) { .num-cols span:nth-child(2) { display: none; } .num-cols { gap: 10px; } }
.files { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.list > .item > svg { width: 18px; height: 18px; flex: none; }
.filecard { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; min-width: 0; }
a.filecard:hover { border-color: var(--accent); }
.filecard > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.xl-ico { width: 38px; height: 44px; flex: none; border-radius: 6px; background: #1d6f42; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em; display: grid; place-items: end center; padding-bottom: 6px; position: relative; }
.xl-ico::before { content: ""; position: absolute; top: 0; right: 0; border-width: 0 10px 10px 0; border-style: solid; border-color: var(--surface) var(--surface) rgba(255,255,255,.35) rgba(255,255,255,.35); }

.sug .reply { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.sug .reply p { margin: 4px 0 0; }
.sug.done { opacity: .78; }
.sug-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.sug-ico svg { width: 15px; height: 15px; }
.sug-ico.k-idea { background: var(--amber-soft); color: var(--amber); }
.sug-ico.k-bug { background: var(--red-soft); color: var(--red); }
.sug-ico.k-question { background: var(--blue-soft); color: var(--blue); }
.menu-pop .mi.danger { color: var(--red); }
.menu-pop .mi.danger svg { color: var(--red); }
.menu-pop .mi.danger:hover { background: var(--red); color: #fff; }
.menu-pop .mi.danger:hover svg { color: #fff; }
.projcard .ref { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* project colours: the whole button is the colour; --pt is black or white, whichever reads best on it */
.pfill { background: var(--pc) !important; color: var(--pt) !important; border-color: transparent !important; }
.pfill .muted, .pfill .ref, .pfill .desc, .pfill .foot, .pfill .tiny { color: color-mix(in srgb, var(--pt) 72%, transparent) !important; }
.pfill .pill { background: color-mix(in srgb, var(--pt) 16%, transparent) !important; color: var(--pt) !important; }
.pfill .progress { background: color-mix(in srgb, var(--pt) 22%, transparent); }
.pfill .progress > i { background: var(--pt) !important; }
.pfill .plan .verdict { color: var(--pt) !important; }
.pfill .star-btn:not(.on) { color: color-mix(in srgb, var(--pt) 70%, transparent); }
.pfill .stackav .avatar { box-shadow: 0 0 0 2px var(--pc); }
a.pfill:hover, button.pfill:hover { filter: brightness(1.06); }
.list > .item.pfill { border-top-color: color-mix(in srgb, var(--bg) 60%, transparent); }
.list > .item.pfill.on { box-shadow: inset 4px 0 0 var(--pt); }
.choose-btn.pfill:hover { border-color: transparent; }
.proj-chip { display: block; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: inherit; text-decoration: none; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.color-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-opt span { display: grid; place-items: center; min-width: 44px; height: 36px; padding: 0 8px; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; border: 1px solid transparent; transition: transform .25s var(--bounce); }
.cp-opt.none span { background: var(--surface); border: 1px dashed var(--line-2); color: var(--muted); }
.cp-opt input:checked + span { outline: 2.5px solid var(--ink); outline-offset: 2px; transform: scale(1.06); }
.cp-opt input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }
/* spreadsheet preview */
.xlsx-view { overflow: auto; -webkit-overflow-scrolling: touch; background: var(--surface); }
.xs-tabs { position: sticky; left: 0; top: 0; z-index: 3; display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.xs-tabs button { flex: none; border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.xs-tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.xs-table { border-collapse: collapse; font-size: 12px; color: #1c1c1e; background: #fff; }
.xs-table th { position: sticky; top: 0; background: #f2f2f5; color: #6c6c71; font-weight: 600; font-size: 11px; padding: 3px 6px; border: 1px solid #e0e0e5; z-index: 1; }
.xs-table tbody th { position: sticky; left: 0; top: auto; text-align: right; }
.xs-table td { border: 1px solid #e3e3e8; padding: 2px 6px; min-width: 52px; height: 20px; white-space: nowrap; }
@media (max-width: 480px) { .hide-xs { display: none; } }

/* ---- Home timer, clearer (v2) */
.timer-card { padding: 16px; gap: 0; }
.proj-pick { padding: 12px 14px; border-radius: 16px; }
.proj-pick .pp-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.proj-pick .pp-name { display: block; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-pick .pp-change { flex: none; font-size: 14px; font-weight: 700; padding: 7px 12px; border-radius: 99px; background: color-mix(in srgb, currentColor 12%, transparent); }
.proj-pick:not(.pfill) .pp-change { color: var(--accent-text); background: var(--accent-soft); }
.timer, .timer { flex-direction: column !important; text-align: center !important; gap: 14px !important; padding: 22px 6px 16px !important; }
.timer .state { font-size: 15px; font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--surface-2); }
.timer .state.live { color: var(--red); background: var(--red-soft); }
.timer .state.live i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.is-lunch .timer .state.live { color: #1f7fb3; background: color-mix(in srgb, #4fb3e8 18%, transparent); }
.bigbtn { --size: 184px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.bigbtn svg { width: 70px; height: 70px; }
.bigbtn .bb-label { font-size: 21px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.bigbtn.running { border-radius: 40px; }
.bigbtn.running svg { width: 46px; height: 46px; }
.bigbtn.running::after { border-radius: 48px; }
@media (max-width: 380px) { .bigbtn { --size: 156px; } .bigbtn svg { width: 58px; height: 58px; } }
.timer-info { width: 100%; }
.timer-info .elapsed { font: 800 46px/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer-info .what { font-size: 21px; font-weight: 700; margin-top: 8px; overflow-wrap: anywhere; }
.timer-info .meta { font-size: 15px; color: var(--ink-2); margin-top: 4px; display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: center; }
.timer-info .explain { font-size: 16px; line-height: 1.45; color: var(--ink-2); max-width: 340px; margin: 0 auto; }
.timer-info .explain b { color: var(--ink); }
.plan-msg { font-size: 14px; padding: 6px 12px; }
.quick { padding-top: 2px; }
.quick .btn { height: 46px; font-size: 15px; }
.day-card .label { font-size: 13px; color: var(--ink-2); }
.day-card .day-total { font-size: 30px; }
.day-card .day-total .muted { color: var(--ink-2); }
.verdict { font-size: 14px; }
.daybar { height: 26px; }
.daybar .ticks b { font-size: 11px; top: 6px; color: var(--ink-2); opacity: .8; }
.logrow .when { font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; width: 50px; }
.logrow .when span { font-weight: 500; }
.logrow b { font-size: 15px; }
.logrow .tiny { font-size: 13px; color: var(--ink-2); }
.logrow .dur { font-family: var(--font); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.section-head h2 { font-size: 19px; }

/* ---- calendar: filters, schedule (phones, week, list) */
.cal-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.cf { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 13px; cursor: pointer; }
.cf svg { width: 14px; height: 14px; }
.cf.on:not(.kind) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cf.kind i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.cf.kind.off { color: var(--muted); text-decoration: line-through; opacity: .7; }
.cf.kind.off i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
@media (max-width: 699px) {
  .cal-top { gap: 10px; }
  .cal-title h1 { font-size: 28px; }
  .cal-ctrls { width: 100%; justify-content: space-between; flex-wrap: nowrap; }
  .cal-ctrls .seg { flex: 1; min-width: 0; justify-content: space-between; } .cal-ctrls .seg button { flex: 1; padding: 6px 4px; }
  .cal-legend { display: none; }
  .cal-cell { min-height: 58px !important; }
  .cal-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -4px calc(-1 * var(--gutter)) 12px; padding: 0 var(--gutter); }
  .cal-filters::-webkit-scrollbar { display: none; }
  .cf { flex: none; }
}
.sched { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.sched.list { margin-top: 0; }
.cg { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: start; }
.cg-date { position: sticky; top: calc(64px + var(--safe-t)); display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.cg-date span { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.cg-date b { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.cg.today .cg-date b { background: var(--accent); color: var(--accent-ink); }
.cg.today .cg-date span { color: var(--accent-text); }
.cg.sel:not(.today) .cg-date b { background: var(--ink); color: var(--bg); }
.cg.past { opacity: .62; }
.cg-main { min-width: 0; background: var(--surface); border-radius: var(--radius); padding: 10px 10px 10px 12px; box-shadow: var(--card-shadow); border: 1px solid var(--line); }
.cg.sel .cg-main, .cg.today .cg-main { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.cg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cg-head h3 { font-size: 15px; }
.cg-head h3 span { color: var(--muted); font-weight: 500; }
.cg-head .btn { margin: -6px -4px -6px 0; color: var(--accent-text); }
.cg-items { display: flex; flex-direction: column; gap: 6px; }
.cg-none { font-size: 14px; color: var(--muted); padding: 2px 0 4px; }
.cg-gap { margin-left: 62px; font-size: 13px; color: var(--muted); padding: 2px 4px; display: flex; align-items: center; gap: 8px; }
.cg-gap::before { content: ""; width: 18px; border-top: 2px dotted var(--line-2); }
.cg-month { font-size: 20px; margin: 10px 4px 0; }
.cg-month:first-child { margin-top: 0; }
.cg-earlier { align-self: flex-start; margin-left: 62px; border: 0; background: var(--surface-2); color: var(--accent-text); font-weight: 600; font-size: 13.5px; padding: 7px 12px; border-radius: 99px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.si { display: flex; gap: 10px; align-items: stretch; width: 100%; border: 0; padding: 0; background: none; text-align: left; color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
.si-time { width: 50px; flex: none; display: flex; flex-direction: column; padding-top: 7px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); line-height: 1.3; }
.si-time b { color: var(--ink); font-weight: 700; font-size: 13.5px; }
.si-card { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c) 13%, var(--surface)); border-left: 4px solid var(--c); transition: background-color .2s, transform .25s var(--bounce); }
.si:hover .si-card { background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.si:active .si-card { transform: scale(.98); }
.si-title { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.si-sub { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-people { margin-top: 4px; }
/* top-bar account button: no browser padding, picture centred in its ring */
.icon-btn { padding: 0; line-height: 0; }
#top-me { width: 40px; height: 40px; }
#top-me .avatar { width: 32px; height: 32px; margin: 0; }

/* calendar: smooth selection and transitions */
.cal-cell .dn, .wk-day .dn { transition: background-color .22s ease, color .22s ease, transform .3s var(--spring); }
.cal-cell, .wk-day { -webkit-tap-highlight-color: transparent; }
.cal-cell:active .dn, .wk-day:active .dn { transform: scale(.9); }
.sched.cal-anim, .cal-agenda.cal-anim { animation: cal-fade .28s ease-out both; }
@keyframes cal-fade { from { opacity: 0; } to { opacity: 1; } }
.cal-surface.cal-anim { will-change: transform, opacity; }
.cg-main { transition: border-color .25s; }
.cg-date b { transition: background-color .25s, color .25s; }

/* chat attachments: files in the composer and in bubbles; drop target */
.pick-options.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.attach-doc { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); max-width: 240px; flex: none; }
.attach-doc.failed { border-color: var(--red); }
.attach-doc .nm { display: flex; flex-direction: column; min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.attach-doc .nm small { font-weight: 500; color: var(--muted); }
.attach-doc button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; display: grid; }
.attach-doc button svg { width: 16px; height: 16px; }
.attach-doc .ext, .bubble-file .ext { flex: none; width: 34px; height: 40px; border-radius: 6px; display: grid; place-items: center; font: 800 9.5px var(--font); text-transform: uppercase; color: #fff; background: var(--slate); }
.attach-doc .ext.pdf, .bubble-file .ext.pdf { background: #c4271d; }
.attach-doc .ext:is(.doc, .docx, .odt, .rtf), .bubble-file .ext:is(.doc, .docx, .odt, .rtf) { background: #0a5fd1; }
.attach-doc .ext:is(.xls, .xlsx, .ods, .csv), .bubble-file .ext:is(.xls, .xlsx, .ods, .csv) { background: #1a7a43; }
.attach-doc .ext:is(.ppt, .pptx), .bubble-file .ext:is(.ppt, .pptx) { background: #c4570b; }
.bubble-files { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 4px; }
.bubble-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 12px; border: 0; cursor: pointer; text-align: left; color: inherit; font: inherit; background: color-mix(in srgb, currentColor 10%, transparent); min-width: 200px; max-width: 100%; }
.bubble-file .nm { display: flex; flex-direction: column; min-width: 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.bubble-file .nm small { font-weight: 500; opacity: .75; }
.chat-pane.drop-on { outline: 2.5px dashed var(--accent); outline-offset: -6px; }
.chat-pane.drop-on .msgs::after { content: "Drop to attach"; position: sticky; bottom: 10px; align-self: center; background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: 99px; font-weight: 700; }

/* own timesheet upload */
.upl-card { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.upl-card .grow { flex: 1 1 220px; }
.upl-card.on { align-items: flex-start; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.upl-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.upl-ico svg { width: 18px; height: 18px; }
.xl-ico.pdf { background: #c4271d; }
.upl-tag { color: var(--accent-text); }
label.btn { cursor: pointer; }
.tut summary { cursor: pointer; list-style: none; padding: 2px 0; }
.tut summary::-webkit-details-marker { display: none; }
.tut summary::after { content: '›'; float: right; transition: transform .2s; }
.tut[open] summary::after { transform: rotate(90deg); }
.tut-steps { margin: 10px 0 2px; padding-left: 20px; display: grid; gap: 8px; line-height: 1.45; }

.archive-note { margin-bottom: 14px; }
.arch-folder { margin-bottom: 18px; }
.arch-folder > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; padding: 8px 2px 10px; }
.arch-folder > summary::-webkit-details-marker { display: none; }
.arch-folder:not([open]) > summary { opacity: .8; }

.tut-promo { margin-bottom: 14px; display: grid; gap: 10px; }
.tut-body { display: grid; gap: 14px; margin-top: 12px; }
.tut-vid { width: 100%; max-width: 300px; aspect-ratio: 540 / 1168; border-radius: 16px; background: #0f4f2f; display: block; margin: 0 auto; }
.tut-vid.wide { max-width: 100%; aspect-ratio: 16 / 9; }
@media (min-width: 760px) { .tut-body { grid-template-columns: 260px 1fr; align-items: start; } .tut-body .tut-vid { margin: 0; } }

.tut-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tut-list .tut { display: grid; gap: 12px; scroll-margin-top: 70px; }
.tut-head { display: flex; align-items: center; gap: 10px; }
.tut-num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.tut-written summary { cursor: pointer; color: var(--muted); font-size: 14px; }
@media (min-width: 900px) { .tut-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; } .tut-list .tut:first-child { grid-column: 1 / -1; } .tut-list .tut:first-child .tut-vid { max-width: 820px; } }

.ts-banner { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin: 14px 0; }
.ts-banner > svg { flex: none; margin-top: 2px; }
.ts-banner.ts-complete { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); } .ts-banner.ts-complete > svg { color: var(--ok); }
.ts-banner.ts-incomplete { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: color-mix(in srgb, var(--red) 6%, var(--surface)); } .ts-banner.ts-incomplete > svg { color: var(--red); }
.ts-banner.ts-progress > svg { color: var(--accent-text); }
.pill.ts-st { gap: 4px; display: inline-flex; align-items: center; }
.pill.ts-st.ts-complete { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill.ts-st.ts-incomplete { background: var(--red-soft); color: var(--red); }
.pill.ts-st.ts-progress { background: var(--blue-soft); color: var(--blue); }
.pill.ts-st.ts-future { background: var(--slate-soft); color: var(--slate); }
.filecard.bad { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.ts-year > .ts-month { margin: 8px 0 8px 14px; }
.ts-month > summary .btn { flex: none; }
.month-nav .pill { margin-right: 6px; }

.cf-sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 2px; flex: none; }
.cal-row { gap: 8px; }
.cal-col { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: none; flex: none; cursor: pointer; }

button.verdict.has-info { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: inherit; }
.verdict-info { margin-top: 6px; line-height: 1.45; }

/* closing animations to match the opening ones */
.menu-pop.leaving { animation: menu-out .16s ease-in forwards; pointer-events: none; }
@keyframes menu-out { to { opacity: 0; transform: scale(.92); } }
.search-pop.leaving { animation: fade-out .18s ease-in forwards; pointer-events: none; }
.search-pop.leaving .search-panel { animation: sheet-pop-out .18s ease-in forwards; }
@media (prefers-reduced-motion: reduce) { .menu-pop.leaving, .search-pop.leaving, .search-pop.leaving .search-panel { animation: none; } }

/* ---- project chooser: big, clear tiles */
.cp-search { margin-bottom: 4px; }
.cp-head { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 16px 2px 8px; }
.cp-grid { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cp-tile { --c: var(--line-2); position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 14px 12px 12px; border-radius: 18px; cursor: pointer; color: var(--ink);
  background: color-mix(in srgb, var(--c) 9%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--c) 28%, var(--line)); -webkit-tap-highlight-color: transparent;
  transition: transform .35s var(--spring), border-color .2s, box-shadow .3s, background-color .2s; }
.no-rise .cp-tile { animation: none; }
.cp-tile:hover { border-color: color-mix(in srgb, var(--c) 60%, var(--line)); }
.cp-tile:active { transform: scale(.97); transition-duration: .12s; }
.cp-badge { flex: none; min-width: 52px; height: 52px; padding: 0 8px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: var(--ct, #fff); font-weight: 800; font-size: 15px; letter-spacing: -.01em;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); font-variant-numeric: tabular-nums; }
.cp-tile.none .cp-badge { background: var(--surface-2); color: var(--muted); box-shadow: none; border: 1.5px dashed var(--line-2); }
.cp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cp-name { font-size: 16px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-meta { display: flex; align-items: center; gap: 10px; margin-top: 5px; font-size: 12px; color: var(--muted); }
.cp-live { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; }
.cp-live .avatars .av { width: 18px; height: 18px; font-size: 8px; }
.cp-plan { flex: 1; max-width: 110px; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.cp-plan > i { display: block; height: 100%; background: var(--c); border-radius: inherit; }
.cp-plan.over > i { background: var(--red); }
.cp-pct { font-variant-numeric: tabular-nums; font-weight: 600; }
.cp-check { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); color: transparent; transition: background-color .2s, border-color .2s, transform .45s var(--bounce); }
.cp-tile.on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent), 0 8px 22px color-mix(in srgb, var(--c) 22%, transparent); }
.cp-tile.none.on { --c: var(--accent); }
.cp-tile.on .cp-check { background: var(--c); border-color: var(--c); color: var(--ct, #fff); transform: scale(1.08); }
.cp-tile.none.on .cp-check { color: var(--accent-ink); }
.cp-tile.picked { animation: cp-pop .32s var(--bounce); }
.cp-tile.picked .cp-check { animation: check-pop .4s var(--bounce); }
@keyframes cp-pop { 40% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .cp-tile, .cp-tile.picked, .cp-tile.picked .cp-check { animation: none; } }

/* ---- hours & performance charts */
.grow-bar { transform-box: fill-box; transform-origin: bottom; animation: grow-y .6s var(--spring) both; animation-delay: var(--d, 0ms); }
@keyframes grow-y { from { transform: scaleY(0); } }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.donut { width: 180px; height: 180px; flex: none; }
.donut-seg { transform-origin: 90px 90px; animation: donut-in .7s var(--spring) both; animation-delay: var(--d, 0ms); }
@keyframes donut-in { from { opacity: 0; transform: scale(.85) rotate(-20deg); } }
.donut .d-big { font: 800 20px var(--font); fill: var(--ink); } .donut .d-sub { font: 500 11px var(--font); fill: var(--muted); }
.legend.col { flex-direction: column; align-items: flex-start; gap: 6px; } .legend.col b { margin-left: 4px; }
.hbars { display: grid; gap: 12px; }
.hb { animation: rise .45s var(--spring) both; animation-delay: var(--d, 0ms); }
.hb-l { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 5px; align-items: center; }
.hb-l > span { display: flex; align-items: center; gap: 6px; min-width: 0; } .hb-l b { font-variant-numeric: tabular-nums; flex: none; }
.hb-t { position: relative; height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.hb-t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.hb-f { transform-origin: left; animation: grow-x .7s var(--spring) both; animation-delay: var(--d, 0ms); }
.hb-plan { background: color-mix(in srgb, var(--ink) 14%, transparent); }
@keyframes grow-x { from { transform: scaleX(0); } }
.wkbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; }
.wk { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.wk b { color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.wk-t { height: 140px; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.wk-t i { width: 70%; max-width: 34px; border-radius: 8px 8px 3px 3px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 60%, transparent)); transform-origin: bottom; animation: grow-y .6s var(--spring) both; animation-delay: var(--d, 0ms); }
.dr { display: grid; gap: 8px; }
.dr-row { display: grid; grid-template-columns: minmax(70px, 120px) 1fr 82px; gap: 10px; align-items: center; font-size: 13px; animation: rise .45s var(--spring) both; animation-delay: var(--d, 0ms); }
.dr-t { position: relative; height: 12px; border-radius: 6px; background: var(--surface-2); }
.dr-t i { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, #f7c548, var(--accent)); }
.dr-v { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; text-align: right; }
.dr-axis .dr-t { background: none; height: 14px; } .dr-axis em { position: absolute; transform: translateX(-50%); font-style: normal; font-size: 10.5px; color: var(--muted); }
.split { display: flex; height: 8px; width: 90px; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.st-table td { vertical-align: middle; }
@media (prefers-reduced-motion: reduce) { .grow-bar, .donut-seg, .hb, .hb-f, .wk-t i, .dr-row { animation: none; } }

/* ---- map: project pins and the site card */
.mk-job { position: relative; width: 56px; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mk-pin { position: relative; min-width: 40px; height: 34px; padding: 0 9px; border-radius: 12px; background: var(--c); color: var(--t); display: grid; place-items: center; font: 800 13px var(--font); letter-spacing: -.01em;
  border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.28); transform-origin: 50% 130%; transition: transform .35s var(--spring), box-shadow .3s; }
.mk-pin svg { width: 16px; height: 16px; }
.mk-pin::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; background: var(--c); border: 2px solid #fff; border-top: 0; border-left: 0; transform: translateX(-50%) rotate(45deg); border-radius: 0 0 3px 0; }
.mk-dot { position: absolute; bottom: 0; left: 50%; width: 8px; height: 4px; margin-left: -4px; border-radius: 50%; background: rgba(0,0,0,.3); filter: blur(1px); }
.mk-n { position: absolute; top: -8px; right: -9px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #30b158; color: #fff; font: 800 11px/18px var(--font); text-align: center; border: 2px solid #fff; }
.mk-job:hover .mk-pin { transform: translateY(-2px) scale(1.05); }
.mk-job.sel { z-index: 5; } .mk-job.sel .mk-pin { transform: scale(1.18); box-shadow: 0 8px 22px rgba(0,0,0,.35), 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent); }
.mk-job.bounce .mk-pin { animation: pin-bounce .6s var(--bounce); }
@keyframes pin-bounce { 0% { transform: scale(1); } 30% { transform: translateY(-14px) scale(1.1, .95); } 55% { transform: translateY(0) scale(1.25, .85); } 75% { transform: translateY(-4px) scale(1.12); } 100% { transform: scale(1.18); } }
.map-card { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 1000; background: var(--surface); color: var(--ink); border-radius: 18px; padding: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.3); display: grid; gap: 12px;
  border-top: 4px solid var(--c); animation: card-up .45s var(--spring) both; max-width: 460px; margin: 0 auto; }
.map-card.leaving { animation: card-down .2s ease-in forwards; }
@keyframes card-up { from { opacity: 0; transform: translateY(30px) scale(.97); } }
@keyframes card-down { to { opacity: 0; transform: translateY(24px) scale(.97); } }
.map-card-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.mc-name { display: block; font-size: 16px; line-height: 1.25; padding-right: 30px; }
.map-card .pill.live-p { background: color-mix(in srgb, #30b158 15%, transparent); color: #1f8a43; gap: 5px; }
.map-card .live-p .avatars .av { width: 16px; height: 16px; font-size: 7px; }
.mc-go { height: 48px; font-size: 15px; }
.mc-alt { display: flex; gap: 8px; flex-wrap: wrap; } .mc-alt .btn { flex: 1; justify-content: center; }
#map { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .mk-job.bounce .mk-pin, .map-card { animation: none; } }
.map-card a.btn { color: var(--ink); text-decoration: none; } .map-card a.btn.primary { color: var(--accent-ink); }
.map-card { font: 14px/1.4 var(--font); }

/* ---- team page: map with full screen, people and team dropdowns */
.map-wrap { position: relative; }
.map-fs, .map-x { position: absolute; z-index: 1001; width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--surface); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.25); display: grid; place-items: center; cursor: pointer; }
.map-fs { left: 10px; bottom: 34px; }
.map-wrap.full { position: fixed; inset: 0; z-index: 400; background: var(--bg); animation: map-in .35s var(--spring); }
.map-wrap.full.closing { animation: map-out .2s ease-in forwards; }
@keyframes map-in { from { opacity: 0; transform: scale(.96); } }
@keyframes map-out { to { opacity: 0; transform: scale(.97); } }
.map-wrap.full #map { height: 100% !important; border-radius: 0; border: 0; }
.map-x { top: calc(12px + var(--safe-t)); left: 12px; width: 44px; height: 44px; border-radius: 50%; }
html.map-open .tabbar, html.map-open .topbar, html.map-open header { visibility: hidden; }
.map-wrap.full .map-card { bottom: calc(16px + var(--safe-b)); }
.drop > summary { list-style: none; cursor: pointer; } .drop > summary::-webkit-details-marker { display: none; }
.drop-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.drop-head .chev { color: var(--muted); display: flex; transition: transform .3s var(--spring); }
.drop[open] > .drop-head .chev { transform: rotate(90deg); }
.drop[open] > .drop-head { border-bottom: 1px solid var(--line); }
.drop[open] > :not(summary) { animation: rise .35s var(--spring) both; }
.team-card { border-left: 4px solid var(--c); }
.team-card .team-swatch { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.team-name { display: block; width: 100%; font: 700 15px var(--font); color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 2px 6px; margin-left: -7px; }
.team-name:hover { border-color: var(--line); } .team-name:focus { border-color: var(--focus); background: var(--surface-2); outline: none; }
.team-actions { padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.map-wrap.full .leaflet-top.leaflet-left { top: calc(60px + var(--safe-t)); }
.map-wrap.full .maplibregl-ctrl-top-right { top: var(--safe-t); }
.map-wrap.full .map-fs, .map-fs[hidden] { display: none; }

/* ================================================= manhole maps */
html.mh-on, html.mh-on body { overflow: hidden; }
#mh-root { position: fixed; inset: 0; z-index: 90; background: var(--bg); }
.mh { position: absolute; inset: 0; display: flex; flex-direction: column; animation: map-in .3s var(--spring); }
.mh-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 10px 8px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 5; }
.mh-ib { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.mh-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; } .mh-title b { font-size: 16px; } .mh-title span { font-size: 12px; color: var(--muted); }
.mh-mode { flex: none; } .mh-mode button { display: inline-flex; align-items: center; gap: 5px; }
.mh.editing .mh-mode button.on { background: #f59f00; color: #1d1d1b; }
.mh-body { flex: 1; min-height: 0; display: flex; position: relative; }
.mh-mapbox { flex: 1; min-width: 0; position: relative; }
#mh-map { position: absolute; inset: 0; background: #1b2a22; }
.mh.editing #mh-map { box-shadow: inset 0 0 0 3px #f59f00; }
.mh-tools { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 4; display: grid; gap: 8px; pointer-events: none; max-width: 560px; }
.mh-tools > * { pointer-events: auto; }
.mh-search { position: relative; z-index: 3; display: flex; align-items: center; background: var(--surface); border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.mh-search > span { padding: 0 6px 0 12px; color: var(--muted); display: flex; }
.mh-search input { flex: 1; min-width: 0; border: 0; background: none; height: 44px; font: 15px var(--font); color: var(--ink); outline: none; }
.mh-results { position: absolute; left: 0; right: 0; top: 50px; background: var(--surface); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3); overflow: hidden; max-height: 50vh; overflow-y: auto; }
.mh-results button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; background: none; text-align: left; color: var(--ink); font: 14px var(--font); cursor: pointer; border-bottom: 1px solid var(--line); }
.mh-results button:hover { background: var(--hover); }
.mh-toolrow { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; } .mh-toolrow::-webkit-scrollbar { display: none; }
.mh-chip { flex: none; position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; border: 0; background: var(--surface); color: var(--ink); font: 600 13px var(--font); box-shadow: 0 2px 10px rgba(0,0,0,.22); cursor: pointer; }
.mh-fdot { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.mh-modebar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 92px; z-index: 4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 20px);
  padding: 8px 14px; border-radius: 20px; background: rgba(20,24,22,.82); color: #fff; font-size: 13px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mh.editing .mh-modebar { background: rgba(245,159,0,.95); color: #1d1d1b; }
.mh-modebar button { border: 0; border-radius: 12px; padding: 4px 10px; background: rgba(0,0,0,.15); color: inherit; font: 600 12.5px var(--font); cursor: pointer; }
.mh-add { position: absolute; left: 10px; right: 10px; bottom: 26px; z-index: 4; display: flex; gap: 8px; align-items: center; justify-content: center; pointer-events: none; }
.mh-add > * { pointer-events: auto; }
.mh-preset { display: none; max-width: 46%; align-items: center; gap: 6px; height: 50px; padding: 0 12px 0 6px; border-radius: 25px; border: 0; background: var(--surface); color: var(--ink); font: 600 14px var(--font); box-shadow: 0 4px 16px rgba(0,0,0,.28); cursor: pointer; }
.mh.editing .mh-preset { display: inline-flex; }
.mh-addbtn { display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 22px; border-radius: 27px; border: 0; background: var(--accent); color: var(--accent-ink); font: 700 16px var(--font); box-shadow: 0 6px 20px rgba(0,0,0,.3); cursor: pointer; transition: transform .3s var(--spring); }
.mh-addbtn:active { transform: scale(.95); }
.mh.adding .mh-addbtn { background: #f59f00; color: #1d1d1b; } .mh.adding .mh-addbtn svg { transform: rotate(45deg); }
.mh.adding #mh-map, .mh.adding #mh-map canvas { cursor: crosshair !important; }
.mh-legend { position: absolute; left: 10px; bottom: 90px; z-index: 3; display: none; gap: 10px; align-items: center; padding: 6px 12px; border-radius: 12px; background: rgba(20,24,22,.75); color: #fff; font-size: 12px; }
@media (min-width: 900px) { .mh-legend { display: flex; bottom: 26px; } .mh-add { justify-content: flex-end; right: 64px; } .mh-modebar { bottom: auto; top: 12px; left: auto; right: 12px; transform: none; } .mh-add .mh-preset { max-width: 260px; } }
.mh-legend .lg { display: inline-flex; align-items: center; gap: 5px; } .mh-legend i { width: 9px; height: 9px; border-radius: 50%; }
.mh-dotic { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.mh-dotic.sm { width: 22px; height: 22px; }
/* markers */
.mhm { position: relative; box-sizing: border-box; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%; background: var(--c); color: #fff; border: 2.5px solid #fff; box-shadow: 0 0 0 2.5px var(--s), 0 3px 10px rgba(0,0,0,.45); display: grid; place-items: center; cursor: pointer; transition: scale .3s var(--spring), box-shadow .2s; touch-action: none; }
.mhm-ic { display: grid; place-items: center; width: 100%; height: 100%; line-height: 0; pointer-events: none; }
.mhm-ic svg { display: block; width: 19px; height: 19px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.maplibregl-marker .mhm { margin: 0; }
.mhm-ref { position: absolute; top: 32px; left: 50%; transform: translateX(-50%); padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.95); color: #1d2421; font: 800 10.5px var(--font); white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.3); pointer-events: none; }
.mh.far .mhm-ref { display: none; }
.mhm-tick { position: absolute; top: -6px; right: -7px; width: 15px; height: 15px; border-radius: 50%; background: #30a46c; color: #fff; display: grid; place-items: center; border: 1.5px solid #fff; }
.mhm:hover { filter: brightness(1.08); }
.mhm.sel { scale: 1.3; z-index: 10; box-shadow: 0 0 0 3px var(--s), 0 0 0 9px color-mix(in srgb, var(--c) 35%, transparent), 0 6px 16px rgba(0,0,0,.5); }
.mhm.pop { animation: mh-pop .5s var(--bounce); }
@keyframes mh-pop { 0% { scale: 1; } 40% { scale: 1.5; } 100% { scale: 1.3; } }
.mhm.drop-in { animation: mh-drop .55s var(--bounce); }
@keyframes mh-drop { from { translate: 0 -40px; scale: .6; opacity: 0; } }
.mh.editing .mhm { cursor: grab; } .mhm.dragging { cursor: grabbing; scale: 1.35; }
.mh-me { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #2f7de1; border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(47,125,225,.25), 0 1px 4px rgba(0,0,0,.4); }
.maplibregl-marker .mh-me { margin: 0; }
/* record panel: right side on big screens, bottom sheet on phones */
.mh-panel { position: absolute; z-index: 6; background: var(--surface); display: flex; flex-direction: column; box-shadow: 0 -8px 30px rgba(0,0,0,.25); }
@media (min-width: 900px) { .mh-panel { position: relative; width: 420px; flex: none; border-left: 1px solid var(--line); animation: mh-side .35s var(--spring); } .mh-panel.closing { animation: mh-side-out .2s ease-in forwards; } .mh-grab { display: none; } }
@media (max-width: 899px) { .mh-panel { left: 0; right: 0; bottom: 0; max-height: 62%; border-radius: 20px 20px 0 0; animation: mh-up .4s var(--spring); padding-bottom: var(--safe-b); } .mh-panel.tall { max-height: 92%; } .mh-panel.closing { animation: mh-down .2s ease-in forwards; }
  .mh.has-panel .mh-add, .mh.has-panel .mh-modebar { display: none; } }
@keyframes mh-side { from { transform: translateX(40px); opacity: 0; } } @keyframes mh-side-out { to { transform: translateX(40px); opacity: 0; } }
@keyframes mh-up { from { transform: translateY(100%); } } @keyframes mh-down { to { transform: translateY(100%); } }
.mh-grab { height: 22px; flex: none; cursor: pointer; display: grid; place-items: center; } .mh-grab::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); }
.mh-ph { display: flex; align-items: center; gap: 12px; padding: 4px 14px 12px; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .mh-ph { padding-top: 14px; } }
.mh-bigic { width: 46px; height: 46px; border-radius: 14px; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.mh-ref { display: block; font-size: 20px; letter-spacing: -.01em; } .mh-type { font-size: 13px; color: var(--muted); }
.mh-ref-in { font: 800 18px var(--font); width: 140px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; background: var(--surface-2); color: var(--ink); }
.mh-type-in { display: block; margin-top: 4px; font: 13px var(--font); border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; background: var(--surface-2); color: var(--ink); max-width: 220px; }
.mh-pbody { overflow-y: auto; padding: 14px; -webkit-overflow-scrolling: touch; }
.mh-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.mh-status button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink); font: 600 13px var(--font); cursor: pointer; transition: all .2s; }
.mh-status button .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s); }
.mh-status button.on { background: var(--s); border-color: var(--s); color: #fff; transform: scale(1.03); }
.mh-status button[aria-disabled="true"]:not(.on) { opacity: .55; }
.mh-sec { padding: 12px 0; border-top: 1px solid var(--line); } .mh-sec:first-of-type { border-top: 0; }
.mh-sec h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mh-sec textarea, .mh-noteform textarea { width: 100%; }
.mh-kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; } .mh-kv span { color: var(--muted); } .mh-kv b { text-align: right; font-weight: 600; }
.mh-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.mh-pic { position: relative; margin: 0; } .mh-pic button { padding: 0; border: 0; display: block; width: 100%; cursor: zoom-in; border-radius: 10px; overflow: hidden; }
.mh-pic img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--surface-2); } .mh-pic.up img { opacity: .5; }
.mh-pic figcaption { display: grid; gap: 2px; margin-top: 4px; font-size: 12.5px; } .mh-pic figcaption input { width: 100%; font: 12.5px var(--font); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; background: var(--surface-2); color: var(--ink); }
.mh-pic-x { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.mh-note { display: flex; gap: 8px; padding: 6px 0; } .mh-note p { margin: 2px 0 0; }
.mh-noteform { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.mh-hist summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 6px 0; } .mh-h { display: flex; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); align-items: flex-start; } .mh-h > span.tiny { flex: none; width: 104px; }
.mh-act { display: grid; gap: 0; max-height: 65vh; overflow-y: auto; }
.mh-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); cursor: pointer; }
.mh-exports { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mh-exp { display: grid; gap: 3px; justify-items: start; text-align: left; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; font: 14px var(--font); transition: transform .3s var(--spring), border-color .2s; }
.mh-exp:hover { border-color: var(--accent); } .mh-exp:active { transform: scale(.97); } .mh-exp svg { color: var(--accent-text); } .mh-exp span { font-size: 12px; color: var(--muted); }
.mh-iconlib { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding: 2px; }
.mh-icopt span { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); cursor: pointer; text-align: center; color: var(--ink); }
.mh-icopt small { font-size: 11px; line-height: 1.2; color: var(--muted); }
.mh-icopt input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.mh-icopt[hidden] { display: none; }
.swatch-pick span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.swatch-pick input:checked + span { outline: 2.5px solid var(--ink); outline-offset: 2px; }
.swatch-pick.custom { position: relative; } .swatch-pick.custom input { position: absolute; inset: 0; opacity: 0; width: 32px; height: 32px; cursor: pointer; } .swatch-pick.custom span { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); color: #fff; }
.mh-prev { display: flex; align-items: center; gap: 22px; padding: 14px 16px 26px; border-radius: 14px; background: #2b3a31; color: #fff; }
.mh-prev .mhm { margin: 0; --s: #868e96; }
.mh-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.mh-card-ic { width: 46px; height: 46px; border-radius: 14px; background: #1b2a22; color: #9fd3b5; display: grid; place-items: center; flex: none; }
@media (prefers-reduced-motion: reduce) { .mh, .mh-panel, .mhm.pop, .mhm.drop-in { animation: none !important; } }
.mh-panel[hidden], .mh-results[hidden] { display: none !important; }
#mh-map { z-index: 0; }

.msg.picked .bubble { transform: scale(.97); filter: brightness(.92); transition: transform .2s var(--spring); }
.msg.removing { animation: msg-out .22s ease-in forwards; }
@keyframes msg-out { to { opacity: 0; transform: scale(.9); max-height: 0; margin: 0; } }
.msgs .bubble { -webkit-touch-callout: none; }
.mi.danger { color: var(--red); }

/* ---- tutorials: grid of tiles, and a player */
.tut-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .tut-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .tut-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tut-tile { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); animation: rise .45s var(--spring) both; animation-delay: var(--d, 0ms); }
.tut-tile.hero { grid-column: 1 / -1; }
.tut-thumb { position: relative; display: block; border-radius: 16px; overflow: hidden; background: #0f4f2f; aspect-ratio: 16 / 10; box-shadow: 0 2px 10px rgba(0,0,0,.12); transition: transform .35s var(--spring), box-shadow .3s; }
.tut-tile.hero .tut-thumb { aspect-ratio: 16 / 8; }
.tut-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: left center; display: block; }
.tut-tile:hover .tut-thumb { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.18); } .tut-tile:active .tut-thumb { transform: scale(.97); }
.tut-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(255,255,255,.92); color: #0f4f2f; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.tut-play svg { margin-left: 3px; }
.tut-n { position: absolute; left: 8px; top: 8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: rgba(0,0,0,.6); color: #fff; font: 700 12px/24px var(--font); text-align: center; }
.tut-label { font-weight: 650; font-size: 14px; line-height: 1.3; padding: 0 2px; }
.tut-player { position: fixed; inset: 0; z-index: 240; background: var(--bg); display: flex; flex-direction: column; animation: sheet-up .45s var(--spring); }
.tut-player.leaving { animation: sheet-down .25s var(--ease-out) forwards; }
.tut-pbar { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 10px 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tut-pbar .mh-ib[disabled] { opacity: .35; }
.tut-pbody { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 14px; align-content: start; justify-items: center; }
.tut-pvid { width: 100%; max-width: 420px; max-height: calc(100dvh - 150px); aspect-ratio: 390 / 664; border-radius: 16px; background: #000; }
.tut-pvid.wide { max-width: 1000px; aspect-ratio: 16 / 9; }
.tut-player .tut-written { width: 100%; max-width: 1000px; }
.mh-dotic svg, .mh-dotic > * { display: block; margin: auto; }

.mh-chip.on { background: var(--accent, #1a9d6b); color: #fff; }
.mh-modebar { transition: opacity .4s, visibility .4s; } .mh-modebar.gone { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 560px) { .mh-cl { display: none; } .mh-toolrow { gap: 5px; } .mh-chip { padding: 0 11px; } .mh-toolrow .mh-chip { flex: 0 1 auto; } }
.mh-3d { position: absolute; inset: 0; z-index: 3; display: block; }
@media (min-width: 900px) {
  .mh-tools { display: flex; align-items: center; gap: 10px; max-width: calc(100% - 380px); }
  .mh-search { flex: 1 1 300px; max-width: 460px; }
  .mh-toolrow { flex: 0 1 auto; min-width: 0; }
}
@media (max-width: 400px) { .mh-chip { padding: 0 9px; gap: 4px; font-size: 13px; } .mh-toolrow { gap: 4px; } }
.mh-iconlib { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.mh-icopt span { min-width: 0; }
.mh-icopt small { display: block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; hyphens: auto; font-size: 10.5px; }
.mh-3dpad { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 5; display: grid; grid-template-columns: repeat(2, 44px); gap: 6px; padding: 6px; border-radius: 16px; background: rgba(20,26,23,.72); backdrop-filter: blur(6px); touch-action: none; user-select: none; }
.mh-3dpad button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; font: 700 20px/1 var(--font); cursor: pointer; display: grid; place-items: center; }
.mh-3dpad button:active { background: var(--accent, #1a9d6b); }
.mh-legend { z-index: 4; }
.mh-modebar[hidden] { display: none !important; }
@media (pointer: coarse), (max-width: 700px) { .mh-3dpad { display: none; } }
/* Files: resources */
.res-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 8px; }
.res-folder { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
.res-folder:hover { border-color: var(--accent); }
.res-fic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft, #e3f3ea); color: var(--accent, #18693f); flex: none; }
.res-tools { display: grid; gap: 8px; margin-bottom: 12px; }
.res-cats { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: none; } .res-cats::-webkit-scrollbar { display: none; }
.res-cats button { white-space: nowrap; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.res-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.res-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.res-cover { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.res-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.res-noimg { display: grid; place-items: center; color: var(--muted); }
.res-noimg svg { width: 34px; height: 34px; opacity: .6; }
.res-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.res-body h3 { margin: 0; font-size: 16px; }
.res-snip { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-file { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-hero { border: 0; padding: 0; margin: -16px -16px 4px; border-radius: inherit; overflow: hidden; max-height: 340px; cursor: zoom-in; background: none; }
.res-hero img { width: 100%; max-height: 340px; object-fit: cover; display: block; }
.res-folder > svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.res-fic svg { width: 22px; height: 22px; }
.res-folders a.res-folder { display: flex; flex-direction: row; align-items: center; } .res-grid a.res-card { display: flex; flex-direction: column; }
.res-cover.res-noimg { aspect-ratio: auto; height: 56px; }
@media (max-width: 600px) { .res-grid a.res-card { flex-direction: row; } .res-grid .res-cover { width: 96px; flex: none; aspect-ratio: auto; height: auto; min-height: 96px; } .res-grid .res-cover.res-noimg { height: auto; } }
.res-body .pill { justify-self: start; }

/* ---------------------------------------------------------------- What's new (update log) */
.upd-page { max-width: 760px; margin: 0 auto; }
.upd-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px 24px 20px; color: #fff; margin-bottom: 16px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--c) 55%, #fff 0%) 0%, transparent 60%), linear-gradient(135deg, color-mix(in srgb, var(--c) 92%, #000) 0%, color-mix(in srgb, var(--c) 70%, #000) 100%);
  box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--c) 70%, transparent); animation: upd-rise .6s var(--ease-out) both; }
.upd-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); box-shadow: -40px 120px 0 -30px rgba(255,255,255,.06); pointer-events: none; }
.upd-hero-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); margin-bottom: 14px; animation: upd-twinkle 3s ease-in-out 1s 2; }
.upd-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.upd-hero h1 { color: #fff; font-size: 28px; line-height: 1.15; margin: 6px 0 6px; letter-spacing: -.02em; }
.upd-hero p { margin: 0; opacity: .92; font-size: 15px; max-width: 46ch; }
.upd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; position: relative; z-index: 1; }
.upd-stats > div { background: rgba(255,255,255,.14); border-radius: 12px; padding: 10px 12px; }
.upd-stats b { display: block; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.upd-stats span { font-size: 12px; opacity: .85; }
.upd-filter { margin-bottom: 14px; }
.upd-timeline { position: relative; }
.upd { display: grid; grid-template-columns: 38px 1fr; gap: 12px; animation: upd-rise .5s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms + 120ms); }
.upd-rail { position: relative; display: flex; justify-content: center; }
.upd-rail::before { content: ''; position: absolute; top: 40px; bottom: -6px; width: 2px; border-radius: 2px; background: linear-gradient(var(--c), var(--line)); opacity: .5; }
.upd:last-child .upd-rail::before { display: none; }
.upd-dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 6px 14px -6px var(--c); margin-top: 14px; }
.upd.unseen .upd-dot::after { content: ''; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--dot); border: 2px solid var(--bg); }
.upd-body { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 6px; margin-bottom: 14px; box-shadow: var(--card-shadow); }
.upd.unseen .upd-body { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 12%, transparent), var(--card-shadow); }
.upd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--muted); }
.upd-ver { font-family: var(--mono); font-weight: 600; font-size: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); padding: 2px 7px; border-radius: 6px; }
.upd-new { font-weight: 700; color: #fff; background: var(--dot); padding: 2px 8px; border-radius: 99px; font-size: 11px; }
.upd-body h2 { font-size: 18px; margin: 8px 0 2px; letter-spacing: -.01em; }
.upd-intro { margin: 0 0 6px; color: var(--ink-2); font-size: 14px; }
.upd-list { list-style: none; margin: 8px 0 0; padding: 0; }
.upd-list li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.upd-tag { justify-self: start; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; margin-top: 1px; white-space: nowrap; }
.upd-tag.ok { background: var(--ok-soft); color: var(--ok); }
.upd-tag.blue { background: var(--blue-soft); color: var(--blue); }
.upd-tag.amber { background: var(--amber-soft); color: var(--amber); }
@keyframes upd-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes upd-twinkle { 50% { transform: rotate(-8deg) scale(1.08); } }
@media (max-width: 560px) {
  .upd-hero { padding: 20px 18px 16px; border-radius: 18px; }
  .upd-hero h1 { font-size: 23px; }
  .upd-stats b { font-size: 19px; }
  .upd { grid-template-columns: 30px 1fr; gap: 8px; }
  .upd-dot { width: 30px; height: 30px; border-radius: 10px; }
  .upd-rail::before { top: 34px; }
  .upd-list li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------------------------------------------------------------- Stay safe (lone working) */
.lone-page { max-width: 620px; margin: 0 auto; }
.lone-hero { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 20px; margin-bottom: 14px; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.12), transparent 55%), linear-gradient(140deg, #0f5132, #0b3d2a); }
.lone-hero h1 { color: #fff; margin: 2px 0 4px; font-size: 26px; }
.lone-hero p { margin: 0; opacity: .9; font-size: 14.5px; }
.lone-hero-ico { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.14); }
.lone-form .lone-go { min-height: 52px; font-size: 16px; justify-content: center; }
.lone-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.lone-pill input { position: absolute; opacity: 0; pointer-events: none; }
.lone-pill span { display: inline-block; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.lone-pill input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.lone-pill input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.lone-note { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; margin-bottom: 12px; }
.lone-form .lone-note { margin-bottom: 0; }
.lone-note.ok { background: var(--ok-soft); color: var(--ok); }
.lone-note.warn { background: var(--amber-soft); color: var(--ink); }
.lone-live { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 18px 16px; border-radius: 22px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--card-shadow); --ring: #2f9e44; }
.lone-live.late { --ring: #e03131; border-color: color-mix(in srgb, #e03131 40%, var(--line)); background: color-mix(in srgb, #e03131 6%, var(--surface)); }
.lone-dial { position: relative; width: min(230px, 62vw); aspect-ratio: 1; }
.lone-dial > svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.lone-dial .track { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.lone-dial .fill { fill: none; stroke: var(--ring); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.lone-dial-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.lone-dial-txt .k { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.lone-live.late .lone-dial-txt .k { color: #e03131; }
.lone-dial-txt b { font-size: 44px; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 4px 0; }
.lone-dial-txt .t { font-size: 13px; color: var(--muted); }
.lone-check { width: 100%; min-height: 76px; border: 0; border-radius: 18px; background: #2f9e44; color: #fff; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 22px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 22px -12px #2f9e44; transition: transform .12s var(--spring); }
.lone-check small { display: block; font-size: 13px; font-weight: 600; opacity: .85; text-align: left; }
.lone-check span { text-align: left; line-height: 1.1; }
.lone-check:active { transform: scale(.97); }
.lone-live.late .lone-check { animation: lone-nudge 1.6s ease-in-out infinite; }
.lone-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.lone-row .btn { justify-content: center; min-height: 44px; }
.lone-sos { position: relative; overflow: hidden; width: 100%; min-height: 72px; border: 0; border-radius: 18px; background: #c92a2a; color: #fff; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.lone-sos-fill { position: absolute; inset: 0; background: #7a1010; transform: scaleX(0); transform-origin: left; }
.lone-sos.holding .lone-sos-fill { transform: scaleX(1); transition: transform 2s linear; }
.lone-sos.holding { transform: scale(.98); }
.lone-sos-txt { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; text-align: left; padding: 0 18px; }
.lone-sos-txt svg { grid-row: span 2; }
.lone-sos-txt b { font-size: 19px; }
.lone-sos-txt small { font-size: 12.5px; opacity: .85; }
.lone-silent { border: 0; background: none; color: var(--muted); font-size: 13.5px; text-decoration: underline; cursor: pointer; padding: 4px; }
.lone-alert-panel { text-align: center; padding: 28px 20px 22px; border-radius: 22px; margin-bottom: 14px; color: #fff; background: linear-gradient(160deg, #e03131, #9c1c1c); box-shadow: 0 18px 40px -16px #e03131; }
.lone-alert-panel h1 { color: #fff; font-size: 30px; margin: 10px 0 6px; }
.lone-alert-panel p { margin: 0 auto 18px; max-width: 34ch; opacity: .95; }
.lone-alert-ico { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); animation: lone-pulse 1.2s ease-in-out infinite; }
.lone-alert-acts { display: grid; gap: 10px; }
.lone-alert-acts .btn { justify-content: center; min-height: 54px; font-size: 16px; border: 0; }
.lone-siren-btn { background: rgba(255,255,255,.18); color: #fff; }
.lone-safe-btn { background: #fff; color: #9c1c1c; }
.lone-details { margin-bottom: 14px; }
.lone-kv { display: grid; grid-template-columns: 18px 96px 1fr; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lone-kv svg { color: var(--muted); }
.lone-kv .k { color: var(--muted); }
.lone-log { margin-top: 10px; display: grid; gap: 4px; font-size: 13px; }
.lone-log div { display: flex; gap: 10px; }
.lone-log time { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.lone-h { font-size: 17px; margin: 18px 0 10px; }
.lone-person.bad { border-color: #e03131; box-shadow: 0 0 0 3px color-mix(in srgb, #e03131 18%, transparent); animation: lone-glow 2s ease-in-out infinite; }
.lone-meta { margin-top: 8px; }
.lone-chip { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.lone-chip.ok { background: var(--ok-soft); color: var(--ok); }
.lone-chip.amber { background: var(--amber-soft); color: var(--amber); }
.lone-chip.red { background: #e03131; color: #fff; }
.lone-chip.muted { background: var(--surface-2); color: var(--muted); }
.lone-hist { margin-top: 14px; }
.lone-hist summary { display: flex; justify-content: space-between; cursor: pointer; list-style: none; }
.lone-hrow { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; margin-top: 8px; }
@keyframes lone-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(255,255,255,.08); } }
@keyframes lone-nudge { 50% { transform: scale(1.02); } }
@keyframes lone-glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, #e03131 10%, transparent); } }
.lone-note svg { flex: none; }

/* Stay safe: the dial is the check-in button */
.lone-status { display: flex; align-items: center; gap: 10px; width: 100%; font-weight: 600; font-size: 15px; min-width: 0; }
.lone-dial-btn { display: block; aspect-ratio: 1; border: 0; background: none; padding: 0; cursor: pointer; width: min(270px, 74vw); -webkit-tap-highlight-color: transparent; }
.lone-dial-btn .fill { stroke-width: 14; } .lone-dial-btn .track { stroke-width: 14; }
.lone-core { position: absolute; inset: 13%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--ring) 80%, #fff), var(--ring) 70%); box-shadow: 0 0 18px -6px color-mix(in srgb, var(--ring) 60%, transparent), inset 0 -6px 14px rgba(0,0,0,.12);
  transition: transform .35s var(--spring), box-shadow .2s; will-change: transform; }
.lone-dial-btn:active .lone-core { transform: scale(.92); transition-duration: .08s; box-shadow: 0 0 10px -6px var(--ring), inset 0 -3px 10px rgba(0,0,0,.2); }
.lone-dial .fill.refill { transition: stroke-dashoffset 1.2s cubic-bezier(.22,1,.36,1), stroke .3s; }
.lone-core { overflow: visible; }
.lone-core.pop { animation: lone-pop .55s cubic-bezier(.34,1.56,.64,1); }
.lone-core.pop::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--ring); animation: lone-ripple .8s ease-out forwards; pointer-events: none; }
@keyframes lone-pop { 0% { transform: scale(.92); } 55% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes lone-ripple { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }
.lone-core-big { font-size: 30px; line-height: 1.05; letter-spacing: -.01em; margin-top: 4px; }
.lone-core-sub { font-size: 13px; font-weight: 600; opacity: .9; }
.lone-core-time { margin-top: 10px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.16); font-variant-numeric: tabular-nums; }
.lone-live.late .lone-dial-btn .lone-core { animation: lone-nudge 1.6s ease-in-out infinite; }
.lone-live.late .lone-chip { animation: none; }
.lone-core > svg { width: 30px; height: 30px; flex: none; }

/* Stay safe: start screen built around the round Help button, three round controls, time picker, phone setup */
.ls { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 18px 16px; border-radius: 24px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--card-shadow); text-align: center; }
.ls-clock b { display: block; font-size: 52px; line-height: 1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ls-clock span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }
.ls-wheel { position: relative; width: 112px; aspect-ratio: 1; flex: none; }
.ls-wheel.big { width: min(230px, 62vw); margin: 4px 0; }
.ls-wheel > svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.ls-wheel-track { fill: color-mix(in srgb, #e03131 7%, transparent); stroke: color-mix(in srgb, #e03131 18%, var(--line)); stroke-width: 5; }
.ls-wheel-fill { fill: none; stroke: #e03131; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; will-change: stroke-dashoffset; }
.ls-wheel.holding .ls-wheel-fill { animation: ls-fill 1s linear forwards; }
@keyframes ls-fill { from { stroke-dashoffset: 339.3; } to { stroke-dashoffset: 0; } }
.ls-panic { position: absolute; inset: 14%; border: 0; border-radius: 50%; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: radial-gradient(circle at 50% 32%, #ff6b6b, #c92a2a 72%); box-shadow: 0 14px 30px -12px #e03131, inset 0 -6px 14px rgba(0,0,0,.18);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .1s ease-out; will-change: transform; transform: translateZ(0); -webkit-tap-highlight-color: transparent; }
.ls-panic svg { flex: none; }
.ls-panic b { font-size: 18px; line-height: 1.1; }
.ls-wheel.big .ls-panic b { font-size: 26px; }
.ls-panic span { font-size: 11px; font-weight: 600; opacity: .85; }
.ls-wheel.big .ls-panic span { font-size: 13px; }
.ls-panic.holding { transform: scale(.95) translateZ(0); }
.ls-wheel > svg { will-change: transform; }
.lone-dial .fill { will-change: stroke-dashoffset; }
.ls-hint { margin: -4px 0 0; font-size: 13.5px; color: var(--muted); }
.ls-go { width: 100%; min-height: 60px; border: 0; border-radius: 18px; background: #2f9e44; color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 19px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 22px -12px #2f9e44; transition: transform .08s ease-out; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; will-change: transform; transform: translateZ(0); }
.ls-go:active { transform: scale(.97) translateZ(0); }
.ls-go svg { pointer-events: none; }
.ls-go:disabled { opacity: .6; }
.ls-details { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); text-align: left; cursor: pointer; }
.ls-details .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ls-details b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-details svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.ls-details .tiny { white-space: normal; }
.ls-trio { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; width: 100%; }
.ls-round { justify-self: center; width: 76px; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 600; cursor: pointer; transition: transform .12s var(--spring); }
.ls-round:active { transform: scale(.94); }
.ls-round svg { flex: none; }
/* time picker */
.tp { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.tp-col { display: flex; flex-direction: column; align-items: center; }
.tp-col b { font-size: 44px; line-height: 1.1; font-variant-numeric: tabular-nums; min-width: 1.6ch; text-align: center; }
.tp-colon { font-size: 40px; font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.tp-arrow { width: 64px; height: 40px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.tp-arrow:active { transform: scale(.94); background: var(--hover); }
.tp-in { text-align: center; font-size: 13.5px; color: var(--muted); margin: 6px 0 2px; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.tp-chip { padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--ink); }
.tp-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* phone setup */
.lone-setup { margin-bottom: 14px; }
.lone-setup summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; }
.lone-perm { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.lone-perm-ico { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.lone-perm-ico.ok { background: var(--ok-soft); color: var(--ok); }
.lone-perm-ico.bad { background: var(--red-soft); color: var(--red); }
.lone-admin { margin-top: 14px; }
.lone-admin select { width: auto; }
/* Stay safe on the team map: red exclamation for someone who needs help */
.mk-alert { width: 38px; height: 38px; border-radius: 50%; background: #e03131; color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 22px; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(224,49,49,.6), 0 4px 10px rgba(0,0,0,.3); animation: mk-alert-pulse 1.4s ease-out infinite; cursor: pointer; }
.mk-alert.overdue { background: #f08c00; box-shadow: 0 0 0 0 rgba(240,140,0,.6), 0 4px 10px rgba(0,0,0,.3); animation-name: mk-overdue-pulse; }
@keyframes mk-alert-pulse { 70% { box-shadow: 0 0 0 16px rgba(224,49,49,0), 0 4px 10px rgba(0,0,0,.3); } 100% { box-shadow: 0 0 0 0 rgba(224,49,49,0), 0 4px 10px rgba(0,0,0,.3); } }
@keyframes mk-overdue-pulse { 70% { box-shadow: 0 0 0 14px rgba(240,140,0,0), 0 4px 10px rgba(0,0,0,.3); } 100% { box-shadow: 0 0 0 0 rgba(240,140,0,0), 0 4px 10px rgba(0,0,0,.3); } }
.mk-alert-badge { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #e03131; color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 14px; }
/* "Use GeoHQ as an app" prompt on phones */
.install-nudge { position: fixed; left: 12px; right: 12px; bottom: calc(76px + var(--safe-b, 0px)); z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 16px 14px; box-shadow: var(--menu-shadow); display: flex; flex-direction: column; gap: 12px; transform: translateY(24px); opacity: 0; transition: transform .35s var(--spring), opacity .25s; max-width: 520px; margin: 0 auto; }
.install-nudge.on { transform: none; opacity: 1; }
.install-x { position: absolute; top: 10px; right: 10px; border: 0; background: var(--surface-2); color: var(--muted); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.install-steps { margin: 0; padding-left: 20px; font-size: 14px; display: grid; gap: 6px; }
.install-share { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); vertical-align: middle; }
.install-manual { margin: 0; }
.install-nudge[hidden], .install-nudge [hidden] { display: none !important; }
/* Stay safe: testing warning, Alert active badges, alert ping */
.lone-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; background: var(--amber-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); font-size: 13.5px; line-height: 1.45; }
.lone-warn svg { flex: none; color: var(--amber); margin-top: 1px; }
.avatar.alerting { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #e03131; overflow: visible; }
.avatar .alert-dot { position: absolute; right: -4px; top: -4px; width: 16px; height: 16px; border-radius: 50%; background: #e03131; color: #fff; font-style: normal; font-weight: 900; font-size: 11px; line-height: 16px; text-align: center; border: 2px solid var(--surface); }
.avatar { position: relative; }
.alert-pill { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: #e03131; color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; white-space: nowrap; }
.lone-alert-strip { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; background: #e03131; color: #fff; }
.lone-alert-strip .btn { background: rgba(255,255,255,.2); color: #fff; border: 0; }
.ping-alert { margin: 8px 0 4px; padding: 12px; border-radius: 14px; background: color-mix(in srgb, #e03131 8%, var(--surface)); border: 1px solid color-mix(in srgb, #e03131 35%, var(--line)); }
.ping-alert b { color: #c92a2a; }
.testing-bar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 12.5px; background: var(--amber-soft); color: var(--ink); border-bottom: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.testing-bar svg { flex: none; color: var(--amber); }
.testing-bar button { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; display: grid; }
/* "I'm safe, cancel alert": white writing, clearly a button on the red panel */
.lone-alert-panel .btn.lone-safe-btn { background: #7a1010; color: #fff; border: 2px solid #fff; }
.lone-alert-panel .btn.lone-safe-btn svg { color: #fff; }
.lone-alert-panel .btn.lone-siren-btn { background: rgba(255,255,255,.18); color: #fff; }

.lone-core-timer { font-size: 44px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 0 0 4px; }

/* What's new: older updates fold up under their version and title */
.upd.folded .upd-body { padding: 0 16px; }
.upd-fold > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 0; cursor: pointer; min-height: 48px; }
.upd-fold > summary::-webkit-details-marker { display: none; }
.upd-sum-t { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-chev { color: var(--muted); display: grid; place-items: center; transition: transform .2s; }
.upd-fold[open] > summary .upd-chev { transform: rotate(180deg); }
.upd-fold[open] > summary .upd-sum-t { white-space: normal; }
.upd-fold[open] { padding-bottom: 6px; }
.upd-fold .upd-meta { margin-top: -4px; }
.lone-dial .fill.animating { transition: stroke .3s; }
.info-box > svg:first-child { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

/* Pings at the top of Chat */
.pings-panel { border-bottom: 1px solid var(--line); padding-bottom: 6px; background: color-mix(in srgb, var(--accent) 4%, transparent); }
.pp-row { display: flex; align-items: flex-start; gap: 8px; padding: 9px 16px; color: inherit; text-decoration: none; min-width: 0; position: relative; }
.pp-row:hover { background: var(--surface-2); }
.pp-row .grow { min-width: 0; }
.pp-row.unread b { font-weight: 700; }
.pp-row .dot-unread { margin-top: 7px; flex: none; }
.pp-more > summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 8px 16px; font-size: 13.5px; font-weight: 600; color: var(--accent-text); cursor: pointer; }
.pp-more > summary::-webkit-details-marker { display: none; }
.pp-more[open] > summary svg { transform: rotate(180deg); }
.pp-more > summary svg { transition: transform .2s; }
.pp-notes { display: flex; align-items: center; gap: 6px; padding: 6px 16px 4px; font-size: 13px; color: var(--muted); text-decoration: none; }
.lone-core-next { font-size: 12.5px; font-weight: 600; color: #fff; opacity: .9; letter-spacing: .01em; margin-bottom: 2px; }
.lone-person.off { opacity: .85; }
.lone-person.late { border-color: color-mix(in srgb, #f08c00 55%, var(--line)); }
.lone-why { margin: -2px 0 8px; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, #f08c00 14%, transparent); color: var(--ink); }
.lone-why.bad { background: color-mix(in srgb, #e03131 16%, transparent); }
.mk-alert-badge.late { background: #f08c00; }

/* Manhole form sections */
.mh-fsec { border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; padding: 0 12px; background: var(--surface); }
.mh-fsec > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 0; cursor: pointer; }
.mh-fsec > summary::-webkit-details-marker { display: none; }
.mh-fsec > summary b { flex: 1; }
.mh-fsec > summary svg { transition: transform .2s; color: var(--muted); }
.mh-fsec[open] > summary svg { transform: rotate(180deg); }
.mh-fsec[open] { padding-bottom: 10px; }
.mh-fsec .field .mh-sub { margin-top: 6px; }
.mh-yn { display: flex; gap: 6px; }
.mh-yn button { flex: 1; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 600; cursor: pointer; }
.mh-yn button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mh-pipe { display: grid; grid-template-columns: 26px 1fr 1fr; gap: 6px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.mh-pipe select, .mh-pipe input { min-width: 0; }
.mh-pipe .btn.icon { justify-self: end; }
.mh-plab { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft, var(--surface-2)); font-size: 13px; grid-row: span 2; }
.mh-fe-sec { margin: 10px 0; } .mh-fe-sec > b { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.mh-fe-row { display: flex; align-items: center; gap: 4px; padding: 7px 0; border-top: 1px solid var(--line); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.mh-pcell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mh-pcell input { min-width: 0; }
/* Adding a manhole: a crosshair instead of the drag hand, over every map engine */
.mh.adding #mh-map, .mh.adding #mh-map *, .mh.adding #mh-map .maplibregl-canvas-container.maplibregl-interactive, .mh.adding #mh-map .gm-style div, .mh.adding gmp-map-3d { cursor: crosshair !important; }

/* Manholes saved on the phone while there is no signal */
.mh-offpill { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); z-index: 6; border: 0; border-radius: 999px; padding: 7px 14px; background: #f59f00; color: #1d1d1b; font: 600 13px/1.2 inherit; box-shadow: 0 2px 10px rgba(0,0,0,.3); max-width: calc(100% - 24px); white-space: nowrap; cursor: pointer; }
.mh-offpill span { font-weight: 500; }

/* chat list: press-and-hold menu */
.chan { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.chan.picked { background: var(--hover); }

/* manhole plotting: what's-next bar, list, crosshair */
.mh-sb { display: grid; gap: 8px; margin: 0 0 12px; padding: 10px; border-radius: 14px; background: var(--hover); }
.mh-sb-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mh-sb-b { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: inherit; font: 700 20px/1 var(--font); cursor: pointer; }
.mh-sb-b:disabled { opacity: .35; cursor: default; }
.mh-sb-pos { font: 700 13px var(--font); min-width: 54px; text-align: center; }
.mh-sb-dist { display: inline-flex; align-items: center; gap: 4px; font: 600 12px var(--font); padding: 3px 9px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); }
.mh-sb-check { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mh-sb-prog { font: 600 12px var(--font); padding: 3px 9px; border-radius: 12px; background: linear-gradient(90deg, #30a46c var(--p), rgba(128,128,128,.25) var(--p)); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.mh-sb-chip { border: 1px dashed var(--line); background: transparent; color: inherit; border-radius: 14px; padding: 5px 11px; font: 600 12.5px var(--font); cursor: pointer; min-height: 32px; }
.mh-sb-chip.ok { border: 1px solid #30a46c; color: #1f8a56; background: rgba(48,164,108,.1); }
.mh-sb-chip.todo { border-color: #f59f00; }
.mh-sb-act { display: flex; gap: 6px; flex-wrap: wrap; }
.mh-sb-act .grow { flex: 1 1 140px; }
.mh-pulse { outline: 3px solid #f59f00; outline-offset: 2px; border-radius: 10px; transition: outline .3s; }
.mh-cross { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 3; pointer-events: none; }
.mh-cross i { position: absolute; background: #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,.65); }
.mh-cross i:nth-child(1) { left: -22px; top: -1px; width: 44px; height: 2px; }
.mh-cross i:nth-child(2) { left: -1px; top: -22px; width: 2px; height: 44px; }
.mh-cross b { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #f59f00; box-shadow: 0 0 0 1.5px rgba(0,0,0,.65); }
.mh-addrow { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.mh-addhint { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.mh-addbtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mh-modebar .mh-addgo { background: #1d1d1b; color: #fff; padding: 7px 16px; font-size: 14px; }
.mh-qtypes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mh-qtypes button { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.6) !important; }
.mh-qtypes button i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.mh-qtypes button.on { outline: 2px solid #1d1d1b; }
.mh-prog { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mh-prog-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(128,128,128,.25); overflow: hidden; } .mh-prog-bar i { display: block; height: 100%; background: #30a46c; }
.mh-li-q { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: inherit; font: 15px var(--font); }
.mh-li-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.mh-li-chips .mh-chip { flex: none; border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 16px; padding: 6px 12px; font: 600 12.5px var(--font); cursor: pointer; }
.mh-li-chips .mh-chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.mh-li-list { display: grid; margin-top: 6px; max-height: 52vh; overflow-y: auto; }
.mh-li { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 4px; border: 0; border-top: 1px solid var(--line); background: transparent; color: inherit; font: 14px var(--font); cursor: pointer; }
.mh-li-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; flex: none; }
.mh-li-st { width: 12px; height: 12px; border-radius: 50%; flex: none; }

/* manhole map: clearer controls */
.mh-yn button.on { background: #2f9e44; border-color: #2f9e44; color: #fff; }
.mh-top { gap: 8px; }
.mh.editing .mh-top { box-shadow: inset 0 -3px 0 #f59f00; }
.mh-mode { padding: 3px; border-radius: 14px; }
.mh-mode button { height: 38px; min-width: 76px; justify-content: center; border-radius: 11px; font-size: 14px; font-weight: 700; }
.mh-mode button.on { box-shadow: 0 2px 6px rgba(0,0,0,.18); }
@media (max-width: 420px) { .mh-title span { display: none; } .mh-mode button { min-width: 66px; } }
.mh-tools { max-width: none; right: 10px; }
.mh-search { max-width: 540px; border-radius: 24px; box-shadow: 0 4px 18px rgba(0,0,0,.3); }
.mh-search input { height: 48px; font-size: 16px; }
.mh-search > span { padding-left: 16px; }
.mh-sclear { flex: none; width: 36px; height: 36px; margin-right: 6px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.mh-sclear[hidden] { display: none; }
.mh-results { top: 56px; border-radius: 16px; }
.mh-search input::-webkit-search-cancel-button { display: none; }
.mh-toolrow { position: absolute; right: 0; top: 60px; flex-direction: column; gap: 8px; overflow: visible; }
.mh-chip { flex-direction: column; justify-content: center; gap: 3px; width: 56px; height: 54px; padding: 0; border-radius: 16px; font-size: 10.5px; font-weight: 700; letter-spacing: .01em; }
.mh-chip .mh-cl { display: block; line-height: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mh-chip.on { background: var(--accent); color: var(--accent-ink); }
.mh-chip:active { transform: scale(.94); }
.mh-fdot { top: 7px; right: 10px; }
.mh-addbtn { height: 58px; padding: 0 26px; font-size: 17px; }
.mh-preset { height: 54px; }
.mh.editing:not(.adding) .mh-addbtn { background: var(--accent); }
@media (min-width: 900px) { .mh-chip { width: 64px; } }

/* pipe rows: the depth box was squeezed into the letter column and its spinner covered it */
.mh-pipe { grid-template-columns: 30px 1fr 1fr; }
.mh-plab { grid-row: span 3; align-self: start; margin-top: 8px; }
.mh-pipe select, .mh-pipe input { height: 44px; font-size: 15px; }
.mh-pipe input[data-mh-p="depth"] { grid-column: 2; }
.mh-pipe .btn.icon { grid-column: 3; justify-self: end; height: 44px; width: 44px; }
.mh-pipe input[type=number], .mh-form input[type=number], .mh-panel input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.mh-panel input[type=number]::-webkit-outer-spin-button, .mh-panel input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 899px) { .mh-add { right: 72px; } }

/* 3D camera pad: left side, out of the way of the buttons on the right */
.mh-3dpad { right: auto; left: 10px; top: 50%; grid-template-columns: repeat(2, 46px); gap: 6px; padding: 6px; border-radius: 20px; background: rgba(20,26,23,.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.mh-3dpad button { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.12); transition: background .12s, transform .12s; }
.mh-3dpad button:hover { background: rgba(255,255,255,.22); }
.mh-3dpad button:active { background: var(--accent, #1a9d6b); transform: scale(.94); }
.mh-3dpad .mh-compass { grid-column: 1 / -1; width: 100%; height: 40px; background: rgba(255,255,255,.06); }
.mh-needle { transform-origin: 12px 12px; will-change: transform; }
@media (pointer: coarse), (max-width: 700px) { .mh-3dpad { display: grid; grid-template-columns: 46px; } .mh-3dpad [data-cam="left"], .mh-3dpad [data-cam="right"], .mh-3dpad [data-cam="out"], .mh-3dpad [data-cam="in"] { display: none; } }

/* manhole status: one badge instead of three buttons */
.mh-statusline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.mh-stpill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 16px; background: var(--s); color: #1d1d1b; font: 700 13.5px var(--font); }
.mh-stpill svg { flex: none; }

/* zoom / compass pad on the left (replaces the map engines' own buttons) */
.mh-navpad { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); z-index: 4; display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 20px; background: rgba(20,26,23,.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.mh-navpad button { width: 46px; height: 46px; border: 0; border-radius: 14px; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .12s, transform .12s; }
.mh-navpad button[hidden] { display: none; }
.mh-navpad button:hover { background: rgba(255,255,255,.22); } .mh-navpad button:active { background: var(--accent, #1a9d6b); transform: scale(.94); }
.mh.g3d .mh-navpad { display: none; }
.mh.adding .mh-navpad { opacity: .85; }

/* the left-hand pads slide away; a small arrow tab pulls them out (hidden by default) */
.mh-navpad, .mh-3dpad { translate: 0 0; transition: translate .25s var(--spring, ease), opacity .2s; }
.mh:not(.pad-open) .mh-navpad, .mh:not(.pad-open) .mh-3dpad { translate: -140% 0; opacity: 0; pointer-events: none; }
.mh-padtab { position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 6; width: 24px; height: 56px; padding: 0; border: 0; border-radius: 0 14px 14px 0; background: rgba(20,26,23,.78); color: #fff; display: grid; place-items: center; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 2px 2px 10px rgba(0,0,0,.3); transition: left .25s var(--spring, ease); }
.mh-padtab svg { transition: transform .25s; }
.mh.pad-open .mh-padtab { left: 74px; } .mh.pad-open .mh-padtab svg { transform: rotate(180deg); }
.mh.g3d .mh-navpad { display: none; }
@media (min-width: 701px) and (pointer: fine) { .mh.g3d.pad-open .mh-padtab { left: 126px; } }
/* the pull-out tab sits flush against the pad (no gap) */
.mh.pad-open .mh-padtab { left: 67px; }
@media (min-width: 701px) and (pointer: fine) { .mh.g3d.pad-open .mh-padtab { left: 119px; } }
.mh-padtab { width: 26px; padding-left: 2px; }
/* iPhone date/time boxes ignore width:100% and spill past their card; make every field box respect its container */
input, select, textarea { max-width: 100%; min-width: 0; }
input[type="time"], input[type="date"], input[type="datetime-local"], input[type="month"], input[type="week"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; text-align: left; }
input[type="time"]::-webkit-date-and-time-value, input[type="date"]::-webkit-date-and-time-value, input[type="datetime-local"]::-webkit-date-and-time-value { text-align: left; min-width: 0; margin: 0; }
.form-grid > *, .row > .field, .card > * { min-width: 0; }
/* What's new: every update folds up; two-line summaries with counts, grouped by month */
.upd-sum-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upd-sum-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.upd-sum-top .upd-sum-t { flex: 1; }
.upd-sum-sub { font-size: 12.5px; color: var(--muted); }
.upd-fold > summary { padding: 10px 0; }
.upd-month { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 2px 50px; font-weight: 700; }
@media (max-width: 560px) { .upd-month { margin-left: 38px; } }
.upd { grid-template-columns: 38px minmax(0, 1fr); } .upd-body { min-width: 0; }
@media (max-width: 560px) { .upd { grid-template-columns: 30px minmax(0, 1fr); } }
.upd-fold > summary .upd-sum-t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upd-sum-top { align-items: flex-start; }
.upd-fold .upd-meta { display: none; }
.notes-folder > summary > b { white-space: normal; overflow: visible; text-overflow: clip; } .notes-folder > summary { list-style: none; gap: 8px; } .notes-folder > summary::-webkit-details-marker { display: none; }
/* project folders */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 22px; }
.pf-card { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; min-width: 0; transition: transform .12s, box-shadow .12s; }
.pf-card:hover { transform: translateY(-1px); box-shadow: var(--lift-shadow); }
.pf-card > svg:first-child { flex: none; color: var(--tc, var(--accent)); }
.pf-card > svg:last-child { flex: none; color: var(--muted); margin-left: auto; }
.pf-name { font-weight: 700; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-count { font-size: 12.5px; color: var(--muted); background: var(--bg-soft, rgba(127,127,127,.12)); border-radius: 999px; padding: 2px 9px; white-space: nowrap; flex: none; }

/* ------------------------------------------------ 3.14 refresh */
/* Home: this week's hours */
.week-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.wb { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; border-radius: 8px; padding: 2px 0; }
.wb:hover { color: var(--ink); }
.wb-col { position: relative; width: 100%; max-width: 34px; height: 74px; border-radius: 7px; background: var(--surface-2); overflow: hidden; display: flex; align-items: flex-end; }
.wb-col i { display: block; width: 100%; background: color-mix(in srgb, var(--accent) 70%, var(--surface)); border-radius: 7px 7px 0 0; transition: height .5s var(--ease-out); }
.wb.today .wb-col i { background: var(--accent); }
.wb.over .wb-col i { background: var(--ok); }
.wb-col em { position: absolute; left: 0; right: 0; border-top: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); }
.wb-l { font-size: 12px; font-weight: 600; }
.wb.today .wb-l { color: var(--accent-text); }
.wb.future { opacity: .55; }
.ink { color: var(--ink); }
/* Home: coming up */
.cu-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.cu-row:first-child { border-top: 0; }
.cu-row:hover { background: var(--hover); }
.cu-bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); flex: none; }
.cu-when { display: flex; flex-direction: column; width: 74px; flex: none; font-size: 12px; color: var(--muted); line-height: 1.3; }
.cu-when b { color: var(--ink); font-size: 13px; }
.cu-more { display: block; padding: 10px 14px; border-top: 1px solid var(--line); text-align: center; }
/* Gentle polish: lifted cards on hover (computers), clearer keyboard focus */
@media (hover: hover) and (pointer: fine) {
  .choose-btn, .jobcard, .projcard { transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), border-color .15s; }
  .choose-btn:hover, .jobcard:hover, .projcard:hover { transform: translateY(-1px); box-shadow: var(--lift-shadow); }
}
a:focus-visible, button:focus-visible, summary:focus-visible, [role="button"]:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.home-head h1 { letter-spacing: -.02em; }
/* What's new: a quiet dot instead of a big number */
.count.dot-only { min-width: 9px; width: 9px; height: 9px; padding: 0; font-size: 0; }
/* Keyboard shortcuts sheet */
.kbd-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; align-items: center; }
.kbd-list kbd, kbd.k { display: inline-block; min-width: 24px; padding: 2px 7px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; font: 600 12px var(--mono); text-align: center; background: var(--surface-2); color: var(--ink); }
.kbd-list h4 { grid-column: 1 / -1; margin: 10px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
/* Manhole export: fields folded away under the formats */
.mh-exp-fields { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.mh-exp-fields > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; }
.mh-exp-fields > summary::-webkit-details-marker { display: none; }
.mh-exp-fields > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.mh-exp-fields[open] > summary::after { transform: rotate(-135deg); }
/* Speed: quicker sheets, and no live blur behind an open sheet or menu (it's hidden by the dimmed backdrop anyway, and blurring is costly on phones) */
@media (max-width: 699px) { .sheet { animation-duration: .32s; } }
html:has(#sheet-root .sheet-backdrop) :is(.topbar, .bottomnav, .sidebar) { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
/* Profile pictures: a quiet grey behind a photo while it loads, instead of the coloured initials circle flashing */
.avatar:has(> img) { background: var(--surface-2); }
/* Continue today's latest task */
.continue-btn { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 4px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); color: var(--accent-text); font: inherit; text-align: left; cursor: pointer; }
.continue-btn:hover { border-color: var(--accent); }
.continue-btn .tiny { color: color-mix(in srgb, var(--accent-text) 70%, var(--muted)); }
.continue-btn > svg { flex: none; }
.logrow .cont-sm { flex: none; color: var(--accent-text); }
@media (max-width: 420px) { .logrow .cont-sm span { display: none; } }
/* Team colour picker: rounded squares, the chosen one outlined */
.swatch-pick.sq span { border-radius: 8px; width: 34px; height: 34px; }
.swatch-pick input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.team-actions .small.muted { align-self: center; }

/* ------------------------------------------------ Admin → Analysis */
.an-filters { display: grid; gap: 12px; }
.an-ranges { display: flex; gap: 6px; flex-wrap: wrap; }
.an-sels { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.an-f select { width: 100%; }
.an-types { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.an-types .tiny { margin-right: 4px; }
.an-crumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.an-bar { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.an-note { margin: 0; }
.an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .an-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.an-kpis .kpi .v { font-size: 22px; }
.an-insights ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.an-insights li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.an-insights li.warn svg { color: var(--amber); } .an-insights li.info svg { color: var(--accent); }
.an-wrap { overflow-x: auto; }
.an-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.an-table th, .an-table td { padding: 9px 12px; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.an-table thead th { border-top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
.an-table th button { all: unset; cursor: pointer; font: inherit; }
.an-table th.on button { color: var(--ink); }
.an-table .r { text-align: right; }
.an-table tbody tr:hover { background: var(--hover); }
.an-table .neg { color: var(--red); font-weight: 700; } .an-table .pos { color: var(--ok); font-weight: 700; }
.an-link { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.an-link:hover { color: var(--accent-text); text-decoration: underline; }
.an-stack { display: inline-flex; width: 120px; height: 9px; border-radius: 5px; overflow: hidden; background: var(--surface-2); vertical-align: middle; }
.an-stack i { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
/* grid: people down, days across */
.g-grid { display: grid; min-width: max-content; }
.g-row { display: flex; align-items: stretch; border-top: 1px solid var(--line); }
.g-head { border-top: 0; background: var(--surface-2); }
.g-n { position: sticky; left: 0; z-index: 1; flex: none; width: 150px; padding: 8px 12px; background: var(--surface); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-head .g-n { background: var(--surface-2); }
.g-h { flex: none; width: 34px; text-align: center; font-size: 11.5px; font-weight: 700; padding: 6px 0; color: var(--muted); }
.g-h em { display: block; font-style: normal; font-weight: 500; font-size: 10px; }
.g-h.we { opacity: .55; }
.g-c { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ink); text-decoration: none; background: color-mix(in srgb, var(--accent) calc(var(--l) * 55%), transparent); border-left: 1px solid var(--line); }
.g-c:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.g-c.we { background-color: var(--surface-2); }
.g-c.miss { background: color-mix(in srgb, var(--red) 14%, transparent); }
.g-c.ot { box-shadow: inset 0 -3px 0 var(--amber); }
.g-key { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; }
.g-key.miss { background: color-mix(in srgb, var(--red) 30%, transparent); } .g-key.ot { background: var(--amber); }
@media (max-width: 600px) { .g-n { width: 110px; } }
/* "A new version is ready" */
.upd-bar { position: fixed; left: 12px; right: 12px; bottom: calc(76px + var(--safe-b)); z-index: 120; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--ink); color: var(--surface); box-shadow: var(--lift-shadow); font-size: 14px; font-weight: 600; max-width: 460px; margin: 0 auto; }
@media (min-width: 900px) { .upd-bar { bottom: 20px; } }

/* ------------------------------------------------ Analysis visuals */
:root { --av1: #2a78d6; --av2: #eb6834; --av3: #1baf7a; --av4: #eda100; --av5: #e87ba4; --av6: #008300; --av7: #6250d6; --av8: #e34948; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --av1: #3987e5; --av2: #d95926; --av3: #199e70; --av4: #c98500; --av5: #d55181; --av6: #008300; --av7: #9085e9; --av8: #e66767; } }
:root[data-theme="dark"] { --av1: #3987e5; --av2: #d95926; --av3: #199e70; --av4: #c98500; --av5: #d55181; --av6: #008300; --av7: #9085e9; --av8: #e66767; }
.av-tip { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; opacity: 0; transition: opacity .12s; background: var(--ink); color: var(--surface); padding: 8px 11px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; white-space: pre-line; max-width: 280px; box-shadow: var(--lift-shadow); font-weight: 600; }
.av-tip.on { opacity: 1; }
.av-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .av-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.av-kpi { position: relative; display: grid; gap: 2px; padding: 14px 14px 12px; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface) 70%); min-width: 0; }
.av-kpi.warn { background: linear-gradient(180deg, color-mix(in srgb, var(--amber) 12%, var(--surface)), var(--surface) 70%); }
.av-k-l { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.av-kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.av-k-s { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.av-k-spark { margin-top: 6px; display: block; min-height: 28px; }
.av-spark { width: 100%; max-width: 120px; height: 28px; display: block; overflow: visible; }
.av-delta { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.av-delta i { font-style: normal; font-weight: 500; color: var(--muted); }
.av-delta.up { color: var(--ok); } .av-delta.down { color: var(--blue); } .av-delta.bad { color: var(--red); }
.av-two { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .av-two { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.av-chart { width: 100%; height: auto; display: block; overflow: visible; }
.av-grid line, .av-grid polygon { stroke: var(--line); stroke-width: 1; fill: none; }
.av-grid text, .av-x { fill: var(--muted); font-size: 11px; font-weight: 500; }
.av-hit { fill: transparent; }
.av-hit:hover { fill: color-mix(in srgb, var(--ink) 5%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .av-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: av-grow .6s var(--ease-out) both; }
  @keyframes av-grow { from { transform: scaleY(0); } }
  .av-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: av-draw .9s var(--ease-out) both; }
  @keyframes av-draw { from { stroke-dashoffset: 1; } }
  .av-seg { animation: av-sweep .9s var(--ease-out) both; }
  @keyframes av-sweep { from { stroke-dasharray: 0 100; } }
  .av-poly { transform-box: fill-box; transform-origin: 50% 50%; animation: av-pop .7s var(--ease-out) both; }
  @keyframes av-pop { from { transform: scale(.1); opacity: 0; } }
  .av-cell { animation: av-fade .5s ease-out both; }
  @keyframes av-fade { from { opacity: 0; } }
  .av-mg-b i, .av-mix-b i, .av-bul-t i { transform-origin: 0 50%; animation: av-wide .7s var(--ease-out) both; }
  @keyframes av-wide { from { transform: scaleX(0); } }
}
.av-hitg .av-cross { stroke: var(--line-2); stroke-width: 1; opacity: 0; }
.av-hitg .av-dot { opacity: 0; }
.av-hitg:hover .av-cross, .av-hitg:hover .av-dot { opacity: 1; }
.av-donut-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.av-donut { position: relative; width: 168px; height: 168px; flex: none; }
.av-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.av-donut .av-ring { stroke: var(--surface-2); stroke-width: 5.2; }
.av-donut .av-seg { fill: none; stroke-width: 5.2; }
.av-donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.av-donut-c b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.av-donut-c span { font-size: 12px; color: var(--muted); }
.av-leg { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; min-width: 190px; flex: 1; }
.av-leg li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; font-size: 13.5px; }
.av-leg li i { width: 10px; height: 10px; border-radius: 3px; }
.av-leg li em { font-style: normal; color: var(--muted); font-size: 12.5px; min-width: 46px; text-align: right; }
.av-scroll { overflow-x: auto; padding-bottom: 4px; }
.av-heat { display: block; }
.av-cell { fill: color-mix(in srgb, var(--accent) calc(8% + var(--l) * 80%), var(--surface-2)); }
.av-cell.off { fill: color-mix(in srgb, var(--accent) calc(var(--l) * 60%), var(--surface-2)); opacity: .55; }
.av-cell.fut { fill: transparent; stroke: var(--line); stroke-dasharray: 2 2; }
.av-cell.gap { fill: color-mix(in srgb, var(--red) 20%, var(--surface-2)); }
.av-cell:hover { stroke: var(--ink); stroke-width: 1.5; }
.av-key { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.av-key i { width: 14px; height: 14px; border-radius: 3px; background: color-mix(in srgb, var(--accent) calc(8% + var(--l) * 80%), var(--surface-2)); }
.av-key i.gap { background: color-mix(in srgb, var(--red) 20%, var(--surface-2)); margin-left: 10px; }
.av-bul { display: grid; gap: 9px; }
.av-bul-r { display: grid; grid-template-columns: 84px minmax(0, 1fr) 62px; gap: 10px; align-items: center; font-size: 13px; }
.av-bul-l { font-weight: 700; }
.av-bul-t { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); }
.av-bul-t i { display: block; height: 100%; border-radius: 5px; background: var(--av1); }
.av-bul-t i.over { background: var(--av8); }
.av-bul-t em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .5; border-radius: 1px; }
.av-bul-r b { text-align: right; font-variant-numeric: tabular-nums; } .av-bul-r b.neg { color: var(--red); }
/* compare */
.av-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.av-chips .chip { height: auto; min-height: 34px; padding: 4px 12px; }
.av-chips .chip em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; }
.av-chips .chip.on { background: var(--ink); color: var(--surface); } .av-chips .chip.on em { color: color-mix(in srgb, var(--surface) 70%, transparent); }
.av-dot-k { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.av-cmp-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.av-cmp-card { display: grid; gap: 2px; border-top: 4px solid var(--ec); }
.av-cmp-n { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; min-width: 0; }
.av-cmp-n i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.av-cmp-v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.av-radar { max-width: 460px; margin: 0 auto; }
.av-poly:hover { fill-opacity: .2; }
.av-mgs { display: grid; gap: 22px 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.av-mg-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.av-mg-r { display: grid; grid-template-columns: minmax(70px, 110px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.av-mg-b { height: 10px; border-radius: 0 5px 5px 0; background: transparent; position: relative; }
.av-mg-b i { display: block; height: 100%; border-radius: 0 5px 5px 0; }
.av-mg-r b { font-variant-numeric: tabular-nums; white-space: nowrap; } .av-mg-r b em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.av-mix { display: grid; gap: 10px; }
.av-mix-r { display: grid; grid-template-columns: minmax(90px, 170px) minmax(0, 1fr); gap: 12px; align-items: center; font-size: 13px; }
.av-mix-n { display: flex; align-items: center; gap: 7px; font-weight: 600; } .av-mix-n i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.av-mix-b { display: flex; gap: 2px; height: 16px; } .av-mix-b i { display: block; height: 100%; border-radius: 3px; min-width: 2px; }
.av-cell-n { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; } .av-cell-n i { width: 10px; height: 10px; border-radius: 50%; }
.an-table .av-spark { width: 84px; height: 24px; }

/* Suggestions: public / private and upvotes */
.sug.has-vote { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: start; }
.sug-main { min-width: 0; }
.sug-vote { display: grid; place-items: center; gap: 2px; width: 52px; padding: 8px 0; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--muted); font: inherit; cursor: pointer; }
.sug-vote b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
button.sug-vote:hover { border-color: var(--accent); color: var(--accent-text); }
.sug-vote.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .sug-vote.on b { color: var(--accent-ink); }
.sug-vote.own { cursor: default; background: var(--surface-2); border-style: dashed; }
.pill.pub { background: var(--accent-soft); color: var(--accent-text); } .pill.priv { background: var(--surface-2); color: var(--muted); }
.row.end { justify-content: flex-end; }

/* Day notes: search, trends */
.nt-search { display: grid; gap: 10px; }
.nt-q { max-width: 460px; }
.nt-pop { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.nt-pop .chip { height: 30px; } .nt-pop .chip em, .nt-more .chip em { font-style: normal; font-weight: 600; color: var(--muted); font-size: 12px; margin-left: 2px; }
.nt-card { margin-bottom: 14px; }
.nt-rows { display: grid; gap: 4px; }
.nt-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.nt-row:first-child { border-top: 0; }
.nt-row.all { background: color-mix(in srgb, var(--accent) 5%, transparent); border-radius: 12px; padding: 12px; margin: 0 -12px 6px; border-top: 0; }
.nt-name { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.nt-col { display: grid; gap: 4px; align-content: start; }
@media (min-width: 900px) { .nt-row { grid-template-columns: minmax(150px, 1.1fr) repeat(3, minmax(0, 1.5fr)); align-items: start; } .nt-name { flex-direction: column; gap: 2px; } }
.nt-cell { display: grid; gap: 6px; }
.nt-main { all: unset; cursor: pointer; display: grid; gap: 1px; border-radius: 8px; }
.nt-main b { font-size: 16px; text-transform: capitalize; } .nt-main b.nt-none { font-size: 13.5px; font-weight: 600; color: var(--muted); text-transform: none; }
.nt-m { font-size: 12px; color: var(--muted); }
button.nt-main:hover b { text-decoration: underline; } button.nt-main:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.nt-cell.trend .nt-main b { color: var(--accent-text); }
.nt-more { display: flex; gap: 5px; flex-wrap: wrap; } .chip.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.nt-found { margin: 4px 0 10px; }
mark { background: color-mix(in srgb, var(--amber) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.nt-name { min-width: 0; } .nt-name b { overflow-wrap: anywhere; line-height: 1.25; }
.nt-col .nk { justify-self: start; }
/* Manhole map: the bin, the preview pin, the crosshair's label */
.mh-bin { position: absolute; z-index: 9; left: 50%; bottom: calc(96px + var(--safe-b)); width: 84px; height: 84px; margin-left: -42px; display: grid; place-items: center; border-radius: 50%; color: #e5484d; background: color-mix(in srgb, #e5484d 14%, var(--surface)); border: 2px dashed color-mix(in srgb, #e5484d 65%, transparent); box-shadow: var(--lift-shadow); opacity: 0; transform: translateY(46px) scale(.6); pointer-events: none; transition: transform .38s var(--bounce), opacity .2s, background-color .2s, color .2s, border-color .2s; }
.mh-bin.on { opacity: 1; transform: none; }
.mh-bin svg { width: 42px; height: 42px; overflow: visible; }
.mh-bin .lid { transform-box: view-box; transform-origin: 11px 14px; transition: transform .3s var(--bounce); }
.mh-bin span { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; font: 700 12px var(--font); color: #fff; background: rgba(20, 24, 22, .88); padding: 3px 10px; border-radius: 99px; }
.mh-bin.hot { color: #fff; background: #e5484d; border: 2px solid #fff; transform: scale(1.3); animation: bin-pulse .75s ease-in-out infinite; }
.mh-bin.hot .lid { transform: rotate(-34deg) translate(-1px, -3px); }
.mh-bin.hot svg { animation: bin-wiggle .5s ease-in-out infinite; }
.mh-bin.eat { animation: bin-eat .5s var(--bounce); }
@keyframes bin-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .55), var(--lift-shadow); } 50% { box-shadow: 0 0 0 18px rgba(229, 72, 77, 0), var(--lift-shadow); } }
@keyframes bin-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
@keyframes bin-eat { 0% { transform: scale(1.3); } 35% { transform: scale(.82); } 100% { transform: scale(1); } }
@media (max-width: 899px) { .mh-bin { bottom: auto; top: 92px; } }
.mhm.over-bin { scale: .5; opacity: .65; transition: scale .18s, opacity .18s; }
.mh-ghost { position: absolute; z-index: 5; display: none; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%; background: var(--c, #8a8a8f); border: 2.5px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .45); opacity: .85; pointer-events: none; }
.mh-ghost.on { display: block; }
.mh-ghost::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 1.5px dashed rgba(255, 255, 255, .95); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); animation: ghost-spin 5s linear infinite; }
@keyframes ghost-spin { to { transform: rotate(360deg); } }
.mh-ghost b, .mh-cross-l { position: absolute; left: 50%; transform: translateX(-50%); padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .95); color: #1d2421; font: 800 10.5px var(--font); white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.mh-ghost b { top: 36px; }
.mh-cross-l { top: 30px; }

/* Admin → Today */
.td-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .td-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.td-kpi { position: relative; display: grid; gap: 2px; padding: 14px 14px 12px; overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, var(--tk, var(--accent)) 12%, var(--surface)), var(--surface) 72%); border-color: color-mix(in srgb, var(--tk, var(--accent)) 22%, var(--line)); }
.td-kpi.live { --tk: var(--ok); } .td-kpi.lunch { --tk: var(--amber); } .td-kpi.off { --tk: var(--slate); } .td-kpi.alert { --tk: var(--red); } .td-kpi.sum { --tk: var(--blue); }
.td-kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.td-kpi .l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.td-ic { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: var(--tk); background: color-mix(in srgb, var(--tk) 14%, transparent); }
.td-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: td-live 1.8s ease-out infinite; }
@keyframes td-live { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.td-kpi .ring-stack { margin-top: 8px; }
.td-pulse { display: flex; gap: 3px; height: 10px; margin: 14px 0 0; border-radius: 6px; overflow: hidden; }
.td-pulse i { display: block; border-radius: 3px; min-width: 6px; transition: flex .5s var(--ease-out); }
.td-pulse .p-live { background: var(--ok); } .td-pulse .p-lunch { background: var(--amber); } .td-pulse .p-stopped { background: var(--line-2); } .td-pulse .p-off { background: color-mix(in srgb, var(--red) 28%, var(--surface-2)); }
.avatar.ring { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--rc, var(--line-2)); }
.ring-live { --rc: var(--ok); } .ring-lunch { --rc: var(--amber); } .ring-stopped, .ring-done { --rc: var(--line-2); } .ring-off { --rc: var(--line); filter: grayscale(.55); opacity: .88; }
@media (prefers-reduced-motion: no-preference) { .avatar.ring-live { animation: td-ring 2.2s ease-out infinite; } @keyframes td-ring { 0% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ok), 0 0 0 4px color-mix(in srgb, var(--ok) 55%, transparent); } 100% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ok), 0 0 0 11px transparent; } } }
.ring-stack { flex-direction: row; justify-content: flex-start; padding-left: 4px; } .ring-stack .avatar, .ring-stack .avatar:last-child { margin-left: -5px; } .ring-stack .avatar:first-child { margin-left: 0; }
.td-grp > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; min-height: 60px; flex-wrap: wrap; }
.td-grp > summary::-webkit-details-marker { display: none; }
.td-gt { display: inline-flex; align-items: baseline; gap: 8px; } .td-gt b { font-size: 16px; } .td-gt em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: 1px 9px; }
.td-gs { color: var(--muted); font-size: 13px; margin-left: auto; }
.td-grp .chev { transition: transform .25s var(--ease-out); color: var(--muted); } .td-grp[open] .chev { transform: rotate(90deg); }
.td-grp[open] > summary { border-bottom: 1px solid var(--line); }
.td-grp.g-not.late { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); } .td-grp.g-not.late .td-gt em { background: var(--red-soft); color: var(--red); }
.td-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; padding: 14px 16px 16px; }
.td-chip { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 12px; background: var(--surface-2); color: inherit; text-decoration: none; font-weight: 600; font-size: 13.5px; min-width: 0; }
.td-chip:hover { background: var(--hover); }
.who-row.k-live { background: linear-gradient(90deg, color-mix(in srgb, var(--ok) 7%, transparent), transparent 40%); }
.td-hrs { background: var(--surface-2); border-radius: 99px; padding: 1px 9px; font-weight: 700; }
.stack.late-first { display: flex; flex-direction: column; } .stack.late-first > .g-not { order: -1; }

/* Analysis: click a tile or chart for the full graph */
.av-open { cursor: pointer; transition: transform .15s var(--ease-out), box-shadow .15s, border-color .15s; }
.av-open:hover { transform: translateY(-2px); box-shadow: var(--lift-shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.av-open:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.av-k-more { position: absolute; top: 12px; right: 12px; color: var(--muted); opacity: 0; transition: opacity .15s; }
.av-kpi:hover .av-k-more, .av-kpi:focus-visible .av-k-more { opacity: 1; }
@media (hover: none) { .av-k-more { opacity: .55; } }
.av-expand { all: unset; cursor: pointer; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--muted); flex: none; }
.av-expand:hover { background: var(--hover); color: var(--ink); } .av-expand:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 1px; }
.section-head .av-expand { margin-left: 8px; }
.sheet.wide:has(.av-full) { max-width: 1040px; }
.av-full-top { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.av-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.av-stat { display: grid; gap: 1px; padding: 8px 14px; border-radius: 12px; background: var(--surface-2); min-width: 120px; }
.av-stat span { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.av-stat b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .av-stat em { font-style: normal; font-size: 12px; color: var(--muted); }
.av-full-chart { margin: 4px 0 8px; }
.av-h { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.av-ref { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 5 4; fill: none; }
.av-bl { display: grid; gap: 2px; }
.av-bl .av-mg-r { grid-template-columns: minmax(90px, 170px) minmax(0, 1fr) minmax(70px, auto); }
.av-bl .av-mg-b { height: 12px; background: var(--surface-2); border-radius: 6px; } .av-bl .av-mg-b i { border-radius: 6px; }
.av-refline { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .5; border-radius: 1px; z-index: 1; }
.av-donut-row.big .av-donut { width: 230px; height: 230px; } .av-donut-row.big .av-donut-c b { font-size: 30px; }
.av-mini { width: auto; flex: 1; min-width: 260px; }

/* Analysis → Work types */
.wt-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.wt-card { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 5px; padding: 14px; border-radius: var(--radius); background: linear-gradient(165deg, color-mix(in srgb, var(--fc) 9%, var(--surface)), var(--surface) 65%); border: 1px solid color-mix(in srgb, var(--fc) 22%, var(--line)); border-top: 4px solid var(--fc); transition: transform .15s var(--ease-out), box-shadow .15s; min-width: 0; }
.wt-card:hover { transform: translateY(-2px); box-shadow: var(--lift-shadow); } .wt-card:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.wt-top { display: flex; align-items: center; gap: 8px; min-width: 0; } .wt-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--fc); flex: none; } .wt-top b { font-size: 15px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wt-top em { font-style: normal; font-weight: 700; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: 1px 9px; }
.wt-hrs { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wt-sub { font-size: 12.5px; color: var(--muted); }
.wt-typ { font-size: 13.5px; margin-top: 4px; } .wt-typ b { font-size: 15px; }
.wt-rng { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--surface-2); margin-top: 2px; }
.wt-rb { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: color-mix(in srgb, var(--fc) 45%, transparent); }
.wt-rng em { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.wt-rl { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.wt-card .an-stack { width: 100%; margin-top: 4px; }
.wt-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; min-height: 26px; } .wt-foot .av-spark { max-width: 110px; }
.wt-acc { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.wt-acc.over { background: var(--red-soft); color: var(--red); } .wt-acc.under { background: var(--blue-soft); color: var(--blue); } .wt-acc.ok { background: var(--ok-soft); color: var(--ok); }
.wt-conf { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.wt-conf.solid { background: var(--ok-soft); color: var(--ok); } .wt-conf.fair { background: var(--blue-soft); color: var(--blue); } .wt-conf.small { background: var(--amber-soft); color: var(--amber); } .wt-conf.one { background: var(--red-soft); color: var(--red); }
.wt-dq { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: var(--ink); font-size: 14px; line-height: 1.4; } .wt-dq svg { color: var(--amber); margin-top: 2px; }
.wt-q { max-width: 380px; margin: 8px 0 12px; }
.wt-rules { margin-top: 4px; } .wt-rules > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--muted); padding: 6px 0; }
.wt-rule-list { display: grid; gap: 8px; } .wt-rule-list > div { display: grid; gap: 1px; }
.wt-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; } .wt-chip i { width: 12px; height: 12px; border-radius: 50%; background: var(--fc); }
.av-two .card .an-wrap { box-shadow: none; border: 1px solid var(--line); }

.wt-two { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .wt-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); } }
.wt-qt .an-table { font-size: 13px; } .wt-qt .an-table th, .wt-qt .an-table td { padding: 8px 9px; }
.wt-two .av-donut-row { gap: 16px; } .wt-two .av-leg { min-width: 170px; }

/* ---------------------------------------------------------------- Expenses & Finance */
.exp-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.exp-check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; line-height: 1.4; }
.exp-check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.exp-vehicle { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.pill.exp-st { gap: 4px; }
.pill.exp-sub { background: var(--blue-soft); color: var(--blue); }
.pill.exp-ok, .pill.exp-paid { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.exp-add { margin-top: 14px; }
.exp-list { overflow: hidden; }
.exp-group + .exp-group { border-top: 1px solid var(--line); }
.exp-gh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 14px 4px; font-size: 13.5px; }
.exp-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 14.5px; }
.exp-row[data-act] { cursor: pointer; } .exp-row[data-act]:hover { background: var(--surface-2); }
.exp-ic { width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-text); }
.exp-ic.mileage { background: var(--blue-soft); color: var(--blue); }
.exp-ic svg { width: 17px; height: 17px; }
.exp-rc { position: relative; width: 34px; height: 34px; flex: none; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); display: grid; place-items: center; background: var(--surface-2); }
.exp-rc img { width: 100%; height: 100%; object-fit: cover; } .exp-rc svg { width: 16px; height: 16px; }
.exp-rc i { position: absolute; right: 1px; bottom: 1px; font: 700 10px var(--font); font-style: normal; background: var(--ink); color: var(--surface); border-radius: 5px; padding: 0 3px; }
.exp-norc { width: 34px; height: 34px; flex: none; border-radius: 7px; border: 1.5px dashed color-mix(in srgb, var(--red) 50%, var(--line)); color: var(--red); display: grid; place-items: center; }
.exp-amt { min-width: 74px; text-align: right; font-variant-numeric: tabular-nums; }
.exp-foot { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.exp-submit { border-top: 1px solid var(--line); padding-top: 12px; }
.exp-prompt { margin-bottom: 12px; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.exp-cal { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.exp-dow, .exp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.exp-dow span { font-size: 11px; color: var(--muted); font-weight: 600; padding-bottom: 2px; }
.exp-day { height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font: 600 14px var(--font); color: var(--ink); cursor: pointer; padding: 0; }
.exp-day.we { color: var(--muted); background: var(--surface-2); }
.exp-day.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.exp-sum { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.exp-sum > div { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; } .exp-sum span { color: var(--muted); }
.exp-sum .tot { border-top: 1px solid var(--line); padding-top: 6px; font-size: 16px; } .exp-sum .tot span { color: var(--ink); font-weight: 600; }
.fin-notice { margin-top: 14px; border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.fin-notice.ok { display: flex; gap: 8px; align-items: center; border-color: var(--line); }
.fin-notice ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fin-notice li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; } .fin-notice li svg { flex: none; margin-top: 2px; color: var(--muted); }
.fin-tr { display: grid; grid-template-columns: minmax(0, 2.4fr) 1.3fr .7fr 1fr 1fr 176px; gap: 10px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.fin-tr > a { color: inherit; text-decoration: none; }
.fin-th { border-top: 0; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.fin-tr .n { text-align: right; font-variant-numeric: tabular-nums; }
.fin-tr.dim { opacity: .62; }
.fin-acts { justify-content: flex-end; flex-wrap: nowrap; min-width: 0; } /* room for Paid + Undo + download without running into the total */
@media (max-width: 760px) {
  .fin-th { display: none; }
  .fin-tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'who acts' 'st tot'; row-gap: 6px; }
  .fin-tr > a { grid-area: who; } .fin-tr > span:nth-child(2) { grid-area: st; } .fin-tr > span:nth-child(3), .fin-tr > span:nth-child(4) { display: none; }
  .fin-tr > span:nth-child(5) { grid-area: tot; } .fin-acts { grid-area: acts; }
}
@media (max-width: 340px) { .exp-2 { grid-template-columns: 1fr; } }
[data-kindbox] { display: grid; gap: 12px; } [data-kindbox][hidden] { display: none; }
.ts-actions + .exp-list, .ts-actions + .card.empty { margin-top: 14px; }

/* The fixed bars are always the top layer of the page (below only windows, menus and the full-screen map).
   Their own compositing layer stops iPhone Safari drawing them behind a page that is animating in. */
.bottomnav, .topbar { z-index: 80; isolation: isolate; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
.topbar { z-index: 70; }
@media (max-width: 899px) {
  /* on a phone the page fades in rather than sliding: a sliding page is a big moving layer that can end up over the bar */
  .in-view.nav-forward, .in-view.nav-back, .in-view.nav-tab { animation: vt-fade-in .26s ease-out both; }
  @keyframes vt-fade-in { from { opacity: 0; } }
}
/* Maps bring their own very high layers (their zoom buttons sit at 1000+). Sealing each map into its own stacking layer keeps all of that
   below the fixed bars: nothing inside a map can ever be drawn over the tab bar. */
.map-wrap:not(.full), .leaflet-container, .maplibregl-map, .mh-mapbox { isolation: isolate; }

/* Expenses: miles worked out from the odometer readings */
input.auto[readonly] { background: color-mix(in srgb, var(--accent) 8%, var(--surface-2)); font-weight: 800; color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 35%, var(--line-2)); cursor: default; }

/* Finance: Download and Settings sit side by side on a computer and stack on a phone, with buttons that wrap their words */
.fin-two { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .fin-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.fin-two .btn { white-space: normal; height: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; text-align: left; justify-content: flex-start; line-height: 1.25; }
.fin-two .btn span { min-width: 0; }

/* Person card on the team map (matches the project card; follows light and dark) */
.person-card .pc-doing { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 12%, var(--surface-2)); }
.person-card .pc-doing.idle { background: var(--surface-2); }
.person-card .pc-live { width: 10px; height: 10px; border-radius: 50%; background: #30b158; box-shadow: 0 0 0 0 rgba(48,177,88,.6); animation: pc-pulse 1.8s infinite; flex: none; }
@keyframes pc-pulse { 70% { box-shadow: 0 0 0 8px rgba(48,177,88,0); } 100% { box-shadow: 0 0 0 0 rgba(48,177,88,0); } }
@media (prefers-reduced-motion: reduce) { .person-card .pc-live { animation: none; } }
.person-card .mc-alt { margin-top: 12px; }

/* Person pins say how sure the location is: dashed ring = rough fix, faded = last known spot */
.mk-person.approx { border-style: dashed; box-shadow: 0 0 0 5px rgba(255,255,255,.28), 0 1px 4px rgba(0,0,0,.35); }
.mk-person.stale { opacity: .6; filter: grayscale(.5); }

/* Project picker when there are no projects yet */
.cp-empty { text-align: center; padding: 18px 8px 8px; display: grid; justify-items: center; gap: 6px; }
.cp-empty h3 { margin: 4px 0 0; }
.cp-empty p { margin: 0 0 8px; max-width: 360px; }
.cp-empty .btn { max-width: 360px; }

/* Finance: reviewing a claim, each line with its receipts beside it */
.fin-review { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.fin-filter { overflow-x: auto; max-width: 100%; } .fin-filter button { white-space: nowrap; }
.fin-count { margin-left: 6px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 16%, transparent); }
.fin-actbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 899px) { .fin-actbar { position: sticky; bottom: calc(64px + var(--safe-b)); z-index: 5; background: var(--surface); padding: 10px; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.14); } .fin-actbar .btn { flex: 1 1 auto; justify-content: center; } }
.fin-sec { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 14px 8px; }
.fin-line { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.fin-line.no-rc { background: color-mix(in srgb, var(--red) 6%, transparent); }
.fin-ref { flex: none; min-width: 34px; text-align: center; font: 700 12px var(--font); padding: 3px 6px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-text); }
.fin-num { flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-rcs { display: flex; gap: 6px; flex: none; }
.fin-rc { position: relative; width: 64px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; display: grid; place-items: center; color: var(--muted); }
.fin-rc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fin-rc i { position: absolute; left: 3px; bottom: 3px; font: 700 10px var(--font); font-style: normal; color: #fff; background: rgba(0,0,0,.6); padding: 1px 4px; border-radius: 5px; }
@media (min-width: 900px) { .fin-rc { width: 96px; height: 96px; } }
.fin-norc { flex: none; font-size: 12px; font-weight: 600; color: var(--red); padding: 4px 8px; border-radius: 8px; background: color-mix(in srgb, var(--red) 10%, transparent); white-space: nowrap; }
.fin-norc.ok { color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }
@media (max-width: 560px) { .fin-line { flex-wrap: wrap; } .fin-line > .grow { flex-basis: calc(100% - 50px); } .fin-line .fin-rcs, .fin-line .fin-norc { margin-left: 44px; } .fin-line > .fin-num:last-of-type { margin-left: auto; } }

/* Company settings: People and roles */
.co-people-card { margin-bottom: 16px; }
.co-people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
@media (min-width: 900px) { .co-people:not(.one) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; } }
.co-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 0; background: none; color: inherit; text-decoration: none; text-align: left; font: inherit; cursor: pointer; width: 100%; min-height: 52px; }
.co-person:hover { background: var(--hover); } .co-person:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.role-tag { flex: none; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); white-space: nowrap; }
.role-tag.r-owner { background: var(--accent); color: var(--accent-ink, #fff); }
.role-tag.r-admin { background: color-mix(in srgb, #2563eb 14%, transparent); color: #2b5fd0; }
.role-tag.r-accounts { background: color-mix(in srgb, #c2660e 16%, transparent); color: #a2560c; }
.role-tag.r-manager { background: color-mix(in srgb, #7c3aed 14%, transparent); color: #6d32d6; }
:root[data-theme="dark"] .role-tag.r-manager { color: #c4a6ff; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .role-tag.r-manager { color: #c4a6ff; } }
:root[data-theme="dark"] .role-tag.r-admin { color: #8fb3ff; } :root[data-theme="dark"] .role-tag.r-accounts { color: #f2b06a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .role-tag.r-admin { color: #8fb3ff; } :root:not([data-theme="light"]) .role-tag.r-accounts { color: #f2b06a; } }
.co-roles { display: grid; gap: 8px; }
.co-role { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.co-role.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.co-dot { flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-2); }
.co-role.on .co-dot { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.co-own { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }

/* edit requests, manager dashboard */
.req-card{display:block}.req-note{margin:8px 0 0;padding:8px 10px;border-left:3px solid var(--line,#d9d9d4);background:var(--bg-soft,rgba(128,128,128,.07));border-radius:6px;display:flex;gap:8px;align-items:flex-start;font-size:.92rem;overflow-wrap:anywhere}.req-note svg{flex:none;margin-top:2px;opacity:.7}.req-note.reply{border-left-color:var(--ok,#18693f)}
.diff{display:grid;gap:6px;margin:8px 0 2px}.dbar{display:grid;grid-template-columns:34px minmax(0,1fr) 92px;gap:8px;align-items:center;font-size:.82rem}.dbar span{color:var(--muted,#777)}.dbar b{font-weight:600;text-align:right}.dtrack{position:relative;height:16px;border-radius:5px;background:var(--surface-2,rgba(128,128,128,.14))}.dtrack i{position:absolute;top:0;bottom:0;border-radius:5px}.dtrack i.was{opacity:.55}.dtrack i.now{outline:2px solid currentColor;outline-offset:-2px;color:color-mix(in srgb,var(--ink) 45%,transparent)}
.dticks{display:grid;grid-template-columns:34px minmax(0,1fr) 92px;gap:8px;font-size:.7rem;color:var(--muted,#777)}.dticks>div{position:relative;height:12px}.dticks>div span{position:absolute;transform:translateX(-50%)}
.pill.warn{background:var(--amber-soft);color:var(--amber)}.pill.ok{background:var(--ok-soft);color:var(--ok)}.pill.bad{background:var(--red-soft);color:var(--red)}.pill.muted{background:rgba(128,128,128,.15);color:var(--muted,#777)}
.logdot{width:9px;height:9px;border-radius:50%;background:#999;margin-top:6px;flex:none}.logdot.approved,.logdot.day-approved{background:#2e9e5b}.logdot.declined,.logdot.deleted{background:#d2483f}.logdot.requested{background:#e0a100}.logdot.reverted,.logdot.day-unapproved{background:#8a8a8a}.logdot.edited,.logdot.added{background:#2f7de1}
.ot-amt{color:var(--amber);font-variant-numeric:tabular-nums}

/* driving: one teal, tuned for both themes so the button reads clearly on light and dark backgrounds */
:root{--drive:#0b7d70;--drive-bg:#d3f1ec;--drive-line:#7ccfc3;--drive-ink:#065a50;--drive-solid:#0b7d70}
:root[data-theme="dark"]{--drive:#4fd8c6;--drive-bg:rgba(45,212,191,.16);--drive-line:rgba(79,216,198,.5);--drive-ink:#7fe9db;--drive-solid:#0f9a89}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--drive:#4fd8c6;--drive-bg:rgba(45,212,191,.16);--drive-line:rgba(79,216,198,.5);--drive-ink:#7fe9db;--drive-solid:#0f9a89}}
.btn.drive{background:var(--drive-bg);color:var(--drive-ink);border-color:var(--drive-line);font-weight:600}.btn.drive svg{color:var(--drive)}
.btn.drive:hover{border-color:var(--drive)}
.btn.drive.primary,button.btn.primary.drive{background:var(--drive-solid);color:#fff;border-color:var(--drive-solid)}.btn.drive.primary svg{color:#fff}
.miles-pill{font-size:.72rem;font-weight:600;padding:2px 7px;border-radius:99px;background:var(--drive-bg);color:var(--drive-ink);white-space:nowrap}
.timer-card .quick{flex-wrap:wrap}
.choose-btn.drive-tile{background:var(--drive-bg);color:var(--drive-ink);border-color:var(--drive-line)}.choose-btn.drive-tile svg{color:var(--drive)}.choose-btn.drive-tile .muted{color:var(--drive-ink);opacity:.8}

/* overtime, still working, missed finish */
.ot-ask{position:fixed;inset:0;z-index:9000;background:rgba(15,20,18,.62);display:flex;align-items:center;justify-content:center;padding:16px;backdrop-filter:blur(3px)}
.ot-card{background:var(--surface);color:var(--ink,#1b1b19);border-radius:18px;max-width:420px;width:100%;padding:22px;display:grid;gap:10px;text-align:center;box-shadow:0 20px 60px rgba(0,0,0,.35)}
.ot-card h2{margin:0;font-size:1.5rem}.ot-card p{margin:0}.ot-ico{width:56px;height:56px;border-radius:50%;background:var(--amber-soft);color:var(--amber);display:grid;place-items:center;margin:0 auto}
.ot-yes{background:#f08c00;border-color:#f08c00;color:#fff}
.ot-pill{font-size:.72rem;font-weight:600;padding:2px 7px;border-radius:99px;background:var(--amber-soft);color:var(--amber);white-space:nowrap}
.miss-card{border-left:4px solid #f08c00}

/* Basecamp-style projects: tool cards, to-do lists, templates, drop zones */
.bc-tools{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;margin-bottom:16px}
.bc-tool{display:grid;gap:2px;padding:12px;border-radius:14px;background:var(--surface);border:1px solid var(--line,#e6e6e1);color:inherit;text-decoration:none;min-width:0}
.bc-tool:hover{border-color:var(--accent,#18693f)}.bc-tool-ico{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--accent-soft,#e6f2ea);color:var(--accent-text,#18693f);margin-bottom:4px}
.bc-list{background:var(--surface);border:1px solid var(--line,#e6e6e1);border-radius:14px;padding:14px 14px 10px;margin-top:12px}
.bc-list-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.bc-list-head h3{margin:0;font-size:1.05rem}
.bc-list .progress{margin:8px 0 4px}.bc-items .task{border-left:0;border-right:0}.bc-more{background:none;border:0;color:var(--accent-text,#18693f);font-weight:600;padding:8px 2px;cursor:pointer}
.bc-add{display:flex;align-items:center;gap:8px;margin-top:6px}.bc-add .input{flex:1;min-width:0}.bc-add .check{opacity:.35;pointer-events:none}
.tpl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}.tpl-card{display:flex;flex-direction:column;gap:8px;min-width:0}.tpl-desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.tpl-lists{display:grid;gap:3px}
.dropz{border:2px dashed var(--line-2,#cfcfc8);border-radius:14px;padding:18px;display:grid;gap:6px;justify-items:center;text-align:center}.dropz.over{border-color:var(--accent,#18693f);background:var(--accent-soft,#e6f2ea)}.dz-ico{color:var(--accent-text,#18693f)}

/* money summary */
.money-table{overflow-x:auto}.money-table table{width:100%;border-collapse:collapse;font-size:.88rem;min-width:720px}.money-table th{text-align:left;font-size:.75rem;color:var(--muted,#777);font-weight:600;padding:10px 12px;border-bottom:1px solid var(--line,#e6e6e1)}.money-table td{padding:10px 12px;border-bottom:1px solid var(--line,#eee);vertical-align:top}.money-table td.num,.money-table th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.neg{color:var(--red)}.pos{color:var(--ok)}
.mtrend{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;align-items:end;height:170px}.mt-col{display:grid;gap:4px;justify-items:center;font-size:.75rem;height:100%;grid-template-rows:1fr auto auto}.mt-bar{position:relative;width:60%;max-width:46px;height:100%;display:flex;align-items:flex-end;gap:3px}.mt-bar i{flex:1;background:var(--accent,#18693f);border-radius:5px 5px 0 0;min-height:2px}.mt-bar i.ot{background:#f08c00}.mt-col span{color:var(--muted,#777)}

/* team filter above the team map */
.map-teams { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; } .map-teams::-webkit-scrollbar { display: none; }
.map-team { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 13.5px var(--font); cursor: pointer; }
.map-team i { width: 10px; height: 10px; border-radius: 50%; background: var(--tc); flex: none; }
.map-team .n { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.map-team.on { background: var(--ink); color: var(--surface); border-color: var(--ink); } .map-team.on .n { color: inherit; opacity: .7; }
.map-team.on i { box-shadow: 0 0 0 2px var(--surface); }

/* holiday mode */
.hol-btn{flex:none;margin-top:4px}.hol-btn svg{color:#0284c7}
.hol-card{text-align:center;padding:26px 18px;background:linear-gradient(180deg,color-mix(in srgb,#0ea5e9 14%,var(--surface)) 0%,var(--surface) 70%)}
.hol-card h2{margin:6px 0 0}.hol-ico,.hol-sheet-ico{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;margin:0 auto;background:color-mix(in srgb,#0ea5e9 18%,transparent);color:#0284c7}
.hol-sheet-ico{width:56px;height:56px}
.avatar{position:relative}.avatar .hol-dot{position:absolute;right:-4px;bottom:-4px;width:46%;height:46%;min-width:15px;min-height:15px;max-width:24px;max-height:24px;border-radius:50%;background:#e0f2fe;color:#0369a1;display:grid;place-items:center;box-shadow:0 0 0 2px var(--surface)}
.avatar .hol-dot svg{width:72%;height:72%}
.pill.hol-pill,.hol-inline{display:inline-flex;align-items:center;gap:4px}.pill.hol-pill{background:color-mix(in srgb,#0ea5e9 18%,transparent);color:#0369a1}.hol-inline{color:#0369a1;font-weight:600}
:root[data-theme="dark"] .avatar .hol-dot{background:#0c3550;color:#7dd3fc}:root[data-theme="dark"] .pill.hol-pill,:root[data-theme="dark"] .hol-inline{color:#7dd3fc}:root[data-theme="dark"] .hol-ico,:root[data-theme="dark"] .hol-sheet-ico{color:#7dd3fc}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .avatar .hol-dot{background:#0c3550;color:#7dd3fc}:root:not([data-theme="light"]) .pill.hol-pill,:root:not([data-theme="light"]) .hol-inline{color:#7dd3fc}:root:not([data-theme="light"]) .hol-ico,:root:not([data-theme="light"]) .hol-sheet-ico{color:#7dd3fc}}

/* Manager dashboard */
.pm-hero{display:flex;gap:16px;align-items:center;margin-bottom:14px}.pm-hero h1{margin:2px 0}.pm-hero .sub{color:var(--muted);font-size:14px}
.pm-hero-ico{width:60px;height:60px;flex:none;border-radius:18px;display:grid;place-items:center;background:linear-gradient(135deg,#f6b73c,#e8890c);color:#3b2300;box-shadow:0 8px 22px rgba(232,137,12,.28)}
.pm-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.pm-kpi{display:grid;gap:2px;padding:14px;border-radius:16px;background:var(--surface);border:1px solid var(--line);color:inherit;text-decoration:none;box-shadow:var(--card-shadow);min-width:0}
.pm-kpi b{font-size:28px;line-height:1.1;font-variant-numeric:tabular-nums}.pm-kpi span:last-child{font-size:13px;color:var(--muted)}
.pm-kpi-ico{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:var(--surface-2);color:var(--muted);margin-bottom:6px}.pm-kpi-ico svg{width:17px;height:17px}
.pm-kpi.hot{border-color:color-mix(in srgb,var(--red) 40%,var(--line))}.pm-kpi.hot .pm-kpi-ico{background:var(--red-soft);color:var(--red)}.pm-kpi.hot b{color:var(--red)}
.pm-kpi.warm .pm-kpi-ico{background:var(--amber-soft);color:var(--amber)}.pm-kpi.warm b{color:var(--amber)}
.pm-kpi.live .pm-kpi-ico{background:var(--ok-soft);color:var(--ok)}
.pm-kpi:hover{border-color:var(--accent)}
.pm-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:14px;align-items:start}
.pm-sec{padding:14px 16px}.pm-sec-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.pm-sec-h h2{display:flex;align-items:center;gap:8px;margin:0;font-size:17px}.pm-sec-h h2 svg{color:var(--muted)}
.pm-list{display:grid}.pm-list>*+*{border-top:1px solid var(--line)}
.pm-req{display:grid;gap:8px;padding:10px 0}.pm-req-acts{display:flex;gap:6px;flex-wrap:wrap;padding-left:38px}
.pm-run{display:flex;align-items:center;gap:10px;padding:9px 0;color:inherit;text-decoration:none}.pm-run .cdot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;vertical-align:1px}
.pm-job{display:grid;gap:6px;padding:10px 0;color:inherit;text-decoration:none}
.pm-bar{height:7px;border-radius:9px;background:var(--surface-2);overflow:hidden}.pm-bar i{display:block;height:100%;border-radius:9px;background:var(--accent)}.pm-bar i.close{background:var(--amber)}.pm-bar i.over{background:var(--red)}
.pm-empty{display:flex;align-items:center;gap:8px;padding:12px;border-radius:12px;background:var(--surface-2);color:var(--muted);font-size:14px}.pm-empty svg{color:var(--ok)}
.pm-more{font-size:13px;font-weight:600;color:var(--accent-text);text-decoration:none;white-space:nowrap}.pm-list+.pm-more{display:inline-block;margin-top:8px}
.pm-idle{margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.pm-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 9px 4px 4px;border-radius:99px;background:var(--surface-2);color:inherit;text-decoration:none;font-size:13px}
.pm-h{margin:22px 0 10px;font-size:17px}
.pm-tools{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.pm-tool{display:grid;gap:2px;padding:14px;border-radius:14px;background:var(--surface);border:1px solid var(--line);color:inherit;text-decoration:none}.pm-tool:hover{border-color:var(--accent)}
.pm-tool-ico{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent-text);margin-bottom:6px}
@media (max-width:900px){.pm-grid{grid-template-columns:minmax(0,1fr)}.pm-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:480px){.pm-hero-ico{width:48px;height:48px;border-radius:14px}.pm-kpi b{font-size:24px}.pm-req-acts{padding-left:0}}
.pm-ot{display:flex;align-items:center;gap:10px;padding:9px 0}.pm-ot .ot-amt{color:var(--amber);font-variant-numeric:tabular-nums}
@media (max-width:480px){.pm-ot .btn.primary span{display:none}}
.pm-grid>*,.pm-sec{min-width:0}.pm-run>.grow{overflow:hidden}
@media (max-width:600px){.pm-hint{display:none}}
.pm-list>*,.stack>*{min-width:0}
.hol-strip{display:flex;flex-wrap:wrap;gap:8px;margin:-4px 0 14px}
.hol-chip{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:99px;border:1px solid color-mix(in srgb,#0ea5e9 35%,var(--line));background:color-mix(in srgb,#0ea5e9 10%,var(--surface));color:var(--ink);font:inherit;font-size:13px;cursor:pointer}
.hol-chip svg{color:#0284c7}.hol-chip b{font-weight:600;color:#0369a1}.hol-chip.pending b{color:var(--amber)}
.hol-sum{display:flex;gap:14px;align-items:center}.hol-sum .hol-sheet-ico{margin:0}
:root[data-theme="dark"] .hol-chip b{color:#7dd3fc}:root[data-theme="dark"] .hol-chip.pending b{color:var(--amber)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .hol-chip b{color:#7dd3fc}:root:not([data-theme="light"]) .hol-chip.pending b{color:var(--amber)}}
/* Manager dashboard: rings, approvals inbox, holidays calendar, week grid */
.pm-rings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:14px}
.pm-ring{display:flex;gap:16px;align-items:center;padding:16px}
.pm-ring-txt{min-width:0;flex:1}.pm-ring-txt h3{margin:0 0 6px;font-size:16px}
.pmdn{position:relative;width:112px;height:112px;flex:none}.pmdn.big{width:124px;height:124px}
.pmdn>svg{width:100%;height:100%;transform:rotate(-90deg)}
.dn-track{fill:none;stroke:var(--surface-2);stroke-width:13}
.dn-seg{fill:none;stroke-width:13;stroke-linecap:butt;stroke-dasharray:0 999;stroke-dashoffset:var(--off);animation:dn-in .9s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i) * 90ms)}
@keyframes dn-in{from{stroke-dasharray:0 999}to{stroke-dasharray:var(--len) 999}}
.dn-seg{stroke-dasharray:var(--len) 999}
.dn-mid{position:absolute;inset:0;display:grid;place-content:center;text-align:center;line-height:1.05}
.dn-mid b{font-size:27px;font-variant-numeric:tabular-nums}.dn-mid b small{font-size:15px;color:var(--muted);font-weight:600}.dn-mid span{font-size:11.5px;color:var(--muted);margin-top:2px}
.pm-ring.clear .dn-mid b{color:var(--ok)}
.dn-legend{display:grid;gap:3px}.dn-legend a{display:flex;align-items:center;gap:8px;font-size:13px;color:inherit;text-decoration:none;padding:3px 6px;margin:0 -6px;border-radius:7px}
.dn-legend a[href]:hover{background:var(--surface-2)}.dn-legend i{width:9px;height:9px;border-radius:3px;flex:none}.dn-legend span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dn-legend b{font-variant-numeric:tabular-nums}
.dn-legend a.zero{color:var(--muted)}.dn-legend a.zero b{font-weight:500}
.pm-inbox .pm-sec-h{flex-wrap:wrap}
.seg.sm button{padding:5px 10px;font-size:12.5px}.seg.sm button b{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;margin-left:3px;border-radius:9px;background:var(--red);color:#fff;font-size:11px}
.pm-inrow{display:flex;align-items:center;gap:10px;padding:11px 0;transition:opacity .3s,transform .35s,max-height .4s .1s,padding .4s .1s;max-height:160px;position:relative}
.pm-kind{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;flex:none}.pm-kind svg{width:14px;height:14px}
.k-edit{background:var(--red-soft);color:var(--red)}.k-ot{background:var(--amber-soft);color:var(--amber)}.k-leave{background:color-mix(in srgb,#0ea5e9 16%,transparent);color:#0284c7}
.pm-inacts{display:flex;gap:6px;flex:none}
.pm-inrow.done,.pm-req.done,.pm-ot.done{opacity:0;transform:translateX(30px);max-height:0;padding-top:0;padding-bottom:0;overflow:hidden}
.pm-inrow.done::after{content:"";position:absolute;inset:0}
.pm-ok{transition:transform .15s}.pm-ok:active{transform:scale(.94)}
.pm-allclear{display:grid;justify-items:center;text-align:center;gap:6px;padding:26px 10px}.pm-allclear svg{color:var(--ok);background:var(--ok-soft);border-radius:50%;padding:10px;width:52px;height:52px}
.lcal{overflow-x:auto}.lcal-row{display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:8px;min-width:420px}.lcal-row+.lcal-row{margin-top:4px}
.lcal-days{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:2px}
.lcal-head .lcal-days span{font-size:10.5px;color:var(--muted);text-align:center}.lcal-head .we{opacity:.55}
.lcal-days i{height:20px;border-radius:4px;background:var(--surface-2)}.lcal-days i.we{opacity:.5}.lcal-days i.mon{box-shadow:inset 2px 0 0 var(--line)}
.lcal-days i.off{background:#0ea5e9;opacity:1}.lcal-days i.pend{background:repeating-linear-gradient(45deg,color-mix(in srgb,#0ea5e9 55%,transparent) 0 4px,color-mix(in srgb,#0ea5e9 22%,transparent) 4px 8px);opacity:1}
.lcal-who{display:flex;align-items:center;gap:6px;color:inherit;text-decoration:none;font-size:13px;min-width:0}
.lcal-key{display:flex;gap:14px;margin-top:10px}.lcal-key span{display:inline-flex;align-items:center;gap:5px}.lcal-key i{width:14px;height:10px;border-radius:3px;display:inline-block}
.wg{overflow-x:auto}.wg-r{display:grid;grid-template-columns:minmax(120px,1.6fr) repeat(7,minmax(38px,1fr)) 58px;gap:4px;align-items:center;min-width:520px}.wg-r+.wg-r{margin-top:4px}
.wg-h span{font-size:11.5px;color:var(--muted);text-align:center;display:grid}.wg-h span small{font-size:13px;color:var(--ink);font-weight:600}.wg-h span.today small{color:var(--accent-text)}
.wg-r>b{text-align:right}
.wg-who{display:flex;align-items:center;gap:7px;color:inherit;text-decoration:none;font-size:13.5px;min-width:0}
.wg-c{height:34px;border-radius:8px;display:grid;place-items:center;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;text-decoration:none;color:var(--ink);background:var(--surface-2)}
.wg-c.we{opacity:.6}.wg-c.today{outline:2px solid var(--accent);outline-offset:-2px}
.wg-c.l1{background:color-mix(in srgb,var(--ok) 22%,var(--surface))}.wg-c.l2{background:color-mix(in srgb,var(--ok) 38%,var(--surface))}.wg-c.l3{background:color-mix(in srgb,var(--ok) 58%,var(--surface));color:#fff}.wg-c.l4{background:var(--ok);color:#fff}
.wg-c.off{background:color-mix(in srgb,#0ea5e9 20%,var(--surface));color:#0284c7}.wg-c.miss{background:var(--red-soft);color:var(--red)}
.wg-key{display:flex;flex-wrap:wrap;gap:14px;margin-top:10px}.wg-key span{display:inline-flex;align-items:center;gap:5px}.wg-key i{width:14px;height:12px;border-radius:3px;display:inline-grid;place-items:center;font-style:normal;font-size:9px;font-weight:700}
.wg-key i.l1{background:color-mix(in srgb,var(--ok) 22%,var(--surface))}.wg-key i.l3{background:color-mix(in srgb,var(--ok) 58%,var(--surface))}.wg-key i.l4{background:var(--ok)}.wg-key i.miss{background:var(--red-soft);color:var(--red)}
@media (max-width:1100px){.pm-rings{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.pm-rings>:first-child{grid-column:1/-1}}
@media (max-width:640px){.pm-rings{grid-template-columns:minmax(0,1fr)}.pm-ring{padding:14px}.pmdn{width:96px;height:96px}.pmdn.big{width:108px;height:108px}.dn-mid b{font-size:23px}
  .pm-inrow{flex-wrap:wrap}.pm-inrow>.grow{flex:1 1 calc(100% - 80px)}.pm-inacts{width:100%;justify-content:flex-end}}
.lcal-key i.off{background:#0ea5e9}.lcal-key i.pend{background:repeating-linear-gradient(45deg,color-mix(in srgb,#0ea5e9 55%,transparent) 0 4px,color-mix(in srgb,#0ea5e9 22%,transparent) 4px 8px)}
.pm-inrow>.btn:last-child{margin-left:auto}
.hol-hero{display:flex;gap:16px;align-items:center;padding:22px;border-radius:20px;background:linear-gradient(135deg,color-mix(in srgb,#0ea5e9 18%,var(--surface)),var(--surface));border:1px solid color-mix(in srgb,#0ea5e9 25%,var(--line))}
.hol-hero h1{margin:0}.hol-hero-ico{width:68px;height:68px;flex:none;border-radius:20px;display:grid;place-items:center;background:linear-gradient(135deg,#38bdf8,#0284c7);color:#fff;box-shadow:0 8px 22px rgba(2,132,199,.3)}
.hol-more .hol-hero-ico{width:46px;height:46px;border-radius:14px}
.hol-actions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.hol-actions .btn.lg{flex:1 1 200px;justify-content:center;min-height:52px;font-size:16px}
.hol-book.primary{background:#0284c7;border-color:#0284c7}.hol-book.primary:hover{background:#0369a1}
.hol-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.hol-stats .card{padding:14px;display:grid;gap:2px}.hol-stats b{font-size:26px;font-variant-numeric:tabular-nums}.hol-stats span{font-size:12.5px;color:var(--muted)}
.hol-list{display:grid}.hol-row{display:flex;align-items:center;gap:12px;padding:12px 14px;border:0;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer;width:100%}.hol-row+.hol-row{border-top:1px solid var(--line)}.hol-row:hover{background:var(--hover)}
.hol-cal{width:44px;flex:none;border-radius:10px;overflow:hidden;text-align:center;border:1px solid color-mix(in srgb,#0ea5e9 35%,var(--line));display:grid}.hol-cal b{font-size:18px;padding-top:3px}.hol-cal span{font-size:10.5px;text-transform:uppercase;letter-spacing:.04em;background:#0ea5e9;color:#fff;padding:1px 0;order:-1}
.hol-more{display:flex;align-items:center;gap:14px;padding:14px;margin-bottom:14px;color:inherit;text-decoration:none;border:1px solid color-mix(in srgb,#0ea5e9 30%,var(--line));background:linear-gradient(135deg,color-mix(in srgb,#0ea5e9 12%,var(--surface)),var(--surface))}
.hol-more .btn.primary{background:#0284c7;border-color:#0284c7}
.hol-h{font-size:17px;margin:22px 0 10px}
.hol-book.primary,.hol-more .btn.primary{color:#fff}
.pj-rings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:4px 0 12px}.pj-ring{display:grid;justify-items:center}
.pmdn.sm{width:92px;height:92px}.pmdn.sm .dn-mid b{font-size:20px}.pmdn.sm .dn-mid b small{font-size:12px}.pmdn.sm .dn-mid span{font-size:10.5px}.pmdn.sm .dn-track,.pmdn.sm .dn-seg{stroke-width:11}
.mh-cards{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.mh-card2{display:grid;gap:10px;text-decoration:none;color:inherit;padding:14px;transition:border-color .15s,transform .15s}.mh-card2:hover{border-color:var(--accent);transform:translateY(-1px)}
.mh-card2-top{display:flex;gap:12px;align-items:center}.mh-art{width:56px;height:56px;flex:none;border-radius:14px;box-shadow:0 4px 12px rgba(0,0,0,.18)}
.mh-pct{display:grid;text-align:center;line-height:1.05;flex:none}.mh-pct b{font-size:20px;font-variant-numeric:tabular-nums}.mh-pct span{font-size:11px;color:var(--muted)}.mh-pct.all b{color:var(--ok)}
.mh-bar{display:flex;height:8px;border-radius:9px;overflow:hidden;background:var(--surface-2);gap:2px}.mh-bar i{display:block;min-width:0}.mh-bar i.c{background:#30a46c}.mh-bar i.p{background:#f59f00}.mh-bar i.t{background:var(--surface-2)}
.mh-stats{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12.5px;color:var(--muted);align-items:center}.mh-stats b{color:var(--ink)}.mh-stats i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px}.mh-stats .c i{background:#30a46c}.mh-stats .p i{background:#f59f00}
.mh-stats span{display:inline-flex;align-items:center;gap:3px}.mh-stats .go{margin-left:auto;color:var(--accent-text);font-weight:600}
/* Project home, Basecamp style */
.pj-meta{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;margin-top:8px}.pj-meta>span{display:inline-flex;align-items:center;gap:6px}.pj-sub{width:100%;font-size:15px;color:var(--ink-2,var(--muted))}
.pj-toolhead{display:flex;align-items:center;gap:12px;margin:2px 0 4px}.pj-toolhead h1{margin:0}.pj-toolhead-ico{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent-text)}
.bc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 14px;margin-bottom:18px}
.bc-card{display:flex;flex-direction:column;min-width:0}
.bc-card-h{display:flex;align-items:center;gap:8px;padding:0 4px 6px;color:inherit;text-decoration:none}.bc-card-h h2{margin:0;font-size:17px;flex:1;min-width:0}.bc-card-h>svg{color:var(--muted)}
.bc-tasks .bc-card-h h2{color:#d97757}.bc-chat .bc-card-h h2{color:#3b82f6}.bc-photos .bc-card-h h2{color:#a855f7}.bc-maps .bc-card-h h2{color:#16a34a}.bc-timeline .bc-card-h h2{color:#d4a017}.bc-mileage .bc-card-h h2{color:#12a594}
.bc-card-b{flex:1;display:block;min-height:150px;max-height:220px;overflow:hidden;padding:12px 14px;border-radius:16px;background:var(--surface);border:1px solid var(--line);color:inherit;text-decoration:none;box-shadow:var(--card-shadow);position:relative;transition:border-color .15s,transform .15s}
a.bc-card-b:hover{border-color:var(--accent);transform:translateY(-1px)}
a.bc-card-b::after{content:"";position:absolute;left:0;right:0;bottom:0;height:28px;background:linear-gradient(transparent,var(--surface));pointer-events:none}
.bcp-empty{color:var(--muted);font-size:13.5px;display:grid;place-items:center;min-height:120px;text-align:center}
.bcp-list+.bcp-list{margin-top:10px}.bcp-lh{display:flex;align-items:center;gap:7px;font-size:14px;margin-bottom:4px;min-width:0}.bcp-lh b{flex:1;min-width:0}
.pie{width:14px;height:14px;border-radius:50%;flex:none;background:conic-gradient(var(--ok) calc(var(--p) * 1%),var(--surface-2) 0)}
.bcp-item{display:flex;align-items:center;gap:7px;font-size:13px;padding:2px 0 2px 2px;min-width:0}.bcp-item .sq{width:12px;height:12px;border:1.5px solid var(--muted);border-radius:3px;flex:none}
.bcp-head{font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:5px 0 1px}
.bcp-msg{display:flex;gap:8px;align-items:flex-start}.bcp-clamp{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.bcp-thumbs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.bcp-thumbs img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;display:block}
.bcp-map{display:flex;gap:10px;align-items:center;font-size:13.5px}.bcp-map+.bcp-map{margin-top:8px}.bcp-map .mh-art{width:40px;height:40px;border-radius:10px}
.bcp-day{display:flex;align-items:center;gap:8px;padding:5px 0}.bcp-day+.bcp-day{border-top:1px solid var(--line)}.bcp-day>span{flex:1}
.bcp-big{display:grid;gap:4px;place-items:center;min-height:120px;text-align:center}.bcp-big b{font-size:30px}
@media (max-width:1000px){.bc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.bc-grid{gap:12px 10px}.bc-card-b{min-height:130px;max-height:190px;padding:10px 11px}.bc-card-h h2{font-size:15.5px}}
.bc-heading{display:flex;align-items:center;gap:6px;padding:12px 4px 4px;margin-top:4px;border-bottom:1px solid var(--line)}.bc-heading b{font-size:13px;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-2,var(--muted))}
.bc-heading .btn.icon{width:28px;height:28px;min-height:0;padding:0}
.bc-heading+.trow{margin-top:2px}
.check.sq{border-radius:5px}
.trow.done .task-main .t{color:var(--muted)}
.bc-add{flex-wrap:wrap}
@media (max-width:560px){.bc-add>.check{display:none}.bc-add .input{flex:1 1 140px}}
/* "No colour" projects: a clear light-grey edge so they stand out on dark backgrounds */
.cp-opt.none span{border:1.5px solid #c7c7cc;border-style:solid}
:root[data-theme="dark"] .projcard:not(.pfill),:root[data-theme="dark"] .cp-tile.none,:root[data-theme="dark"] .proj-pick:not(.pfill){border-color:#5a5a5f}
:root[data-theme="dark"] .cp-opt.none span{border-color:#8e8e93;color:#d1d1d6}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .projcard:not(.pfill),:root:not([data-theme="light"]) .cp-tile.none,:root:not([data-theme="light"]) .proj-pick:not(.pfill){border-color:#5a5a5f}:root:not([data-theme="light"]) .cp-opt.none span{border-color:#8e8e93;color:#d1d1d6}}
.bc-addbtn{display:inline-flex;align-items:center;gap:6px;margin:8px 0 2px;padding:6px 10px 6px 6px;border:0;background:none;border-radius:8px;color:var(--muted);font:inherit;font-size:13.5px;font-weight:600;cursor:pointer}.bc-addbtn:hover{background:var(--surface-2);color:var(--accent-text)}
.bc-add[hidden],.bc-addbtn[hidden]{display:none}
.geo-block{display:grid;gap:10px;padding:12px;border-radius:14px;border:1px solid var(--line);background:var(--surface-2)}
.geo-row{display:flex;align-items:center;gap:12px;cursor:pointer}
.geo-pick{display:grid;gap:8px}.geo-pick[hidden]{display:none}
.geo-map{height:240px;border-radius:12px;overflow:hidden;background:#1c3a2a}
.geo-ctrl{display:flex;align-items:center;gap:8px}.geo-ctrl input[type=range]{flex:1;accent-color:#22c55e}.geo-ctrl b{min-width:62px;text-align:right}
.side-acct{border-top:1px solid var(--line);padding-top:8px;margin-top:8px}
.side-me{margin-top:4px;font-weight:600}
@media (min-width: 900px){.topbar .top-me{display:grid !important;margin-left:6px}}
.cal-tabs{display:flex;align-items:center;gap:8px;overflow-x:auto;padding:2px 0 10px;scrollbar-width:none}.cal-tabs::-webkit-scrollbar{display:none}
.cal-tab{display:inline-flex;align-items:center;gap:8px;flex:none;padding:9px 16px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-weight:600;font-size:15px;cursor:pointer}
.cal-tab i{width:10px;height:10px;border-radius:50%;background:var(--c)}.cal-tab.on{background:color-mix(in srgb,var(--c) 16%,var(--surface));border-color:var(--c);box-shadow:inset 0 0 0 1px var(--c)}
.cal-def{color:#d29b0a;display:inline-grid}.cal-def svg{fill:currentColor}
.cal-add{border-radius:99px;gap:6px}
.cal-link{display:flex;align-items:center;gap:6px;width:100%;color:var(--muted);padding-left:44px}.cal-link select{flex:1;max-width:220px}
.side-acct .navbtn{white-space:nowrap}.side-acct .navbtn span{overflow:hidden;text-overflow:ellipsis}@media (min-width:900px){.sidebar{overflow-y:auto}}
.dg-row{padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);display:grid;gap:8px}.dg-row.muted-row .dg-types{opacity:.5}
.dg-types{display:flex;flex-wrap:wrap;gap:6px}.dg-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:12.5px;cursor:pointer}
.dg-chip input{accent-color:var(--accent);margin:0}.dg-chip:has(input:checked){border-color:var(--accent);color:var(--accent-text)}
.dg-wrap.off{opacity:.5}

/* donut centres: the same size and weight on every ring */
.pm-ring .pmdn{width:116px;height:116px}
.dn-mid{padding:0 14px}.dn-mid b{font-size:26px;font-weight:800;line-height:1;letter-spacing:-.02em;display:flex;align-items:baseline;justify-content:center;gap:1px}
.dn-mid b small{font-size:14px;font-weight:700;color:var(--muted)}.dn-mid b svg{width:28px;height:28px;color:var(--ok)}
.dn-mid span{font-size:11px;font-weight:600;line-height:1.2;color:var(--muted);margin-top:4px;text-transform:uppercase;letter-spacing:.04em}
@media (max-width:640px){.pm-ring .pmdn{width:100px;height:100px}.dn-mid b{font-size:22px}.dn-mid span{font-size:10px}}
.pm-ring .dn-track,.pm-ring .dn-seg{stroke-width:10}
.dn-mid{padding:0 18px}.dn-mid span{text-transform:none;letter-spacing:0;font-size:11px;font-weight:500;max-width:72px;margin-left:auto;margin-right:auto}
.pm-ring{min-height:170px}
.bc-files .bc-card-h h2{color:#16a34a}
.bcp-file{display:flex;align-items:center;gap:8px;font-size:13.5px;padding:4px 0;min-width:0}.bcp-file svg{color:#e0a100;flex:none}.bcp-file .mh-art{width:22px;height:22px;border-radius:6px}
.pf-ext{display:inline-grid;place-items:center;min-width:34px;height:34px;padding:0 4px;border-radius:8px;background:color-mix(in srgb,var(--c) 14%,var(--surface));color:var(--c);font-size:10px;font-weight:800;text-transform:uppercase;flex:none}
.bcp-file .pf-ext{min-width:24px;height:22px;font-size:8.5px;border-radius:5px}
.pf-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.pf-crumbs{display:flex;align-items:center;gap:4px;flex-wrap:wrap;font-size:15px}.pf-crumbs button{display:inline-flex;align-items:center;gap:6px;border:0;background:none;font:inherit;color:var(--muted);padding:5px 8px;border-radius:8px;cursor:pointer;font-weight:600}.pf-crumbs button.on{color:var(--ink);background:var(--surface-2)}.pf-crumbs span{color:var(--muted)}
.pf-folders{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px;margin-bottom:16px}
.pf-folder{display:grid;gap:2px;text-align:left;padding:14px;border-radius:14px;border:1px solid var(--line);background:var(--surface);color:inherit;font:inherit;cursor:pointer;min-width:0}.pf-folder:hover{border-color:var(--accent)}
.pf-folder-ico{color:#e0a100;margin-bottom:4px}.pf-folder-ico svg{fill:color-mix(in srgb,#e0a100 22%,transparent)}
.pf-h{display:flex;align-items:center;gap:7px;font-size:14px;margin:18px 0 8px;color:var(--muted)}
.pf-maps{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px}.pf-map{display:flex;align-items:center;gap:6px;padding:10px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.pf-map-a{display:flex;align-items:center;gap:10px;flex:1;min-width:0;color:inherit;text-decoration:none}.pf-map .mh-art{width:44px;height:44px;border-radius:11px}
.pf-docs{display:grid}.pf-doc{display:flex;align-items:center;gap:10px;padding:10px 12px}.pf-doc+.pf-doc{border-top:1px solid var(--line)}.pf-th{width:34px;height:34px;border-radius:8px;object-fit:cover;flex:none}
.pf-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}.pf-ph{position:relative}.pf-ph .photo-tile{width:100%;aspect-ratio:1}.pf-ph .pf-mv{position:absolute;top:4px;right:4px;background:color-mix(in srgb,var(--surface) 85%,transparent)}
.card.hol-more{display:flex;flex-direction:row;align-items:center}.hol-more>.grow{min-width:0}.hol-more .btn{flex:none}
.demo-try{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.demo-try>svg{color:var(--accent-text);flex:none}.demo-try .grow{flex:1 1 200px}
.geo-search{display:flex;align-items:center;gap:8px;position:relative}.geo-search>span{position:absolute;left:11px;color:var(--muted);display:grid}.geo-search .input{padding-left:34px;flex:1}
.geo-hits{display:grid;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}.geo-hits[hidden]{display:none}
.geo-hits button{display:flex;align-items:center;gap:8px;padding:9px 12px;border:0;background:none;font:inherit;font-size:13.5px;color:inherit;text-align:left;cursor:pointer;min-width:0}.geo-hits button+button{border-top:1px solid var(--line)}.geo-hits button:hover{background:var(--hover)}
.geo-map{height:280px}
.geo-num{display:flex;align-items:center;gap:4px}.geo-num input{width:88px;text-align:right;padding:6px 8px;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-variant-numeric:tabular-nums}.geo-num span{color:var(--muted);font-size:13px}
.dnd-btn{flex:none;margin-top:4px}.dnd-btn svg{color:#6366f1}
.dnd-btn.on{background:#4f46e5;border-color:#4f46e5;color:#fff}.dnd-btn.on svg{color:#fff;fill:currentColor}
.dnd-banner{display:flex;align-items:center;gap:12px;padding:12px 14px;margin:-4px 0 14px;border-radius:14px;border:1px solid color-mix(in srgb,#6366f1 35%,var(--line));background:color-mix(in srgb,#6366f1 12%,var(--surface))}.dnd-banner>svg{color:#6366f1;flex:none;fill:color-mix(in srgb,#6366f1 30%,transparent)}
.btn.dnd-btn.on{background:#4f46e5;border-color:#4f46e5;color:#fff}

/* projects page: the action buttons wrap onto a second line on phones instead of running off the edge */
.proj-actions{flex-wrap:wrap;max-width:100%}.page-head:has(.proj-actions){flex-wrap:wrap}
@media (max-width:560px){.proj-actions{width:100%}.proj-actions .btn{flex:1 1 auto;justify-content:center}}

/* Projects page header: title with New and a ⋯ menu, full-width search, small status chips */
.proj-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.proj-head h1{margin:0}.proj-head .sub{margin-top:2px}
.ph-btns{display:flex;gap:8px;flex:none;align-items:center}
.proj-search{display:block;width:100%;max-width:520px;margin-bottom:10px}
.proj-status{display:flex;gap:6px;margin-bottom:12px;flex-wrap:wrap}
.pchip{border:1px solid var(--line,#e6e6e1);background:transparent;color:inherit;border-radius:99px;padding:6px 12px;font:inherit;font-size:.88rem;font-weight:600;display:inline-flex;gap:6px;align-items:center;cursor:pointer}
.pchip span{color:var(--muted,#777);font-weight:500}.pchip.on{background:var(--ink,#1b1b19);color:var(--bg,#fff);border-color:var(--ink,#1b1b19)}.pchip.on span{color:inherit;opacity:.7}
#projlist .cal-tabs{margin-bottom:12px}
#projlist .cal-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;gap:6px}#projlist .cal-tabs::-webkit-scrollbar{display:none}
#projlist .cal-tab{padding:6px 12px;font-size:.88rem;border-radius:99px;flex:none;white-space:nowrap}

.ot-open{display:flex;align-items:center;gap:12px;flex:1;min-width:0;background:none;border:0;padding:0;color:inherit;font:inherit;text-align:left;cursor:pointer}
.ot-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
.ot-kpis .kpi .v{font-size:1.35rem;white-space:nowrap}

/* Today's log: badges sit with the title, so the description keeps its width on phones */
.lr-main { min-width: 0; }
.lr-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.lr-title b { min-width: 0; max-width: 100%; }
.linkbtn { background: none; border: 0; padding: 8px 0 0; font: inherit; font-size: .88rem; cursor: pointer; text-align: left; color: var(--accent-text); }
.linkbtn.danger-text { color: var(--red, #c0392b); }
/* Money table: a card per job on phones instead of a squashed table */
@media (max-width: 640px) {
  .money-table table { min-width: 0; }
  .money-table thead { display: none; }
  .money-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line, #eee); }
  .money-table td { display: block; padding: 0; border: 0; text-align: left !important; white-space: normal; }
  .money-table td.mt-job { grid-column: 1 / -1; }
  .money-table td[data-l]::before { content: attr(data-l); display: block; font-size: .72rem; color: var(--muted, #777); font-weight: 500; }
}

/* project Photos tab: actions wrap under the hint on phones; photos in folders */
.ph-head{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-bottom:12px}.ph-head>.small{flex:1 1 220px;min-width:0}
.ph-cell{position:relative}.ph-cell>.photo-tile,.ph-cell>*:first-child{width:100%}.ph-mv{position:absolute;right:4px;bottom:4px;background:rgba(0,0,0,.55);color:#fff;border-radius:8px}
.ltpl-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line)}.ltpl-row:last-child{border-bottom:0}
.pf-drop{position:relative;border-radius:14px}.pf-drop-hint{display:none}.pf-drop.over{outline:2px dashed var(--accent,#18693f);outline-offset:6px;background:color-mix(in srgb,var(--accent,#18693f) 5%,transparent)}
.pf-drop.over .pf-drop-hint{display:flex;position:sticky;top:8px;z-index:3;align-items:center;gap:8px;justify-content:center;padding:10px 14px;margin-bottom:10px;border-radius:12px;background:var(--accent,#18693f);color:#fff;pointer-events:none}
.pf-folder.drop-over{outline:2px solid var(--accent,#18693f);background:color-mix(in srgb,var(--accent,#18693f) 12%,var(--surface))}.pf-drop-tip{margin-top:14px;text-align:center}
.pf-ghost{position:fixed;left:0;top:0;z-index:9999;pointer-events:none;opacity:.9;box-shadow:0 12px 30px rgba(0,0,0,.35);border-radius:12px;background:var(--surface)}
.pf-dragging{opacity:.35}body.pf-moving{user-select:none;-webkit-user-select:none;cursor:grabbing}[data-pfitem]{-webkit-touch-callout:none;touch-action:pan-y}
.pf-crumbs button.drop-over{outline:2px solid var(--accent,#18693f);border-radius:8px}
.pm-teamf{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 12px}.pm-teamf .chip i{width:8px;height:8px;border-radius:50%;flex:none}.pm-teamf .chip.on i{box-shadow:0 0 0 2px var(--bg)}
.ltpl-row>div:first-child{flex:1 1 auto;min-width:0}.ltpl-row>div:first-child>b{display:block}.ltpl-row>.row{flex:none}
@media (max-width:600px){.ltpl-row{flex-wrap:wrap;gap:8px}.ltpl-row>div:first-child{flex-basis:100%}.ltpl-row>div:first-child .tiny{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ltpl-row>.row{margin-left:auto}}
#offbar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(env(safe-area-inset-bottom) + 84px);z-index:9000;padding:7px 14px;border-radius:999px;font:600 13px var(--font);box-shadow:var(--menu-shadow);max-width:calc(100vw - 24px);text-align:center}
#offbar.off{background:var(--ink);color:var(--bg)}#offbar.sync{background:var(--accent);color:#fff}
/* Equipment, qualifications, RAMS */
.kit-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.kit-card{display:flex;flex-direction:column;border-radius:16px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--card-shadow);color:inherit;text-decoration:none;overflow:hidden;min-width:0;transition:border-color .15s,transform .15s}
.kit-card:hover{border-color:var(--line-2);transform:translateY(-1px)}
.kit-ph{aspect-ratio:4/3;display:grid;place-items:center;background:var(--hover);color:var(--muted)}.kit-ph img{width:100%;height:100%;object-fit:cover}
.kit-b{display:flex;flex-direction:column;gap:3px;padding:10px 12px 12px;min-width:0}.kit-b>b,.kit-b>span.ellipsis{display:block}.kit-b .pill{align-self:flex-start;margin-top:4px}
.pill.cal-over{background:color-mix(in srgb,var(--red) 16%,transparent);color:var(--red)}.pill.cal-soon{background:color-mix(in srgb,var(--amber) 20%,transparent);color:var(--ink)}
.pill.cal-ok{background:color-mix(in srgb,var(--ok) 16%,transparent);color:var(--ink)}.pill.cal-none{background:var(--hover);color:var(--ink-2)}
.kit-photos{display:flex;gap:10px;overflow-x:auto;margin:0 0 14px;padding-bottom:4px}.kit-photos img{height:180px;border-radius:14px;border:1px solid var(--line);object-fit:cover;display:block}
.kit-pgrid{display:flex;flex-wrap:wrap;gap:8px}.kit-pth{position:relative;width:86px;height:86px;border-radius:12px;overflow:hidden;border:1px solid var(--line);background:var(--hover)}
.kit-pth img{width:100%;height:100%;object-fit:cover}.kit-pth .btn{position:absolute;top:4px;right:4px;width:26px;height:26px;min-height:0;padding:0;border-radius:50%;background:var(--surface)}
.kit-pth.add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font:600 12px var(--font);color:var(--ink-2);cursor:pointer;border-style:dashed}
.qual-row{display:flex;align-items:center;gap:10px;min-width:0;padding:6px 0;border-bottom:1px solid var(--line)}.qual-row:last-child{border-bottom:0}.qual-row .pill{flex:none}
@media (max-width:600px){.qual-row{flex-wrap:wrap}.qual-row>div:first-child{flex-basis:100%}}
.rams-card.todo{border-color:color-mix(in srgb,var(--amber) 60%,var(--line))}
@media (min-width:900px){#offbar{bottom:18px}}
