/* ibtools. Night desk (2026-11-28, Luka; replaces the Valley look): a trading desk at night. Dark slate ground, panels one step lighter,
   one amber accent for the thing to press, IBM Plex Sans with Plex Mono for every number. Dense rows, small radii, hairlines.
   Dark is the default. Light is the same system on a pale ground: <html data-theme="light">, set by /theme.js and kept in the browser.
   Every colour is a token below. Nothing further down names a colour that only reads in one theme. */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');
:root {
  color-scheme: dark;
  --bg: #0F1317; --surface: #161B21; --sunken: #1D242C; --raised: #232B34; --ink: #E8ECEF; --ink-2: #9AA6B2; --ink-3: #7D8A97; --line: #2A333D; --line-soft: #212932; --line-2: #3A4552;
  --accent: #F2B544; --on-accent: #1A1405; --accent-ink: #F2B544; --accent-bg: #3A2F14; --bar-2: #6B5A2E;
  --navy: #232B34; --navy-2: #2C3641; --on-dark: #E8ECEF; --on-dark-2: #A9B4BF;
  --side-bg: #161B21; --side-ink: #FFFFFF; --side-ink-2: #A9B4BF; --side-line: #2A333D; --side-hover: rgba(255,255,255,.05); --side-on: #232B34;
  --bubble-out: #2B3A4E; --bubble-out-ink: #FFFFFF; --bubble-out-dim: #B4C2D2;
  --ok: #5CC98B; --ok-bg: #16301F; --warn: #F2B544; --warn-bg: #3A2F14; --bad: #F59086; --bad-bg: #3D1F1C; --grey: #B6C0CA; --grey-bg: #27303A; --info: #8AB4F8; --info-bg: #1B2A3F;
  --scrim: rgba(4,7,10,.62); --shadow: 0 16px 48px rgba(0,0,0,.5); --shadow-s: 0 4px 16px rgba(0,0,0,.35);
  --r: 6px; --r-s: 4px;
  --display: 'IBM Plex Sans', system-ui, sans-serif; --body: 'IBM Plex Sans', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F4F6; --surface: #FFFFFF; --sunken: #ECEEF1; --raised: #E3E6EA; --ink: #14181D; --ink-2: #56616E; --ink-3: #6B7581; --line: #D6DBE1; --line-soft: #E7EAEE; --line-2: #C3CAD2;
  --accent: #F2B544; --on-accent: #1A1405; --accent-ink: #8A5A00; --accent-bg: #FBF0D9; --bar-2: #E9CF94;
  --navy: #1F2933; --navy-2: #2B3743; --on-dark: #E8ECEF; --on-dark-2: #B4BEC8;
  --side-bg: #FFFFFF; --side-ink: #14181D; --side-ink-2: #56616E; --side-line: #D6DBE1; --side-hover: rgba(20,24,29,.05); --side-on: #ECEEF1;
  --bubble-out: #1F2933; --bubble-out-ink: #FFFFFF; --bubble-out-dim: #B4BEC8;
  --ok: #1F6B45; --ok-bg: #E3F3EA; --warn: #7A5200; --warn-bg: #FBF0D9; --bad: #A1372A; --bad-bg: #FCE9E6; --grey: #4A5362; --grey-bg: #ECEEF1; --info: #2B55A8; --info-bg: #E4ECFA;
  --scrim: rgba(20,24,29,.42); --shadow: 0 16px 48px rgba(20,24,29,.16); --shadow-s: 0 4px 16px rgba(20,24,29,.1);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 13.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--ink-2); } .dim { color: var(--ink-3); } .small { font-size: 12px; }
.eyebrow { font-family: var(--body); font-size: 12px; font-weight: 500; color: var(--ink-2); }
.up { color: var(--ok); } .down { color: var(--bad); }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---- shell: the sidebar, one step up from the ground */
.shell { display: flex; min-height: 100vh; }
.side { width: 220px; flex-shrink: 0; background: var(--side-bg); color: var(--side-ink-2); border-right: 1px solid var(--side-line); display: flex; flex-direction: column; padding: 18px 12px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; }
.wordmark { display: flex; align-items: center; gap: 9px; padding: 2px 8px 18px; font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -.2px; color: var(--side-ink); }
.wordmark i, .wordmark .dot { width: 9px; height: 9px; border-radius: 2px; background: var(--accent); display: inline-block; }
.side .eyebrow { color: var(--side-ink-2); padding: 0 10px 6px; font-size: 11.5px; }
/* workspace switcher under the wordmark: the open book, and for admins every community plus the admin panel */
.ws { position: relative; margin: 0 0 16px; }
.ws-btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; background: var(--side-on); border: 1px solid var(--side-line); border-radius: var(--r); color: var(--side-ink); text-align: left; font: inherit; }
.ws-btn:hover, .ws-btn[aria-expanded="true"] { border-color: var(--line-2); }
.ws-btn:disabled { cursor: default; }
.ws-btn:disabled:hover { border-color: var(--side-line); }
.ws-btn i { width: 8px; height: 8px; border-radius: 2px; background: #2B6CB0; flex-shrink: 0; display: inline-block; }
.ws-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.ws-text b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-text span { font-size: 11.5px; color: var(--side-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-text span:empty { display: none; }
.ws-chev { width: 14px; height: 14px; stroke: var(--side-ink-2); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ws-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-s); padding: 5px; max-height: 60vh; overflow-y: auto; }
.ws-menu .eyebrow { padding: 8px 10px 4px; }
.ws-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; background: none; border: 0; border-radius: var(--r-s); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; text-align: left; }
.ws-menu button:hover { background: var(--sunken); color: var(--ink); }
.ws-menu button.on { color: var(--ink); }
.ws-menu button i { width: 7px; height: 7px; border-radius: 2px; background: #2B6CB0; flex-shrink: 0; display: inline-block; }
.ws-menu button.adm i { background: var(--accent); }
.ws-menu button .tag { margin-left: auto; }
.ws-menu .sep { border-top: 1px solid var(--line); margin: 5px 0; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--r); font-size: 13px; font-weight: 500; color: var(--side-ink-2); }
.nav a:hover { color: var(--side-ink); background: var(--side-hover); }
.nav a.on { color: var(--side-ink); background: var(--side-on); }
.nav svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav a.on svg { stroke: var(--accent-ink); }
.nav .count { margin-left: auto; font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--on-accent); background: var(--accent); border-radius: var(--r-s); padding: 0 6px; }
.nav .count:empty { display: none; }
.side .foot { margin-top: auto; padding: 10px 0 0; border-top: 1px solid var(--side-line); font-size: 12px; position: relative; }
.side .foot .lnk { color: var(--side-ink-2); display: inline-block; margin: 0 10px 8px; }
/* the workspace nav for the IB's tools; the admin panel swaps it for the team nav with a Back link;
   the person at the bottom opens a menu (Workspace settings, Admin panel, theme, Sign out). */
