/* ClickOn — shared styles on top of ../assets/base.css (same tokens, same look as the cockpit).
   Pages load base.css, then this file, then their own <style>. */

[hidden] { display: none !important; }

/* ---------- Sidebar additions ---------- */
.side .biz { font-size: 11.5px; color: var(--text3); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.side-foot .nav a { font-size: 13px; }
.status-chip { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font-size: 12px; line-height: 1.35; background: var(--pos-soft); color: var(--pos); }
.status-chip b { font-weight: 600; }
.status-chip.paused { background: var(--neg-soft); color: var(--neg); }
.status-chip.away { background: var(--check-soft); color: var(--check); }
.status-chip .state { flex: 0 0 8px; }
/* On wide screens the sidebar stays put and only the page content scrolls (it scrolls on its own if taller than the window) */
@media (min-width: 821px) {
  .side { position: sticky; top: 0; align-self: flex-start; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
}

/* ---------- Rail variant for wide-canvas pages (<body data-rail>), like the cockpit's Team pages ---------- */
.side.rail { flex: 0 0 56px; padding: 14px 8px; align-items: center; gap: 6px; }
.side.rail .brand-mark { margin-bottom: 10px; text-decoration: none; }
.rail-link { position: relative; width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; color: var(--text2); text-decoration: none; }
.rail-link svg { width: 17px; height: 17px; }
.rail-link:hover { background: var(--sunken); color: var(--ink); }
.rail-link[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.rail-link .badge { position: absolute; top: 3px; right: 2px; min-width: 15px; padding: 0 4px; border-radius: 8px; font-family: var(--f-mono); font-size: 9.5px; line-height: 15px; text-align: center; background: var(--accent); color: var(--on-accent); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rail-status { width: 40px; padding: 6px 0 5px; border-radius: 10px; text-align: center; font-size: 10.5px; font-weight: 600; line-height: 1.2; background: var(--pos-soft); color: var(--pos); }
.rail-status.paused { background: var(--neg-soft); color: var(--neg); }
.rail-status.away { background: var(--check-soft); color: var(--check); }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 22px; background: var(--bg); padding: 0 4px; margin-left: -4px; border-radius: 4px; }
.page-head .sub { font-size: 13px; color: var(--text2); background: var(--bg); padding: 0 3px; }
.page-head .push { margin-left: auto; }
.section-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.section-title h2 { font-size: 15px; background: var(--bg); padding: 0 4px; margin-left: -4px; border-radius: 4px; }
.section-title .meta { font-family: var(--f-mono); font-size: 12px; color: var(--text3); background: var(--bg); padding: 0 3px; }
.section-title .push { margin-left: auto; background: var(--bg); padding: 0 3px; }

/* ---------- Banners (paused, away, stopped, problems) — full tint, icon and a word, never a colored edge ---------- */
.banners { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.banner { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.banner .b-icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--sunken); color: var(--ink); }
.banner .b-icon svg { width: 18px; height: 18px; }
.banner .b-text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.banner .b-text b { font-family: var(--f-head); font-weight: 600; font-size: 14px; }
.banner .b-text span { font-size: 12.5px; color: var(--text2); }
.banner .b-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.banner.neg { background: var(--neg-soft); border-color: color-mix(in srgb, var(--neg) 30%, transparent); }
.banner.neg .b-icon { background: var(--surface); color: var(--neg); }
.banner.neg .b-text b { color: var(--neg); }
.banner.paused { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.banner.paused .b-icon { background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--bg); }
.banner.paused .b-text span { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.banner.away { background: var(--check-soft); border-color: color-mix(in srgb, var(--check) 30%, transparent); }
.banner.away .b-icon { background: var(--surface); color: var(--check); }
.banner.hot { background: var(--hot-soft); border-color: color-mix(in srgb, var(--hot) 30%, transparent); }
.banner.hot .b-icon { background: var(--surface); color: var(--hot); }

/* ---------- Morning list: lanes and item cards ---------- */
.lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 18px; align-items: start; }
.lane { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lane-head { display: flex; align-items: center; gap: 8px; font-family: var(--f-head); font-weight: 600; font-size: 15px; }
.lane-head > span:first-of-type { background: var(--bg); padding: 0 3px; border-radius: 4px; }
.lane-head svg { width: 18px; height: 18px; }
.lane-head .n { font-family: var(--f-mono); font-size: 12px; font-weight: 500; color: var(--text2); background: var(--sunken); padding: 1px 8px; border-radius: 999px; }
.lane[data-lane="you"] .lane-head svg { color: var(--accent); }
.lane[data-lane="ready"] .lane-head svg { color: var(--check); }
.lane[data-lane="done"] .lane-head svg { color: var(--pos); }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.item.is-selected { background: var(--sel); border: 1.5px solid var(--accent); }
.item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-top .meta { margin-left: auto; font-size: 12px; color: var(--text3); }
.item-top .meta .mono { font-size: 11.5px; }
.item h3 { font-size: 15px; line-height: 1.3; }
.item p { font-size: 13.5px; color: var(--text2); line-height: 1.5; }
.item p b { color: var(--ink); font-weight: 600; }
.item .by { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text3); }
.actions { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: 4px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--sunken); border-color: transparent; }
.btn.danger { color: var(--neg); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; flex: 0 0 15px; }
.item.is-decided { opacity: .62; }
.item .result { font-size: 12.5px; color: var(--text2); display: flex; align-items: center; gap: 6px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); }
.stat-value { font-family: var(--f-head); font-weight: 600; font-size: 34px; line-height: 1.12; letter-spacing: -0.02em; margin-top: 4px; }
.stat-value small { font-size: 15px; font-weight: 500; color: var(--text2); margin-left: 2px; letter-spacing: 0; }
.stat-sub { font-size: 12px; color: var(--text3); }
.stat-sub b { color: var(--text2); font-weight: 600; }
.up { color: var(--pos); } .down-n { color: var(--neg); }

/* ---------- Trust dots ---------- */
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line2); }
.dots[data-level="1"] i:nth-child(-n+1), .dots[data-level="2"] i:nth-child(-n+2),
.dots[data-level="3"] i:nth-child(-n+3), .dots[data-level="4"] i:nth-child(-n+4) { background: var(--ink); border-color: var(--ink); }
.level { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); font-weight: 500; }

/* ---------- Switch ---------- */
.switch { position: relative; flex: 0 0 auto; width: 38px; height: 22px; border-radius: 999px; border: 1px solid var(--line2); background: var(--sunken); cursor: pointer; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: var(--on-accent); }

/* ---------- Rows inside cards ---------- */
.rows { list-style: none; margin: 0; padding: 4px 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; }
.row + .row { border-top: 1px solid var(--line); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-text b { font-weight: 600; font-size: 13.5px; }
.row-text span { font-size: 12px; color: var(--text3); }
.row-end { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.card-body { padding: 16px 20px 20px; }

/* ---------- Limit bar ---------- */
.limit-bar { position: relative; height: 10px; border-radius: 999px; background: var(--sunken); overflow: visible; }
.limit-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--ink); }
.limit-bar > b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--accent); border-radius: 1px; }
.limit-scale { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-family: var(--f-mono); font-size: 11.5px; color: var(--text3); }

/* ---------- Sticky notes (what the team learned) ---------- */
.stickies { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 22px 18px; }
.sticky {
  position: relative; margin: 0; padding: 20px 16px 14px; border-radius: 6px; min-height: 128px;
  background: var(--tile, var(--d-conv)); color: var(--note-ink); box-shadow: var(--note-shadow);
  display: flex; flex-direction: column; gap: 10px; transform: rotate(var(--tilt, 0deg));
}
.sticky::before {
  content: ""; position: absolute; top: -8px; left: 50%; width: 46px; height: 16px; margin-left: -23px;
  background: var(--tape); border: 1px solid color-mix(in srgb, var(--note-ink) 8%, transparent); transform: rotate(-3deg);
}
.sticky blockquote { margin: 0; font-family: var(--f-head); font-weight: 500; font-size: 15px; line-height: 1.35; letter-spacing: -0.01em; }
.sticky figcaption { margin-top: auto; font-size: 11.5px; line-height: 1.4; color: var(--note-meta); }
.sticky figcaption span { font-family: var(--f-mono); font-size: 11px; white-space: nowrap; }
.sticky .note-actions { display: flex; gap: 10px; font-size: 12px; }
.sticky .note-actions button { font: inherit; font-weight: 600; color: var(--note-ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Dialogs and toast ---------- */
dialog.sheet { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 18px 48px rgba(0, 0, 0, .18); }
dialog.sheet::backdrop { background: rgba(23, 23, 26, .42); }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; }
.sheet-head h2 { font-size: 17px; line-height: 1.3; }
.sheet-head p { font-size: 13px; color: var(--text2); margin-top: 4px; }
.sheet-head .x { margin-left: auto; }
.sheet-body { padding: 4px 20px 16px; display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px; cursor: pointer; background: var(--surface); }
.choice:hover { border-color: var(--text3); }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice b { display: block; font-weight: 600; }
.choice span { font-size: 12.5px; color: var(--text2); }
.choice:has(input:checked) { background: var(--sel); border: 1.5px solid var(--accent); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text2); cursor: pointer; }
.icon-btn:hover { background: var(--sunken); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 13px; box-shadow: 0 10px 28px rgba(0, 0, 0, .2); }
.toast button { font: 600 13px/1 var(--f-body); color: var(--bg); background: color-mix(in srgb, var(--bg) 16%, transparent); border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; }

