@font-face {
  font-family: Golos;
  src: url("/desk/assets/golos-text.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ground: #f5f6f7;
  --surface: #fff;
  --ink: #191b1f;
  --muted: #60646c;
  --line: #e5e7eb;
  --active: #e9ebee;
  --control: #c9cdd3;
  --accent: #1d5fbf;
  --error: #a82b34;
  --success: #24734c;
  --radius: 8px;
  font-family: Golos, system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
  font-size: 14px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--control);
  border-radius: 6px;
  background: var(--surface);
  min-height: 36px;
  padding: 7px 13px;
  line-height: 20px;
}
button:hover {
  background: #f0f1f3;
}
button:active {
  background: #e6e8ec;
}
button:disabled {
  cursor: not-allowed;
  color: #676b73;
  background: #f2f3f4;
  border-color: #ddd;
}
button.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
button.primary:hover {
  background: #353941;
}
button.primary:disabled {
  background: #e2e4e8;
  color: #636771;
  border-color: #d5d7db;
}
button.quiet {
  border-color: transparent;
  background: transparent;
}
button.quiet:hover {
  background: var(--active);
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
::selection {
  background: #dce8fa;
  color: #112c54;
}
input,
textarea {
  caret-color: var(--accent);
}
input,
textarea,
select {
  border: 1px solid var(--control);
  border-radius: 6px;
  background: white;
  padding: 9px 11px;
  min-height: 38px;
  width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: #696e77;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 16px;
  font-weight: 500;
}
h3 {
  font-size: 14px;
  font-weight: 500;
}
small,
.meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.muted {
  color: var(--muted);
}
.num,
time {
  font-variant-numeric: tabular-nums;
}
.num {
  text-align: right;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  padding: 12px;
  background: white;
  z-index: 99;
}
.skip-link:focus {
  top: 8px;
}
/* 1440 = 224 nav + 1216 workspace. Workspace gutters 32 + 32; usable 1152. */
.shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  padding: 24px 12px 16px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
}
.brand {
  padding: 0 14px 24px;
}
.wordmark {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -1px;
}
.mark {
  font-weight: 400;
  color: #747a84;
  margin-left: 2px;
}
.brand p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.navgroup {
  margin: 12px 0;
}
.navgroup > p {
  font-size: 12px;
  color: var(--muted);
  padding: 0 14px 9px;
}
.navitem {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 8px 14px;
  margin: 2px 0;
  font-weight: 400;
  color: #50555e;
}
.navitem svg {
  width: 17px;
  height: 17px;
  flex: none;
  stroke-width: 1.6;
}
.navitem.active {
  background: var(--active);
  color: var(--ink);
}
.navitem:hover {
  background: #eceef0;
}
.navitem .count {
  margin-left: auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.account {
  margin-top: auto;
  padding: 24px 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e1e5eb;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex: none;
}
.account .name {
  flex: 1;
  font-size: 12px;
}
.mobilebar {
  display: none;
}
main {
  min-width: 0;
  padding: 30px 32px 40px;
}
.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.pagehead p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.5;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.actions > span {
  margin-right: auto;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.panelhead {
  padding: 20px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.panelhead p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.empty {
  padding: 30px 24px;
  color: var(--muted);
  line-height: 1.6;
}
.empty strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 5px;
}
.notice {
  border: 1px solid #e7d49e;
  background: #fffbef;
  color: #725013;
  border-radius: 6px;
  padding: 12px 16px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.error {
  color: var(--error);
}
.notice.error {
  background: #fff4f3;
  border-color: #eed0cd;
  color: #8c2931;
}
.status {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--muted);
}
.status:before {
  content: "";
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #8d939b;
  flex: none;
}
.status.healthy:before,
.status.sent:before,
.status.won:before {
  background: var(--success);
}
.status.attention:before,
.status.unknown:before,
.status.failed:before {
  background: var(--error);
}
.status.ready:before,
.status.reply_received:before {
  background: var(--accent);
}
.status.approved:before,
.status.sending:before {
  background: #946512;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.toolbar input {
  max-width: 360px;
}
.toolbar select {
  width: auto;
  max-width: 200px;
}
.toolbar .total {
  margin-left: auto;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}
.todaygrid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}
.reviewrow {
  padding: 19px 20px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border-top: 1px solid #eff0f2;
}
.reviewrow:first-child {
  border-top: 0;
}
.reviewrow h3 {
  line-height: 1.5;
}
.reviewrow p {
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  line-height: 1.5;
}
.reviewrow .rowmeta {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.reviewrow button {
  align-self: center;
}
.smallrow {
  padding: 16px 20px;
  border-top: 1px solid #eff0f2;
}
.smallrow:first-child {
  border-top: 0;
}
.smallrow p {
  margin-top: 5px;
  line-height: 1.5;
}
.smallrow a {
  font-size: 12px;
}
.sectionstack {
  display: grid;
  gap: 24px;
}
.healthline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid #eff0f2;
  font-size: 13px;
}
.healthline:first-child {
  border-top: 0;
}
.healthline time {
  color: var(--muted);
  font-size: 12px;
}
.lastcheck {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  color: var(--muted);
}
.conversation {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: start;
}
.threadhead {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.threadhead h1 {
  font-size: 21px;
  max-width: 40ch;
}
.threadhead .meta {
  margin-top: 8px;
}
.history {
  max-height: calc(100dvh - 210px);
  overflow-y: auto;
  padding: 24px;
}
.message {
  margin-bottom: 24px;
  max-width: 72ch;
}
.message:last-child {
  margin-bottom: 0;
}
.messagehead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}
.messagehead strong {
  font-weight: 500;
}
.messagehead time {
  color: var(--muted);
}
.message p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.message.owner {
  background: #f4f5f6;
  padding: 14px 16px;
  border-radius: 8px;
}
.attachments {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.attachment {
  font-size: 13px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.review {
  position: sticky;
  top: 24px;
}
.reviewbody {
  padding: 20px;
}
.reviewbody > label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin: 20px 0 8px;
}
.reviewbody > label:first-child {
  margin-top: 0;
}
.reviewbody textarea {
  min-height: 240px;
}
.note {
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.reviewactions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.reviewactions .primary {
  flex: 1;
}
.review small {
  display: block;
  margin-top: 12px;
}
.sources {
  border-top: 1px solid var(--line);
  padding: 16px 20px;
}
.sources summary {
  cursor: pointer;
  font-size: 13px;
}
.sources article {
  margin-top: 16px;
  line-height: 1.5;
  font-size: 13px;
}
.sources article p {
  margin-top: 6px;
  color: var(--muted);
  white-space: pre-wrap;
}
.mobiletabs {
  display: none;
}
.back {
  margin-bottom: 16px;
  padding-left: 0;
}
.tableframe {
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  padding: 14px 18px;
  position: sticky;
  top: 0;
  background: white;
}
td {
  border-top: 1px solid #eff0f2;
  padding: 14px 18px;
  vertical-align: middle;
  line-height: 1.5;
}
td.identity {
  min-width: 230px;
  max-width: 480px;
  width: 45%;
}
td.identity button {
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
  min-height: 24px;
  font-weight: 500;
}
td.identity p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
td.money {
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  color: var(--muted);
  font-size: 12px;
}
.pagination .actions {
  gap: 8px;
}
.board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  align-items: start;
  padding-bottom: 16px;
}
.stage {
  flex: 0 0 250px;
}
.stagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 0 4px 14px;
}
.deal {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  min-height: 98px;
}
.deal strong {
  font-weight: 500;
  line-height: 1.5;
}
.deal p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.detailgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}
.form {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field {
  display: grid;
  gap: 8px;
}
.field label {
  font-size: 13px;
  font-weight: 500;
}
.field.wide {
  grid-column: 1/-1;
}
.field textarea {
  min-height: 110px;
}
.form .actions {
  grid-column: 1/-1;
}
.provenance {
  padding: 20px;
  line-height: 1.6;
}
.provenance h2 {
  margin-bottom: 14px;
}
.provenance dl {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  font-size: 12px;
}
.provenance dt {
  color: var(--muted);
}
.provenance dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.provenance details {
  margin-top: 20px;
}
.provenance pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.6 Golos,
    sans-serif;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  gap: 24px;
}
.metric {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.metric:first-child {
  padding-left: 0;
  border: 0;
}
.metric p {
  font-size: 12px;
  color: var(--muted);
}
.metric strong {
  display: block;
  font-size: 28px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  margin: 9px 0;
}
.metric small {
  font-size: 12px;
}
.analyticsgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}
.funnelrow {
  display: grid;
  grid-template-columns: 130px 1fr 64px;
  gap: 20px;
  align-items: center;
  margin: 25px 20px;
}
.funnelrow label {
  font-size: 13px;
}
.funnelrow svg {
  width: 100%;
  height: 12px;
  display: block;
}
.funnelrow rect {
  fill: var(--accent);
}
.funnelrow button {
  padding: 0;
  border: 0;
  min-height: 24px;
  text-align: right;
  background: none;
  font-variant-numeric: tabular-nums;
}
.footnote {
  padding: 0 20px 20px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.boot {
  padding: 48px;
  max-width: 500px;
  margin: 10vh auto;
}
.boot p {
  margin: 20px 0;
  line-height: 1.6;
  color: var(--muted);
}
.login {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  margin-top: 28px;
}
.login h1 {
  font-size: 22px;
}
.login button {
  width: 100%;
  margin-top: 4px;
}
.loading {
  height: 120px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px;
}
.loading span {
  display: block;
  background: #eceef0;
  border-radius: 3px;
  height: 13px;
  width: 80%;
}
.loading span:last-child {
  width: 55%;
}
#toast:empty {
  display: none;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: #22252a;
  color: white;
  border-radius: 8px;
  box-shadow: 0 6px 24px #0002;
  z-index: 100;
  max-width: calc(100% - 32px);
  line-height: 1.5;
}
.hidden {
  display: none !important;
}
@media (min-width: 1700px) {
  main {
    padding: 36px 44px;
  }
  .todaygrid {
    grid-template-columns: 2fr 1fr;
  }
  .conversation {
    grid-template-columns: minmax(0, 1.4fr) minmax(360px, 0.8fr);
  }
}
@media (max-width: 1100px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .sidebar.open {
    display: flex;
    position: fixed;
    z-index: 60;
    top: 52px;
    left: 0;
    width: 260px;
    height: calc(100dvh - 52px);
    background: var(--ground);
    box-shadow: 8px 8px 24px #0002;
  }
  .mobilebar {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: var(--ground);
    z-index: 50;
  }
  .mobilebar .wordmark {
    font-size: 19px;
  }
  .mobilebar button {
    min-width: 44px;
  }
  .todaygrid,
  .analyticsgrid,
  .detailgrid {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  }
  main {
    padding: 24px;
  }
  .conversation {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
    gap: 16px;
  }
  .history {
    padding: 18px;
  }
  .review {
    top: 68px;
  }
  .threadhead h1 {
    font-size: 20px;
  }
  .metrics {
    gap: 16px;
  }
  .metric {
    padding-left: 16px;
  }
}
@media (max-width: 700px) {
  main {
    padding: 20px 16px 32px;
  }
  .pagehead {
    margin-bottom: 20px;
    align-items: center;
  }
  .pagehead h1 {
    font-size: 22px;
  }
  .pagehead p {
    font-size: 13px;
  }
  .pagehead > .actions > .meta {
    display: none;
  }
  .todaygrid,
  .analyticsgrid,
  .detailgrid {
    display: block;
  }
  .sectionstack {
    margin-top: 24px;
  }
  .todaygrid > .panel {
    margin-bottom: 24px;
  }
  .reviewrow {
    padding: 16px;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
  }
  .reviewrow > .avatar {
    width: 28px;
    height: 28px;
  }
  .reviewrow > button {
    grid-column: 2;
    justify-self: start;
    min-height: 44px;
    padding: 5px 0;
    border: 0;
    background: none;
  }
  .reviewrow p {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .panelhead {
    padding: 16px;
  }
  .toolbar {
    gap: 8px;
    flex-wrap: wrap;
  }
  .toolbar input {
    flex: 1;
    min-width: 160px;
  }
  .toolbar .total {
    width: 100%;
    margin: 4px 0 0;
  }
  .toolbar select {
    max-width: 155px;
  }
  .conversation {
    display: block;
  }
  .history {
    max-height: none;
    padding: 16px;
  }
  .review {
    position: static;
  }
  .mobiletabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
  }
  .mobiletabs button {
    flex: 1;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    min-height: 44px;
  }
  .mobiletabs button.active {
    border-bottom-color: var(--ink);
  }
  .conversation[data-tab="reply"] > .historypanel,
  .conversation[data-tab="history"] > .review {
    display: none;
  }
  .reviewbody textarea {
    min-height: 260px;
  }
  .reviewactions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 12px 0 4px;
  }
  .reviewactions button {
    min-height: 44px;
  }
  .threadhead {
    display: block;
  }
  .threadhead .actions {
    margin-top: 14px;
  }
  .threadhead h1 {
    font-size: 20px;
  }
  .back {
    min-height: 44px;
  }
  .form {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 18px;
  }
  .form .field {
    grid-column: 1;
  }
  .provenance {
    margin-top: 24px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .metric:nth-child(3) {
    border: 0;
    padding-left: 0;
  }
  .metric strong {
    font-size: 26px;
  }
  .analyticsgrid > .panel {
    margin-bottom: 24px;
  }
  .funnelrow {
    grid-template-columns: 105px 1fr 44px;
    gap: 12px;
    margin: 24px 16px;
  }
  .tableframe {
    border: 0;
    background: none;
    overflow: visible;
  }
  table,
  tbody,
  tr,
  td {
    display: block;
  }
  thead {
    display: none;
  }
  tbody tr {
    position: relative;
    border-top: 1px solid var(--line);
    padding: 16px 0;
  }
  td {
    padding: 4px 0;
    border: 0;
    font-size: 13px;
  }
  td.identity {
    min-width: 0;
    max-width: none;
    width: auto;
  }
  td.identity button {
    font-size: 14px;
    min-height: 32px;
  }
  td:not(.identity)::before {
    content: attr(data-label) ": ";
    color: var(--muted);
  }
  td.money {
    text-align: left;
  }
  td:last-child:empty {
    display: none;
  }
  .pagination {
    flex-wrap: wrap;
    gap: 12px;
  }
  .pagination button {
    min-height: 44px;
  }
  .boot {
    padding: 24px;
    margin: 8vh auto;
  }
  .boot .login {
    padding: 24px;
  }
  .status {
    font-size: 12px;
  }
  .healthline {
    padding: 14px 16px;
  }
  .board {
    margin-right: -16px;
    padding-right: 16px;
  }
  button,
  input,
  select {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.mobilebar svg { width: 18px; height: 18px; }

.owner-answer { margin: 0 0 24px; }
.owner-answer summary { cursor: pointer; margin-bottom: 12px; }
.owner-answer label { display: block; margin: 14px 0 8px; }
.owner-answer textarea { min-height: 110px; margin-bottom: 12px; }
