:root {
    --sb: rgba(246,246,248,0.86);
    --ground: #F5F5F7;
    --surface: #FFFFFF;
    --raise: #FFFFFF;
    --raise2: #E9E9EB;
    --hover: rgba(0,0,0,0.045);
    --active: rgba(0,0,0,0.07);
    --ink: #1D1D1F;
    --muted: #86868B;
    --dim: #AEAEB2;
    --hairline: rgba(0,0,0,0.09);
    --white: #0A7AFF;
    --blue: #0A7AFF;
    --blue-deep: #0066D6;
    --good: #34A853;
    --good-soft: rgba(52,168,83,0.12);
    --good-fill: #E7F4EA;
    --draft: #C77700;
    --draft-soft: rgba(255,159,10,0.14);
    --contrib: #AF52DE;
    --shadow-soft: 0 1px 2px rgba(0,0,0,0.04), 0 6px 24px rgba(0,0,0,0.06);
    --menu-bg: rgba(252,252,254,0.92);
    --dialog-bg: rgba(252,252,254,0.94);
    --plus-hover: #DEDEE3;
    --mapdot: rgba(0,0,0,0.14);
    --glass-brd: rgba(255,255,255,0.55);
    --glass-hi: rgba(255,255,255,0.4);
    --glass-bg: rgba(255,255,255,0.5);
    --glass-bright: rgba(255,255,255,0.82);
    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --sb: rgba(30,30,32,0.86);
      --ground: #1C1C1E;
      --surface: #2C2C2E;
      --raise: #2C2C2E;
      --raise2: #3A3A3C;
      --hover: rgba(255,255,255,0.055);
      --active: rgba(255,255,255,0.09);
      --ink: #F5F5F7;
      --muted: #98989D;
      --dim: #636366;
      --hairline: rgba(255,255,255,0.11);
      --blue: #0A84FF;
      --blue-deep: #3B9BFF;
      --good: #30D158;
      --good-soft: rgba(48,209,88,0.16);
      --good-fill: #22392B;
      --draft: #FFD60A;
      --draft-soft: rgba(255,214,10,0.16);
      --contrib: #BF5AF2;
      --shadow-soft: 0 1px 2px rgba(0,0,0,0.3), 0 6px 24px rgba(0,0,0,0.35);
      --menu-bg: rgba(44,44,46,0.92);
      --dialog-bg: rgba(44,44,46,0.96);
      --plus-hover: #48484A;
      --mapdot: rgba(255,255,255,0.13);
      --glass-brd: rgba(255,255,255,0.16);
      --glass-hi: rgba(255,255,255,0.1);
      --glass-bg: rgba(50,50,54,0.45);
      --glass-bright: rgba(58,58,62,0.66);
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --sb: rgba(30,30,32,0.86);
    --ground: #1C1C1E;
    --surface: #2C2C2E;
    --raise: #2C2C2E;
    --raise2: #3A3A3C;
    --hover: rgba(255,255,255,0.055);
    --active: rgba(255,255,255,0.09);
    --ink: #F5F5F7;
    --muted: #98989D;
    --dim: #636366;
    --hairline: rgba(255,255,255,0.11);
    --blue: #0A84FF;
    --blue-deep: #3B9BFF;
    --good: #30D158;
    --good-soft: rgba(48,209,88,0.16);
    --good-fill: #22392B;
    --draft: #FFD60A;
    --draft-soft: rgba(255,214,10,0.16);
    --contrib: #BF5AF2;
    --shadow-soft: 0 1px 2px rgba(0,0,0,0.3), 0 6px 24px rgba(0,0,0,0.35);
    --menu-bg: rgba(44,44,46,0.92);
    --dialog-bg: rgba(44,44,46,0.96);
    --plus-hover: #48484A;
    --mapdot: rgba(255,255,255,0.13);
    --glass-brd: rgba(255,255,255,0.16);
    --glass-hi: rgba(255,255,255,0.1);
    --glass-bg: rgba(50,50,54,0.45);
    --glass-bright: rgba(58,58,62,0.66);
    color-scheme: dark;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; height: 100%; }
  body {
    font-family: var(--sans);
    background: var(--ground);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    font-size: 15px;
    letter-spacing: -0.011em;
  }
  .app {
  display: grid; grid-template-columns: 262px 1fr;
  grid-template-rows: minmax(0, 1fr);
  height: 100vh;
  transition: grid-template-columns 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
  #scrim {
    position: fixed; inset: 0; z-index: 55;
    background: rgba(0,0,0,0.35);
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  }
  @media (max-width: 660px) {
    /* the sidebar slides over the content here, so there is nothing to sit beside */
    body { --sbw: 0px; }
    .app, .app.collapsed { grid-template-columns: 1fr; }
    #sidebar {
      position: fixed; top: 0; left: 0; bottom: 0; width: 280px; z-index: 60;
      transform: translateX(-100%);
      transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 0 60px rgba(0,0,0,0.22);
    }
    .app.collapsed #sidebar { opacity: 1; pointer-events: auto; border-right-color: var(--hairline); }
    body.sbopen #sidebar { transform: none; }
    body.sbopen #scrim { opacity: 1; pointer-events: auto; }
  }

  svg { display: block; }
  .ic { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }

  /* ============ sidebar ============ */
  #sidebar {
    background: var(--sb);
    backdrop-filter: blur(30px) saturate(1.5);
    -webkit-backdrop-filter: blur(30px) saturate(1.5);
    border-right: 0.5px solid var(--hairline);
    display: flex; flex-direction: column;
    padding: 14px 12px 10px;
    overflow-y: auto;
  }
  .brand {
    display: flex; align-items: center; gap: 7px;
    padding: 4px 8px 16px;
  }
  .brand b { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
  .brand .plus { font-weight: 400; color: var(--muted); font-size: 15px; }
  .brand .spacer { flex: 1; }
  .brand button {
    background: transparent; border: none; color: var(--muted);
    padding: 4px; border-radius: 7px; cursor: pointer;
  }
  .brand button:hover { color: var(--ink); background: var(--hover); }

  .navrow {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: 8px; cursor: pointer;
    font-size: 13.5px; color: var(--ink); margin-bottom: 1px;
  }
  .navrow:hover { background: var(--hover); }
  .navrow.hl { background: rgba(10,122,255,0.10); color: var(--blue-deep); font-weight: 600; }
  .navrow.hl .ic { color: var(--blue-deep); }
  .navrow.on { background: var(--active); font-weight: 600; }
  .navrow .ic { color: var(--muted); }
  .navrow .count {
    margin-left: auto; font-size: 10.5px; font-weight: 700;
    background: var(--blue); color: #fff; border-radius: 99px; padding: 1px 7px;
  }

  .seclabel {
    font-size: 11px; font-weight: 700; color: var(--muted);
    padding: 18px 10px 6px; letter-spacing: 0.02em;
  }
  .recent {
    padding: 7px 10px; border-radius: 8px; cursor: pointer;
    font-size: 13.5px; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: flex; align-items: center; gap: 8px;
  }
  .recent:hover { background: var(--hover); }
  .recent.on { background: var(--active); font-weight: 600; }
  .recent .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-left: auto; }
  .dot.active { background: #28C840; } .dot.draft { background: #FEBC2E; }

  #sbfoot {
    position: sticky; bottom: 12px; margin-top: auto;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 2px 2px 10px;
  }
  #account {
    width: 40px; height: 40px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 700; color: var(--ink); cursor: pointer;
    background: var(--glass-bright);
    backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7);
    border: 0.5px solid var(--glass-brd);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), inset 0 1px 0 var(--glass-hi);
  }
  #account:hover { filter: brightness(0.97); }
  .nfbtn {
    flex: none; margin-left: auto; padding: 0 22px; height: 36px; border-radius: 999px; border: none;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    font-family: var(--sans); font-size: 12.5px; font-weight: 650; color: #fff;
    cursor: pointer;
    background: var(--blue);
    box-shadow: 0 8px 24px rgba(10,122,255,0.32);
  }
  .nfbtn:hover { background: var(--blue-deep); }
  /* profile / settings sheet */
  .profhead { text-align: center; padding: 6px 0 18px; }
  .profav {
    width: 64px; height: 64px; margin: 0 auto 10px;
    font-size: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700;
  }
  .profav .pdot { width: 13px; height: 13px; right: 1px; bottom: 1px; }
  .profnm { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
  .profem { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
  .setlbl { font-size: 12px; font-weight: 700; color: var(--muted); margin: 16px 4px 7px; }
  .setcard {
    background: var(--ground); border-radius: 14px; overflow: hidden;
  }
  .setrow {
    display: flex; align-items: center; gap: 11px;
    padding: 12px 14px; font-size: 14px; color: var(--ink);
  }
  .setrow + .setrow { border-top: 0.5px solid var(--hairline); }
  .setrow.tap { cursor: pointer; }
  .setrow.tap:hover { background: var(--hover); }
  .setrow .ic { width: 17px; height: 17px; color: var(--muted); }
  .setrow .go { margin-left: auto; }
  .setrow .setval { margin-left: auto; font-size: 12.5px; color: var(--muted); }
  .setrow .setval + .go { margin-left: 6px; }
  .setrow .sub2 { font-size: 11px; color: var(--dim); margin-left: -4px; }
  .setrow .avatar { width: 26px; height: 26px; font-size: 9px; }
  .setrow .roleselect { margin-left: auto; }
  .filterbtn { display: inline-flex; align-items: center; gap: 6px; }
  #sbfoot.rowfoot { padding: 8px 0 0; bottom: -10px; margin-bottom: -10px; }
  .acrow {
    width: 100% !important; height: auto !important; border-radius: 10px !important;
    display: flex; align-items: center; gap: 10px; justify-content: flex-start !important;
    padding: 8px 10px; cursor: pointer;
    background: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    border: none !important; box-shadow: none !important;
  }
  .acrow:hover { background: var(--hover) !important; filter: none; }
  .acrow .av {
    width: 32px; height: 32px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff;
  }
  .acrow .nm { font-size: 13.5px; font-weight: 600; color: var(--ink); }
  .acrow .wsafter { color: var(--muted); font-weight: 500; }
  .filterbtn .ic { width: 14px; height: 14px; }
  .btn.wide { width: 100%; justify-content: center; text-align: center; padding: 11px; font-size: 13.5px; display: flex; }
  /* settings header: back inline with title and X */
  #profiledetail .sheetback { position: absolute; top: -12px; left: -8px; margin: 0; padding: 6px 8px; z-index: 2; }
  #profiledetail .tdtitle { text-align: center; }
  /* bigger, editable profile avatar */
  .profav { width: 84px !important; height: 84px !important; font-size: 26px !important; cursor: pointer; position: relative; }
  .profav .avimg { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
  .avedit {
    position: absolute; right: -2px; bottom: -2px;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--surface); border: 0.5px solid var(--hairline);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: var(--muted); box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  }
  .avatar .avimg, .mavatar .avimg { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
  /* mobile pane slide */
  #profiledetail.slin { animation: slin 0.26s cubic-bezier(0.2, 0.7, 0.3, 1); }
  #profiledetail.slback { animation: slback 0.26s cubic-bezier(0.2, 0.7, 0.3, 1); }
  @keyframes slin { from { transform: translateX(9%); opacity: 0.4; } to { transform: none; opacity: 1; } }
  @keyframes slback { from { transform: translateX(-9%); opacity: 0.4; } to { transform: none; opacity: 1; } }
  /* web settings window */
  #ov-profile .dialog:has(.setwin) { width: min(760px, calc(100vw - 60px)); padding: 0; overflow: hidden; }
  .setwin { display: flex; min-height: 460px; }
  .setnav {
    width: 190px; flex: none; background: var(--ground);
    border-right: 0.5px solid var(--hairline); padding: 14px 10px;
  }
  .setnav .setx { position: static; margin: 0 0 14px 4px; }
  .setnavrow {
    padding: 9px 12px; border-radius: 9px; cursor: pointer;
    font-size: 13.5px; color: var(--ink); margin-bottom: 2px;
  }
  .setnavrow:hover { background: var(--hover); }
  .setnavrow.on { background: var(--active); font-weight: 650; }
  .setbody { flex: 1; padding: 22px 26px; overflow-y: auto; max-height: 74vh; position: relative; }
  .setbody .profhead { text-align: left; display: flex; align-items: center; gap: 16px; padding-bottom: 16px; }
  .setbody .profhead .profav { margin: 0; }
  .setbody .tdtitle { text-align: left; }
  #account .av {
    width: 32px; height: 32px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff;
  }
  #account .nm { font-size: 13.5px; font-weight: 600; }
  #account .sb2 { font-size: 11px; color: var(--muted); margin-top: 1px; }

  /* ============ main ============ */
  #main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; background: var(--ground); }
  #topbar {
    display: flex; align-items: center; justify-content: center;
    padding: 13px 20px; min-height: 54px; position: relative;
  }
  .seg {
    display: inline-flex; background: var(--raise2); border-radius: 9px; padding: 2px;
    position: relative;
  }
  .segpill {
    position: absolute; top: 2px; bottom: 2px; left: 0; width: 0;
    background: var(--surface); border-radius: 7px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.09);
    transition: transform 0.26s cubic-bezier(0.3, 0.8, 0.3, 1), width 0.26s cubic-bezier(0.3, 0.8, 0.3, 1);
    pointer-events: none;
  }
  @media (prefers-reduced-motion: reduce) { .segpill { transition: none; } }
  .seg button { position: relative; z-index: 1; }
  .seg button {
    font-family: var(--sans); font-size: 13px; font-weight: 600;
    border: none; background: transparent; color: var(--muted);
    padding: 6px 26px; border-radius: 7px; cursor: pointer;
  }
  .seg button.on {
    background: var(--surface); color: var(--ink);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(0,0,0,0.04);
  }
  /* the strip with a sliding pill lets the pill do the highlighting */
  .seg.slider button.on { background: transparent; box-shadow: none; }
  #topright { position: absolute; right: 18px; color: var(--muted); }
  .topin {
    width: min(760px, 100%); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: center;
  }
  .topin .facepile { margin-left: auto; }
  body.collapsed .topin { padding-left: 24px; }
  body.mobile .topin { padding: 0 10px; justify-content: center; }
  #toptitle {
    position: absolute; left: 58px; top: 50%; transform: translateY(-50%);
    font-size: 14px; font-weight: 650; letter-spacing: -0.012em;
    white-space: nowrap; display: none;
  }
  body.collapsed #toptitle { display: block; }
  body.mobile #toptitle { display: none; }

  #content { flex: 1; min-height: 0; overflow-y: auto; overflow-anchor: none; display: flex; flex-direction: column; }

  /* ---- home hero ---- */
  .hero {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: flex-end;
    padding: 0 24px 22px;
  }
  .herospace { flex: 1; }
  .sugs { width: min(660px, 100%); margin: 0 0 18px; }
  .sug {
    display: flex; align-items: center; gap: 16px;
    padding: 12px 6px; border-radius: 10px; cursor: pointer;
    font-size: 15.5px; color: var(--ink);
  }
  .sug:hover { background: var(--hover); }
  .sug .ic { width: 21px; height: 21px; color: var(--muted); flex: none; }

  /* ---- composer pill ---- */
  .pillbox {
    width: min(660px, 100%);
    display: flex; align-items: center; gap: 8px;
    background: var(--surface);
    border: 0.5px solid var(--hairline);
    border-radius: 999px;
    padding: 7px 8px 7px 10px;
    box-shadow: var(--shadow-soft);
  }
  .pillbox:focus-within { border-color: rgba(10,122,255,0.5); box-shadow: 0 0 0 3.5px rgba(10,122,255,0.12), var(--shadow-soft); }
  .pillbox.tall {
    flex-direction: column; align-items: stretch; gap: 6px;
    border-radius: 26px; padding: 14px 12px 10px 16px;
  }
  .pillinput {
    width: 100%; border: none; outline: none; background: transparent; resize: none;
    font-family: var(--sans); font-size: 15.5px; line-height: 1.5; color: var(--ink);
    min-height: 58px; max-height: 200px; overflow-y: auto; padding: 0 4px;
  }
  .pillinput::placeholder { color: var(--dim); }
  .pillbox.tall .pillrow { gap: 6px; }
  .pillspace { flex: 1; }
  .dhead { display: flex; align-items: center; gap: 10px; }
  .dhead h2 { margin-bottom: 0; }
  .dacts { display: flex; align-items: center; gap: 2px; margin-left: auto; }
  .iconbtn {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: 8px; color: var(--muted); cursor: pointer;
  }
  .iconbtn:hover { background: var(--hover); color: var(--ink); }
  .iconbtn .ic { width: 18px; height: 18px; }
  .iconbtn.del { color: #FF3B30; }
  .iconbtn.del:hover { background: rgba(255,59,48,0.12); color: #FF3B30; }
  .iconbtn.del.armed { background: #FF3B30; color: #fff; }
  .facemore {
    display: inline-flex; align-items: center; justify-content: center;
    height: 26px; min-width: 26px; padding: 0 6px; margin-left: -6px;
    border-radius: 999px; background: var(--raise2); color: var(--muted);
    font-size: 10.5px; font-weight: 700; border: 2px solid var(--ground);
  }
  .cmtlist { display: flex; flex-direction: column; gap: 12px; margin-top: 2px; }
  .cmtrow { display: flex; gap: 10px; align-items: flex-start; }
  .cmtwho { font-size: 12px; font-weight: 600; color: var(--ink); }
  .cmtwhen { font-weight: 500; color: var(--dim); margin-left: 7px; }
  .cmttxt { font-size: 14px; line-height: 1.45; color: var(--ink); margin-top: 2px; }
  .cmtadd { margin-top: 14px; }
  .tdseg { display: flex; width: fit-content; margin: 14px auto 16px; }
  .tdseg .segn {
    font-size: 10.5px; font-weight: 700; color: var(--muted);
    background: var(--raise2); border-radius: 999px; padding: 0 6px; margin-left: 5px;
  }
  .tdseg button.on .segn { background: rgba(10,122,255,0.14); color: var(--blue-deep); }
  .pollopt.notmine { opacity: 0.45; }
  .pollopt.notmine:hover { opacity: 0.75; }
  .cmtbody { min-width: 0; flex: 1; }
  .cmtsub { margin-left: 26px; }
  .cmtreply {
    background: none; border: none; padding: 3px 0 0; margin: 0;
    font-family: var(--sans); font-size: 11.5px; font-weight: 600;
    color: var(--muted); cursor: pointer;
  }
  .cmtreply:hover { color: var(--blue); }
  .cmtreplybar {
    display: flex; align-items: center; gap: 6px; position: relative;
    margin-top: 12px; padding: 7px 26px 7px 10px; border-radius: 10px;
    background: var(--raise2); font-size: 12px; color: var(--muted); width: fit-content;
  }
  .cmtreplybar .attx { color: var(--muted); text-shadow: none; top: 50%; transform: translateY(-50%); right: 4px; }
  .reschip .rs { color: var(--good); font-weight: 600; }
  .findcard { cursor: pointer; }
  .showmore {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 13px; margin: 8px 0; max-width: 460px;
    border: 0.5px dashed var(--hairline); border-radius: 12px;
    font-size: 13px; font-weight: 600; color: var(--blue); cursor: pointer;
    background: var(--surface);
  }
  .showmore:hover { background: var(--plus-hover); }
  .showmore .smgo { color: var(--blue); font-weight: 700; }
  #ov-more .dialog { width: min(560px, calc(100vw - 40px)); max-height: 80vh; overflow-y: auto; position: relative; }
  #ov-more .dx { top: 12px; right: 14px; }
  #moredetail .tdtitle { text-align: left; padding-right: 34px; }
  .morenote { font-size: 14px; line-height: 1.55; color: var(--ink); margin: 4px 0 14px; }
  .morelist .wcard, .morelist .taskrow { max-width: none; }
  .morelist .wstack { margin: 0; }
  .readmark { cursor: pointer; }
  .readmark .mavatar + .mavatar { margin-left: -7px; }
  .readmark .mavatar { border: 1.5px solid var(--ground); }
  .readmore {
    font-size: 9.5px; font-weight: 700; color: var(--muted);
    background: var(--raise2); border: 1.5px solid var(--ground);
    border-radius: 999px; padding: 1px 5px; margin-left: -6px;
  }
  /* long people lists scroll inside their own box, never off the screen */
  #ov-members .dialog.memdlg {
    display: flex; flex-direction: column; max-height: 78vh;
    overflow: hidden; position: relative; padding: 0 0 20px;
  }
  /* one header line: back on the left, close on the right, both centred on it */
  .memdlg .dx { top: 10px; right: 12px; width: 28px; height: 28px; }
  #memtitle { height: 28px; display: flex; align-items: center; margin: 0 0 6px; }
  #memperson .sheetback {
    position: absolute; top: 10px; left: 12px; height: 28px;
    margin: 0; padding: 0 4px; display: inline-flex; align-items: center;
  }
  #memperson .profhead { margin-top: 34px; }
  #mempanes {
    display: flex; width: 200%; flex: 1; min-height: 0;
    transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
  }
  #mempanes.personopen { transform: translateX(-50%); }
  .mpane { width: 50%; min-height: 0; display: flex; flex-direction: column; position: relative; padding: 10px 22px 0; }
  #memberlist {
    flex: 1; min-height: 0; overflow-y: auto;
    margin: 6px -6px 0; padding: 0 6px;
  }
  #memperson { overflow-y: auto; }
  #memperson .profhead { padding-bottom: 14px; }
  .mem { cursor: pointer; border-radius: 10px; }
  .mem:hover { background: var(--hover); }
  .mem .go { margin-left: auto; color: var(--dim); }
  @media (prefers-reduced-motion: reduce) { #mempanes { transition: none; } }
  .teamlist {
    max-height: calc(100vh - 300px); min-height: 160px; overflow-y: auto;
    margin: 0 -6px; padding: 0 6px;
  }
  body.mobile .teamlist { max-height: none; overflow: visible; margin: 0; padding: 0; }
  #ov-tfilter .dialog { max-height: 82vh; overflow-y: auto; }
  #ov-tfilter .dx { top: 10px; right: 12px; }
  #tfilterdetail .tdtitle { padding-right: 34px; }
  .setcard.scrolly { max-height: 46vh; overflow-y: auto; }
  #profiledetail .setcard.scrolly { max-height: 52vh; }
  .arcsec { cursor: pointer; display: flex; align-items: center; gap: 6px; }
  .arcsec .arcchev { display: flex; transition: transform 0.18s ease; color: var(--dim); }
  .arcsec .arcchev .ic { width: 13px; height: 13px; }
  .arcsec.open .arcchev { transform: rotate(180deg); }
  .arcsec .arcn { margin-left: auto; font-weight: 600; color: var(--dim); }
  .recent.arc { color: var(--muted); }
  .pillrow { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
  .pillbox.stacked { flex-direction: column; align-items: stretch; border-radius: 24px; gap: 8px; padding: 10px 8px 7px 10px; }
  .pillbox.stacked .pillrow { width: 100%; }
  .attstrip { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 2px; }
  .attitem {
    position: relative; display: flex; align-items: center; gap: 7px;
    background: var(--raise2); border-radius: 12px; padding: 6px 24px 6px 7px;
    max-width: 200px; font-size: 12px;
  }
  .attitem img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; display: block; }
  .attitem .ic { width: 17px; height: 17px; color: var(--muted); flex: none; }
  .attitem .an { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; font-weight: 600; }
  .attx {
    position: absolute; top: 2px; right: 3px;
    width: 17px; height: 17px;
    background: none; color: #fff; border: none; cursor: pointer;
    font-size: 13px; font-weight: 700; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 0; text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  }
  .attx:hover { color: #fff; transform: scale(1.15); }
  .modetag .attx, .replychip .attx { color: var(--muted); text-shadow: none; }
  .modetag .attx:hover, .replychip .attx:hover { color: var(--ink); }
  .pillbox .plus {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; color: var(--muted); cursor: pointer; flex: none;
  }
  .pillbox .plus:hover { color: var(--ink); }
  .pillbox input {
    flex: 1; border: none; outline: none; background: transparent;
    font-family: var(--sans); font-size: 15px; color: var(--ink);
    min-width: 0;
  }
  .pillbox input::placeholder { color: var(--dim); }
  .modechip {
    display: inline-flex;
    align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600; color: var(--muted);
    background: var(--raise2); border-radius: 999px; padding: 4px 10px; flex: none;
    cursor: pointer;
  }
  .modechip:hover { color: var(--ink); }
  .modechip.dec { color: var(--blue-deep); background: rgba(10,122,255,0.12); }
  .modechip .ic { width: 12px; height: 12px; }
  .agentsel {
    display: flex; align-items: center; gap: 5px;
    font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer;
    padding: 6px 8px; border-radius: 8px; flex: none;
    background: transparent; border: none; font-family: var(--sans);
  }
  .agentsel:hover { background: var(--hover); color: var(--ink); }
  .mainbtn {
    width: 40px; height: 40px; border-radius: 50%; flex: none;
    background: var(--blue); color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s ease;
  }
  .mainbtn:hover { background: var(--blue-deep); }
  .mainbtn .ic { stroke: #fff; width: 17px; height: 17px; }

  /* popup menus */
  .menu {
    position: absolute; z-index: 40;
    background: var(--menu-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 0.5px solid var(--hairline);
    border-radius: 12px; padding: 5px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.16);
    display: none; min-width: 230px;
  }
  .menu.open { display: block; }
  .menu .mi {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px; cursor: pointer;
    font-size: 13.5px; color: var(--ink);
  }
  .menu .mi:hover { background: var(--blue); color: #fff; }
  .menu .mi.danger { color: #FF3B30; }
  .menu .mi.danger:hover { background: #FF3B30; color: #fff; }
  .menu .mi.off { color: var(--muted); cursor: default; }
  .menu .mi.off:hover { background: none; color: var(--muted); }
  .menu .mhead { padding: 7px 10px 4px; font-size: 11px; color: var(--muted); }
  .recent.held { background: var(--active); }
  #containermenu { z-index: 75; }
  .menu .mi:hover .sub, .menu .mi:hover .ic { color: rgba(255,255,255,0.85); }
  .menu .mi .sub { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
  .menu .mi .ic { width: 16px; height: 16px; color: var(--muted); }
  .menudiv { height: 0.5px; background: var(--hairline); margin: 5px 8px; }
  .mi.conn { min-width: 190px; }
  .tgl {
    margin-left: auto; flex: none;
    width: 32px; height: 19px; border-radius: 999px;
    background: var(--raise2); position: relative;
    transition: background 0.18s ease;
  }
  .tgl i {
    position: absolute; top: 2px; left: 2px;
    width: 15px; height: 15px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: left 0.18s ease;
  }
  .tgl.on { background: #34C759; }
  .tgl.on i { left: 15px; }
  .menu .mi:hover .tgl { background: rgba(255,255,255,0.4); }
  .menu .mi:hover .tgl.on { background: #34C759; }

  /* attachments */
  .chatimg { display: block; max-width: min(280px, 100%); border-radius: 16px; box-shadow: var(--shadow-soft); cursor: zoom-in; }
  #ov-image { cursor: zoom-out; background: rgba(18,18,20,0.82); z-index: 85; }
  #lightimg {
    max-width: 92%; max-height: 90%;
    border-radius: 14px; box-shadow: 0 30px 90px rgba(0,0,0,0.5);
  }
  #ov-doc { background: rgba(18,18,20,0.6); z-index: 85; }
  #docviewer {
    width: min(860px, calc(100% - 32px)); height: calc(100% - 56px);
    display: flex; flex-direction: column;
    background: var(--dialog-bg);
    backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 30px 90px rgba(0,0,0,0.45);
  }
  #dochead { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
  #docname {
    flex: 1; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .docbtn {
    width: 30px; height: 30px; flex: none; border: none;
    display: flex; align-items: center; justify-content: center;
    background: none; color: var(--muted); font-size: 15px; cursor: pointer;
  }
  .docbtn:hover { color: var(--ink); }
  #docframe { flex: 1; width: 100%; border: 0; background: #525659; }
  .filechip {
    display: flex; align-items: center; gap: 10px;
    background: var(--raise2); border-radius: 14px; padding: 10px 14px;
  }
  .filechip.openable { cursor: pointer; }
  .filechip.openable:hover { background: var(--plus-hover); }
  .filechip.openable:hover .fn { color: var(--blue-deep); }
  .mrow:not(.self) > .stack:first-child { margin-left: 36px; }
  .filechip .ic { width: 20px; height: 20px; color: var(--muted); }
  .filechip .fn { font-size: 13.5px; font-weight: 600; word-break: break-all; }
  .filechip .fs { font-size: 11px; color: var(--muted); margin-top: 1px; }

  /* ---- chat ---- */
  #msgs { width: min(760px, 100%); margin: 0 auto; padding: 10px 24px 14px; flex: 1; }
  .sysline {
    text-align: center; font-size: 12px; color: var(--muted);
    margin: 15px auto; max-width: 500px; line-height: 1.55;
  }
  .sysline b { color: var(--ink); font-weight: 600; }
  .newline {
    display: flex; align-items: center; gap: 10px; margin: 16px 0 10px;
  }
  .newline i { flex: 1; height: 0.5px; background: rgba(10,122,255,0.45); }
  .newline span {
    font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
    color: var(--blue-deep); text-transform: uppercase;
  }
  .recent.hasnew { font-weight: 700; }
  .tid { display: block; font-size: 11px; color: var(--dim); margin-top: 2px; font-weight: 400; }
  .tid .due { font-style: normal; }
  .tid .due.urg { color: #FF3B30; font-weight: 600; }
  .brandlogo { width: 30px; height: 30px; color: var(--ink); flex: none; margin-left: -3px; }
  .wsname { font-size: 15.5px; font-weight: 700; letter-spacing: -0.015em; }
  .taskrow.done .tid { text-decoration: none; }
  .tfilter { margin: -6px 0 14px; display: flex; width: fit-content; }
  .listbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .listbar .tag { margin-bottom: 16px; }
  .listbar .tfilter { margin: 0 0 14px; }
  .tstamp {
    text-align: center; font-size: 11px; font-weight: 600;
    color: var(--dim); margin: 18px auto 6px;
  }
  .pollup {
    text-align: center; font-size: 12px; color: var(--muted);
    margin: 13px auto; max-width: 520px; line-height: 1.5;
  }
  .pollup .declink { color: var(--blue); font-weight: 600; cursor: pointer; }
  .pollup .declink:hover { text-decoration: underline; }
  .mrow { display: flex; gap: 8px; margin: 3px 0; align-items: flex-start; }
  .mrow.self { justify-content: flex-end; }
  #msgs > * + .mrow.self { margin-top: 14px; }
  #msgs .mrow.self + .mrow.self { margin-top: 3px; }
  .stack { max-width: 72%; min-width: 0; }
  .stack.cardstack { max-width: 86%; flex: 1; }
  .cardstack .card { margin: 0; }
  .cardstack .bubble { margin-bottom: 8px; }
  .modetag {
    display: inline-flex; align-items: center; gap: 5px; flex: none;
    font-size: 12px; font-weight: 600; color: var(--blue-deep);
    background: rgba(10,122,255,0.1); border-radius: 999px; padding: 5px 6px 5px 10px;
  }
  .modetag .ic { width: 13px; height: 13px; }
  .modetag .attx { position: static; width: 16px; height: 16px; font-size: 11px; }
  .srcline { display: block; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
  /* presence */
  .avatar { position: relative; }
  .pdot {
    position: absolute; right: -1px; bottom: -1px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--dim); border: 2px solid var(--ground);
  }
  .pdot.on { background: #28C840; }
  /* message actions */
  #msgmenu {
    min-width: 0; display: none; align-items: center; gap: 2px;
    padding: 5px 7px; border-radius: 999px; z-index: 60; white-space: nowrap;
  }
  #msgmenu.open { display: flex; }
  .emo {
    background: none; border: none; font-size: 19px; cursor: pointer;
    padding: 5px 7px; border-radius: 9px; line-height: 1;
  }
  .emo:hover { background: var(--hover); }
  #msgmenu .vdiv { width: 0.5px; height: 20px; background: var(--hairline); margin: 0 5px; flex: none; }
  #msgmenu .mact {
    background: none; border: none; cursor: pointer;
    font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink);
    padding: 6px 9px; border-radius: 9px;
  }
  #msgmenu .mact:hover { background: var(--hover); }
  body.msghold #scrim { opacity: 1; pointer-events: auto; }
  .mrow.held { position: relative; z-index: 58; }
  .mrow.held .bubble { box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
  .reactrow { display: flex; gap: 4px; margin-top: 3px; }
  .reactbadge {
    display: inline-flex; align-items: center; gap: 3px;
    background: var(--surface); border: 0.5px solid var(--hairline);
    border-radius: 999px; padding: 2px 8px; font-size: 12.5px;
  }
  .reactbadge em { font-style: normal; font-size: 10.5px; color: var(--muted); }
  .qreply {
    display: block; background: var(--ground); border-radius: 12px;
    padding: 9px 12px 10px; margin: 0 0 8px;
    min-width: 200px; max-width: 100%;
  }
  .qreply[data-rmi] { cursor: pointer; }
  .qreply[data-rmi]:hover { filter: brightness(0.97); }
  .qwho {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 3px;
  }
  .qmark { color: var(--contrib); font-size: 13px; line-height: 1; }
  .qtxt {
    font-size: 13px; line-height: 1.45; color: var(--muted);
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  }
  .mrow.self .qreply { background: rgba(255,255,255,0.92); }
  .mrow.self .qwho { color: var(--ink); }
  .mrow.self .qtxt { color: #55555A; }
  /* jumped-to message highlight */
  .mrow.hilite { position: relative; }
  .mrow.hilite::before {
    content: ""; position: absolute; left: -13px; top: 2px; bottom: 2px;
    width: 3px; border-radius: 2px; background: var(--blue);
  }
  .mrow.hilite .bubble { background: rgba(10,122,255,0.13); transition: background 0.25s ease; }
  .replychip {
    display: flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: var(--muted); padding: 2px 6px 6px;
  }
  .replychip .rq { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46%; }
  .replychip .attx { position: static; margin-left: auto; }
  /* read receipts */
  .readmark { display: flex; justify-content: flex-end; gap: 0; margin: 2px 4px 4px auto; width: fit-content; padding: 2px 3px; border-radius: 999px; }
  .readmark:hover { background: var(--hover); }
  .readmark .mavatar { width: 15px; height: 15px; font-size: 7.5px; opacity: 0.85; }
  /* invite people search */
  .pplist { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
  .pprow {
    display: flex; align-items: center; gap: 9px;
    padding: 6px 8px; border-radius: 9px; cursor: pointer; font-size: 13.5px;
  }
  .pprow:hover { background: var(--hover); }
  .pprow .avatar { width: 26px; height: 26px; font-size: 9px; }
  .pprow .ppst { margin-left: auto; font-size: 11px; color: var(--muted); }
  .reschip.briefres { cursor: pointer; }
  .taskrow.airow { cursor: default; }
  .box.run {
    border-color: transparent !important;
    border-top-color: var(--blue) !important;
    border-right-color: var(--blue) !important;
    animation: spin 0.9s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .airow .who { display: inline-flex; align-items: center; gap: 5px; }
  .reschip.briefres:hover { background: var(--plus-hover); }
  .mrow.self .stack { max-width: 68%; display: flex; flex-direction: column; align-items: flex-end; }
  /* pinned bar */
  #pinbar {
    position: sticky; top: 0; z-index: 6;
    width: min(760px, 100%); margin: 0 auto;
    padding: 10px 24px 8px;
    background: linear-gradient(var(--ground) 78%, transparent);
  }
  .pincard {
    display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
    background: var(--surface); border: 0.5px solid var(--hairline);
    border-radius: 12px; padding: 9px 12px;
    box-shadow: var(--shadow-soft);
  }
  .pincard .ic { color: var(--blue); flex: none; }
  .pinlbl { font-size: 11px; font-weight: 700; color: var(--muted); }
  .pint { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
  .pinm { font-size: 11px; color: var(--muted); }
  .pincard .xbtn { margin-left: auto; }
  .corepin {
    font-family: var(--sans); font-size: 12px; font-weight: 600;
    padding: 5px 11px; border-radius: 999px; cursor: pointer;
    border: 0.5px solid var(--hairline); background: var(--ground); color: var(--muted);
  }
  .corepin:hover:not(:disabled) { color: var(--ink); border-color: var(--dim); }
  .corepin.done {
    color: var(--good); border-color: rgba(52,168,83,0.4);
    background: var(--good-soft); cursor: default;
  }
  .corepin:disabled:not(.done) { cursor: default; }

  /* deep research */
  .rstage {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 12px; color: var(--muted); margin: 12px 0 7px;
  }
  .rstage span:last-child { font-variant-numeric: tabular-nums; color: var(--dim); }
  .rprog {
    height: 6px; border-radius: 4px; background: var(--raise2); overflow: hidden;
  }
  .rfill {
    display: block; height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, #0A7AFF, #9D5CFF);
    transition: width 0.4s linear;
  }
  .rmeta { font-size: 11.5px; color: var(--dim); margin-top: 9px; }
  .briefcard { cursor: pointer; }
  .briefcard:hover { box-shadow: var(--shadow-soft); }
  .briefmeta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
  .briefmeta .go { margin-left: 2px; }
  .briefby {
    font-size: 12px; color: var(--muted); margin: 0 0 4px;
    display: flex; align-items: center; gap: 5px;
  }
  #ov-brief .dialog { max-height: 82vh; overflow-y: auto; }
  #briefdetail .sech { margin-top: 20px; }
  #briefdetail .brieftext { font-size: 13.5px; line-height: 1.65; color: var(--ink); }

  /* jump to latest */
  #jumpdown {
    position: absolute; left: 50%; bottom: 96px; z-index: 12;   /* replaced at render from the composer's real height */
    width: 38px; height: 38px; border-radius: 50%; border: 0.5px solid var(--glass-brd);
    display: flex; align-items: center; justify-content: center;
    background: var(--glass-bg); color: var(--ink); cursor: pointer;
    backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
    box-shadow: 0 4px 18px rgba(0,0,0,0.14);
    opacity: 0; pointer-events: none;
    transform: translateX(-50%) translateY(8px) scale(0.88);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  #jumpdown.show { opacity: 1; pointer-events: auto; transform: translateX(-50%); }
  #jumpdown svg { width: 16px; height: 16px; }
  #jumpdown:hover { background: var(--plus-hover); }

  /* chat widgets */
  .wfade { animation: wfade 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
  @keyframes wfade {
    from { opacity: 0; transform: translateY(8px) scale(0.985); }
    to { opacity: 1; transform: none; }
  }
  @media (prefers-reduced-motion: reduce) { .wfade { animation: none; } }
  .wstack { margin: 4px 0; }
  .wcap { font-size: 11px; font-weight: 700; color: var(--muted); margin: 14px 0 2px; }
  .wcard {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 0.5px solid var(--hairline);
    border-radius: 12px; padding: 11px 13px; margin: 8px 0;
    max-width: 460px; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  }
  .wcard[data-open], .wcard[data-container] { cursor: pointer; }
  .wcard[data-open]:hover, .wcard[data-container]:hover { box-shadow: var(--shadow-soft); }
  .wcard .ic { color: var(--blue); flex: none; }
  .wcard .wt { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
  .wcard .wm { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
  .wcard .go { margin-left: auto; color: var(--dim); }
  .wcard.dim { opacity: 0.65; }
  .wstack .taskrow { border-bottom: 0.5px solid var(--hairline); }

  .assistantav {
    background: linear-gradient(135deg, #0A7AFF, #9D5CFF);
    color: #fff; font-size: 13px;
  }
  .bubble.pab {
    min-width: 0; max-width: 640px;
    background: none; border: none; box-shadow: none;
    padding: 3px 0 0; border-radius: 0;
    color: var(--ink);
  }
  .parow { margin: 16px 0 6px; }
  .patext { font-size: 15px; line-height: 1.65; color: var(--ink); }
  .patext b { font-weight: 650; }
  .sendername { font-size: 11px; color: var(--muted); margin: 12px 0 2px 42px; }
  .sendername .rolelbl { color: var(--dim); }
  .avatar {
    width: 28px; height: 28px; border-radius: 50%; flex: none;
    display: flex !important; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; color: #fff;
  }
  .bubble {
    font-size: 15px; line-height: 1.5;
    background: var(--raise2); color: var(--ink);
    padding: 9px 14px; border-radius: 19px;
    border-bottom-left-radius: 6px;
    width: fit-content;
  }
  .mrow.self .bubble {
    background: var(--blue); color: #fff;
    border-radius: 19px;
    border-bottom-right-radius: 6px;
  }
  .facepile { display: flex; align-items: center; }
  .facepile .avatar { width: 26px; height: 26px; margin-left: -7px; border: 2px solid var(--ground); font-size: 9px; }
  .facepile .avatar:first-child { margin-left: 0; }

  .card {
    margin: 12px 0; background: var(--surface);
    border: 0.5px solid var(--hairline);
    border-radius: 14px; padding: 15px 17px;
    max-width: 560px;
    box-shadow: var(--shadow-soft);
  }
  .card .lbl { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
  .card .lbl .byline {
    display: inline-flex; align-items: center; gap: 4px;
    white-space: nowrap; vertical-align: bottom;
  }
  .card .lbl .mavatar { width: 15px; height: 15px; font-size: 7px; }
  .card h4 { margin: 0 0 5px; font-size: 14.5px; font-weight: 650; line-height: 1.4; letter-spacing: -0.015em; }
  .card p { margin: 5px 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
  .assert {
    display: flex; gap: 10px; align-items: flex-start;
    margin: 10px 0; font-size: 13.5px; line-height: 1.55; color: var(--ink);
  }
  .assert .tag {
    flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--muted);
    background: var(--raise2); border-radius: 5px; padding: 3px 8px; margin-top: 2px;
    min-width: 58px; text-align: center;
  }
  .assert .tag.des { color: #fff; background: var(--blue); }
  .btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
  .btn {
    font-family: var(--sans); font-size: 12.5px; font-weight: 600;
    padding: 7px 14px; border-radius: 8px; cursor: pointer;
    border: 0.5px solid var(--hairline); background: var(--surface); color: var(--ink);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
  .btn:hover { background: var(--ground); }
  .btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
  .btn.primary:hover { background: var(--blue-deep); }
  .btn.picked { border-color: var(--blue); color: var(--blue-deep); background: rgba(10,122,255,0.08); }
  /* while a sheet is running between two heights it cannot spill or scroll */
  .dialog.morphing { overflow: hidden !important; }
  .btn.danger { color: var(--red, #E5493A); }
  .btn.danger:hover { background: rgba(229,73,58,0.09); border-color: rgba(229,73,58,0.4); }
  .btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
  /* polls */
  .poll { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 4px; }
  .pollopt {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 8px;
    width: 100%; text-align: left;
    border: 0.5px solid var(--hairline); background: var(--ground);
    border-radius: 10px; padding: 9px 12px;
    font-family: var(--sans); color: var(--ink); cursor: default;
  }
  button.pollopt { cursor: pointer; }
  button.pollopt:hover { border-color: var(--dim); }
  .pollopt.on { border-color: var(--blue); }
  .pofill {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0;
    background: rgba(10,122,255,0.12);
    transition: width 0.35s ease;
  }
  .polabel { position: relative; font-size: 13px; font-weight: 500; flex: 1; min-width: 0; }
  .povote { position: relative; display: flex; align-items: center; flex: none; }
  .povote .mavatar { margin-left: -5px; border: 1.5px solid var(--surface); }
  .povote .mavatar:first-child { margin-left: 0; }
  .povote em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 5px; }
  .poaddbtn {
    background: none; border: none; text-align: left; padding: 2px;
    color: var(--blue-deep); font-family: var(--sans); font-size: 12px; font-weight: 600;
    cursor: pointer; width: fit-content;
  }
  .poadd { display: flex; gap: 8px; }
  .poinput {
    flex: 1; font-family: var(--sans); font-size: 13px; color: var(--ink);
    padding: 8px 12px; border-radius: 9px;
    border: 0.5px solid var(--hairline); background: var(--surface); outline: none;
  }
  .poinput:focus { border-color: rgba(10,122,255,0.5); }

  .leanbar { height: 4px; border-radius: 2px; background: var(--raise2); margin-top: 12px; overflow: hidden; }
  .leanbar > div { height: 100%; background: var(--blue); transition: width .45s cubic-bezier(.3,.7,.3,1); }
  .leanlabel { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
  .donetext { color: var(--good); font-size: 12.5px; font-weight: 600; margin-top: 10px; }
  .donetext.mut { color: var(--muted); font-weight: 500; }
  .lockline {
    display: flex; gap: 8px; align-items: flex-start;
    font-size: 12px; color: var(--contrib); margin-top: 11px; line-height: 1.5;
  }

  #feedforward {
    display: none; align-items: center; justify-content: center; gap: 7px;
    font-size: 12px; color: var(--muted); padding: 4px 24px;
  }
  #feedforward.show { display: flex; }
  #typing { font-size: 12px; color: var(--muted); padding: 0 24px; width: min(760px,100%); margin: 0 auto; }
  #typing:not(:empty) { padding: 2px 24px 4px; }

  #chatcomposer { padding: 0 24px 20px; display: none; }
  #chatcomposer .inner { width: min(720px, 100%); margin: 0 auto; }

  /* ---- decide tab / list views ---- */
  .listwrap { width: min(680px, 100%); margin: 0 auto; padding: 26px 24px 60px; }
  .listwrap h2 { font-size: 23px; font-weight: 700; letter-spacing: -0.022em; margin: 4px 0 4px; }
  .listwrap .tag { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
  .lrow {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 14px; cursor: pointer;
    background: var(--surface);
    border: 0.5px solid var(--hairline);
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  }
  .lrow:hover { box-shadow: var(--shadow-soft); }
  .lrow .ic { color: var(--blue); width: 19px; height: 19px; }
  .lrow .t { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
  .lrow .m { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
  .lrow .go { margin-left: auto; color: var(--dim); }
  .lrow.dim { opacity: 0.55; }
  .lrow.plain { cursor: default; }
  .lrow.plain:hover { box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
  .sech { font-size: 12px; font-weight: 700; color: var(--muted); margin: 24px 4px 8px; letter-spacing: 0.01em; }
  .cmt { border-left: 3px solid var(--good); padding-left: 12px; }
  .kbe { border-left: 3px solid var(--blue); padding-left: 12px; }
  .emptyline { padding: 14px 6px; font-size: 13px; color: var(--muted); }

  .brieftext { font-size: 13.5px; line-height: 1.65; color: var(--ink); padding: 2px 4px; }
  .brieftext b { font-weight: 650; }
  /* resources */
  .reschips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0; }
  .reschip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--surface); border: 0.5px solid var(--hairline);
    border-radius: 10px; padding: 7px 11px;
    font-size: 12.5px; font-weight: 500; color: var(--ink);
    max-width: 260px; text-decoration: none;
  }
  .reschip .ic { width: 15px; height: 15px; color: var(--muted); flex: none; }
  .reschip img { width: 26px; height: 26px; object-fit: cover; border-radius: 6px; flex: none; }
  .reschip .rl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .reschip .rs { font-size: 10.5px; color: var(--dim); flex: none; }
  a.reschip:hover { border-color: rgba(10,122,255,0.5); color: var(--blue-deep); }
  a.reschip:hover .ic { color: var(--blue-deep); }

  .genline { color: var(--blue-deep); animation: genpulse 1.4s ease-in-out infinite; }
  @keyframes genpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
  @media (prefers-reduced-motion: reduce) { .genline { animation: none; } }

  /* ---- tasks ---- */
  .taskrow {
    display: flex; align-items: center; gap: 11px;
    width: 100%; text-align: left; padding: 9px 4px;
    background: transparent; border: none; border-bottom: 0.5px solid var(--hairline);
    font-family: var(--sans); font-size: 13.5px; color: var(--ink); cursor: pointer;
  }
  .taskrow .box {
    width: 18px; height: 18px; border-radius: 6px; flex: none;
    border: 1.5px solid var(--dim); color: #fff; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
  }
  .taskrow:hover .tt { color: var(--blue-deep); }
  .taskrow .box:hover { border-color: var(--blue); }

  .tdtitle { font-size: 16px; font-weight: 650; line-height: 1.45; margin: 2px 0 3px; letter-spacing: -0.015em; }
  .tdrow { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; }
  .tdid { font-size: 12px; color: var(--muted); cursor: default; }
  .tdcontainer {
    font-size: 12px; color: var(--muted); margin: 0;
    cursor: pointer; width: fit-content;
    display: flex; align-items: center; gap: 5px;
  }
  .tdcontainer .ic { width: 13px; height: 13px; }
  .tdcontainer:hover { color: var(--blue-deep); text-decoration: underline; }
  .containersech {
    display: inline-flex; align-items: center; gap: 6px;
    cursor: pointer; border-radius: 7px; padding: 3px 7px; margin-left: -7px;
  }
  .containersech:hover { background: var(--hover); color: var(--ink); }
  .containersech .ic { width: 13px; height: 13px; }
  .tmeta {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 0; border-top: 0.5px solid var(--hairline);
    font-size: 13px;
  }
  .tmeta .lbl { width: 74px; flex: none; font-size: 11.5px; font-weight: 600; color: var(--muted); }
  .taskrow.done .box { background: var(--good); border-color: var(--good); }
  .taskrow.done .tt { color: var(--muted); text-decoration: line-through; }
  .taskrow .tt { flex: 1; min-width: 0; }
  .taskrow .who {
    display: inline-flex; align-items: center; gap: 6px; flex: none;
    font-size: 11px; color: var(--muted);
  }
  .taskrow.other .box { opacity: 0.45; cursor: default; }
  .taskrow.other .box:hover { border-color: var(--dim); }
  .mavatar {
    width: 18px; height: 18px; border-radius: 50%; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 8px; font-weight: 700; color: #fff;
  }
  .taskrow .tsrc { font-size: 10.5px; color: var(--dim); flex: none; margin-left: 4px; }
  .taskadd { display: flex; gap: 8px; margin-top: 12px; }
  .taskadd input {
    flex: 1; font-family: var(--sans); font-size: 13.5px; color: var(--ink);
    background: var(--surface); border: 0.5px solid var(--hairline); border-radius: 10px;
    padding: 9px 13px; outline: none;
  }
  .taskadd input:focus { border-color: rgba(10,122,255,0.6); box-shadow: 0 0 0 3px rgba(10,122,255,0.12); }
  .teamhead { display: flex; align-items: center; justify-content: space-between; }
  .teamhead .btn { flex: none; }
  .tmact { margin-left: auto; display: flex; gap: 8px; flex: none; align-items: center; }
  .rolelabel { font-size: 12px; color: var(--muted); }
  .roleselect {
    font-family: var(--sans); font-size: 11.5px; font-weight: 600; color: var(--ink);
    padding: 5px 8px; border-radius: 7px; cursor: pointer;
    border: 0.5px solid var(--hairline); background: var(--surface);
  }
  .dialog textarea { width: 100%; }
  .minibtn {
    font-family: var(--sans); font-size: 11px; font-weight: 600;
    padding: 5px 10px; border-radius: 7px; cursor: pointer;
    border: 0.5px solid var(--hairline); background: var(--surface); color: var(--ink);
  }
  .minibtn:hover { background: var(--ground); }
  .minibtn.danger { color: #FF3B30; }
  .xbtn {
    width: 26px; height: 26px; border-radius: 7px; flex: none;
    background: none; border: none; cursor: pointer;
    color: var(--dim); font-size: 17px; line-height: 1; padding: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .xbtn:hover { color: #FF3B30; background: var(--hover); }
  .dialog select {
    width: 100%; font-family: var(--sans); font-size: 13.5px; color: var(--ink);
    background: var(--surface); border: 0.5px solid var(--hairline); border-radius: 10px;
    padding: 9px 13px; outline: none;
  }
  .youchip {
    font-size: 10px; font-weight: 700; color: var(--blue-deep);
    background: rgba(10,122,255,0.12); border-radius: 99px; padding: 1px 7px;
    vertical-align: 1px;
  }

  /* ---- dialogs ---- */
  /* A modal belongs to the work, not to the window: the dim covers everything,
     but the box itself centres on the content beside the sidebar. --sbw follows
     whatever the sidebar is currently doing. */
  .overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(40,40,44,0.35);
    display: none; align-items: center; justify-content: center;
    padding-left: var(--sbw, 0px);
    transition: padding-left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .overlay.open { display: flex; }
  #taskdetail, #decisiondetail, #briefdetail, #profiledetail, #tfilterdetail { position: relative; }
  #ov-details { align-items: flex-end; padding: 0; }
  #detailsheet {
    width: min(680px, 100%); margin: 0 auto; height: 82%;
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--ground);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 60px rgba(0,0,0,0.28);
    padding: 0 0 14px;
    animation: sheetup 0.34s cubic-bezier(0.2, 0.7, 0.3, 1);
  }
  @keyframes sheetup { from { transform: translateY(38%); opacity: 0.5; } to { transform: none; opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { #detailsheet { animation: none; } }
  #detailsheet .sheetgrip { flex: none; padding: 9px 0 8px; cursor: grab; touch-action: none; }
  #detailsheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--dim); opacity: 0.55; margin: 0 auto; }
  #sheetpanes {
    flex: 1; min-height: 0; display: flex; width: 400%;
    transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.3, 1);
  }
  #detailsheet.teamopen #sheetpanes { transform: translateX(-25%); }
  #detailsheet.inviteopen #sheetpanes { transform: translateX(-50%); }
  #detailsheet.briefopen #sheetpanes { transform: translateX(-75%); }
  .spane { width: 25%; overflow-y: auto; min-height: 0; position: relative; padding: 0 4px 20px; }
  .sheetlbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 14px 2px 6px; }
  #sheetinvite textarea, #sheetinvite select {
    width: 100%; font-family: var(--sans); font-size: 14px; color: var(--ink);
    background: var(--surface); border: 0.5px solid var(--hairline);
    border-radius: 10px; padding: 9px 11px;
  }
  #sheetinvite .btns { margin-top: 16px; }
  #detailsheet .listwrap { padding-top: 6px; }
  .sheetfaces {
    position: absolute; top: 16px; right: 22px; z-index: 2;
    display: flex; align-items: center; cursor: pointer;
  }
  .sheetfaces .avatar { width: 27px; height: 27px; margin-left: -7px; border: 2px solid var(--ground); font-size: 9px; }
  .sheetfaces .avatar:first-child { margin-left: 0; }
  .sheetback {
    display: inline-flex; align-items: center; gap: 2px;
    margin: 8px 0 0 14px; padding: 6px 10px; border-radius: 9px;
    background: none; border: none; cursor: pointer;
    color: var(--blue); font-size: 14.5px; font-weight: 600; font-family: var(--sans);
  }
  .sheetback:hover { background: var(--hover); }
  .sheetteamwrap { padding-top: 0; }
  .sheetteamwrap .teamhead { margin-bottom: 16px; }
  .brandic { width: 16px; height: 16px; flex: none; display: block; color: var(--muted); }
  .reschip .brandic { width: 14px; height: 14px; }
  .menu .mi:hover .brandic { color: rgba(255,255,255,0.9); }
  span.brandic.attio {
    display: inline-flex; align-items: center; justify-content: center;
    background: #3B5BFD; color: #fff; border-radius: 4px;
    font-size: 10px; font-weight: 800; font-family: var(--sans);
  }
  .menu .mi:hover span.brandic.attio { color: #fff; }
  .mavatar.assistantav, .avatar.assistantav { background: linear-gradient(135deg, #0A7AFF, #9D5CFF); color: #fff; }
  .dx {
    position: absolute; top: -12px; right: -10px; z-index: 2;
    width: 28px; height: 28px; border: none;
    display: flex; align-items: center; justify-content: center;
    background: none; color: var(--muted);
    font-size: 15px; cursor: pointer; font-family: var(--sans);
  }
  .dx:hover { color: var(--ink); }
  .dialog {
    width: min(450px, calc(100vw - 40px));
    background: var(--dialog-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.25);
    padding: 22px;
  }
  .dialog h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; letter-spacing: -0.015em; }
  .dialog p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 6px 0 14px; }
  .dialog label { font-size: 11.5px; font-weight: 600; color: var(--muted); display: block; margin: 14px 0 6px; }
  .dialog input[type=text], .dialog textarea {
    width: 100%; font-family: var(--sans); font-size: 13.5px; color: var(--ink);
    background: var(--surface); border: 0.5px solid var(--hairline); border-radius: 10px;
    padding: 9px 13px; outline: none; resize: vertical;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
  }
  .dialog input:focus, .dialog textarea:focus { border-color: rgba(10,122,255,0.6); box-shadow: 0 0 0 3px rgba(10,122,255,0.12); }
  .dialog .btns { justify-content: flex-end; margin-top: 18px; }

/* ---- collapse: the sidebar narrows to an icon rail, the containers drop away ---- */
.app.collapsed { grid-template-columns: 62px 1fr; }
#sidebar {
  min-width: 0;
  overflow-x: hidden;
  transition: opacity 0.22s ease, border-color 0.3s ease;
  white-space: nowrap;
}
#sidebar > * { min-width: 238px; flex-shrink: 0; }
.app.collapsed #sidebar { padding: 14px 8px 10px; align-items: center; }
.app.collapsed #sidebar > * { min-width: 0; width: 46px; }
.app.collapsed .brand {
  flex-direction: column; gap: 2px; padding: 2px 0 10px;
}
.app.collapsed .brand .wsname, .app.collapsed .brand .spacer,
.app.collapsed .nl, .app.collapsed .recent,
.app.collapsed #sbfoot .nm { display: none; }
.app.collapsed .brandlogo { margin-bottom: 6px; }
.brandhome { display: flex; align-items: center; }
.brandhome .xpand { display: none; width: 22px; height: 22px; color: var(--muted); }
.app.collapsed .brandhome {
  cursor: pointer; border-radius: 9px; padding: 4px;
  width: 38px; height: 38px; justify-content: center; margin-bottom: 4px;
}
.app.collapsed .brandhome:hover { background: var(--hover); }
.app.collapsed .brandhome:hover .brandlogo { display: none; }
.app.collapsed .brandhome:hover .xpand { display: block; color: var(--ink); }
/* the rail reads as one column of same-sized marks */
.app.collapsed .navrow .ic,
.app.collapsed .brand button .ic { width: 24px; height: 24px; stroke-width: 1.5; }
.app.collapsed .brandhome .xpand { width: 24px; height: 24px; }
.app.collapsed .brand button { padding: 6px; border-radius: 9px; }
.app.collapsed .seclabel button { font-size: 22px !important; }
.app.collapsed .brand button[data-mact="collapse"] { display: none; }
.app.collapsed .navrow { justify-content: center; padding: 9px 0; position: relative; }
.app.collapsed .navrow .count {
  position: absolute; top: 4px; right: 5px; margin: 0;
  min-width: 8px; height: 8px; padding: 0; border-radius: 50%;
  font-size: 0; line-height: 0; overflow: hidden;
}
.app.collapsed .seclabel { padding: 14px 0 4px; display: flex; justify-content: center; }
.app.collapsed .seclabel span[style] { display: none; }
.app.collapsed #sbfoot { padding: 0; display: flex; justify-content: center; }
.app.collapsed .brandlogo { margin-left: 0; margin-bottom: 0; }
.app.collapsed #account.acrow { justify-content: center !important; padding: 6px 0; }
@media (prefers-reduced-motion: reduce) {
  .app { transition: none; }
  #sidebar { transition: none; }
}
#sbexpand {
  position: fixed; top: 12px; left: 12px; z-index: 45;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface); border: 0.5px solid var(--hairline);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft);
  opacity: 0; pointer-events: none; transform: translateX(-6px);
  transition: opacity 0.22s ease 0.18s, transform 0.22s ease 0.18s;
}
#sbexpand:hover { color: var(--ink); }
body.collapsed #sbexpand { opacity: 0; pointer-events: none; }
@media (max-width: 660px) {
  #sbexpand { opacity: 1; pointer-events: auto; transform: translateX(0); transition: none; }
}

/* ---- demo fab ---- */
#demofab {
  position: fixed; right: 16px; bottom: 16px; z-index: 46;
  display: flex; align-items: center; gap: 7px;
  background: var(--menu-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid var(--hairline); border-radius: 999px;
  padding: 8px 15px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; box-shadow: var(--shadow-soft);
}
#demofab {
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
body.demonear #demofab { opacity: 1; pointer-events: auto; transform: translateY(0); }
@media (hover: none) {
  #demofab { opacity: 1; pointer-events: auto; transform: none; }
}
#demofab:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.14); }
#demofab .ic { color: var(--muted); }
#demomenu {
  position: fixed; left: auto; top: auto;
  right: 16px; bottom: 62px; z-index: 60;
}
@media (max-width: 660px) {
  #demofab { bottom: 96px; padding: 8px 12px; }
  #demomenu { bottom: 142px; }
}

/* ---- toast ---- */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(30,30,32,0.92); color: #fff;
  border: 0.5px solid var(--hairline);
  font-size: 13px; font-weight: 500;
  padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 90;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- streaming: thinking dots + caret ---- */
.tdots { display: inline-flex; gap: 4px; align-items: center; padding: 4px 2px; }
.tdots i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--dim);
  animation: tdot 1.2s infinite ease-in-out;
}
.tdots i:nth-child(2) { animation-delay: 0.15s; }
.tdots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes tdot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .tdots i { animation: none; }
}

/* ---- mic recording ---- */
.mainbtn.rec { background: #FF3B30; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .mainbtn.rec { animation: none; } }

/* ---- archived ---- */
.dot.archived { background: #AEAEB2; }

/* ---- search palette ---- */
#ov-search { align-items: flex-start; padding-top: 11vh; background: rgba(30,30,34,0.22); }
/* command palette: one card — field, sectioned results, key hints */
#searchpal {
  width: min(760px, calc(100vw - 48px));
  background: var(--surface);
  border: 0.5px solid var(--hairline); border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.28);
  overflow: hidden;
}
#palhead {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 0.5px solid var(--hairline);
}
#palhead .ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
#searchbox {
  flex: 1; font-family: var(--sans); font-size: 17px; color: var(--ink);
  background: none; border: none; padding: 0; outline: none;
}
#searchbox::placeholder { color: var(--dim); }
#searchresults {
  display: none; max-height: 52vh; overflow-y: auto; padding: 8px 8px 10px;
}
#searchresults.has { display: block; }
.ssec {
  padding: 10px 12px 4px; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim);
}
.skind { margin-left: auto; font-size: 11.5px; color: var(--dim); flex: none; }
.sres .sbody { min-width: 0; }
.sres .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#palfoot {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-top: 0.5px solid var(--hairline);
  background: var(--sb); font-size: 11.5px; color: var(--muted);
}
#palfoot .kc {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border: 0.5px solid var(--hairline); border-radius: 5px;
  background: var(--surface); color: var(--muted); font-size: 11px;
}
#palfoot .kl { margin: 0 12px 0 2px; }
body.mobile #ov-search { padding-top: 62px; }
body.mobile #searchpal { width: calc(100% - 24px); border-radius: 14px; }
body.mobile #palhead { padding: 12px 15px; }
body.mobile #searchbox { font-size: 16px; }
body.mobile #searchresults { max-height: 56%; }
body.mobile #palfoot { display: none; }
.sres {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 10px; cursor: pointer;
}
.sres:hover, .sres.active { background: var(--hover); }
.sres .ic { color: var(--muted); width: 18px; height: 18px; flex: none; }
.sres.active .ic { color: var(--ink); }
.sres .t { font-size: 13.5px; font-weight: 600; }
.sres .m { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.sres-empty { padding: 14px 12px; font-size: 13px; color: var(--muted); }

/* ---- members ---- */
.mem { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 0.5px solid var(--hairline); }
.mem:last-child { border-bottom: none; }
.mem .avatar { width: 30px; height: 30px; font-size: 10.5px; }
.mem .agentav {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--raise2); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.mem .nm { font-size: 13.5px; font-weight: 600; }
.mem .sc { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* ============ device shell: web ⇄ mobile ============ */
#device { display: contents; }
#statusbar, #tabbar { display: none; }
#backbtn {
  position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--blue); cursor: pointer;
  font-size: 26px; line-height: 1; padding: 2px 14px; font-family: var(--sans);
}

body.mobile {
  display: flex; align-items: center; justify-content: center;
  background: var(--raise2);
}
body.mobile #device {
  position: relative; display: flex; flex-direction: column;
  width: 393px; height: min(852px, calc(100vh - 28px));
  background: var(--ground);
  border: 10px solid #101012; border-radius: 54px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4), 0 0 0 1.5px rgba(255,255,255,0.09);
  overflow: hidden;
}
body.mobile .app { display: flex; height: auto; flex: 1; min-height: 0; }
body.mobile #main { flex: 1; min-width: 0; }
body.mobile #sbexpand { display: none; }
body.mobile #sidebar {
  display: flex; position: absolute; top: 0; left: 0; bottom: 0;
  width: 272px; z-index: 70;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 44px 0 0 44px;
  padding-top: 58px;
  opacity: 1; pointer-events: auto;
  border-right: 0.5px solid var(--hairline);
}
body.mobile.sbopen #sidebar { transform: translateX(0); }
body.mobile #scrim { display: none; }
body.mobile .brand [data-mact="collapse"] { display: none; }
#mbmenu { display: none; }
body.mobile #mbmenu {
  display: flex; align-items: center; justify-content: center;
  position: absolute; left: 12px; top: 10px;
  width: 42px; height: 42px; z-index: 7;
  background: var(--glass-bg);
  backdrop-filter: blur(26px) saturate(1.9);
  -webkit-backdrop-filter: blur(26px) saturate(1.9);
  border: 0.5px solid var(--glass-brd); border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0,0,0,0.14), inset 0 1px 0 var(--glass-hi);
  color: var(--ink); font-size: 16px; cursor: pointer; padding: 0;
}
body.mobile #mbmenu:active { transform: scale(0.95); }

/* floating glass chrome (mobile) — no header band, content flows beneath */
body.mobile #topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 8;
  min-height: 0; padding: 0; background: transparent;
  pointer-events: none;
}
body.mobile #topbar > * { pointer-events: auto; }
body.mobile .patitle { display: none; }
body.mobile #content { padding-top: 60px; }
body.mobile #content:has(#mapviewport) { padding-top: 0; }
.corenode { cursor: pointer; }
.corenode:hover rect { filter: brightness(0.98); }
body.mobile #pinbar { top: -12px; margin: 0 0 -34px; padding-bottom: 16px; }

#island { display: none; }
body.mobile #island {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(26px) saturate(1.9);
  -webkit-backdrop-filter: blur(26px) saturate(1.9);
  color: var(--ink); cursor: pointer;
  border: 0.5px solid var(--glass-brd);
  border-radius: 999px; padding: 11px 19px;
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em;
  max-width: 66%;
  box-shadow: 0 10px 28px rgba(0,0,0,0.16), inset 0 1px 0 var(--glass-hi);
}
body.mobile #island:active { transform: translateX(-50%) scale(0.97); }
#island .isl-nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#island .isl-tab { color: var(--muted); font-weight: 500; flex: none; }
#island .ic { width: 13px; height: 13px; stroke: var(--muted); flex: none; transition: transform 0.22s ease; }
#island.menuup .ic { transform: rotate(180deg); }
.menu .mi.on { color: var(--blue-deep); font-weight: 600; }
.menu .mi.on .ic { color: var(--blue-deep); }
.menu.compact {
  min-width: 128px; padding: 4px; border-radius: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(26px) saturate(1.9);
  -webkit-backdrop-filter: blur(26px) saturate(1.9);
  border: 0.5px solid var(--glass-brd);
  box-shadow: 0 10px 28px rgba(0,0,0,0.16), inset 0 1px 0 var(--glass-hi);
}
.menu.compact .mi { padding: 7px 13px; font-size: 13px; border-radius: 11px; }

