/* Square & Compass 2.0: easy reading, icon first, built for the phone first.
   Loaded after app-1 and app-2 and overrides them. Reading rules: Lexend, 17px base, roomy lines, short labels,
   big tap targets (48px), one bold color per area, explanations folded away until asked for. */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&display=swap');
:root {
  --font: 'Lexend', 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tap: 48px; --r2: 12px; --r3: 18px;
  /* one color per area, used for icon chips and tile tops */
  --c-office: #E8702A; --c-tasks: #3D7DD8; --c-proj: #1E9C8E; --c-sales: #3FA066; --c-dec: #8B6CF0; --c-ppl: #D0457A; --c-sys: #7D8590; --c-studio: #B07CF0; --c-client: #E0A030;
  --c-bad: #E0573F; --c-warn: #E3A13A; --c-ok: #4FB477;
}
body[data-font="classic"] { --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif; }
body { font-family: var(--font); font-size: 17px; line-height: 1.55; letter-spacing: .005em; font-stretch: 100%; }
h1, h2, h3 { font-family: var(--font); font-stretch: 100%; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: clamp(26px, 6vw, 36px); } h2 { font-size: 20px; } h3 { font-size: 17px; }
.small { font-size: 15px; } .fine { font-size: 14px; } .muted { color: var(--muted); }
p { max-width: 70ch; }
.btn { border-radius: 12px; font-weight: 600; gap: 8px; } .btn .ico { width: 20px; height: 20px; }
.btn.sm { min-height: 40px; font-size: 15px; } .btn.big { min-height: 60px; border-radius: 16px; }
.pill { font-size: 13.5px; padding: 3px 11px; }
input, select, textarea { border-radius: 12px; font-size: 16px; } /* 16px stops iPhone zooming into fields */

/* ---------- icons ---------- */
.ico { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.chip-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex: none; color: var(--tone, var(--accent)); background: color-mix(in srgb, var(--tone, var(--accent)) 16%, transparent); }
.chip-ico .ico { width: 24px; height: 24px; }
.chip-ico.sm { width: 34px; height: 34px; border-radius: 10px; } .chip-ico.sm .ico { width: 19px; height: 19px; }
.chip-ico.lg { width: 56px; height: 56px; border-radius: 18px; } .chip-ico.lg .ico { width: 30px; height: 30px; }
.t-office { --tone: var(--c-office); } .t-tasks { --tone: var(--c-tasks); } .t-proj { --tone: var(--c-proj); } .t-sales { --tone: var(--c-sales); } .t-dec { --tone: var(--c-dec); }
.t-ppl { --tone: var(--c-ppl); } .t-sys { --tone: var(--c-sys); } .t-studio { --tone: var(--c-studio); } .t-client { --tone: var(--c-client); }
.t-bad { --tone: var(--c-bad); } .t-warn { --tone: var(--c-warn); } .t-ok { --tone: var(--c-ok); } .t-act { --tone: var(--accent); } .t-info { --tone: var(--c-tasks); }

