/* WB One preview. Apple-style layout (Human Interface Guidelines patterns) with the WBG brand standard v3.0:
   Off White and Almond field, Dune type, Blaze Orange as the single accent, Larken + Degular (stand-ins load here). */
:root {
  --wbg-dune: #353535;
  --wbg-blaze-orange: #C75912;
  --wbg-almond: #DCCCBB;
  --wbg-off-white: #F8F5F2;
  --wbg-rich-bronze: #A3501B;
  --wbg-gray-1: #5C5C5C;
  --wbg-dark-1: #474747;
  --wbg-dark-2: #292929;
  --wbg-dark-3: #1F1F1F;
  --wbg-light-1: #EAE1D7;
  --wbg-light-2: #C8AE93;
  --wbg-light-3: #CEB8A1;
  --wbg-olive: #6C8D5C;
  --wbg-font-display: 'Larken', 'Cormorant Garamond', Georgia, serif;
  --wbg-font-body: 'Degular', 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;

  --canvas: #FFFFFF;             /* window background: white (Spencer, 10/19); tan stays in the sidebar and accents */
  --input-line: #D6C8B8;         /* input borders: Almond, dark enough to see on white */
  --warm: #FBF8F4;               /* soft tan wash: warm cards, row hover, dropzone */
  --primary-hover: #B55517;
  --ok-fg: #46633A;
  --ok-bg: rgba(108, 141, 92, .14);
  --warn-bg: rgba(199, 89, 18, .10);
  --sidebar: #EFE9E2;            /* source list */
  --card: #FFFFFF;               /* grouped list surface */
  --fill: rgba(53, 53, 53, .06); /* control fill (segmented, search) */
  --fill-2: rgba(53, 53, 53, .10);
  --sep: rgba(53, 53, 53, .10);  /* hairlines */
  --sel: #E7DED4;                /* selected row */
  --fg: var(--wbg-dune);
  --sec: #6E6A66;
  --ter: #9A948E;
  --line: var(--sep);
  --muted: var(--sec);
  --side-w: 232px;
  --r: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--canvas); color: var(--fg); font-family: var(--wbg-font-body); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: var(--wbg-rich-bronze); text-decoration: none; }
button, select, input, textarea { font: inherit; color: inherit; }
/* Inputs on white: a visible Almond edge. Zero specificity; the Print, Devices, Admin and Connect
   screens style their own (Tailwind), so they're left out. */
:where(input:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=range]), select, textarea):not(:where(.print-host *, .devices-host *, .admin-host *, .connect-host *)) {
  min-height: 36px; border: 1px solid var(--input-line); border-radius: 8px; padding: 0 12px; background-color: #fff;
}
:where(textarea):not(:where(.print-host *, .devices-host *, .admin-host *, .connect-host *)) { padding: 8px 12px; }
:where(input, select, textarea):not(:where(.print-host *, .devices-host *, .admin-host *, .connect-host *)):focus { border-color: var(--wbg-blaze-orange); outline: none; box-shadow: 0 0 0 3px rgba(199, 89, 18, .15); }
:where(select):not(:where(.print-host *, .devices-host *, .admin-host *, .connect-host *)) { padding-right: 28px; }
:focus-visible { outline: 3px solid rgba(199, 89, 18, .35); outline-offset: 1px; border-radius: 8px; }

.display, .stat { font-family: var(--wbg-font-display); font-weight: 500; letter-spacing: 0; font-variant-numeric: lining-nums; }
.display em { font-style: italic; font-weight: 400; }
.label { font-size: 12px; font-weight: 600; color: var(--sec); letter-spacing: .02em; }
.small { font-size: 12px; color: var(--sec); }

.banner { background: var(--wbg-dune); color: var(--wbg-almond); text-align: center; font-size: 12px; padding: 6px 16px; }