body.mobile #statusbar {
  display: flex; align-items: center; justify-content: space-between;
  flex: none; position: relative; height: 56px;
  padding: 10px 30px 0;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
body.mobile #statusbar .island {
  position: absolute; left: 50%; transform: translateX(-50%); top: 16px;
  width: 118px; height: 34px; border-radius: 20px; background: #000;
}
body.mobile #statusbar .sicons { display: flex; gap: 7px; align-items: center; }
body.mobile #statusbar .sicons svg { display: block; }

body.mobile #device::after {
  content: ""; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 134px; height: 5px; border-radius: 3px; background: var(--ink); opacity: 0.5;
  pointer-events: none; z-index: 90;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 2px 0; cursor: pointer; position: relative;
  color: var(--muted); font-size: 10px; font-weight: 500;
}
.tab.on { color: var(--blue); }
.tab .ic { width: 23px; height: 23px; }
.tab .tbadge {
  position: absolute; top: -4px; left: calc(50% + 5px);
  background: #FF3B30; color: #fff; font-size: 9px; font-weight: 700;
  border-radius: 99px; padding: 1px 5px;
}

body.mobile .overlay { position: absolute; border-radius: 44px; z-index: 80; }
body.mobile #ov-image, body.mobile #ov-doc { z-index: 82; }
body.mobile #ov-invite, body.mobile #ov-commit { z-index: 83; }
body.mobile #ov-decision, body.mobile #ov-task, body.mobile #ov-brief, body.mobile #ov-profile, body.mobile #ov-tfilter, body.mobile #ov-more, body.mobile #ov-newtask, body.mobile #ov-newmeet, body.mobile #ov-meet { align-items: flex-end; }
body.mobile #ov-decision .dialog, body.mobile #ov-task .dialog, body.mobile #ov-brief .dialog, body.mobile #ov-profile .dialog, body.mobile #ov-tfilter .dialog, body.mobile #ov-more .dialog, body.mobile #ov-newtask .dialog, body.mobile #ov-newmeet .dialog, body.mobile #ov-meet .dialog {
  width: 100%; max-width: none;
  border-radius: 22px 22px 0 0;
  max-height: 86%; overflow-y: auto;
  padding: 13px 22px 30px;
  animation: sheetup 0.34s cubic-bezier(0.2, 0.7, 0.3, 1);
}
body.mobile .dialog .dx { top: -32px; right: -8px; }
body.mobile .memdlg .dx { top: 10px; right: 12px; }
body.mobile #ov-decision .dialog::before, body.mobile #ov-task .dialog::before, body.mobile #ov-brief .dialog::before, body.mobile #ov-profile .dialog::before, body.mobile #ov-more .dialog::before {
  content: ""; display: block; width: 40px; height: 5px; border-radius: 3px;
  background: var(--dim); opacity: 0.55; margin: 0 auto 16px;
}
body.mobile #lightimg { max-width: 94%; max-height: 80%; border-radius: 12px; }
body.mobile #docviewer { width: 100%; height: 100%; border-radius: 44px; }
body.mobile #dochead { padding: 56px 14px 8px; }
body.mobile .dialog { width: calc(100% - 28px); }
body.mobile #toast { position: absolute; bottom: 104px; max-width: 85%; }
body.mobile .seg button { padding: 6px 7px; font-size: 11.5px; }
body.mobile .hero { padding: 0 18px 6vh; }
body.mobile .hero h1 { font-size: 22px; text-align: center; }
body.mobile #msgs { padding: 6px 14px 12px; }
body.mobile #chatcomposer { padding: 0 12px 28px; }
body.mobile #jumpdown { bottom: 118px; }
body.mobile #topright { right: 10px; }
body.mobile .facepile { display: none; }