/* ---------- never wider than the screen (a too-wide page makes phones zoom out to a tiny desktop view) ---------- */
html, body { overflow-x: hidden; } @supports (overflow: clip) { html, body { overflow-x: clip; } }
#app, main, .body { min-width: 0; max-width: 100%; }
.ov-grid, .two-col, .two-col.wide-left, .office-layout, .threads, .studio-grid { min-width: 0; }
.ov-grid > *, .two-col > *, .office-layout > *, .studio-grid > *, .stack > *, .grid-2 > * { min-width: 0; }
@media (max-width: 1200px) { .ov-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { .office-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .two-col, .two-col.wide-left { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .threads { grid-template-columns: minmax(0, 1fr); } .studio-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } .filters > *, .filters input[type=search] { min-width: 0; flex: 1 1 100%; } .grid-2 { grid-template-columns: minmax(0, 1fr); } .person-card { min-width: 220px; } }
img, video, iframe { max-width: 100%; }
.msg .body, .pre, .clamp2, .feed span, .ov-item strong { overflow-wrap: anywhere; }

/* ---------- top bar ---------- */
.topbar { height: 64px; gap: 10px; } .topbar .brand { flex: none; } .topbar .switcher { min-width: 0; }
.switcher { border-radius: 14px; padding: 4px; gap: 4px; }
.switcher a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 8px 14px; border-radius: 10px; font-weight: 600; }
.switcher a .ico { width: 19px; height: 19px; }
.top-tools .icon-btn .ico { width: 22px; height: 22px; }
.body { min-height: calc(100vh - 64px); }
.sidenav { top: 64px; height: calc(100vh - 64px); }
.sidenav a { min-height: 50px; border-radius: 12px; font-weight: 600; }
.sidenav .ni, .sidenav .ni svg { width: 24px; height: 24px; }
.sidenav .ni svg { stroke-width: 2; }
.sidenav a .ni { color: var(--nav-tone, currentColor); }
.sidenav a.on { box-shadow: inset 4px 0 0 var(--accent); }
.sidenav .nav-more { display: none; }
@media (max-width: 860px) {
  .topbar { height: 58px; padding: 0 12px; padding-top: env(safe-area-inset-top); height: calc(58px + env(safe-area-inset-top)); }
  .switcher a { padding: 8px 10px; } .switcher a .sw-l { display: none; } .switcher a.on .sw-l { display: inline; }
  .sidenav { top: auto; height: auto; justify-content: stretch; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); overflow: visible;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 -6px 24px rgba(0,0,0,.18); }
  .sidenav > a { flex: 1 1 0; min-width: 0; min-height: 60px; font-size: 12.5px; font-weight: 600; gap: 4px; padding: 6px 2px; border-radius: 14px; position: relative; }
  .sidenav > a .nl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidenav > a.on { box-shadow: none; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); }
  .sidenav > a.on .ni { color: var(--accent); }
  .sidenav > a.nav-extra { display: none; } .sidenav .nav-more { display: flex; }
  .sidenav .nb { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; }
  main { padding: var(--s4) 16px calc(110px + env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) { .topbar .brand .mark img { width: 30px; height: 30px; } .top-tools .icon-btn { width: 42px; height: 42px; } }

/* "More" sheet on the phone */
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.more-grid a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; text-align: center; position: relative; }
.more-grid a.on { border-color: var(--accent); }
.more-grid .nb { position: absolute; top: 8px; right: 10px; background: var(--accent); color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 7px; }

/* ---------- page header ---------- */
.hello { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: var(--s5); }
.hello > div:first-child { flex: 1; min-width: 0; }
.hello h1 { margin: 0; } .hello p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.hello .seg button { display: inline-flex; align-items: center; gap: 6px; }
.icon-only .ico { width: 22px; height: 22px; } .btn.icon-only { padding: 0; width: var(--tap); justify-content: center; }
@media (max-width: 640px) { .hello > div:first-child { flex-basis: 100%; } .hello .seg { flex: 1; } .hello .seg button { flex: 1; justify-content: center; } .hello .btn .lbl { display: none; } .hello .btn:not(.icon-only) { padding: 0 14px; } .hello .seg button .lbl { display: none; } }