/* ---------- Phone frame (WhatsApp test, backup view, examples) ---------- */
.phone { width: min(360px, 100%); border: 1px solid var(--line2); border-radius: 30px; background: var(--surface); padding: 12px; box-shadow: 0 2px 0 rgba(26, 26, 26, .06); }
.phone-screen { border-radius: 20px; background: var(--bg); overflow: hidden; border: 1px solid var(--line); }
.phone-bar { display: flex; justify-content: space-between; padding: 8px 16px 4px; font-family: var(--f-mono); font-size: 11px; color: var(--text3); }

/* ---------- Bits ---------- */
.draft-note { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: 1px dashed var(--line2); border-radius: 6px; font-family: var(--f-mono); font-size: 11px; color: var(--text3); background: var(--surface); }
.source { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--text2); }
.source i { width: 8px; height: 8px; border-radius: 2px; background: var(--line2); }
.source[data-src="crew"] i { background: var(--accent); }
.source[data-src="old"] i { background: var(--text3); }
.source[data-src="before"] i { background: transparent; border: 1.5px dashed var(--text3); }
.ai-tag { display: inline-flex; align-items: center; padding: 0 5px; border-radius: 4px; font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; background: var(--ink); color: var(--bg); line-height: 1.6; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--sunken); flex-wrap: wrap; }
.seg button, .seg a { font: 500 12.5px/1 var(--f-body); color: var(--text2); background: transparent; border: 0; border-radius: 7px; padding: 7px 10px; cursor: pointer; text-decoration: none; }
.seg [aria-pressed="true"], .seg [aria-current="page"], .seg [aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.seg .mono { font-size: 11px; color: var(--text3); margin-left: 4px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 8px; background: var(--surface); }
.stepper button { width: 34px; height: 34px; border: 0; background: none; color: var(--ink); cursor: pointer; font-size: 16px; }
.stepper output, .stepper input { width: 44px; text-align: center; font-family: var(--f-mono); font-size: 14px; border: 0; background: none; color: var(--ink); }

/* ---------- Small screens: same pattern as the cockpit ---------- */
@media (max-width: 820px) {
  .app { align-content: flex-start; }
  .side { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; flex-basis: 100%; }
  .side .nav a { padding: 6px 10px; }
  .side .nav svg { display: none; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; order: 1; }
  .side-foot .nav { flex-basis: auto; }
  .side .nav { order: 2; }
  .status-chip { padding: 6px 10px; }
  .status-chip .long { display: none; }
  .work { padding: 18px 16px 48px; }
  .btn kbd { display: none; }
  .row { padding: 12px 16px; flex-wrap: wrap; }
  .card-body { padding: 14px 16px 18px; }
  .stat-value { font-size: 28px; }
}
@media (max-width: 820px) {
  .side.rail { flex: 1 1 100%; flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: center; padding: 8px 12px; gap: 2px; }
  .side.rail .brand-mark { margin: 0 8px 0 0; }
  .rail-foot { margin: 0 0 0 auto; flex-direction: row; gap: 4px; }
  .rail-status { width: auto; padding: 4px 8px; }
}
@media (max-width: 440px) {
  .side.rail { padding: 8px 10px; }
  .rail-link { width: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .switch::after { transition: none; }
}

/* ---------- Sidebar "Setup" group (Playbooks, Agents, Tools) ---------- */
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-label { padding: 0 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); }
.rail-divider { display: block; width: 24px; height: 1px; background: var(--line2); margin: 6px auto; }
@media (max-width: 820px) {
  .nav-group { order: 3; flex-basis: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
  .nav-group .nav { flex-basis: auto; }
}

/* ---------- Phone tab bar (crew-shell.js drawTabs): main pages fixed at the bottom, Setup opens a sheet ---------- */
.tabbar { display: none; }
.setup-sheet .nav { padding: 0 12px 16px; }
.setup-sheet .nav a { padding: 11px 12px; gap: 12px; font-size: 15px; }
.setup-sheet .nav svg { width: 18px; height: 18px; flex-basis: 18px; }
@media (max-width: 820px) {
  :root { --tabbar-space: calc(62px + env(safe-area-inset-bottom, 0px)); }
  /* The top bar keeps the brand, Control panel and status; the page links move to the tab bar */
  .side > .nav, .side > .nav-group, .side.rail > .rail-link, .side.rail > .rail-divider { display: none; }
  .has-tabs { padding-bottom: var(--tabbar-space); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line);
  }
  .tab {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0;
    border: 0; border-radius: 10px; background: none; color: var(--text3); font: 500 10px/1.2 var(--f-body); text-decoration: none; cursor: pointer;
  }
  .tab .label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; font-weight: inherit; text-transform: none; letter-spacing: normal; color: inherit; }
  .tab-icon { position: relative; display: grid; place-items: center; width: 40px; height: 28px; border-radius: 999px; }
  .tab-icon svg { width: 19px; height: 19px; }
  .tab[aria-current="page"], .tab.is-current { color: var(--ink); font-weight: 600; }
  .tab[aria-current="page"] .tab-icon, .tab.is-current .tab-icon { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  .tab .badge { position: absolute; top: -4px; right: -2px; min-width: 16px; padding: 0 4px; border-radius: 8px; font-family: var(--f-mono); font-size: 10px; font-weight: 500; line-height: 16px; text-align: center; background: var(--accent); color: var(--on-accent); }
  .toast { bottom: calc(var(--tabbar-space) + 12px); }
  /* Setup slides up from the bottom like a phone sheet */
  dialog.setup-sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-width: 1px 0 0; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
}

/* ---------- Tool logos (assets/logos.js): brand glyph in its color on a neutral tile; dashed and gray = not connected yet ---------- */
.logo { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--brand, var(--ink)); }
.logo svg { width: 16px; height: 16px; }
.logo .mono { font-family: var(--f-head); font-weight: 700; font-size: 11.5px; letter-spacing: -0.02em; line-height: 1; }
.logo.is-crew { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.logo.off { color: var(--text3); border: 1px dashed var(--line2); }
.logo.is-crew.off { background: var(--surface); }
.logo.more { font-family: var(--f-mono); font-size: 10.5px; color: var(--text2); background: var(--sunken); border-color: transparent; }
.logo.sm { flex-basis: 20px; width: 20px; height: 20px; border-radius: 6px; }
.logo.sm svg { width: 12px; height: 12px; }
.logo.sm .mono, .logo.sm.more { font-size: 9px; }
.logo.lg { flex-basis: 36px; width: 36px; height: 36px; border-radius: 10px; }
.logo.lg svg { width: 20px; height: 20px; }
.logo.lg .mono { font-size: 14px; }
.logos { display: inline-flex; align-items: center; flex: 0 0 auto; }
.logos .logo + .logo { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.logos.sm .logo + .logo { margin-left: -4px; }

/* ---------- ClickOn chat (assets/crew-chat.js): the home thread and the dock on every page ---------- */
.cc { display: flex; flex-direction: column; min-height: 0; }
.cc-feed { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 22px 16px; display: flex; flex-direction: column; }
.cc-group { display: flex; flex-direction: column; }
.cc-day { position: static; display: flex; justify-content: center; padding: 12px 0 6px; pointer-events: none; }
.cc-day span { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); background: var(--surface); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.cc-msg { display: flex; gap: 10px; padding: 8px 0; }
.cc-avatar { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-grad); color: #FFFFFF; display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.cc-avatar svg { width: 19px; height: 19px; }
.cc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.cc-head { display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; font-size: 12px; color: var(--text3); }
.cc-head b { font-family: var(--f-head); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.cc-time { font-family: var(--f-mono); font-size: 11px; color: var(--text3); }
.cc-via { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text3); }
.cc-via svg { width: 12px; height: 12px; }
.cc-text { font-size: 14.5px; line-height: 1.55; color: var(--ink); text-wrap: pretty; max-width: 62ch; white-space: pre-line; }
.cc-msg.is-owner { justify-content: flex-end; }
.cc-msg.is-owner .cc-body { flex: 0 1 auto; max-width: min(80%, 520px); align-items: flex-end; }
.cc-msg.is-owner .cc-text { background: var(--sunken); padding: 9px 13px; border-radius: 14px 14px 4px 14px; }
.cc-about { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--accent-text); }
.cc-about svg { width: 12px; height: 12px; }
.cc-event { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin: 6px auto; padding: 6px 12px; max-width: 560px; font-size: 12.5px; line-height: 1.45; color: var(--text2); text-align: left; border: 1px dashed var(--line2); border-radius: 10px; }
.cc-event svg { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 2px; color: var(--text3); }
.cc-event .cc-time { flex: 0 0 auto; padding-top: 1px; }
.cc-card { align-self: stretch; max-width: 560px; border: 1px solid var(--line2); border-radius: 14px; background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.cc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cc-top:empty { display: none; }
.cc-by { font-size: 12px; color: var(--text3); }
.cc-title { font-family: var(--f-head); font-weight: 600; font-size: 15px; line-height: 1.3; }
.cc-card p { font-size: 13.5px; color: var(--text2); line-height: 1.5; }
.cc-card p b { color: var(--ink); font-weight: 600; }
.cc-diff { border-collapse: collapse; width: 100%; font-size: 13px; }
.cc-diff th, .cc-diff td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cc-diff th:first-child { padding-left: 0; }
.cc-diff thead th { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); }
.cc-diff tbody th { font-weight: 500; color: var(--text2); }
.cc-diff td { font-family: var(--f-mono); font-size: 12.5px; color: var(--text3); }
.cc-diff td b { color: var(--ink); font-weight: 500; }
.cc-diff tbody tr:last-child th, .cc-diff tbody tr:last-child td { border-bottom: 0; }
.cc-draft { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.cc-warn { list-style: none; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--hot-soft); color: var(--hot); font-size: 12.5px; line-height: 1.45; display: flex; flex-direction: column; gap: 4px; }
.cc-warn li { display: flex; gap: 6px; }
.cc-warn svg { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 2px; }
.cc-card .cc-note { font-size: 12px; color: var(--text3); }
.cc-card .cc-result { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); }
.cc-result svg { flex: 0 0 15px; width: 15px; height: 15px; color: var(--pos); }
.cc-result.undone svg { color: var(--text3); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-actions .btn[aria-pressed="true"] { background: var(--sel); border-color: var(--accent); }
.cc-pick .btn[disabled]:not([aria-pressed="true"]) { opacity: .45; }
.cc-done { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 12px; font-weight: 500; color: var(--pos); }
.cc-done > svg { width: 14px; height: 14px; }
.cc-done.undone { color: var(--text3); }
.cc-done .btn { margin-left: 4px; }
.cc-links { font-size: 12.5px; }
.cc-try { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cc-try .label { margin-right: 2px; }
.cc-pill { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); font: 500 12.5px/1 var(--f-body); cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.cc-pill:hover { border-color: var(--accent); background: var(--sel); }
.cc-nums { align-self: stretch; max-width: 560px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cc-nums div { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); min-width: 0; }
.cc-nums div:first-child { border-left: 0; }
.cc-nums span { font-size: 10.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); }
.cc-nums b { font-family: var(--f-head); font-weight: 600; font-size: 20px; line-height: 1.2; }
.cc-typing { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 12.5px; color: var(--text3); }
.cc-typing-b { display: inline-flex; align-items: center; gap: 8px; }
.cc-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--text3); animation: cc-blink 1s infinite; }
.cc-typing i:nth-of-type(2) { animation-delay: .15s; }
.cc-typing i:nth-of-type(3) { animation-delay: .3s; }
@keyframes cc-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.cc-earlier { align-self: center; margin: 10px 0 2px; }
/* A past day from the chat history */
.cc-past { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--sunken); font-size: 13px; color: var(--text2); }
.cc-past > svg { flex: 0 0 16px; width: 16px; height: 16px; color: var(--text3); }
.cc-past > span { flex: 1; min-width: 0; }
.cc-past b { color: var(--ink); font-weight: 600; }
.cc-daynav { display: flex; align-items: center; gap: 8px; padding: 14px 0 6px; margin-top: 8px; border-top: 1px dashed var(--line2); }
.cc-daynav .spacer { flex: 1; }
/* The plan and the team (every morning, right after the note) */
.cc-card.cc-wide { max-width: 640px; gap: 4px; padding: 16px 18px 12px; }
.cc-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; padding-bottom: 6px; }
.cc-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text2); }
.cc-meta .mono { color: var(--ink); }
.cc-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cc-step { display: flex; gap: 12px; padding: 12px 0; border-radius: 10px; }
.cc-step + .cc-step { border-top: 1px solid var(--line); }
.cc-step.is-flash { outline: 2px solid var(--accent); outline-offset: 2px; }
.cc-step-n { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; color: var(--text2); border: 1.5px solid var(--line2); }
.cc-step-n svg { width: 13px; height: 13px; }
.cc-step.next .cc-step-n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cc-step.done .cc-step-n { background: var(--pos-soft); border-color: var(--pos-soft); color: var(--pos); }
.cc-step-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cc-step-top { display: flex; align-items: flex-start; gap: 8px; }
.cc-step-title { flex: 1; min-width: 0; font: 600 14px/1.35 var(--f-body); color: var(--ink); background: none; border: 0; padding: 0; text-align: left; }
button.cc-step-title { cursor: pointer; }
button.cc-step-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.cc-step.done .cc-step-title { color: var(--text2); font-weight: 500; }
.cc-step-line { font-size: 13px; line-height: 1.5; color: var(--text2); }
.cc-step.done .cc-step-line { color: var(--text3); }
.cc-step-who { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text3); }
.cc-step-who .tile.sm { width: 20px; height: 20px; border-radius: 6px; }
.cc-step-who .tile.sm svg { width: 12px; height: 12px; }
.cc-tag { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.cc-tag.hot { background: var(--hot-soft); color: var(--hot); }
.cc-tag.you { background: var(--accent); color: var(--on-accent); }
.cc-tag.check { background: var(--check-soft); color: var(--check); }
.cc-tag.pos { background: var(--pos-soft); color: var(--pos); }
.cc-tag.plain { background: var(--sunken); color: var(--text2); }
.cc-calls { display: inline-flex; align-items: center; gap: 8px; }
.cc-calls .stepper button { width: 30px; height: 30px; }
.cc-calls .stepper input { height: 30px; -moz-appearance: textfield; appearance: textfield; }
.cc-calls .stepper input::-webkit-outer-spin-button, .cc-calls .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cc-calls .stepper input:focus { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.cc-wide > .cc-result { padding: 10px 0 4px; border-top: 1px solid var(--line); }
.cc-group-team { display: flex; flex-direction: column; gap: 2px; padding: 8px 0 4px; }
.cc-group-team .label { display: flex; align-items: center; gap: 7px; padding-bottom: 2px; }
.cc-group-team .label i { width: 9px; height: 9px; border-radius: 3px; background: var(--tile); }
.cc-mate { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 10px; text-decoration: none; color: inherit; }
a.cc-mate:hover { background: var(--bg); }
.cc-mate .tile.sm { width: 30px; height: 30px; border-radius: 8px; }
.cc-mate .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.cc-mate .t b { font-size: 13px; font-weight: 600; }
.cc-mate .t span { font-size: 12px; color: var(--text3); }
.cc-mate .st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text2); white-space: nowrap; }
.cc-card .cc-team-note { margin: 6px 0 4px; font-size: 12.5px; line-height: 1.5; color: var(--text2); padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.cc-card .cc-team-note b { color: var(--ink); font-weight: 600; }
.cc-wide > .cc-actions { padding: 6px 0 4px; }

/* The morning note (like Today's): every day starts with it */
.cc-morning { align-self: stretch; max-width: 640px; border: 1px solid var(--line2); border-radius: 14px; background: var(--surface); padding: 20px 22px 16px; display: flex; flex-direction: column; gap: 12px; }
.cc-morning > .cc-kicker { font-family: var(--f-mono); font-size: 11.5px; line-height: 1.4; color: var(--text3); }
.cc-hello { font-size: 24px; line-height: 1.15; margin-top: -4px; }
.cc-morning > p { font-size: 15px; line-height: 1.6; color: var(--ink); text-wrap: pretty; }
.cc-morning > p b { font-weight: 600; }
.cc-morning > p.quiet { color: var(--text2); font-size: 14.5px; }
.cc-morning .tint { font: inherit; line-height: inherit; color: var(--ink); text-align: left; cursor: pointer; border: 0; padding: 1px 5px; margin: 0 -1px; border-radius: 5px;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cc-morning .tint:hover { text-decoration-thickness: 2.5px; }
.cc-morning .tint.hot { background: var(--hot-soft); text-decoration-color: var(--hot); }
.cc-morning .tint.you { background: var(--accent-soft); text-decoration-color: var(--accent); }
.cc-morning .tint.check { background: var(--check-soft); text-decoration-color: var(--check); }
.cc-status { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: var(--pos-soft); font-size: 12.5px; color: var(--text2); }
.cc-status b { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--pos); }
.cc-status.down { background: var(--neg-soft); }
.cc-status.down b { color: var(--neg); }
.cc-status.idle { background: var(--check-soft); }
.cc-status.idle b { color: var(--check); }
.cc-morning .cc-nums { max-width: none; }
.cc-nums small { font-size: 11.5px; color: var(--text3); }
.cc-signoff { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--line2); }
.cc-stack { display: flex; }
.cc-stack .tile { box-shadow: 0 0 0 2px var(--surface); }
.cc-stack .tile + .tile { margin-left: -7px; }
.cc-sign { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.cc-sign b { font-family: var(--f-head); font-weight: 600; font-size: 13px; }
.cc-sign span { font-size: 12px; color: var(--text3); }
.dock .cc-morning { padding: 16px; }
.dock .cc-hello { font-size: 20px; }
.dock .cc-morning > p { font-size: 14px; }
.cc-msg.is-flash .cc-card, .cc-msg.is-flash .cc-morning, .cc-msg.is-flash .cc-body > .cc-text:last-child { outline: 2px solid var(--accent); outline-offset: 3px; }
.cc-compose { border-top: 1px solid var(--line); padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.cc-form { display: flex; gap: 8px; align-items: flex-end; }
.cc-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line2); border-radius: 12px; padding: 8px 10px; background: var(--surface); }
.cc-field:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.cc-field textarea { display: block; width: 100%; border: 0; outline: 0; resize: none; font: inherit; font-size: 14px; line-height: 1.45; background: none; color: var(--ink); min-height: 22px; max-height: 140px; padding: 2px; }
.cc-ctx { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 2px 3px 2px 9px; border-radius: 999px; background: var(--sel); color: var(--accent-text); font-size: 12px; font-weight: 500; }
.cc-ctx > svg { width: 12px; height: 12px; }
.cc-ctx button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.cc-ctx button:hover { background: var(--accent-soft); }
.cc-ctx button svg { width: 12px; height: 12px; }
.cc-form .btn { height: 42px; }