#admin_nav { display: none; }
.side.admin #book_nav { display: none; } .side.admin #admin_nav { display: block; }
.side.nobook .nav-back { display: none; }
#admin_nav .eyebrow { padding-top: 14px; }
#book_nav, #admin_nav { padding-bottom: 14px; }
.nav-back { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; margin-bottom: 2px; border-radius: var(--r); font-size: 13px; font-weight: 500; color: var(--side-ink); }
.nav-back svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-back:hover { background: var(--side-hover); }
.who-btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; background: none; border: 0; border-radius: var(--r); color: var(--side-ink); text-align: left; font: inherit; }
.who-btn:hover, .who-btn[aria-expanded="true"] { background: var(--side-hover); }
.avatar { width: 26px; height: 26px; border-radius: 5px; background: var(--raised); color: var(--ink); display: grid; place-items: center; font-size: 11px; font-weight: 600; flex-shrink: 0; letter-spacing: .02em; }
.who-nm { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.who-chev { width: 12px; height: 12px; margin-left: auto; stroke: var(--side-ink-2); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.umenu { position: absolute; left: 0; right: 0; bottom: calc(100% - 4px); z-index: 30; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-s); padding: 5px; }
.umenu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.umenu-head b { display: block; color: var(--ink); font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.umenu-head span { display: block; color: var(--ink-2); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.umenu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border: 0; background: none; border-radius: var(--r-s); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.umenu-item:hover { background: var(--sunken); color: var(--ink); }
.umenu-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.umenu .sep { border-top: 1px solid var(--line); margin: 5px 0; }
/* the theme switch: the moon shows in the dark, the sun in the light */
.ic-sun { display: none; } :root[data-theme="light"] .ic-sun { display: block; } :root[data-theme="light"] .ic-moon { display: none; }
.theme-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; background: none; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-2); flex-shrink: 0; }
.theme-btn:hover { color: var(--ink); border-color: var(--line-2); }
.theme-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bar { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 28px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 13px; position: sticky; top: 0; z-index: 3; }
.bar b { font-weight: 600; }
.bar .sep { display: none; }
.bar .sub { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 1px 8px; border: 1px solid var(--line-2); border-radius: var(--r-s); color: var(--ink-2); line-height: 1.6; white-space: nowrap; }
.bar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; color: var(--ink-2); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.bar .right i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 7px; vertical-align: 1px; }
.menu-btn { display: none; width: 36px; height: 36px; margin-left: -8px; place-items: center; background: none; border: 0; border-radius: var(--r); color: var(--ink); flex-shrink: 0; }
.menu-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.navscrim { display: none; }
.page { padding: 24px 28px 72px; max-width: 1280px; width: 100%; }

/* ---- type */
h1 { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.4px; line-height: 1.15; margin: 0; text-wrap: balance; }
.lede { margin: 6px 0 0; color: var(--ink-2); font-size: 13.5px; max-width: 760px; }
.lede b { color: var(--ink); font-weight: 500; }
code { font-family: var(--mono); font-size: 12px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-s); padding: 1px 5px; }
code.big { font-size: 18px; letter-spacing: .12em; padding: 4px 10px; color: var(--accent-ink); }

/* ---- kpis: one panel, cells split by hairlines, the figure in mono */
.kpis, .strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 20px 0 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { padding: 13px 14px 12px; min-width: 0; box-shadow: 1px 0 0 var(--line-soft), 0 1px 0 var(--line-soft); }
.kpi .l { font-size: 12.5px; color: var(--ink-2); }
.kpi .n { font-family: var(--mono); font-weight: 500; font-size: 20px; letter-spacing: -.3px; line-height: 1.2; margin: 5px 0 3px; white-space: nowrap; }
.kpi .n small { font-size: 12px; color: var(--ink-2); letter-spacing: 0; font-weight: 400; }
.kpi .d { font-size: 12px; color: var(--ink-2); }
.kpi .d.up { color: var(--ok); } .kpi .d.down { color: var(--bad); }
.kpi.lead .n { font-size: 24px; }
.kpi.lead .l { color: var(--ink); }
.strip { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* Today: the lists on the left, the book's numbers and the chart in a rail on the right */
.desk { display: flex; align-items: flex-start; gap: 24px; margin-top: 20px; }
.desk-main { flex: 1; min-width: 0; }
.desk-rail { width: 312px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 64px; }
.desk-rail > section, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 0; }
.desk-rail .sh h2 { font-size: 13px; }
.desk-rail .notice { margin: 0; }
.kpis.rail { display: block; margin: 0; }
.kpis.rail .kpi { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 10px 14px; box-shadow: 0 1px 0 var(--line-soft); }
.kpis.rail .kpi .l { grid-column: 1; font-size: 13px; color: var(--ink); }
.kpis.rail .kpi .d { grid-column: 1; grid-row: 2; }
.kpis.rail .kpi .n { grid-column: 2; grid-row: 1 / span 2; margin: 0; font-size: 15px; }
.kpis.rail .kpi.lead .n { font-size: 20px; }
.rail-h { margin: 0; padding: 11px 14px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); }