/* ---------- KPI / attention tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: var(--s5); }
.kpi { display: flex; align-items: center; gap: 14px; padding: 16px; min-height: 92px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; font: inherit; position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--tone, var(--line-2)); }
.kpi b { display: block; font-size: 34px; font-weight: 700; line-height: 1; } .kpi span { display: block; font-size: 15px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.kpi:hover { border-color: var(--tone, var(--ink-2)); text-decoration: none; }
.kpi.zero { opacity: .55; } .kpi.zero::before { background: var(--line-2); } .kpi.zero .chip-ico { filter: grayscale(1); }
.kpi.on { border-color: var(--tone); box-shadow: 0 0 0 2px var(--tone) inset; }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { padding: 12px; gap: 10px; min-height: 80px; } .kpi b { font-size: 28px; } .kpi span { font-size: 14px; } .kpi .chip-ico { width: 38px; height: 38px; border-radius: 12px; } }
@media (max-width: 640px) { .kpis.k5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpis.k5 .kpi { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; } .kpis.k5 .kpi b { font-size: 24px; } .kpis.k5 .kpi span { font-size: 13px; } }

/* ---------- hub: big tiles to jump anywhere ---------- */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: var(--s5); }
.hub a { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 120px; padding: 16px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; position: relative; }
.hub a:hover { border-color: var(--tone); transform: translateY(-1px); text-decoration: none; }
.hub a strong { font-size: 17px; font-weight: 700; line-height: 1.2; } .hub a small { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }
.hub .badge { position: absolute; top: 14px; right: 14px; min-width: 28px; height: 28px; padding: 0 9px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--tone); color: #fff; }
@media (max-width: 640px) { .hub { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } .hub a { min-height: 104px; padding: 12px 10px; align-items: center; text-align: center; justify-content: center; gap: 8px; } .hub a strong { font-size: 14.5px; } .hub a small { display: none; } .hub .badge { top: 8px; right: 8px; min-width: 24px; height: 24px; font-size: 13px; } }
@media (prefers-reduced-motion: no-preference) { .hub a, .kpi, .big-card { transition: transform .15s ease, border-color .15s ease; } }

/* ---------- section heading with icon ---------- */
.sec-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 20px; }
.sec-h .count { font-size: 14px; font-weight: 700; background: var(--raised); color: var(--ink-2); border-radius: 999px; padding: 1px 10px; }
.sec-h .grow { flex: 1; }