/* Composer tools: attach files, dictate, voice mode */
.cc-tools { display: flex; align-items: center; gap: 2px; margin: 0 -4px -4px; }
.cc-tools .spacer { flex: 1; }
.cc-tool { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--text2); cursor: pointer; }
.cc-tool:hover { background: var(--sunken); color: var(--ink); }
.cc-tool svg { width: 17px; height: 17px; }
.cc-tool[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); animation: cc-rec 1.4s ease-in-out infinite; }
@keyframes cc-rec { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); } }
.cc-files { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-file { display: inline-flex; align-items: center; gap: 8px; max-width: 240px; padding: 4px 4px 4px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 12px; }
.cc-file img, .cc-file .ic { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 7px; object-fit: cover; display: grid; place-items: center; background: var(--sunken); color: var(--text2); }
.cc-file .ic svg { width: 16px; height: 16px; }
.cc-file .t { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; padding-right: 4px; }
.cc-file .t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-file .t span { color: var(--text3); font-family: var(--f-mono); font-size: 10.5px; }
.cc-file button { flex: 0 0 24px; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: var(--text3); cursor: pointer; }
.cc-file button:hover { background: var(--sunken); color: var(--ink); }
.cc-file button svg { width: 12px; height: 12px; }
.cc-sent-files { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.cc-sent-files img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--sunken); }
.cc.is-drop .cc-field { outline: 2px dashed var(--accent); outline-offset: 2px; }

