@font-face { font-family: Diatype; src: url('assets/diatype.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: DiatypeMono; src: url('assets/diatype-mono.otf') format('opentype'); font-weight: 400; font-display: swap; }

:root {
  --paper: #fbfbfb;
  --white: #fff;
  --rail: #f7f7f7;
  --ink: #313131;
  --muted: #686868;
  --line: #e0e0e0;
  --accent: #5e5e5e;
  --wash: #ededed;
  --rect-button-radius: 3px;
  --compact-radius: 5px;
  --surface-radius: 8px;
  --message-radius: 10px;
  --message-corner: 4px;
  --chart-ink: #45413e;
  --chart-accent: #a05b41;
  --chart-tick: #b2a99f;
  --chart-surface: #f5f4f2;
  --sidebar: 218px;
  --sans: Diatype, Arial, sans-serif;
  --mono: DiatypeMono, monospace;
  font: 400 15px/1.4 var(--sans);
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body,h1,h2,h3,p,dl,dd { margin: 0; }
button,input,select,textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
:is(a,button,input,select,textarea,summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
details > summary { display: flex; align-items: center; gap: 6px; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary > .icon { width: 14px; height: 14px; }
details[open] > summary > .icon { transform: rotate(180deg); }
[hidden] { display: none !important; }
.skip { position: fixed; z-index: 9; top: 8px; left: 10px; padding: 9px; background: var(--white); transform: translateY(-160%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 19px; height: 19px; flex: none; display: block; }
.checklist .icon { width: 16px; height: 16px; }
.thread>.mobile-only .icon { width: 16px; height: 16px; margin-inline-end: 4px; }
.icon-button { display: grid; place-items: center; border: 0; background: transparent; width: 38px; height: 38px; border-radius: 50%; }
.icon-button:hover { background: var(--wash); }

.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100svh; }
.shell.collapsed { --sidebar: 69px; }
.sidebar {
  height: 100svh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--rail);
  padding: 24px 15px 19px;
}
.brand { display: flex; align-items: center; gap: 10px; margin: 0 1px 24px; padding-left: 4px; }
.logo { background: #4d4d4d; border-radius: 50%; display: inline-block; width: 30px; height: 30px; flex: none; }
.brand-name { display: block; flex: none; width: 72px; height: auto; }
.brand-symbol { display: none; }
.brand .icon-button { margin-left: auto; color: var(--muted); }
.sidebar nav,.nav-group { display: grid; gap: 3px; }
.nav-link,.sidebar-foot>a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 11px; color: #4d4d4d; border-radius: 7px; white-space: nowrap; }
.nav-link:hover,.sidebar-foot>a:hover { background: #ebebeb; text-decoration: none; color: var(--ink); }
.nav-link[aria-current=page] { color: #393939; background: #ececec; font-weight: 600; }
.nav-link .badge { margin-left: auto; }
.nav-group + .nav-group { border-top: 1px solid #e8e8e8; margin-top: 11px; padding-top: 13px; }
.sidebar-foot { margin-top: auto; padding-top: 24px; }
.sidebar-foot .workspace { border-top: 1px solid var(--line); border-radius: 0; margin-top: 9px; padding: 14px 8px 4px; }
.workspace .avatar[data-dock-mark] { background-image: url('assets/dock-secondary.svg'); background-position: center; background-repeat: no-repeat; background-size: 14px auto; }
.workspace strong { font-size: .91rem; font-weight: 600; }
.workspace small { display: block; color: var(--muted); font-size: .74rem; }
.collapsed .brand-name,.collapsed .nav-label,.collapsed .sidebar .badge,.collapsed .workspace>span:nth-child(2) { display: none; }
.collapsed .brand-symbol { display: block; width: 20px; height: 20px; object-fit: contain; }
.collapsed .brand { flex-direction: column; padding: 0; margin-inline: 0; }
.collapsed .brand .icon-button { margin: 0; }
.collapsed .nav-link,.collapsed .sidebar-foot>a { justify-content: center; padding-inline: 0; }

.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 4.6vw, 68px); background: var(--white); }
.crumb,.top-actions { display: flex; align-items: center; gap: 9px; }
.topbar-tools { display: flex; align-items: center; min-width: 0; }
.crumb { font-size: .88rem; font-weight: 550; }
.mobile-logo,.mobile-nav,.mobile-demo { display: none; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ink);
  color: #fff;
  text-decoration: none !important;
  white-space: nowrap;
  font-size: .87rem;
}
.button:hover { background: #4c4c4c; }
.button.outline { background: transparent; border-color: #dddddd; color: var(--ink); }
.button.outline:hover { background: var(--wash); }
.text-button { padding: 0; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.arrow { color: var(--accent); }
.body { min-width: 0; background: var(--canvas); }
main { max-width: 1420px; margin: 0 auto; padding: clamp(25px, 3.1vw, 46px) clamp(20px, 4.6vw, 68px) 64px; }
main:focus { outline: none; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: clamp(25px, 4vw, 47px); }
.page-head p { color: var(--muted); margin-top: 10px; max-width: 56ch; }
h1,h2,h3 { font-weight: 400; }
h1 { font: 490 clamp(1.95rem, 3.15vw, 2.75rem)/1.12 var(--sans); letter-spacing: -.045em; }
h2 { font: 570 1.2rem/1.25 var(--sans); letter-spacing: -.021em; }
h3 { font-size: 1rem; font-weight: 550; }
.muted,small { color: var(--muted); }
.mono { font-size: .79rem; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: var(--compact-radius); color: #4e4e4e; background: var(--wash); white-space: nowrap; font-size: .74rem; line-height: 1.25; }
.tone-green { background: var(--wash); color: #535353; }
.tone-sand { background: var(--wash); color: #535353; }
.tone-clay { background: #eaeaea; color: #4d4d4d; }
.dot { width: 6px; height: 6px; display: inline-block; flex: none; border-radius: 50%; background: currentColor; }
.section-marker { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6f6f6f; margin: 0 5px .15em 0; }

.stack { display: grid; gap: clamp(24px, 4.2vw, 54px); }
.grid { display: grid; gap: 13px; }
.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.four { grid-template-columns: repeat(4,minmax(0,1fr)); }
.panel { min-width: 0; }
.panel-head,.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.panel-head>a,.section-head>a { font-size: .82rem; white-space: nowrap; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.row { display: flex; align-items: center; gap: 11px; min-height: 65px; padding: 12px 0; border-top: 1px solid var(--line); }
.row>div:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row small { display: block; margin-top: 3px; }
.row small:empty { display: none; }
.row-icon,.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--wash); flex: none; color: var(--accent); }
.avatar { border-radius: 50%; font-size: .77rem; }
.avatar.tone-sand { background: var(--wash); color: #535353; }
.customer-avatar.blue { background: #dceaf4; color: #284862; }
.customer-avatar.sage { background: #dcebe1; color: #2f523f; }
.customer-avatar.apricot { background: #f5e4d5; color: #68452f; }
.customer-avatar.lilac { background: #ebe3f3; color: #59446c; }

.detail-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); align-items: start; gap: clamp(24px, 4vw, 58px); }
.metric-value { display: block; color: var(--ink); font: 460 clamp(1.7rem, 3vw, 2.6rem)/1.08 var(--sans); letter-spacing: -.055em; margin: 8px 0 4px; font-variant-numeric: lining-nums tabular-nums; }
.channel header,.channel footer { display: flex; justify-content: space-between; align-items: center; gap: 6px; }

.report-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: #f9f9f9; border-radius: 10px; }
.report-summary>div { padding: clamp(13px, 2.6vw, 25px); min-width: 0; }
.report-summary>div+div { border-left: 1px solid #e3e3e3; }
.report-chart { display: grid; grid-template-columns: 28px minmax(0,1fr); }
.report-ticks { display: flex; flex-direction: column; justify-content: space-between; align-items: end; padding-right: 7px; color: var(--muted); font-size: .72rem; line-height: 1; }
.chart {
  display: flex;
  align-items: end;
  gap: clamp(5px,1.3vw,15px);
  height: 156px;
  padding: 0 6px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 50%);
}
.bars { flex: 1; max-width: 76px; display: flex; flex-direction: column-reverse; align-items: stretch; height: 100%; }
.bars i { width: 100%; flex-shrink: 0; background: #7d7d7d; }
.bars i+i { background: #d7d7d7; }
.chart[data-report="ai"] .bars i:nth-child(2),.chart[data-report="team"] .bars i:first-child { display: none; }
.chart-labels { display: flex; justify-content: space-between; margin: 6px 0 0 28px; }
.legend,.legend span { display: flex; align-items: center; gap: 6px; }
.legend { flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: .8rem; }
.legend .dot.ai { color: #7d7d7d; }
.legend .dot.team { color: #d7d7d7; }
.report-data { margin-top: 13px; font-size: .83rem; }
.report-data .table-shell { margin-top: 10px; }
main[data-page=analytics] .chart { height: clamp(144px, 17vw, 225px); }

.filters,.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filters { margin-bottom: 14px; }
.field,input,select,textarea { background: var(--white); border: 1px solid #dddddd; border-radius: 6px; padding: 8px 10px; min-height: 39px; max-width: 100%; }
textarea { width: 100%; field-sizing: content; overflow-y: auto; resize: none; }
.form-grid { display: grid; gap: 13px; }
.form-grid label { display: grid; gap: 5px; }
.form-grid .actions { margin-top: 4px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 8px; }
.checklist input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 4px;
}
.checklist input[type="checkbox"]:checked { background: var(--ink); border-color: var(--ink); }
@media (forced-colors: active) {
  .checklist input[type="checkbox"]:checked { forced-color-adjust: none; background: Highlight; border-color: Highlight; }
}
.collection-toolbar { padding: 0 0 14px; margin-bottom: 0; gap: 10px; }
.collection-count { color: var(--muted); font-size: .81rem; margin-left: auto; }
.search-field {
  display: flex;
  flex: 0 1 20rem;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  min-width: 0;
  padding-inline: 13px 4px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px #d6d6d6;
}
.search-field:hover { box-shadow: inset 0 0 0 1px #a8a8a8; }
.search-field:focus-within { box-shadow: inset 0 0 0 1px var(--accent); }
.search-field:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-field .icon { width: 17px; height: 17px; color: var(--muted); }
.search-field input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
}
.search-field input:focus { outline: none; }
.search-field input::placeholder { color: var(--muted); opacity: 1; }
.search-submit {
  flex: none;
  min-height: 32px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--wash);
  font-size: .87rem;
}
.search-submit:hover { background: var(--ink); color: var(--white); }
.collection-empty { padding: 16px 0; }
.table-shell { overflow: auto; border: 1px solid var(--line); background: var(--white); border-radius: 9px; }
.table { width: 100%; border-collapse: collapse; text-align: left; font-size: .87rem; }
.table th,.table td { padding: 13px clamp(8px,1.4vw,18px); border-bottom: 1px solid var(--line); font-weight: 400; }
.table th { color: var(--muted); background: #f8f8f8; font-size: .82rem; font-weight: 550; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #f9f9f9; }
.table td a { text-decoration: underline; text-underline-offset: 3px; }
.table td .table-person { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.table-person span:last-child { font-weight: 550; }
.order-number { color: var(--ink); font-size: .97rem; font-variant-numeric: tabular-nums; }
.order-product { display: flex; align-items: center; gap: 12px; }
.order-product-copy { min-width: 0; }
.order-product-image { flex: none; width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--line); }
.order-product-name { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.order-placed-date { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; }
.order-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
main[data-page="orders"] .table :is(th,td):nth-child(n+3) { text-align: end; }
.table-note { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.table td strong { font-weight: 550; }
.empty { padding: 22px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 5px; }
.empty p { color: var(--muted); margin-top: 5px; }
.empty .button { margin-top: 12px; }

.inbox { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(0,1.55fr) minmax(145px,.7fr); background: var(--white); border: 1px solid var(--line); min-height: 525px; border-radius: 0 0 6px 6px; }
.inbox-list,.thread { border-right: 1px solid var(--line); }
.pane-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  position: sticky; top: 0; z-index: 1;
  font: 400 .86rem/1.4 var(--sans); letter-spacing: 0; padding: 15px clamp(15px,1.6vw,22px);
  background: #f8f8f8; border-bottom: 1px solid var(--line);
}
.pane-label span { color: var(--muted); font: .76rem/1.2 var(--mono); }
.inbox-item {
  display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 11px;
  padding: 17px clamp(15px,1.6vw,22px); border-bottom: 1px solid var(--line); overflow-wrap: anywhere;
}
.inbox-item .avatar { width: 30px; height: 30px; margin-top: 1px; }
.inbox-item-body { min-width: 0; }
.inbox-item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; margin-block: 4px 7px; }
.inbox-item:hover { background: #f8f8f8; text-decoration: none; }
.inbox-item[aria-current=true] { background: #f1f1f1; box-shadow: inset 2px 0 #787878; }
.inbox-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 7px; }
.inbox-meta strong { font-weight: 600; }
.inbox-meta small { flex: none; white-space: nowrap; }
.inbox-subject { font-size: .95rem; line-height: 1.35; }
.inbox-channel { display: flex; align-items: center; gap: 4px; }
.inbox-channel .icon { width: 13px; height: 13px; }
.inbox-item .badge { padding: 3px 6px; font-size: .68rem; }
.inbox-clear-search { flex: none; width: 32px; height: 32px; }
.inbox-clear-search .icon { width: 14px; height: 14px; }
.thread,.context { min-width: 0; padding: clamp(18px,2.25vw,32px); }
.thread>.mobile-only { margin-bottom: 12px; }
.thread-heading { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.thread-heading:not(:has(.actions)) { padding-bottom: 14px; }
.thread-heading-main { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.thread-heading-main > div { min-width: 0; overflow-wrap: anywhere; }
.thread-heading-main :is(h1,h2) { font-size: 1.23rem; line-height: 1.2; }
#inbox-thread-title:focus { outline: none; }
.thread-heading-main p { font-size: .83rem; margin-top: 5px; }
.inbox-ticket-link { text-decoration: underline; text-underline-offset: 2px; }
.thread-heading-main .inbox-details-button { display: none; }
.thread .actions { margin: 15px 0 18px; }
.thread #note-form { padding-top: 5px; gap: 9px; }
.inbox-note-composer { flex: none; border-top: 1px solid var(--line); }
.inbox-note-composer > summary,.inbox-case-summary > summary { cursor: pointer; width: fit-content; min-height: 42px; color: var(--muted); }
.inbox-note-composer > summary:hover,.inbox-case-summary > summary:hover { color: var(--ink); }
.inbox-note-composer[open] > summary .icon { transform: rotate(45deg); }
.inbox-case-summary { min-width: 0; margin-block: 0; color: var(--muted); }
.inbox-case-summary summary { min-height: 36px; font-size: .84rem; }
.inbox-case-summary p { max-width: 56ch; padding: 0 8px 8px 20px; font-size: .85rem; line-height: 1.5; }
.inbox-note-actions { display: flex; justify-content: flex-end; }
.messages { display: grid; gap: 9px; min-height: 150px; align-content: start; margin: 15px 0 20px; }
.message { padding: 11px 12px; background: #f6f6f6; border-radius: 6px; overflow-wrap: anywhere; }
.message.agent { background: #f1f1f1; }
.message small { display: block; margin-bottom: 4px; }
.context { background: #fafafa; }
.context-person { display: flex; align-items: center; gap: 8px; margin: 15px 0; }
.context dl,.detail-list { display: grid; gap: 12px; }
.context dt,.detail-list dt { font-size: .79rem; color: var(--muted); margin-bottom: 2px; }
.inbox-customer-facts { display: grid; gap: 0; }
.inbox-customer-facts > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding-block: 9px; border-top: 1px solid var(--line);
}
.inbox-customer-facts dt { font-size: .8rem; color: var(--muted); }
.inbox-customer-facts dd { min-width: 0; text-align: end; overflow-wrap: anywhere; }
.mobile-only { display: none; }

.agent-preview { display: flex; align-items: start; gap: 9px; padding: 17px; margin-bottom: 14px; border-radius: 5px; background: var(--wash); }
.agent-preview .logo { width: 20px; height: 20px; }
.settings-form { max-width: 480px; }
.setup-layout { display: grid; grid-template-columns: minmax(140px,.35fr) minmax(0,1fr); gap: clamp(20px,5vw,52px); align-items: start; }
.view-switch { display: inline-flex; align-items: center; flex: none; gap: 3px; }
.view-switch button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 9px;
  color: var(--muted); background: transparent; border: 0; border-radius: 6px; font-size: .82rem;
}
.view-switch button .icon { width: 14px; height: 14px; }
.view-switch button:is(:hover,[aria-pressed="true"]) { color: var(--ink); background: var(--wash); }
.source-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding-top: 12px; }
.source-card { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 17px; min-width: 0; overflow-wrap: anywhere; }
.source-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--wash); padding: 12px; min-height: 64px; margin-bottom: 14px; border-radius: 3px; }
.source-card:nth-child(even) .source-card-top { background: var(--wash); }
.source-card p { color: var(--muted); margin-top: 6px; }
.source-card .button { margin-top: 12px; }
.setup-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.setup-steps li { display: flex; align-items: center; gap: 8px; min-height: 42px; color: var(--muted); }
.setup-steps li[aria-current=step] { color: var(--ink); font-weight: 600; }
.setup-step-number { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border: 1px solid var(--line); border-radius: 50%; font-size: .75rem; }
.setup-steps li[aria-current=step] .setup-step-number { border-color: #c4c4c4; background: var(--wash); }
.setup-steps li[data-complete] .setup-step-number { border-color: transparent; background: var(--ink); color: var(--white); }
.setup-card { background: var(--white); border-radius: 5px; border: 1px solid var(--line); padding: clamp(17px,3vw,30px); }
.setup-card h2 { margin-bottom: 17px; }
.setup-card>.button { margin-top: 12px; }

main[data-page="assistant"] { --assistant-bottom: 18px; padding-bottom: var(--assistant-bottom); }
.assistant-view {
  width: min(100%, 720px);
  height: calc(100dvh - 55px - var(--page-top) - var(--assistant-bottom));
  min-height: 435px;
  margin-inline: auto;
}
.assistant-conversation { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.assistant-heading {
  display: flex; flex: none; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 2px 4px 12px;
}
.assistant-heading h1 {
  min-width: 0;
  flex: 1 1 180px;
  font: 400 clamp(1.42rem, 2.1vw, 1.78rem)/1.15 var(--sans);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.assistant-empty { display: grid; justify-items: center; gap: 12px; margin-block: auto; padding: 22px 0; text-align: center; }
.assistant-empty h2 { font-size: clamp(1.2rem, 2.6vw, 1.62rem); }
.assistant-chat-groups {
  flex: none; min-width: 0; max-height: min(290px,36dvh); overflow-y: auto;
  margin: 9px 0 7px; padding: 7px; border-radius: 8px; background: var(--paper);
  scrollbar-width: thin;
}
.assistant-chat-section-head {
  padding: 4px 8px; color: var(--muted); font-size: .82rem;
}
.assistant-chat-groups nav { display: grid; gap: 2px; padding: 2px; }
.assistant-view-actions { display: flex; align-items: center; gap: 3px; margin-inline-start: auto; }
.assistant-view-actions .icon-button { border-radius: 7px; color: var(--muted); }
.assistant-view-actions .icon-button .icon { width: 17px; height: 17px; }
.assistant-view-actions [aria-expanded="true"] { color: var(--ink); background: var(--wash); }
.assistant-chat-groups p { padding: 6px 8px; font-size: .83rem; }
.assistant-chat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-radius: 7px;
}
.assistant-chat-row:is(:hover,:focus-within,:has([aria-current="true"])) { background: var(--wash); }
.assistant-chat-item {
  border: 0;
  border-radius: 7px;
  background: transparent;
  min-height: 38px;
  min-width: 0;
  padding: 7px 3px 7px 9px;
  text-align: start;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  font-size: .86rem;
  line-height: 1.25;
}
.assistant-chat-item:focus-visible,.assistant-chat-options:focus-visible { outline-offset: -2px; }
.assistant-chat-options { width: 32px; height: 32px; margin-inline-end: 2px; color: var(--muted); }
.assistant-chat-options:hover,.assistant-chat-row:has(:popover-open) .assistant-chat-options { background: #e2e2e2; color: var(--ink); }
.assistant-chat-menu,.ticket-action-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 150px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 5px 16px #2020201c;
}
:is(.assistant-chat-menu,.ticket-action-menu)[data-above] { transform: translateY(-100%); }
:is(.assistant-chat-menu,.ticket-action-menu) button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: .87rem;
}
:is(.assistant-chat-menu,.ticket-action-menu) button:hover { background: var(--wash); }
:is(.assistant-chat-menu,.ticket-action-menu) button:focus-visible { outline-offset: -2px; }
:is(.assistant-chat-menu,.ticket-action-menu) .icon { width: 15px; height: 15px; }
.assistant-chat-menu .assistant-danger,.ticket-action-menu .ticket-danger { color: #963044; }
@media(hover:hover) and (pointer:fine) {
  .assistant-chat-row:not(:hover,:focus-within,:has(:popover-open)) .assistant-chat-options { opacity: 0; }
}
.assistant-archive { margin-top: 5px; }
.assistant-archive > summary {
  min-height: 34px; justify-content: space-between; padding: 5px 8px;
  border-radius: 7px; color: var(--muted); font-size: .83rem; cursor: pointer;
}
.assistant-archive > summary:hover { background: var(--wash); color: var(--ink); }
.assistant-archive > summary > span { display: flex; align-items: center; gap: 7px; }
.assistant-archive > summary > span > .icon { width: 15px; height: 15px; }
.assistant-delete-actions { justify-content: flex-end; margin-top: 16px; }
.assistant-composer { flex: none; min-width: 0; }
.assistant-composer form { display: flex; gap: 8px; padding: 6px; background: var(--white); border: 1px solid #e2e2e2; border-radius: 7px; }
.assistant-composer form:focus-within { border-color: var(--accent); }
.assistant-composer input { flex: 1; min-width: 0; border: 0; background: transparent; }
.assistant-composer input:focus { outline: none; }
.assistant-composer form button { min-width: 42px; padding-inline: 0; font-size: 1.16rem; }
.assistant-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.assistant-prompts .button { min-height: 40px; padding: 7px 12px; border-radius: var(--rect-button-radius); font-size: .83rem; }
.assistant-note { flex: none; font-size: .78rem; margin-top: 8px; }
.assistant-result .button { margin-top: 10px; }

dialog { width: min(520px,calc(100vw - 32px)); max-height: 85svh; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--white); padding: 21px; }
dialog::backdrop { background: #26262666; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dialog-head button { font-size: 1.4rem; }
.dialog-links { display: grid; gap: 5px; }
.dialog-links a { padding: 9px; border-bottom: 1px solid var(--line); }
#toast { position: fixed; z-index: 6; right: 18px; bottom: 18px; max-width: calc(100% - 36px); background: var(--ink); color: #fff; border-radius: 6px; padding: 10px 13px; }

@media(max-width:1120px) {
  .inbox { grid-template-columns: minmax(155px,.73fr) minmax(0,1.4fr); }
  .context { grid-column: 2; border-top: 1px solid var(--line); }
  .thread { border-right: 0; }
  .inbox-list { grid-row: span 2; }
}

@media(max-width:820px) {
  .shell,.shell.collapsed { grid-template-columns: minmax(0,1fr); }
  .sidebar { display: none; }
  .mobile-logo { display: inline-block; flex: none; width: 20px; height: 20px; object-fit: contain; }
  .mobile-demo { display: block; font-size: .68rem; line-height: 1.15; }
  .mobile-nav {
    position: fixed; bottom: 0; inset-inline: 0; z-index: 3;
    display: grid; grid-template-columns: repeat(4,1fr);
    padding: 5px 8px max(5px,env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--paper);
  }
  .mobile-nav a,.mobile-nav button { display: grid; place-items: center; gap: 2px; min-height: 48px; background: transparent; border: 0; border-radius: 5px; font-size: .76rem; }
  .mobile-nav [aria-current=page] { background: var(--wash); color: var(--accent); }
  main { padding-bottom: 88px; }
  #toast { bottom: 74px; }
}
@media(max-width:620px) {
  .topbar { height: 60px; padding-inline: 13px; }
  .top-actions { gap: 2px; }
  .top-actions .icon-button { width: 33px; }
  .top-actions .button { font-size: .77rem; padding-inline: 8px; }
  main { padding-inline: 15px; }
  .page-head { align-items: start; flex-wrap: wrap; gap: 10px; }
  .page-head p { margin-top: 7px; }
  .four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .three,.detail-grid,.setup-layout,.source-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .table-person .avatar { display: none; }
  .table td .button { padding-inline: 6px; white-space: normal; text-align: center; }
  .search-field { flex-basis: 100%; }
  .search-field:has(.search-submit) { padding-block: 4px; }
  .search-field input { font-size: 16px; }
  .search-submit { min-height: 44px; }
  .collection-count { margin-left: 0; }
  .report-summary>div { padding-inline: 8px; }
  .report-summary p { font-size: .8rem; }
  .inbox { display: block; min-height: 0; }
  .inbox:not(.thread-open) :is(.thread,.context),.inbox.thread-open .inbox-list { display: none; }
  .mobile-only { display: inline-block; }
  .section-tabs a,.view-switch button,.assistant-prompts .button { min-height: 44px; }
  .section-tabs { gap: 0 12px; }
  .setup-steps { gap: 2px; }
  .setup-steps li { min-height: 36px; }
}

.inbox-total { color: var(--accent); font-size: .9rem; }
.assistant-page-composer { text-align: center; }
.assistant-view .assistant-note { text-align: center; }
.assistant-thread { position: relative; display: flex; flex: 1; min-height: 0; margin-bottom: 10px; }
.assistant-history {
  flex: 1; min-width: 0; display: grid; align-content: start; gap: 24px;
  padding: 18px 6px 16px; overflow: auto; scrollbar-width: thin;
}
.assistant-history:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.assistant-latest.outline {
  position: absolute; z-index: 1; inset-inline-start: 50%; bottom: 4px;
  transform: translateX(-50%); background: var(--white); box-shadow: 0 2px 8px #20202014;
}
.assistant-result { display: grid; gap: 14px; }
.assistant-question {
  justify-self: end; max-width: 84%; padding: 9px 13px; border-radius: var(--message-radius) var(--message-radius) var(--message-corner) var(--message-radius);
  background: var(--wash); color: var(--ink); overflow-wrap: anywhere;
}
.assistant-question > p { white-space: pre-wrap; }
.assistant-sent-files,.assistant-draft-files { list-style: none; margin: 0; padding: 0; }
.assistant-sent-files { display: grid; gap: 6px; }
.assistant-question > p + .assistant-sent-files { margin-top: 8px; }
.assistant-sent-file { min-width: 0; border-radius: 8px; background: var(--white); padding: 6px; }
.assistant-sent-file :is(img,video) {
  display: block; width: min(100%, 300px); aspect-ratio: 16 / 10;
  object-fit: contain; border-radius: 4px; background: var(--wash);
}
.assistant-sent-file audio { display: block; width: min(100%, 300px); height: 42px; }
.assistant-file-download {
  display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 4px;
  font-size: .84rem;
}
.assistant-file-download strong { display: block; font-weight: 400; }
.assistant-file-download .icon,.assistant-draft-files .icon { width: 15px; height: 15px; color: var(--muted); }
.assistant-file-download small,.assistant-draft-files small { display: block; font-size: .73rem; }
.assistant-voice-tag { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; color: var(--muted); font-size: .74rem; }
.assistant-voice-tag .icon { width: 12px; height: 12px; }
.assistant-response {
  justify-self: start; max-width: min(100%, 62ch); display: grid;
  grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: start;
  overflow-wrap: anywhere; line-height: 1.55;
}
.assistant-avatar {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--wash); color: var(--ink);
}
.assistant-avatar .icon { width: 16px; height: 16px; }
.assistant-empty .assistant-avatar { width: 42px; height: 42px; border-radius: 11px; }
.assistant-empty .assistant-avatar .icon { width: 21px; height: 21px; }
.assistant-result h3 { margin: 4px 0 3px; font-size: .89rem; }

.nav-shortcuts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-bottom: 14px; }
.nav-shortcuts .nav-link {
  position: relative; align-items: flex-start; justify-content: center; flex-direction: column;
  min-height: 65px; padding: 9px 10px; gap: 5px; border: 1px solid #e8e8e8; background: #ededed; border-radius: 9px;
}
.nav-shortcuts .nav-link[aria-current=page] { border-color: #676767; background: #e9e9e9; }
.nav-shortcuts .badge { position: absolute; top: 6px; right: 6px; }
.collapsed .nav-shortcuts { grid-template-columns: minmax(0,1fr); }
.collapsed .nav-shortcuts .nav-link { align-items: center; min-height: 41px; padding: 0; }
.assistant-page-composer form {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end;
  padding: 14px 14px 12px; gap: 8px; border-radius: var(--surface-radius);
}
.assistant-page-composer textarea {
  grid-column: 1 / -1; max-height: 126px;
  padding: 7px 4px; border: 0; background: transparent;
}
.assistant-page-composer textarea:focus { outline: none; }
.assistant-tools { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 6px; }
.assistant-tools .assistant-attach { width: var(--control-height); flex: none; }
.assistant-tools .assistant-attach .icon { width: 19px; height: 19px; }
.assistant-draft-files {
  grid-column: 1 / -1; display: flex; gap: 6px; overflow-x: auto;
  padding-bottom: 3px; text-align: start;
}
.assistant-draft-files li {
  display: flex; flex: none; align-items: center; gap: 7px; min-width: 0; max-width: 100%;
  padding: 4px 4px 4px 8px; background: var(--wash); border-radius: 8px; font-size: .8rem;
}
.assistant-draft-files li > span { min-width: 0; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-draft-files img { flex: none; width: 30px; height: 30px; border-radius: 4px; object-fit: cover; }
.assistant-draft-files .assistant-remove-file { min-width: 30px; width: 30px; height: 30px; flex: none; }
.assistant-file-status { grid-column: 1 / -1; color: var(--muted); text-align: start; font-size: .8rem; }
.assistant-tools .assistant-send { width: var(--control-height); min-height: var(--control-height); }
.assistant-tools .assistant-send:disabled { background: var(--wash); color: var(--muted); opacity: 1; }
#assistant-voice { min-height: var(--control-height); padding-inline: 12px; font-size: .84rem; }
#assistant-voice .icon { width: 16px; height: 16px; }
.assistant-voice-status { flex: 1 1 110px; color: var(--muted); font-size: .8rem; text-align: start; }
.assistant-voice-status:empty { flex-basis: 0; }
.assistant-page-composer form[data-voice-open] {
  padding: clamp(20px, 4vw, 32px) 12px 18px;
  scroll-margin-block-end: 76px;
}
[data-voice-open] :is(#assistant-question,#assistant-voice,.assistant-send,.assistant-attach,.assistant-draft-files,.assistant-file-status),
.assistant-conversation:has(form[data-voice-open]) .assistant-empty { display: none; }
.assistant-view:has(form[data-voice-open]) { min-height: 520px; }
.assistant-conversation:has(.assistant-thread[hidden]) .assistant-composer:has(form[data-voice-open]) { margin-block: auto; }
.assistant-voice-stage {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 11px;
  animation: assistant-voice-enter 230ms ease-out both;
}
.assistant-voice-stage .home-agent-orb { width: clamp(138px, 26vw, 190px); }
.assistant-call-timer {
  color: var(--muted);
  font: .86rem/1.4 var(--mono);
  font-variant-numeric: tabular-nums;
}
.assistant-voice-stage h2 { font-size: 1.18rem; line-height: 1.2; }
.assistant-voice-stage[data-phase="speaking"] .home-agent-orb { animation: assistant-orb-speak 730ms ease-in-out infinite; }
[data-voice-open] .assistant-tools { justify-content: center; }
[data-voice-open] .assistant-voice-status { flex: 1 0 100%; text-align: center; min-height: 1.2em; margin-bottom: 4px; }
.assistant-mute[aria-pressed="true"] { background: var(--wash); border-color: var(--ink); }
@keyframes assistant-voice-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes assistant-orb-speak {
  0%,100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-2px) scale(1.028); }
}

/* Workspace start and queue */
.home-view { max-width: 1060px; margin: 0 auto; }

.home-queue .section-head { margin-bottom: 9px; }
.queue-entry {
  display: grid; grid-template-columns: 22px minmax(0,1fr) auto;
  align-items: center; gap: 11px; min-height: 61px;
  padding: 9px 10px 9px 4px; border-bottom: 1px solid var(--line);
}
.queue-entry:hover { background: #f6f6f6; text-decoration: none; }
.queue-entry strong,.queue-entry small { display: block; }
.queue-entry strong { font-weight: 580; }
.queue-entry small { margin-top: 2px; }
.queue-action { font-size: .81rem; }
.queue-action span { margin-left: 3px; }

.collection-toolbar { border: 0; }
.collection-toolbar select { border-radius: 18px; }
.empty { background: transparent; border: 0; padding-block: 30px; }
.source-card-top { min-height: 85px; }
@media(max-width:620px) {
  .report-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-summary>div:nth-child(3) { border-left: 0; }
  .report-summary>div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section-tabs a,.queue-entry { min-height: 44px; }
}

.home-sections { display: grid; gap: clamp(28px, 4.2vw, 54px); }
.home-sections .section-head { align-items: center; }
.home-metrics,.home-channels { display: grid; border-block: 1px solid var(--line); }
.home-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.home-channels { grid-template-columns: repeat(3,minmax(0,1fr)); }
.home-metrics>a,.home-channel { min-width: 0; padding: 17px clamp(10px,2vw,24px); }
.home-metrics>a:first-child,.home-channel:first-child { padding-inline-start: 4px; }
.home-metrics>a+a,.home-channel+.home-channel { border-inline-start: 1px solid var(--line); }
.home-metrics>a:hover,.home-channel:hover { background: #f8f8f8; text-decoration: none; }
.home-metrics>a>span { color: var(--muted); }
.home-channel { display: grid; gap: 5px; }
.home-channel .icon { margin-bottom: 3px; }
.channel-state { margin-top: 4px; font-size: .78rem; }
@media(max-width:620px) {
  .home-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-metrics>a:nth-child(3) { border-inline-start: 0; padding-inline-start: 4px; }
  .home-metrics>a:nth-child(n+3) { border-top: 1px solid var(--line); }
  .home-channels { grid-template-columns: minmax(0,1fr); }
  .home-channel,.home-channel:first-child { padding-inline: 4px; }
  .home-channel+.home-channel { border-inline-start: 0; border-top: 1px solid var(--line); }
}

.home-header { align-items: center; }
.home-header .actions { column-gap: 15px; }
.home-agent {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white);
  padding: 3px 13px 3px 4px; white-space: nowrap; font-size: .88rem;
}
.home-agent:hover { background: #f6f6f6; }
.home-agent-orb { position: relative; overflow: hidden; width: 35px; height: 35px; flex: none; border-radius: 50%; }
.home-agent-orb img { display: block; width: 100%; height: 100%; }
.home-agent-orb canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-agent-orb[data-fluid="true"] img { visibility: hidden; }


/* Warm workspace, muted group well, white task surface. */
:root { --canvas: #fbfbfb; --group: #ededed; --active: #ececec; --review: #76658c; --waiting: #a64f54; }
.sidebar { background: var(--rail); border-right: 1px solid var(--line); }
.topbar { height: 55px; background: transparent; border-bottom: 1px solid var(--line); }
main { padding-top: clamp(22px, 3vw, 40px); }
.nav-link[aria-current=page] { background: var(--active); }
.nav-shortcuts .nav-link { background: var(--canvas); border-color: var(--line); }
.nav-shortcuts .nav-link[aria-current=page] { border-color: #b8b8b8; background: var(--active); }
.page-head { margin-bottom: 24px; }
h1 { font-size: clamp(1.65rem, 2.7vw, 2.25rem); letter-spacing: -.035em; }
.table-shell,.inbox,.setup-card,.source-card { border-color: var(--line); box-shadow: 0 1px 2px #29292908; border-radius: var(--surface-radius); }
.table th,.pane-label,.source-card-top { background: var(--group); }
.context,.agent-preview,.channel-preview,.report-summary { background: #ededed; }
.inbox-item[aria-current=true] { background: #ededed; box-shadow: inset 2px 0 var(--review); }
.tone-sand { background: #f5e8eb; color: #7e3843; }
.tone-green { background: #e6efea; color: #38594a; }
.tone-clay { background: #eeebf5; color: #594b70; }
.legend .dot.ai,.bars i { color: #6a8092; background: #6a8092; }
.legend .dot.team,.bars i+i { color: #cdd9e2; background: #cdd9e2; }
.home-sections { gap: clamp(17px, 2.4vw, 29px); }
.home-shelf { min-width: 0; padding: 8px; border-radius: 12px; background: var(--group); }
.home-shelf .section-head { padding: 3px 7px 7px; margin: 0 !important; }
.home-shelf .section-head h2 { font-size: 1rem; letter-spacing: -.015em; }
.home-shelf .section-head>a { font-size: .78rem; color: var(--muted); text-decoration: none; }
.home-shelf .section-head>a:hover { text-decoration: underline; }
.section-count { margin-inline-start: 4px; color: var(--muted); font-size: .85rem; font-weight: 400; }
.shelf-body { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: 8px; overflow: clip; }
.home-queue .shelf-body { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; background: transparent; border: 0; overflow: visible; }
.home-queue .shelf-body .empty { grid-column: 1 / -1; background: var(--white); }
.home-queue .queue-entry { background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 2px #2929290c; }
.home-shelf .queue-entry { padding-inline: 12px; }
.home-shelf .queue-entry:last-child { border-bottom-color: transparent; }
.home-queue .queue-entry:last-child { border-bottom-color: var(--line); }
.home-shelf .queue-entry:hover { background: #f8f8f8; }
.work-status { width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; justify-self: center; }
.work-review { color: var(--review); }
.work-waiting { color: var(--waiting); }
.home-metrics>a,.home-metrics>a:first-child { padding: 14px 13px; }
.home-metrics .metric-value { font-size: clamp(1.45rem, 3vw, 2.2rem); margin-top: 6px; }
.home-detail-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: clamp(14px, 2vw, 23px); align-items: start; }
.home-detail-grid .home-channels { grid-template-columns: minmax(0,1fr); }
.home-detail-grid .home-channel { display: grid; grid-template-columns: 21px minmax(0,1fr) auto; gap: 3px 8px; padding: 9px 12px; align-items: center; }
.home-detail-grid .home-channel .icon { grid-row: 1 / 3; margin-bottom: 0; }
.home-detail-grid .home-channel small { grid-column: 2; }
.home-detail-grid .home-channel .channel-state { grid-column: 3; grid-row: 1 / 3; margin: 0; }
.home-detail-grid .home-channel+.home-channel { border-inline-start: 0; border-top: 1px solid var(--line); }
@media(max-width:820px) {
  .home-detail-grid { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:620px) {
  .home-queue .shelf-body { grid-template-columns: minmax(0,1fr); }
  .home-shelf .queue-entry { padding-inline: 8px; }
}

.brand-name,.nav-link[aria-current=page],.workspace strong,h1,h2,h3,.metric-value,
.inbox-meta strong,.queue-entry strong,.table td strong,.table-person span:last-child { font-weight: 400; }
.mono,.badge,.report-ticks,.section-count { font-family: var(--mono); }
.page-head p { color: rgb(47 47 47 / 62%); letter-spacing: .18px; }
.button { background: var(--ink); }
.button:hover { background: #464646; }
.button.outline { border-color: #d6d6d6; color: var(--ink); }
.nav-shortcuts .nav-link { background: transparent; border-color: transparent; }
.nav-shortcuts .nav-link:hover,.nav-shortcuts .nav-link[aria-current=page] { background: var(--active); border-color: transparent; }
.table-shell,.inbox,.setup-card,.source-card { box-shadow: none; }
.table th,.pane-label,.source-card-top,.context,.report-summary { background: #f4f4f4; }
.home-shelf { background: transparent; padding: 0; border-radius: 0; }
.home-shelf .section-head { padding: 0 0 9px; }
.home-shelf .section-head h2 { font-size: 1.09rem; }
.home-queue { background: #f1f1f1; padding: 10px; border-radius: 11px; }
.home-queue .section-head { padding-inline: 4px; }
.home-queue .queue-entry { box-shadow: none; }
.home-detail-grid .shelf-body { background: transparent; border-inline: 0; border-radius: 0; }
.home-detail-grid .queue-entry,.home-detail-grid .home-channel { padding-inline: 4px; }

/* Landing-page rhythm applied to the workspace. */
:root { --rule-dot: #bfbfbf; }
.sidebar .nav-link[aria-current=page] { background: var(--active); color: var(--ink); }
.sidebar .nav-link:not([aria-current]) { color: var(--muted); }
.button:hover { background: #464646; }
.button.outline { border-color: #d6d6d6; }
.table th,.pane-label,.context,.source-card-top,.report-summary { background: #f4f4f4; }
.home-view { max-width: 1140px; }
.home-header { margin-bottom: 27px; }
.home-header h1 { font-size: clamp(1.65rem, 2.8vw, 2.4rem); }
.section-tabs {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 10px clamp(16px, 3.5vw, 42px); padding: 0; margin-bottom: 27px;
}
.section-tabs a {
  display: inline-flex; align-items: center; gap: 9px;
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; padding: 3px 0 8px; color: var(--muted);
  min-height: 43px; text-decoration: none;
}
.section-tabs a:hover { color: var(--ink); }
.section-tabs a[aria-current=page] { color: var(--ink); border-color: var(--ink); background: transparent; }
.section-number {
  display: inline-grid; place-items: center; min-width: 29px; height: 29px;
  border: 1px solid #c8c8c8; border-radius: var(--compact-radius); padding: 0 3px;
  font: .72rem/1 var(--mono);
}
[aria-current]>.section-number { border-color: currentColor; }
.home-sections { gap: clamp(36px, 5.7vw, 76px); }
.home-lead { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,.7fr); gap: clamp(29px, 9vw, 120px); align-items: start; }
.home-queue { padding: 0; background: transparent; }
.home-shelf .section-head,.home-queue .section-head { padding: 0 0 12px; }
.home-queue .shelf-body { display: block; background: transparent; border: 0; }
.home-queue .queue-entry,.home-queue .queue-entry:last-child { border: 0; border-top: 1px solid var(--line); border-radius: var(--surface-radius); background: transparent; padding-inline: 4px; }
.home-queue .queue-entry:hover { background: #f3f3f3; }
.work-status { width: 7px; height: 7px; border: 0; background: currentColor; }
.home-agent-area { min-width: 0; }
.home-agent-area .section-head { margin-bottom: 22px; }
.agent-active { background: #dcecf3; color: var(--ink); }
.home-agent { display: inline-grid; place-items: center; gap: 9px; border: 0; border-radius: 0; background: transparent; padding: 0; }
.home-agent:hover { background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.home-agent-orb { width: clamp(62px, 7vw, 89px); height: auto; aspect-ratio: 1; }
.home-sections>section.home-shelf,.home-detail-grid { padding-top: 19px; background: radial-gradient(circle at 1px 1px,var(--rule-dot) 1px,transparent 1.1px) repeat-x left top / 9px 2px; }
.home-metrics.shelf-body { background: transparent; border: 0; border-radius: 0; }
.home-metrics>a,.home-metrics>a:first-child { padding: 9px 14px 9px 0; }
.home-metrics>a+a { padding-left: 16px; }
.home-detail-grid { gap: clamp(20px, 6vw, 75px); }
@media(max-width:820px) {
  .home-lead { grid-template-columns: minmax(0,1fr); gap: 27px; }
  .home-agent-area .section-head { margin-bottom: 14px; }
}
@media(max-width:620px) {
  .section-tabs { gap: 7px 16px; }
  .section-tabs a { min-height: 44px; }
  .home-metrics>a:nth-child(3) { padding-left: 0; }
  .home-sections { gap: 37px; }
}

/* Enclosed controls and work groups */
:root { --control-fill: #f0f0f0; --enclosure: #e0e0e0; }
.sidebar .nav-link[aria-current=page] { border-radius: 9px; }
.top-actions { gap: 3px; padding: 3px; border: 1px solid var(--enclosure); border-radius: 999px; }
.top-actions .icon-button { width: 34px; height: 34px; }
.top-actions .button { min-height: 34px; padding-block: 4px; }
.collection-toolbar select { border-radius: 99px; padding-inline: 12px; }
.home-shelf,.home-agent-area {
  border: 1px solid var(--enclosure); border-radius: var(--surface-radius); padding: 16px;
  background: var(--paper);
}
.home-sections>section.home-shelf { background: var(--paper); padding: 16px; }
.home-detail-grid { background: none; padding: 0; gap: clamp(15px,3vw,36px); }
.home-queue .queue-entry,.home-queue .queue-entry:last-child {
  border: 1px solid var(--enclosure); border-radius: 9px;
  padding-inline: 9px; margin-top: 6px; background: #f6f6f6;
}
.home-queue .queue-entry:hover { background: var(--control-fill); }
.home-agent { padding: 4px 11px 4px 4px; display: inline-flex; gap: 8px; border: 1px solid var(--enclosure); border-radius: 999px; }
.home-agent:hover { background: var(--control-fill); text-decoration: none; }
.home-agent-orb { width: clamp(37px,5vw,58px); }
.home-agent-area .section-head { margin-bottom: 15px; }
.home-metrics.shelf-body,.home-detail-grid .shelf-body { border: 0; }
.collection-toolbar {
  width: fit-content; max-width: 100%; padding: 0;
  margin-bottom: 12px; background: transparent; border: 0;
}
.collection-toolbar .collection-count { padding-inline: 6px; }
@media(max-width:620px) {
  .section-tabs a { min-height: 44px; }
  .home-shelf,.home-agent-area,.home-sections>section.home-shelf { padding: 12px; }
  .top-actions { gap: 2px; }
}

.home-header { margin-bottom: 16px; }
.home-sections { gap: clamp(17px, 2.5vw, 30px); }
.home-lead { grid-template-columns: minmax(0, 1.85fr) minmax(230px, 1fr); gap: clamp(14px, 2vw, 24px); align-items: stretch; }
.home-detail-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(14px, 2vw, 24px); align-items: start; }
.home-shelf,.home-agent-area,.home-sections>section.home-shelf { padding: clamp(13px, 1.65vw, 21px); }
.home-view .section-head { min-height: 32px; gap: 9px; align-items: center; }
.home-view .section-head .button,.action-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 30px; padding: 4px 10px; border-radius: 999px;
  font: .8rem/1.2 var(--sans); white-space: nowrap;
}
.action-pill { border: 1px solid #d7d7d7; color: var(--ink); background: var(--paper); }
.home-channel:hover .action-pill { background: var(--wash); }
.button.soft,.action-pill.soft { color: var(--ink); background: var(--wash); border-color: transparent; }
.button.soft:hover,.queue-entry:hover .action-pill.soft { background: #e2e2e2; }
.home-queue .queue-entry { min-height: 66px; }
.home-agent-area { display: flex; flex-direction: column; }
.home-agent-profile {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin-block: auto;
  padding-block: 8px 20px;
  text-align: center;
}
.home-agent-profile h3 { font-size: 1.25rem; line-height: 1.2; overflow-wrap: anywhere; }
.home-agent-profile small { display: block; margin-top: 4px; font-size: .84rem; }
.home-agent-profile .home-agent-orb { width: clamp(96px, 9vw, 132px); }
.home-agent-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  width: fit-content;
  margin-inline: auto;
}
.home-agent-actions > .button {
  min-height: 44px;
  padding: 8px 6px;
  border-radius: var(--rect-button-radius);
}
.home-agent-links { grid-column: 1 / -1; justify-self: center; }
.home-agent-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding-inline: 4px;
  color: var(--muted);
  font-size: .83rem;
  text-decoration: underline;
  text-decoration-color: #bebebe;
  text-underline-offset: 4px;
}
.home-agent-links a:is(:hover,:focus-visible) { color: var(--ink); text-decoration-color: currentColor; }
.home-detail-grid .home-channel { grid-template-columns: 21px minmax(0,1fr) auto; padding-block: 10px; }
.home-detail-grid .home-channel .icon { grid-row: 1 / 4; }
.home-detail-grid .home-channel .channel-state { grid-column: 2; grid-row: 3; color: var(--muted); }
.home-channel .action-pill { grid-column: 3; grid-row: 1 / 4; }
.channel-state-dot { display: inline-block; width: 5px; height: 5px; margin-right: 4px; background: #929292; border-radius: 50%; vertical-align: .12em; }
.channel-state-dot[data-active=true] { background: #4f7965; }
@media(max-width:820px){
  .home-lead,.home-detail-grid { grid-template-columns: minmax(0,1fr); }
}

.home-header { margin-bottom: clamp(25px, 4vw, 43px); }
.home-detail-grid .activity-entry { grid-template-columns: minmax(0,1fr) auto; }
.home-detail-grid .home-channel { grid-template-columns: minmax(0,1fr) auto; }
.home-detail-grid .home-channel small,.home-detail-grid .home-channel .channel-state { grid-column: 1; }
.home-detail-grid .home-channel .action-pill { grid-column: 2; }

/* The Inbox uses the entire workspace under the shared header. */
main[data-page="inbox"] {
  max-width: none;
  padding: 19px clamp(12px, 2vw, 29px) 15px;
}
main[data-page="inbox"] .page-head { margin-bottom: 18px; }
main[data-page="inbox"] .page-head h1 { font-size: clamp(1.55rem, 2.2vw, 2rem); }
main[data-page="inbox"] .page-head p { margin-top: 4px; }
main[data-page="inbox"] .collection-toolbar { margin-bottom: 16px; }
.inbox-toolbar .inbox-filter-toggle { gap: 7px; }
.inbox-filter-toggle .icon { width: 16px; height: 16px; }
.inbox-filter-count { color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
#inbox-extra-filters { display: flex; align-items: center; flex-wrap: wrap; flex: 0 0 100%; gap: 8px; padding-top: 3px; }
#inbox-extra-filters > .dashboard-select { min-width: 112px; }
@media(min-width: 1040px) and (min-height: 620px) {
  main[data-page="inbox"] {
    height: calc(100svh - 55px);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
  }
  main[data-page="inbox"] .inbox {
    min-height: 0;
    grid-template-columns: minmax(215px, .87fr) minmax(0, 2fr) minmax(175px, .8fr);
  }
  main[data-page="inbox"]:has(#activity-calendar:not([hidden])) { height: auto; }
  main[data-page="inbox"]:has(#activity-calendar:not([hidden])) .inbox { min-height: 390px; }
  .inbox .inbox-list,.inbox .thread,.inbox .context { min-height: 0; overflow-y: auto; grid-column: auto; grid-row: auto; }
  .inbox .context { border-top: 0; border-inline-start: 1px solid var(--line); }
  .inbox .thread { border-inline-end: 0; }
  .inbox .thread { display: flex; flex-direction: column; overflow: hidden; }
  .inbox .thread-heading { flex: none; }
  .inbox .messages { min-height: 0; flex: 1 1 auto; overflow-y: auto; margin-block: 0 10px; scrollbar-width: thin; }
}
@media(max-width:1039px) {
  .inbox .context { display: none; }
  .thread-heading-main .inbox-details-button { display: inline-flex; flex: none; }
}
@media(max-width:820px) {
  main[data-page="inbox"] { padding-bottom: 79px; }
}
@media(max-width:620px) {
  main[data-page="inbox"] .inbox { min-height: calc(100svh - 285px); }
}

main[data-page="inbox"] .inbox { overflow: hidden; background-clip: padding-box; }
.dashboard-select { position: relative; display: inline-flex; max-width: 100%; min-width: 0; }
.form-grid label .dashboard-select { width: 100%; }
.dashboard-select-trigger {
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  border: 1px solid #d6d6d6; border-radius: 8px; min-height: 40px; max-width: 100%;
  background: var(--white); padding: 7px 14px 7px 12px; color: var(--ink);
}
.dashboard-select-trigger::after {
  content: ""; width: 7px; height: 7px; flex: none; margin: -4px 2px 0 0;
  border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
}
.dashboard-select-trigger[aria-expanded=true] { border-color: var(--ink); }
.dashboard-select-trigger>span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-grid .dashboard-select-trigger { width: 100%; }
.dashboard-select-list {
  position: fixed; z-index: 10; overflow: auto; overscroll-behavior: contain;
  padding: 4px; border: 1px solid #d7d7d7; border-radius: var(--surface-radius); background: var(--paper);
  box-shadow: 0 5px 14px #31313118;
}
.dashboard-select-list [role=option] { padding: 7px 8px; border-radius: 5px; cursor: pointer; overflow-wrap: anywhere; }
.dashboard-select-list [role=option][data-active],.dashboard-select-list [role=option]:hover { background: #ececec; }
.dashboard-select-list [role=option][aria-selected=true] { background: #e6e6e6; }

.inbox .messages { gap: 22px; padding-block: 6px 14px; }
.conversation-turn { display: grid; gap: 5px; max-width: min(84%, 42ch); }
.conversation-turn small { padding-inline: 5px; font-size: .78rem; }
.conversation-turn p { padding: 10px 13px; line-height: 1.45; overflow-wrap: anywhere; }
.conversation-turn.incoming { justify-self: start; }
.conversation-turn.incoming p { background: #f1f1f1; border-radius: var(--message-radius) var(--message-radius) var(--message-radius) var(--message-corner); }
.conversation-turn.outgoing { justify-self: end; }
.conversation-turn.outgoing small { text-align: end; }
.conversation-turn.outgoing p { background: #dcecf3; border-radius: var(--message-radius) var(--message-radius) var(--message-corner) var(--message-radius); }
.conversation-note { justify-self: center; max-width: min(100%, 45ch); padding: 7px 12px; border-top: 1px solid var(--line); text-align: center; overflow-wrap: anywhere; }
.conversation-note small { font: .68rem/1.3 var(--mono); }
.conversation-note p { color: var(--muted); font-size: .83rem; margin-top: 4px; }
.conversation-note.internal-note {
  justify-self: stretch; max-width: none; border: 0; border-radius: 8px;
  background: #f5f5f5; padding: 9px 12px; text-align: start;
}
@media(max-width:620px) { .conversation-turn { max-width: 88%; } }

.agent-view { --agent-surface: #f5f4f2; --agent-inset: clamp(13px,2vw,22px); max-width: 850px; margin-inline: auto; }
.agent-header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.agent-header-actions .button { min-height: 38px; border-radius: var(--rect-button-radius); }
.agent-header-actions .agent-save-button { min-inline-size: 76px; }
.agent-header-actions .agent-save-button:disabled { color: var(--muted); background: var(--wash); cursor: default; }
.agent-tabs { gap: 8px clamp(17px, 2vw, 27px); margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.agent-tabs a { margin-bottom: -1px; }
.agent-editor { display: grid; gap: clamp(14px,2vw,22px); }
.agent-name-field { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 2px var(--agent-inset) 4px; }
.agent-name-field .agent-field-hint { margin-bottom: 0; }
.agent-editor-section,.agent-permission-group { min-width: 0; padding: var(--agent-inset); border-radius: var(--surface-radius); background: var(--agent-surface); }
.agent-editor-section .agent-fieldset legend,.agent-name-field label { font-size: var(--section-heading); line-height: 1.25; }
.agent-name-field label,.agent-fieldset legend { color: var(--ink); }
.agent-tone-layout { display: grid; gap: 14px; }
.agent-field-hint { display: block; margin: 5px 0 10px; color: var(--muted); font-size: .87rem; }
#agent-name {
  width: min(100%, 310px); min-height: 44px; border-radius: 7px;
  padding-inline: 12px; background: #fff;
}
.agent-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.agent-fieldset legend { padding: 0; }
.agent-tones { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-tones label,.agent-voice-option { position: relative; cursor: pointer; }
.agent-tones span {
  display: grid; place-items: center; min-height: 44px; padding: 5px 13px;
  border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff;
}
.agent-tones label:hover span,.agent-voice-option:hover { border-color: var(--muted); }
.agent-tones input:checked + span { border-color: var(--ink); background: var(--wash); color: var(--ink); }
.agent-tones input:focus-visible + span,.agent-voice-option:has(input[type=radio]:focus-visible) {
  outline: 2px solid var(--ink); outline-offset: 3px;
}
.agent-voices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(6px, 1.3vw, 14px); }
.agent-voice { display: grid; position: relative; isolation: isolate; min-width: 0; }
.agent-voice-option {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  min-width: 0; padding: 43px 5px 13px; border: 1px solid var(--line); border-radius: var(--surface-radius); background: #fff;
}
.agent-voice-option:has(input:checked) { border-color: var(--ink); background: var(--wash); }
.agent-voice-hit { position: absolute; z-index: 1; inset: 0; border-radius: var(--surface-radius); cursor: pointer; }
.agent-voice .home-agent-orb { width: clamp(44px, 6.4vw, 76px); margin-bottom: 5px; }
.agent-voice-name-row { display: grid; place-items: center; width: 100%; min-height: 32px; }
.agent-voice-name-label { position: relative; max-width: calc(100% - 42px); }
.agent-voice-name { display: block; font-size: .94rem; overflow-wrap: anywhere; }
.agent-voice-rename {
  position: absolute; inset-inline-start: 100%; top: 50%; translate: 0 -50%;
  z-index: 2; display: grid; flex: none; place-items: center; width: 28px; height: 32px;
  padding: 0; border: 0; border-radius: 6px; color: var(--muted); background: transparent;
}
.agent-voice-rename .icon { width: 14px; height: 14px; }
.agent-voice-rename:hover { color: var(--ink); background: #0000000a; }
@media (hover: hover) and (pointer: fine) {
  .agent-voice:not(:hover,:focus-within) .agent-voice-rename { opacity: 0; pointer-events: none; }
}
.agent-voice[data-renaming] .agent-voice-name-label { display: none; }
.agent-voice .agent-voice-name-input {
  position: relative; z-index: 2; width: 100%; min-height: 32px; padding: 4px 5px; text-align: center; font-size: .94rem;
}
.agent-voice small { font-size: .75rem; line-height: 1.3; }
.agent-voice-preview {
  position: absolute; z-index: 2; inset: 2px 2px auto auto;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; background: transparent; color: var(--ink);
}
.agent-voice-preview::before {
  content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #0000000a;
}
.agent-voice-preview .icon { position: relative; width: 15px; height: 15px; }
.agent-voice-preview:is(:hover,[data-playing])::before { background: #00000019; }
.agent-voice-preview:focus-visible { outline: none; }
.agent-voice-preview:focus-visible::before { outline: 2px solid var(--accent); outline-offset: 2px; }
.agent-voice-note { margin-top: 10px; color: var(--muted); font-size: .8rem; }
.agent-greeting { margin-top: clamp(22px, 3vw, 30px); }
.agent-greeting textarea { display: block; border-radius: 8px; line-height: 1.4; }
.agent-reply-preview {
  min-width: 0; display: grid; gap: 20px;
  padding: clamp(14px, 2vw, 24px); border: 1px solid var(--line); border-radius: var(--surface-radius); background: #fff;
}
.agent-reply-preview header {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px;
}
#agent-preview-tone { color: var(--muted); font-size: .82rem; }
.agent-preview-thread { display: grid; gap: 14px; }
.agent-preview-turn { min-width: 0; width: fit-content; max-width: 94%; }
.agent-preview-turn small { display: block; margin-bottom: 3px; overflow-wrap: anywhere; }
.agent-preview-turn p { padding: 9px 11px; font-size: .88rem; line-height: 1.45; }
.agent-preview-turn.incoming p { border-radius: var(--message-radius) var(--message-radius) var(--message-radius) var(--message-corner); background: #f1f1f1; }
.agent-preview-turn.outgoing { justify-self: end; }
.agent-preview-turn.outgoing small { text-align: end; }
.agent-preview-turn.outgoing p { border-radius: var(--message-radius) var(--message-radius) var(--message-corner) var(--message-radius); background: #dcecf3; }
.agent-permissions { max-width: 850px; display: grid; gap: 22px; }
.agent-permissions > p { max-width: 65ch; }
.agent-permission-group h2 { margin-bottom: 10px; }
.agent-permission-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(155px, auto);
  align-items: center; gap: 8px 18px; padding-block: 12px; border-top: 1px solid var(--line);
}
.agent-permission-row:last-child { padding-bottom: 0; }
.agent-permission-row p { margin-top: 3px; font-size: .85rem; }
.agent-permission-row .dashboard-select-trigger { width: 100%; min-height: 44px; }
.agent-view .agent-tone-layout { gap: 13px; }
.agent-view .agent-tones { gap: 4px; }
.agent-view .agent-tones span { border: 0; border-radius: 6px; background: transparent; }
.agent-view .agent-tones label:hover span { background: var(--paper); }
.agent-view .agent-tones input:checked + span { background: var(--wash); color: var(--ink); }
.agent-view .agent-reply-preview { gap: 13px; padding: clamp(11px,1.7vw,17px); border: 0; border-radius: 8px; }
.agent-view .agent-reply-preview h2 { font-size: .91rem; }
.agent-view .agent-preview-turn.outgoing p { background: #ebe5df; }
.agent-view .agent-voice-option { padding: 34px 6px 12px; border: 1px solid transparent; border-radius: var(--surface-radius); }
.agent-view .agent-voice-option:hover { border-color: var(--line); }
.agent-view .agent-voice-option:has(input:checked) { background: #ece8e4; border-color: #b3a69c; }
.agent-view .agent-voice-option:has(input:checked)::before {
  content: ''; position: absolute; top: 16px; left: 13px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--chart-accent);
}
.agent-view .agent-voice .home-agent-orb { width: clamp(40px,6vw,76px); }
.agent-view .agent-voice-name-label { max-width: calc(100% - 29px); }
.agent-view .agent-voice-rename { width: 22px; }
.agent-view .agent-voice small { color: var(--muted); overflow-wrap: anywhere; }
.agent-view .agent-greeting { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 17px; }
.agent-view .agent-greeting textarea { background: var(--white); }
.agent-view .agent-permissions { gap: 16px; }
.agent-view .agent-permission-row .dashboard-select-trigger { border-color: transparent; border-radius: 7px; }
.agent-view .agent-permission-row .dashboard-select-trigger:is(:hover,[aria-expanded="true"]) { border-color: var(--line); }
.agent-view .agent-activity > section:first-child { background: var(--agent-surface); border-radius: var(--surface-radius); padding: var(--agent-inset); }
@media(max-width:920px) {
  .agent-voice .home-agent-orb { width: clamp(44px, 14vw, 76px); }
}
@media(max-width:520px) {
  .agent-tones span { padding-inline: 9px; }
  .agent-permission-row { grid-template-columns: minmax(0, 1fr); }
  .agent-permission-row .dashboard-select { justify-self: start; min-width: 155px; }
  .agent-header-actions { align-self: start; }
  .agent-name-field { padding-inline: 0; }
}

.volume-chart {
  border-radius: var(--surface-radius);
  padding: clamp(14px,2.25vw,26px);
  background: var(--chart-surface);
}
.volume-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 20px; }
.volume-head small { display: block; color: var(--muted); font: .72rem/1.4 var(--mono); }
.volume-readout { display: flex; align-items: baseline; gap: 7px; margin-top: 3px; }
.volume-readout strong { font-size: clamp(1.9rem,3.2vw,2.85rem); font-weight: 400; line-height: 1; letter-spacing: -.04em; }
.volume-readout span { font-size: .87rem; color: var(--muted); }
.volume-breakdown { display: flex; flex-wrap: wrap; gap: 5px 14px; }
.volume-breakdown > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  white-space: nowrap;
}
.volume-breakdown b { font-variant-numeric: tabular-nums; font-weight: 400; }
.volume-key { width: 6px; height: 6px; border-radius: 50%; background: var(--chart-accent); }
.volume-key-team { background: var(--chart-ink); }
.volume-chart .report-chart { grid-template-columns: 33px minmax(0,1fr); }
.volume-chart .report-ticks { padding-right: 8px; font: .69rem/1 var(--mono); }
.volume-chart .report-ticks span:first-child { transform: translateY(-50%); }
.volume-chart .report-ticks span:last-child { transform: translateY(50%); }
.volume-ruler { margin-inline-start: 33px; }
.volume-ruler svg,.support-ruler svg { display: block; width: 100%; height: 16px; overflow: visible; }
.chart-tick-marks { fill: none; stroke: var(--chart-tick); stroke-width: 1; }
.volume-chart .chart-labels { margin: 3px 0 0 33px; }
.volume-chart .volume-plot {
  position: relative; display: block; padding: 0; border: 0; background: transparent;
}
.volume-plot>svg,.volume-targets { position: absolute; inset: 0; width: 100%; height: 100%; }
.volume-grid { fill: none; stroke: #e6e0da; stroke-width: 1; }
.volume-line { fill: none; stroke-width: 1.7; stroke-linecap: round; }
.volume-line-ai { stroke: var(--chart-accent); }
.volume-line-team { stroke: var(--chart-ink); }
.volume-marker { stroke: var(--chart-tick); stroke-width: 1; stroke-dasharray: 2 4; }
.volume-point { position: absolute; z-index: 1; transform: translate(-50%,-50%); width: 8px; height: 8px; border: 1px solid var(--chart-surface); border-radius: 50%; pointer-events: none; }
.volume-point-ai { background: var(--chart-accent); }
.volume-point-team { background: var(--chart-ink); }
.volume-targets { z-index: 2; display: flex; }
.volume-targets button { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; }
.volume-targets button:focus-visible { outline-offset: -2px; border-radius: 4px; }

.sidebar { padding: 21px 13px 14px; }
.sidebar .brand { margin-bottom: 20px; }
.sidebar .nav-shortcuts { gap: 6px; margin-bottom: 15px; }
.sidebar .nav-shortcuts .nav-link {
  align-items: center; justify-content: center; min-height: 67px; padding: 7px 4px;
  color: var(--ink); background: #ebebeb; border: 1px solid transparent; border-radius: 11px;
}
.sidebar .nav-shortcuts .nav-link:hover { background: #e5e5e5; }
.sidebar .nav-shortcuts .nav-link[aria-current=page] { background: #e8e8e8; border-color: #ada9a7; }
.sidebar .nav-shortcuts .nav-label { font-size: .86rem; }
.sidebar .nav-group + .nav-group { border-top: 0; padding-top: 0; margin-top: 10px; }
.sidebar-foot .workspace { padding-top: 10px; }
.collapsed .sidebar .nav-shortcuts { gap: 5px; }
.collapsed .sidebar .nav-shortcuts .nav-link { min-height: 40px; padding: 0; }

.support-metric-displays { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(14px,2.5vw,26px); }
.support-metric-display { display: flex; flex-direction: column; min-width: 0; padding: clamp(14px,2vw,23px); border-radius: var(--surface-radius); background: var(--chart-surface); }
.support-metric-display h2 { font-size: 1.05rem; }
.support-metric-number { display: block; font-size: clamp(1.9rem,3.2vw,2.85rem); line-height: 1; letter-spacing: -.04em; margin-block: 12px 7px; font-weight: 400; }
.support-metric-number>span { font-size: .58em; letter-spacing: -.025em; }
.support-metric-display p { font-size: .88rem; }
.support-ruler { margin-top: auto; padding-top: 22px; }
.support-ruler-ai { color: var(--chart-accent); }
.support-ruler-time { color: var(--chart-ink); }
.support-ruler-track { height: 1px; background: #d4cbc3; }
.support-ruler-track span { position: relative; display: block; width: var(--measure); height: 100%; background: currentColor; }
.support-ruler-track span::after {
  content: ''; position: absolute; inset: -3px -3px auto auto; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
.support-ruler-labels { display: flex; justify-content: space-between; margin-top: 3px; color: var(--muted); font-size: .71rem; }
@media(max-width:720px) { .support-metric-displays { grid-template-columns: minmax(0,1fr); } }

/* Shared rhythm across overview, detail, and collection pages. */
:root {
  --page-gutter: clamp(22px, 4.6vw, 66px);
  --page-top: clamp(24px, 3.2vw, 44px);
  --page-heading: clamp(1.7rem, 2.65vw, 2.25rem);
  --section-heading: 1.13rem;
  --control-height: 40px;
  --row-gap: 12px;
}
.topbar { padding-inline: var(--page-gutter); gap: 12px; }
.topbar .crumb { flex: 0 0 auto; white-space: nowrap; }
.top-actions { position: relative; min-inline-size: 0; gap: 0; }
.top-actions > .icon-button { flex: none; }
.top-actions > #notifications,.top-actions > #usage-ring,.top-test { margin-inline-start: 3px; }
.usage-ring { width: 22px; height: 22px; fill: none; stroke-width: 2.5; }
.usage-ring-track { stroke: #dedede; }
.usage-ring-remaining {
  stroke: #000;
  stroke-dasharray: 100;
  stroke-linecap: round;
  transition: stroke-dashoffset 220ms ease, opacity 160ms ease;
}
.usage-note { margin-top: 12px; }
#notifications[aria-expanded="true"],#usage-ring[aria-expanded="true"] { background: var(--wash); }
.header-dropdown {
  position: absolute;
  z-index: 5;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: -1px;
  width: min(320px, calc(100vw - 2 * var(--page-gutter)));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  background: var(--white);
  box-shadow: 0 8px 24px #20202014;
}
.header-dropdown h2 {
  padding: 5px 8px 7px;
  font-size: 1rem;
  font-weight: 400;
}
.top-actions > #notifications { position: relative; }
.notification-count {
  position: absolute; inset: 0 0 auto auto; min-width: 15px; height: 15px; padding-inline: 3px;
  border-radius: 999px; background: #edb99d; color: #582e1e; font: .64rem/15px var(--mono);
  text-align: center; box-shadow: 0 0 0 2px var(--white); pointer-events: none;
}
.notification-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px; }
.notification-dropdown ul { display: grid; gap: 4px; max-height: min(55dvh,360px); overflow: auto; padding: 0; margin: 3px 0 0; list-style: none; }
.notification-dropdown li { border-radius: var(--surface-radius); }
.notification-dropdown li[data-unread] { background: var(--rail); }
.notification-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; }
.notification-dropdown a {
  display: grid;
  position: relative; gap: 2px; padding: 8px 8px 8px 20px;
  border-radius: var(--surface-radius);
}
.notification-dropdown [data-unread] a::before {
  content: ''; position: absolute; inset: 15px auto auto 8px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--ink);
}
.notification-dropdown a:hover { background: var(--wash); text-decoration: none; }
.notification-dropdown a:focus-visible { outline-offset: -2px; }
.notification-dropdown strong { font-weight: 400; }
.notification-dropdown small,.notification-dropdown p { color: var(--muted); }
.notification-dropdown p { padding: 6px 8px 9px; }
.notification-dropdown .notification-options { width: 36px; height: 36px; margin: 3px 3px 0 0; border-radius: 7px; }
.notification-options:is(:hover,[aria-expanded="true"]),.notification-action:hover { background: var(--wash); }
.notification-options .icon { width: 17px; height: 17px; }
.notification-actions { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 8px 6px 14px; }
.notification-action { min-height: 34px; padding: 4px 8px; border: 0; border-radius: 7px; background: transparent; font-size: .79rem; }
.notification-action[data-notification-action="delete"] { color: #873740; }
.usage-dropdown { width: min(272px, calc(100vw - 2 * var(--page-gutter))); }
.usage-dropdown p { padding-inline: 8px; }
.usage-dropdown .usage-hint { margin-block: 4px 6px; color: var(--muted); font-size: .82rem; }
.top-test { flex: none; }
.top-test .button { white-space: nowrap; }
.top-search-drawer {
  display: flex;
  align-items: center;
  inline-size: 0;
  min-inline-size: 0;
  overflow: hidden;
  opacity: 0;
  transition: inline-size 280ms cubic-bezier(.22,.75,.27,1), opacity 180ms ease;
}
#search[aria-expanded="true"] + .top-search-drawer {
  inline-size: min(29vw, 280px);
  opacity: 1;
}
.top-search-drawer input {
  flex: 1;
  align-self: stretch;
  min-height: 0;
  min-width: 0;
  width: 100%;
  padding: 0 4px;
  border: 0;
  background: transparent;
  outline: none;
}
.top-search-drawer input::placeholder { color: var(--muted); opacity: 1; }
.top-search-drawer .icon-button { flex: none; }
.top-search-drawer .icon-button:focus-visible { outline-offset: -3px; }
.top-actions:has(.top-search-drawer input:focus-visible) { border-color: var(--accent); }
main { padding-inline: var(--page-gutter); padding-top: var(--page-top); }
.page-head { align-items: end; gap: 12px 16px; margin-bottom: clamp(23px,3.2vw,39px); }
.page-head h1 { font: 400 var(--page-heading)/1.12 var(--sans); letter-spacing: -.04em; }
.page-head p { max-width: 57ch; margin-top: 8px; line-height: 1.45; }
.panel-head,.section-head { align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.panel-head>h2,.section-head>h2,.agent-reply-preview h2,.agent-permission-group h2 { font-size: var(--section-heading); line-height: 1.25; }
.panel-body>p,.empty>p { max-width: 64ch; }
.stack { gap: clamp(24px,3.1vw,42px); }
.row { gap: var(--row-gap); padding-block: 11px; min-height: 60px; }
.row h3 { line-height: 1.3; }
.row small { line-height: 1.38; }
.button,.dashboard-select-trigger,.field,input,textarea,select { min-height: var(--control-height); }
.top-actions .button { min-height: 34px; }
.home-view { max-width: none; }
.home-header { margin-bottom: clamp(25px,3.2vw,40px); }
.home-metric-period { margin-top: 3px; color: var(--muted); font-size: .8rem; }
.home-view .section-head .button,.action-pill { min-height: 34px; }
.collection-toolbar { width: 100%; gap: 8px 10px; }
.form-grid { gap: 14px; }
.form-grid label { gap: 6px; }
.setup-card { max-width: 650px; }
.collection-toolbar .search-field { flex: 0 1 clamp(220px, 25vw, 300px); }
.home-lead > .home-queue { align-self: start; }
.record-details { gap: clamp(16px, 2.4vw, 30px); }
.record-details > .panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(16px, 2vw, 24px);
  background: var(--white);
}
.record-details .detail-list { gap: 0; }
.record-details .detail-list > div { border-top: 1px solid var(--line); padding-block: 12px; }
.record-details .detail-list > div:last-child { padding-bottom: 0; }
.record-details .detail-list dd { overflow-wrap: anywhere; }
.record-details .channel-preview { background: transparent; border-top: 1px solid var(--line); padding-top: 12px; }
.record-details .channel-preview .actions { margin-top: 14px; }
.record-details .row { padding-bottom: 0; }
.customer-directory-tabs { gap: 4px; margin-bottom: 18px; border: 0; }
.customer-profile-heading { display: flex; align-items: center; gap: 13px; margin-bottom: clamp(20px,3vw,36px); }
.customer-profile-identity { flex: 1; min-width: 0; }
.customer-profile-identity h1 { font: 400 var(--page-heading)/1.12 var(--sans); letter-spacing: -.04em; }
.customer-profile-heading > .avatar { width: 42px; height: 42px; }
.customer-profile-contact { display: flex; flex-wrap: wrap; gap: 7px 20px; margin-top: 8px; }
.customer-profile-contact > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; }
.customer-profile-contact dt,.ticket-contact dt { color: var(--muted); font-size: .8rem; }
:is(.customer-profile-contact,.ticket-contact,.order-details .detail-list) a[href^="mailto:"],
:is(.customer-profile-contact,.ticket-contact,.order-details .detail-list) a[href^="tel:"] { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.ticket-contact { display: grid; gap: 9px; margin-bottom: 14px; }
.customer-order-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  border-top: 1px solid var(--line); padding-top: 13px;
}
.customer-orders-empty { padding-block: 7px 2px; }
.ticket-details-body { display: grid; align-items: start; justify-items: start; gap: 14px; }
.ticket-details-body p { max-width: 65ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.ticket-title-line > :is(h1,h2) { min-width: 0; overflow-wrap: anywhere; }
.page-head > div:has(.ticket-title-line) { min-width: 0; }
.ticket-details-body :is(.internal-note,.inbox-note-composer,.ticket-linked-context) { width: 100%; }
.ticket-linked-context { margin-top: 8px; }
.ticket-back { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 16px; }
.ticket-actions { margin-inline-start: auto; }
.ticket-actions > .icon-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.ticket-actions > .icon-button:hover,.ticket-actions:has(:popover-open) > .icon-button { background: var(--wash); }
.ticket-lifecycle-notice {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px;
  margin-bottom: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--surface-radius);
  color: var(--muted); background: var(--white);
}
.ticket-steps { display: flex; gap: 6px; }
.ticket-steps .icon-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.ticket-steps a:hover { background: var(--wash); }
.ticket-steps .icon-button:disabled { opacity: .4; }
.ticket-steps .icon { width: 16px; height: 16px; }
.ticket-thread { grid-template-columns: minmax(0,1fr) minmax(240px,.36fr); overflow: hidden; border-radius: var(--surface-radius); }
.ticket-thread .conversation-turn { max-width: min(88%,56ch); }
.ticket-thread .context h2 { font-size: var(--section-heading); }
.ticket-context-order { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.ticket-related { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.ticket-related ul { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.ticket-related a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.ticket-thread .messages { min-height: 240px; }
#ticket-extra-filters { display: flex; align-items: center; flex: 0 0 100%; flex-wrap: wrap; gap: 8px; padding-top: 3px; }
.search-results-stack { max-width: 760px; }
.workspace-search-results { margin: 0; padding: 0; list-style: none; }
.workspace-search-results li { border-top: 1px solid var(--line); }
.workspace-search-results a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 20px; padding: 13px 2px; }
.workspace-search-results a:hover { background: var(--wash); }
dialog[data-layout="ticket-context"] { position: fixed; inset: auto 0 0; width: min(100%,520px); margin: 0 auto; border-radius: 12px 12px 0 0; padding-bottom: max(22px,env(safe-area-inset-bottom)); }
@media(max-width:1039px) {
  .ticket-thread { grid-template-columns: minmax(0,1fr); }
}
#ticket-results .table td { padding-block: 16px; }
.ticket-bulk-bar {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  background: var(--white);
  font-size: .88rem;
}
.bulk-selection-count {
  padding-inline: 10px 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bulk-action-trigger,.bulk-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border: 0;
  border-radius: 7px;
}
.bulk-action-trigger {
  gap: 7px;
  padding-inline: 11px 9px;
  background: #efefef;
  white-space: nowrap;
}
.bulk-action-trigger:is(:hover,:has(+ :popover-open)) { background: #e4e4e4; }
.bulk-action-trigger:has(+ :popover-open) .icon { transform: rotate(180deg); }
.bulk-clear { width: 36px; margin-inline-start: 3px; padding: 0; color: var(--muted); background: transparent; }
.bulk-clear:hover { background: var(--wash); color: var(--ink); }
.bulk-action-trigger .icon,.bulk-clear .icon { width: 16px; height: 16px; }
.bulk-action-menu { width: min(188px,calc(100vw - 16px)); max-height: min(60vh,270px); padding: 5px; }
.bulk-action-menu button { min-height: 40px; padding-inline: 10px; text-align: start; }
.bulk-action-menu button + .ticket-danger {
  width: 100%;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-start-start-radius: 0;
  border-start-end-radius: 0;
}
@media (pointer: coarse) {
  .bulk-action-trigger,.bulk-clear { height: 44px; }
  .bulk-clear { width: 44px; }
  .bulk-action-menu button { min-height: 44px; }
}
.ticket-row-select { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 34px; cursor: pointer; }
.ticket-checkbox {
  flex: none; width: 17px; height: 17px; min-height: 0; margin: 0; padding: 0;
  accent-color: var(--ink); cursor: pointer;
}
:is(#ticket-results,.selectable-directory) .table :is(th,td):first-child { width: 44px; padding-inline: 8px 0; }
:is(#ticket-results,.selectable-directory) .table th:first-child { padding-block: 5px; }
:is(#ticket-results,.selectable-directory) .table tr[data-selected] td { background: #eef3f5; }
.ticket-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.ticket-labels span { max-width: 100%; padding: 2px 7px; border-radius: var(--compact-radius); background: #e6edf0; color: var(--ink); font-size: .75rem; overflow-wrap: anywhere; }
.ticket-title-line .ticket-labels { margin-top: 0; }
#ticket-results .table-note { color: var(--muted); font-size: .8rem; }
#ticket-results .ticket-subject { font-size: .94rem; }
#ticket-results time { color: var(--muted); white-space: nowrap; }
@media(max-width:620px) {
  .thread-heading-main:has(.ticket-title-line) { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; }
  .thread-heading-main:has(.ticket-title-line) > div { display: contents; }
  .thread-heading-main .ticket-title-line { grid-column: 1 / -1; }
  .ticket-title-line { display: grid; grid-template-columns: minmax(0,max-content) auto; justify-content: start; }
  .ticket-title-line > .badge { justify-self: start; }
  .ticket-title-line > .ticket-labels { grid-column: 1 / -1; }
  .ticket-toolbar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ticket-toolbar :is(.search-field,.collection-count) { grid-column: 1 / -1; }
  #ticket-extra-filters { grid-column: 1 / -1; }
  #ticket-extra-filters > .dashboard-select { flex: 0 1 calc((100% - 8px) / 2); }
  .ticket-toolbar .dashboard-select-trigger { width: 100%; }
  :is(#ticket-results,.selectable-directory) :is(.table,.table thead,.table tbody) { display: block; }
  :is(#ticket-results,.selectable-directory) .table tr { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; gap: 9px 8px; padding: 14px; }
  :is(#ticket-results,.selectable-directory) .table thead tr { align-items: center; padding-block: 6px; background: #f4f4f4; border-bottom: 1px solid var(--line); }
  :is(#ticket-results,.selectable-directory) .table th:nth-child(n+3) { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
  :is(#ticket-results,.selectable-directory) .table :is(th:first-child,th:nth-child(2)) { width: auto; padding: 0; border: 0; }
  :is(#ticket-results,.selectable-directory) .table th:nth-child(2) { grid-column: 2 / -1; }
  :is(#ticket-results,.selectable-directory) .table tbody tr + tr { border-top: 1px solid var(--line); }
  :is(#ticket-results,.selectable-directory) .table tr[data-selected] { background: #eef3f5; }
  :is(#ticket-results,.selectable-directory) .table tr[data-selected] td { background: transparent; }
  :is(#ticket-results,.selectable-directory) .table td { border: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
  :is(#ticket-results,.selectable-directory) .table td:first-child { grid-column: 1; grid-row: 1; width: auto; padding: 0; }
  :is(#ticket-results,.selectable-directory) .table td:nth-child(2) { grid-column: 2 / -1; grid-row: 1; }
  :is(#ticket-results,.selectable-directory) .table td:nth-child(3) { grid-column: 2; grid-row: 2; }
  #ticket-results .table td:nth-child(4) { grid-column: 2 / -1; grid-row: 3; }
  #ticket-results .table td:last-child { grid-column: 3; grid-row: 2; text-align: end; }
  .selectable-directory .table td:nth-child(4) { grid-column: 3; grid-row: 2; text-align: end; }
  .selectable-directory .table td:nth-child(5) { grid-column: 2 / -1; grid-row: 3; }
  .selectable-directory .table td:nth-child(5):not(:has(.button)) { display: none; }
  .ticket-row-select { width: 26px; height: 28px; }
  #ticket-results .table td:has(.ticket-unlinked) { display: none; }
}
@media(max-width:620px) {
  .customer-profile-heading { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; }
  .customer-profile-heading > .button { grid-column: 2; justify-self: start; }
}
.order-total { display: grid; gap: 2px; margin-bottom: 14px; }
.order-total span { color: var(--muted); font-size: .83rem; }
.order-total strong { font-size: clamp(1.8rem, 3.2vw, 2.35rem); font-weight: 400; line-height: 1.1; letter-spacing: -.04em; }
.order-detail-product { gap: 14px; padding-block: 14px; border-top: 1px solid var(--line); }
.order-detail-product .order-product-image { width: 88px; height: 88px; border-radius: 10px; }
.order-detail-product small { display: block; margin-bottom: 3px; color: var(--muted); font-size: .8rem; }
.order-details .detail-list > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-details .detail-list dd { text-align: end; }
.order-customer-link { display: inline-flex; align-items: center; gap: 7px; }
.order-customer-link .avatar { width: 28px; height: 28px; }
.order-case-heading { display: flex; align-items: center; gap: 9px; }
.order-case-heading p { font-size: .8rem; margin-top: 2px; }
.order-case > p { color: var(--muted); margin-block: 12px 15px; line-height: 1.45; }
.order-case-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.agent-activity { display: grid; gap: clamp(25px, 4vw, 44px); }
.agent-activity h2 { font-size: var(--section-heading); line-height: 1.25; }
.activity-views { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.activity-view {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; text-align: start;
}
.activity-view strong { color: var(--muted); font-size: .76rem; line-height: 1.2; font-weight: 400; font-variant-numeric: tabular-nums; }
.activity-toolbar { display: flex; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.activity-toolbar .search-field { flex: 1 1 270px; max-width: 380px; }
.activity-toolbar input { padding-inline-end: 6px; }
#activity-calendar-edit { gap: 7px; }
#activity-calendar-edit .icon { width: 16px; height: 16px; }
.activity-calendar-slot { flex: 0 0 100%; min-width: 0; }
.activity-calendar-slot:has(#activity-calendar[hidden]) { display: none; }
#activity-calendar {
  width: min(100%,340px); padding: clamp(10px,1.5vw,16px);
  border: 1px solid var(--line); border-radius: var(--surface-radius); background: var(--white);
}
.calendar-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calendar-month h3 { font: 400 1rem/1.3 var(--sans); text-align: center; }
.calendar-month .icon-button { border-radius: 8px; background: var(--paper); }
.calendar-month .icon-button:hover { background: var(--wash); }
.calendar-month .icon { width: 15px; height: 15px; }
.calendar-week,#activity-calendar-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); text-align: center; }
.calendar-week { margin-block: 10px 3px; color: var(--muted); font-size: .78rem; }
#activity-calendar-days { row-gap: 3px; }
#activity-calendar-days button {
  min-width: 0; min-height: 36px; padding: 0; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--ink); font-size: .9rem; font-variant-numeric: tabular-nums;
}
#activity-calendar-days button:hover { background: var(--wash); }
#activity-calendar-days button:focus-visible { outline-offset: -2px; }
#activity-calendar-days button[aria-current=date] { border-color: var(--muted); }
#activity-calendar-days button[data-between] { border-radius: 0; background: #dcecf3; }
#activity-calendar-days button[data-edge] { border-color: var(--ink); background: var(--ink); color: var(--white); }
#activity-calendar-days button[data-edge]:focus-visible { outline-color: var(--white); }
.calendar-footer { display: grid; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.calendar-footer p { color: var(--muted); font-size: .83rem; }
.calendar-footer .actions { justify-content: flex-end; }
#activity-results .table th { padding: 14px clamp(12px,1.7vw,22px); }
#activity-results .table td { padding: clamp(17px,1.6vw,22px) clamp(12px,1.7vw,22px); }
.activity-action { display: inline-block; color: var(--ink); }
.activity-note, #activity-results .table small { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.activity-note { max-width: 48ch; margin-top: 6px; }
.activity-channel { display: inline-flex; align-items: center; gap: 5px; }
.activity-channel .icon { width: 14px; height: 14px; }
.activity-outcome {
  display: inline-block; padding: 4px 8px; border-radius: var(--compact-radius); background: #f0f0f0;
  font-size: .77rem; line-height: 1.25;
}
.activity-outcome[data-group="attention"] { background: #f1e5ee; color: #67465d; }
.activity-outcome[data-group="waiting"] { background: #e4eef4; color: #3b5968; }
.activity-outcome[data-group="resolved"] { background: #e4eee8; color: #3e5a4c; }
.activity-time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.activity-order { white-space: nowrap; }
.activity-log-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; color: var(--muted); font-size: .85rem; }
.activity-log-footer .button { gap: 5px; min-height: 38px; padding-inline: 10px; }
.activity-log-footer .button .icon { width: 15px; height: 15px; }
.activity-log-footer .button:disabled { opacity: .42; }
.activity-empty { border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
@media(max-width:760px) {
  .activity-toolbar .search-field { max-width: none; flex-basis: 100%; }
  #activity-results :is(.table,.table tbody) { display: block; }
  #activity-results .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #activity-results .table tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 11px 12px; padding: 17px 15px; }
  #activity-results .table tbody tr + tr { border-top: 1px solid var(--line); }
  #activity-results .table td { border: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
  #activity-results .table td:first-child { grid-column: 1 / -1; }
  #activity-results .table td:nth-child(4) { grid-column: 2; grid-row: 2; justify-self: end; }
  #activity-results .table td:last-child { justify-self: end; }
}
@media(max-width:500px) {
  .activity-toolbar input { font-size: 16px; }
}
.source-card-top { min-height: 0; padding: 0; background: transparent; }
.source-card:nth-child(even) .source-card-top { background: transparent; }
.source-card[data-selected] { border-color: #9fb5c0; background: #eef3f5; }
.source-card-select-all { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); cursor: pointer; font-size: .85rem; }
.report-data > summary { width: fit-content; min-height: 40px; padding-block: 10px; color: var(--muted); cursor: pointer; }
dialog { border-radius: 12px; }
.dialog-head h2 { font-size: 1.24rem; line-height: 1.2; }
.dialog-links a { display: flex; align-items: center; min-height: 44px; border: 0; border-radius: 8px; }
.dialog-links a:hover { background: var(--wash); text-decoration: none; }
main[data-page="inbox"] .page-head { align-items: center; }
main[data-page="inbox"] .page-head h1 { font-size: clamp(1.55rem,2.3vw,2rem); }
main[data-page="inbox"] .inbox:not(:has(.thread)) { grid-template-columns: minmax(0,1fr); }
.inbox:not(:has(.thread)) .inbox-list { border-inline-end: 0; }
.inbox-item:focus-visible { outline-offset: -3px; }
@media(min-width:621px) {
  .inbox-item[data-preview] { background: #f1f1f1; box-shadow: inset 2px 0 #787878; }
}
@media(max-width:820px) {
  :root {
    --page-gutter: clamp(16px,4.5vw,27px);
    --page-top: 28px;
    --bottom-safe-area: env(safe-area-inset-bottom, 0px);
  }
  .mobile-nav { gap: 4px; padding: 6px var(--page-gutter) calc(6px + var(--bottom-safe-area)); }
  .mobile-nav a,.mobile-nav button { align-content: center; gap: 4px; }
  main,main[data-page="inbox"] { padding-bottom: calc(88px + var(--bottom-safe-area)); }
  #toast { bottom: calc(74px + var(--bottom-safe-area)); }
  main[data-page="assistant"] { --assistant-bottom: calc(72px + var(--bottom-safe-area)); }
}
@media(max-width:620px) {
  :root {
    --control-height: 44px;
    --row-gap: 10px;
    --mobile-gutter: clamp(16px, 5vw, 24px);
    --mobile-panel-inset: clamp(12px, 4vw, 20px);
    --mobile-section-gap: 24px;
  }
  main,main[data-page="inbox"] { padding-inline: var(--mobile-gutter); }
  .topbar { gap: 8px; }
  .topbar .crumb { gap: 0; }
  .topbar .crumb > span:last-child {
    max-inline-size: 90px;
    margin-inline-start: 9px;
    overflow: hidden;
    transition: max-inline-size 280ms cubic-bezier(.22,.75,.27,1), margin 280ms ease, opacity 180ms ease;
  }
  .topbar:has(#search[aria-expanded="true"]) .crumb > span:last-child { max-inline-size: 0; margin-inline-start: 0; opacity: 0; }
  .top-actions:has(#search[aria-expanded="true"]) > #usage-ring { display: none; }
  #search[aria-expanded="true"] + .top-search-drawer { inline-size: 205px; }
  .top-search-drawer input { font-size: 16px; }
  .top-actions .icon-button { width: var(--control-height); height: var(--control-height); }
  .top-actions .button,
  .assistant-page-composer form button { min-height: var(--control-height); }
  .page-head { align-items: start; gap: 12px; margin-bottom: var(--mobile-section-gap); }
  .page-head p { margin-top: 8px; }
  .panel-head,.section-head { flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
  .stack,.home-sections { gap: var(--mobile-section-gap); }
  .home-lead,.home-detail-grid,.detail-grid,.setup-layout,.source-grid { gap: 16px; }
  .home-header { align-items: center; }
  .home-shelf,.home-agent-area,.home-sections>section.home-shelf { padding: var(--mobile-panel-inset); }
  .home-queue .shelf-body { gap: 8px; }
  .home-queue .queue-entry {
    grid-template-columns: 8px minmax(0,1fr) auto;
    gap: 8px;
    padding: 12px 10px;
    min-height: 65px;
  }
  .home-agent-profile { padding-block: 4px 16px; }
  .home-agent-profile .home-agent-orb { width: clamp(90px, 26vw, 112px); }
  .home-agent-links a { min-height: 44px; }
  .collection-toolbar { gap: 8px; margin-bottom: 16px; }
  .collection-toolbar .search-field { flex: 1 1 100%; }
  main[data-page="orders"] .collection-toolbar {
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
  }
  main[data-page="orders"] .collection-toolbar :is(.search-field,.collection-count) { grid-column: 1 / -1; }
  main[data-page="orders"] .collection-toolbar .dashboard-select-trigger { width: 100%; padding-inline: 10px; gap: 6px; }
  main[data-page="orders"] .collection-toolbar .dashboard-select-trigger > span { white-space: normal; text-align: start; }
  main[data-page="inbox"] .collection-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }
  main[data-page="inbox"] .collection-toolbar :is(.search-field,#inbox-extra-filters) { grid-column: 1 / -1; }
  #inbox-extra-filters > .dashboard-select { flex: 0 1 calc((100% - 8px) / 2); }
  #inbox-note-text { font-size: 16px; }
  :is(main[data-page="inbox"],main[data-page="orders"]) .collection-toolbar .activity-calendar-slot { grid-column: 1 / -1; }
  .inbox-clear-search { width: 38px; height: 44px; }
  main[data-page="inbox"] .collection-toolbar .dashboard-select-trigger { width: 100%; gap: 7px; padding-inline: 11px; }
  .form-grid { gap: 16px; }
  .form-grid input:not([type="checkbox"]),.form-grid textarea,.assistant-page-composer textarea { font-size: 16px; }
  .view-switch button { min-height: var(--control-height); }
  main[data-page="knowledge"] .collection-toolbar #knowledge-search { flex: 0 0 100%; }
  .home-view .section-head .button { min-height: var(--control-height); }
  .home-view .section-head { min-height: 0; }
  .row .button { white-space: normal; text-align: center; flex-shrink: 0; max-width: 44%; }
  .section-tabs { gap: 4px 12px; }
  .setup-card { padding: 16px; }
  main[data-page="agent"] .row:has([data-permission]) { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  main[data-page="agent"] .row:has([data-permission]) .row-icon { display: none; }
  main[data-page="agent"] .row:has([data-permission]) .dashboard-select-trigger { width: 100%; gap: 7px; padding-inline: 10px; }
  main[data-page="agent"] .row:has([data-permission]) .dashboard-select-trigger > span { white-space: normal; text-align: start; }
  main[data-page="agent"] .row:has([data-permission]) .dashboard-select-trigger::after { flex-shrink: 0; }
  main[data-page="help"] .row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    row-gap: 6px;
  }
  main[data-page="help"] .row .button {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    margin-inline-start: 0;
  }
  main[data-page="inbox"] .page-head,main[data-page="inbox"] .collection-toolbar { margin-bottom: 16px; }
  main[data-page="inbox"]:has(.thread-open) .collection-toolbar,
  main[data-page="inbox"]:has(.thread-open) .page-head p,
  main[data-page="inbox"]:has(.thread-open) .inbox-total { display: none; }
  main[data-page="inbox"]:has(.thread-open) .inbox { min-height: calc(100svh - 184px); }
  .thread>.mobile-only { min-height: 44px; display: inline-flex; align-items: center; margin-bottom: 4px; }
  .thread,.context { padding: max(16px,var(--mobile-panel-inset)); }
  .thread .actions { gap: 8px; margin-block: 12px 16px; }
  .inbox-item { padding: 17px max(15px,var(--mobile-panel-inset)); }
  .messages { gap: 12px; margin-block: 16px 24px; }
  .conversation-note { margin-top: 4px; }
  main[data-page="analytics"] .panel-head { align-items: start; flex-direction: column; }
  main[data-page="analytics"] .panel-head .dashboard-select-trigger { min-width: 154px; }
  .volume-chart,.support-metric-display { padding: var(--mobile-panel-inset); }
  main[data-page="knowledge"] .table-note { margin-top: 3px; }
}
@media(max-width:420px) {
  main[data-page="orders"] .table,
  main[data-page="orders"] .table tbody { display: block; }
  main[data-page="orders"] .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  main[data-page="orders"] .table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 4px 12px;
    padding: 10px 14px;
  }
  main[data-page="orders"] .table tbody tr + tr { border-top: 1px solid var(--line); }
  main[data-page="orders"] .table td { border: 0; padding: 0; }
  main[data-page="orders"] .table td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: end; }
  main[data-page="orders"] .table td:nth-child(2) { grid-column: 1; grid-row: 2; }
  main[data-page="orders"] .table td:last-child { color: var(--muted); text-align: end; }
  main[data-page="orders"] .table td a { display: inline-flex; align-items: center; min-height: 34px; }
  main[data-page="orders"] .table td:last-child { grid-column: 2; grid-row: 2; }
  main[data-page="orders"] .table .order-number { min-height: 30px; }
  main[data-page="orders"] .table tbody tr { align-items: center; }
  .order-product-name { margin-top: 0; }
  .table-person .customer-avatar { display: grid; width: 26px; height: 26px; font-size: .68rem; }
}
@media(max-width:420px) {
  .top-test {
    max-inline-size: 90px;
    overflow: hidden;
    transition: max-inline-size 280ms cubic-bezier(.22,.75,.27,1), margin 280ms ease, opacity 180ms ease, visibility 0s;
  }
  .top-actions:has(#search[aria-expanded="true"]) .top-test {
    max-inline-size: 0;
    margin-inline-start: 0;
    opacity: 0;
    visibility: hidden;
  }
  .top-test .button:focus-visible { outline-offset: -3px; }
}
@media(prefers-reduced-motion: reduce) {
  .top-search-drawer,.top-test,.topbar .crumb > span:last-child,.usage-ring-remaining { transition: none; }
  .assistant-voice-stage,.assistant-voice-stage[data-phase="speaking"] .home-agent-orb { animation: none; }
}
@media(max-width:380px) {
  .topbar:has(.top-test:not([hidden])) .crumb > span:last-child { max-inline-size: 0; margin-inline-start: 0; opacity: 0; }
}

.workspace-empty {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: start;
  gap: 14px;
  padding: clamp(18px,3vw,30px);
  border-radius: var(--surface-radius);
  background: var(--paper);
}
.workspace-empty-icon {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border-radius: 7px;
  background: var(--wash);
  color: var(--ink);
}
.workspace-empty-icon .icon { width: 17px; height: 17px; }
.workspace-empty h2 { margin-top: 6px; font-size: 1.13rem; font-weight: 550; line-height: 1.25; }
.workspace-empty p { max-width: 49ch; margin-top: 6px; color: var(--muted); text-wrap: pretty; }
.workspace-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.signup-home { max-width: 780px; margin-inline: auto; container: signup-home / inline-size; }
.signup-home .page-head { margin-bottom: clamp(25px,4vw,42px); }
.signup-home .page-head h1 { max-width: 26ch; text-wrap: balance; }
.signup-home .page-head p { max-width: 52ch; margin-top: 11px; color: var(--muted); text-wrap: pretty; }
.signup-flow { max-width: 1060px; }
.signup-setup {
  min-width: 0;
  padding-block: clamp(16px,3vw,25px) 0;
  border-top: 1px solid var(--line);
}
.signup-setup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.signup-setup-head h2 { font-size: 1.13rem; font-weight: 550; }
.signup-setup-head span { color: var(--muted); font: .76rem var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.signup-setup-progress { display: flex; gap: 5px; margin-top: 13px; }
.signup-setup-progress span { flex: 1; height: 4px; border-radius: 999px; background: var(--wash); }
.signup-setup-progress [data-filled] { background: var(--ink); }
.signup-steps { display: grid; gap: 6px; margin: clamp(16px,3cqi,24px) 0 0; padding: 0; list-style: none; }
.signup-steps a {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto 14px;
  align-items: center;
  gap: 4px 12px;
  min-height: 64px;
  padding: 10px clamp(10px,2cqi,16px);
  border-radius: var(--surface-radius);
  background: var(--paper);
}
.signup-steps a[aria-current="step"],.signup-steps a:is(:hover,:focus-visible) { background: var(--wash); text-decoration: none; }
.signup-step-number {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: var(--compact-radius);
  font: .72rem var(--mono);
  color: var(--muted);
}
.signup-steps [aria-current="step"] .signup-step-number { border-color: var(--ink); color: var(--white); background: var(--ink); }
.signup-step-check { border-color: transparent; border-radius: 50%; background: #38594a; color: #fff; }
.signup-step-check .icon { width: 17px; height: 17px; }
.signup-steps strong { font-weight: 500; }
.signup-channel-option strong { font-weight: 400; }
.signup-steps small,.signup-channel-option small { display: block; margin-top: 3px; color: var(--muted); line-height: 1.35; }
.signup-step-status { grid-column: 3; color: var(--muted); font-size: .77rem; white-space: nowrap; }
.signup-steps [aria-current="step"] .signup-step-status { color: var(--ink); }
.signup-step-chevron { grid-column: 4; display: grid; place-items: center; color: var(--muted); }
.signup-step-chevron .icon { width: 14px; height: 14px; }
.signup-setup-action { display: flex; margin-top: 22px; }
@container signup-home (max-width:400px) {
  .signup-steps a { grid-template-columns: auto minmax(0,1fr) 14px; }
  .signup-steps a:has(.signup-step-status) :is(.signup-step-number,.signup-step-chevron) { grid-row: 1 / span 2; }
  .signup-step-copy,.signup-step-status { grid-column: 2; }
  .signup-step-chevron { grid-column: 3; }
  .signup-setup-action .button { width: 100%; }
}
.signup-flow .setup-card h2 { margin-bottom: 7px; }
.setup-description { margin-bottom: 22px; color: var(--muted); max-width: 48ch; }
.signup-channel-options { display: grid; gap: 7px; min-width: 0; padding: 0; margin: 0; border: 0; }
.form-grid .signup-channel-option {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  cursor: pointer;
}
.signup-channel-option:has(:checked) { background: var(--wash); border-color: #b6b6b6; }
.signup-channel-option input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--ink); }
@media(max-width:760px) {
  .workspace-empty .button,.signup-home .button,.signup-flow .button { min-height: 44px; }
}

.signup-wizard {
  display: grid;
  grid-template-columns: minmax(160px,195px) minmax(0,650px);
  align-items: start;
  gap: clamp(22px,4vw,58px);
}
.signup-wizard .setup-steps { gap: 3px; }
.signup-wizard .setup-steps a {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px;
  padding: 7px 9px; border-radius: var(--surface-radius);
}
.signup-wizard .setup-steps a:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.signup-wizard .setup-steps a[aria-current] { background: var(--wash); color: var(--ink); }
.signup-wizard .setup-steps a[aria-current] .setup-step-number { border-color: var(--ink); background: var(--ink); color: var(--white); }
.signup-wizard .setup-steps li { align-items: stretch; min-width: 0; }
.signup-wizard .setup-step-number { border-radius: var(--compact-radius); font-family: var(--mono); }
.signup-wizard .setup-card { min-width: 0; padding: clamp(17px,3vw,32px); border-radius: var(--surface-radius); }
.signup-wizard .setup-card h2 { margin-bottom: 6px; font-size: clamp(1.2rem,2.2vw,1.55rem); }
.signup-wizard .form-grid { gap: 18px; }
.signup-wizard .form-grid :is(input:not([type="radio"],[type="checkbox"]),textarea) { min-width: 0; width: 100%; }
.signup-wizard .form-grid label > .dashboard-select { width: 100%; }
.signup-wizard legend { margin-bottom: 8px; padding: 0; }
.signup-wizard .signup-channel-option { grid-template-columns: auto minmax(0,1fr); padding: 11px 13px; }
.setup-channel-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center;
  border: 1px solid var(--line); border-radius: var(--surface-radius);
}
.setup-channel-row:has(input:checked) { background: var(--wash); border-color: #b6b6b6; }
.signup-wizard .setup-channel-row .signup-channel-option {
  grid-template-columns: auto auto minmax(0,1fr);
  border: 0; background: transparent;
}
.setup-channel-row:not(:has(input:checked)) .setup-channel-edit { display: none; }
.setup-channel-edit { margin-inline: 0 9px; padding-inline: 12px; }
.setup-channel-row .setup-channel-edit { background: var(--white); }
.setup-channel-row .setup-channel-edit:hover { background: var(--rail); }
.signup-channel-option input { flex: none; }
.signup-channel-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.signup-channel-icon .icon { width: 17px; height: 17px; }
.setup-field-group { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.setup-field-group [data-phone-method] { display: grid; gap: 7px; }
.setup-field-hint { color: var(--muted); font-size: .86rem; }
#setup-phone-numbers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.form-grid .setup-number-option {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .83rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.setup-number-option:has(:checked) { background: var(--wash); border-color: #b6b6b6; }
.setup-number-option input { min-height: 0; flex: none; margin: 0; accent-color: var(--ink); }
.signup-wizard input[type="radio"] { min-height: 0; margin: 0; accent-color: var(--ink); }
.setup-note { padding: 12px 14px; border-radius: var(--surface-radius); background: var(--control-fill); }
.setup-note strong,.setup-review-list strong { font-weight: 400; }
.setup-note p { margin-top: 4px; color: var(--muted); font-size: .88rem; }
.signup-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding-top: 14px; border-top: 1px solid var(--line); }
.signup-form-actions button[type="submit"] { margin-inline-start: auto; }
.setup-review-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.setup-review-list li { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.setup-review-detail,.setup-review-list small { display: block; overflow-wrap: anywhere; color: var(--muted); }
.setup-review-list .button { min-height: 38px; }
@media(max-width:760px) {
  .signup-wizard { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .signup-wizard .setup-steps { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .signup-wizard .setup-steps a { display: grid; justify-items: center; align-content: start; gap: 5px; padding: 6px 3px; text-align: center; font-size: .78rem; line-height: 1.2; }
  .signup-wizard .button { min-height: 44px; }
}
@media(max-width:520px) {
  #setup-phone-numbers { grid-template-columns: minmax(0,1fr); }
  .signup-wizard .setup-channel-row .signup-channel-option { gap: 7px; padding-inline: 9px; }
}

:is(.signup-wizard,.signup-flow) .agent-voice-option { gap: 6px; padding-inline: 7px; }
:is(.signup-wizard,.signup-flow) .agent-voice small { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width:420px) {
  :is(.signup-wizard,.signup-flow) .agent-voice-option { padding-inline: 3px; }
  :is(.signup-wizard,.signup-flow) .agent-voice .home-agent-orb { width: clamp(36px,12vw,49px); }
}

.signup-wizard .setup-agent-card { padding: clamp(17px,3vw,34px); }
.setup-agent-card .setup-description { margin-bottom: 25px; }
.setup-agent-name input { max-width: 360px; }
.setup-agent-card .agent-fieldset { padding-block: 0 17px; border-bottom: 1px solid var(--line); }
.setup-agent-card .agent-field-hint { margin-bottom: 10px; }
.setup-agent-card .agent-voice-option {
  position: relative;
  gap: 5px;
  padding-block: 38px 12px;
  background: var(--white);
}
.setup-agent-card .agent-voice-option:has(input:checked) {
  background: var(--control-fill);
  border-color: #858585;
  box-shadow: inset 0 0 0 1px #858585;
}
.setup-agent-card .agent-voice-option:has(input:checked)::before {
  content: '';
  position: absolute;
  inset: 15px auto auto 14px;
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
}
.setup-agent-card .agent-voice-note { margin-top: 8px; }
.setup-greeting { min-width: 0; margin: 0; padding: 0; border: 0; }
.setup-greeting-presets {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; padding: 3px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--rail);
}
.form-grid .setup-greeting-presets label { position: relative; display: grid; cursor: pointer; }
.setup-greeting-presets span {
  display: grid; place-items: center; text-align: center; min-height: var(--control-height);
  padding: 3px 6px; border-radius: 6px; color: var(--muted);
}
.setup-greeting-presets label:hover span { background: var(--wash); color: var(--ink); }
.setup-greeting-presets input:checked + span {
  background: var(--white); color: var(--ink); box-shadow: 0 0 0 1px #d2d2d2;
}
.setup-greeting-presets input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.setup-custom-greeting { margin-top: 15px; }
.setup-custom-greeting textarea { min-height: 44px; }
.setup-custom-greeting .setup-field-hint { margin-top: 7px; }
.setup-greeting-preview {
  margin-top: 15px; padding: clamp(12px,2vw,18px);
  border: 1px solid var(--line); border-radius: var(--surface-radius); background: var(--control-fill); overflow-wrap: anywhere;
}
.setup-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; }
.setup-preview-header h3 { font-size: .92rem; }
.setup-preview-header [data-greeting-voice] { display: block; color: var(--muted); font-size: .78rem; }
.setup-preview-header .setup-play-greeting { gap: 6px; padding-inline: 10px; background: var(--white); }
.setup-preview-header .setup-play-greeting:is(:hover,[data-playing]) { background: var(--wash); }
.setup-play-greeting .icon { width: 16px; height: 16px; }
.setup-greeting-preview p { margin-top: 12px; line-height: 1.5; white-space: pre-wrap; }
@media(max-width:410px) {
  .setup-greeting-presets { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

.signup-wizard [data-step="phone"] { gap: 21px; }
.phone-setup-section {
  display: grid; gap: 9px; min-width: 0; margin: 0; padding: 0; border: 0;
}
.signup-wizard .phone-setup-section > legend { margin-bottom: 10px; font-size: 1rem; }
.phone-setup-choices {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; padding: 4px;
  border: 1px solid var(--line); border-radius: var(--surface-radius); background: var(--rail);
}
.form-grid .phone-setup-choices label { position: relative; cursor: pointer; }
.phone-setup-choices span {
  display: grid; place-items: center; min-height: 38px; padding: 5px 6px;
  border: 1px solid transparent; border-radius: 6px; color: var(--muted);
  text-align: center; line-height: 1.25;
}
.phone-setup-choices label:hover span { background: var(--wash); color: var(--ink); }
.phone-setup-choices input:checked + span { border-color: #c6c6c6; background: var(--white); color: var(--ink); }
.phone-setup-choices input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.phone-choice-hint { max-width: 53ch; }
.phone-setup-fields {
  gap: 10px; padding: clamp(12px,2vw,17px); border: 1px solid var(--line);
  border-radius: var(--surface-radius); background: var(--rail);
}
.phone-setup-fields .setup-note { padding: 0; background: transparent; }
.phone-setup-fields .setup-note p { margin: 0; }
.phone-setup-number-heading { font-size: .9rem; }
.phone-field-error { color: #943d44; font-size: .86rem; }
.phone-setup-fields input[aria-invalid="true"] { border-color: #a1474f; }
@media(max-width:620px) {
  .phone-setup-choices span { min-height: 44px; padding-inline: 4px; font-size: .85rem; }
}

.phone-setup-fields input[name="area"] { font-variant-numeric: tabular-nums; }
.setup-example-numbers { display: grid; gap: 7px; }

.setup-phone-code-fields { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 8px; }
@media(max-width:440px) {
  .setup-phone-code-fields { grid-template-columns: minmax(0,1fr); }
}

.signup-progress { max-width: 903px; margin-bottom: clamp(19px,3vw,33px); }
.signup-progress-head { display: flex; justify-content: space-between; gap: 8px; font-size: .84rem; }
.signup-progress-head span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }

.brand-layout {
  container: brand-layout / inline-size;
  --brand-panel-inset: clamp(15px,2vw,24px);
  --brand-section-gap: clamp(28px,4cqi,38px);
  --brand-field-gap: 16px;
}
.brand-layout .page-head p { margin-top: 6px; }
.brand-workspace { display: grid; gap: clamp(38px,5.5cqi,54px); align-items: start; }
.brand-editor,.brand-preview { min-width: 0; }
.brand-editor { container: brand-editor / inline-size; }
.brand-controls {
  display: grid; gap: var(--brand-field-gap); min-width: 0; padding-block: var(--brand-section-gap);
}
.brand-controls:first-child { padding-block-start: 0; }
.brand-controls + .brand-controls { border-top: 1px solid var(--line); }
.brand-controls h2,.brand-preview h2 { font-size: 1.13rem; font-weight: 550; line-height: 1.25; letter-spacing: -.012em; }
.brand-controls :is(.brand-field-label,label:not(.button)) { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.brand-field-row,.brand-color-control,.brand-button-settings > label { display: grid; gap: 7px; min-width: 0; }
.brand-field-row > div { min-width: 0; }
.brand-controls .dashboard-select-trigger,.brand-controls label > input:not([type="file"]) { width: 100%; min-width: 0; }
.brand-controls .dashboard-select-trigger { font-size: .86rem; }
.brand-controls input[name="name"],#brand-preview-title { scroll-margin-block-start: 70px; }
.brand-field-note { margin-top: 7px; color: var(--muted); font-size: .81rem; line-height: 1.4; }
.brand-logo-field { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.brand-logo-tile,.brand-preview-mark {
  display: grid; place-items: center; flex: none; overflow: hidden; width: 46px; aspect-ratio: 1;
  border-radius: 9px; border: 1px solid var(--line); background: var(--rail);
}
.brand-logo-tile img,.brand-preview-mark img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.brand-upload { position: relative; cursor: pointer; }
.brand-upload:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.brand-logo-error { color: #943d44; font-size: .86rem; }
.brand-colors,.brand-button-settings { display: grid; gap: 10px; }
.brand-color-field {
  display: flex; align-items: center; gap: 7px; min-width: 0; min-height: var(--control-height);
  padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--white);
}
.brand-color-field:focus-within { border-color: var(--accent); }
.brand-color-field input { min-width: 0; }
.brand-color-swatch {
  flex: none; width: 30px; height: 30px; min-height: 0; padding: 0;
  border: 1px solid #7777; border-radius: 5px; background: var(--brand-swatch);
}
.brand-color-swatch[aria-expanded="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand-color-field input[type="text"] {
  width: 100%; min-height: 30px; padding: 3px 2px; border: 0; background: transparent;
  color: var(--ink); font: .82rem var(--mono);
}
.brand-color-field input[type="text"]:focus-visible { outline-offset: -2px; }
.brand-color-field input[type="text"]:invalid { color: #943d44; }
.brand-font-popup .search-field { width: 100%; padding-inline: 12px; }
.brand-font-results { max-height: min(44svh,370px); overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px; }
.brand-font-results section + section { margin-top: 12px; }
.brand-font-results h3 { margin: 6px 8px; color: var(--muted); font-size: .8rem; font-weight: 400; }
.brand-font-results button {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-height: 42px;
  border: 0; border-radius: 8px; padding: 7px 9px; background: transparent; text-align: start;
}
.brand-font-results button:is(:hover,[aria-pressed="true"]) { background: var(--wash); }
.brand-font-results button:focus-visible { outline-offset: -2px; }
.brand-font-selected { color: var(--muted); font-size: .8rem; }
.brand-choice-options,.brand-launcher-icon-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.brand-choice-options label { position: relative; cursor: pointer; }
.brand-choice-options label > span {
  display: flex; align-items: center; min-height: var(--control-height); padding-inline: 8px; border-radius: 6px;
}
.brand-choice-options label:hover > span { color: var(--ink); background: var(--paper); }
.brand-choice-options input:checked + span { color: var(--ink); background: var(--wash); }
.brand-choice-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.brand-launcher-icon-option {
  display: grid; place-items: center; width: var(--control-height); height: var(--control-height); padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted);
}
.brand-launcher-icon-option:hover { color: var(--ink); background: var(--paper); }
.brand-launcher-icon-option[aria-pressed="true"] { color: var(--ink); background: var(--wash); }
.brand-launcher-icon-option :is(.icon,img),.brand-chat-launcher :is(.icon,img) { flex: none; width: 20px; height: 20px; object-fit: contain; }
.brand-advanced { border-top: 1px solid var(--line); padding-block: 8px; }
.brand-advanced > summary {
  justify-content: space-between; min-height: 44px; padding-inline: 8px; border-radius: 6px;
  font-size: 1.02rem; font-weight: 500; cursor: pointer;
}
.brand-advanced > summary:hover { background: var(--paper); }
.brand-advanced-fields { display: grid; gap: var(--brand-field-gap); padding-block: 12px 16px; }
.brand-advanced-fields label { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.brand-inspector-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: .87rem; font-weight: 500;
}
.brand-inspector-head .button { min-height: 32px; padding: 4px 9px; font-size: .78rem; }
.brand-style-targets,.brand-style-align { display: flex; flex-wrap: wrap; gap: 4px; }
.brand-style-targets { margin-top: 8px; }
:is(.brand-style-targets,.brand-style-align) button {
  min-height: 36px; padding: 4px 9px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: .81rem;
}
:is(.brand-style-targets,.brand-style-align) button:hover { background: var(--paper); color: var(--ink); }
:is(.brand-style-targets,.brand-style-align) button[aria-pressed="true"] { background: var(--wash); color: var(--ink); }
.brand-style-group { display: grid; gap: 10px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.brand-style-group:last-child { padding-bottom: 0; border-bottom: 0; }
.brand-style-group h3 { font-size: .9rem; font-weight: 500; }
.brand-box-model {
  display: grid; isolation: isolate; justify-content: center; gap: 12px 10px;
  margin-top: 3px; padding: 18px 16px; border-radius: 10px; background: var(--paper);
  grid-template-columns: repeat(2,minmax(30px,42px)) minmax(52px,112px) repeat(2,minmax(30px,42px));
  grid-template-areas:
    "margin-label margin-label margin-top . ."
    ". padding-label padding-top . ."
    "margin-left padding-left element padding-right margin-right"
    ". . padding-bottom . ."
    ". . margin-bottom . .";
}
.brand-box-model::before {
  content: ''; grid-area: 2 / 2 / 5 / 5; z-index: -1;
  margin: -6px; border: 1px solid var(--line); border-radius: 8px; background: var(--wash);
}
.brand-box-legend { align-self: center; color: var(--muted); font-size: .68rem; white-space: nowrap; }
.brand-box-legend-margin { grid-area: margin-label; }
.brand-box-legend-padding { grid-area: padding-label; }
.brand-box-margin-top { grid-area: margin-top; }
.brand-box-margin-right { grid-area: margin-right; }
.brand-box-margin-bottom { grid-area: margin-bottom; }
.brand-box-margin-left { grid-area: margin-left; }
.brand-box-padding-top { grid-area: padding-top; }
.brand-box-padding-right { grid-area: padding-right; }
.brand-box-padding-bottom { grid-area: padding-bottom; }
.brand-box-padding-left { grid-area: padding-left; }
.brand-box-center {
  grid-area: element; display: grid; place-items: center; min-width: 0; min-height: 38px; padding: 4px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--white);
  text-align: center; font-size: .75rem; font-weight: 500; overflow-wrap: anywhere;
}
.brand-style-field { display: grid; align-content: start; gap: 5px; min-width: 0; }
.brand-style-field input { width: 100%; min-width: 0; min-height: 36px; padding: 4px 7px; font: .8rem var(--mono); }
.brand-style-color { position: relative; }
.brand-style-color input { padding-inline-start: 29px; }
.brand-style-swatch {
  position: absolute; inset-inline-start: 8px; bottom: 12px; width: 13px; height: 13px;
  border: 1px solid var(--line); border-radius: 3px; background: var(--style-swatch); pointer-events: none;
}
.brand-box-model input {
  justify-self: center; max-width: 42px; min-height: 38px; padding: 0 2px;
  border-color: var(--line); border-radius: 6px; background: var(--white); text-align: center; appearance: textfield;
}
.brand-box-model input::-webkit-inner-spin-button { appearance: none; }
.brand-style-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.brand-style-disclosure { border-top: 1px solid var(--line); }
.brand-style-disclosure > summary {
  justify-content: space-between; min-height: 42px; padding-inline: 4px; border-radius: 6px;
  font-size: .87rem; cursor: pointer;
}
.brand-style-disclosure > summary:hover { background: var(--paper); }
.brand-style-extra { display: grid; gap: 10px; padding-block: 7px; }
.brand-dimension { display: flex; align-items: center; gap: 8px; }
.brand-dimension input { width: 108px; min-width: 0; }
.brand-dimension > span { color: var(--muted); font: .75rem var(--mono); }
.brand-code-field { display: grid; gap: 6px; }
.brand-code-field textarea {
  min-height: 105px; max-height: 260px; border-radius: 7px; background: var(--paper);
  font: .8rem/1.55 var(--mono); tab-size: 2;
}
.brand-code-field .brand-field-note { margin-top: 0; }
.brand-save {
  display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px;
  padding-top: 16px; border-top: 1px solid var(--line);
}
.brand-preview-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px;
  margin-bottom: 16px;
}
.brand-preview-stage {
  display: grid; grid-template-columns: minmax(0,1fr); align-content: end; justify-items: end; gap: 14px;
  min-height: 380px; padding: var(--brand-panel-inset);
  border-radius: var(--surface-radius); background: var(--rail);
}
.brand-preview-stage[data-launcher-position="left"] { justify-items: start; }
.brand-chat-launcher {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 48px; min-height: 48px; max-width: 100%; padding: 8px 13px;
  border: 1px solid transparent; border-radius: var(--brand-launcherRadius);
  background: var(--brand-launcherColor); color: var(--brand-launcherInk);
  font-family: var(--brand-font); font-stretch: var(--brand-stretch); text-align: start;
  box-shadow: 0 3px 10px #20202024;
}
.brand-chat-launcher:hover { box-shadow: 0 4px 14px #20202038; }
.brand-chat-launcher span { min-width: 0; overflow-wrap: anywhere; }
.brand-example {
  width: min(100%,365px); overflow: hidden; overflow-wrap: anywhere;
  color: var(--brand-text); background: var(--brand-surface); font-family: var(--brand-font); font-stretch: var(--brand-stretch);
  border: 1px solid #0002; border-radius: var(--brand-widgetRadius,12px); box-shadow: 0 5px 16px #2020200d;
}
.brand-example-chat {
  --chat-inset: var(--brand-widgetPadding,clamp(12px,2.1vw,17px));
  --chat-tint: color-mix(in srgb,var(--brand-text) 7%,var(--brand-surface));
}
.brand-chat-header {
  display: flex; align-items: center; gap: 11px;
  padding: var(--brand-widgetPadding,12px) var(--chat-inset); color: var(--brand-onAccent); background: var(--brand-accent);
}
.brand-chat-identity { display: grid; gap: 2px; min-width: 0; line-height: 1.2; }
.brand-chat-identity strong { font-size: 1.04rem; font-weight: 500; }
.brand-chat-identity small { font-size: .75rem; color: inherit; }
.brand-chat-close {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; margin-inline: auto -4px;
  border: 0; border-radius: 6px; background: transparent; color: inherit;
}
.brand-chat-close .icon { width: 16px; height: 16px; }
.brand-chat-close:hover { background: color-mix(in srgb,currentColor 15%,transparent); }
.brand-chat-close:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.brand-example-body {
  display: grid; gap: 14px; padding: var(--brand-widgetPadding,16px) var(--chat-inset) 0;
}
.brand-chat-thread {
  display: grid; align-content: start; justify-items: start; gap: var(--brand-messageGap,8px);
  height: 130px; min-width: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.brand-chat-message {
  max-width: 87%; padding: 8px 11px; border-radius: 10px 10px 10px 4px; font-size: .91rem; line-height: 1.42;
  background: var(--chat-tint);
}
.brand-chat-customer { justify-self: end; border-radius: 10px 10px 4px 10px; color: var(--brand-onAccent); background: var(--brand-accent); }
.brand-chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.brand-chat-suggestions button { min-height: 36px; min-width: 0; font-size: .81rem; text-align: start; overflow-wrap: anywhere; }
.brand-chat-suggestions button:is(:hover,[aria-pressed="true"]) { box-shadow: inset 0 0 0 1px currentColor; }
.brand-example-chat footer { padding: var(--brand-widgetPadding,12px) var(--chat-inset) var(--brand-widgetPadding,15px); }
.brand-chat-composer {
  --composer-stroke: 1px;
  --composer-padding: 4px;
  --send-size: 31px;
  --send-radius: min(var(--brand-radius), calc(var(--send-size) / 2));
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: var(--composer-padding); padding-inline-start: 12px;
  border: var(--composer-stroke) solid color-mix(in srgb,var(--brand-text) 21%,var(--brand-surface));
  background: color-mix(in srgb,var(--brand-text) 3%,var(--brand-surface));
  border-radius: calc(var(--send-radius) + var(--composer-padding) + var(--composer-stroke)); font-size: .88rem;
}
.brand-chat-composer > span:first-child { opacity: .72; }
.brand-chat-send {
  display: grid; place-items: center; flex: none; width: var(--send-size); aspect-ratio: 1;
  border-radius: var(--send-radius); background: var(--brand-accent); color: var(--brand-onAccent);
}
.brand-chat-send .icon { width: 16px; height: 16px; }
.brand-example-chat .brand-preview-mark {
  flex: none; width: 34px; border-radius: 50%; border-color: transparent;
  color: var(--brand-accent); background: var(--brand-onAccent);
}
.brand-example .brand-preview-mark:has(img) { background: var(--white); }
.brand-example-button {
  display: inline-block; padding: 7px 12px; border: 1px solid var(--brand-accent);
  border-radius: var(--brand-radius); background: var(--brand-accent); color: var(--brand-onAccent);
}
[data-button-style="outline"] .brand-example-button {
  background: transparent; color: var(--brand-outlineInk);
  border-color: color-mix(in srgb,var(--brand-outlineInk) 46%,transparent);
}
[data-button-style="outline"] .brand-example-button:is(:hover,[aria-pressed="true"]) {
  background: color-mix(in srgb,var(--brand-outlineInk) 7%,var(--brand-surface)); border-color: currentColor; box-shadow: none;
}
@container brand-layout (min-width: 660px) {
  .brand-workspace { grid-template-columns: minmax(0,1fr) minmax(0,1.12fr); }
  .brand-preview { position: sticky; top: 72px; }
  .brand-layout .brand-mobile-jump { display: none; }
}
@media(max-width:620px) {
  .brand-font-results button { min-height: 44px; }
}
@container brand-editor (min-width: 330px) {
  :is(.brand-field-row,.brand-color-control,.brand-button-settings > label) {
    grid-template-columns: 112px minmax(0,1fr); align-items: center; gap: 12px;
  }
  .brand-field-row:has(.brand-field-note) { align-items: start; }
  .brand-field-row:has(.brand-field-note) > .brand-field-label { margin-top: 12px; }
}

.brand-color-popup,.brand-font-popup {
  position: fixed; inset: auto; margin: 0; max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: var(--surface-radius); padding: 11px;
  background: var(--white); color: var(--ink); box-shadow: 0 8px 25px #0002;
}
.brand-color-popup:popover-open,.brand-font-popup:popover-open { display: grid; gap: 10px; }
.brand-color-popup { width: 296px; padding: 12px; }
.brand-color-popup-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand-color-popup-head h3 { margin-inline-start: 2px; font-size: .94rem; font-weight: 400; }
.brand-color-popup-head .icon-button { width: 34px; height: 34px; border-radius: 7px; }
.brand-color-plane {
  position: relative; overflow: hidden; isolation: isolate;
  height: clamp(110px,20vh,151px); border: 1px solid #d7d7d7; border-radius: 8px;
  cursor: crosshair; touch-action: none;
}
.brand-color-plane::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 7px;
  background: linear-gradient(to top,#000,rgb(0 0 0 / 0)),
    linear-gradient(to right,#fff,rgb(255 255 255 / 0)),hsl(var(--picker-hue) 100% 50%);
}
.brand-color-plane:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand-color-thumb {
  --marker-inset: 9px;
  position: absolute; pointer-events: none;
  left: clamp(var(--marker-inset),var(--picker-x),calc(100% - var(--marker-inset)));
  top: clamp(var(--marker-inset),var(--picker-y),calc(100% - var(--marker-inset)));
  width: 14px; height: 14px; translate: -50% -50%; border: 2px solid #fff; border-radius: 50%;
  background: var(--picker-color); box-shadow: 0 0 0 1px #0009;
}
.brand-hue-control { display: grid; gap: 2px; }
.brand-hue-heading { display: flex; justify-content: space-between; gap: 8px; }
.brand-hue-control label,.brand-hue-heading output,.brand-rgb-controls label { color: var(--muted); font-size: .8rem; }
.brand-hue-heading output { font-variant-numeric: tabular-nums; }
#brand-hue {
  --hue-track-height: 11px;
  --hue-thumb-size: 19px;
  --hue-spectrum: linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);
  appearance: none; width: 100%; min-width: 0; height: 36px; min-height: 0; margin: 0; padding: 0 2px;
  border: 0; border-radius: 6px; background: transparent; cursor: pointer;
}
#brand-hue:focus-visible { outline-offset: 1px; }
#brand-hue::-webkit-slider-runnable-track {
  height: var(--hue-track-height); border-radius: 999px; background: var(--hue-spectrum); box-shadow: inset 0 0 0 1px #0002;
}
#brand-hue::-moz-range-track {
  height: var(--hue-track-height); border-radius: 999px; background: var(--hue-spectrum); box-shadow: inset 0 0 0 1px #0002;
}
#brand-hue::-webkit-slider-thumb {
  appearance: none; box-sizing: border-box; width: var(--hue-thumb-size); height: var(--hue-thumb-size);
  margin-top: calc((var(--hue-track-height) - var(--hue-thumb-size)) / 2);
  border: 2px solid #fff; border-radius: 50%; background: hsl(var(--picker-hue) 100% 50%);
  box-shadow: 0 0 0 1px #2228,0 1px 3px #0003;
}
#brand-hue::-moz-range-thumb {
  box-sizing: border-box; width: var(--hue-thumb-size); height: var(--hue-thumb-size);
  border: 2px solid #fff; border-radius: 50%; background: hsl(var(--picker-hue) 100% 50%);
  box-shadow: 0 0 0 1px #2228,0 1px 3px #0003;
}
.brand-rgb-controls { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.brand-rgb-controls label { display: grid; gap: 3px; }
.brand-rgb-controls input { width: 100%; min-width: 0; text-align: center; font: .85rem var(--mono); }

.brand-color-popup-head .icon-button:hover { background: var(--rail); }
.brand-color-values { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.9fr); gap: 9px; }
.brand-picker-hex { display: grid; gap: 3px; color: var(--muted); font-size: .8rem; }
.brand-picker-hex input,.brand-rgb-controls input { width: 100%; min-width: 0; padding-inline: 5px; text-align: center; font: .85rem var(--mono); }
.brand-color-values input[aria-invalid="true"] { border-color: #a1474f; color: #943d44; }
.brand-color-actions { display: flex; justify-content: space-between; gap: 8px; padding-top: 9px; border-top: 1px solid var(--line); }
.brand-color-actions .button { min-height: 36px; }
.brand-color-actions .button:disabled { opacity: .5; }
.brand-font-popup:popover-open { grid-template-rows: auto minmax(0,1fr); overflow: hidden; }
.brand-font-popup .search-field { background: var(--rail); }
.brand-font-results { min-height: 0; scroll-padding-block: 4px; }
.brand-font-results h3 { padding-bottom: 4px; border-bottom: 1px solid var(--line); }

/* Three-pane dashboard preview */
.shell[data-pane-layout] {
  --rail: #f3f2f0;
  --canvas: #fff;
  --paper: #faf9f8;
  --line: #e4e2df;
  --wash: #eeece9;
  --active: #e9e7e3;
  --control-fill: #f2f1ef;
  --ink: #2d2b28;
  --muted: #66625e;
  background: var(--rail);
}
[data-pane-layout] .sidebar { padding: 15px 10px 12px; border-right: 0; }
[data-pane-layout] .sidebar .brand { padding-inline: 8px 2px; margin-bottom: 15px; }
[data-pane-layout] .sidebar #navigation { gap: 0; }
[data-pane-layout] .sidebar #navigation > .nav-group { border: 0; margin: 0; padding: 0; gap: 2px; }
[data-pane-layout] .sidebar #navigation > .nav-group + .nav-group { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
[data-pane-layout] .sidebar :is(.nav-link,.sidebar-foot > a) { min-height: 36px; padding-inline: 9px; border-radius: 5px; gap: 8px; font-size: .88rem; }
[data-pane-layout] .sidebar .nav-link[aria-current="page"] { background: var(--active); border-radius: 5px; }
[data-pane-layout] .sidebar .nav-link > .icon,[data-pane-layout] .sidebar-foot > a > .icon { width: 16px; height: 16px; }
[data-pane-layout] .sidebar .badge { background: transparent; color: var(--muted); padding: 0; }
[data-pane-layout] .sidebar .badge::before { display: none; }
[data-pane-layout].collapsed .sidebar .brand { padding-inline: 0; }
[data-pane-layout].collapsed .sidebar :is(.nav-link,.sidebar-foot > a) { padding-inline: 0; }
[data-pane-layout] .topbar-tools { gap: 16px; }
[data-pane-layout] .top-actions { gap: 2px; padding: 2px; border-color: transparent; border-radius: 8px; background: transparent; }
[data-pane-layout] .top-actions:has(#search[aria-expanded="true"]) { background: var(--paper); }
[data-pane-layout] .top-actions > :is(#notifications,#usage-ring) { margin-inline-start: 0; }
[data-pane-layout] .top-actions > .icon-button { width: 32px; height: 32px; border-radius: 4px; color: var(--muted); }
[data-pane-layout] .top-actions > .icon-button:is(:hover,[aria-expanded="true"]) { color: var(--ink); }
[data-pane-layout] .top-actions > .icon-button > .icon { width: 16px; height: 16px; }
[data-pane-layout] .usage-ring { width: 18px; height: 18px; stroke-width: 2; }
.assistant-pane-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 7px;
  min-height: 38px; padding: 0 5px 0 8px; color: var(--muted); background: transparent;
  border: 0; border-radius: 6px; font-size: .84rem; white-space: nowrap;
}
.assistant-pane-toggle[aria-expanded="true"] { color: var(--ink); }
.assistant-pane-toggle[aria-expanded] { width: 40px; padding-inline: 0; }
.assistant-pane-toggle:hover { color: var(--ink); background: var(--paper); }
.assistant-pane-toggle .icon { display: block; width: 16px; height: 16px; }
.assistant-pane-toggle[aria-expanded] :is(.assistant-toggle-chat,.assistant-toggle-label),
.assistant-pane-toggle:not([aria-expanded]) .assistant-toggle-chevron { display: none; }
.assistant-pane-toggle[aria-expanded="false"] .assistant-toggle-chevron { transform: rotate(180deg); }
[data-live-workspace] .topbar-tools { display: none; }

@media (min-width:821px) {
  .shell[data-pane-layout] { --sidebar: 178px; }
  .shell[data-pane-layout].collapsed { --sidebar: 60px; }
  [data-pane-layout] > .body {
    --page-gutter: clamp(21px,2.45vw,42px);
    margin: 7px 8px 7px 0; border: 1px solid var(--line); border-radius: 10px;
  }
  [data-pane-layout] .topbar { height: 51px; background: var(--white); border-radius: 10px 10px 0 0; }
  [data-pane-layout] .crumb { font-size: .86rem; }
  [data-pane-layout] main { --page-heading: clamp(1.72rem,2.24vw,2.22rem); }
}
@media (min-width:1180px) {
  .shell[data-pane-layout] { --sidebar: clamp(168px,13vw,205px); }
  .shell[data-pane-layout][data-assistant-open] {
    grid-template-columns: var(--sidebar) minmax(0,1fr) clamp(272px,23vw,345px);
  }
  [data-pane-layout][data-assistant-open] > .body { margin-right: 0; }
  [data-pane-layout] .assistant-pane {
    position: sticky; top: 0; min-width: 0; height: 100dvh; padding: 0 clamp(12px,1.3vw,21px) 14px;
  }
  .assistant-pane .assistant-view { width: 100%; height: 100%; min-height: 0; }
  .assistant-pane-bar {
    flex: none; display: flex; align-items: center; gap: 2px;
    min-height: 57px; border-bottom: 1px solid var(--line);
  }
  .assistant-pane-bar > span { display: inline-flex; align-items: center; gap: 7px; margin-inline-end: auto; font-size: .94rem; }
  .assistant-pane-bar .icon { width: 16px; height: 16px; }
  .assistant-pane-bar .icon-button { width: 34px; height: 34px; border-radius: 7px; }
  .assistant-pane .assistant-heading { padding: 14px 0 3px; }
  .assistant-pane .assistant-heading:has(> .sr-only) { padding: 0; }
  .assistant-pane .assistant-heading h2 { font-size: 1rem; overflow-wrap: anywhere; }
  .assistant-pane .assistant-empty { justify-items: start; gap: 8px; margin: 0; padding: clamp(22px,6vh,62px) 0 12px; text-align: start; }
  .assistant-pane .assistant-empty > .assistant-avatar { display: none; }
  .assistant-pane .assistant-empty h2 { margin-bottom: 8px; font-size: 1.28rem; line-height: 1.2; }
  .assistant-pane .assistant-prompts { display: grid; justify-content: stretch; width: 100%; gap: 4px; }
  .assistant-pane .assistant-prompts .button {
    justify-content: start; text-align: start; border-color: transparent; border-radius: var(--rect-button-radius);
    min-height: 34px; padding: 5px 8px; margin-inline-start: -8px; white-space: normal;
    color: var(--muted); font-size: .86rem;
  }
  .assistant-pane .assistant-prompts .button:hover { color: var(--ink); background: var(--active); }
  .assistant-pane .assistant-thread { margin-bottom: 0; }
  .assistant-pane .assistant-history { gap: 16px; padding: 12px 1px; font-size: .88rem; }
  .assistant-pane .assistant-result { gap: 9px; }
  .assistant-pane .assistant-response { gap: 6px; }
  .assistant-pane .assistant-response .assistant-avatar { width: 24px; height: 24px; }
  .assistant-pane .assistant-response .assistant-avatar .icon { width: 13px; height: 13px; }
  .assistant-pane .assistant-composer { margin-block-start: auto; }
  .assistant-pane .assistant-composer form { padding: 8px; text-align: start; border-radius: var(--surface-radius); background: var(--white); }
  .assistant-pane .assistant-tools { gap: 5px; }
  .assistant-pane .assistant-note { font-size: .72rem; margin-top: 6px; }
  .assistant-pane .assistant-latest { white-space: nowrap; }
  .assistant-pane .assistant-voice-stage .home-agent-orb { width: clamp(90px,10vw,145px); }
  [data-pane-layout][data-assistant-open] .home-lead { grid-template-columns: minmax(0,1.46fr) minmax(210px,1fr); }
  [data-pane-layout][data-assistant-open] .home-agent-profile { padding-block: 3px 14px; }
  [data-pane-layout][data-assistant-open] .home-detail-grid { gap: 17px; }
  [data-pane-layout][data-assistant-open] main[data-page="inbox"] .inbox:has(.thread) { grid-template-columns: minmax(175px,.76fr) minmax(0,1.48fr); }
  [data-pane-layout][data-assistant-open] main[data-page="inbox"] .context { display: none; }
  [data-pane-layout][data-assistant-open] main[data-page="inbox"] .thread-heading-main .inbox-details-button { display: inline-flex; }
}

.assistant-view .assistant-page-composer form[data-voice-open] {
  padding: 12px 0 10px; gap: 16px; border: 0; border-radius: 0; background: transparent;
}
.assistant-view .assistant-voice-stage { gap: 14px; }
.assistant-view .assistant-voice-stage .home-agent-orb { margin-block: 4px 0; }
.assistant-view form[data-voice-open] .assistant-tools { gap: 7px 10px; }
.assistant-view form[data-voice-open] .assistant-tools .assistant-voice-status { margin: 0 0 4px; }
.assistant-view form[data-voice-open] .assistant-tools :is(.assistant-mute,.assistant-end-voice) {
  justify-content: center; min-inline-size: 86px; min-height: var(--control-height); padding: 6px 11px;
  border-radius: var(--rect-button-radius); font-size: .84rem; line-height: 1.25; white-space: nowrap;
}
.assistant-pane .assistant-view:has(form[data-voice-open]) { min-height: 0; }
.assistant-pane .assistant-conversation:has(form[data-voice-open]) { overflow-y: auto; }
@media (max-width:820px) {
  [data-pane-layout] .topbar-tools { gap: 7px; }
  [data-pane-layout] .topbar-tools:has(#search[aria-expanded="true"]) > #assistant-pane-toggle { display: none; }
  [data-pane-layout] .top-actions > .icon-button { width: 36px; height: 38px; }
  .assistant-pane-toggle { min-height: 42px; padding-inline: 8px; }
}
@media (max-width:520px) {
  [data-pane-layout] .top-test { display: none; }
}

/* Center workspace in the three-pane layout */
[data-pane-layout] main {
  --page-heading: clamp(1.7rem,2.2vw,2.15rem);
  --section-heading: 1.06rem;
  max-width: 1070px;
  padding-top: clamp(28px,4.2vw,61px);
}
[data-pane-layout] main:is([data-page="agent"],[data-page="settings"],[data-page="help"],[data-page="onboarding"]) { max-width: 940px; }
[data-pane-layout] main[data-page="inbox"] { max-width: none; padding-top: 22px; }
[data-pane-layout] main .page-head { margin-bottom: clamp(22px,3vw,34px); }
[data-pane-layout] main .page-head p { color: var(--muted); max-width: 58ch; }
[data-pane-layout] main .button { border-radius: var(--rect-button-radius); }
[data-pane-layout] main :is(.dashboard-select-trigger,.search-field) { border-radius: 5px; }
[data-pane-layout] main .button.outline { border-color: var(--line); }
[data-pane-layout] main .button.outline:hover { background: var(--wash); }
[data-pane-layout] main :is(.panel-head,.section-head)>a.button { text-decoration: none; }

/* Home reads as one document with a compact agent row. */
[data-pane-layout] .center-home {
  --section-surface: #f5f4f2;
  --section-inset: clamp(12px,1.5vw,20px);
  display: grid; max-width: 780px; gap: clamp(24px,3.3vw,40px); margin-inline: auto;
}
[data-pane-layout] .center-home .home-header { margin: 0; }
[data-pane-layout] .center-home h1 { letter-spacing: -.028em; }
[data-pane-layout] .center-agent {
  display: flex; align-items: center; flex-flow: row wrap; gap: 12px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--surface-radius); background: var(--paper);
}
.center-agent > .home-agent-orb { width: 54px; flex: none; }
.center-agent-name { flex: 1 1 150px; min-width: 0; }
.center-agent-name h2 { font-size: 1.05rem; overflow-wrap: anywhere; }
.center-agent-name p { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 3px; color: var(--muted); font-size: .82rem; }
.center-agent-state::after { content: '·'; margin-inline-start: 8px; }
.center-agent-state:only-child::after { content: none; }
.center-agent .home-agent-actions { display: flex; flex-wrap: wrap; align-items: center; width: auto; margin: 0; gap: 5px; }
.center-agent .home-agent-actions > .button { min-height: 36px; padding: 5px 9px; font-size: .8rem; }
.center-agent .home-agent-links a { min-height: 36px; padding-inline: 7px; }
.center-section { min-width: 0; }
.center-home #home-attention { container-type: inline-size; }
.center-home #home-overview {
  padding: var(--section-inset); border-radius: var(--surface-radius); background: var(--section-surface);
  container-type: inline-size;
}
.center-home #home-overview .section-head { align-items: flex-start; }
.center-section .section-head { min-height: 30px; margin-bottom: 7px; }
.center-section .section-head .button { min-height: 30px; background: transparent; color: var(--muted); }
.center-section .section-head .button:hover { background: var(--wash); color: var(--ink); }
.center-home #home-attention .section-head { margin-bottom: 10px; }
.center-home #home-attention h2 { display: inline-flex; align-items: center; gap: 8px; }
.attention-queue-link {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 9px;
  border-radius: 6px; color: var(--muted); font-size: .82rem;
}
.attention-queue-link:hover { background: var(--wash); color: var(--ink); text-decoration: none; }
.center-home #home-attention .section-count {
  display: inline-grid; place-items: center; min-width: 22px; min-height: 21px;
  margin: 0; padding-inline: 4px; border-radius: var(--compact-radius); background: var(--wash); font-size: .73rem;
}
.attention-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.attention-ticket {
  display: grid; grid-template-columns: minmax(0,1fr) auto 16px; align-items: center; gap: 8px 14px;
  min-height: 62px; padding: 10px clamp(12px,1.5vw,18px); border-radius: var(--surface-radius);
  background: var(--paper); color: var(--ink);
}
.attention-ticket:is(:hover,:focus-visible) { background: var(--wash); text-decoration: none; }
.attention-ticket:focus-visible { outline-offset: -2px; }
.attention-ticket-main { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.attention-ticket-main strong { font-weight: 500; line-height: 1.3; }
.attention-ticket-main small { color: var(--muted); font-size: .79rem; }
.attention-ticket .badge { justify-self: start; }
.attention-ticket-arrow { display: grid; place-items: center; color: var(--muted); }
.attention-ticket-arrow svg { width: 13px; height: 13px; }
@container (max-width:440px) {
  .attention-ticket { grid-template-columns: minmax(0,1fr) 16px; }
  .attention-ticket-arrow { grid-column: 2; grid-row: 1 / 3; }
}
.center-list .queue-entry {
  min-height: 55px; padding: 8px 4px; border: 0; border-radius: 0; background: transparent;
}
.center-list .queue-entry + .queue-entry { border-top: 1px solid var(--line); }
.center-list .queue-entry:hover,.center-channels .home-channel:hover { background: var(--paper); }
.center-list .activity-entry { grid-template-columns: minmax(0,1fr) auto; }
.center-list .queue-action { color: var(--muted); }
.home-support-chart { margin: 12px 0 0; }
.home-chart-all { color: var(--chart-ink); }
.home-chart-ai { color: var(--chart-accent); }
.home-chart-legend {
  display: flex; flex-wrap: wrap; gap: 5px 15px; margin: 0 0 5px; padding: 0; list-style: none; font-size: .79rem;
}
.home-chart-legend li { display: inline-flex; align-items: center; gap: 6px; }
.home-chart-legend li > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.home-chart-frame { padding-inline-end: 34px; }
.home-chart-plot { position: relative; height: clamp(119px,12vw,156px); }
.home-chart-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.home-chart-line { fill: none; stroke-width: 1.7; stroke-linecap: round; }
.home-chart-end {
  position: absolute; inset-inline-start: 100%; top: var(--end-y); translate: 0 -50%;
  padding-inline-start: 9px; font-size: 1.1rem; line-height: 1; font-variant-numeric: tabular-nums;
}
.home-chart-end::before {
  content: ''; position: absolute; inset-inline-start: -3px; top: calc(50% - 3px);
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.home-chart-time {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) 0;
  color: var(--muted); font-size: .71rem; line-height: 1.25;
}
.home-chart-time > span { grid-row: 1; white-space: nowrap; }
.home-chart-time > span:nth-child(2) { grid-column: 2; }
.home-chart-time > span:nth-child(3) { grid-column: 3; }
.home-chart-time > span:nth-child(4) { grid-column: 4; }
.home-chart-time > span:not(:first-child,:last-child) { justify-self: start; translate: -50% 0; }
.home-chart-time > span:last-child { grid-column: 5; justify-self: end; }
@container (max-width:340px) {
  .home-chart-time span:nth-child(even) { display: none; }
  .home-chart-end { font-size: 1rem; }
}
.center-home-details { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: clamp(24px,3.5vw,46px); }
.center-home-details .section-head {
  padding: 5px 9px; background: var(--section-surface); border-radius: 7px;
}
.center-channels .home-channel,.center-channels .home-channel:first-child {
  grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 3px 6px; padding: 9px 4px; border: 0;
}
.center-channels .home-channel + .home-channel { border-top: 1px solid var(--line); }
.center-channels h3 { font-size: .94rem; }
.center-channels small { grid-column: 1; }
.center-channels .channel-state { grid-row: 2; grid-column: 1; margin: 1px 0 0; }
.center-channels .action-pill { grid-row: 1 / 3; grid-column: 2; align-self: center; background: transparent; border: 0; padding: 0 5px; min-height: 30px; color: var(--muted); }

/* Collection pages use ruled lists, with decoration reserved for controls and state. */
[data-pane-layout] main .table-shell { border: 0; border-radius: 0; }
[data-pane-layout] main .table th { background: var(--white); font-size: .79rem; border-block: 1px solid var(--line); }
[data-pane-layout] main .table tr:last-child td { border-bottom: 1px solid var(--line); }
[data-pane-layout] main .table tr:hover td { background: var(--paper); }
[data-pane-layout] main :is(#ticket-results,.selectable-directory) .table tr[data-selected] td { background: var(--wash); }
[data-pane-layout] main .collection-toolbar { margin-bottom: 13px; }
[data-pane-layout] main .ticket-bulk-bar { border-radius: 7px; background: var(--paper); }
[data-pane-layout] main .source-card { border-radius: 7px; background: var(--paper); }
[data-pane-layout] main .source-card[data-selected] { background: var(--wash); }
[data-pane-layout] main .ticket-thread { border-radius: var(--surface-radius); }
[data-pane-layout] main .pane-label { background: var(--white); }

/* Configuration and reports share a flat section hierarchy. */
[data-pane-layout] main .record-details > .panel {
  border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 15px 0 0;
}
[data-pane-layout] main .row-icon { background: transparent; width: 25px; }
[data-pane-layout] main .setup-card {
  border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent;
  padding-inline: 0; box-shadow: none;
}
[data-pane-layout] main .report-summary { background: transparent; border-block: 1px solid var(--line); border-radius: 0; }
@media (max-width:740px) {
  [data-pane-layout] main .center-agent .home-agent-actions { flex-basis: 100%; }
  [data-pane-layout] main .table tr:last-child td { border-bottom: 0; }
  [data-pane-layout] main .table th { border-block: 0; }
  [data-pane-layout] main .table tbody { border-bottom: 1px solid var(--line); }
}
@media (max-width:380px) {
  .assistant-pane-toggle { min-width: 42px; }
  .assistant-toggle-label { display: none; }
  [data-pane-layout] .topbar .crumb > span:last-child { max-inline-size: 64px; }
  [data-pane-layout] .topbar:has(#search[aria-expanded="true"]) .crumb > span:last-child { max-inline-size: 0; }
  [data-pane-layout] #search[aria-expanded="true"] + .top-search-drawer { inline-size: min(205px,calc(100vw - 142px)); }
}

/* Filter controls share the Knowledge layout switch treatment. */
main :is(.dashboard-filter-select > .dashboard-select-trigger,.inbox-filter-toggle,.customer-directory-tabs a,.activity-view) {
  min-height: 36px; padding: 5px 9px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: .86rem; text-decoration: none;
}
main .dashboard-filter-select > .dashboard-select-trigger { gap: 9px; padding-inline-end: 12px; }
main :is(.dashboard-filter-select > .dashboard-select-trigger:hover,.inbox-filter-toggle:hover,.customer-directory-tabs a:hover,.activity-view:hover) {
  background: var(--paper); color: var(--ink);
}
main :is(.dashboard-filter-select > .dashboard-select-trigger[aria-expanded="true"],.dashboard-filter-select[data-filter-active] > .dashboard-select-trigger,
  .inbox-filter-toggle[aria-expanded="true"],.inbox-filter-toggle:has(.inbox-filter-count:not([hidden])),
  .customer-directory-tabs a[aria-current="page"],.activity-view[aria-pressed="true"]) {
  background: var(--wash); color: var(--ink);
}
.dashboard-filter-select .dashboard-select-list { padding: 5px; border-radius: var(--surface-radius); background: var(--white); }
.dashboard-filter-select .dashboard-select-list [role="option"] { border-radius: 6px; color: var(--muted); }
.dashboard-filter-select .dashboard-select-list [role="option"]:is([data-active],:hover) { background: var(--paper); color: var(--ink); }
.dashboard-filter-select .dashboard-select-list [role="option"][aria-selected="true"] { background: var(--wash); color: var(--ink); }
@media (max-width:820px) {
  main :is(.dashboard-filter-select > .dashboard-select-trigger,.inbox-filter-toggle,.customer-directory-tabs a,.activity-view) {
    min-height: var(--control-height);
  }
}

.settings-sections { max-width: 760px; }
.settings-sections h2 { scroll-margin-top: 22px; }
.settings-note { padding-block-start: 10px; font-size: .85rem; }

/* Ticket work queue and conversation detail */
main[data-page="tickets"] { --ticket-surface: #f5f4f2; }
main[data-page="tickets"] .page-head { margin-bottom: clamp(16px,2.5vw,28px); }
.ticket-views { justify-content: space-between; gap: 7px 12px; }
.ticket-views > div { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; min-width: 0; }
.ticket-views .ticket-stored-views { margin-inline-start: auto; }
.ticket-views a { gap: 5px; }
.ticket-views .icon { width: 14px; height: 14px; }
main[data-page="tickets"] .ticket-toolbar {
  align-items: center; padding: 8px; margin-bottom: 16px; border-radius: var(--surface-radius); background: var(--ticket-surface);
}
.ticket-toolbar .search-field { flex: 1 1 225px; max-width: 360px; }
.ticket-toolbar .collection-count { margin-inline-start: auto; }
.ticket-toolbar #ticket-extra-filters { padding: 5px 0 0; }
main[data-page="tickets"] #ticket-results th { background: var(--ticket-surface); }
#ticket-results .ticket-subject { display: inline-block; color: var(--ink); text-decoration: none; }
#ticket-results .ticket-subject:is(:hover,:focus-visible) { text-decoration: underline; }
#ticket-results .table-note { line-height: 1.35; }
main[data-page="tickets"] :is(.ticket-steps,.ticket-actions) .icon-button {
  border: 0; border-radius: 7px; background: var(--ticket-surface);
}
main[data-page="tickets"] :is(.ticket-steps,.ticket-actions) .icon-button:hover:not(:disabled) { background: var(--wash); }
.ticket-conversation-heading {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 10px 16px; margin-block: 18px; padding-bottom: 0; border: 0;
}
.ticket-conversation-heading .thread-heading-main { flex: 1 1 285px; }
.ticket-conversation-heading h1 { font-size: clamp(1.45rem,2.6vw,2rem); letter-spacing: -.032em; }
.ticket-conversation-heading .actions { margin: 0; }
.ticket-conversation-label { font-size: var(--section-heading); line-height: 1.25; }
main[data-page="tickets"] .ticket-thread { min-height: 0; border-radius: var(--surface-radius); }
.ticket-thread .context { background: var(--ticket-surface); }
.ticket-thread .conversation-turn.outgoing p { background: #ebe5df; }
.ticket-thread .inbox-case-summary { padding: 0 8px; border-radius: 7px; background: var(--ticket-surface); }
[data-pane-layout] main .ticket-record-details > .panel { padding: clamp(12px,2vw,22px); border: 0; border-radius: var(--surface-radius); background: var(--ticket-surface); }
@media (max-width:620px) {
  .ticket-views .ticket-stored-views { margin-inline-start: 0; }
  .ticket-toolbar .collection-count { grid-column: auto; }
  #ticket-results .table tbody tr { padding-inline: 6px; }
  #ticket-results .table td { padding-block: 0; }
  main[data-page="tickets"] #ticket-results .table thead tr { background: var(--ticket-surface); }
}

.phone-beta {
  display: grid;
  gap: 36px;
  max-width: 760px;
}
.phone-beta-settings,
.phone-beta-tickets {
  border-top: 1px solid var(--line, #ddd);
  padding-top: 20px;
}
.phone-beta-line,
.phone-beta-actions,
.phone-beta-tickets li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.phone-beta-actions {
  justify-content: flex-start;
}
.phone-beta form {
  margin-top: 24px;
}
.phone-beta p {
  margin: 0;
}
.phone-beta textarea {
  width: 100%;
}
.phone-beta-tickets h2 {
  margin: 0;
}
.phone-beta-tickets > p,
.phone-beta-tickets ul {
  margin: 16px 0 0;
}
.phone-beta-tickets ul {
  padding: 0;
  list-style: none;
}
.phone-beta-tickets li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line, #ddd);
}