body.mobile .pillbox { gap: 5px; padding: 6px 6px 6px 8px; }
body.mobile .modechip { padding: 4px 8px; }
body.mobile .agentsel { padding: 6px 5px; }
body.mobile .stack { max-width: 82%; }
body.mobile .listwrap { padding: 14px 16px 40px; }
body.dragscroll { user-select: none; -webkit-user-select: none; cursor: grabbing; }
body.mobile .card { max-width: none; }

@media (max-width: 660px) {
  body.mobile { padding: 0; }
  body.mobile #device {
    width: 100%; height: 100vh; height: 100dvh;
    border: none; border-radius: 0; box-shadow: none;
  }
  body.mobile .overlay { border-radius: 0; }
  body.mobile #statusbar { display: none; }
  body.mobile #docviewer { border-radius: 0; }
  body.mobile #dochead { padding-top: max(14px, env(safe-area-inset-top)); }
}

  /* ---------- the board ---------- */
  /* Five columns, always all five, so an empty column still reads as a place a
     ticket can go. The strip scrolls sideways; the page never does. */
  .boardwrap { display: flex; flex-direction: column; min-height: 0; }
  .boardhead { width: min(1180px, 100%); margin: 0 auto; padding: 26px 24px 0; }
  .boardhead h2 { font-size: 23px; font-weight: 700; letter-spacing: -0.022em; margin: 4px 0 4px; }
  .boardhead .tag { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
  /* Title, count and controls on one line, so the board starts where the eye
     already is. The line sits in the same box the columns do, so the title and
     the Backlog column share a left edge at every width. */
  .headline { display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; }
  .headline h2 { margin: 0; flex: none; }
  .headline .tag { margin: 0; flex: none; white-space: nowrap; }
  .headline .tfilter { margin: 0; }
  .headline .viewseg { flex: none; }
  /* Create is a square ＋ at the end of the line, with the filter beside it */
  .headline .createbtn {
    flex: none; width: 31px; height: 31px; padding: 0;
    display: grid; place-items: center; font-size: 16px; line-height: 1;
  }
  .boardwrap > .emptyline { width: min(1180px, 100%); margin: 0 auto; padding: 0 24px 40px; }
  .board {
    width: min(1180px, 100%); margin: 0 auto;
    display: flex; gap: 12px; align-items: flex-start;
    overflow-x: auto; overflow-y: visible;
    padding: 2px 24px 44px; scrollbar-width: thin;
  }
  .bcol {
    flex: 1 1 200px; min-width: 196px;
    background: var(--ground); border: 0.5px solid var(--hairline);
    border-radius: 14px; padding: 10px 9px 9px;
  }
  .bcolhead {
    display: flex; align-items: center; gap: 8px;
    padding: 0 5px 9px; 
  }
  .bcolname {
    font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em;
    color: var(--muted);
  }
  .bcoln {
    margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--muted);
    background: var(--raise2); border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center;
  }
  .bcolbody {
    display: flex; flex-direction: column; gap: 8px;
    min-height: 56px; border-radius: 10px; transition: background 0.15s ease;
  }
  .bcolbody.over { background: rgba(10,122,255,0.09); outline: 1.5px dashed var(--blue); outline-offset: 2px; }
  .bempty { font-size: 12px; color: var(--dim); padding: 12px 6px; text-align: center; }

  /* ---- ticket card ---- */
  .tcard {
    display: block; width: 100%; text-align: left;
    background: var(--surface); border: 0.5px solid var(--hairline);
    border-radius: 10px; padding: 10px 11px 8px;
    font-family: var(--sans); color: var(--ink); cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
  .tcard:hover { border-color: var(--dim); }
  .tcard:active { cursor: grabbing; }
  .tcard.dragging { opacity: 0.45; }
  .tcard.done .tcardtitle { color: var(--muted); }
  .tcardcontainer {
    display: flex; align-items: center; gap: 5px;
    font-size: 10.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px;
  }
  .tcardcontainer .ic { width: 12px; height: 12px; }
  .tcardtitle { font-size: 13px; line-height: 1.4; letter-spacing: -0.005em; }
  .tlabels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
  .tlabel {
    font-size: 10px; font-weight: 600; letter-spacing: 0.01em;
    color: var(--muted); background: var(--raise2);
    border-radius: 4px; padding: 2px 6px;
  }
  .tcardmeta { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
  .tcardfoot { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
  .tspace { flex: 1; }
  .tkey { display: inline-flex; align-items: center; gap: 5px; flex: none; }
  .tkeyid { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.01em; white-space: nowrap; }
  .tcard.done .tkeyid { text-decoration: line-through; }
  .tdue { font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
  .tdue.urg { color: #FF3B30; }
  .tdue.done { color: var(--good); }
  .tassign { display: inline-flex; }
  .tassign .mavatar { width: 20px; height: 20px; font-size: 8.5px; }
  .urgtext { color: #FF3B30; font-weight: 600; }

  /* ---- type and priority, as words ---- */
  .tchip {
    flex: none; font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em;
    text-transform: uppercase; padding: 2px 6px; border-radius: 4px; white-space: nowrap;
  }
  .tchip.ty-story { color: #1F7A56; background: rgba(54,179,126,0.18); }
  .tchip.ty-task  { color: #1B5FBF; background: rgba(38,132,255,0.18); }
  .tchip.ty-bug   { color: #B3271B; background: rgba(229,73,58,0.18); }
  .ptext { flex: none; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
  .ptext.p-highest { color: #CD1317; }
  .ptext.p-high    { color: #D9534A; }
  .ptext.p-medium  { color: #B98900; }
  .ptext.p-low     { color: #2684FF; }
  .ptext.p-lowest  { color: #6BA6F5; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .tchip.ty-story { color: #6FDDAF; }
    :root:not([data-theme="light"]) .tchip.ty-task  { color: #8CBEFF; }
    :root:not([data-theme="light"]) .tchip.ty-bug   { color: #FF9C90; }
    :root:not([data-theme="light"]) .ptext.p-highest { color: #FF7B72; }
    :root:not([data-theme="light"]) .ptext.p-high    { color: #FF8F85; }
    :root:not([data-theme="light"]) .ptext.p-medium  { color: #E3B341; }
  }
  :root[data-theme="dark"] .tchip.ty-story { color: #6FDDAF; }
  :root[data-theme="dark"] .tchip.ty-task  { color: #8CBEFF; }
  :root[data-theme="dark"] .tchip.ty-bug   { color: #FF9C90; }
  :root[data-theme="dark"] .ptext.p-highest { color: #FF7B72; }
  :root[data-theme="dark"] .ptext.p-high    { color: #FF8F85; }
  :root[data-theme="dark"] .ptext.p-medium  { color: #E3B341; }

  /* ---- status chips ---- */
  .statusrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
  .statuschip {
    font-family: var(--sans); font-size: 10.5px; font-weight: 800;
    letter-spacing: 0.05em; text-transform: uppercase;
    padding: 5px 9px; border-radius: 6px; cursor: pointer;
    border: 0.5px solid var(--hairline); background: var(--raise2); color: var(--muted);
  }
  .statuschip:hover { color: var(--ink); }
  .statuschip.ro { cursor: default; }
  .statuschip.on { color: #fff; border-color: transparent; }
  .statuschip.s-backlog.on { background: #6B778C; }
  .statuschip.s-todo.on { background: #42526E; }
  .statuschip.s-progress.on { background: #2684FF; }
  .statuschip.s-review.on { background: #8777D9; }
  .statuschip.s-done.on { background: #36B37E; }

  /* ---- column counts on the Details tab ---- */
  .boardsum {
    display: flex; gap: 8px; margin: 4px 0 6px; flex-wrap: wrap;
  }
  .bsumcell {
    flex: 1 1 0; min-width: 92px;
    background: var(--surface); border: 0.5px solid var(--hairline);
    border-radius: 12px; padding: 11px 12px;
  }
  .bsumcell.zero { opacity: 0.55; }
  .bsumn { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
  .bsumname { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.03em; margin-top: 2px; }

  .pollfoot { font-size: 11px; color: var(--muted); margin-top: 2px; }
  .pollup .declink { cursor: default; }
  .pollup .declink:hover { text-decoration: none; }

  /* the chat's compact ticket row */
  .taskrow .tchip { flex: none; }
  .taskrow .ptext { margin-left: auto; }
  .taskrow .who { flex: none; }

  body.mobile .boardhead { padding: 20px 18px 0; }
  body.mobile .headline { flex-wrap: wrap; row-gap: 2px; column-gap: 10px; margin-bottom: 12px; }
  body.mobile .headline h2 { width: 100%; }
  body.mobile .headline .tag { order: 1; }
  body.mobile .headline .headspace { order: 2; flex: 1; }
  body.mobile .headline .tfilter { order: 3; }
  /* a phone has no room for a month, a nav and a button on one line, so the
     calendar's line wraps: name, then what is next, then the controls */
  body.mobile .headline.calhead .tag { width: 100%; order: 1; margin-bottom: 2px; }
  body.mobile .headline.calhead .calnav { order: 2; margin-left: -8px; }
  body.mobile .headline.calhead .calnow { order: 3; }
  body.mobile .headline.calhead .headspace { order: 4; }
  body.mobile .headline.calhead .createbtn { order: 5; }
  body.mobile .board { padding: 2px 18px 40px; }
  body.mobile .bcol { flex: 0 0 226px; min-width: 226px; }
  .tdcrumb { margin-bottom: 6px; }
  .tdcrumb .tdid { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

  /* ---------- view switcher, list and table ---------- */
  .viewbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
  .viewbar .tfilter { margin: 0; }
  .viewseg { flex: none; }
  .boardhead .dhead { display: flex; align-items: center; gap: 12px; }
  .boardhead .dhead h2 { flex: 1; }
  .createbtn { flex: none; white-space: nowrap; }
  .bcoladd {
    background: none; border: none; color: var(--muted); cursor: pointer;
    font-family: var(--sans); font-size: 14px; line-height: 1; padding: 2px 3px;
    border-radius: 6px; margin-left: 2px;
  }
  .bcoladd:hover { background: var(--hover); color: var(--ink); }

  /* list */
  .tlist { width: min(1180px, 100%); margin: 0 auto; padding: 0 24px 44px; }
  .tlgroup { margin-bottom: 22px; }
  .tlhead { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; }
  .tlcount { font-size: 11px; font-weight: 700; color: var(--muted); }
  .tlrow {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    padding: 9px 10px; border-radius: 10px;
    background: var(--surface); border: 0.5px solid var(--hairline);
    font-family: var(--sans); font-size: 13.5px; color: var(--ink); cursor: pointer;
    margin-bottom: 6px;
  }
  .tlrow:hover { border-color: var(--dim); }
  .tlrow.done .tlsum { color: var(--muted); }
  .tlsum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tlcontainer {
    flex: none; font-size: 10.5px; font-weight: 600; color: var(--muted);
    background: var(--raise2); border-radius: 4px; padding: 2px 6px; white-space: nowrap;
  }
  .tllabels { display: inline-flex; gap: 4px; flex: none; }
  .tldue { flex: none; font-size: 11px; font-weight: 600; color: var(--muted); min-width: 46px; text-align: right; }
  .tldue.urg { color: #FF3B30; }
  .tlwho { flex: none; display: inline-flex; }
  .tlwho .mavatar { width: 21px; height: 21px; font-size: 8.5px; }

  /* table */
  .ttablewrap {
    width: min(1180px, 100%); margin: 0 auto; padding: 0 24px 44px;
    overflow-x: auto;
  }
  .ttable { width: 100%; border-collapse: collapse; font-size: 13px; }
  .ttable th {
    text-align: left; font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--muted); padding: 8px 10px;
    border-bottom: 0.5px solid var(--hairline); cursor: pointer; white-space: nowrap;
  }
  .ttable th:hover { color: var(--ink); }
  .ttable th.sorted { color: var(--ink); }
  .tsarrow { margin-left: 4px; font-size: 10px; }
  .ttable td {
    padding: 9px 10px; border-bottom: 0.5px solid var(--hairline);
    vertical-align: middle;
  }
  .ttable tbody tr { cursor: pointer; }
  .ttable tbody tr:hover td { background: var(--hover); }
  .ttable tbody tr.done .tdkey { text-decoration: line-through; }
  .ttable tbody tr.done .tdsum { color: var(--muted); }
  .tdkey { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
  .ttable .statuschip, .tlhead .statuschip { white-space: nowrap; }
  .tdsum { min-width: 240px; }
  .tdsum .tllabels { margin-left: 8px; }
  .tdmut { color: var(--muted); font-size: 12px; white-space: nowrap; }
  .tdmut.urg { color: #FF3B30; font-weight: 600; }
  .tdwho { white-space: nowrap; }
  .tdwho .mavatar { width: 20px; height: 20px; font-size: 8px; margin-right: 6px; }

  /* ---------- status picker in the ticket sheet ---------- */
  .stpick { position: relative; display: inline-flex; }
  .stpick .statuschip { display: inline-flex; align-items: center; gap: 5px; }
  .stcar { font-size: 9px; opacity: 0.8; }
  .stmenu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 140px;
    display: flex; flex-direction: column; gap: 2px; padding: 5px;
    background: var(--menu-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 0.5px solid var(--hairline); border-radius: 11px; box-shadow: var(--shadow-soft);
  }
  .stopt {
    background: none; border: none; padding: 4px 5px; border-radius: 7px;
    cursor: pointer; text-align: left; font-family: var(--sans);
  }
  .stopt:hover { background: var(--hover); }
  .stopt .statuschip { white-space: nowrap; display: block; text-align: center; }
  .stopt.on { background: var(--active); }

  /* ---------- new ticket form ---------- */
  #ov-newtask .dialog, #ov-newmeet .dialog, #ov-meet .dialog { width: min(540px, calc(100vw - 40px)); position: relative; max-height: 88vh; overflow-y: auto; }
  #ov-newtask .dx, #ov-newmeet .dx, #ov-meet .dx { top: 12px; right: 14px; }
  #ov-newtask .tdtitle, #ov-newmeet .tdtitle, #ov-meet .tdtitle { padding-right: 34px; }
  #ov-meet .tdcrumb .tdid { display: inline-flex; align-items: center; gap: 6px; }
  #ov-meet .tdcrumb .ic { width: 14px; height: 14px; }
  .ntform { margin-top: 14px; }
  /* `.dialog label` also matches these, so the element is named to outrank it */
  .ntform label.ntlbl {
    display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--muted); margin: 20px 0 6px;
  }
  /* only the label that opens the form, not the first one inside each grid cell */
  .ntform > label.ntlbl:first-child { margin-top: 0; }
  .ntinput, .ntform select, .ntform input[type="date"] {
    width: 100%; font-family: var(--sans); font-size: 13.5px; color: var(--ink);
    background: var(--ground); border: 0.5px solid var(--hairline);
    border-radius: 9px; padding: 9px 11px;
  }
  .ntinput:focus, .ntform select:focus, .ntform input:focus { outline: 1.5px solid var(--blue); outline-offset: -1px; }
  .ntgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
  .ntby { font-size: 12px; color: var(--muted); margin-top: 14px; }
  .ntby b { color: var(--ink); font-weight: 650; }
  .youchip.ai { background: rgba(10,122,255,0.14); color: var(--blue-deep); }

  body.mobile .ntgrid { grid-template-columns: 1fr; }
  body.mobile .tlist, body.mobile .ttablewrap { padding: 0 18px 40px; }
  body.mobile .tlrow { padding: 10px 11px; }
  body.mobile .tlcontainer { display: none; }

  /* ---------- ticket sheet: one voice for every field ---------- */
  /* Labels on the left, values on the right, all the same colour and size.
     Only the avatars carry any colour of their own. */
  #taskdetail .tmeta { font-size: 13.5px; }
  /* the plain values only: the avatar keeps its own type, the container its link blue */
  #taskdetail .tmeta > span:not(.lbl):not(.mavatar):not(.tdcontainer) {
    font-size: 13.5px; font-weight: 400; color: var(--ink);
  }
  /* the container is the one value that goes somewhere, so it reads as a link */
  #taskdetail .tmeta > span.tdcontainer { color: var(--blue); font-weight: 600; text-decoration: none; }
  #taskdetail .tmeta > span.tdcontainer:hover { color: var(--blue-deep); text-decoration: underline; }
  #taskdetail .tmeta .mavatar { width: 20px; height: 20px; font-size: 8.5px; }
  #tfilterdetail .setrow .mavatar { width: 20px; height: 20px; font-size: 8.5px; margin-right: 2px; }
  .stvalue {
    display: inline-flex; align-items: center; gap: 4px;
    font-family: var(--sans); cursor: pointer; padding-right: 6px;
  }
  .stvalue:hover { filter: brightness(1.08); }
  .stvalue .stcar { display: flex; opacity: 0.8; }
  .stvalue .stcar .ic { width: 12px; height: 12px; }

  /* ---------- replies ---------- */
  .cmtfold {
    display: flex; align-items: center; gap: 6px; margin-left: 26px;
    background: none; border: none; padding: 2px 0; cursor: pointer;
    font-family: var(--sans); font-size: 11.5px; font-weight: 600; color: var(--muted);
  }
  .cmtfold:hover { color: var(--ink); }
  .cmtfoldchev { display: flex; color: var(--dim); transition: transform 0.18s ease; }
  .cmtfoldchev .ic { width: 13px; height: 13px; }
  .cmtfold.open .cmtfoldchev { transform: rotate(180deg); }
  .cmtkids { display: flex; flex-direction: column; gap: 12px; }

  /* ---------- filter sheet ---------- */
  .tfscope, .trefscope { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
  #tfilterdetail { max-height: 76vh; overflow-y: auto; padding-right: 2px; }
  /* the apply row stays reachable however long the facet list runs */
  #tfilterdetail .btns {
    position: sticky; bottom: 0; z-index: 2;
    display: flex; flex-wrap: nowrap; gap: 8px; align-items: center;
    margin: 10px 0 0; padding: 10px 0 2px;
    background: var(--dialog-bg);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-top: 0.5px solid var(--hairline);
  }
  #tfilterdetail .btns .btn { flex: none; }
  #tfilterdetail .btns .btn.wide { flex: 1; }
  .setrow .setn {
    margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted);
    background: var(--raise2); border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center;
  }
  .setrow .setn + .setval { margin-left: 8px; }
  .setrow .setval { margin-left: 8px; }

  /* ---------- ticket resources ---------- */
  .reslist { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
  .resrow {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 4px; border-bottom: 0.5px solid var(--hairline);
  }
  .resrow:last-child { border-bottom: none; }
  .resrow > .ic, .resrow > .brandic { flex: none; width: 17px; height: 17px; color: var(--muted); }
  .resthumb { flex: none; width: 30px; height: 30px; border-radius: 6px; object-fit: cover; }
  .resbody { flex: 1; min-width: 0; }
  .resname {
    display: block; font-size: 13.5px; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  a.resname { color: var(--blue); text-decoration: none; }
  a.resname:hover { text-decoration: underline; }
  .ressub { font-size: 11px; color: var(--muted); margin-top: 1px; }
  #taskdetail .btns { margin-top: 10px; }
  .connrow { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
  .connchip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 11px; border-radius: 9px; cursor: pointer;
    border: 0.5px solid var(--hairline); background: var(--surface);
    font-family: var(--sans); font-size: 12.5px; color: var(--ink);
  }
  .connchip:hover { border-color: var(--dim); }
  .connchip.on { border-color: var(--blue); background: rgba(10,122,255,0.08); color: var(--blue-deep); }
  .connchip .ic, .connchip .brandic { width: 15px; height: 15px; }

  /* ---------- phone sheets you can drag away ---------- */
  .sheetdrag { display: none; }
  body.mobile .sheetdrag {
    display: block; padding: 2px 0 12px; margin: -4px 0 0;
    cursor: grab; touch-action: none;
  }
  body.mobile .sheetdrag:active { cursor: grabbing; }
  body.mobile .sheetdrag .grab {
    width: 40px; height: 5px; border-radius: 3px;
    background: var(--dim); opacity: 0.55; margin: 0 auto;
  }
  body.mobile #ov-newtask .dialog, body.mobile #ov-tfilter .dialog, body.mobile #ov-newmeet .dialog, body.mobile #ov-meet .dialog { padding-top: 8px; }
  body.mobile #ov-newtask .dx, body.mobile #ov-tfilter .dx, body.mobile #ov-newmeet .dx, body.mobile #ov-meet .dx { top: 10px; right: 4px; }
  body.mobile #tfilterdetail { max-height: none; overflow: visible; }
  /* the apply row sits flush with the sheet edge, so nothing scrolls under it */
  body.mobile #ov-tfilter .dialog { padding-bottom: 0; }
  body.mobile #tfilterdetail .btns { padding-bottom: 26px; }

  /* ---------- task header bar ---------- */
  /* title, then the count, then filter on the left and the view plus create on
     the right; a phone drops the view switcher and moves the filter across */
  /* ---------- calendar ---------- */
  /* The grid finds a day; the list under it is where the day is actually read.
     Eight point text crammed in a box is not reading, so the cells only carry
     a number and a dot per thing on. */
  .calwrap { overflow-y: auto; }
  .calgrid {
    width: min(1180px, 100%); margin: 0 auto; padding: 0 24px;
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  }
  .caldow {
    font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em;
    color: var(--muted); text-align: center; padding: 2px 0 6px;
  }
  .calcell {
    position: relative; min-height: 62px;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 8px 4px 6px;
    background: var(--ground); border: 0.5px solid var(--hairline);
    border-radius: 11px; cursor: pointer;
    font: inherit; color: var(--ink);
    transition: background 0.12s ease, border-color 0.12s ease;
  }
  .calcell:hover { background: var(--hover); }
  .calcell.out { opacity: 0.38; }
  .caldn { font-size: 13px; font-weight: 600; line-height: 1; }
  .calcell.today .caldn {
    background: var(--blue); color: #fff; border-radius: 999px;
    width: 21px; height: 21px; display: grid; place-items: center;
    margin: -3px 0 -2px;
  }
  .calcell.sel { border-color: var(--blue); background: rgba(10,122,255,0.07); }
  .caldots { display: flex; gap: 3px; }
  .caldot { width: 5px; height: 5px; border-radius: 999px; background: var(--blue); }
  .caldot.past { background: var(--muted); opacity: 0.55; }
  /* a call is filled, a task of yours is hollow, one you are late on is red */
  /* an event is not a call, so it is not a circle */
  /* one mapping, used by the marks on the grid, the tag on the row and the
     little swatch on the picker */
  .m-meeting  { --mk: var(--blue); }
  .m-deadline { --mk: #FF3B30; }
  .m-travel   { --mk: var(--contrib); }
  .m-delivery { --mk: var(--draft); }
  .m-launch   { --mk: var(--good); }
  .m-other    { --mk: var(--dim); }
  .calev { width: 5px; height: 5px; border-radius: 1.5px; background: var(--mk, var(--dim)); }
  .calev.past { background: var(--muted); opacity: 0.55; }
  .caldue {
    width: 5px; height: 5px; border-radius: 999px;
    border: 1.5px solid var(--blue); box-sizing: border-box;
  }
  .caldue.late { border-color: #FF3B30; background: #FF3B30; }
  .caldue.past { border-color: var(--muted); opacity: 0.55; }
  .duelist { display: flex; flex-direction: column; gap: 6px; }
  .duerow { width: 100%; }
  .duewho { flex: none; display: inline-flex; }
  .duewho .mavatar { width: 22px; height: 22px; font-size: 9px; }
  .duelate {
    flex: none; font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
    text-transform: uppercase; color: #FF3B30;
  }
  .calday .setlbl { margin-top: 18px; }
  /* the calendar's create keeps its word, so it opts out of the square ＋ */
  .headline .createbtn.schedbtn {
    width: auto; height: auto; padding: 7px 14px;
    display: inline-flex; align-items: center; font-size: 12.5px;
  }
  .calnav { display: flex; align-items: center; gap: 2px; }
  .calmon {
    font-size: 13.5px; font-weight: 700; min-width: 132px; text-align: center;
  }
  .calarrow {
    background: none; border: none; cursor: pointer; color: var(--muted);
    font-size: 19px; line-height: 1; padding: 2px 8px; border-radius: 8px;
  }
  .calarrow:hover { background: var(--hover); color: var(--ink); }
  .calnow { flex: none; }
  .headline .calnav { flex: none; margin-left: 4px; }
  .calday { width: min(1180px, 100%); margin: 0 auto; padding: 22px 24px 44px; }
  .calday h3 { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
  .meetlist { display: flex; flex-direction: column; }
  .meetrow {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 12px; border-radius: 12px; cursor: pointer;
    border-bottom: 0.5px solid var(--hairline);
  }
  .meetrow:last-child { border-bottom: none; }
  .meetrow:hover { background: var(--hover); }
  .meetrow.past { opacity: 0.5; }
  .meetrow.live { background: rgba(52,199,89,0.09); }
  .meettime { flex: none; width: 74px; display: flex; flex-direction: column; gap: 2px; }
  .mtat { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .mtlen { font-size: 11px; color: var(--muted); }
  .meetmain { flex: 1; min-width: 0; }
  .meetname { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
  .meetsub { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--muted); }
  .meetf { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .meetwho { display: flex; align-items: center; }
  .meetwho .mavatar {
    width: 20px; height: 20px; font-size: 8.5px;
    margin-left: -5px; box-shadow: 0 0 0 1.5px var(--ground);
  }
  .meetwho .mavatar:first-child { margin-left: 0; }
  .meetmore { font-size: 10.5px; font-weight: 700; margin-left: 4px; }
  .meetgo { flex: none; display: flex; align-items: center; gap: 6px; }
  .meetlead { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
  .evrow .meetname { display: flex; align-items: center; gap: 7px; }
  .evrow .meetname .ic { width: 14px; height: 14px; flex: none; color: var(--contrib); }
  .cactrow.gone { opacity: 0.5; cursor: default; }
  .meetrep { display: inline-flex; flex: none; color: var(--muted); }
  .meetrep .ic { width: 13px; height: 13px; }
  .repuntil { font-size: 11.5px; color: var(--muted); margin-left: 9px; }
  .mvsel { font-family: var(--sans); font-size: 13px; }
  .meetplace, .meetres {
    display: inline-flex; align-items: center; gap: 4px; flex: none;
    max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .meetplace .ic, .meetres .ic { width: 12px; height: 12px; flex: none; }
  /* typed straight onto the event, so they look like the lines they replace
     until you put a cursor in one */
  .mvinput, .mvnote {
    font-family: var(--sans); font-size: 13.5px; color: var(--ink);
    background: none; border: none; border-radius: 7px; padding: 3px 6px;
    width: 100%; min-width: 0;
  }
  .mvinput { margin-left: -6px; }
  .mvinput:hover, .mvnote:hover { background: var(--hover); }
  .mvinput:focus, .mvnote:focus {
    outline: none; background: var(--surface);
    box-shadow: 0 0 0 1.5px var(--blue);
  }
  .mvinput::placeholder, .mvnote::placeholder { color: var(--dim); }
  .mvnote {
    display: block; line-height: 1.55; resize: vertical; margin: 0 0 4px -6px;
    width: calc(100% + 6px);
  }
  .mvread { white-space: pre-wrap; }
  .mvlocked {
    font-size: 11.5px; line-height: 1.5; color: var(--muted);
    background: var(--ground); border-radius: 10px; padding: 9px 11px; margin-top: 10px;
  }
  .mvpin { display: inline-flex; flex: none; color: var(--muted); }
  .mvpin .ic { width: 14px; height: 14px; }
  #meetbody .tdseg { margin: 14px auto 14px; }
  .ntform > textarea.ntarea {
    resize: vertical; line-height: 1.55; min-height: 44px; font-family: var(--sans);
  }
  .meettype {
    display: inline-flex; align-items: center; gap: 5px; flex: none;
    font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--mk, var(--dim));
  }
  .meettype::before {
    content: ''; width: 6px; height: 6px; border-radius: 1.5px;
    background: var(--mk, var(--dim));
  }
  /* the picker wears the colour of whatever is chosen in it */
  #nm-type, #nm-mode { color: var(--mk, var(--ink)); font-weight: 600; }
  .mtat.allday { font-size: 11.5px; font-weight: 700; color: var(--muted); }
  #meetbody .tdcrumb .ic, #newmeetbody .tdcrumb .ic { width: 14px; height: 14px; }
  /* the form shows only the fields its type has. A length belongs to a meeting
     either way; a place belongs to anything that is not on the video; a whole
     day belongs to a date rather than to something with a start and an end. */
  .nmform .nmuntil { display: none; }
  .nmform.reps .nmuntil { display: block; }
  .nmform .nmlen, .nmform .nmmode { display: none; }
  .nmform.t-meeting .nmlen, .nmform.t-meeting .nmmode { display: block; }
  .nmform.t-meeting .nmallday { display: none; }
  .nmform.t-meeting.md-online .nmplacelbl, .nmform.t-meeting.md-online .nmplace { display: none; }
  /* a field that was not there a moment ago arrives rather than appearing */
  .nmform .nmplacelbl, .nmform .nmplace { animation: fieldin 260ms ease both; }
  @keyframes fieldin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) {
    .nmform .nmplacelbl, .nmform .nmplace { animation: none; }
  }
  .nmform.allday .ntgrid > div:last-child { visibility: hidden; }
  .ntform > label.nmallday {
    display: flex; align-items: center; gap: 8px; font-weight: 600;
    text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--ink);
    cursor: pointer;
  }
  .nmallday input { width: 15px; height: 15px; accent-color: var(--blue); }
  .meetjoin { padding: 5px 13px; font-size: 12.5px; }
  .meetdel { opacity: 0; transition: opacity 0.12s ease; }
  .meetrow:hover .meetdel { opacity: 1; }
  #meetbody .tmeta { font-size: 13.5px; }
  #meetbody .tmeta .tdcontainer {
    background: none; border: none; padding: 0; font: inherit; cursor: pointer;
    color: var(--blue); font-weight: 600;
  }
  #meetbody .tmeta .tdcontainer:hover { color: var(--blue-deep); text-decoration: underline; }
  #meetbody .tmeta .mavatar { width: 20px; height: 20px; font-size: 8.5px; }
  .meetppl { display: flex; flex-wrap: wrap; gap: 8px; }
  .meetp {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--raise2); border-radius: 999px; padding: 3px 11px 3px 3px;
    font-size: 12.5px;
  }
  /* connections: two that reach something, and five labels */
  #ov-conn .dialog, #ov-pick .dialog {
    width: min(540px, calc(100vw - 40px)); position: relative; max-height: 88vh; overflow-y: auto;
  }
  #ov-conn .dx, #ov-pick .dx { top: 12px; right: 14px; }
  #ov-conn .tdtitle, #ov-pick .tdtitle { padding-right: 34px; }
  /* the directory */
  #ov-conn .dialog { width: min(760px, calc(100vw - 40px)); max-height: 90vh; }
  .appsearch { margin: 12px 0 10px; }
  .appcats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
  .appcat {
    border: 0.5px solid var(--hairline); background: var(--surface); color: var(--muted);
    border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12px; cursor: pointer;
  }
  .appcat:hover { color: var(--ink); }
  .appcat.on { background: var(--blue); border-color: var(--blue); color: #fff; }
  .appgrid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 8px;
  }
  .appcard {
    display: flex; align-items: flex-start; gap: 10px; text-align: left;
    padding: 12px; border: 0.5px solid var(--hairline); border-radius: 13px;
    background: var(--surface); font: inherit; cursor: pointer; position: relative;
  }
  .appcard:hover { border-color: var(--dim); }
  .appcard.on { border-color: var(--good); }
  .appic { flex: none; width: 26px; height: 26px; display: grid; place-items: center; }
  .appic .brandic, .appic .ic { width: 24px; height: 24px; }
  .appic.big { width: 40px; height: 40px; }
  .appic.big .brandic, .appic.big .ic { width: 38px; height: 38px; }
  .appic.big .brandic.real { border-radius: 10px; }
  .connchip .brandic.real { width: 16px; height: 16px; border-radius: 4px; }
  /* the real logo, on a light tile whatever the theme, the way an app icon sits
     on a home screen. Half of them are dark marks on nothing and the other half
     bring a background of their own; one tile behind all of them is what makes a
     row of them read as a row. */
  .brandic.real {
    display: grid; place-items: center; border-radius: 7px;
    background: #fff; box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.07);
    overflow: hidden;
  }
  .brandic.real img { width: 76%; height: 76%; object-fit: contain; }
  .brandic.mono {
    display: grid; place-items: center; border-radius: 7px; color: #fff;
    font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
  }
  .appic.big .brandic.mono { font-size: 17px; border-radius: 10px; }
  .appmain { min-width: 0; display: flex; flex-direction: column; }
  .appname { font-size: 13px; font-weight: 600; color: var(--ink); }
  .appby { font-size: 11px; color: var(--muted); margin-top: 1px; }
  .appblurb {
    font-size: 11.5px; line-height: 1.45; color: var(--muted); margin-top: 5px;
  }
  .appon {
    position: absolute; top: 9px; right: 10px;
    font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--good);
  }
  .appback {
    background: none; border: none; padding: 0; margin-bottom: 10px;
    font: inherit; font-size: 12.5px; color: var(--blue); cursor: pointer;
  }
  .apphead { display: flex; align-items: center; gap: 13px; margin-bottom: 10px; }
  .apphmain { flex: 1; min-width: 0; }
  .apphname { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; }
  .appblurb2 { font-size: 13.5px; line-height: 1.6; color: var(--ink); }
  .appcan { margin: 2px 0 4px; padding-left: 19px; }
  .appcan li { font-size: 13px; line-height: 1.55; margin-bottom: 3px; }
  .appauth { font-size: 13px; line-height: 1.55; color: var(--ink); }
  .appscope { display: flex; flex-wrap: wrap; gap: 5px; }
  .appscope code {
    font-family: ui-monospace, Menlo, monospace; font-size: 10.5px;
    background: var(--raise2); border-radius: 5px; padding: 2px 6px; color: var(--muted);
  }
  /* What the assistant did, not what it said. Reads as a record line, so it
     never gets mistaken for the assistant claiming something in prose. */
  /* A run of actions is one thing that happened. The line says how many,
     and opens on to the steps rather than stacking a box per step. */
  .toolgrp { margin: 6px 0 6px 36px; }
  .toolgrphead {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    padding: 5px 10px 5px 8px; border-radius: 999px;
    background: var(--ground); border: 0.5px solid var(--hairline);
    font-size: 12px; line-height: 1.4; color: var(--muted);
  }
  .toolgrphead:hover { background: var(--raise2); }
  .toolgrpic { display: flex; flex: none; }
  .toolgrpic .ic { width: 13px; height: 13px; color: var(--muted); }
  .toolgrpn { font-weight: 600; color: var(--ink); }
  .toolgrp.busy .toolgrpn { color: var(--muted); font-weight: 500; }
  .toolgrp.busy .toolgrpic { animation: toolpulse 1.1s ease-in-out infinite; }
  @keyframes toolpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
  /* shut points across, open points down, and it turns between the two */
  .toolchev {
    display: flex; flex: none; color: var(--muted);
    transform: rotate(-90deg); transition: transform 0.16s ease;
  }
  .toolgrp.open .toolchev { transform: rotate(0deg); }

  .toolsteps {
    margin-top: 6px; padding: 4px 0 4px 11px;
    border-left: 1.5px solid var(--hairline);
    display: flex; flex-direction: column; gap: 9px;
  }
  .toolstep { font-size: 12px; line-height: 1.45; }
  .toolline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .toolno {
    flex: none; width: 15px; height: 15px; border-radius: 999px;
    display: grid; place-items: center; background: var(--raise2);
    font-size: 9.5px; font-weight: 700; color: var(--muted);
  }
  .toolstep .toolic { display: flex; flex: none; }
  .toolstep .toolic .ic { width: 14px; height: 14px; color: var(--muted); }
  /* the app's own mark, on the tile it always sits on */
  .toolstep .toolic .brandic { width: 17px; height: 17px; }
  .toolstep .toolic .brandic.real { border-radius: 5px; }
  .toolstep .toolic .brandic.mono { border-radius: 5px; font-size: 10px; }
  /* nobody else was involved, so it wears ours rather than a plug */
  .brandic.self {
    width: 17px; height: 17px; border-radius: 5px; flex: none;
    display: grid; place-items: center; font-size: 10px;
    background: linear-gradient(135deg, #0A7AFF, #9D5CFF); color: #fff;
  }
  .toolwhat { font-weight: 700; color: var(--ink); }
  .tooldetail { color: var(--ink); }
  .toolstep.busy .tooldetail { color: var(--muted); }
  .toolwhere {
    margin-left: auto; font-size: 10.5px; color: var(--muted);
    background: var(--raise2); border-radius: 999px; padding: 2px 8px;
  }
  /* what it actually saw */
  .toollist {
    list-style: none; margin: 3px 0 0; padding: 0 0 0 31px;
    display: flex; flex-direction: column; gap: 3px;
  }
  .toollist li {
    color: var(--muted); font-size: 11.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  body.mobile .toolgrp { margin-left: 0; }
  body.mobile .toolwhere { margin-left: 0; }
  body.mobile .toollist { padding-left: 0; }

  /* how long this one lasts, said up front */
  .connlasts {
    margin: 8px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--muted);
  }

  /* signed in, but the loan has run out */
  .connbadge.spent { opacity: 0.55; text-decoration: line-through; }

  /* the three things you can let a connection do */
  .permlist {
    display: flex; flex-direction: column;
    border: 0.5px solid var(--hairline); border-radius: 12px; overflow: hidden;
  }
  .permrow {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    padding: 11px 13px; border: none; background: none; font: inherit; cursor: pointer;
    border-bottom: 0.5px solid var(--hairline);
  }
  .permrow:last-child { border-bottom: none; }
  .permrow:hover { background: var(--ground); }
  .permmain { flex: 1; min-width: 0; }
  .permn { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
  .perms { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
  .permsc { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
  .permsc code {
    font-family: ui-monospace, Menlo, monospace; font-size: 10px;
    background: var(--raise2); border-radius: 5px; padding: 2px 6px; color: var(--muted);
  }
  .permrow.on .permn { color: var(--ink); }
  .permrow .tgl { margin-left: 0; }
  .connbad .btn { display: block; margin-top: 9px; }
  .btn.danger.armed {
    background: #E5493A; border-color: #E5493A; color: #fff;
  }
  /* the one destructive control in this sheet sits away from Close */
  #connbody .btns { justify-content: space-between; }
  #connbody .btns .btn.primary { margin-left: auto; }
  .connbadge {
    display: inline-block; margin-top: 10px; font-size: 11.5px; color: var(--good);
    background: var(--good-soft); border-radius: 999px; padding: 4px 11px;
  }
  body.mobile .appgrid { grid-template-columns: 1fr; }
  .connlist { display: flex; flex-direction: column; margin-top: 14px; }
  .connrow2 {
    display: flex; align-items: center; gap: 12px; padding: 12px 2px;
    border-bottom: 0.5px solid var(--hairline);
  }
  .connrow2 .brandic, .connrow2 .ic { width: 22px; height: 22px; flex: none; }
  .connmain { flex: 1; min-width: 0; }
  .connname { font-size: 13.5px; font-weight: 600; }
  .connsub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
  .connrow2.on .connsub { color: var(--good); }
  .connhelp {
    font-size: 11.5px; line-height: 1.55; color: var(--muted);
    padding: 9px 11px; background: var(--ground); border-radius: 10px; margin: 2px 0 10px;
  }
  .connhelp code { font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
  .connbad {
    font-size: 11.5px; line-height: 1.5; color: #E5493A;
    padding: 8px 11px; background: rgba(229,73,58,0.08); border-radius: 10px; margin: 2px 0 10px;
  }
  .ghdev {
    font-size: 12.5px; line-height: 1.6; padding: 12px;
    background: var(--ground); border-radius: 12px; margin: 4px 0 12px;
  }
  .keyat { display: block; margin-bottom: 9px; }
  .ghopen { display: block; margin-top: 11px; }
  .ghcode {
    display: block; margin-top: 8px; font-family: ui-monospace, Menlo, monospace;
    font-size: 22px; font-weight: 700; letter-spacing: 0.14em; color: var(--ink);
  }
  .picksearch { margin: 12px 0 10px; }
  .picklist { display: flex; flex-direction: column; max-height: 46vh; overflow-y: auto; }
  .pickrow {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    width: 100%; text-align: left; padding: 9px 10px; border: none; background: none;
    border-radius: 9px; font: inherit; cursor: pointer;
  }
  .pickrow:hover { background: var(--hover); }
  .pickname { font-size: 13.5px; font-weight: 600; color: var(--ink); }
  .picksub { font-size: 11.5px; color: var(--muted); }
  .connchip.real.live { border-color: var(--good); }
  .connrest { display: flex; flex-wrap: wrap; gap: 7px; }
  .connrest .connchip { cursor: default; opacity: 0.7; }
  body.mobile #ov-conn, body.mobile #ov-pick { align-items: flex-end; }
  body.mobile #ov-conn .dialog, body.mobile #ov-pick .dialog { width: 100%; }

  /* something the assistant made rather than said */
  .artcard {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 13px; margin: 8px 0 2px;
    background: var(--surface); border: 0.5px solid var(--hairline);
    border-radius: 13px; cursor: pointer; box-shadow: var(--shadow-soft);
  }
  .artcard:hover { border-color: var(--dim); }
  .artcard.wait, .artcard.off { cursor: default; }
  .artcard.off { opacity: 0.55; box-shadow: none; }
  .artcard > .ic { width: 19px; height: 19px; flex: none; color: var(--blue); }
  .artcard.wait > .ic { animation: cnpulse 1.6s ease-in-out infinite; }
  .artbody2 { flex: 1; min-width: 0; }
  .artt { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
  .artm { font-size: 11.5px; color: var(--muted); }
  #ov-art .dialog { width: min(760px, calc(100vw - 40px)); position: relative; max-height: 90vh; overflow-y: auto; }
  #ov-art .dx { top: 12px; right: 14px; }
  #ov-art .tdtitle { padding-right: 34px; }
  #ov-art .tdcrumb .tdid { display: inline-flex; align-items: center; gap: 6px; }
  #ov-art .tdcrumb .ic { width: 14px; height: 14px; }
  .artread { font-size: 14px; line-height: 1.65; color: var(--ink); }
  .artread h2 { font-size: 17px; font-weight: 700; margin: 20px 0 8px; letter-spacing: -0.01em; }
  .artread h3 { font-size: 14.5px; font-weight: 700; margin: 16px 0 6px; }
  .artread h4, .artread h5 { font-size: 13px; font-weight: 700; margin: 14px 0 5px; color: var(--muted); }
  .artread h2:first-child, .artread h3:first-child { margin-top: 2px; }
  .artread p { margin: 0 0 11px; }
  .artread ul, .artread ol { margin: 0 0 12px; padding-left: 20px; }
  .artread li { margin-bottom: 4px; }
  .artread hr { border: none; border-top: 0.5px solid var(--hairline); margin: 18px 0; }
  .artread code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
    background: var(--raise2); border-radius: 5px; padding: 1px 5px;
  }
  .artscroll { overflow-x: auto; margin: 0 0 14px; }
  .artread table { border-collapse: collapse; width: 100%; font-size: 13px; }
  .artread th, .artread td {
    border-bottom: 0.5px solid var(--hairline); padding: 7px 10px; text-align: left;
  }
  .artread th { font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--muted); }
  .artframe {
    width: 100%; height: min(60vh, 520px); border: 0.5px solid var(--hairline);
    border-radius: 12px; background: var(--surface);
  }
  .artpics { display: flex; flex-wrap: wrap; gap: 8px; }
  .artpic { max-width: 210px; border-radius: 10px; border: 0.5px solid var(--hairline); }
  .artused {
    display: flex; align-items: flex-start; gap: 8px; margin-top: 16px;
    font-size: 11.5px; line-height: 1.5; color: var(--muted);
    background: var(--ground); border-radius: 10px; padding: 9px 11px;
  }
  .artused .ic { width: 14px; height: 14px; flex: none; margin-top: 1px; }
  .artby { font-size: 11.5px; color: var(--muted); margin: 10px 0 2px; }
  body.mobile #ov-art { align-items: flex-end; }
  body.mobile #ov-art .dialog { width: 100%; max-height: 92vh; }

  /* the room before the room */
  #ov-lobby .dialog { width: min(720px, calc(100vw - 40px)); position: relative; }
  #ov-lobby .dx { top: 12px; right: 14px; }
  #ov-lobby .tdtitle { padding-right: 34px; }
  #ov-lobby .tdcrumb .tdid { display: inline-flex; align-items: center; gap: 6px; }
  #ov-lobby .tdcrumb .ic { width: 14px; height: 14px; }
  .lobwrap { display: flex; gap: 18px; margin: 14px 0 4px; align-items: flex-start; }
  .lobstage {
    position: relative; flex: 1 1 auto; min-width: 0; aspect-ratio: 4 / 3;
    background: #16161A; border-radius: 14px; overflow: hidden;
    display: grid; place-items: center;
  }
  .lobvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
  .lobface {
    position: relative; width: 76px; height: 76px; border-radius: 999px;
    background: rgba(255,255,255,0.13); color: #fff;
    display: grid; place-items: center; font-size: 25px; font-weight: 600;
    letter-spacing: 0.02em;
  }
  .lobctl {
    position: absolute; left: 0; right: 0; bottom: 12px; z-index: 2;
    display: flex; justify-content: center; gap: 10px;
  }
  .lobctl .cbtn {
    width: 40px; height: 40px; padding: 0; border-radius: 999px;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.16); border: none; color: #fff; cursor: pointer;
    backdrop-filter: blur(14px);
  }
  .lobctl .cbtn:hover { background: rgba(255,255,255,0.26); }
  .lobctl .cbtn.off { background: #E5493A; }
  .lobctl .cbtn .ic { width: 19px; height: 19px; }
  .loberr {
    position: absolute; left: 10px; right: 10px; top: 10px; z-index: 2;
    background: rgba(0,0,0,0.6); color: #fff; border-radius: 10px;
    padding: 8px 11px; font-size: 11.5px; line-height: 1.45; backdrop-filter: blur(10px);
  }
  .lobside { flex: 0 0 250px; min-width: 0; }
  .lobside select { width: 100%; }
  .lobside .ntlbl {
    display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--muted); margin: 12px 0 5px;
  }
  .lobside .ntlbl:first-child { margin-top: 0; }
  .lobside .setlbl { margin: 16px 0 7px; }
  .lobhere { display: flex; flex-wrap: wrap; gap: 7px; }
  .lobside .emptyline { padding: 0 2px; font-size: 12px; }
  body.mobile #ov-lobby { align-items: flex-end; }
  body.mobile #ov-lobby .dialog { width: 100%; max-height: 92vh; overflow-y: auto; }
  body.mobile .lobwrap { flex-direction: column; }
  /* stacked, the picture takes the width and a shape a phone can hold */
  body.mobile .lobstage { flex: none; width: 100%; aspect-ratio: 16 / 10; }
  body.mobile .lobside { flex: none; width: 100%; }

  /* who is on it: nobody, until you find them. Twenty chips shown by default was
     not a choice anyone made, it was a list to go and undo. */
  .whopick { position: relative; }
  .whochips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
  .whochips.none { display: none; }
  .whochip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(10,122,255,0.08); border: 0.5px solid var(--blue);
    border-radius: 999px; padding: 3px 4px 3px 3px;
    font-size: 12.5px; color: var(--ink);
  }
  .whochip .mavatar { width: 21px; height: 21px; font-size: 9px; }
  .whochip .xbtn { width: 18px; height: 18px; font-size: 15px; flex: none; }
  .whores {
    display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
    margin-top: 5px; padding: 5px; border-radius: 12px;
    background: var(--menu-bg); backdrop-filter: blur(20px);
    border: 0.5px solid var(--hairline); box-shadow: var(--shadow-soft);
    max-height: 176px; overflow-y: auto;
  }
  .whores.on { display: block; }
  .whorow {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 6px 8px; border: none; background: none; border-radius: 8px;
    font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left;
  }
  .whorow .mavatar { width: 22px; height: 22px; font-size: 9px; flex: none; }
  .whorow:hover, .whorow.on { background: var(--hover); }
  body.mobile .calgrid, body.mobile .calday { padding-left: 18px; padding-right: 18px; }
  body.mobile .calcell { min-height: 50px; border-radius: 9px; }
  body.mobile .calmon { min-width: 104px; font-size: 12.5px; }
  body.mobile .meettime { width: 70px; }
  body.mobile .meetdel { opacity: 1; }

  .headbar { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; }
  .headspace { flex: 1; }
  .headbar .tfilter { margin: 0; }
  .headbar .viewseg { flex: none; }
  .boardhead .tag { margin-bottom: 0; }
  .boardhead h2 { margin-bottom: 2px; }
  /* the round corner button opposite the menu on a phone: + on the tasks tab,
     the call button on the chat, never both at once */
  body.mobile #mbadd, body.mobile #mbcall {
    display: flex; align-items: center; justify-content: center;
    position: absolute; right: 12px; top: 10px;
    width: 42px; height: 42px; z-index: 7;
    background: var(--glass-bg);
    backdrop-filter: blur(26px) saturate(1.9);
    -webkit-backdrop-filter: blur(26px) saturate(1.9);
    border: 0.5px solid var(--glass-brd); border-radius: 50%;
    box-shadow: 0 8px 22px rgba(0,0,0,0.14), inset 0 1px 0 var(--glass-hi);
    color: var(--ink); font-size: 19px; cursor: pointer; padding: 0;
  }
  body.mobile #mbadd:active, body.mobile #mbcall:active { transform: scale(0.95); }
  body.mobile #mbcall .ic { width: 18px; height: 18px; }
  body.mobile #mbcall.live { color: var(--good); border-color: rgba(52,168,83,0.5); }

  /* ---------- team calls ---------- */
  .topcall {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; margin-right: 8px; vertical-align: middle;
    background: none; border: none; border-radius: 50%;
    color: var(--muted); cursor: pointer; padding: 0;
  }
  .topcall:hover { background: var(--hover); color: var(--ink); }
  .topcall .ic { width: 17px; height: 17px; }
  .topcall.live { color: var(--good); background: var(--good-soft); }
  #topright { display: flex; align-items: center; }

  /* A call takes the whole screen and goes dark, the way every other call does.
     It is not a dialog with a call in it. */
  #ov-call { padding: 0; align-items: stretch; justify-content: stretch; background: none; }
  #ov-call .dialog.calldlg {
    width: 100%; max-width: none; height: 100%; margin: 0; padding: 0;
    border: none; border-radius: 0; box-shadow: none;
    background: #0B0B0D; color: #fff;
    display: flex; flex-direction: column; overflow: hidden;
    animation: callin 0.22s ease;
  }
  /* the call is rendered into this, so it is the one that has to fill and
     stack; without it the tiles collapse to nothing */
  #calldetail {
    position: relative; flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  @keyframes callin { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) { #ov-call .dialog.calldlg { animation: none; } }

  /* the header floats over the video on its own scrim */
  .callhead {
    position: absolute; top: 0; left: 0; right: 0; z-index: 4;
    display: flex; align-items: center; gap: 10px;
    padding: 16px 18px 30px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
    pointer-events: none;
  }
  .callhead > * { pointer-events: auto; }
  .callwhere {
    display: flex; align-items: center; gap: 6px; min-width: 0;
    font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85);
  }
  .callwhere .ic { width: 14px; height: 14px; flex: none; }
  .callwhere span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .calltimer {
    margin-left: auto; font-size: 13px; font-weight: 700; color: #fff;
    font-variant-numeric: tabular-nums;
  }
  .callmin {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex: none; padding: 0;
    background: rgba(255,255,255,0.14); border: none; border-radius: 50%;
    color: #fff; cursor: pointer;
  }
  .callmin:hover { background: rgba(255,255,255,0.24); }
  .callmin .ic { width: 16px; height: 16px; }

  /* the room itself */
  .calltiles { position: relative; flex: 1; min-height: 0; }
  .calltiles.grid {
    display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr);
    /* the rows share what height there is, so the room never runs off the
       screen, and the last row keeps clear of the floating controls */
    grid-auto-rows: 1fr; gap: 6px; padding: 6px 6px 100px;
  }
  .calltile {
    position: relative; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
    overflow: hidden; background: #17171A;
    border: 2px solid transparent; border-radius: 14px;
    transition: border-color 0.18s ease;
    min-height: 0;
  }
  /* one person fills it; two put the far end on the wall and you in the corner */
  .calltiles.solo .calltile,
  .calltiles.duo .calltile { position: absolute; inset: 0; border-radius: 0; }
  .calltiles.duo .calltile[data-key="me"] {
    inset: auto 16px 108px auto;
    width: 116px; height: 158px; border-radius: 14px; z-index: 3;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }

  .calltile.talking { border-color: #34C759; }
  .calltiles.solo .calltile.talking,
  .calltiles.duo .calltile:not([data-key="me"]).talking { border-color: transparent; }

  .ctvid {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; background: #0B0B0D; opacity: 0;
    transition: opacity 0.2s ease;
  }
  /* only your own camera reads as a mirror; theirs must not be flipped */
  .calltile[data-key="me"] .ctvid { transform: scaleX(-1); }
  .calltile.live .ctvid { opacity: 1; }
  .calltile.live .ctface { display: none; }
  .ctface .avatar { width: 92px; height: 92px; font-size: 30px; }
  .calltiles.grid .ctface .avatar { width: 58px; height: 58px; font-size: 19px; }
  .calltiles.duo .calltile[data-key="me"] .ctface .avatar { width: 40px; height: 40px; font-size: 14px; }
  .ctname {
    position: absolute; left: 12px; bottom: 10px; z-index: 2;
    font-size: 13px; font-weight: 600; color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .calltiles.duo .calltile[data-key="me"] .ctname { font-size: 11px; left: 8px; bottom: 6px; }
  .ctmute { display: none; }
  .calltile.muted .ctmute {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    display: flex; color: #fff; background: #E5493A; border-radius: 50%; padding: 5px;
  }
  .ctmute .ic { width: 13px; height: 13px; }

  /* whatever the call has to say sits in the middle of the empty room */
  #callnote {
    position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
    z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 0 34px; pointer-events: none;
  }
  #callnote:empty { display: none; }
  .callerr {
    max-width: 340px; text-align: center; font-size: 12.5px; line-height: 1.5;
    color: #FFD6A5; background: rgba(255,159,10,0.16);
    border-radius: 12px; padding: 10px 14px;
  }
  /* an empty call still shows your own picture behind the message */
  .calltiles.solo .calltile:not(.live) { background: #17171A; }

  /* the controls float, they do not sit in a row of buttons */
  .callbar {
    position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
    z-index: 5; display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: 999px;
    background: rgba(28,28,32,0.72);
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
    border: 0.5px solid rgba(255,255,255,0.12);
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  }
  .cbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 18px; border-radius: 999px; cursor: pointer;
    border: none; background: rgba(255,255,255,0.14); color: #fff;
    font-family: var(--sans); font-size: 13px; font-weight: 600;
  }
  .cbtn:hover { background: rgba(255,255,255,0.24); }
  .cbtn .ic { width: 17px; height: 17px; }
  /* off is the state worth seeing at a glance, so it is the loud one */
  .cbtn.off { background: #fff; color: #17171A; }
  .cbtn.off:hover { background: rgba(255,255,255,0.86); }
  .cbtn.leave { background: #E5493A; color: #fff; }
  .cbtn.leave:hover { background: #C93B2E; }
  .cbtn:disabled { opacity: 0.4; cursor: default; }
  .cbtn:disabled:hover { background: rgba(255,255,255,0.14); }

  /* the strip above the composer while a call runs in the background */
  #feedforward.callbar-live {
    display: flex; align-items: center; gap: 9px;
    font-size: 12.5px; color: var(--ink);
    padding: 7px 24px 9px;
  }
  #feedforward.callbar-live .cbtxt { color: var(--muted); }
  #feedforward.callbar-live b { color: var(--ink); font-variant-numeric: tabular-nums; }
  #feedforward.callbar-live .btn { padding: 5px 11px; font-size: 12px; }
  .cbdot {
    width: 8px; height: 8px; border-radius: 50%; flex: none;
    background: var(--good); animation: cbpulse 1.6s ease-in-out infinite;
  }
  @keyframes cbpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
  @media (prefers-reduced-motion: reduce) { .cbdot { animation: none; } }

  /* how a finished call reads back in the chat */
  .callcard {
    display: flex; align-items: center; gap: 11px;
    width: fit-content; max-width: 460px; margin: 13px auto;
    padding: 10px 14px; border-radius: 999px;
    background: var(--surface); border: 0.5px solid var(--hairline);
  }
  .callcard > .ic { width: 16px; height: 16px; flex: none; color: var(--muted); }
  .ccbody { min-width: 0; }
  .cct { font-size: 12.5px; font-weight: 650; color: var(--ink); }
  .ccm { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
  .ccfaces { display: flex; flex: none; }
  .ccfaces .mavatar { width: 21px; height: 21px; font-size: 8.5px; margin-left: -6px; border: 1.5px solid var(--surface); }
  .ccfaces .mavatar:first-child { margin-left: 0; }

  body.mobile #ov-call .dialog.calldlg {
    width: 100%; height: 100%; border-radius: 44px; padding: 0;
  }
  /* clear of the notch at the top and the home bar at the bottom */
  body.mobile .callhead { padding: 52px 18px 30px; }
  body.mobile .callbar { bottom: 34px; gap: 8px; padding: 8px; }
  body.mobile .cbtn { height: 44px; padding: 0 14px; font-size: 12.5px; }
  body.mobile .cbtn span { display: none; }
  body.mobile .cbtn.leave span { display: inline; }
  body.mobile .calltiles.duo .calltile[data-key="me"] {
    inset: auto 12px 116px auto; width: 96px; height: 132px;
  }
  body.mobile .ctface .avatar { width: 74px; height: 74px; font-size: 25px; }
  /* clear of the home indicator */
  body.mobile .calltiles.duo .calltile:not([data-key="me"]) .ctname,
  body.mobile .calltiles.solo .ctname { bottom: 26px; }
  /* the demo button sits over this corner on a phone, so the strip stops short
     of it and the wording gives up the container name to make room */
  body.mobile #feedforward.callbar-live { padding: 7px 116px 9px 14px; }
  body.mobile #feedforward.callbar-live .cbwhere { display: none; }


  /* attach sits with the add button, as an icon */
  .resadd { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
  .resadd .poinput { flex: 1; min-width: 0; }
  .resclip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; flex: none; padding: 0; border-radius: 9px;
  }
  .resclip .ic { width: 17px; height: 17px; }
  #taskdetail .reslist { margin-bottom: 4px; }

  /* the assignee is picked the same way the status is */
  .whovalue {
    display: inline-flex; align-items: center; gap: 7px;
    background: none; border: none; padding: 2px 6px 2px 0; margin: 0;
    font-family: var(--sans); font-size: 13.5px; color: var(--ink); cursor: pointer;
  }
  .whovalue:hover { color: var(--blue-deep); }
  .whovalue .mavatar { width: 20px; height: 20px; font-size: 8.5px; }
  .whomenu { min-width: 180px; max-height: 260px; overflow-y: auto; }
  .whoopt {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 6px 8px; font-size: 13px; color: var(--ink);
  }
  .whoopt .mavatar { width: 20px; height: 20px; font-size: 8.5px; }

  /* delete sits away from the step that moves the ticket on */
  .taskacts { align-items: center; }
  .taskacts .tspace { flex: 1; }
  #taskdetail .btn.del { color: #E5493A; border-color: rgba(229,73,58,0.4); }
  #taskdetail .btn.del:hover { background: rgba(229,73,58,0.08); }
  #taskdetail .btn.del.armed { background: #E5493A; border-color: #E5493A; color: #fff; }

  /* the comments count reads as a notification, not part of the label */
  .tdseg button { position: relative; }
  .tdseg .segn {
    position: absolute; top: -5px; right: -6px; margin: 0;
    min-width: 17px; height: 17px; padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    background: #E5493A; color: #fff; border-radius: 999px;
    font-size: 10px; font-weight: 700; line-height: 1;
    box-shadow: 0 0 0 2px var(--dialog-bg);
  }
  .tdseg button.on .segn { background: #E5493A; color: #fff; }

  /* Delete is the icon and nothing around it. A box drawn around a red trash can
     reads as a thing to press by accident; the tint only arrives on hover, and
     the second tap is the state that gets to shout. */
  #taskdetail .btn.del.iconbtn {
    display: inline-flex; align-items: center; gap: 6px;
    /* not the 32px square .iconbtn hands out, or the second tap's word is clipped */
    width: auto; height: auto; padding: 6px 8px; border-radius: 8px;
    background: none; border: none; box-shadow: none;
  }
  #taskdetail .btn.del.iconbtn:hover { background: rgba(255,59,48,0.12); }
  #taskdetail .btn.del.iconbtn.armed { background: #FF3B30; color: #fff; }
  #taskdetail .btn.del .ic { width: 17px; height: 17px; }
  .delsure { font-size: 12px; font-weight: 700; }

  /* the search palette dims the whole app, sidebar included */
  body.searching #sidebar, body.searching #main {
    filter: blur(2px) saturate(0.9); transition: filter 0.16s ease;
  }
  body.searching #sidebar { pointer-events: none; }

  /* a ticket key written in a message opens the ticket */
  .tasklink {
    display: inline-flex; align-items: center; gap: 5px; vertical-align: baseline;
    padding: 1px 7px 1px 5px; margin: 0 1px; border-radius: 6px;
    border: 0.5px solid var(--hairline); background: var(--surface);
    font-family: var(--sans); font-size: 12px; font-weight: 700;
    color: var(--blue); cursor: pointer;
  }
  .tasklink:hover { border-color: var(--blue); background: rgba(10,122,255,0.08); }
  .mrow.self .tasklink { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.3); color: #fff; }
  .mrow.self .tasklink .tchip { background: rgba(255,255,255,0.24); color: #fff; }

  #ov-tref .dialog { width: min(540px, calc(100vw - 40px)); max-height: 84vh; overflow-y: auto; position: relative; }
  #ov-tref .dx { top: 12px; right: 14px; }
  #ov-tref .tdtitle { padding-right: 34px; }
  .treflist { max-height: 52vh; overflow-y: auto; }
  .trefrow { gap: 9px; }
  .trefkey { font-size: 11.5px; font-weight: 700; color: var(--muted); flex: none; }
  .trefsum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .trefrow .statuschip { flex: none; }

  /* ---------- the call as a small window ---------- */
  /* The overlay stops being a scrim and becomes a frame the window floats in,
     so everything behind it stays usable. */
  #ov-call.mini {
    display: block; background: none; pointer-events: none;
    align-items: initial; justify-content: initial;
  }
  #ov-call.mini .dialog.calldlg {
    position: absolute; pointer-events: auto;
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 18px 50px rgba(0,0,0,0.42), 0 0 0 0.5px rgba(255,255,255,0.1);
    animation: none;
  }
  #ov-call.mini .callhead {
    padding: 8px 8px 22px; gap: 6px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
  }
  /* the whole window moves, so the cursor says so everywhere but the controls */
  #ov-call.mini .dialog.calldlg { cursor: grab; }
  #ov-call.mini .cbtn, #ov-call.mini .callmin { cursor: pointer; }
  body.calldrag, body.calldrag #ov-call.mini .callhead { cursor: grabbing; user-select: none; }
  #ov-call.mini .callwhere { font-size: 11px; }
  #ov-call.mini .calltimer { font-size: 11px; }
  #ov-call.mini .callmin { width: 24px; height: 24px; }
  #ov-call.mini .callmin .ic { width: 12px; height: 12px; }
  #ov-call.mini .ctname { font-size: 11px; left: 8px; bottom: 6px; }
  #ov-call.mini .ctface .avatar { width: 42px; height: 42px; font-size: 15px; }
  #ov-call.mini .calltiles.grid { padding: 3px; gap: 3px; }
  #ov-call.mini .calltiles.grid .calltile { border-radius: 8px; }
  /* the corner picture would be a picture inside a picture, so it stands down */
  #ov-call.mini .calltiles.duo .calltile[data-key="me"] { display: none; }
  #ov-call.mini #callnote { display: none; }
  #ov-call.mini .callbar {
    bottom: 8px; gap: 6px; padding: 5px; border-radius: 999px;
  }
  #ov-call.mini .cbtn { height: 32px; width: 32px; padding: 0; }
  #ov-call.mini .cbtn.leave { width: 40px; }
  #ov-call.mini .cbtn .ic { width: 14px; height: 14px; }
  #ov-call.mini .cbtn span { display: none; }
  /* the corner you drag to make it bigger */
  .callgrow { display: none; }
  #ov-call.mini .callgrow {
    display: block; position: absolute; right: 0; bottom: 0;
    width: 30px; height: 30px; cursor: nwse-resize; z-index: 7;
  }
  #ov-call.mini .callgrow::after {
    content: ""; position: absolute; right: 6px; bottom: 6px;
    width: 11px; height: 11px;
    border-right: 2.5px solid rgba(255,255,255,0.75);
    border-bottom: 2.5px solid rgba(255,255,255,0.75);
    border-bottom-right-radius: 4px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
  }
  #ov-call.mini .callgrow:hover::after { border-color: #fff; }
  /* a phone gets a picture it can throw into a corner, not a resizable window */
  body.mobile #ov-call.mini .callgrow { display: none; }
  body.mobile #ov-call.mini .callhead { padding: 6px 6px 18px; }
  body.mobile #ov-call.mini .cbtn { height: 28px; width: 28px; }
  body.mobile #ov-call.mini .cbtn.leave { width: 34px; }

  /* the tasks a message points at, carried underneath it: key, name, who has it */
  .refcards { display: flex; flex-direction: column; margin-top: 6px; max-width: 460px; }
  .reftask {
    display: block; width: 100%; text-align: left; margin-top: 4px;
    background: var(--surface); border: 0.5px solid var(--hairline);
    border-radius: 10px; padding: 9px 12px;
    font-family: var(--sans); color: var(--ink); cursor: pointer;
  }
  .reftask:hover { border-color: var(--dim); }
  .refkey { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
  .refname { display: block; font-size: 13.5px; line-height: 1.4; margin-top: 2px; }
  .refwho {
    display: flex; align-items: center; gap: 6px; margin-top: 7px;
    font-size: 12px; color: var(--muted);
  }
  .refwho .mavatar { width: 19px; height: 19px; font-size: 8px; }
  .mrow.self .refcards { margin-left: auto; }

  /* the composer's own buttons */
  .roundbtn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; flex: none; padding: 0; border-radius: 50%;
    background: none; border: none; color: var(--muted); cursor: pointer;
  }
  .roundbtn:hover { background: var(--hover); color: var(--ink); }
  .roundbtn .ic { width: 18px; height: 18px; }
  .roundbtn.rec { background: #E5493A; color: #fff; }
  .roundbtn.rec:hover { background: #C93B2E; color: #fff; }
  .voicebtn { color: var(--blue); }
  .voicebtn:hover { color: var(--blue-deep); }
  /* send is always send; it just goes quiet with nothing to send */
  .mainbtn { opacity: 0.4; transition: opacity 0.15s ease; }
  .mainbtn.ready { opacity: 1; }

  /* what a call left behind */
  .callcard { cursor: pointer; }
  .callcard.off { cursor: default; opacity: 0.55; }
  .callcard:hover { border-color: var(--dim); }
  .callcard .go { color: var(--dim); }
  #ov-calllog .dialog { width: min(560px, calc(100vw - 40px)); max-height: 84vh; overflow-y: auto; position: relative; }
  #ov-calllog .dx { top: 12px; right: 14px; }
  #ov-calllog .tdtitle { padding-right: 34px; }
  #ov-calllog .tdcrumb .tdid { display: inline-flex; align-items: center; gap: 6px; }
  #ov-calllog .tdcrumb .ic { width: 14px; height: 14px; }
  .cnotes { font-size: 13.5px; line-height: 1.6; color: var(--ink); padding: 2px 2px 4px; }
  .cnote2 { font-size: 11.5px; line-height: 1.5; color: var(--muted); padding: 0 2px 8px; }
  /* the transcript is up already; this says who is still working and on what */
  .cnwait {
    display: flex; align-items: center; gap: 9px;
    padding: 13px 12px; border-radius: 12px; background: var(--hover);
    font-size: 12.5px; line-height: 1.5; color: var(--muted);
  }
  .cnwait .ic { width: 16px; height: 16px; flex: none; color: var(--blue); animation: cnpulse 1.6s ease-in-out infinite; }
  @keyframes cnpulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { .cnwait .ic { animation: none; opacity: 0.8; } }

  /* how much room the sidebar is taking, for anything that has to sit beside it */
  body { --sbw: 262px; }
  body.collapsed { --sbw: 62px; }
  /* a phone has no sidebar in the layout, and a call is not a modal */
  body.mobile { --sbw: 0px; }
  #ov-call, #ov-details { padding-left: 0; }

  /* the call says while it is being recorded */
  .crec {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
    color: rgba(255,255,255,0.9);
    background: rgba(229,73,58,0.22); border-radius: 999px; padding: 3px 9px;
  }
  .crec i {
    width: 7px; height: 7px; border-radius: 50%; background: #E5493A;
    animation: cbpulse 1.6s ease-in-out infinite;
  }
  @media (prefers-reduced-motion: reduce) { .crec i { animation: none; } }
  #ov-call.mini .crec { display: none; }

  /* what a call settled, and what was said */
  .cpoints { margin: 2px 0 10px; padding-left: 18px; }
  .cpoints li { font-size: 13.5px; line-height: 1.55; color: var(--ink); margin-bottom: 3px; }
  .csaid { display: flex; flex-direction: column; gap: 7px; margin-bottom: 4px; }
  .csrow { display: flex; gap: 9px; font-size: 13px; line-height: 1.5; }
  .cswho { flex: none; min-width: 62px; font-weight: 650; color: var(--muted); }
  .cstxt { min-width: 0; color: var(--ink); }

  /* and what the container learned from them */
  .cnlist { display: flex; flex-direction: column; gap: 8px; }
  .cnitem {
    background: var(--surface); border: 0.5px solid var(--hairline);
    border-radius: 12px; padding: 11px 13px; cursor: pointer;
  }
  .cnitem:hover { border-color: var(--dim); }
  .cnhead {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 6px;
  }
  .cnhead .ic { width: 13px; height: 13px; }
  .cnwhen { margin-left: auto; font-weight: 500; }
  .cnitem .cpoints { margin: 0; padding-left: 17px; }
  .cnitem .cpoints li { font-size: 13px; }

  /* what a call changed on the board */
  .cacts { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
  .cactrow {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 4px; border-bottom: 0.5px solid var(--hairline);
    font-size: 13px; cursor: pointer;
  }
  .cactrow:last-child { border-bottom: none; }
  .cactrow:hover .cacttxt { color: var(--blue-deep); }
  .cactkind {
    flex: none; font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em;
    text-transform: uppercase; padding: 2px 6px; border-radius: 4px;
  }
  .cactkind.new { color: #1F7A56; background: rgba(54,179,126,0.18); }
  .cactkind.update { color: #1B5FBF; background: rgba(38,132,255,0.18); }
  .cactid { flex: none; font-size: 11.5px; font-weight: 700; color: var(--muted); }
  .cacttxt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .reslink { color: var(--blue); cursor: pointer; }
  .reslink:hover { text-decoration: underline; }
  .cactkind.note { color: #7A6A1F; background: rgba(217,164,4,0.2); }

  /* the list an @ opens over the composer */
  #mention {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: min(560px, calc(100% - 48px)); max-height: 244px; overflow-y: auto;
    z-index: 14; display: none; flex-direction: column; padding: 5px;
    background: var(--menu-bg);
    backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7);
    border: 0.5px solid var(--hairline); border-radius: 14px;
    box-shadow: var(--shadow-soft);
  }
  #mention.show { display: flex; }
  .mrow2 {
    display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
    padding: 8px 9px; border: none; background: none; border-radius: 9px;
    font-family: var(--sans); font-size: 13px; color: var(--ink); cursor: pointer;
  }
  .mrow2:hover, .mrow2.on { background: var(--hover); }
  .mrow2 .mavatar { width: 22px; height: 22px; font-size: 9px; flex: none; }
  .mrow2.on { box-shadow: inset 0 0 0 1px rgba(10,122,255,0.35); }
  .mkey { flex: none; font-size: 11.5px; font-weight: 700; color: var(--muted); }
  .msum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mwhere {
    flex: none; font-size: 10.5px; font-weight: 600; color: var(--muted);
    background: var(--raise2); border-radius: 4px; padding: 2px 6px;
  }
  .mstat { flex: none; }
  body.mobile #mention { width: calc(100% - 28px); max-height: 200px; }

  /* somebody named in a message */
  .wholink {
    display: inline; padding: 1px 5px; border-radius: 5px;
    background: rgba(10,122,255,0.1); color: var(--blue-deep);
    font-weight: 650; cursor: pointer;
  }
  .wholink:hover { background: rgba(10,122,255,0.18); }
  .mrow.self .wholink { background: rgba(255,255,255,0.22); color: #fff; }

  /* ---------- the way in ---------- */
  /* Its own screen rather than a modal over the app, because there is no app
     behind it yet. */
  body.gated { overflow: hidden; }
  #gate {
    position: fixed; inset: 0; z-index: 900; overflow: auto;
    background: var(--bg);
  }
  .gwrap { min-height: 100%; display: grid; place-items: center; padding: 32px 20px; }
  .gcard {
    width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px;
  }
  .gmark {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: linear-gradient(135deg, #0A7AFF, #9D5CFF); color: #fff; font-size: 19px;
    margin-bottom: 4px;
  }
  .gcard h1 { font-size: 25px; font-weight: 680; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
  .gsub { margin: -4px 0 8px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
  .gfine { margin: 8px 0 0; font-size: 12.5px; opacity: .85; }

  /* usage meters */
  .ucard { padding: 12px 14px; display: grid; gap: 12px; }
  .umeter { display: grid; gap: 6px; }
  .utop { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; }
  .utop b { font-weight: 500; }
  .utop span { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
  .ubar { height: 7px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
  .ubar i { display: block; height: 100%; border-radius: 999px; background: var(--blue); transition: width .25s ease; }
  .ubar i.warn { background: #B8791F; }
  .ubar i.over { background: #A6462F; }
  .uover { margin-top: 10px; padding: 10px 12px; border-radius: 8px;
           background: rgba(166,70,47,.10); color: #A6462F; font-size: 13px; }
  .urow { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13.5px; }
  .uinput { width: 130px; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--hairline);
            background: var(--surface); color: var(--ink); font: inherit;
            font-variant-numeric: tabular-nums; text-align: right; }
  .uinput:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
  .gfield { display: flex; flex-direction: column; gap: 5px; }
  .gfield span { font-size: 12px; font-weight: 600; color: var(--muted); }
  .gfield input {
    width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; font-size: 14px;
    color: var(--ink); background: var(--raise); border: 0.5px solid var(--hairline);
    border-radius: 9px; outline: none;
  }
  .gfield input:focus { border-color: #0A7AFF; box-shadow: 0 0 0 3px rgba(10,122,255,0.14); }
  .gbtn {
    margin-top: 4px; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 600;
    color: var(--ink); background: var(--raise); border: 0.5px solid var(--hairline);
    border-radius: 9px; cursor: pointer;
  }
  .gbtn:hover { background: var(--raise2); }
  .gbtn.primary { background: #0A7AFF; border-color: #0A7AFF; color: #fff; }
  .gbtn.primary:hover { filter: brightness(1.06); }
  .gbtn[disabled] { opacity: 0.6; cursor: default; }
  .galt { font-size: 12.5px; color: var(--muted); text-align: center; }
  .glink {
    font: inherit; font-size: inherit; color: #0A7AFF; background: none; border: 0;
    padding: 0; cursor: pointer;
  }
  .glink:hover { text-decoration: underline; }
  .gerr {
    font-size: 12.5px; line-height: 1.5; color: #E5493A;
    background: rgba(229,73,58,0.09); border-radius: 9px; padding: 9px 11px;
  }
  .gmems { display: flex; flex-direction: column; gap: 6px; }
  .gmem {
    display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink);
    background: var(--raise); border: 0.5px solid var(--hairline);
    border-radius: 9px; padding: 8px 11px;
  }
  .gmemail { margin-left: auto; font-size: 11.5px; color: var(--muted); }
  .gor {
    display: flex; align-items: center; gap: 10px; margin: 4px 0;
    font-size: 11.5px; color: var(--muted);
  }
  .gor::before, .gor::after {
    content: ''; flex: 1; height: 0.5px; background: var(--hairline);
  }
  .gbtn.gwith {
    display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 0;
  }
  .gwslbl {
    margin: 10px 0 -2px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--muted);
  }
  .gws {
    display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%;
    padding: 11px 13px; font: inherit; cursor: pointer;
    background: var(--raise); border: 0.5px solid var(--hairline); border-radius: 10px;
  }
  .gws:hover { background: var(--raise2); border-color: #0A7AFF; }
  .gwsn { font-size: 14px; font-weight: 600; color: var(--ink); }
  .gwsw { font-size: 11.5px; color: var(--muted); }