/* Voice mode: talk to Clicky, hear it answer; everything also lands in the chat */
dialog.voice-mode { width: min(440px, calc(100vw - 32px)); padding: 18px 22px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); text-align: center; box-shadow: 0 18px 48px rgba(0, 0, 0, .22); }
dialog.voice-mode::backdrop { background: rgba(23, 23, 26, .55); }
.vm-head { display: flex; align-items: center; justify-content: space-between; text-align: left; }
.vm-head h2 { font-size: 17px; }
.vm-sub { margin-top: 2px; font-size: 13px; color: var(--text2); text-align: left; }
.vm-orb { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; width: 132px; height: 132px; margin: 30px auto 26px; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.vm-orb i { width: 6px; height: 18px; border-radius: 3px; background: currentColor; opacity: .9; }
.vm-orb i:nth-child(2), .vm-orb i:nth-child(4) { height: 30px; }
.vm-orb i:nth-child(3) { height: 42px; }
.vm-orb::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.vm-orb[data-state="listening"]::after { animation: vm-ring 1.6s ease-out infinite; }
.vm-orb[data-state="speaking"] i { animation: vm-bar .9s ease-in-out infinite; }
.vm-orb[data-state="speaking"] i:nth-child(2) { animation-delay: .12s; } .vm-orb[data-state="speaking"] i:nth-child(3) { animation-delay: .24s; }
.vm-orb[data-state="speaking"] i:nth-child(4) { animation-delay: .36s; } .vm-orb[data-state="speaking"] i:nth-child(5) { animation-delay: .48s; }
.vm-orb[data-state="thinking"] { animation: vm-breathe 1.2s ease-in-out infinite; }
.vm-orb[data-state="idle"] { background: var(--sunken); color: var(--text2); }
@keyframes vm-ring { 0% { transform: scale(.92); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes vm-bar { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1.1); } }
@keyframes vm-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.94); } }
.vm-status { min-height: 20px; font-family: var(--f-head); font-weight: 600; font-size: 14px; }
.vm-heard { min-height: 20px; margin-top: 6px; font-size: 14px; color: var(--text2); }
.vm-said { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--text3); max-height: 96px; overflow-y: auto; }
.vm-said:empty, .vm-heard:empty { display: none; }
.vm-actions { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.vm-actions .btn[aria-pressed="true"] { background: var(--sunken); }
.vm-hint { margin-top: 12px; font-size: 12px; color: var(--text3); }
@media (prefers-reduced-motion: reduce) { .cc-tool[aria-pressed="true"], .vm-orb::after, .vm-orb i, .vm-orb { animation: none !important; } }

/* The "Tell Clicky anything" button and the dock (a drawer on the right; full screen on phones) */
.ask-fab { position: fixed; right: 22px; bottom: 22px; z-index: 45; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px 0 8px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); font: 600 13.5px/1 var(--f-body); box-shadow: 0 8px 24px rgba(0, 0, 0, .14); cursor: pointer; }
.ask-fab:hover { border-color: var(--accent); }
.ask-fab kbd { color: var(--text3); }
dialog.dock { position: fixed; inset: 0 0 0 auto; z-index: 60; margin: 0; padding: 0; width: min(420px, 100vw); max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: -14px 0 40px rgba(0, 0, 0, .14); }
dialog.dock[open] { display: flex; flex-direction: column; }
.dock-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.dock-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.dock-title h2 { font-size: 15px; }
.dock-title span { font-size: 12px; color: var(--text3); }
.dock-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dock .cc-feed { padding: 2px 16px 14px; }
.dock .cc-text { font-size: 14px; }
.dock .cc-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dock .cc-nums div:nth-child(3) { border-left: 0; }
.dock .cc-nums div:nth-child(n+3) { border-top: 1px solid var(--line); }
.dock .cc-compose { padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.dock .cc-form .btn .lbl { display: none; }
/* The page never moves when the chat opens: the chat floats over it as frosted glass (see “Chat as glass” below) */

/* "Or tell Clicky: …" under a setting: the same change, said in the chat */
.say-it { padding: 10px 20px 14px; border-top: 1px dashed var(--line); }
/* A long quote (translations run longer) moves to its own line instead of squeezing the label into a column */
.say-it button { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; padding: 0; border: 0; background: none; color: var(--text2); font: 500 12px/1.4 var(--f-body); text-align: left; cursor: pointer; }
.say-it button svg { flex: 0 0 13px; width: 13px; height: 13px; color: var(--accent); }
.say-it button:hover { color: var(--ink); }
.say-it button:hover q { text-decoration: underline; text-underline-offset: 3px; }
.say-it q { color: var(--ink); quotes: "“" "”"; }
:root:lang(fr) .say-it q { quotes: "«\202F" "\202F»"; }
:root:lang(de) .say-it q { quotes: "„" "“"; }
:root:lang(ru) .say-it q { quotes: "«" "»"; }

@media (max-width: 820px) {
  .cc-feed { padding: 4px 14px 14px; }
  .cc-compose { padding: 10px 12px 12px; }
  .cc-form .btn .lbl { display: none; }
  .cc-card { padding: 12px 14px; }
  .cc-morning { padding: 16px; }
  .cc-hello { font-size: 21px; }
  .cc-morning > p { font-size: 14.5px; }
  .cc-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-nums div:nth-child(3) { border-left: 0; }
  .cc-nums div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cc-msg.is-owner .cc-body { max-width: 88%; }
  .ask-fab { right: 12px; bottom: calc(var(--tabbar-space, 0px) + 12px); height: 44px; }
  .ask-fab kbd { display: none; }
  dialog.dock { width: 100vw; border-left: 0; }
  .say-it { padding: 10px 16px 14px; }
}
@media (max-width: 440px) { .ask-fab .lbl { font-size: 13px; } .ask-fab .lbl::before { content: ""; } }

/* ---------- Team page tabs (assets/team-tabs.js): Org chart, Trust lanes, Data flow, like the Ads tabs ---------- */
.team-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 22px; padding: 10px 20px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.team-head h1 { font-size: 18px; line-height: 1.2; padding-bottom: 11px; white-space: nowrap; }
.team-tabs { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.team-tabs a { display: inline-flex; align-items: center; gap: 8px; margin-bottom: -1px; padding: 10px 14px 9px; border-bottom: 2px solid transparent; font: 500 13.5px var(--f-body); color: var(--text2); text-decoration: none; white-space: nowrap; }
.team-tabs a:hover { color: var(--ink); }
.team-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.team-tabs kbd { font-size: 10px; padding: 2px 4px; opacity: .6; }
.team-tabs .badge { font-family: var(--f-mono); font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.team-purpose { margin-left: auto; padding-bottom: 12px; font-size: 13px; color: var(--text2); }
/* Board pages (Org chart, Data flow): the tabs on top, the board fills the rest of the screen */
.team-col { flex: 999 1 560px; min-width: 0; height: 100vh; display: flex; flex-direction: column; }
@media (max-width: 900px) {
  .team-head { padding: 6px 16px 0; border-bottom: 0; }
  .team-tabs { flex-basis: 100%; border-bottom: 1px solid var(--line); }
  .team-purpose { flex-basis: 100%; margin: 0; padding: 8px 0 10px; }
  .team-tabs kbd { display: none; }
  .team-tabs a { padding: 10px 10px 9px; }
  .team-col { height: auto; }
}
@media (prefers-reduced-motion: reduce) { .cc-typing i { animation: none; opacity: .6; } }

/* ---------- Charts (assets/crew-charts.js): thin marks, hairline grid, values in text colors; source colors from the Results legend ---------- */
.ch { position: relative; min-width: 0; }
.ch-svg { display: block; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.ch-base { stroke: var(--line2); stroke-width: 1; shape-rendering: crispEdges; }
.ch-tick, .ch-x { font: 400 10.5px var(--f-mono); fill: var(--text3); font-variant-numeric: tabular-nums; }
.ch-val { font: 500 11.5px var(--f-mono); fill: var(--ink); }
.ch-mark { fill: var(--ink); transition: opacity .12s ease; }
.ch-mark[data-src="crew"] { fill: var(--accent); }
.ch-mark[data-src="old"] { fill: var(--text3); }
.ch-mark[data-src="before"] { fill: var(--sunken); stroke: var(--text3); stroke-width: 1.5; stroke-dasharray: 3 2; }
.ch-hit { fill: transparent; }
.ch.has-hot .ch-col:not(.is-hot) .ch-mark, .ch.has-hot .hb-row:not(.is-hot) .ch-mark { opacity: .38; }
.ch-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-line[data-src="crew"] { stroke: var(--accent); }
.ch-line[data-src="old"] { stroke: var(--text3); }
.ch-line[data-src="before"] { stroke: var(--text3); stroke-dasharray: 4 3; }
.ch-area { fill: var(--ink); opacity: .07; }
.ch-dot { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.ch-dot[data-src="crew"] { fill: var(--accent); }
.ch-dot[data-src="old"], .ch-dot[data-src="before"] { fill: var(--text3); }
.ch-xhair { stroke: var(--text3); stroke-width: 1; shape-rendering: crispEdges; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 8px; }
.ch-hbars { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 6px; }
.hb-row { display: grid; grid-template-columns: minmax(84px, 38%) minmax(0, 1fr); align-items: center; gap: 12px; min-height: 32px; padding: 3px 6px; margin: 0 -6px; border-radius: 6px; }
.hb-row.is-hot { background: var(--bg); }
.hb-label { font-size: 12.5px; line-height: 1.3; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hb-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hb-track i { flex: 0 0 auto; display: block; height: 12px; border-radius: 0 4px 4px 0; background: var(--ink); }
.hb-track i[data-src="crew"] { background: var(--accent); }
.hb-track i[data-src="old"] { background: var(--text3); }
.hb-track i[data-src="before"] { background: var(--sunken); border: 1.5px dashed var(--text3); }
.hb-track b { font: 500 12px var(--f-mono); color: var(--ink); white-space: nowrap; }
.hb-note { font-size: 12px; color: var(--text3); }
.ch-number { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px; }
.ch-big { font-family: var(--f-head); font-weight: 600; font-size: 40px; line-height: 1.05; letter-spacing: -0.02em; }
.ch-sub { font-size: 12.5px; color: var(--text3); }
.ch-weeks { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line2); font-size: 12.5px; color: var(--text2); }
.ch-weeks b { font-family: var(--f-mono); font-weight: 500; color: var(--ink); }
.ch-delta { font-weight: 600; color: var(--text2); }
.ch-delta.is-good { color: var(--pos); }
.ch-delta.is-bad { color: var(--neg); }
.ch-delta small { font-weight: 400; font-size: 12px; color: var(--text3); }
.ch-table { font-size: 12.5px; }
.ch-table th, .ch-table td { padding: 7px 10px; }
.ch-table tbody th { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; color: var(--ink); position: static; white-space: normal; background: transparent; }
.ch-table td.num, .ch-table th.num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch-table .ch-total th, .ch-table .ch-total td { font-weight: 600; border-top: 1px solid var(--line2); }
.ch-empty { padding: 28px 0; text-align: center; font-size: 13px; color: var(--text3); }
.ch-tip { position: fixed; z-index: 90; pointer-events: none; min-width: 120px; max-width: 260px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); box-shadow: 0 10px 28px rgba(0, 0, 0, .16); font-size: 12px; }
.ch-tip-head { margin-bottom: 3px; font-size: 11.5px; color: var(--text3); }
.ch-tip-row { display: flex; align-items: center; gap: 8px; line-height: 1.65; }
.ch-tip-row i { flex: 0 0 12px; height: 2px; border-radius: 1px; background: var(--ink); }
.ch-tip-row i[data-src="crew"] { background: var(--accent); }
.ch-tip-row i[data-src="old"] { background: var(--text3); }
.ch-tip-row i[data-src="before"] { background: repeating-linear-gradient(90deg, var(--text3) 0 3px, transparent 3px 5px); }
.ch-tip-row b { font-family: var(--f-mono); font-weight: 600; }
.ch-tip-row span { color: var(--text2); }
@media (prefers-reduced-motion: reduce) { .ch-mark { transition: none; } }

/* ---------- Languages (assets/i18n.js sets <html lang>) ---------- */
/* The system fonts have Russian letters, so Russian needs no font of its own */
/* Translations run longer than English (German about a third): long words break at syllables instead of overflowing */
:root:not(:lang(en)) body { hyphens: auto; overflow-wrap: break-word; }
/* The language picker: i18n.js turns <select data-lang> into a button with a flag and a list. .small (from class lang-select,
   for top bars) matches .btn.small */
.lang-pick { position: relative; display: inline-flex; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); font: 500 13px/1 var(--f-body); white-space: nowrap; cursor: pointer; }
.lang-btn:hover { border-color: var(--text3); }
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lang-btn .chev { color: var(--text3); }
.lang-pick.small .lang-btn { height: 30px; padding: 0 8px; font-size: 12.5px; gap: 7px; }
.lang-pick .flag { flex: 0 0 18px; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 80; min-width: 100%; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .14); }
.lang-pick.up .lang-list { top: auto; bottom: calc(100% + 6px); }
.lang-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--ink); white-space: nowrap; cursor: pointer; }
.lang-list li:hover, .lang-list li:focus { background: var(--sunken); outline: none; }
.lang-list li:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.lang-list .tick { margin-left: auto; padding-left: 4px; color: var(--accent); visibility: hidden; }
.lang-list [aria-selected="true"] { font-weight: 600; }
.lang-list [aria-selected="true"] .tick { visibility: visible; }
/* In a phone's top bar only the flag shows; the button's aria-label still names the language */
@media (max-width: 560px) { .lang-pick.small .lang-btn > span { display: none; } }