/* ---------- Window shell ---------- */
.shell { display: flex; min-height: calc(100vh - 29px); }
.side {
  width: var(--side-w); flex: none; background: var(--sidebar); border-right: .5px solid var(--sep);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 16px 12px;
}
.side-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 24px; }
.mark { width: 30px; height: auto; }
.app-name { font-family: var(--wbg-font-display); font-size: 22px; font-weight: 500; }
.app-name span { font-style: italic; font-weight: 400; }
#nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
#nav a {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: 8px;
  color: var(--fg); font-weight: 500; font-size: 14px;
}
#nav a:hover { background: var(--fill); }
#nav a[aria-current="page"] { background: var(--sel); }
#nav svg { width: 17px; height: 17px; flex: none; color: var(--wbg-rich-bronze); }
/* Count beside a menu item (My Tasks: due today or overdue) */
#nav .nav-count { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--wbg-blaze-orange); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav-sep { height: 0; margin: 8px 0; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--ter); padding: 8px 8px 4px; }
.side-foot { padding: 8px; }
.linkish { background: none; border: 0; padding: 0; color: var(--sec); cursor: pointer; font-size: 12px; }
.linkish:hover { color: var(--wbg-rich-bronze); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; gap: 16px; height: 52px; padding: 0 32px; position: sticky; top: 0; z-index: 5;
  background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--sep);
}
.menu-btn { display: none; background: none; border: 0; padding: 8px; min-width: 44px; min-height: 44px; cursor: pointer; color: var(--wbg-rich-bronze); }
.crumbs { flex: 1; min-width: 0; font-size: 13px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--wbg-rich-bronze); }
.viewas { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--sec); }
.viewas select {
  height: 30px; border: 0; background-color: var(--fill); border-radius: 8px; padding: 0 28px 0 12px; font-weight: 500; font-size: 13px; color: var(--fg); cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236E6A66' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
#view { padding: 32px 32px 64px; max-width: 1240px; width: 100%; outline: none; }
.foot { margin-top: auto; padding: 16px 32px 24px; font-size: 11px; color: var(--ter); }

/* ---------- Large title ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { margin: 4px 0 0; font-size: 40px; line-height: 1.05; }
.page-head p { margin: 8px 0 0; color: var(--sec); max-width: 640px; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px;
  border-radius: 8px; border: 0; background: var(--fill); color: var(--fg); font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--fill-2); }
.btn.primary { background: var(--wbg-blaze-orange); color: #fff; }
.btn.primary:hover { background: #B55517; }
.btn.dark { background: var(--wbg-dune); color: var(--wbg-off-white); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }

/* ---------- Grouped surfaces ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.card { background: var(--card); border-radius: var(--r); padding: 16px 20px; min-width: 0; box-shadow: 0 0 0 1px rgba(53, 53, 53, .09), 0 1px 3px rgba(53, 53, 53, .05); }
a.card:hover { box-shadow: 0 0 0 .5px var(--sep), 0 4px 16px rgba(53, 53, 53, .06); }
.card.warm { background: #FBF8F4; }
.card.dark { background: var(--wbg-dune); color: var(--wbg-off-white); box-shadow: none; }
.card.dark .label, .card.dark .small { color: var(--wbg-light-3); }
.card.dark .btn { background: rgba(255, 255, 255, .14); color: #fff; }
.card h2 { margin: 0; font-size: 22px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.card-head h2 { font-family: var(--wbg-font-display); font-weight: 500; }
.card-head a.small { color: var(--wbg-rich-bronze); }
.stat { font-size: 34px; line-height: 1; margin-top: 8px; }
.stat small { font-family: var(--wbg-font-body); font-size: 13px; color: var(--sec); margin-left: 4px; }
.section { margin-top: 32px; }
.section > h2 { font-family: var(--wbg-font-display); font-weight: 500; font-size: 24px; margin: 0 0 8px; }

/* Lists: inset grouped rows with hairlines that start at the text */
.list { list-style: none; margin: 0 -20px; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 20px; position: relative; }
.list > li + li::before { content: ""; position: absolute; left: 20px; right: 0; top: 0; border-top: .5px solid var(--sep); }
.list > li:has(.check) + li::before { left: 54px; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 500; }
.row-link { color: inherit; display: flex; align-items: center; gap: 12px; width: 100%; }
.row-link::after { content: ""; width: 7px; height: 7px; border-top: 1.5px solid var(--ter); border-right: 1.5px solid var(--ter); transform: rotate(45deg); flex: none; margin-right: 2px; }
.check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #CFC6BC; flex: none; background: none; cursor: pointer; padding: 0; }
.check.done { background: var(--wbg-olive); border-color: var(--wbg-olive); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3L17 9' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 100%; }
.check.now { border-color: var(--wbg-blaze-orange); border-width: 2px; }

/* Tags */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 6px; background: var(--fill); color: var(--fg); white-space: nowrap; }
.pill.ok { background: rgba(108, 141, 92, .14); color: #46633A; }
.pill.warn { background: rgba(199, 89, 18, .10); color: var(--wbg-rich-bronze); }
.pill.dark { background: var(--wbg-dune); color: var(--wbg-off-white); }
.pill.line { background: none; box-shadow: inset 0 0 0 .5px var(--wbg-light-3); }
/* A deal's status as two boxes: the phase solid, its step a tint of the same colour (deals/parts.tsx OutcomePill). */
.stage { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pill.stage-phase { font-weight: 600; background: var(--wbg-dune); color: var(--wbg-off-white); }
.pill.stage-step { background: var(--fill); color: var(--fg); }
.pill.stage-phase.escrow { background: #2B6CB0; color: #fff; }
.pill.stage-step.escrow { background: rgba(43, 108, 176, .12); color: #23578F; }
.pill.stage-phase.listing { background: #0F7B8A; color: #fff; }
.pill.stage-step.listing { background: rgba(15, 123, 138, .12); color: #0B5F6B; }
.pill.stage-phase.closed { background: #5B7A4C; color: #fff; }
.pill.stage-step.closed { background: rgba(108, 141, 92, .14); color: #46633A; }
.pill.stage-phase.attention { background: var(--wbg-rich-bronze); color: #fff; }
.pill.stage-step.attention { background: rgba(199, 89, 18, .10); color: var(--wbg-rich-bronze); }
.pill.stage-phase.appt_set { background: #6B5CA5; color: #fff; }
.pill.stage-step.appt_set { background: rgba(107, 92, 165, .12); color: #54478A; }
.pill.stage-phase.appt_met { background: #B7791F; color: #fff; }
.pill.stage-step.appt_met { background: rgba(183, 121, 31, .12); color: #8A5A14; }
.pill.stage-phase.signed { background: #0F7B8A; color: #fff; }
.pill.stage-step.signed { background: rgba(15, 123, 138, .12); color: #0B5F6B; }
.pill.stage-phase.out { background: none; color: var(--fg); box-shadow: inset 0 0 0 .5px var(--wbg-light-3); }
.pill.stage-step.out { background: none; color: var(--muted, var(--fg)); box-shadow: inset 0 0 0 .5px var(--wbg-light-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Tables become grouped lists */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--r); box-shadow: 0 0 0 .5px var(--sep); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--sec); padding: 10px 16px; border-bottom: .5px solid var(--sep); white-space: nowrap; background: none; }
td { padding: 10px 16px; vertical-align: middle; position: relative; }
tbody tr + tr td { border-top: .5px solid var(--sep); }
tbody tr.click { cursor: default; }
tbody tr.click:hover td { background: #FBF8F4; }
td .title { font-weight: 500; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Segmented controls (tabs and filters) */
.tabs, .chips {
  display: flex; width: max-content; max-width: 100%; overflow-x: auto; gap: 2px; padding: 2px; margin-bottom: 20px;
  background: var(--fill); border-radius: 9px; scrollbar-width: none;
}
.tabs::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.tabs a, .chip {
  flex: none; height: 28px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border-radius: 7px; border: 0; background: none;
  color: var(--fg); font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.tabs a[aria-current="page"], .chip[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(53, 53, 53, .14), 0 0 0 .5px rgba(53, 53, 53, .06); }
.chip .small { color: var(--ter); }
.field .chips { margin-bottom: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.search {
  height: 36px; border: 1px solid var(--input-line); border-radius: 8px; padding: 0 12px 0 32px; background-color: #fff; min-width: 260px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Ccircle cx='11' cy='11' r='6' fill='none' stroke='%239A948E' stroke-width='2'/%3E%3Cpath d='M20 20l-4-4' stroke='%239A948E' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center;
}
.search::placeholder { color: var(--ter); }

/* Forms: inset grouped */
.form { display: grid; gap: 24px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; font-weight: 500; color: var(--sec); padding-left: 4px; }
.field input, .field select, .field textarea {
  height: 36px; border: 1px solid var(--input-line); border-radius: 8px; padding: 0 12px; background-color: #fff; width: 100%;
}
.field textarea { height: 88px; padding: 8px 12px; resize: vertical; }
.field.filled input, .field.filled select { background-color: rgba(199, 89, 18, .06); }
.auto { font-size: 11px; color: var(--wbg-rich-bronze); font-weight: 500; }
.fieldset { border: 0; border-radius: var(--r); padding: 16px 20px 20px; background: var(--card); box-shadow: 0 0 0 .5px var(--sep); margin: 0; }
.fieldset legend { float: left; width: 100%; padding: 0 0 12px; font-family: var(--wbg-font-display); font-size: 20px; font-weight: 500; }
.fieldset legend + * { clear: both; }
.suggest { border-radius: 8px; margin-top: 4px; background: var(--card); overflow: hidden; box-shadow: 0 0 0 .5px var(--sep), 0 6px 20px rgba(53, 53, 53, .10); }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.suggest button + button { border-top: .5px solid var(--sep); }
.suggest button:hover { background: var(--sel); }

/* Progress, timeline, stages */
.bar { height: 6px; background: var(--fill-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--wbg-dune); border-radius: 99px; }
.bar.orange > i { background: var(--wbg-blaze-orange); }
.card.dark .bar { background: rgba(255, 255, 255, .16); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 1.5px solid var(--wbg-light-1); }
.timeline li { position: relative; padding: 0 0 20px 12px; }
.timeline li::before { content: ""; position: absolute; left: -27px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--wbg-light-3); box-shadow: 0 0 0 3px var(--card); }
.timeline li.done::before { background: var(--wbg-olive); }
.timeline li.next::before { background: var(--wbg-blaze-orange); }
.stages { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: 16px 0 24px; }
.stage { font-size: 11px; color: var(--ter); }
.stage i { display: block; height: 4px; border-radius: 2px; background: var(--fill-2); margin-bottom: 6px; }
.stage.done i { background: var(--wbg-dune); }
.stage.now i { background: var(--wbg-blaze-orange); }
.stage.now { color: var(--fg); font-weight: 500; }

/* Key and value rows, like iOS Settings */
.kv { display: grid; grid-template-columns: 120px 1fr; margin: 0 -20px; font-size: 13px; }
.kv dt, .kv dd { margin: 0; padding: 10px 20px; min-height: 40px; display: flex; align-items: center; }
.kv dt { color: var(--sec); }
.kv dd { font-weight: 500; padding-left: 0; }
.kv dt:not(:first-child), .kv dt:not(:first-child) + dd { border-top: .5px solid var(--sep); }
.kv dt:not(:first-child) { margin-left: 20px; padding-left: 0; }

.ai-card { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 20px 24px; }
.ai-card p { margin: 8px 0 0; max-width: 560px; }
.empty { text-align: center; padding: 64px 24px; }
.empty h1 { font-size: 36px; margin: 8px 0 12px; }

.lesson { max-width: 720px; }
.lesson h2 { font-family: var(--wbg-font-display); font-weight: 500; font-size: 26px; margin: 32px 0 8px; }
.quiz { background: var(--card); border-radius: var(--r); box-shadow: 0 0 0 .5px var(--sep); padding: 4px 0; }
.quiz p { padding: 8px 20px 0; }
.quiz label { display: flex; gap: 12px; align-items: center; padding: 10px 20px; cursor: pointer; position: relative; }
.quiz label + label::before { content: ""; position: absolute; left: 48px; right: 0; top: 0; border-top: .5px solid var(--sep); }
.quiz input { accent-color: var(--wbg-blaze-orange); }
.agenda li { display: grid; grid-template-columns: 1fr auto; gap: 16px; }

/* TC task board */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--fill); border-radius: var(--r); padding: 12px; min-height: 160px; }
.kcol-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 10px; }
.kcard { background: var(--card); border-radius: 10px; padding: 12px; margin-bottom: 8px; box-shadow: 0 0 0 .5px var(--sep), 0 1px 2px rgba(53, 53, 53, .05); }
.kmeta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.checklist { align-items: start; }

/* Split view (Transactions): list beside the open deal, like Mail */
.split { display: grid; grid-template-columns: 320px minmax(0, 1fr); margin: -32px -32px -64px; min-height: calc(100vh - 81px); }
.split-list { border-right: .5px solid var(--sep); background: var(--card); padding: 20px 8px; position: sticky; top: 52px; height: calc(100vh - 81px); overflow-y: auto; }
.split-list h2 { font-family: var(--wbg-font-display); font-weight: 500; font-size: 26px; margin: 0 8px 12px; }
.split-list .search { width: calc(100% - 16px); min-width: 0; margin: 0 8px 12px; }
.srow { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; color: inherit; position: relative; }
.srow + .srow::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; border-top: .5px solid var(--sep); }
.srow.sel { background: var(--sel); }
.srow.sel::before, .srow.sel + .srow::before { display: none; }
.srow:hover:not(.sel) { background: #FBF8F4; }
.srow .m { flex: 1; min-width: 0; }
.srow .t { font-weight: 600; font-size: 13px; }
.srow .s { font-size: 12px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .r { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.srow .r div + div { color: var(--ter); font-size: 11px; margin-top: 2px; }
.split-main { padding: 32px 40px 64px; min-width: 0; }
.split-main .g4, .split-main .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1300px) { .split-main .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .split-main .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Toast & intro */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: rgba(53, 53, 53, .92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff;
  padding: 12px 20px; border-radius: 12px; font-weight: 500; font-size: 13px; transition: .2s; z-index: 50; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.intro { position: fixed; inset: 0; background: rgba(53, 53, 53, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; z-index: 40; overflow-y: auto; }
.intro[hidden] { display: none; }
.intro-card { background: var(--wbg-off-white); border-radius: 16px; padding: 40px; max-width: 600px; width: 100%; box-shadow: 0 30px 80px rgba(53, 53, 53, .25); }
.intro-logo { width: 280px; max-width: 100%; display: block; margin-bottom: 40px; }
.intro-card h1 { font-size: 44px; line-height: 1.05; margin: 0 0 12px; }
.intro-card p { color: var(--sec); margin: 0 0 12px; }
.intro-card .label { margin: 24px 0 12px; }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.role-grid button { min-height: 56px; border-radius: 10px; border: 0; background: var(--card); box-shadow: 0 0 0 .5px var(--sep); font-weight: 600; cursor: pointer; text-align: left; padding: 8px 14px; }
.role-grid button span { display: block; font-size: 12px; font-weight: 400; color: var(--sec); }
.role-grid button:hover { box-shadow: 0 0 0 1.5px var(--wbg-blaze-orange); }
.scrim { position: fixed; inset: 0; background: rgba(53, 53, 53, .3); z-index: 19; }

/* iPhone-style tab bar (phones only) */
.tabbar { display: none; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); margin: 0; min-height: 0; }
  .split-list { display: none; }
  .split-main { padding: 0; }
}
@media (max-width: 860px) {
  body { font-size: 15px; }
  .banner { font-size: 11px; }
  .side { position: fixed; left: 0; top: 0; z-index: 20; transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 40px rgba(53, 53, 53, .2); }
  .side.open { transform: none; }
  .top { padding: 0 12px; gap: 8px; }
  .viewas > span { display: none; }
  #view { padding: 16px 16px 120px; }
  .foot { padding: 0 16px 110px; }
  .g2, .g3, .g4, .split-main .g3, .split-main .g4 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .page-head h1 { font-size: 34px; }
  .stages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kv { grid-template-columns: 100px 1fr; }
  .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro-card { padding: 28px 20px; }
  .intro-card h1 { font-size: 36px; }
  .search { min-width: 0; width: 100%; }
  .hide-sm { display: none; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(248, 245, 242, .88); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: .5px solid var(--sep);
  }
  .tabbar a, .tabbar button {
    display: grid; justify-items: center; gap: 2px; font-size: 10px; font-weight: 500; color: var(--ter); padding: 4px 0;
    background: none; border: 0; cursor: pointer; min-height: 44px;
  }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar [aria-current="page"] { color: var(--wbg-rich-bronze); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* Draft notice, calendar */
/* High priority (LC meeting, 11/4): special circumstances on a deal, above its tabs on every tab. A warm box with the
   accent edge; no red in WB One. */
.priority { background: var(--warn-bg); border-left: 4px solid var(--wbg-blaze-orange); border-radius: var(--r); padding: 14px 18px; margin-bottom: 16px; }
.priority-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.priority-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--wbg-rich-bronze); }
.priority-body { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 500; white-space: pre-wrap; }

/* MLS input (a listing's MLS input tab): fields two to a row, picks and long text full width; a pick list is a wrap of
   checkable pills with the MLS code beside each; a suggestion sits under its field in a warm box; unsaved changes get a
   bar along the bottom. */
.mls-section { padding: 0; }
.mls-section > .mls-fields { padding: 0 20px 20px; }
.mls-section-head { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 16px 20px; cursor: pointer; text-align: left; color: var(--fg); }
.mls-section-head:hover { background: var(--warm); border-radius: var(--r); }
.mls-section-head .small { color: var(--sec); margin-left: auto; }
.mls-section-head::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 1.5px solid var(--wbg-rich-bronze); border-bottom: 1.5px solid var(--wbg-rich-bronze); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.mls-section-head[aria-expanded="true"]::after { transform: rotate(-135deg) translateY(-1px); }
.mls-section-title { font-family: var(--wbg-font-display); font-size: 20px; font-weight: 500; }
.mls-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.mls-fields .field.wide { grid-column: 1 / -1; }
.mls-meta { color: var(--sec); padding-left: 4px; }
.mls-suggest { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; background: var(--warm); border-radius: var(--radius-control, 8px); padding: 8px 12px; font-size: 13px; }
.mls-suggest > span:first-child { flex: 1 1 200px; }
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.picks label, .picks button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--input-line); border-radius: 7px; background: #fff; color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; }
.picks label.on, .picks button.on { background: var(--sel); border-color: var(--wbg-light-3); }
.picks input { width: auto; height: auto; margin: 0; accent-color: var(--wbg-blaze-orange); }
.picks .code { font-size: 11px; color: var(--sec); font-variant-numeric: tabular-nums; }
.picks > .small { align-self: center; }
.mls-savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 12px 32px; background: var(--card); box-shadow: 0 -1px 0 var(--sep), 0 -6px 20px rgba(53, 53, 53, .08); }
@media (min-width: 861px) { .mls-savebar { left: var(--side-w); } }
@media (max-width: 860px) { .mls-savebar { bottom: calc(64px + env(safe-area-inset-bottom)); padding: 10px 16px; } }
@media (max-width: 700px) { .mls-fields { grid-template-columns: 1fr; } }
/* Listings filters (11/4): search, stage picks, a row of selects, quick toggles, then saving the view. */
.listing-filters { display: grid; gap: 12px; }
.listing-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.listing-toolbar .search { flex: 1 1 260px; min-width: 0; }
.listing-filters .search { width: 100%; min-width: 0; }
.filter-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .filter-row { grid-template-columns: 1fr 1fr; } }
/* Offers compared side by side: the best value in each row on a green wash. */
.offer-compare table { width: 100%; }
.offer-compare th[scope="row"] { text-align: left; color: var(--sec); font-weight: 500; white-space: nowrap; }
.offer-compare td.best { background: var(--ok-bg); color: var(--ok-fg); font-weight: 600; }
.notice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--sec); margin: -8px 0 20px; }
.cal-wrap { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.cal { padding: 0; overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { font-size: 12px; font-weight: 500; color: var(--sec); padding: 10px 10px 8px; border-bottom: .5px solid var(--sep); }
.cal-cell { min-height: 96px; padding: 6px; border-right: .5px solid var(--sep); border-bottom: .5px solid var(--sep); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.out { background: #FBF8F4; }
.cal-d { font-size: 12px; font-weight: 500; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell.today .cal-d { background: var(--wbg-blaze-orange); color: #fff; }
.cal-ev { font-size: 11px; line-height: 1.3; padding: 2px 6px; border-radius: 5px; background: var(--fill); color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.su { background: rgba(199, 89, 18, .10); color: var(--wbg-rich-bronze); }
.cal-ev.oh { background: rgba(108, 141, 92, .14); color: #46633A; }
.cal-date { width: 40px; text-align: center; flex: none; }
.cal-date b { display: block; font-family: var(--wbg-font-display); font-size: 22px; font-weight: 500; line-height: 1; }
.cal-date span { font-size: 11px; color: var(--sec); }
@media (max-width: 1100px) { .cal-wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .cal-cell { min-height: 56px; padding: 4px; } .cal-ev { font-size: 0; height: 6px; padding: 0; } }

/* ISA meters, recruiting funnel, client page */
.meter + .meter { margin-top: 10px; }
.meter-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.toolbar .chips { margin: 0; }
.funnel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; background: var(--card); border-radius: var(--r); box-shadow: 0 0 0 .5px var(--sep); overflow: hidden; }
.fstep { padding: 16px 20px; position: relative; }
.fstep + .fstep { border-left: .5px solid var(--sep); }
.fstep .stat { font-size: 30px; margin: 0 0 4px; }
.client-frame { max-width: 680px; margin: 0 auto; background: var(--wbg-off-white); border-radius: 20px; padding: 48px; box-shadow: 0 0 0 .5px var(--sep), 0 20px 50px rgba(53, 53, 53, .10); }
.client-logo { width: 240px; max-width: 100%; display: block; margin-bottom: 48px; }
.client-h { font-size: 48px; line-height: 1.05; margin: 0 0 12px; }
.client-h em { font-weight: 400; }
.client-lede { font-size: 16px; color: var(--fg); margin: 0 0 24px; }
.client-video { aspect-ratio: 16 / 9; border-radius: 14px; background: var(--wbg-dune); color: var(--wbg-off-white); display: grid; place-content: center; text-align: center; gap: 4px; margin-bottom: 32px; }
.client-video span { font-family: var(--wbg-font-display); font-size: 24px; }
.client-video small { color: var(--wbg-light-3); }
.client-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; }
.client-frame h3 { font-family: var(--wbg-font-display); font-weight: 500; font-size: 24px; margin: 6px 0 4px; }
.client-stats { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.client-stats li { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: baseline; font-size: 13px; }
.client-stats b { font-family: var(--wbg-font-display); font-size: 24px; font-weight: 500; }
.client-sec { margin-top: 32px; padding-top: 24px; border-top: .5px solid var(--sep); }
.client-sec p { margin: 8px 0 0; }
.client-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.client-nums b { display: block; font-family: var(--wbg-font-display); font-size: 26px; font-weight: 500; }
.client-nums span { font-size: 12px; color: var(--sec); }
.client-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.client-foot { margin-top: 40px; font-size: 11px; color: var(--sec); line-height: 1.6; }
@media (max-width: 860px) {
  .funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fstep:nth-child(4) { border-left: 0; }
  .client-frame { padding: 28px 20px; }
  .client-grid { grid-template-columns: 1fr; }
  .client-h { font-size: 38px; }
}

/* Print */
.print-wrap { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.preset { text-align: left; border: 0; border-radius: 10px; padding: 12px 14px; background: var(--fill); cursor: pointer; display: grid; gap: 2px; }
.preset b { font-weight: 600; font-size: 13px; }
.preset span { font-size: 12px; color: var(--sec); }
.preset.on { background: #fff; box-shadow: 0 0 0 1.5px var(--wbg-blaze-orange); }
@media (max-width: 1100px) { .print-wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .presets { grid-template-columns: minmax(0, 1fr); } }
.dropzone { display: grid; gap: 4px; place-items: center; width: 100%; padding: 28px 16px; border: 1.5px dashed var(--wbg-light-3); border-radius: 12px; background: #FBF8F4; cursor: pointer; text-align: center; }
.dropzone b { font-weight: 600; }
.dropzone span { font-size: 12px; color: var(--sec); }
.dropzone:hover { border-color: var(--wbg-rich-bronze); }
.small.late { color: var(--wbg-rich-bronze); font-weight: 500; }

/* ---------- Home widgets (app/one/widgets.tsx, home-grid.tsx) ---------- */
.wgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.wgrid.saving { opacity: .7; transition: opacity .2s; }
.w-s { grid-column: span 1; } .w-m { grid-column: span 2; } .w-l { grid-column: 1 / -1; }
.w { position: relative; display: flex; flex-direction: column; min-width: 0; }
.w > .card { flex: 1; }
.w .card-head { padding-right: 34px; }
.w-s .card-head { flex-direction: column; align-items: flex-start; gap: 2px; }
.w[draggable="true"] { cursor: grab; }
.w.dragging { opacity: .35; }
.w.dragging > .card { box-shadow: 0 0 0 2px var(--wbg-blaze-orange); }
.w-more { position: absolute; top: 12px; right: 10px; z-index: 3; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--sec); cursor: pointer; }
.w-more:hover, .w-more[aria-expanded="true"] { background: var(--fill); color: var(--fg); }
.w-menu { position: absolute; top: 46px; right: 8px; z-index: 6; width: 220px; padding: 6px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 .5px var(--sep), 0 6px 20px rgba(53, 53, 53, .14); display: grid; gap: 2px; }
.w-menu > button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--fg); }
.w-menu > button:hover:not(:disabled) { background: var(--fill); }
.w-menu > button:disabled { color: var(--ter); cursor: default; }
.w-menu > button.danger { color: var(--wbg-rich-bronze); }
.w-menu-label { font-size: 11px; font-weight: 600; color: var(--sec); padding: 6px 10px 4px; }
.w-sizes { display: flex; gap: 2px; padding: 2px; margin: 0 6px 4px; border-radius: 9px; background: var(--fill); }
.w-sizes button { flex: 1; height: 28px; border: 0; border-radius: 7px; background: none; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--fg); }
.w-sizes button[aria-checked="true"] { background: #fff; box-shadow: 0 1px 3px rgba(53, 53, 53, .14), 0 0 0 .5px rgba(53, 53, 53, .06); }
.w-menu-sep { height: .5px; background: var(--sep); margin: 4px 6px; }
.w-dialog-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(53, 53, 53, .28); display: grid; place-items: center; padding: 16px; }
.w-dialog { width: min(100%, 520px); max-height: 80vh; overflow-y: auto; background: var(--card); border-radius: 16px; padding: 20px 24px; box-shadow: 0 30px 80px rgba(53, 53, 53, .25); }
.pw-list { margin-top: 8px; }
.pw-list > li { gap: 10px; }
.pw-shot { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: var(--wbg-almond); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.pw-acts { display: flex; gap: 6px; flex: none; }
@media (max-width: 1100px) { .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .w-m, .w-l { grid-column: 1 / -1; } }
@media (max-width: 860px) { .wgrid { grid-template-columns: minmax(0, 1fr); } .w-s, .w-m, .w-l { grid-column: 1 / -1; } }

/* ---------- Knowledge articles (app/one/knowledge) ---------- */
.kb-article { max-width: 68ch; font-size: 15px; line-height: 1.6; }
.kb-article > :first-child { margin-top: 0; font-size: 16px; }
.kb-article h2 { font-family: var(--wbg-font-display); font-weight: 500; font-size: 24px; line-height: 1.2; margin: 32px 0 8px; }
.kb-article h3, .kb-article h4 { font-size: 15px; font-weight: 600; margin: 20px 0 4px; }
.kb-article p { margin: 0 0 12px; }
.kb-article ol, .kb-article ul { margin: 0 0 14px; padding-left: 24px; }
.kb-article ol { list-style: decimal; }
.kb-article ul { list-style: disc; }
.kb-article li ul { list-style: circle; }
.kb-article li { margin: 0 0 6px; padding-left: 2px; }
.kb-article li::marker { color: var(--sec); }
.kb-article li ul { margin: 6px 0 0; }
.kb-article strong { font-weight: 600; }
.kb-article code { font-size: 13px; padding: 1px 5px; border-radius: 5px; background: var(--fill); }
.kb-article .kb-note { margin: 0 0 14px; padding: 12px 16px; border-radius: var(--r); background: var(--warm); box-shadow: inset 0 0 0 1px var(--input-line); font-size: 14px; }
.kb-article .kb-shot { margin: 8px 0 20px; }
.kb-article .kb-shot img { display: block; max-width: 100%; height: auto; border-radius: var(--r); box-shadow: 0 0 0 1px rgba(53, 53, 53, .09), 0 4px 16px rgba(53, 53, 53, .08); }
.kb-article .kb-shot figcaption { font-size: 12px; color: var(--sec); margin-top: 6px; }
.kb-files { display: grid; gap: 10px; margin-top: 24px; max-width: 900px; }
.kb-file { border-radius: var(--r); box-shadow: 0 0 0 1px rgba(53, 53, 53, .09); background: var(--card); overflow: hidden; }
.kb-file > summary { list-style: none; cursor: pointer; }
.kb-file > summary::-webkit-details-marker { display: none; }
.kb-file-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.kb-file-name { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
details.kb-file > summary .kb-file-name::before { content: "PDF · "; color: var(--sec); font-weight: 400; }
details.kb-file[open] > summary { border-bottom: .5px solid var(--sep); }
.kb-pdf { display: block; width: 100%; height: 80vh; border: 0; background: var(--warm); }
.kb-video { display: block; width: 100%; max-height: 75vh; background: #000; }
.kb-img { display: block; max-width: 100%; }
.kb-up { display: grid; gap: 6px; justify-items: start; }
.kb-up-row { display: flex; gap: 12px; }

/* Knowledge: list and detail, shared by How-tos, Meetings and Vendors */
.kb-split { margin: 0; min-height: 70vh; border-radius: var(--r); overflow: hidden; box-shadow: 0 0 0 1px rgba(53, 53, 53, .09), 0 1px 3px rgba(53, 53, 53, .05); }
.kb-split .split-list { top: 52px; height: auto; max-height: calc(100vh - 72px); padding-top: 16px; }
.kb-split .split-main { padding: 28px 40px 56px; }
.kb-lhead { display: flex; align-items: center; justify-content: space-between; margin: 0 8px 12px; }
.kb-lhead h2 { margin: 0; }
.kb-glabel { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sec); padding: 14px 12px 6px; }
.kb-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.kb-head h1 { margin: 2px 0 0; font-size: 34px; line-height: 1.1; }
.kb-head .acts, .kb-lhead .acts { display: flex; gap: 8px; }
.kb-form { display: grid; gap: 16px; max-width: 760px; }
.kb-form textarea { min-height: 360px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; }
.kb-who { border: 0; margin: 0; padding: 14px 16px; border-radius: var(--r); background: var(--warm); display: grid; gap: 8px; }
.kb-who legend { font-weight: 500; float: left; width: 100%; padding: 0; }
.kb-roles { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.kb-roles label { display: flex; gap: 6px; align-items: center; }
.kb-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.kb-cats .card h3 { margin: 0 0 6px; font-family: var(--wbg-font-display); font-weight: 500; font-size: 20px; }
.kb-cats .card ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
@media (max-width: 860px) {
  .kb-split[data-open="0"] .split-list { display: block; position: static; max-height: none; }
  .kb-split[data-open="0"] .split-main { display: none; }
  .kb-split .split-main { padding: 20px 16px 40px; }
}
.kb-player { border-radius: var(--r); max-width: 960px; }
.kb-embed { position: relative; max-width: 960px; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #000; }
.kb-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Facts: label over value, in a two-column grid (Office accounts, Vendors) */
.oa-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 0 32px; }
.oa-fact { padding: 12px 0; border-bottom: .5px solid var(--sep); min-width: 0; }
.oa-fact .k { font-size: 12px; color: var(--sec); margin-bottom: 3px; }
.oa-fact .v { font-size: 15px; overflow-wrap: anywhere; }
.oa-check { display: flex; gap: 8px; align-items: center; font-size: 13px; }


/* ---------- Record cards (app/one/cards.tsx: deal file, thread, Today, TC file; the FUB app too) ----------
   Spencer, 10/27: "more CRM like with cards and better separation for quick glancing and expanding if you want
   more". A header card with the essentials, titled cards in a grid, short lists that fold out, and quiet counts.
   Blaze Orange only for what needs doing next (the next milestone, overdue, the main action). */
.rh { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; padding: 20px 24px; margin-bottom: 16px; }
.rh h1 { margin: 2px 0 6px; font-size: 34px; line-height: 1.08; overflow-wrap: anywhere; }
.rh-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; }
.rh-status .price { font-family: var(--wbg-font-display); font-size: 20px; font-weight: 500; }
.rh-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px 20px; margin: 16px 0 0; }
.rh-facts div { min-width: 0; }
.rh-facts dt { font-size: 11px; font-weight: 600; color: var(--ter); letter-spacing: .04em; text-transform: uppercase; }
.rh-facts dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.rh-facts dd small { display: block; font-weight: 400; color: var(--sec); font-size: 12px; }
.rh-facts .t-warn dd, .rh-facts .t-warn dd small { color: var(--wbg-rich-bronze); }
.rh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rh-next { background: var(--warm); border-radius: 10px; padding: 14px 16px; align-self: start; }
.rh-next ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 12px; align-items: baseline; }
.rh-next li { display: contents; }
.rh-day { font-family: var(--wbg-font-display); font-size: 17px; font-weight: 500; white-space: nowrap; }
.rh-what { font-size: 13px; font-weight: 500; min-width: 0; }
.rh-what small { display: block; font-weight: 400; color: var(--sec); font-size: 12px; }
.rh-next li:first-child .rh-day, .rh-next li.late .rh-day, .rh-next li.late small { color: var(--wbg-blaze-orange); }

/* A titled card */
.rc { display: flex; flex-direction: column; gap: 12px; }
.rc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rc-head h3 { margin: 0; font-family: var(--wbg-font-display); font-weight: 500; font-size: 19px; display: flex; align-items: baseline; gap: 8px; }
.rc-n { font-family: var(--wbg-font-body); font-size: 12px; color: var(--ter); font-weight: 500; }
.rc-more { font-size: 12px; font-weight: 500; white-space: nowrap; }
.rc .kv { margin-top: -6px; margin-bottom: -6px; }
.rc .list { margin-top: -6px; margin-bottom: -8px; }
.rc-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.rc-col { display: grid; gap: 16px; min-width: 0; }
.rc-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.rc-empty { margin: 0; font-size: 13px; color: var(--sec); }
.show-sm { display: none; }

/* Folds: a short list, the rest one tap away */
.fold > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--wbg-rich-bronze); padding: 4px 0; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.fold[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.fold-body { margin-top: 8px; }
.fold.quiet > summary { color: var(--sec); }
.fold.section-fold > summary { font-family: var(--wbg-font-display); font-size: 19px; color: var(--fg); font-weight: 500; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { display: grid; gap: 2px; padding: 12px 16px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px rgba(53, 53, 53, .09); color: inherit; }
a.tile:hover { box-shadow: 0 0 0 1px rgba(53, 53, 53, .16), 0 4px 12px rgba(53, 53, 53, .06); }
.tile b { font-family: var(--wbg-font-display); font-weight: 500; font-size: 28px; line-height: 1.1; }
.tile span { font-size: 12px; font-weight: 600; color: var(--sec); }
.tile small { font-size: 12px; color: var(--ter); }
.tile.t-warn b, .tile.t-warn span { color: var(--wbg-blaze-orange); }
.tile.t-ok b { color: var(--ok-fg); }

/* Milestone strip */
.ms { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.ms li { position: relative; display: grid; gap: 2px; padding-top: 20px; min-width: 0; }
.ms li::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--wbg-light-1); }
.ms li:first-child::before { left: 6px; }
.ms li:last-child::before { right: calc(100% - 6px); }
.ms li.done::before { background: var(--wbg-dune); }
.ms i { position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--wbg-light-3); }
.ms li.done i { background: var(--wbg-dune); box-shadow: none; }
.ms li.next i { background: var(--wbg-blaze-orange); box-shadow: 0 0 0 4px rgba(199, 89, 18, .18); }
.ms-l { font-size: 12px; font-weight: 600; color: var(--sec); padding-right: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-d { font-size: 13px; font-weight: 500; }
.ms li.later .ms-d { color: var(--ter); }
.ms li.next .ms-l, .ms li.next .ms-d { color: var(--wbg-blaze-orange); }

/* Every date, folded: label, day, where it came from */
.dates { display: grid; gap: 14px; }
.dates h4 { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--sec); }
.dates ul { list-style: none; margin: 0; padding: 0; }
.dates li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 6px 0; font-size: 13px; border-top: .5px solid var(--sep); }
.dates li span:last-child { color: var(--sec); font-variant-numeric: tabular-nums; }
.dates li.past span:first-child { color: var(--sec); }

/* Contacts */
.contacts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.contact { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--warm); min-width: 0; }
.contact-m { flex: 1; min-width: 0; }
.contact-n { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-r { font-size: 12px; color: var(--sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-a { display: flex; gap: 2px; flex: none; }
.contact-a a { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--wbg-rich-bronze); }
.contact-a svg { width: 16px; height: 16px; }
.contact-d { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 3px; }
.copy-text { font-size: 12px; color: var(--fg); max-width: 100%; display: inline-flex; gap: 2px; align-items: center; min-width: 0; }
.copy-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* The copy icon: 14px to see, a 24px target (40px on phones, by padding pulled back with margin so nothing moves). */
.copy-icon { all: unset; box-sizing: content-box; flex: none; display: inline-grid; place-items: center; width: 14px; height: 14px; padding: 5px; margin: -5px -3px -5px 0; border-radius: 6px; cursor: pointer; color: var(--ter); vertical-align: middle; transition: color .12s, background .12s; }
.copy-icon:hover { color: var(--fg); background: var(--fill); }
.copy-icon:focus-visible { outline: 2px solid var(--wbg-rich-bronze); outline-offset: 0; }
.copy-icon.done { color: #46633A; }
h1 .copy-icon { margin-left: 6px; vertical-align: 0.15em; }
.contact-a a:hover { background: var(--fill); }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; background: var(--wbg-almond); color: var(--wbg-dune); font-size: 12px; font-weight: 600; object-fit: cover; }

/* Linked systems as chips */
.sys { display: flex; flex-wrap: wrap; gap: 6px; }
.sys span { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border-radius: 999px; background: var(--fill); font-size: 12px; font-weight: 500; max-width: 100%; }
.sys span small { color: var(--sec); font-weight: 400; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.sys span.warn { background: var(--warn-bg); color: var(--wbg-rich-bronze); }

/* Money */
.money { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.money div { display: grid; gap: 2px; }
.money span { font-size: 12px; color: var(--sec); }
.money b { font-family: var(--wbg-font-display); font-size: 22px; font-weight: 500; }

/* Tabs: counts quiet, attention in orange */
.tab-n { font-size: 11px; color: var(--ter); font-weight: 500; font-variant-numeric: tabular-nums; }
.tab-alert { font-size: 11px; font-weight: 600; color: #fff; background: var(--wbg-blaze-orange); border-radius: 999px; padding: 1px 7px; }

/* Task rows in cards: late dates in orange, edits behind a small fold on the meta line */
.due.late { color: var(--wbg-blaze-orange); font-weight: 600; }
.t-edit > summary { font-size: 12px; padding: 0; }
.t-edit[open] { flex-basis: 100%; }
.t-edit .fold-body { margin-top: 6px; }
/* A value with Edit beside it: the form opens under it on tap (cards.tsx Editable) */
.editable { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.editable .editable-value { min-width: 0; }
.editable .fold-body { display: grid; gap: 8px; }
.file-card .rc-head h3 { font-family: var(--wbg-font-body); font-size: 15px; font-weight: 600; }
.file-card .rc-head h3 a { color: inherit; }
.file-sub { font-size: 12px; color: var(--sec); margin-top: -8px; }

/* The thread: posts as cards, activity a quiet timeline */
.th { display: grid; gap: 12px; max-width: 820px; }
.th-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.th-post { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px rgba(53, 53, 53, .09), 0 1px 3px rgba(53, 53, 53, .05); }
.th-post.me { background: #FFFBF7; box-shadow: 0 0 0 1px rgba(199, 89, 18, .25); }
.th-post .avatar { width: 36px; height: 36px; }
.th-who { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 12px; color: var(--sec); }
.th-who strong { font-size: 14px; color: var(--fg); font-weight: 600; }
.th-acts { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.th-acts .chip, .th-acts .btn.sm { height: 26px; padding: 0 8px; font-size: 12px; }
.th-acts .btn.sm { background: none; color: var(--sec); }
.th-acts .btn.sm:hover { background: var(--fill); color: var(--fg); }
.th-replies { border-left: 2px solid var(--wbg-light-1); padding-left: 12px; margin-top: 10px; display: grid; gap: 10px; }
.th-replies .th-post { box-shadow: none; padding: 0; background: none; }
.th-new { text-align: center; font-size: 12px; font-weight: 600; color: var(--wbg-blaze-orange); display: flex; align-items: center; gap: 10px; }
.th-new::before, .th-new::after { content: ""; flex: 1; border-top: 1px solid rgba(199, 89, 18, .35); }
.th-run { position: relative; padding: 2px 0 2px 20px; color: var(--sec); font-size: 12.5px; }
.th-run::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; border-left: 1.5px dotted var(--wbg-light-3); }
.th-day { font-size: 11px; font-weight: 600; color: var(--ter); letter-spacing: .04em; text-transform: uppercase; margin: 2px 0; }
.th-line { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 6px; align-items: baseline; padding: 3px 0; }
.th-line .ic { color: var(--ter); display: grid; place-items: center; align-self: center; }
.th-line .ic svg { width: 12px; height: 12px; }
.th-line .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-line .tx b { font-weight: 500; color: var(--fg); }
.th-line .x { font-size: 11px; font-weight: 600; color: var(--sec); background: var(--fill); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.th-line .at { font-size: 11px; color: var(--ter); white-space: nowrap; }
.th-run .fold > summary { font-size: 12.5px; color: var(--sec); font-weight: 500; }
.th-run .fold-body { margin-top: 2px; }
.th-compose { display: grid; gap: 6px; position: relative; padding: 12px 14px; border-radius: var(--r); background: var(--warm); }
/* The deal's Slack thread in WB One (threads/slack-parts.tsx): it reads like Slack. */
/* The deal's Slack tab laid out like Slack (slack-layout.ts, 10/30): flat message rows, day dividers, quiet changes. */
.th.sl-view { gap: 6px; max-width: 880px; }
.sl-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.sl-day { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; font-size: 12px; font-weight: 600; color: var(--fg); }
.sl-day::before, .sl-day::after { content: ""; flex: 1; border-top: 1px solid var(--sep); }
.sl-day span { padding: 2px 12px; border-radius: 999px; box-shadow: 0 0 0 1px var(--sep); background: var(--card); }
.sl-view .sl-thread, .sl-view .th-post { display: block; padding: 6px 10px; border-radius: 8px; background: none; box-shadow: none; }
.sl-view .sl-thread:hover, .sl-view .th-post:hover { background: var(--warm); }
.sl-view .th-post { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; }
.sl-view .th-post.me { background: #FFFBF7; }
.sl-view .th-who { font-size: 12px; gap: 6px; }
.sl-view .th-who strong { font-size: 15px; font-weight: 700; }
.sl-view .sl-msg { padding: 2px 0; }
.sl-view .sl-body { font-size: 15px; line-height: 1.46; }
.sl-view .th-post .avatar, .sl-view .sl-msg .avatar { border-radius: 8px; }
.sl-replies { margin: 2px 0 2px 44px; display: grid; gap: 2px; }
.sl-replies .sl-msg .avatar { width: 28px; height: 28px; }
.sl-replies .sl-msg { grid-template-columns: 28px minmax(0, 1fr); }
.sl-count { display: flex; gap: 12px; align-items: baseline; font-size: 12px; color: var(--sec); border-top: 1px solid var(--sep); padding: 6px 0 2px; }
.sl-count span { font-weight: 600; color: var(--wbg-rich-bronze); }
.sl-count a { color: var(--sec); }
.sl-changes { margin: 1px 0 1px 44px; font-size: 12px; color: var(--ter); }
.sl-feed > li > .sl-changes { margin-left: 54px; }
.sl-changes > summary { cursor: pointer; list-style: none; padding: 2px 0; }
.sl-changes > summary::-webkit-details-marker { display: none; }
.sl-changes > summary:hover { color: var(--sec); }
.sl-changes .dot { margin-right: 6px; }
.sl-change { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 2px 0 2px 12px; color: var(--sec); }
.sl-change b { font-weight: 500; color: var(--fg); }
.sl-change .at { color: var(--ter); white-space: nowrap; }
.sl-none { padding: 10px 14px; border-radius: var(--r); background: var(--warm); font-size: 13px; }
.sl-compose { position: sticky; bottom: 8px; z-index: 3; margin-top: 10px; background: var(--card); box-shadow: 0 0 0 1px var(--input-line), 0 4px 14px rgba(53, 53, 53, .06); }
.sl-connect { display: grid; gap: 6px; justify-items: start; }
.th-tag { display: inline-block; font-size: 11px; font-weight: 500; line-height: 16px; padding: 0 6px; border-radius: var(--radius-pill, 6px); background: var(--fill); color: var(--sec); margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.th-tag.slack { background: rgba(74, 21, 75, .08); color: #4a154b; }
.th-tag.warn { background: var(--warn-bg); color: var(--wbg-rich-bronze); }
.th-tag.line { background: none; box-shadow: inset 0 0 0 1px var(--wbg-light-3); }
.th-who .at { color: var(--sec); text-decoration: none; }
.th-who .at:hover { text-decoration: underline; }
.th-post.slack { display: block; }
.sl-msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
.sl-msg .avatar { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.sl-count { color: var(--sec); }
.sl-body { white-space: normal; overflow-wrap: anywhere; line-height: 1.46; }
.sl-body a { color: var(--wbg-rich-bronze); }
.sl-mention { color: #1264a3; background: rgba(29, 155, 209, .1); border-radius: 3px; padding: 0 2px; font-weight: 500; }
.sl-code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: #c01343; background: var(--fill); border: 1px solid var(--sep); border-radius: 3px; padding: 0 3px; }
.sl-pre { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--warm); border: 1px solid var(--sep); border-radius: 4px; padding: 8px; margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sl-quote { margin: 2px 0; padding-left: 10px; border-left: 4px solid var(--fill-2); color: var(--fg); }
.sl-emoji { display: inline-block; font-size: 1.15em; line-height: 1; vertical-align: -1px; }
img.sl-emoji { width: 1.25em; height: 1.25em; object-fit: contain; vertical-align: -4px; }
.sl-emoji.big { font-size: 32px; }
img.sl-emoji.big { width: 32px; height: 32px; }
.sl-emoji-name { color: var(--sec); }
.sl-deleted { margin: 2px 0; font-style: italic; color: var(--sec); }
.sl-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sl-react { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--sep); font-size: 12px; cursor: default; outline: none; }
.sl-react .sl-emoji { font-size: 15px; }
.sl-react img.sl-emoji { width: 16px; height: 16px; vertical-align: 0; }
.sl-react .n { font-weight: 600; color: var(--sec); }
.sl-react:hover, .sl-react:focus-visible { box-shadow: inset 0 0 0 1px var(--wbg-light-3); background: var(--card); }
.sl-tip { display: none; position: absolute; z-index: 20; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 240px; padding: 6px 9px; border-radius: 8px; background: var(--wbg-dark-2); color: var(--wbg-off-white); font-size: 12px; font-weight: 500; line-height: 1.35; text-align: center; white-space: normal; box-shadow: var(--shadow-popover, 0 4px 14px rgba(0, 0, 0, .18)); pointer-events: none; }
.sl-react:hover .sl-tip, .sl-react:focus .sl-tip { display: block; }
.sl-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.sl-photo img { display: block; max-width: 260px; max-height: 200px; border-radius: 8px; box-shadow: 0 0 0 1px var(--sep); object-fit: cover; }
.sl-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 10px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--sep); color: var(--fg); text-decoration: none; }
.sl-file .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sl-file:hover { background: var(--warm); }
.th-replies .sl-msg + .sl-msg, .th-replies .fold + .sl-msg { margin-top: 2px; }

@media (max-width: 1100px) {
  .rc-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .show-sm { display: inline; }
  .stack td[data-label="COE"] .small { display: inline; margin-left: 6px; }
  .rh { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
  .rh h1 { font-size: 28px; }
  .rh.compact .rh-next, .rh.compact .rh-actions { display: none; }
  .rh-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rh-actions .btn { flex: 1 1 auto; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: 10px 14px; }
  .tile b { font-size: 24px; }
  .ms { grid-template-columns: none; grid-auto-flow: row; gap: 0; }
  .ms li { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 0 8px 24px; }
  .ms li::before { top: 0; bottom: 0; left: 5px; right: auto; width: 2px; height: auto; }
  .ms li:first-child::before { top: 14px; left: 5px; }
  .ms li:last-child::before { bottom: calc(100% - 14px); right: auto; }
  .ms i { top: 10px; }
  .fold > summary { min-height: 44px; }
  .contact-a a { width: 44px; height: 44px; }
  .copy-icon { padding: 13px; margin: -13px -11px -13px -8px; }
  .th-line { grid-template-columns: 16px minmax(0, 1fr); }
  .th-line .at { grid-column: 2; margin-top: -2px; }
  .th-acts .chip, .th-acts .btn.sm { height: 40px; min-height: 40px; }
  .sl-react { height: 30px; padding: 0 9px; }
  .sl-replies, .sl-changes { margin-left: 16px; }
  .sl-feed > li > .sl-changes { margin-left: 20px; }
  .sl-change { grid-template-columns: minmax(0, 1fr); }
  .sl-photo img { max-width: 100%; }
}


/* ---------- Phones (Spencer, 10/27: the whole app on a phone) ----------
   One set of rules for every /one page at phone width; desktop is untouched. Tap targets reach 44px (Apple's
   minimum), inputs are 16px so iOS doesn't zoom the page, tables marked .stack become one card per row, and a
   row's .row-main link covers the whole row while its check boxes and buttons sit above it. */
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.due { white-space: nowrap; text-align: right; }
@media (max-width: 860px) {
  html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
  .main { overflow-x: clip; }
  .top { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  #view { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .side { height: 100dvh; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  #nav a { height: 44px; }
  .crumbs a { display: inline-block; padding: 14px 0; }
  .list.card { margin-left: 0; margin-right: 0; }
  label.small:has(> input[type=checkbox]), .kb-roles label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
  .side-foot .out { padding: 12px 8px; }
  .page-head h1, .kb-head h1 { overflow-wrap: anywhere; }

  /* Inputs: 16px or iOS zooms in on focus; 44px tall. Beats the 13px some pages set on their own. */
  input:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=range], [type=color]), select, textarea { font-size: 16px !important; }
  :where(input:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=range]), select):not(:where(.print-host *, .devices-host *, .admin-host *, .connect-host *)) { min-height: 44px; }
  .field input, .field select, .search, .mt-filters select { height: 44px; }
  :where(input[type=checkbox], input[type=radio]):not(:where(.print-host *, .devices-host *, .admin-host *, .connect-host *)) { width: 20px; height: 20px; }

  /* Buttons, segmented tabs and chips */
  .btn { height: auto; min-height: 44px; }
  .btn.sm { min-height: 40px; padding: 0 10px; font-size: 13px; }
  form.chips:has(> .search) { width: 100%; }
  .tabs a, .chip { height: 40px; }
  .linkish { min-height: 44px; }
  .w-more { width: 44px; height: 44px; top: 6px; right: 4px; }
  .w-menu > button { padding: 12px 10px; }
  .w-sizes button { height: 36px; }
  .suggest button { padding: 12px; }
  .w-dialog { max-height: 85dvh; padding: 18px 16px; }

  /* Round checks stay 22px but take a 44px tap */
  .check, .tick { position: relative; }
  .check::after, .tick::after { content: ""; position: absolute; inset: -11px; }

  /* Disclosure rows (<details>): a taller tap on the summary without moving anything */
  details > summary.label:not([style*="padding"]), .list details.small > summary { padding-block: 12px; margin-block: -12px; }
  .list .mt-snooze summary { padding: 12px 10px; margin: -12px -10px; }
  .list .mt-snooze[open] { z-index: 6; }
  .list .mt-snooze[open] > div { top: 32px; }
  .list .mt-snooze button { padding: 12px; }

  /* Rows: the main link opens the item from anywhere on the row */
  .list .grow > a.title { display: block; }
  tr.click { position: relative; }
  tr.click td { position: static; }
  :is(.list > li, tr.click, .stack tr) .row-main::after { content: ""; position: absolute; inset: 0; }
  :is(.list > li, tr.click, .stack tr) :is(a:not(.row-main), button, summary, select, textarea, input:not([type=hidden], [type=radio], [type=checkbox])) { position: relative; z-index: 1; }
  .list .due { white-space: normal; max-width: 72px; }
  .pill { white-space: normal; }
  .kv dd { min-width: 0; overflow-wrap: anywhere; }
  .kb-cats .card ul { gap: 0; }
  .kb-cats .card ul a { display: block; padding: 10px 0; }

  /* Tables marked .stack: one card per row, header hidden, cells wrap under the first */
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack, .stack tbody { display: block; }
  .stack tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 16px; position: relative; }
  .stack tbody tr + tr { border-top: .5px solid var(--sep); }
  .stack tbody td { display: block; padding: 0; border: 0 !important; position: static; text-align: left; min-width: 0; }
  .stack tbody td:first-child, .stack tbody td.stack-main { flex: 1 0 100%; }
  .stack tbody td.stack-main { order: -1; }
  .stack tbody tr:has(.stack-main) td:first-child:not(.stack-main) { flex: none; }
  .stack tbody td.hide-sm { display: none; }
  .stack td[data-label]::before { content: attr(data-label) " "; color: var(--sec); font-size: 12px; }
  .stack tbody td[colspan] { flex-basis: 100%; }
}

/* Sortable table headers (Spencer 10/27: click a column to sort it, again to flip it). */
th .th-sort { color: inherit; text-decoration: none; display: inline-block; }
th .th-sort:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--sep); }
th[aria-sort] .th-sort { color: var(--fg); }
table.sorts thead th { cursor: pointer; user-select: none; }
table.sorts thead th:hover { color: var(--fg); }
table.sorts thead th[aria-sort="ascending"]::after { content: " ↑"; }
table.sorts thead th[aria-sort="descending"]::after { content: " ↓"; }

/* Back, on every page but Home (Spencer 10/27). */
.back-btn { display: inline-flex; align-items: center; gap: 2px; flex: none; background: none; border: 0; padding: 6px 8px 6px 2px; margin-right: 4px; border-radius: 8px; color: var(--wbg-rich-bronze); font: inherit; font-size: 13px; cursor: pointer; }
.back-btn:hover { background: var(--fill); }
@media (max-width: 860px) { .back-btn { min-height: 44px; } .back-btn span { display: none; } }

/* Form rows (the commission pages' adjust, plan and filter forms). On phones each field takes the full width. */
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 860px) {
  form.row { flex-direction: column; align-items: stretch; }
  form.row > *, form.row label > input, form.row label > select { width: 100%; max-width: 100%; box-sizing: border-box; }
  form.row label { display: grid; gap: 4px; }
  .section h2 { overflow-wrap: anywhere; }
}

/* ---------- Commission statement (Spencer, 10/28: simpler, the totals first, detail a tap away) ---------- */
.cm-sum { display: grid; gap: 12px; }
.cm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cm-num { font-family: var(--wbg-font-display); font-size: 26px; line-height: 1.1; margin-top: 4px; overflow-wrap: anywhere; }
.cm-nums > div:first-child .cm-num { color: var(--wbg-rich-bronze); }
.cm-sum p, .cm-sum ul { margin: 0; }
.cm-card, .cm-more > .card, .cm-sum { margin-top: 12px; }
.cm-lines { list-style: none; margin: 0 -20px; padding: 0; }
.cm-lines > li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 20px; border-top: .5px solid var(--sep); }
.cm-lines > li:first-child { border-top: 0; }
.cm-lines > li.deal { background: #FBF8F4; }
.cm-lines > li.team { font-weight: 600; }
.cm-line-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-rule { font-size: 11px; color: var(--sec); }
.cm-amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cm-amt details summary { list-style: none; cursor: pointer; }
.cm-more > details > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 28px; }
.cm-more > details[open] > summary { margin-bottom: 10px; }
.cm-more form.row > input, .cm-more form.row > select { flex: 1 1 160px; min-width: 0; }
@media (max-width: 640px) {
  .cm-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cm-nums > div:first-child { grid-column: span 2; }
  .cm-nums > div:first-child .cm-num { font-size: 32px; }
  .cm-num { font-size: 20px; }
  .cm-rule { display: none; }
}

/* Transactions wishlist (Leilagh, 10/28): copy everything, paragraph numbers, the 3-month calendar, drop to upload. */
.copy-text.contact-n { font-size: 13.5px; font-weight: 500; color: var(--fg); }
.copy-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: baseline; margin: 0; }
.copy-list dt { font-size: 12px; color: var(--sec); }
.copy-list dd { margin: 0; min-width: 0; }
.copy-list .copy-text { font-size: 13px; }
.para { display: inline-block; min-width: 3.4em; margin-right: 6px; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--sec); }
.cal3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.cal3 table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.cal3 caption { font-weight: 600; font-size: 13px; text-align: left; padding-bottom: 4px; }
.cal3 th { font-weight: 500; color: var(--sec); padding: 2px 0; }
.cal3 td { padding: 4px 0; border-radius: 6px; }
.cal3 td.off { color: var(--sec); background: var(--fill); }
.cal3 td.hol { color: var(--sec); background: var(--fill); text-decoration: line-through; text-decoration-color: var(--sep); }
.cal3 td.today { outline: 1.5px solid var(--wbg-rich-bronze); font-weight: 600; }
.drop { border: 1.5px dashed var(--sep); border-radius: 12px; padding: 16px; text-align: center; font-size: 13px; color: var(--sec); }
.drop.over { border-color: var(--wbg-rich-bronze); background: var(--warn-bg); color: var(--fg); }


/* ISA: shift boards (a grid of days by area; a square opens on tap) and scorecard bits */
.shift-grid { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 640px; }
.shift-grid th, .shift-grid td { border-bottom: .5px solid var(--sep); padding: 6px; vertical-align: top; text-align: left; }
.shift-grid th { font-size: 12px; font-weight: 500; color: var(--sec); }
.shift-grid th.area { width: 112px; }
.shift-grid th small { display: block; color: var(--ter); font-weight: 400; }
.sq { display: block; min-height: 44px; padding: 6px 8px; border-radius: var(--radius-control, 8px); background: var(--warm); color: var(--fg); text-decoration: none; font-size: 12px; line-height: 1.3; }
.sq:hover { background: var(--sel); }
.sq.open { background: none; box-shadow: inset 0 0 0 1px var(--input-line); color: var(--wbg-rich-bronze); font-weight: 500; }
.sq.mine { background: var(--warn-bg); }
.sq.isa { background: var(--fill); }
.sq[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--wbg-blaze-orange); }
.sq small { display: block; color: var(--sec); }
.pace-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--fill-2); flex: none; }
.pace-dot.green, .pace-dot.clean { background: var(--wbg-olive); }
.pace-dot.yellow, .pace-dot.slip { background: var(--wbg-light-2); }
.pace-dot.red, .pace-dot.missed { background: var(--wbg-blaze-orange); }
.pace-dot.today { box-shadow: 0 0 0 2px var(--wbg-blaze-orange); background: #fff; }
.bar-track { height: 8px; border-radius: 4px; background: var(--fill-2); overflow: hidden; display: flex; }
.bar-track > span { display: block; height: 100%; background: var(--wbg-blaze-orange); }
.bar-track > span + span { border-left: 1px solid #fff; }

/* CopyBlockButton's fallback when a frame refuses the clipboard: the text, selected, to copy by hand. */
.copy-manual { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; font: inherit; font-size: 13px; border: 1px solid var(--input-line); border-radius: 8px; padding: 6px 8px; resize: none; }

/* Vendor ratings (10/30): 1 to 5 stars as radio buttons, right to left so hover/checked fill the stars before them. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stars-in { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; border: 0; padding: 0; margin: 0; }
.stars-in input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-in label { font-size: 30px; line-height: 1; padding: 4px 3px; color: var(--line); cursor: pointer; }
.stars-in input:checked ~ label, .stars-in label:hover, .stars-in label:hover ~ label { color: var(--wbg-blaze-orange); }
.stars-in input:focus-visible + label { outline: 2px solid var(--wbg-blaze-orange); outline-offset: 2px; border-radius: 4px; }
.rate-form { display: grid; gap: 8px; margin-top: 4px; }
.rate-form textarea { width: 100%; }
.rate-list { margin-top: 12px; border-top: 1px solid var(--sep); }
.rate-list > li { display: block; }
.rate-stars { color: var(--wbg-blaze-orange); letter-spacing: 1px; white-space: nowrap; }

/* Add widget gallery (10/30): live previews of each widget, scaled to fit, like the iOS and Mac widget gallery. */
.w-dialog.wg { width: min(100%, 980px); max-height: 86vh; background: var(--warm, var(--card)); }
.wg-grid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wg-tile { display: flex; flex-direction: column; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 .5px var(--sep); overflow: hidden; }
.wg-stage { position: relative; height: 230px; overflow: hidden; background: var(--fill); display: flex; justify-content: center; align-items: flex-start; padding: 12px; }
.wg-preview { flex: none; transform-origin: top center; pointer-events: none; user-select: none; }
.wg-preview .card { margin: 0; box-shadow: 0 8px 24px rgba(53, 53, 53, .12); }
.wg-stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 36px; background: linear-gradient(transparent, var(--fill)); }
.wg-info { padding: 12px 14px 14px; display: grid; gap: 4px; }
.wg-info .title { font-weight: 600; }
.wg-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.wg-actions .w-sizes { margin: 0; flex: 0 1 240px; }
@media (max-width: 760px) { .wg-grid { grid-template-columns: minmax(0, 1fr); } .wg-stage { height: 200px; } }

/* Menu folders (10/30): a long menu folds into groups; tap a group's name to open or close it. */
#nav details.nav-group { margin-top: 8px; }
#nav details.nav-group > summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; border-radius: 6px; user-select: none; }
#nav details.nav-group > summary::-webkit-details-marker { display: none; }
#nav details.nav-group > summary:hover { color: var(--sec); background: var(--fill); }
#nav details.nav-group > summary svg { width: 12px; height: 12px; margin-left: auto; color: var(--ter); transition: transform .15s; }
#nav details.nav-group[open] > summary svg { transform: rotate(90deg); }
#nav details.nav-group > summary:focus-visible { outline: 2px solid var(--wbg-blaze-orange); outline-offset: 1px; }

/* The source's own word under WB One's name (10/30): small and quiet. */
.was { display: block; font-size: 11px; color: var(--ter); margin-top: 2px; font-weight: 400; }
dd .was, .stage + .was, span.was { display: inline; margin-left: 6px; margin-top: 0; }
.comms > li { display: block; }
.comms-body { white-space: pre-line; margin: 4px 0 0; max-width: 72ch; }
.comms-table td { vertical-align: top; }
.comms-table .comms-body { max-width: 60ch; white-space: pre-line; }
.comms-table details summary { cursor: pointer; }

/* Deal email (messages.tsx): long file names, addresses and links wrap instead of widening the email past a phone screen (11/1). */
.mail-msg { min-width: 0; overflow-wrap: anywhere; }
.chip.mail-file { flex: 0 1 auto; max-width: 100%; height: auto; min-height: 28px; padding: 4px 12px; gap: 8px; white-space: normal; flex-wrap: wrap; text-align: left; }
@media (max-width: 767px) { .chip.mail-file { height: auto; min-height: 40px; } }

/* Checklist and documents tab (Spencer, 11/1): every card the same height, scrolling inside, so the grid lines up. */
.docs-tab { align-items: stretch; }
.docs-tab > .rc { height: 540px; overflow-y: auto; overscroll-behavior: contain; padding-top: 0; }
.docs-tab > .rc > * { flex-shrink: 0; }
.docs-tab > .rc > .rc-head { position: sticky; top: 0; z-index: 1; background: var(--card); padding: 16px 0 8px; margin-bottom: -8px; }
/* Long file names (Business_Arrangement_Disclosure_…) wrap instead of widening the card and scrolling it sideways. */
.docs-tab > .rc { overflow-x: hidden; }
.docs-tab .list :is(.title, .small) { overflow-wrap: anywhere; }
.docs-tab .pill { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 767px) { .docs-tab > .rc { height: auto; max-height: 70vh; } }
/* An uploaded file's name opens its pop-up (upload-row.tsx). */
button.upload-name { display: block; font-size: inherit; color: var(--wbg-rich-bronze); text-align: left; font-weight: 500; overflow-wrap: anywhere; }
h2.upload-name { overflow-wrap: anywhere; font-size: 18px; margin: 0; }

/* Search (search-box.tsx, 11/1): a button in the top bar, ⌘K opens the panel. */
.top .search-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 12px; border-radius: 9px; border: 1px solid var(--sep); background: var(--card); color: var(--sec); font: inherit; font-size: 13px; cursor: pointer; min-width: 180px; }
.top .search-btn:hover { color: var(--fg); }
.top .search-btn kbd { margin-left: auto; font: inherit; font-size: 11px; color: var(--ter); border: 1px solid var(--sep); border-radius: 5px; padding: 0 5px; }
.search-scrim { position: fixed; inset: 0; z-index: 200; background: rgba(53, 53, 53, .28); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.search-panel { width: min(640px, 100%); background: var(--card); border-radius: 14px; box-shadow: 0 18px 60px rgba(0, 0, 0, .25); overflow: hidden; }
.search-panel > input { width: 100%; border: 0; border-bottom: 1px solid var(--sep); padding: 16px 18px; font: inherit; font-size: 17px; outline: none; background: transparent; color: var(--fg); }
.search-list { list-style: none; margin: 0; padding: 6px; max-height: 55vh; overflow-y: auto; }
.search-list li { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; min-width: 0; }
.search-list li.on { background: var(--fill); }
.search-list .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-list .sub { color: var(--ter); }
.search-list .kind { flex: none; width: 58px; font-size: 11px; font-weight: 600; color: var(--ter); text-transform: uppercase; letter-spacing: .03em; }
.search-list .kind.ask { color: var(--wbg-rich-bronze); }
.search-answer { padding: 14px 18px 16px; max-height: 60vh; overflow-y: auto; font-size: 14px; line-height: 1.5; }
.search-md > div { margin: 2px 0; }
@media (max-width: 767px) {
  .top .search-btn { min-width: 0; padding: 0 9px; }
  .top .search-btn .search-label, .top .search-btn kbd { display: none; }
  .search-scrim { padding-top: 8px; }
}

/* Meetings: the recorder */
/* 11/3 (Spencer: "when we adjust the window size it keeps the video and slides as the main thing"): the picture takes
   whatever room there is; the controls' column has a capped width, and under the picture once the window is narrow.
   On short windows the picture scales to the window's height (never below 60% of its column) and the controls scroll. */
.rec { container-type: inline-size; }
.rec-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 30%, 380px); gap: 20px; align-items: start; max-width: 1600px; }
@media (max-width: 860px) { .rec-grid { grid-template-columns: 1fr; } }
@container (max-width: 900px) { .rec-grid { grid-template-columns: 1fr; } }
.rec-preview { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r); overflow: hidden;
  width: min(100%, max(60%, calc((100vh - 170px) * 16 / 9))); margin-inline: auto; }
.rec-preview video { display: block; width: 100%; height: 100%; object-fit: contain; }
.rec-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #E0442B; animation: rec-blink 1.2s infinite; }
@keyframes rec-blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.rec-blocked { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; color: #fff; }
.rec-blocked p { margin: 0; max-width: 46ch; }
.rec-meter { height: 6px; margin-top: 8px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.rec-meter > div { height: 100%; width: 0; background: var(--wbg-olive); transition: width 80ms linear; }
.rec .notice { margin-bottom: 16px; }
.rec-scenes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rec-scenes kbd { font: 600 11px/1 var(--wbg-font-body); padding: 2px 5px; border-radius: 4px; background: var(--fill); color: var(--sec); }
.rec-scenes .btn.primary kbd { background: rgba(255, 255, 255, .25); color: #fff; }
.rec-camera { margin-top: 12px; padding: 12px 16px; }
.rec-camera > summary { cursor: pointer; }
.rec-pad { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.rec-scene-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; margin-top: 12px; }
.rec-canva { position: relative; aspect-ratio: 16 / 9; margin-top: 12px; background: #000; border-radius: var(--r); overflow: hidden; }
.rec-canva iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rec-slides-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-play { background: var(--wbg-rich-bronze); border-color: var(--wbg-rich-bronze); color: #fff; font-weight: 600; } /* a video on this slide (1.9.4) */
.rec-big { font-size: 15px; padding: 10px 12px; }
.rec-sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 10px; }
.rec-source { display: grid; gap: 4px; text-align: left; padding: 8px; border: 0; border-radius: var(--r); background: var(--fill); cursor: pointer; }
.rec-source:hover, .rec-source.was { box-shadow: inset 0 0 0 2px var(--wbg-blaze-orange); }
.rec-source img, .rec-source-blank { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: #000; display: block; }
.rec-source .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-status { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.joy { display: flex; align-items: center; gap: 12px; margin: 0; }
.joy-pad { position: relative; width: 112px; height: 112px; border-radius: 50%; background: var(--fill); box-shadow: inset 0 0 0 1px var(--sep); touch-action: none; cursor: grab; display: grid; place-items: center; }
.joy-pad:focus-visible { outline: 2px solid var(--wbg-blaze-orange); outline-offset: 2px; }
.joy-knob { width: 36px; height: 36px; border-radius: 50%; background: var(--wbg-dune); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform 120ms ease-out; pointer-events: none; }
.joy-pad:active .joy-knob { transition: none; }
.joy-zoom { display: flex; align-items: center; gap: 8px; }
.joy-zoom-btn { width: 52px; height: 44px; font-size: 22px; line-height: 1; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.rec-cam-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; }
.meters { display: grid; gap: 4px; margin-top: 8px; }
.meter-row { display: grid; grid-template-columns: 120px 1fr 12px auto; align-items: center; gap: 8px; }
.meter-row input { font-size: 12px; padding: 2px 4px; }
.meter-name { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter-bar { position: relative; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.meter-bar > div { height: 100%; background: var(--wbg-olive); transition: width 120ms linear; }
.meter-hold { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fg); opacity: .6; }
.meter-clip { width: 10px; height: 10px; border-radius: 50%; background: var(--fill); }
.meter-clip.on { background: #E0442B; }
.meter-quiet { color: var(--wbg-rich-bronze); }
/* The live block: picture, joystick, meters and scenes together; pinned at the top when the window is tall enough */
.rec-stage { background: var(--canvas); }
.rec-stage .rec-status { min-height: 18px; }
.rec-live { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 8px; }
@media (max-width: 700px) { .rec-live { grid-template-columns: 1fr; } }
.rec-live .rec-cam-status { margin: 0; min-height: 22px; }
.rec-live .joy { margin: 6px 0 0; }
/* The row under the picture: scenes, joystick and zoom, tracking and shots, sound. Wraps on narrow windows. */
.rec-row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-start; margin-top: 10px; }
.rec-row .rec-scenes { display: grid; grid-template-columns: repeat(2, auto); margin: 0; align-content: start; }
.rec-row-col { flex: 1 1 170px; min-width: 0; }
.rec-row-col .rec-cam-status { margin: 0 0 6px; }
.rec-row-sound { flex: 1 1 220px; }
.joy-side { display: grid; gap: 8px; }
.joy-speed { display: flex; gap: 4px; align-items: center; }
/* Live control (phone first) */
.live { display: grid; gap: 10px; max-width: 720px; }
.live-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.live .rec-scenes { margin: 0; }
.live-cam { display: grid; gap: 8px; }
.live-slides { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-big { min-width: 110px; min-height: 48px; font-size: 16px; }
.live-line { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }

/* Recorder setup (11/3): one card, a tab for each thing with its state as a chip; only the open tab's panel shows. */
.rec-setup-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-setup-tab { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--input-line); border-radius: 999px; background: transparent; font: inherit; font-size: 13px; cursor: pointer; color: inherit; }
.rec-setup-tab.on { border-color: currentColor; font-weight: 600; }
.rec-chip { font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: 999px; background: rgba(127, 127, 127, 0.14); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-setup-panel { margin-top: 10px; }

/* The bell (notify-bell.tsx, 11/4): the unread count, and a small panel of the newest (See all opens the page). */
.top .bell-wrap { position: relative; flex: none; }
.top .bell-btn { position: relative; display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 9px; color: var(--sec); background: none; border: 0; cursor: pointer; padding: 0; }
.top .bell-btn:hover, .top .bell-btn[data-current], .top .bell-btn[aria-expanded="true"] { color: var(--wbg-rich-bronze); }
.top .bell-btn .bell-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--wbg-blaze-orange); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 6px); width: 380px; max-width: calc(100vw - 24px); background: var(--card); border-radius: 14px; box-shadow: 0 18px 60px rgba(0, 0, 0, .22); border: .5px solid var(--sep); z-index: 60; display: flex; flex-direction: column; max-height: min(560px, calc(100vh - 80px)); overflow: hidden; color: var(--fg); }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 6px; font-size: 15px; }
.bell-head .linkish { background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--wbg-rich-bronze); font: inherit; font-size: 13px; }
.bell-chips { padding: 4px 12px 8px; margin: 0; flex-wrap: wrap; }
.bell-list { list-style: none; margin: 0; padding: 0 6px 6px; overflow-y: auto; flex: 1; }
.bell-list li { display: flex; align-items: flex-start; gap: 4px; border-radius: 10px; }
.bell-list li:hover { background: var(--fill); }
.bell-item { display: flex; gap: 10px; align-items: flex-start; flex: 1; min-width: 0; padding: 10px; color: inherit; text-decoration: none; }
.bell-item .grow { display: grid; gap: 2px; min-width: 0; }
.bell-dot { width: 8px; height: 8px; border-radius: 4px; margin-top: 6px; flex: none; background: transparent; }
.bell-list li.unread .bell-dot { background: var(--wbg-blaze-orange); }
.bell-title { font-size: 14px; line-height: 1.3; }
.bell-list li.unread .bell-title { font-weight: 600; }
.bell-body { font-size: 13px; color: var(--sec); line-height: 1.35; }
.bell-time { font-size: 12px; color: var(--ter); }
.bell-read { flex: none; min-width: 36px; min-height: 36px; margin: 6px 4px 0 0; border-radius: 8px; border: 0; background: none; color: var(--ter); cursor: pointer; display: inline-grid; place-items: center; }
.bell-read:hover { color: var(--wbg-rich-bronze); background: var(--card); }
.bell-empty { padding: 18px 12px; color: var(--sec); }
.bell-push { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: .5px solid var(--sep); background: var(--warm, var(--fill)); }
.bell-foot { border-top: .5px solid var(--sep); padding: 10px 16px; text-align: center; font-size: 14px; }
.bell-foot a { color: var(--wbg-rich-bronze); font-weight: 600; }
@media (max-width: 600px) {
  .bell-panel { position: fixed; left: 12px; right: 12px; top: calc(56px + env(safe-area-inset-top)); width: auto; max-width: none; }
}