/* ---------- list rows: icon, title, short meta, arrow ---------- */
.rows { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.rows > li > a, .rows > li > button.row-btn { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; width: 100%; text-align: left; font: inherit; cursor: pointer; }
.rows > li > a:hover, .rows > li > button.row-btn:hover { border-color: var(--ink-2); text-decoration: none; }
.rows .rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rows .rt strong { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rows .rt span { font-size: 14.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .go { color: var(--muted); } .rows .go .ico { width: 20px; height: 20px; }
.rows .code { font-size: 12.5px; font-weight: 700; color: var(--ink-2); background: var(--raised); border: 1px solid var(--line-2); border-radius: 6px; padding: 0 6px; margin-right: 6px; }
.more-btn { margin-top: 8px; }

/* ---------- departments ---------- */
.depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dept { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.dept:hover { border-color: var(--ink-2); text-decoration: none; }
.dept .dh { display: flex; align-items: center; gap: 12px; } .dept .dh strong { font-size: 17px; flex: 1; min-width: 0; }
.dept .dn { font-size: 14px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; } .dept .dn b { color: var(--ink); }
.dept .ov-team { margin: 0; padding: 0; }
@media (max-width: 640px) { .depts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .dept { padding: 12px; } .dept .dh { flex-direction: column; align-items: flex-start; gap: 8px; } .dept .dh strong { font-size: 15.5px; } .dept .ov-team .who { width: 28px; height: 28px; font-size: 11px; } }

/* ---------- office home layout ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s5); align-items: start; }
.home-grid > * { min-width: 0; }
@media (max-width: 1200px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }
.home-block + .home-block { margin-top: var(--s5); }
.feed-box summary { list-style: none; cursor: pointer; } .feed-box summary::-webkit-details-marker { display: none; }
.feed-box .feed li { grid-template-columns: 1fr; gap: 0; padding: 8px 0; }
@media (min-width: 1201px) { .feed-box summary { pointer-events: none; } .feed-box summary .ico-chev { display: none; } }

/* ---------- folded help: "How it works" opens on tap ---------- */
details.tip { border: 1px solid var(--line); border-radius: 14px; background: var(--raised); margin: 0 0 var(--s4); }
details.tip > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; cursor: pointer; font-weight: 600; color: var(--ink-2); list-style: none; }
details.tip > summary::-webkit-details-marker { display: none; }
details.tip > summary .ico { color: var(--accent); }
details.tip > div { padding: 0 16px 14px; } details.tip[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
/* short help (default): long explanation lines stay hidden; Settings > Help text > Full shows them again */
body:not([data-help="full"]) .fine:not(:has(a, button, input, select)) { display: none; }
body:not([data-help="full"]) .page-head > div > p.muted, body:not([data-help="full"]) .page-head > p.muted:not(:has(.pill)) { display: none; }

/* ---------- icon tabs (scroll sideways on the phone) ---------- */
.tabs.icon-tabs { gap: 6px; border-bottom: 0; padding: 4px 0 6px; margin: var(--s3) 0 var(--s4); -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.tabs.icon-tabs a { scroll-snap-align: start; border: 1px solid var(--line-2); border-radius: 999px; min-height: 46px; padding: 0 16px 0 12px; gap: 8px; margin: 0; background: var(--surface); color: var(--ink-2); font-weight: 600; }
.tabs.icon-tabs a .ico { width: 20px; height: 20px; }
.tabs.icon-tabs a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs.icon-tabs a .unread { margin-left: 2px; }

/* ---------- tables become cards on the phone ---------- */
@media (max-width: 720px) {
  .tbl { display: block; overflow: visible; border: 0; } .tbl thead { display: none; } .tbl tbody { display: grid; gap: 8px; }
  .tbl tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .tbl td { border: 0; padding: 0; } .tbl td:first-child { flex: 1 1 100%; font-weight: 600; } .tbl td.num { text-align: left; }
  .tbl tr.go:hover td { background: none; }
}

/* ---------- boards (pipeline, projects) swipe sideways on the phone, one column at a time ---------- */
@media (max-width: 860px) {
  .board.pipe-board, .board.swipe { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 10px; }
  .board.pipe-board .board-col, .board.swipe .board-col { scroll-snap-align: start; }
}
.board-col { border-radius: 16px; } .board-card { border-radius: 12px; padding: 12px 14px; }
.board-col h2 { font-size: 16px; align-items: center; }

/* ---------- client portal (contractors) ---------- */
.c-hero { display: grid; gap: 14px; margin: 4px 0 var(--s5); }
.c-hero .who { display: flex; align-items: center; gap: 14px; }
.c-hero .who h1 { margin: 0; font-size: clamp(26px, 6.5vw, 40px); } .c-hero .who p { margin: 0; color: var(--muted); font-size: 15px; }
.c-new { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 20px; background: var(--accent); color: #fff; text-decoration: none; font-size: 20px; font-weight: 700; box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 35%, transparent); }
.c-new .chip-ico { background: rgba(255,255,255,.22); color: #fff; } .c-new:hover { text-decoration: none; filter: brightness(1.05); }
.c-new small { display: block; font-size: 14px; font-weight: 500; opacity: .9; }
.c-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.c-actions a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; position: relative; }
.c-actions a:hover { border-color: var(--ink-2); text-decoration: none; }
.c-actions .badge { position: absolute; top: 8px; right: 10px; min-width: 24px; height: 24px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; padding: 0 7px; }
@media (min-width: 900px) { .c-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; } .c-hero .who { grid-column: 1 / -1; } }
.proj-card { border-radius: 18px; } .proj-card .pc-body h3 { font-size: 18px; }
.stage-dots { display: flex; gap: 6px; margin: 10px 0 6px; } .stage-dots i { flex: 1; height: 8px; border-radius: 4px; background: var(--line); }
.stage-dots i.done { background: var(--ink-2); } .stage-dots i.now { background: var(--accent); }
.st-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.st-chip .ico { width: 17px; height: 17px; }
.due-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); } .due-chip .ico { width: 16px; height: 16px; }
.iface-client .tabs[role=tablist] a { gap: 8px; } .iface-client .tabs[role=tablist] a .ico { width: 20px; height: 20px; }
@media (max-width: 640px) { .iface-client .tabs[role=tablist] a { padding: 0 12px; min-width: 46px; justify-content: center; flex: none; } .iface-client .tabs[role=tablist] a .tl { display: none; } .iface-client .tabs[role=tablist] a.on .tl { display: inline; } .iface-client .tabs[role=tablist] { justify-content: space-between; } }

/* ---------- studio ---------- */
.studio-strip { display: none; }
@media (max-width: 760px) {
  .studio-rail { display: none; }
  .studio-strip { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; border-bottom: 1px solid var(--line); scrollbar-width: none; background: var(--surface); }
  .studio-strip a, .studio-strip button { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--raised); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; cursor: pointer; }
  .studio-strip a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .studio-strip .ico { width: 18px; height: 18px; }
  .studio main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
.assign-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.big-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.big-card:hover { border-color: var(--ink-2); text-decoration: none; transform: translateY(-1px); }
.big-card .bh { display: flex; align-items: center; gap: 12px; } .big-card .bh > div { flex: 1; min-width: 0; }
.big-card .bh strong { display: block; font-size: 17px; overflow-wrap: anywhere; } .big-card .bh span { font-size: 14px; color: var(--muted); }
.big-card .bf { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.big-card.late { border-color: var(--c-warn); }

/* ---------- sales ---------- */
.assist-dock { border-radius: var(--r3); } .assist-head .avatar.ai { flex: none; }
.signup .gs-steps.compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); display: grid; gap: 4px 16px; }
.stepbar { display: flex; gap: 4px; margin: 8px 0 4px; } .stepbar i { flex: 1; height: 8px; border-radius: 4px; background: var(--line); } .stepbar i.done { background: var(--c-ok); }

/* ---------- misc polish ---------- */
.panel { border-radius: var(--r3); }
.callout { border-radius: 0 14px 14px 0; }
.empty { padding: var(--s6) var(--s4); } .empty .chip-ico { margin-bottom: 10px; }
.sheet { border-radius: 22px; } @media (max-width: 640px) { .sheet { border-radius: 22px 22px 0 0; } .sheet-body { padding: 16px; } .sheet footer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); } }
.chips button { min-height: 44px; border-radius: 22px; padding: 0 16px; font-size: 15px; }
.lane-tabs button { min-height: 44px; border-radius: 22px; }
.seg button { min-height: 42px; border-radius: 9px; font-weight: 600; }
:focus-visible { outline-width: 3px; }
/* resend row: text gets the space, button drops below on narrow cards */
.resend-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.resend-row > div { flex: 1 1 220px; min-width: 0; }
.resend-row > .btn { flex: 0 0 auto; }
@media (max-width: 640px) { .resend-row > .btn { width: 100%; } }
.due-chip.warn { color: var(--c-warn); } .studio-center > section { margin-bottom: var(--s5); } .studio-team .row.between { margin-bottom: 8px; } .studio-team .sec-h { margin: 0; }
.pill { white-space: nowrap; }