/* ---------- Control panel tabs (assets/control-tabs.js): Settings, Activity log, Playbooks, Agents, Tools ----------
   A pill strip under the top bar, so it never clashes with a page's own underlined tabs */
.topbar:has(+ .cp-tabs) { margin-bottom: 14px; }
.cp-tabs { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 24px; }
.cp-tabs-label { display: inline-flex; align-items: center; gap: 7px; font: 600 13.5px var(--f-head); color: var(--ink); background: var(--bg); padding: 2px 4px; border-radius: 4px; }
.cp-tabs-label svg { width: 15px; height: 15px; color: var(--text2); }
.cp-tabs-seg { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cp-tabs-seg::-webkit-scrollbar { display: none; }
.cp-tabs-seg a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; padding: 8px 12px; }
.cp-tabs-seg a:hover { color: var(--ink); }
.cp-tabs-seg svg { width: 14px; height: 14px; flex: 0 0 auto; }
@media (max-width: 820px) {
  .cp-tabs { margin-bottom: 18px; }
  .cp-tabs-label { display: none; }
  .cp-tabs-seg { width: 100%; }
  .cp-tabs-seg a { padding: 8px 10px; }
}

/* ---------- Ad previews (assets/card-preview.js, ad.html): Facebook and Instagram feed posts and a Google search result,
   drawn in HTML, no platform logos. Job photos are placeholders: a sticky colour, an icon and the photo's name ---------- */