/* ---- sections + tables: every table is a panel */
section { padding: 0; margin: 0 0 28px; }
section:last-of-type, section.last { margin-bottom: 0; }
.sh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.sh h2 { font-family: var(--display); font-weight: 600; font-size: 15px; margin: 0; }
.sh .count { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); }
.sh .more { margin-left: auto; font-size: 12.5px; color: var(--ink-2); }
a.more { color: var(--accent-ink) !important; }
.sh a.more:hover { text-decoration: underline; }
.why { margin: 0 0 10px; color: var(--ink-2); font-size: 12.5px; max-width: 760px; }
.tablewrap { overflow-x: auto; border-radius: var(--r); }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
th { font-size: 12px; font-weight: 500; color: var(--ink-2); text-align: left; padding: 8px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tr:last-child td:first-child { border-bottom-left-radius: var(--r); } tr:last-child td:last-child { border-bottom-right-radius: var(--r); }
td .who { font-weight: 500; white-space: nowrap; }
td .meta { color: var(--ink-2); font-size: 12px; white-space: nowrap; }
td.reason { color: var(--ink-2); font-size: 12.5px; }
td.trail { font-family: var(--mono); font-size: 11px; color: var(--ink-2); white-space: nowrap; }
td.act { text-align: right; width: 90px; white-space: nowrap; }
td.num, th.num { text-align: right; font-family: var(--mono); font-size: 12px; }
td.num { color: var(--ink); }
td.num.dim { color: var(--ink-3); }
td.pl { text-align: right; font-family: var(--mono); font-size: 12px; }
td.pl.up { color: var(--ok); } td.pl.dn { color: var(--bad); }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--sunken); }
.lvl { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.lvl b { color: var(--ink); font-weight: 500; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 1px 7px; line-height: 1.6; white-space: nowrap; border: 1px solid transparent; border-radius: var(--r-s); background: var(--accent-bg); color: var(--accent-ink); }
.tag.step { background: var(--info-bg); color: var(--info); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.grey { background: var(--grey-bg); color: var(--grey); }
/* the ladder, drawn as rungs: filled is sent, green is a reply, outlined is not out yet, red did not go */
.rungs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.rung { font-family: var(--mono); font-size: 11px; line-height: 1.5; padding: 0 5px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.rung.sent, .rung.silent { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.rung.silent { opacity: .62; }
.rung.replied { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.rung.failed { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.rung.skipped { border-style: dashed; }
.empty { color: var(--ink-2); font-size: 13px; padding: 12px 14px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
.two > section { margin-bottom: 0; min-width: 0; }
.notice { border: 1px solid var(--line-2); background: var(--sunken); border-radius: var(--r); padding: 12px 14px; margin: 16px 0 0; font-size: 13px; color: var(--ink); }
.notice.warn { border-color: var(--warn); }
.notice.bad { border-color: var(--bad); }
.notice ol { margin: 8px 0 0; padding-left: 20px; line-height: 2; }
.notice p { margin: 8px 0 0; }

/* ---- controls */
.btn { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); border-radius: 5px; font-size: 12.5px; font-weight: 600; height: 28px; padding: 0 11px; transition: filter .15s ease; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.sec { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.sec:hover { background: var(--sunken); filter: none; }
.btn.lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: var(--r); }
.btn.md { height: 34px; padding: 0 14px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: default; filter: none; }
a.lnk { font-size: 12.5px; font-weight: 500; color: var(--accent-ink); cursor: pointer; }
a.lnk:hover { text-decoration: underline; }
td.act a.lnk { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--ink); font-weight: 600; }
td.act a.lnk:hover { background: var(--raised); text-decoration: none; }
input[type=text], input[type=number], input[type=search], input[type=password], input[type=email], input[type=date], input[type=url], input[type=tel], textarea, select { width: 100%; height: 34px; border: 1px solid var(--line-2); background: var(--bg); padding: 0 10px; font: inherit; font-size: 13px; color: var(--ink); outline: none; border-radius: 5px; -webkit-appearance: none; appearance: none; }
select { padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--accent-ink); }
input[readonly] { color: var(--ink-2); background: var(--sunken); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin: 14px 0 5px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13px; }
.check input { width: 15px; height: 15px; margin: 3px 0 0; flex-shrink: 0; }
.check label { margin: 0; font: inherit; color: var(--ink); }
.check a { color: var(--accent-ink); }
.toolbar { display: flex; align-items: center; gap: 12px; margin: 18px 0 10px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--bg); width: 300px; color: var(--ink-3); font-size: 13px; }
.search:focus-within { border-color: var(--accent-ink); }
.search svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; flex-shrink: 0; }
.search input { border: 0; height: 32px; padding: 0; background: transparent; }
.filters { display: flex; gap: 2px; flex-wrap: wrap; }
.filters a { font-size: 12.5px; font-weight: 500; color: var(--ink-2); padding: 5px 9px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.filters a:hover { color: var(--ink); }
.filters a.on { color: var(--ink); background: var(--raised); }
.filters a i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--ink-3); margin-left: 5px; }
.filters a.on i { color: var(--accent-ink); }
.toolbar .n { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.pager { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.pager .pg { margin-left: auto; display: flex; gap: 3px; }
.pager .pg a { padding: 3px 9px; border: 1px solid var(--line-2); border-radius: var(--r-s); color: var(--ink); cursor: pointer; font-family: var(--mono); }
.pager .pg a.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pager .pg a.off { color: var(--ink-3); cursor: default; border-color: transparent; }
.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.form2 label:first-child { margin-top: 0; }

/* ---- chart */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 110px; border-bottom: 1px solid var(--line); margin: 22px 0 6px; }
.bars div { flex: 1; background: var(--accent); position: relative; min-height: 2px; border-radius: 2px 2px 0 0; }
.bars div:last-child { background: var(--bar-2); }
.bars div span { position: absolute; top: -17px; left: -4px; right: -4px; text-align: center; font-family: var(--mono); font-size: 10px; color: var(--ink-2); }
.weeks { display: flex; gap: 5px; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.weeks div { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; }
.desk-rail .weeks div:nth-child(even) { visibility: hidden; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-right: 6px; }
.legend i.b { background: var(--bar-2); }

/* ---- drawer */
.drawer { position: fixed; inset: 0; z-index: 20; }
.scrim { position: absolute; inset: 0; background: var(--scrim); }
.sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(660px, 100%); background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow); overflow: auto; padding: 24px 28px 60px; }
.sheet .close { position: sticky; float: right; top: 0; margin: -6px -10px 0 8px; z-index: 2; width: 32px; height: 32px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--ink-2); cursor: pointer; }
.sheet .close:hover { color: var(--ink); }
.sheet .close svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.sheet h1 { font-size: 20px; padding-right: 40px; }
.sheet .meta { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px; margin-top: 8px; flex-wrap: wrap; }
.sheet .meta .dot { color: var(--line-2); }
.sheet .kpis { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 18px 0 24px; }
.sheet .kpi .n { font-size: 17px; }
.sheet section { margin-bottom: 24px; }
.sheet .two { gap: 20px; }
.send { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.send .hint { font-size: 12px; color: var(--ink-2); }
.tl td:first-child { width: 90px; color: var(--ink-2); font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.tl td.k { font-weight: 500; width: 120px; }
tr.quote td { color: var(--ink-2); font-size: 12px; padding-top: 0; }

/* ---- the website: landing, sign-up, terms, the per-IB start page */
body.landing { font-size: 15px; }
.top { min-height: 60px; display: flex; align-items: center; gap: 24px; padding: 0 max(20px, calc((100% - 1120px) / 2)); border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top .wordmark { padding: 0; color: var(--ink); font-size: 17px; }
.top nav { display: flex; gap: 22px; font-size: 13.5px; color: var(--ink-2); margin-left: 8px; }
.top nav a:hover { color: var(--ink); }
.top .cta { margin: 0 0 0 auto; display: flex; align-items: center; gap: 12px; }
.top .cta .lnk { color: var(--ink); font-size: 13.5px; }
.top .btn.lg { height: 36px; padding: 0 16px; font-size: 13.5px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 720px; padding: 44px 20px 96px; }
.wrap.narrow h1 { font-size: 32px; letter-spacing: -.8px; }
.wrap.narrow .lede { font-size: 15px; margin: 10px 0 24px; max-width: 600px; }
.wrap.narrow h2 { font-family: var(--display); font-weight: 600; font-size: 17px; margin: 30px 0 8px; }
.wrap.narrow p, .wrap.narrow li { font-size: 15px; line-height: 1.6; }
.wrap.narrow ul { margin: 0; padding-left: 18px; }
.wrap.narrow li { margin: 6px 0; }
.wrap.narrow ol.steps { padding-left: 20px; } .wrap.narrow ol.steps li { margin: 14px 0; }
.wrap.narrow .fieldset { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 22px 24px; }
.wrap.narrow input[type=text], .wrap.narrow input[type=email] { height: 42px; font-size: 15px; }
.wrap.narrow label { font-size: 13.5px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 72px 0 64px; }
.hero .eyebrow { display: inline-block; margin-bottom: 18px; padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12.5px; color: var(--ink-2); }
.hero h1 { font-size: 50px; letter-spacing: -1.6px; line-height: 1.04; font-weight: 600; }
.hero .sub { font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 560px; margin: 22px 0 30px; }
.hero .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero .hint { margin: 16px 0 0; font-size: 13px; color: var(--ink-3); }
.shot { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; padding: 16px 16px 14px; box-shadow: var(--shadow); min-width: 0; }
.hero .shot { font-size: 13px; }
.shot .sh { margin-bottom: 10px; }
.shot .sh h2 { color: var(--ink); font-size: 15px; margin: 0; }
.shot table { background: var(--bg); }
.shot td, .shot th { font-size: 12.5px; padding: 8px 12px; }
.shot .cap { margin: 12px 2px 0; font-size: 12.5px; color: var(--ink-2); }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 0; }
.band .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.band b { display: block; font-family: var(--mono); font-weight: 500; font-size: 13px; color: var(--accent-ink); margin-bottom: 4px; }
.band p { color: var(--ink-2); font-size: 14px; margin: 0; }
.band p strong { color: var(--ink); font-weight: 600; }
.feat { padding: 72px 0; border-bottom: 1px solid var(--line); margin: 0; }
.feat .head { margin-bottom: 28px; }
.feat h2 { font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -.7px; margin: 0 0 8px; max-width: 640px; text-wrap: balance; }
.feat .intro { font-size: 16px; color: var(--ink-2); max-width: 640px; margin: 0; }
.swap td { padding: 13px 16px; font-size: 14.5px; vertical-align: top; }
.swap th { padding: 10px 16px; }
.swap td:first-child { color: var(--ink-2); width: 44%; }
.swap td:last-child { font-weight: 500; }
.terms ul { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.terms li { display: grid; grid-template-columns: 200px 1fr; gap: 4px 16px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.terms li:last-child { border-bottom: 0; }
.terms li b { font-weight: 600; }
.terms li span { color: var(--ink-2); }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 15px 0; }
.faq summary { list-style: none; cursor: pointer; font-weight: 500; font-size: 15.5px; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-ink); font-family: var(--mono); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); margin: 10px 0 0; max-width: 640px; font-size: 14.5px; }
.feat .ctarow { margin-top: 28px; }
.feat .ctarow div { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.feat .ctarow .hint { font-size: 13px; color: var(--ink-3); }
.demo3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.demo3 .box { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: var(--surface); display: flex; flex-direction: column; }
.demo3 .box b { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.demo3 .box p { color: var(--ink-2); font-size: 14px; margin: 0 0 16px; flex: 1; }
.footer { padding: 36px 0 60px; font-size: 12.5px; color: var(--ink-3); }
.footer p { margin: 0 0 8px; max-width: 760px; }
.footer a { color: var(--ink-2); margin-right: 16px; }
.footer a:hover { color: var(--ink); }

/* ---- sign-in / loading */
.centre { max-width: 460px; margin: 80px auto; }
.centre p { color: var(--ink-2); }
/* The sign-in and sign-up page: no shell, the wordmark, the Clerk box in our colours, one line under it. */
.auth { min-height: 100vh; display: flex; justify-content: center; padding: 64px 20px 80px; background: var(--bg); }
.auth-inner { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.auth .wordmark { padding: 0 0 28px; color: var(--ink); font-size: 17px; }
.auth h1 { font-size: 24px; }
.auth .lede { font-size: 13.5px; max-width: 400px; }
.auth .lede b { color: var(--ink); }
.auth-foot { margin: 20px 0 0; color: var(--ink-2); font-size: 13px; }
.auth-actions { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 22px; }
#signin-mount { width: 100%; display: flex; justify-content: center; }
#signin-mount .cl-rootBox { width: 100%; display: flex; justify-content: center; }
#signin-mount .cl-cardBox { margin: 0 auto; }

/* who is signed in, and the bar an ibtools admin sees while opening a community as its owner */
.impbar { background: var(--accent-bg); color: var(--ink); border-bottom: 1px solid var(--line); font-size: 12.5px; padding: 7px 28px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.impbar b { font-weight: 600; }
.impbar a { margin-left: auto; color: var(--accent-ink); font-weight: 600; cursor: pointer; white-space: nowrap; }

/* CRM + inbox */
.chips { display: flex; gap: 14px; flex-wrap: wrap; }
.chipf { color: var(--ink-2); border-bottom: 2px solid transparent; padding-bottom: 2px; }
.chipf.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }
.chipf .count { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); vertical-align: middle; }
.live.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.pending { opacity: .55; }
.chips.people { margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); align-items: center; }
.tgapp .chips.people { margin: 0 0 8px; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
tr.unread td { background: var(--ok-bg); }
/* The inbox is one panel the height of the window: the rail and the messages scroll inside it, the header and the compose box stay put. */
.inbox { display: grid; grid-template-columns: 320px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); height: calc(100vh - 48px - 24px - 24px); min-height: 480px; }
.page:has(.inbox) { padding-bottom: 24px; }
.threads { border-right: 1px solid var(--line); overflow-y: auto; min-height: 0; }
.th-head { display: flex; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-2); }
/* the rail head: whose conversations, then All / Unread / Follow ups */
.rail-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 8px; }
.rail-who { font-family: var(--display); font-weight: 600; font-size: 15px; }
.rail-sel { font: inherit; font-family: var(--display); font-weight: 600; font-size: 15px; height: 30px; width: auto; color: var(--ink); background-color: transparent; border: 1px solid transparent; padding: 2px 24px 2px 4px; margin-left: -4px; max-width: 230px; }
.rail-sel:hover { border-color: var(--line-2); }
.rail-head .live { margin-left: auto; }
.th-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.th-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 8px 10px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.th-tab:hover { color: var(--ink); }
.th-tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.th-tab .count { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.th-tab.on .count { color: var(--accent-ink); }

.th { display: block; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.th:hover { background: var(--sunken); } .th.on { background: var(--raised); box-shadow: inset 3px 0 0 var(--accent); }
.th.needs .th-top b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 7px; vertical-align: middle; }
.th-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; } .th-top b { font-weight: 500; }
.th-top .dim { font-size: 11px; white-space: nowrap; font-family: var(--mono); }
.th-mid { margin: 4px 0; display: flex; gap: 4px; flex-wrap: wrap; }
.th-txt { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { padding: 16px 20px; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
/* the thread is one column until the window is wide; then notes, email and the call transcript move to a column on the right */
.page:has(.inbox) { max-width: none; }
.t-main { display: contents; } .t-side { flex-shrink: 0; }
@media (min-width: 1500px) {
  body:not(.phone) .thread { flex-direction: row; gap: 20px; }
  body:not(.phone) .t-main { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
  body:not(.phone) .t-side { width: 340px; overflow-y: auto; border-left: 1px solid var(--line); padding-left: 20px; }
  body:not(.phone) .t-side > label:first-child { margin-top: 0 !important; }
  body:not(.phone) .t-side textarea[id^="n_"] { min-height: 110px; } body:not(.phone) .t-side textarea[id^="ct_"] { min-height: 200px; }
}
.thread-empty { margin: auto; text-align: center; max-width: 420px; }
.thread .t-head, .thread .about, .thread .compose { flex-shrink: 0; }
.sk { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.sk i { display: block; height: 44px; width: 52%; border-radius: 10px; background: var(--sunken); animation: skp 1.1s ease-in-out infinite; }
.sk i.r { align-self: flex-end; width: 60%; background: var(--raised); }
@keyframes skp { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sk i { animation: none; } * { scroll-behavior: auto !important; } }
.t-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.t-head h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 17px; }
.t-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.t-tools input[type=date] { height: 30px; padding: 0 8px; font-size: 12px; max-width: 150px; }
.t-tools select { height: 30px; font-size: 12.5px; }
.about { margin: 10px 0; font-size: 12.5px; } .about summary { cursor: pointer; color: var(--ink-2); } .about p { margin: 6px 0; }
.about pre { white-space: pre-wrap; font: 11.5px/1.5 var(--body); background: var(--sunken); border-radius: var(--r); padding: 10px; max-height: 40vh; overflow: auto; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px 2px 14px 0; }
.bubble { max-width: 72%; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble i { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.bubble.in { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.bubble.out { align-self: flex-end; background: var(--bubble-out); color: var(--bubble-out-ink); border-bottom-right-radius: 3px; } .bubble.out i { color: var(--bubble-out-dim); } .bubble.out .lnk { color: var(--bubble-out-ink); text-decoration: underline; }
.bubble.out.queued { opacity: .7; }
/* the workspace Inbox (app.js convPage): the broker numbers in one line under the head; trades and money beside the thread on a wide window */
.conv-nums { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); flex-shrink: 0; }
.conv-nums b { font-family: var(--mono); font-weight: 500; color: var(--ink); margin-left: 4px; }
.conv-side { display: none; } .conv-side table { width: 100%; }
.conv-back { display: none; margin-right: 10px; }
@media (min-width: 1500px) { .conv-side { display: block; } }
@media (max-width: 760px) { .conv-back { display: inline; } }
.note-row { align-self: center; font-size: 12px; color: var(--ink-2); text-align: center; } .note-row i { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); }
.file { display: inline-block; margin-bottom: 4px; padding: 3px 8px; border: 1px solid var(--line-2); border-radius: var(--r-s); font-size: 12px; cursor: pointer; background: var(--surface); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file.on { cursor: default; margin: 0 6px 0 0; }
#player { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow-s); font-size: 12px; max-width: calc(100vw - 20px); }
#player audio { height: 32px; max-width: 46vw; } #player span { max-width: 26vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .att { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.note-row.prop { align-self: stretch; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--surface); } .prop-act { display: inline-flex; gap: 12px; margin-left: 12px; }
.attbtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; font-size: 20px; cursor: pointer; color: var(--ink-2); border-radius: var(--r); }
.attbtn:hover { color: var(--ink); background: var(--sunken); }
.draft { align-self: stretch; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--surface); }
.draft.held { border-color: var(--warn); }
.d-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; } .d-head b { font-weight: 500; }
.held-why { font-size: 12px; color: var(--warn); margin-bottom: 8px; }
.draft textarea { min-height: 60px; }
.compose { border-top: 1px solid var(--line); padding-top: 12px; }
.compose textarea { min-height: 56px; background: var(--surface); }
.compose label { margin-top: 10px; }
.compose textarea[id^="n_"] { min-height: 40px; }
/* Prospects: the meta line wraps, so the Who column does not push every other column off the right edge */
#crmtable td .meta { white-space: normal; }
#crmtable td:nth-child(2) { min-width: 260px; max-width: 520px; }
#crmtable td .who { white-space: normal; }
.tplrow { margin-bottom: 14px; } .tplrow textarea { margin-top: 6px; min-height: 60px; }
/* Sequences: steps and their wordings on the left, the message on the right */
.seq { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(360px, 1.3fr); gap: 24px; align-items: start; margin-top: 22px; }
.seq-step { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.seq-step-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.seq-step-h b { font-weight: 600; font-size: 14px; }
.seq-var { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.seq-var:last-child { border-bottom: 0; }
.seq-var:hover { background: var(--sunken); }
.seq-var.on { background: var(--raised); box-shadow: inset 3px 0 0 var(--accent); }
.seq-var.off { opacity: .6; }
.seq-var.none { cursor: default; }
.seq-var-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seq-var-top .lt { font-family: var(--mono); font-size: 12px; font-weight: 500; width: 22px; height: 22px; border-radius: var(--r-s); display: inline-grid; place-items: center; background: var(--ink); color: var(--bg); }
.seq-var-b { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.seq-sw input { margin: 0; width: 16px; height: 16px; cursor: pointer; }
.seq-wait { padding: 10px 14px; margin: 8px 0 8px 14px; border-left: 2px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); }
.seq-wait b { color: var(--ink); font-weight: 500; }
.seq-wait input { width: 54px; height: 26px; font: inherit; padding: 2px 6px; border: 1px solid var(--line-2); background: var(--bg); margin: 0 2px; }
.seq-msg { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 18px 20px 20px; position: sticky; top: 64px; }
.seq-msg h2 { font-family: var(--display); font-weight: 600; font-size: 17px; margin: 0 0 2px; }
.seq-body { margin: 14px 0 8px; font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; }
.seq-body.sample { margin-top: 8px; border-left: 2px solid var(--line-2); padding-left: 14px; color: var(--ink-2); font-size: 13px; }
.seq-msg textarea { width: 100%; font: inherit; font-size: 13.5px; line-height: 1.6; padding: 10px 12px; margin-top: 10px; resize: vertical; }
.seq-msg input[type=text] { width: 100%; font: inherit; padding: 7px 10px; }
.seq-msg label { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 500; margin-bottom: 4px; }
.slot { background: var(--accent-bg); color: var(--accent-ink); border-radius: 3px; padding: 0 4px; font-family: var(--mono); font-size: 12px; }
@media (max-width: 1000px) { .seq { grid-template-columns: 1fr; } .seq-msg { position: static; } }
label.inl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; margin: 0; }
/* a boxed block inside a page (searches, SONAR, campaigns), and the bar that sticks to the bottom of a long form */
.box { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px 16px; }
.box.strong { border-color: var(--line-2); }
.stickbar { position: sticky; bottom: 0; z-index: 2; background: var(--bg); border-top: 1px solid var(--line-2); padding: 14px 0; margin-top: 22px; display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; }

/* ---- Admin > Billing: the month tables and the inline Record forms */
tr.total td { border-top: 1px solid var(--line); font-weight: 600; }
tr.sub td { padding-top: 5px; padding-bottom: 5px; }
tr.billform td { padding: 10px 0 14px; background: var(--sunken); }
.bform { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 0 14px; }
.bform label { min-width: 120px; }
.bform label input { margin-top: 4px; }
.bform .btn { height: 34px; }
td.num.bad { color: var(--bad); }
/* Direct | Group tabs above the messages once a proposal group is open */
.ttabs { margin: 6px 0 0; flex-shrink: 0; }
/* the message a reply points at, above the reply (IBT-135): two lines at most */
.bubble .qt, .msg .qt { margin: 0 0 6px; padding: 1px 0 1px 8px; border-left: 2px solid var(--accent); color: var(--ink-2); font-size: 12px; }
.bubble .qt span, .msg .qt span { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
.bubble .qt div, .msg .qt div { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: normal; }
.bubble.out .qt, .bubble.out .qt span { color: var(--bubble-out-dim); }
/* the message picked to quote, waiting over the Send button, in both inboxes */
.qpick { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; font-size: 12px; }
.qpick:empty { display: none; }
.qpick .qt { display: block; min-width: 0; max-width: 420px; margin: 0; padding: 1px 0 1px 8px; border-left: 2px solid var(--accent); color: var(--ink-2); }
.qpick .qt span { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
.qpick .qt div { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.msgs + .qpick, .qpick.row { display: flex; padding: 6px 12px 0; }
.bubble .tr, .msg .tr { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--ink-2); }
.bubble .tr span, .msg .tr span { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 1px; }
.bubble .who, .msg .who { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
.msg.them .who { color: var(--ok); }
/* the claim warning: a conversation someone else holds, opened by another member */
.claim-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.claim-back { position: absolute; inset: 0; background: var(--scrim); }
.claim-box { position: relative; width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 22px 24px; box-shadow: var(--shadow); }
.claim-box h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 600; font-size: 17px; }
.claim-box p { margin: 0 0 16px; font-size: 14px; line-height: 1.5; }
.claim-box .send { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
/* waiting for our reply: a bar on the left, a bold name, a bright preview */
.th.wait { box-shadow: inset 4px 0 0 var(--accent); }
/* opened but not answered: a solid amber tag, so it stands out from the grey stage and owner tags */
.tag.noreply { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.th.on:not(.wait) { box-shadow: none; }
.th.wait .th-top b { font-weight: 700; } .th.wait .th-txt { color: var(--ink); font-weight: 600; }
/* Inbox filter dropdown */
.rail-filter { padding: 0 14px 10px; }
.rail-fsel, .ph-fsel { width: 100%; height: 30px; font: inherit; font-size: 12.5px; color: var(--ink); background-color: var(--bg); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 26px 0 8px; }
.ph-filter { padding: 8px 0 0; }
.ph-fsel { height: 36px; font-size: 14px; background-color: var(--sunken); border-color: transparent; border-radius: 10px; }
/* Read by us but not answered: the bold of a waiting row stays, the bar goes. The bar means unread and waiting. */
.th.wait.opened { box-shadow: none; }
/* the Unclaimed tick box in the inbox */
.unc-box { display: flex; align-items: center; gap: 8px; margin: 9px 0 0; font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap; }
.unc-box input { width: 18px; height: 18px; margin: 0; cursor: pointer; }

/* ---- Admin > Pipeline: the board, the list and the lead card (app/public/pipeline.js) */
.kb { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; }
.page:has(#pipebody) { max-width: none; }   /* the board uses the whole window */
.kb-col { flex: 1 0 264px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; max-height: calc(100vh - 230px); min-height: 220px; overflow: hidden; }
.kb-col.over { outline: 2px solid var(--accent); outline-offset: -2px; }
.kb-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; font-weight: 600; }
.kb-head .kb-n { margin-left: auto; font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--accent-ink); }
.kb-sum { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 12px; background: var(--sunken); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); color: var(--ink-2); font-size: 11.5px; }
.kb-sum b { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink); }
.kb-list { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.kb-card { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 10px 11px 9px; cursor: pointer; transition: border-color .12s ease; }
.kb-card:hover { border-color: var(--line-2); }
.kb-card.drag { opacity: .45; }
.kb-card.unread { border-color: var(--ok); }
.kb-name { font-weight: 600; font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-main { display: flex; align-items: center; gap: 9px; margin-top: 8px; min-width: 0; }
.kb-main > div { min-width: 0; }
.kb-main b { display: block; font-size: 12.5px; font-weight: 500; }
.kb-main span { display: block; font-size: 11.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-foot { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.kb-owner { font-size: 11px; color: var(--ink-2); margin-right: auto; }
.kb-empty { color: var(--ink-3); font-size: 12px; margin: 4px 2px; }
.kb-more { font-size: 12px; padding: 4px 2px; }
.kb-row { cursor: pointer; } .kb-row:hover td { background: var(--sunken); }
.kb-row.unread .kb-link { font-weight: 600; }
.kb-link { color: var(--ink); font-weight: 500; }
.lead-head { display: flex; align-items: center; gap: 14px; padding-right: 34px; }
.lead-head h2 { margin: 0; font-size: 20px; }
.lead-place { font-size: 14px; font-weight: 600; margin-top: 3px; }
.lead-ids { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; margin-top: 14px; font-size: 12.5px; align-items: baseline; }
.lead-ids > span { font-size: 12px; color: var(--ink-2); }
.lead-ids > div { min-width: 0; overflow-wrap: anywhere; }
.lead-head .meta { color: var(--ink-2); font-size: 12px; margin-top: 2px; }
.lead-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 18px 0 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lead-facts > div { padding: 10px 12px; box-shadow: 1px 0 0 var(--line-soft), 0 1px 0 var(--line-soft); min-width: 0; font-size: 12.5px; }
.lead-facts > div > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 3px; }
#drawer-body h3 { font-size: 13px; font-weight: 600; margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; }
#drawer-body h3 .count { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--accent-ink); }
.lead-msgs { max-height: 360px; flex: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 12px; }
.lead-compose { margin-top: 10px; } .lead-compose textarea { width: 100%; } .lead-compose .send { margin-top: 8px; }
.lead-note { font-size: 12.5px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); } .lead-note > span { display: block; white-space: pre-wrap; } .lead-note i { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.lead-note textarea { width: 100%; } .lead-note .send { margin-top: 6px; }
.note-acts { font-weight: 400; margin-left: 10px; } .note-acts .lnk { margin-left: 6px; }
.note-hist { margin-top: 6px; padding: 8px 10px; background: var(--sunken); border: 1px solid var(--line-soft); border-radius: var(--r-s); } .note-hist > div + div { margin-top: 8px; } .note-hist span { display: block; white-space: pre-wrap; font-size: 12px; color: var(--ink-2); }
#leadnotes > textarea { width: 100%; margin-top: 10px; }

/* ---- the phone inbox (crm.js sets body.phone inside Telegram or under 760px): closer to a chat app */
/* The mini app has the bar and the menu, as Safari on a phone has (Linear IBT-111, 2026-12-01). Until then both were hidden, so
   a setter inside Telegram had the Inbox and no way to Pipeline, Prospects or Requests, which is one reason they used Safari.
   The menu slides in at any width. What only works with an email sign-in is left out of it: the workspace switcher, the
   workspace's own screens and Sign out all leave the mini app's address, and Telegram's sign-in does not follow them. */
.tgapp .impbar { display: none !important; }
.tgapp { --tgbar: 52px; }
.tgapp .shell { display: block; }
.tgapp .bar { height: var(--tgbar); min-height: var(--tgbar); padding: 0 12px; }
.tgapp .bar .right, .tgapp .bar .sub, .tgapp .bar .sep { display: none; }
.tgapp .menu-btn { display: inline-grid; margin-left: -4px; }
.tgapp .side { position: fixed; top: 0; left: 0; bottom: 0; z-index: 41; width: min(300px, 86vw); height: auto; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
.tgapp .shell.navopen .side { transform: none; }
.tgapp .shell.navopen .navscrim { display: block; position: fixed; inset: 0; z-index: 40; background: var(--scrim); border: 0; padding: 0; width: 100%; }
.tgapp .side .wordmark, .tgapp .side .ws, .tgapp #book_nav, .tgapp #admin_back, .tgapp .side .foot { display: none !important; }
.tgapp .nav a { height: 44px; font-size: 15px; }
.tgapp .page { padding: 12px; }
/* Inside Telegram the panel follows Telegram's stable viewport, which shrinks when the keyboard is up, so the compose box stays above
   the keyboard; 16px inputs stop iOS zooming the page on focus; no rubber-band on the body. */
.tgapp .inbox { height: calc(var(--tg-viewport-stable-height, 100vh) - var(--tgbar) - 24px); min-height: 0; }
body.tgapp { overflow: hidden; overscroll-behavior: none; position: fixed; inset: 0; width: 100%; }
.tgapp .page { height: calc(var(--tg-viewport-stable-height, 100vh) - var(--tgbar)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tgapp textarea, .tgapp input[type=text], .tgapp input[type=search], .tgapp input[type=date], .tgapp select { font-size: 16px; }
.phone .inbox { border: 0; border-radius: 0; background: var(--bg); min-height: 0; }
.phone .threads { border-right: 0; background: var(--surface); }
.ph-top { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 12px 8px; }
.ph-title { display: flex; align-items: center; gap: 8px; }
.ph-title h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 18px; }
.ph-title .badge { background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: 11.5px; font-weight: 600; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }
.ph-title .live { margin-left: 2px; }
.ph-who { margin-left: auto; height: 30px; width: auto; max-width: 150px; font-size: 13px; border-color: transparent; background-color: var(--sunken); border-radius: 15px; padding: 0 26px 0 10px; }
.ph-top .chips { display: flex; gap: 6px; margin-top: 9px; overflow-x: auto; scrollbar-width: none; padding-bottom: 1px; flex-wrap: nowrap; }
.ph-top .chips::-webkit-scrollbar { display: none; }
.ph-top .chip { flex: 0 0 auto; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 15px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.ph-top .chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.ph-top .chip .c { font-family: var(--mono); font-size: 11px; opacity: .8; }
.av { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; color: #fff; font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; letter-spacing: .02em; }
.av.lg { width: 60px; height: 60px; font-size: 22px; }
.av.sm { width: 26px; height: 26px; font-size: 10.5px; }
a.row { display: flex; gap: 11px; padding: 10px 12px; align-items: center; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); position: relative; }
a.row.on { background: var(--sunken); }
a.row.needs::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ok); }
a.row .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
a.row .name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.row .snip { color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.row .snip i { font-style: normal; color: var(--ink-3); }
a.row.unread .name { font-weight: 700; } a.row.unread .snip { color: var(--ink); font-weight: 500; }
a.row .rside { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 0 auto; }
a.row .time { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; font-family: var(--mono); }
a.row .udot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
a.row.wait::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
a.row.wait .name { font-weight: 700; } a.row.wait .snip { color: var(--ink); font-weight: 600; }
a.row.wait.opened::before { display: none; }
.phone .thread { padding: 0; background: var(--bg); }
.phone .t-head.m { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: nowrap; }
.phone .t-head.m .back { font-size: 28px; line-height: 1; padding: 0 8px 4px 2px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.phone .t-head.m .who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; cursor: pointer; text-decoration: none; color: var(--ink); }
.phone .t-head.m .who .av { width: 38px; height: 38px; font-size: 14px; }
.phone .t-head.m .t-name { min-width: 0; display: flex; flex-direction: column; }
.phone .t-head.m .t-name b { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone .t-head.m .t-name .sub { color: var(--ink-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone .msgs { padding: 14px 12px; gap: 6px; }
.phone .ttabs { background: var(--surface); padding: 0 10px; margin: 0; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 16px; font-size: 14.5px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; }
.msg i { display: block; font-style: normal; font-size: 10.5px; margin-top: 3px; text-align: right; color: var(--ink-3); }
.msg b { display: block; font-size: 10.5px; font-weight: 600; margin-bottom: 2px; color: var(--bubble-out-dim); }
.msg.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.us { align-self: flex-end; background: var(--bubble-out); color: var(--bubble-out-ink); border-bottom-right-radius: 5px; } .msg.us i { color: var(--bubble-out-dim); } .msg.us .lnk { color: var(--bubble-out-ink); text-decoration: underline; }
.msg.us.queued { opacity: .75; }
.phone .draft { border-radius: 12px; }
.phone .compose { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--line); flex-wrap: wrap; }
.phone .compose textarea { flex: 1; min-height: 40px; height: 40px; max-height: 120px; overflow: hidden; border-radius: 20px; padding: 9px 14px; background: var(--sunken); border-color: transparent; font-size: 16px; line-height: 1.3; resize: none; }
.phone .compose textarea:focus { border-color: var(--line-2); }
.phone .compose .sendbtn { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); font-size: 16px; cursor: pointer; }
.phone .compose .sendbtn:disabled { opacity: .35; }
.phone .compose .hint { flex-basis: 100%; }
.phone .compose .hint:empty { display: none; }
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-back { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .2s; }
.sheet-wrap .sheet { position: absolute; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 88%; background: var(--surface); border: 0; border-radius: 18px 18px 0 0; padding: 0; transform: translateY(100%); transition: transform .22s ease; display: flex; flex-direction: column; overflow: hidden; }
.sheet-wrap.on .sheet-back { opacity: 1; } .sheet-wrap.on .sheet { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 17px; }
.sheet-head .meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.sheet-head .x { margin-left: auto; color: var(--ink-2); font-size: 16px; padding: 6px; cursor: pointer; align-self: flex-start; }
.sheet-body { overflow-y: auto; padding: 12px 16px 24px; font-size: 13.5px; }
.sheet-body h3 { margin: 16px 0 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.sheet-body .t-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-body .t-tools select, .sheet-body .t-tools input { max-width: 48%; }
.sheet-body p { margin: 6px 0; }
.sheet-body pre { white-space: pre-wrap; font: 11.5px/1.5 var(--body); background: var(--sunken); border-radius: var(--r); padding: 10px; max-height: 40vh; overflow: auto; }
.sheet-body textarea, .sheet-body select, .sheet-body input { font-size: 16px; }
/* Inside Telegram the phone inbox is edge to edge and follows the keyboard-aware viewport */
.phone.tgapp .page { padding: 0; }
.phone.tgapp .inbox { height: calc(var(--tg-viewport-stable-height, 100vh) - var(--tgbar)); }

/* ---- narrower windows */
@media (max-width: 1180px) {
  .desk { flex-direction: column; }
  .desk-rail { width: 100%; position: static; order: -1; }
  .kpis.rail { display: grid; grid-template-columns: repeat(3, 1fr); }
  .kpis.rail .kpi { box-shadow: 1px 0 0 var(--line-soft), 0 1px 0 var(--line-soft); }
  .desk-rail .weeks div:nth-child(even) { visibility: visible; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 56px 0 48px; }
}
/* ---- phones and small tablets: the sidebar slides in from the left behind the menu button, tables scroll inside their panel,
        the Today lists stack into cards, every control is big enough for a thumb and 16px inputs stop iOS zooming */
@media (max-width: 900px) {
  .shell { display: block; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; z-index: 41; width: min(300px, 86vw); height: auto; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .shell.navopen .side { transform: none; }
  .shell.navopen .navscrim { display: block; position: fixed; inset: 0; z-index: 40; background: var(--scrim); border: 0; padding: 0; width: 100%; }
  .nav a, .nav-back { height: 44px; font-size: 15px; } .nav svg { width: 17px; height: 17px; }
  .who-btn { padding: 10px 8px; } .umenu-item { padding: 11px 10px; font-size: 14.5px; } .ws-btn { padding: 11px 10px; } .ws-menu button { padding: 11px 10px; font-size: 14.5px; }
  .menu-btn { display: inline-grid; }
  .bar { padding: 0 16px; min-height: 52px; padding-top: env(safe-area-inset-top); }
  .bar .right { display: none; }
  .impbar { padding: 8px 16px; }
  .page { padding: 18px 16px 72px; }
  .page:has(.inbox) { padding: 0; }
  .inbox { border: 0; border-radius: 0; height: calc(100dvh - 52px); }
  h1 { font-size: 20px; }
  .two, .form2 { grid-template-columns: 1fr; gap: 24px; } .form2 { gap: 0; }
  .kpis.rail { grid-template-columns: repeat(2, 1fr); }
  .kpis.rail .kpi { grid-template-columns: 1fr; } .kpis.rail .kpi .n { grid-column: 1; grid-row: auto; margin: 3px 0; font-size: 18px; } .kpis.rail .kpi .d { grid-row: auto; }
  .kpis, .strip, .sheet .kpis { grid-template-columns: repeat(2, 1fr); }
  .lead-facts { grid-template-columns: repeat(2, 1fr); }
  .btn { height: 36px; padding: 0 14px; font-size: 13.5px; } .btn.lg { height: 46px; } td.act a.lnk { height: 36px; padding: 0 14px; }
  input[type=text], input[type=number], input[type=search], input[type=password], input[type=email], input[type=date], input[type=url], input[type=tel], select { height: 42px; font-size: 16px; }
  textarea { font-size: 16px; }
  .search { width: 100%; height: 42px; } .search input { height: 40px; }
  .toolbar .n { margin-left: 0; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; width: calc(100% + 32px); } .filters::-webkit-scrollbar { display: none; }
  .filters a { padding: 8px 12px; font-size: 13.5px; }
  .pager .pg a { padding: 7px 12px; }
  .sheet { padding: 18px 16px 50px; width: 100%; border-left: 0; }
  .sheet .close { width: 38px; height: 38px; margin-right: -4px; }
  .kb-col { flex-basis: 84vw; max-height: none; }
  .stickbar { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .thread { padding: 12px; } .bubble { max-width: 88%; }
  .t-tools select, .t-tools input { max-width: 46% !important; }
  /* the Today lists: one card a person, the name on top, the button on the right */
  table.stack, table.stack tbody { display: block; } table.stack thead { display: none; }
  table.stack tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { display: block; padding: 0; border: 0; grid-column: 1; background: none !important; border-radius: 0 !important; }
  table.stack td.act { grid-column: 2; grid-row: 1 / span 4; width: auto; }
  table.stack td .who, table.stack td .meta { white-space: normal; }
  /* the website */
  body.landing { font-size: 15px; }
  .top { gap: 12px; padding: 0 16px; padding-top: env(safe-area-inset-top); min-height: 56px; } .top nav { display: none; }
  .top .cta { gap: 8px; } .top .cta .lnk { display: none; }
  .wrap { padding: 0 16px; } .wrap.narrow { padding: 28px 16px 72px; } .wrap.narrow h1 { font-size: 27px; } .wrap.narrow .fieldset { padding: 4px 16px 20px; }
  .hero { padding: 40px 0 36px; } .hero h1 { font-size: 34px; letter-spacing: -1px; } .hero .sub { font-size: 16px; margin: 16px 0 24px; }
  .hero .row .btn { flex: 1 1 140px; }
  .hero .shot { padding: 12px; box-shadow: var(--shadow-s); }
  .band .wrap { grid-template-columns: 1fr; gap: 18px; }
  .feat { padding: 48px 0; } .feat h2 { font-size: 24px; }
  .demo3 { grid-template-columns: 1fr; }
  .terms li { grid-template-columns: 1fr; }
  .swap table, .swap tbody { display: block; } .swap thead { display: none; }
  .swap tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); } .swap tr:last-child { border-bottom: 0; }
  .swap td { display: block; padding: 0; border: 0; width: auto !important; } .swap td:first-child { text-decoration: line-through; text-decoration-color: var(--ink-3); margin-bottom: 4px; font-size: 13.5px; }
  .feat .ctarow .btn { flex: 1 1 100%; }
}
/* crm.js sets body.phone under 760px: the inbox shows the list or the thread, never both */
@media (max-width: 760px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox.open .threads { display: none; } .inbox:not(.open) .thread { display: none; }
}
/* the phone info sheet (.sheet-wrap .sheet) shares a class name with the drawer's sheet; the drawer keeps its own shape */
.drawer .sheet { left: auto; top: 0; max-height: none; transform: none; transition: none; display: block; }

.kpis.rail .rail-h { grid-column: 1 / -1; }
.bar .theme-btn { margin-left: 4px; border-color: transparent; }
@media (max-width: 900px) { .bar .theme-btn { margin-left: auto; width: 40px; height: 40px; } .theme-btn { width: 40px; height: 40px; } }
.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.hero h1 { font-size: 46px; }
.hero .shot td, .hero .shot th { padding: 8px 10px; }
.hero .shot td.reason { white-space: nowrap; font-size: 12px; }
@media (max-width: 1180px) { .hero { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .hero h1 { font-size: 34px; } .hero .shot td.reason { white-space: normal; } }
.bar b { white-space: nowrap; }
td.dim { white-space: nowrap; }
.shot .rungs { flex-wrap: nowrap; }
@media (max-width: 900px) { .bar .sub { display: none; } }
.kb-main span.av { display: inline-flex; overflow: visible; }

/* the mini app's sign-in is a day old (app.js tgStale, IBT-111) */
.tg-stale { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: grid; place-items: center; padding: 24px; text-align: center; }
.tg-stale .lede { margin: 10px auto 18px; max-width: 420px; }

/* Inbox: the path under the name and the context column (Linear IBT-130) */
.conv-path { display: flex; flex-shrink: 0; margin-top: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.cp { position: relative; flex: 1 1 0; min-width: 112px; padding-right: 12px; }
.cp::before { content: ""; position: absolute; left: 12px; right: 0; top: 5px; height: 2px; background: var(--line-2); } .cp:last-child::before { display: none; }
.cp .dot { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line-2); }
.cp.sent .dot { background: var(--info); } .cp.ok .dot { background: var(--ok); } .cp.bad .dot { background: var(--bad); }
.cp.now .dot { background: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px rgba(242,181,68,.18); }
.cp.next .dot { background: var(--bg); } .cp.next b, .cp.next span { color: var(--ink-3); }
.cp b { display: block; font-weight: 600; font-size: 12.5px; margin-top: 7px; } .cp span { display: block; font: 11px var(--mono); color: var(--ink-2); margin-top: 1px; min-height: 14px; }
.conv-side section { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line-soft); } .conv-side section:last-child { border: 0; margin: 0; }
.conv-side h3 { margin: 0 0 8px; font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.conv-side p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); } .conv-side p.cs-story { color: var(--ink); margin-top: 8px; } .conv-side td { padding: 5px 0; }
.cs-big { display: block; font-size: 15px; font-weight: 600; } .cs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cs-meter { display: flex; gap: 3px; } .cs-meter i { width: 22px; height: 6px; border-radius: 2px; background: var(--line-2); }
.cs-meter.s1 i:nth-child(-n+1), .cs-meter.s2 i:nth-child(-n+2) { background: var(--bad); } .cs-meter.s3 i:nth-child(-n+3) { background: var(--warn); } .cs-meter.s4 i:nth-child(-n+4), .cs-meter.s5 i { background: var(--ok); }
.cs-read { display: flex; justify-content: space-between; gap: 8px; font: 11.5px var(--mono); color: var(--ink-2); margin-bottom: 6px; min-height: 17px; } .cs-read b { font-weight: 500; } .cs-read b.up { color: var(--ok); } .cs-read b.dn { color: var(--bad); }
.cs-bars { display: flex; gap: 2px; height: 74px; }
.cb { flex: 1; height: 100%; display: flex; flex-direction: column; position: relative; } .cb:hover { background: var(--raised); }
.cb::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-2); }
.cb u { display: block; height: 50%; position: relative; text-decoration: none; } .cb u i { position: absolute; left: 0; right: 0; border-radius: 2px; min-height: 2px; }
.cb .up i { bottom: 0; background: var(--ok); } .cb .dn i { top: 0; background: var(--bad); }
.cs-mon { display: flex; gap: 2px; margin-top: 4px; } .cs-mon span { flex: 1; min-width: 0; white-space: nowrap; overflow: visible; font: 10px var(--mono); color: var(--ink-3); }
.cs-kv { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .cs-kv span { display: block; font-size: 11px; color: var(--ink-3); } .cs-kv b { font: 500 14px var(--mono); }
.conv-side .pl { text-align: right; font-family: var(--mono); } .conv-side .pl.up { color: var(--ok); } .conv-side .pl.dn { color: var(--bad); }
/* under 1100px, and on a phone, the Context link swaps the conversation for the column; the head with the link stays */
/* under 760px body.phone restyles the team's own inbox (crm.js) as a chat app: no padding, a pill for the message box. The workspace
   Inbox keeps its own head and message box, so it takes its padding and its box back (Jack 2026-12-02, a screenshot at 588px). */
.phone #conv_thread { padding: 12px 14px; }
.phone #conv_thread .msgs { padding: 14px 2px 14px 0; gap: 8px; }
.phone #conv_thread .compose { display: block; padding: 12px 0 0; background: none; }
.phone #conv_thread .compose textarea { height: auto; min-height: 56px; max-height: none; overflow: auto; border-radius: var(--r); padding: 9px 11px; background: var(--surface); border-color: var(--line-2); line-height: 1.5; resize: vertical; }
.phone #conv_thread .t-tools { gap: 6px 14px; }
#conv_thread .ttabs { margin: 8px 0 0; } .phone #conv_thread .ttabs { background: none; padding: 0; margin: 8px 0 0; }
#conv_thread.ctx .ttabs { display: none; }
#conv_thread.ctx .conv-path, #conv_thread.ctx .conv-nums, #conv_thread.ctx .msgs, #conv_thread.ctx .compose { display: none; }
#conv_thread.ctx .t-side { display: block; flex: 1; min-height: 0; overflow-y: auto; padding-top: 14px; }
/* the column sits beside the conversation from 1100px, and there the link is not needed */
@media (min-width: 1100px) {
  body:not(.phone) #conv_thread { flex-direction: row; gap: 20px; }
  body:not(.phone) #conv_thread .t-main { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
  body:not(.phone) #conv_thread .t-side { display: block; width: 300px; overflow-y: auto; border-left: 1px solid var(--line); padding-left: 20px; }
  body:not(.phone) #conv_thread .conv-nums, body:not(.phone) .conv-ctx { display: none; }
  body:not(.phone) #conv_thread.ctx .conv-path { display: flex; } body:not(.phone) #conv_thread.ctx .msgs { display: flex; } body:not(.phone) #conv_thread.ctx .compose { display: block; } body:not(.phone) #conv_thread.ctx .ttabs { display: flex; }
  body:not(.phone) #conv_thread.ctx .t-side { flex: none; padding-top: 0; }
}
/* Support: one question the bot could not answer (IBT-150) */
.sq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; max-width: 760px; }
.sq label:not(.inl) { margin-top: 10px; }
.sq textarea { min-height: 84px; }