/* ---------- CRM ---------- */
.crm-link { color: var(--c-client) !important; border-color: color-mix(in srgb, var(--c-client) 50%, var(--line-2)) !important; }
.crm-open { justify-content: center; border-color: var(--c-client); color: var(--ink); }
.crm-open .ico { color: var(--c-client); }
.crm-search { min-height: 56px; font-size: 18px; border-radius: 16px; padding-left: 16px; }
.crm-list .rt .crm-last { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; }
.crm-call { color: var(--c-sales); border-color: color-mix(in srgb, var(--c-sales) 45%, var(--line-2)); flex: none; }
.crm-call:hover { background: color-mix(in srgb, var(--c-sales) 14%, transparent); text-decoration: none; }
.rows .warn, .board-card .warn { color: var(--c-warn); font-weight: 600; }
/* to-do rows: a big round tick, then the row */
.crm-task { display: flex; align-items: center; gap: 10px; }
.crm-task > a, .crm-task > .row-btn { flex: 1; min-width: 0; }
.crm-tick { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); color: transparent; display: grid; place-items: center; cursor: pointer; }
.crm-tick:hover { border-color: var(--c-ok); color: var(--c-ok); }
.crm-tick.on { background: var(--c-ok); border-color: var(--c-ok); color: #fff; }
.crm-task.done .rt strong { text-decoration: line-through; color: var(--muted); }
.crm-done > summary { list-style: none; cursor: pointer; } .crm-done > summary::-webkit-details-marker { display: none; } .crm-done > summary .sec-h { margin: 0; }
.crm-done[open] > summary { margin-bottom: 12px; }
/* deals board */
.crm-board-note { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.crm-board .board-col { border-top: 4px solid var(--tone); }
.crm-board .board-col h2 { gap: 8px; } .crm-col-h { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); } .crm-col-h .ico { color: var(--tone); }
.crm-board .board-col.drop { outline: 3px dashed var(--tone); outline-offset: -3px; }
.crm-board .board-card.dragging { opacity: .45; }
.crm-board .board-card .small { display: inline-flex; align-items: center; gap: 4px; }
.crm-money { font-weight: 700; color: var(--c-sales); font-size: 15px; }
/* company page */
.crm-head { display: flex; align-items: center; gap: 16px; margin-bottom: var(--s4); }
.crm-head .grow { flex: 1; min-width: 0; } .crm-head h1 { margin: 0 0 6px; overflow-wrap: anywhere; }
.crm-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crm-acts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: var(--s4); }
.crm-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 12px 6px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); color: var(--ink); font: inherit; font-weight: 600; font-size: 15.5px; cursor: pointer; text-decoration: none; }
.crm-act:hover { border-color: var(--tone); text-decoration: none; transform: translateY(-1px); }
.crm-act.off { opacity: .4; cursor: default; pointer-events: none; }
@media (max-width: 640px) { .crm-acts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .crm-act { min-height: 84px; font-size: 14.5px; } .crm-head .chip-ico.lg { width: 48px; height: 48px; } }
.crm-stage-box { margin-bottom: var(--s4); } .crm-stage-box p { margin: 0; }
.crm-stages { padding-top: 0; }
.crm-stages button { display: inline-flex; align-items: center; gap: 6px; }
.crm-stages button.on { background: var(--ink); color: var(--bg); }
.crm-quick { display: flex; flex-wrap: wrap; gap: 8px; } .crm-quick .btn .ico { color: var(--accent); }
.crm-cols > .stack, .crm-cols > aside { display: grid; gap: var(--s4); align-content: start; }
.crm-cols .panel .sec-h { margin-bottom: 10px; }
.crm-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.crm-people li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.crm-people li:last-child { border-bottom: 0; }
.crm-people .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; } .crm-people .grow span { overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 4px; }
.crm-people .row { gap: 6px; flex: none; }
.crm-people .btn.icon-only { width: 44px; min-height: 44px; }
/* timeline */
.crm-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.crm-ev { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); position: relative; }
.crm-ev:last-child { border-bottom: 0; }
.crm-ev .ev-b { flex: 1; min-width: 0; } .crm-ev .ev-h { font-weight: 600; overflow-wrap: anywhere; }
.crm-ev .ev-h a { color: var(--ink); } .crm-ev p { margin: 4px 0; font-size: 15.5px; }
.crm-ev .ev-m { font-size: 13.5px; color: var(--muted); } .crm-ev .ev-del { font-size: 13.5px; margin-left: 8px; }
.crm-ev.k-stage .ev-h, .crm-ev.k-created .ev-h, .crm-ev.k-task_done .ev-h { font-weight: 500; color: var(--ink-2); }
/* forms */
.crm-lbl { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); }
.crm-pick { flex-wrap: wrap; overflow: visible; padding: 6px 0 4px; }
.crm-pick button { display: inline-flex; align-items: center; gap: 6px; }
.crm-board .board-col h2 .count { white-space: nowrap; }
/* design request answers on the brief */
.brief-answers { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 6px 12px; margin: 8px 0 0; font-size: 14px; }
.brief-answers dt { color: var(--muted); } .brief-answers dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .brief-answers { grid-template-columns: 1fr; } .brief-answers dd { margin-bottom: 6px; } }