.feed { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 13px; }
.feed-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.feed-top .av { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-family: var(--f-head); font-weight: 600; font-size: 12px; }
.feed-top b { display: block; font-size: 13px; }
.feed-top span { font-size: 11.5px; color: var(--text3); }
.feed-text { padding: 0 12px 10px; line-height: 1.45; overflow-wrap: anywhere; }
.feed-text .more { color: var(--text3); }
.feed-img { position: relative; aspect-ratio: 1.91 / 1; background: var(--tile, var(--sunken)); color: var(--note-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12px; background-size: cover; background-position: center; }
.feed-img.square { aspect-ratio: 1 / 1; }
.feed-img svg { width: 28px; height: 28px; }
.feed-img .cap { background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--ink); padding: 2px 8px; border-radius: 6px; }
.feed-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--sunken); }
.feed-bar .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.feed-bar .t span { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .04em; }
.feed-bar .t b { font-size: 13.5px; overflow-wrap: anywhere; }
.feed-bar .cta { flex: 0 0 auto; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line2); }
.ig-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.ig-cap { padding: 10px 12px; line-height: 1.45; overflow-wrap: anywhere; }
.serp { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.serp .sp { font-size: 11.5px; font-weight: 600; color: var(--text2); }
.serp .site { font-size: 12.5px; color: var(--text2); }
.serp .title { font-family: var(--f-head); font-size: 17px; font-weight: 500; color: var(--accent-text); line-height: 1.3; overflow-wrap: anywhere; }
.serp .desc { font-size: 13px; color: var(--text2); line-height: 1.45; overflow-wrap: anywhere; }
.serp .call { margin-top: 6px; align-self: flex-start; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); }
.feed.compact { font-size: 12px; border-radius: 10px; }
.feed.compact .feed-top { padding: 8px 10px; gap: 8px; }
.feed.compact .feed-top .av { flex-basis: 26px; width: 26px; height: 26px; font-size: 10.5px; }
.feed.compact .feed-top b { font-size: 12px; }
.feed.compact .feed-top span { font-size: 10.5px; }
.feed.compact .feed-text { padding: 0 10px 8px; line-height: 1.4; }
.feed.compact .feed-img svg { width: 22px; height: 22px; }
.feed.compact .feed-img .cap { font-size: 11px; }
.feed.compact .feed-bar { padding: 8px 10px; gap: 8px; }
.feed.compact .feed-bar .t span { font-size: 10px; }
.feed.compact .feed-bar .t b { font-size: 12.5px; line-height: 1.3; }
.feed.compact .feed-bar .cta { font-size: 11.5px; padding: 5px 9px; }
.serp.compact { padding: 12px 12px; border-radius: 10px; }
.serp.compact .title { font-size: 15px; }
.serp.compact .desc { font-size: 12px; }
.feed.is-dim, .serp.is-dim { opacity: .62; filter: grayscale(.6); }

/* Sparkline: leads a day, 14 thin columns, the last one darker; no axis, the numbers are in its label */
.spark { display: inline-flex; align-items: flex-end; gap: 6px; }
.spark svg { display: block; overflow: visible; }
.spark .sp-bar { fill: color-mix(in srgb, var(--ink) 30%, transparent); }
.spark .sp-bar.last { fill: var(--ink); }
.spark .sp-base { stroke: var(--line2); stroke-width: 1; shape-rendering: crispEdges; }
.spark .sp-sum { font: 500 11px var(--f-mono); color: var(--text3); white-space: nowrap; }

/* ---------- An ad ClickOn drafted, as a chat card (assets/crew-chat.js CARDS.camp) ---------- */
.cc-camp .cc-camp-pv { max-width: 320px; margin: 8px 0 4px; }
.cc-camp .cc-camp-pv .feed, .cc-camp .cc-camp-pv .serp { width: 100%; }

/* ---------- Sections: one row of tabs for the pages inside a section (assets/crew-shell.js › SECTIONS) ---------- */
.sec-row { display: flex; align-items: flex-end; gap: 4px 18px; flex-wrap: wrap; margin: -6px 0 22px; border-bottom: 1px solid var(--line); }
.sec-title { font: 600 13px/1 var(--f-head); color: var(--text3); padding-bottom: 13px; }
.sec-row .sec-tabs, .team-head .sec-tabs { overflow-x: auto; scrollbar-width: none; }
.sec-tabs::-webkit-scrollbar { display: none; }
.sec-back { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 12px 0; font-size: 13px; color: var(--text2); text-decoration: none; }
.sec-back:hover { color: var(--ink); }
.sec-back svg { width: 15px; height: 15px; }
.team-head .team-purpose { display: none; }
@media (max-width: 820px) { .sec-row { margin: -4px 0 16px; } .sec-title { display: none; } }

/* No repeated page names (Yan, November 15, 2026): the menu and the page title already say where you are.
   The grey trail above titles ("Ads · Overview · Sunday…") and the section name beside the tabs are hidden;
   a top bar that held only the trail goes away, one with buttons keeps them. */
.topbar .crumb, .sec-title { display: none; }
.topbar:has(> .crumb:only-child), .topbar:has(> .crumb:first-child + .spacer:last-child) { display: none; }
/* Inside a section the section's name is the one title; the tab shows the sub-page, so the page's own title is hidden */
.sec-row { align-items: flex-end; gap: 4px 22px; }
.sec-row .sec-h1 { font-size: 22px; line-height: 1.2; padding-bottom: 10px; white-space: nowrap; }
.has-sec main.work h1:not(.sec-h1) { display: none; }
@media (max-width: 820px) { .sec-row .sec-h1 { font-size: 20px; } }

/* Less text (Yan, November 15, 2026): no description line next to page titles or under tabs. The title and the menu say enough. */
.page-head .sub, .page-head > p, .page-head .hint, .tab-purpose, .team-purpose, .cal-intro, .mode-line { display: none !important; }
/* Buttons sit right after the title, not at the far right edge */
.page-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: 6px; }
.page-head .push, .page-head .head-right { margin-left: 6px !important; }
.sec-row .page-actions { margin: 0 0 8px auto; }
.mode-row .btn.primary { order: -1; margin-right: 10px; }
.thread-title p { display: none; }
.page-head .head-right { flex: 1 1 auto; align-items: flex-start; }
.page-head .mode-row { justify-content: flex-start; }
@media (min-width: 821px) { .page-head .mode-row { flex-wrap: nowrap; } }

/* ================= One page header (assets/crew-shell.js › buildHeader) =================
   Row 1: title + action buttons right after it. Row 2: sub-pages as buttons with icons. Same space above and below on every page. */
.has-ph main.work { padding-top: 26px; }
.ph { display: flex; flex-direction: column; gap: 14px; margin: 0 0 22px; }
.ph-top { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; min-height: 40px; }
.ph-top h1 { display: block !important; margin: 0; padding: 0; font-size: 26px; line-height: 1.15; white-space: nowrap; }
.ph .page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.ph .page-actions > * { margin: 0 !important; }
.ph .sec-back { display: inline-flex; align-items: center; gap: 6px; padding: 0; font-size: 13px; color: var(--text2); text-decoration: none; }
.ph .sec-back svg { width: 15px; height: 15px; }
.ph-tabs .tabs-wrap { margin: 0; overflow: visible; }
.has-sec .ph-rest h1, .ph-rest .sub { display: none; }
.ph-rest:not(:has(> :not(h1):not(.sub):not(p):not(.hint))) { display: none; }
#team-head { padding: 26px 48px 0; border-bottom: 0; background: transparent; display: block; }
#team-head .ph { margin-bottom: 16px; }
/* Sub-pages look like buttons: icon + word, the current one filled in brick red (the one "selected" colour) */
.ph-tabs .tabs, .ph-tabs .sec-tabs, main .tabs[role="tablist"]:not(.seg), main .res-tabs, .cb-tabs-row .res-tabs, #team-head .sec-tabs { display: flex; gap: 6px; border: 0 !important; overflow-x: auto; scrollbar-width: none; min-width: 0 !important; padding: 2px; }
.ph-tabs ::-webkit-scrollbar, main .tabs[role="tablist"]:not(.seg)::-webkit-scrollbar { display: none; }
.ph [role="tab"], .cb-tabs-row [role="tab"], main .tabs[role="tablist"]:not(.seg) [role="tab"], main .res-tabs [role="tab"], .sec-tabs a {
  display: inline-flex !important; align-items: center; gap: 7px; flex: 0 0 auto; height: 36px; margin: 0 !important; padding: 0 14px !important;
  border: 1px solid var(--line2) !important; border-radius: 10px !important; background: var(--surface) !important; color: var(--text2) !important;
  font: 500 13.5px/1 var(--f-body) !important; text-decoration: none; white-space: nowrap; cursor: pointer; box-shadow: none !important;
}
.ph [role="tab"]:hover, .cb-tabs-row [role="tab"]:hover, main .tabs[role="tablist"]:not(.seg) [role="tab"]:hover, main .res-tabs [role="tab"]:hover, .sec-tabs a:hover { color: var(--ink) !important; border-color: var(--text3) !important; }
.ph [role="tab"][aria-selected="true"], .cb-tabs-row [role="tab"][aria-selected="true"], main .tabs[role="tablist"]:not(.seg) [role="tab"][aria-selected="true"], main .res-tabs [role="tab"][aria-selected="true"], .sec-tabs a[aria-current="page"] { background: var(--accent) !important; border-color: var(--accent) !important; color: var(--on-accent) !important; font-weight: 600 !important; }
main [role="tab"] .n, main [role="tab"] .badge, .cb-tabs-row [role="tab"] .n, .cb-tabs-row [role="tab"] .badge { color: inherit !important; opacity: .75; }
main [role="tab"] kbd, .cb-tabs-row [role="tab"] kbd { display: none; }
.tab-ic { display: inline-flex; width: 15px; height: 15px; }
.tab-ic svg { width: 15px; height: 15px; }
.ph [role="tab"]::after, .cb-tabs-row [role="tab"]::after, main .tabs[role="tablist"]:not(.seg) [role="tab"]::after, .sec-tabs a::after { display: none !important; }
@media (max-width: 820px) {
  .has-ph main.work { padding-top: 18px; }
  #team-head { padding: 18px 16px 0; }
  .ph { gap: 12px; margin-bottom: 18px; }
  .ph-top h1 { font-size: 22px; }
  .ph-tabs .tabs, .ph-tabs .sec-tabs, main .tabs[role="tablist"]:not(.seg) { flex-wrap: nowrap; margin-right: -16px; padding-right: 16px; }
}
/* One line under every row of sub-page buttons (Yan prefers it), the same as on Results */
.ph-tabs { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
main .res-bar { padding-bottom: 14px; align-items: center; }
/* The page icon before the title, and the action row under the sub-page line */
.ph-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); flex: 0 0 auto; }
.ph-icon svg { width: 19px; height: 19px; }
.ph .page-actions.ph-acts-row { margin-top: -2px; }
@media (max-width: 820px) { .ph-icon { width: 32px; height: 32px; } .ph-icon svg { width: 17px; height: 17px; } }
/* The page name: a small grey mono line, not a big title */
.ph-top h1.ph-name, .ph-top h1.sec-h1 { font: 400 12.5px/1.4 var(--f-mono) !important; letter-spacing: 0 !important; color: var(--text3) !important; white-space: normal; }
.ph-top h1 .mono, .ph-top h1 small { font: inherit; color: inherit; }
.ph-top { min-height: 0; }
.ph-icon { display: none; }
/* Page buttons: one row under the line, on the right; the red add button last. Anything that isn't a button (a switch) goes left. */
.ph-acts-row, main .res-tools.ph-acts-row { display: flex !important; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; width: 100%; }
.ph .ph-acts-row { margin: 0; }
.ph-acts-row > :not(.btn):not(button):not(a) { margin-right: auto !important; }
.ph-acts-row .btn { height: 36px; padding: 0 14px; font-size: 13.5px; }
.ph-acts-row .btn.primary { padding: 0 16px 0 12px; }
.ph-acts-row .btn svg { width: 15px; height: 15px; }
.ph-acts-row .head-right, .ph-acts-row .mode-row { margin: 0; }
.ph-acts-row .mode-row .btn.primary { order: 0; margin: 0; }
main .res-bar + .res-tools.ph-acts-row { margin-top: 14px; }
/* Search in the page's button row: a visible label above a wide box, so it's clear what you can search */
.ph-acts-row .ph-search { position: relative; display: flex; flex-direction: column; gap: 5px; flex: 0 1 460px; min-width: 240px; }
.ph-search .search-lbl { position: static; font-size: 12px; font-weight: 600; color: var(--text2); }
.ph-search svg { top: auto !important; bottom: 11px; margin-top: 0 !important; }
.ph-search kbd { top: auto !important; bottom: 7px; transform: none !important; }
.ph-search .input { height: 38px; }
.c-head:not(:has(> :not(.titles))) .titles:not(:has(> :not(h1):not(br):not(p[hidden]))) { display: none; }
@media (max-width: 820px) { .ph-acts-row .ph-search { flex: 1 1 100%; min-width: 0; } }

/* ---------- Phone: two buttons at the bottom (ClickOn · Pages) and an iOS-style Pages sheet ---------- */
@media (max-width: 820px) {
  .tabbar.tabbar-two { padding: 6px 24px calc(8px + env(safe-area-inset-bottom, 0px)); gap: 12px; }
  .tabbar.tabbar-two .tab { font-size: 11px; }
  .tabbar.tabbar-two .tab-icon { width: 56px; height: 30px; }
  dialog.ios-sheet { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 86vh; overflow-y: auto; border: 0; border-radius: 14px 14px 0 0;
    padding: 0 16px calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--bg); box-shadow: 0 -10px 40px rgba(0, 0, 0, .25);
    transition: transform .22s cubic-bezier(.2, .8, .3, 1); }
  dialog.ios-sheet[open] { animation: iosUp .28s cubic-bezier(.2, .8, .3, 1); }
  dialog.ios-sheet.closing { transform: translateY(100%); transition: transform .22s ease-in; }
  dialog.ios-sheet::backdrop { background: rgba(0, 0, 0, .4); animation: iosFade .28s ease; }
  @keyframes iosUp { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes iosFade { from { opacity: 0; } to { opacity: 1; } }
}
.ios-grab { width: 38px; height: 5px; border-radius: 3px; background: var(--line2); margin: 8px auto 4px; }
.ios-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 12px; }
.ios-head h2 { font: 600 17px/1.2 var(--f-head); }
.ios-done { border: 0; background: none; padding: 6px 4px; font: 600 15px/1 var(--f-body); color: var(--accent-text); cursor: pointer; }
.ios-group { list-style: none; margin: 0 0 16px; padding: 0; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.ios-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 12px 0 10px; color: var(--ink); text-decoration: none; font-size: 15.5px; }
.ios-group li + li .ios-row { box-shadow: inset 54px 1px 0 -53px var(--line); }
.ios-group li + li { border-top: 1px solid var(--line); margin-left: 52px; }
.ios-group li + li .ios-row { margin-left: -52px; box-shadow: none; }
.ios-row:active { background: var(--sunken); }
.ios-ic { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--tint, var(--sunken)); color: var(--ink); }
.ios-ic svg { width: 17px; height: 17px; }
.ios-lbl { flex: 1; min-width: 0; }
.ios-row .badge { font: 600 11px/1 var(--f-body); padding: 3px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.ios-here { font-size: 12.5px; color: var(--text3); }
.ios-chev { display: inline-flex; color: var(--text3); }
.ios-chev svg { width: 15px; height: 15px; }
.ios-row[aria-current="page"] .ios-lbl { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { dialog.ios-sheet, dialog.ios-sheet[open], dialog.ios-sheet::backdrop { animation: none; transition: none; } }

/* ---------- Phone: one chat bar at the bottom (ClickOn button · message box · hide · send), or a ClickOn bubble when hidden ---------- */
.cb-bubble, .cb-crew { display: none; }
@media (max-width: 820px) {
  :root { --tabbar-space: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .tabbar.crewbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); }
  .cb-crew { position: relative; display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; }
  .cb-mark svg { width: 20px; height: 20px; display: block; }
  .cb-crew .badge, .cb-bubble .badge { position: absolute; top: -3px; right: -3px; min-width: 18px; padding: 0 5px; border-radius: 9px; font: 600 10.5px/18px var(--f-body); text-align: center; background: var(--ink); color: var(--bg); }
  .cb-pill { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; padding: 5px 5px 5px 8px; border-radius: 26px; border: 1px solid var(--line2); background: var(--surface); }
  .cb-pill:focus-within { border-color: var(--accent); }
  .cb-pill input { flex: 1; min-width: 0; height: 36px; border: 0; background: none; color: var(--ink); font: 15px/1 var(--f-body); padding: 0 4px; }
  .cb-pill input:focus { outline: none; }
  .cb-pill input::placeholder { color: var(--text3); }
  .cb-clip { flex: 0 0 32px; width: 32px; height: 32px; border: 0; background: none; color: var(--text3); display: grid; place-items: center; cursor: pointer; }
  .cb-clip svg { width: 18px; height: 18px; }
  .cb-hide, .cb-send { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; }
  .cb-hide { background: var(--ink); color: var(--bg); }
  .cb-hide svg { width: 16px; height: 16px; transform: rotate(90deg); }
  .cb-send { background: var(--accent); color: var(--on-accent); }
  .cb-send svg { width: 17px; height: 17px; transform: rotate(-90deg); }
  /* Hidden: the bar folds into a ClickOn bubble at the bottom right */
  .crewbar-hidden .tabbar.crewbar { display: none; }
  .crewbar-hidden.has-tabs { padding-bottom: 0; }
  /* The page's tabs under the chat bar (crew-shell.js › dockTabs): one row that swipes sideways */
  .tabbar.crewbar { flex-wrap: wrap; row-gap: 8px; }
  .cb-tabs-row { flex: 0 0 100%; order: 3; min-width: 0; margin: 0 -10px; padding: 0 10px; overflow: hidden; }
  .cb-tabs-row .ph-tabs, .cb-tabs-row .res-tabs-row { margin: 0; padding: 0; border: 0; }
  .tabs-docked main .res-bar:not(:has(> *)) { display: none; }
  .cb-tabs-row .res-tabs-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .cb-tabs-row .tabs-wrap { margin: 0; }
  .cb-tabs-row .ph-tabs .tabs, .cb-tabs-row .ph-tabs .sec-tabs, .cb-tabs-row .tabs[role="tablist"], .cb-tabs-row .res-tabs { flex-wrap: nowrap; margin-right: 0; padding-right: 0; }
  .cb-tabs-row [role="tab"], .cb-tabs-row .sec-tabs a { height: 34px; padding: 0 12px !important; font-size: 13px !important; }
  /* Chat bar hidden: the tabs stay; the round button sits above them */
  .crewbar-hidden.tabs-docked .tabbar.crewbar { display: flex; }
  .crewbar-hidden.tabs-docked .tabbar.crewbar > :not(.cb-tabs-row) { display: none; }
  .crewbar-hidden.tabs-docked.has-tabs { padding-bottom: var(--tabbar-space); }
  .crewbar-hidden.tabs-docked .cb-bubble { bottom: calc(var(--tabbar-space) + 10px); }
  .crewbar-hidden .cb-bubble { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 45; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 0;
    background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .45); cursor: pointer; }
  .crewbar-hidden .cb-bubble .cb-mark svg { width: 24px; height: 24px; }
  .motion .crewbar-hidden .cb-bubble { animation: pop .25s cubic-bezier(.2, .8, .3, 1.3); }
  /* The old floating "Ask Clicky" button isn't needed on a phone: the bar is always there */
  #crew-ask { display: none !important; }
  /* On the chat with Clicky: the round ClickOn button sits left of its message box */
  .thread .cc-compose { display: flex; align-items: flex-end; gap: 8px; }
  .thread .cc-compose .cc-form { flex: 1; min-width: 0; }
  .cb-crew.in-chat { display: grid; margin-bottom: 6px; }
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 820px) {
  .thread .cc-compose { flex-direction: row !important; align-items: flex-end; }
  .cb-crew.in-chat { flex: 0 0 46px; width: 46px; height: 46px; margin: 0 0 3px; }
}
/* ClickOn's message box in your screenshot's style: one rounded box, a round orange send button */
.cc-field { border-radius: 24px; padding: 8px 12px 6px 14px; }
.cc-form { align-items: flex-end; }
.cc-form .btn.primary[type="submit"] { width: 44px; height: 44px; padding: 0; border-radius: 50%; justify-content: center; flex: 0 0 44px; margin-bottom: 2px; }
.cc-form .btn.primary[type="submit"] .lbl { display: none; }
.cc-form .btn.primary[type="submit"] svg { width: 18px; height: 18px; margin: 0; }
@media (max-width: 820px) {
  /* The menu (all pages) is orange, so it reads as a button at a glance (Yan, November 20, 2026) */
  .cb-crew.cb-menu { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); box-shadow: 0 2px 8px -2px rgba(236, 102, 54, .45); }
  .cb-crew.cb-menu .cb-mark svg { width: 21px; height: 21px; stroke-width: 2.4; }
  .cb-crew.cb-menu:active { filter: brightness(.92); }
}

/* ---------- Phone fixes (November 16, 2026) ---------- */
@media (max-width: 820px) {
  /* No zoom when you tap a text box (iPhone zooms in on text under 16px) or double-tap */
  input, textarea, select { font-size: 16px !important; }
  html, body { touch-action: manipulation; }
  /* The ClickOn chat has no chat bar under it: no empty strip */
  body:not(.has-tabs) { --tabbar-space: 0px; }
  .thread-head { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
  .thread-head::-webkit-scrollbar { display: none; }
  .thread-head .jump-btn { flex: 0 0 auto; }
  /* Team and Data flow: the list first, the chart on request */
  /* Hidden bar: one orange round button with the menu icon, same round style as the menu button */
  .crewbar-hidden .cb-bubble { width: 46px; height: 46px; box-shadow: none; border: 1px solid var(--accent); }
  .crewbar-hidden .cb-bubble .cb-mark svg { width: 20px; height: 20px; }
  #crew-dock .cc-compose { flex-direction: row !important; align-items: flex-end; gap: 8px; }
  /* The chat over a page opens at half height; Full screen makes it fill the screen */
  dialog.dock { inset: auto 0 0 0; width: 100vw; height: 58vh; height: 58dvh; border-left: 0; border-top: 1px solid var(--line2); border-radius: 16px 16px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .3); transition: height .25s ease; }
  dialog.dock.is-full { height: 100vh; height: 100dvh; border-radius: 0; }
  .dock-head { position: relative; padding-top: 18px; }
  .dock-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--line2); }
  .dock-head .dock-page { display: none; }
  .dock-full svg { width: 14px; height: 14px; transform: rotate(-90deg); }
  .dock-full[aria-pressed="true"] svg { transform: rotate(90deg); }
}
@media (min-width: 821px) { .dock-full { display: none !important; } }
@media (max-width: 820px) {
  /* The diagram fills the screen under the title; its list follows below */
  .show-diagram #board.board { height: calc(100dvh - var(--tabbar-space) - 150px); min-height: 360px; }
}
@media (max-width: 820px) {
  /* The message box fills the row between the menu button and Send */
  #crew-dock .cc-compose .cc-form { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 820px) {
  /* Phone header: only the business, nothing else (Yan, November 16, 2026). Settings and every page are in the menu button's Pages sheet */
  .side > :not(.brand) { display: none !important; }
}

/* ---------- Chat as glass (Yan, November 16, 2026) ----------
   Opening the chat used to squeeze the page. Now it floats over the page like an iPhone panel: see-through, blurred,
   rounded, and the page under it keeps its layout. */
dialog.dock {
  --glass: color-mix(in srgb, var(--surface) 72%, transparent);
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(1.6); backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28), inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent);
}
@media (min-width: 821px) {
  dialog.dock { inset: 12px 12px 12px auto; width: min(420px, calc(100vw - 24px)); height: auto; border-radius: 20px; overflow: hidden; }
}
.dock-head, .dock .cc-compose { background: transparent; border-color: color-mix(in srgb, var(--ink) 10%, transparent); }
.dock .cc-field { background: color-mix(in srgb, var(--surface) 60%, transparent); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { dialog.dock { background: var(--surface); } }
/* Platform logos next to platform names (assets/platform-logos.js) */
.plat-logo { display: inline-flex; vertical-align: -4px; margin-right: 6px; }
.plat-logo .logo.sm { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 5px; }
.plat-logo .logo.sm svg { width: 11px; height: 11px; }
.plat-replaced { display: none !important; }
/* Chip styles written as “.x span” must not reach the logo inside a chip */
.plat-logo { padding: 0 !important; background: none !important; border: 0 !important; border-radius: 0 !important; font-size: inherit !important; }
.plat-logo .logo.sm { padding: 0 !important; margin: 0 !important; }
.plat-logo .logo.sm { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: 5px !important; }
