/* Evergreen — from hempstead-platform docs/paper/design-library/light/kit.mjs */
:root {
  --page: #ffffff;
  --ink: #12201a;
  --body: #44534b;
  --muted: #73837a;
  --rule: #d3dfd8;
  --zebra: #eef4f0;
  --highlight: #dfeae3;
  --dark: #062a20;
  --dark2: #0b3b2e;
  --dark-rule: #25574a;
  --dark-block: #155843;
  --on-dark: #bfd6ca;
  --accent: #3f9c77;
  --accent-on-dark: #a8e6c3;
  --accent-on-light: #24704f;
  --display: "Newsreader", Georgia, serif;
  --text: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --danger: #a33a2a;
  /* Dashboard (platform docs/specs/dashboard/v1-simple.html) */
  --rule-soft: #e4ece7;
  --tint: #f5f8f6;
  --tint-hover: #e8f0eb;
  --amber: #8a5a00;
  --amber-bg: #fbf0d9;
  --amber-dot: #c08a1e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--page); color: var(--ink); font: 400 15px/1.6 var(--text); -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; }
a { color: var(--accent-on-light); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); }

.wordmark { font: 500 15px/1 "Cinzel", serif; letter-spacing: 0.1em; color: var(--ink); }
.wordmark.light { color: var(--on-dark); padding: 28px 24px 22px; }

.primary { background: var(--dark); color: #fff; border: 0; border-radius: 6px; padding: 10px 18px; font-weight: 500; letter-spacing: 0.01em; }
.primary:hover { background: var(--dark2); }
.primary:disabled { opacity: 0.45; cursor: default; }
.link { background: none; border: 0; color: var(--muted); padding: 0; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

/* Sign-in */
.signin { min-height: 100%; display: grid; place-items: center; background: linear-gradient(180deg, var(--zebra), var(--page) 60%); }
.signin-card { width: min(440px, calc(100% - 32px)); padding: 44px 40px; border: 1px solid var(--rule); background: #fff; border-radius: 10px; }
.signin-card h1 { font: 500 30px/1.15 var(--display); margin: 26px 0 8px; }
.signin-card .primary { margin-top: 22px; width: 100%; }
.signin-code { margin-top: 22px; border-top: 1px solid var(--rule); padding-top: 18px; }
.usercode { font: 500 28px/1 var(--mono); letter-spacing: 0.18em; color: var(--accent-on-light); margin: 6px 0 4px; }

/* Layout */
.app { display: grid; grid-template-columns: 272px 1fr; height: 100%; }
.sidebar { background: var(--dark); color: var(--on-dark); display: flex; flex-direction: column; min-height: 0; }
.new { margin: 0 16px 14px; background: transparent; color: #fff; border: 1px solid var(--dark-rule); border-radius: 6px; padding: 9px 12px; text-align: left; }
.new:hover { background: var(--dark2); }
.conversations { flex: 1; overflow-y: auto; padding: 4px 8px; }
.conversations button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--on-dark); padding: 8px 12px; border-radius: 6px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversations button:hover { background: var(--dark2); }
.conversations button.active { background: var(--dark-block); color: #fff; }
.broker { border-top: 1px solid var(--dark-rule); padding: 16px 24px 20px; }
.broker-name { color: #fff; font-weight: 500; }
.broker-email { font-size: 12px; margin-bottom: 6px; }
.broker .link { color: var(--on-dark); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 40px; border-bottom: 1px solid var(--rule); }
.topbar h2 { font: 500 20px/1.2 var(--display); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.menu { display: none; flex: none; align-items: center; background: none; border: 1px solid var(--rule); border-radius: 6px; padding: 6px 7px; color: var(--ink); cursor: pointer; }
.menu:hover { background: var(--zebra); }
.drawer-backdrop { display: none; }
.run-state { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

.messages { flex: 1; overflow-y: auto; padding: 28px 40px 12px; container: messages / inline-size; }
.messages > * { max-width: 780px; margin-left: auto; margin-right: auto; }
.empty { margin-top: 14vh; }
.empty h1 { font: 500 34px/1.15 var(--display); margin: 0 0 8px; }

.user { display: flex; flex-direction: column; align-items: flex-end; margin: 22px auto; }
.user .bubble { background: var(--zebra); border-radius: 10px; padding: 10px 16px; max-width: 78%; white-space: pre-wrap; }
.user .files { font: 12px/1.5 var(--mono); color: var(--muted); margin-top: 6px; }

.assistant { margin: 18px auto; color: var(--ink); }
.assistant h1, .assistant h2, .assistant h3 { font-family: var(--display); font-weight: 500; line-height: 1.25; margin: 1.2em 0 0.4em; }
.assistant h1 { font-size: 24px; } .assistant h2 { font-size: 20px; } .assistant h3 { font-size: 17px; }
.assistant p { margin: 0.6em 0; }
/* Lists sit close to the text: a 40px browser indent wastes a phone's width. */
.assistant ul, .assistant ol { padding-left: 1.25em; margin: 0.5em 0; }
.assistant li { margin: 0.25em 0; }
.assistant li > ul, .assistant li > ol { margin: 0.2em 0; }
/* Group headings (a power answer's lead types) set off from the leads above them. */
.assistant h3 { border-top: 1px solid var(--rule); padding-top: 0.7em; margin-top: 1.4em; }
/* A wide answer table (a 9-column call list) scrolls sideways in its box (web/app.js scrollingTables) instead of running past the answer, on desktop and phones. */
.assistant .table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0; }
.assistant .table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.assistant table { border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.assistant .table-scroll > table { margin: 0; }
.assistant th, .assistant td { border-bottom: 1px solid var(--rule); padding: 6px 12px 6px 0; text-align: left; vertical-align: top; }
.assistant th { font-weight: 600; white-space: nowrap; }
.assistant thead th { background: var(--zebra); padding-left: 8px; }
.assistant thead th:first-child { padding-left: 8px; }
/* Columns keep a readable width when the table scrolls, instead of shrinking to one word per line. */
.assistant td { min-width: 6em; max-width: 26em; }
.assistant td:first-child { min-width: 0; }
.assistant th:last-child, .assistant td:last-child { padding-right: 0; }
.assistant td { font-variant-numeric: tabular-nums; }
/* Where the chat is narrow (a phone, or beside the side panel), a small table (web/app.js scrollingTables) is one card per row, each cell under its column's name. */
@container messages (max-width: 640px) {
  .assistant table.stackable, .assistant table.stackable tbody, .assistant table.stackable tr, .assistant table.stackable td { display: block; width: 100%; max-width: none; }
  .assistant table.stackable thead { display: none; }
  .assistant table.stackable tr { border: 1px solid var(--rule); border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }
  .assistant table.stackable td { border: 0; padding: 3px 0; min-width: 0; }
  .assistant table.stackable td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .assistant table.stackable td:first-child::before { display: none; }
  .assistant table.stackable td:first-child { font-weight: 600; }
}
.assistant code { font: 13px var(--mono); background: var(--zebra); padding: 1px 4px; border-radius: 3px; }
.assistant pre { background: var(--zebra); padding: 12px 14px; border-radius: 6px; overflow-x: auto; }
.assistant pre code { background: none; padding: 0; }
.assistant blockquote { margin: 10px 0; padding-left: 14px; border-left: 3px solid var(--accent); color: var(--body); font-family: var(--display); font-style: italic; }

.activity-line { margin: 18px auto; min-height: 24px; }
.activity-heading { display: flex; align-items: center; gap: 12px; min-height: 24px; }
.activity-status { font-size: 13px; color: var(--body); }
.activity-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.activity-status, .milestone-label { overflow-wrap: anywhere; min-width: 0; }
.activity-milestones { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; color: var(--body); }
.activity-milestones li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 3px 0; }
.milestone-symbol { text-align: center; color: var(--muted); }
.activity-milestones li[data-state="complete"] .milestone-symbol { color: var(--accent-on-light); }
.milestone-state { font-size: 12px; color: var(--muted); }
@media (max-width: 480px) {
  .activity-milestones li { grid-template-columns: 16px minmax(0, 1fr); gap: 0 8px; }
  .milestone-state { grid-column: 2; }
}
.activity-dots { display: none; align-items: center; gap: 5px; flex: 0 0 28px; height: 20px; }
.activity-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.activity-line[data-state="working"] .activity-dots,
.activity-line[data-state="waiting"] .activity-dots { display: flex; }
.activity-line[data-state="working"] .activity-dots i { animation: activity-wave 1.5s ease-in-out infinite; }
.activity-line[data-state="working"] .activity-dots i:nth-child(2) { animation-delay: 0.18s; }
.activity-line[data-state="working"] .activity-dots i:nth-child(3) { animation-delay: 0.36s; }
.activity-line[data-state="failed"] .activity-status { color: var(--danger); }
@keyframes activity-wave { 50% { transform: translateY(-3px); opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .dot, .activity-dots i { animation: none !important; } }

.approval { margin: 18px auto; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 8px; padding: 16px 18px; background: #fff; }
.approval h3 { font: 500 17px/1.3 var(--display); margin: 0 0 10px; }
.approval dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: 14px; }
.approval dt { color: var(--muted); }
.approval dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.approval .body { border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; max-height: 260px; overflow-y: auto; background: var(--zebra); }
.approval .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.approval input { flex: 1 1 160px; min-width: 0; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; font: inherit; }
.approval .decline { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 9px 14px; }
.approval.resolved { opacity: 0.6; }
.approval .outcome { font-size: 13px; color: var(--muted); }
.approval .body.text { white-space: pre-wrap; word-break: break-word; }
/* As the sent email shows it: line breaks kept, repeated spaces collapsed. */
.approval .email-body .text { white-space: pre-line; word-break: break-word; }
.approval .email-body { max-height: 480px; }
.approval .signature { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.approval .signature-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.approval dd .open-doc { padding: 0; text-align: left; }
.attachment-list { list-style: none; margin: 0; padding: 0; }
.attachment-list li { margin: 0 0 2px; }
.problem { color: var(--danger); }

.app-view { margin: 14px auto; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: #fff; }
.app-view-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--muted); background: var(--zebra); }
.app-view iframe { display: block; width: 100%; height: 640px; border: 0; background: #fff; }
/* Full screen: the viewer fills the window over the chat (the inline height from the viewer doesn't apply). */
.app-view.expanded { position: fixed; inset: 12px; z-index: 60; max-width: none !important; margin: 0 !important; display: flex; flex-direction: column; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.28); }
.app-view.expanded iframe { flex: 1; height: auto !important; }
.app-view:focus { outline: none; }
.app-view:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* A finger-sized Collapse on phones. */
@media (max-width: 767px) {
  .app-view-bar .link { min-height: 44px; min-width: 44px; padding: 0 12px; font-size: 15px; }
}
.power-map-offer { margin: 10px auto 14px; }
.power-map-offer > button { border: 1px solid var(--accent); color: var(--accent-on-light); background: #fff; border-radius: 8px; padding: 6px 14px; font-size: 14px; }
.power-map-offer > button:disabled { opacity: 0.6; cursor: default; }
.power-map-offer .app-view { margin: 0; }
/* The power map in the side panel (web/app-view.js): its bar is the panel's header (as .viewer-bar) and the map fills the panel's height. Full screen expands it over the window as in the chat. */
.doc-panel .app-view { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; }
.doc-panel .app-view:not(.expanded) { border: 0; border-radius: 0; }
.doc-panel .app-view-bar { gap: 12px; padding: 10px 14px; }
.doc-panel .app-view-bar span { font: 500 16px/1.25 var(--display); color: var(--ink); }
.doc-panel .app-view iframe { flex: 1; height: auto; }
.outputs { margin: 12px auto; display: flex; flex-wrap: wrap; gap: 8px; }
.outputs a { border: 1px solid var(--rule); border-radius: 6px; padding: 6px 10px; text-decoration: none; font-size: 13px; color: var(--ink); background: var(--zebra); }
.notice { margin: 12px auto; font-size: 13px; color: var(--danger); }

.composer { border-top: 1px solid var(--rule); padding: 14px 40px 20px; }
.composer-row, .attachments { max-width: 780px; margin: 0 auto; }
.composer-row { display: flex; align-items: flex-end; gap: 10px; border: 1px solid var(--rule); border-radius: 10px; padding: 8px 8px 8px 12px; background: #fff; }
.composer-row:focus-within { border-color: var(--accent); }
.composer textarea { flex: 1; border: 0; outline: 0; resize: none; font: inherit; max-height: 220px; padding: 6px 0; background: transparent; }
.attach { color: var(--muted); padding: 6px; cursor: pointer; display: flex; }
.attach:hover { color: var(--ink); }
.send { padding: 8px 16px; }
.attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.attachments span { font: 12px var(--mono); background: var(--zebra); border-radius: 4px; padding: 3px 8px; }
.attachments button { border: 0; background: none; color: var(--muted); padding: 0 0 0 6px; }

.lightbox { border: 0; padding: 0; max-width: 92vw; max-height: 92vh; background: transparent; }
.lightbox::backdrop { background: rgba(6, 42, 32, 0.7); }
.lightbox img { max-width: 92vw; max-height: 92vh; display: block; }

/* Document viewer */
.app.with-panel { grid-template-columns: 272px minmax(0, 1fr) minmax(420px, 46%); }
.doc-panel { border-left: 1px solid var(--rule); min-width: 0; min-height: 0; display: flex; }
.doc-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(6, 42, 32, 0.55); display: flex; padding: 24px; }
.viewer { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; width: 100%; max-width: 100%; }
.viewer[data-mode="inline"] { margin: 14px auto; border: 1px solid var(--rule); border-radius: 10px; max-height: 72vh; overflow: hidden; }
.viewer[data-mode="full"] { border-radius: 10px; overflow: hidden; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--zebra); flex-wrap: wrap; }
.viewer-heading { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.viewer-heading strong { font: 500 16px/1.25 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-meta { font-size: 12px; color: var(--muted); }
.viewer-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.viewer-actions button, .viewer-link { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 4px 10px; font-size: 13px; color: var(--ink); text-decoration: none; }
.viewer-actions button.icon { padding: 4px 9px; }
.segmented { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.segmented button { border: 0 !important; border-radius: 0 !important; }
.segmented button.on { background: var(--dark) !important; color: #fff !important; }
.viewer-body { --zoom: 1; flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: 16px; background: #f4f6f5; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.viewer-body .page { position: relative; width: calc(100% * var(--zoom)); max-width: none; background: #fff; box-shadow: 0 1px 3px rgba(18, 32, 26, 0.12); margin: 0; flex-shrink: 0; }
.viewer-body .page canvas, .viewer-body .page img { display: block; width: 100%; height: auto; }
.viewer-body figcaption, .page-number { font-size: 12px; color: var(--muted); padding: 6px 8px; display: block; }
.page-number { position: absolute; right: 6px; bottom: 4px; background: rgba(255,255,255,0.85); border-radius: 4px; padding: 1px 6px; }
.viewer-note { color: var(--muted); font-size: 14px; }
.doc-text { width: 100%; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.6 var(--text); background: #fff; padding: 18px 20px; border-radius: 6px; margin: 0; }
.doc-attachments { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { border: 1px solid var(--rule); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.sheet-tabs { width: 100%; display: flex; gap: 6px; flex-wrap: wrap; }
.sheet-tabs button { border: 1px solid var(--rule); background: #fff; border-radius: 6px; padding: 4px 10px; font-size: 13px; }
.sheet-tabs button.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.sheet-table { width: 100%; overflow: auto; background: #fff; border-radius: 6px; }
.sheet-table table { border-collapse: collapse; font: 12.5px/1.4 var(--text); font-variant-numeric: tabular-nums; }
.sheet-table th, .sheet-table td { border: 1px solid var(--rule); padding: 4px 8px; white-space: nowrap; text-align: left; }
.sheet-table th { background: var(--zebra); font-weight: 600; }
.sheet-table tr:first-child th { position: sticky; top: 0; z-index: 2; text-align: center; }
.sheet-table th:first-child { position: sticky; left: 0; z-index: 1; color: var(--muted); font-weight: 500; text-align: right; }
.sheet-table tr:first-child th:first-child { z-index: 3; }
.sheet-table td.num { text-align: right; }
.sheet-table td.long { white-space: normal; min-width: 220px; max-width: 520px; }
.viewer-heading .back { align-self: flex-start; border: 0; background: none; padding: 0 0 2px; font-size: 12px; color: var(--accent-on-light); cursor: pointer; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-list { width: 100%; display: flex; flex-direction: column; background: #fff; border-radius: 6px; border: 1px solid var(--rule); overflow: hidden; }
.folder-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--rule); background: #fff; text-align: left; font: 14px/1.4 var(--text); color: var(--ink); cursor: pointer; }
.folder-row:last-child { border-bottom: 0; }
.folder-row:hover { background: var(--zebra); }
.folder-row.is-folder .folder-name { font-weight: 500; }
.folder-row.up { color: var(--muted); }
.folder-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-row .viewer-meta { flex-shrink: 0; }
.open-doc { border: 0; background: none; color: var(--accent-on-light); text-decoration: underline; text-underline-offset: 3px; font: inherit; padding: 0 0 0 8px; cursor: pointer; }
.doc-card { margin: 12px auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 14px; background: #fff; }
.doc-card strong { font: 500 15px/1.3 var(--display); }
.doc-card.secondary { border-left-width: 1px; padding: 8px 14px; }
.ghost { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 6px 12px; font-size: 13px; color: var(--ink); white-space: nowrap; }
.ghost:hover { background: var(--zebra); }
.viewer-banner { width: 100%; margin: 0; background: #fff; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 6px; padding: 8px 12px; color: var(--body); }
.viewer-body .page.loading { min-height: 320px; }
.page-problem { margin: 0; padding: 16px 16px 8px; }
.viewer-body .page .retry { margin: 0 16px 12px; }
.sheet-table > .viewer-note { margin: 8px 10px; }

/* Mid-size windows: the panel takes the sidebar's room so the chat stays readable. */
@media (max-width: 1180px) and (min-width: 761px) {
  .app.with-panel { grid-template-columns: minmax(0, 1fr) minmax(380px, 52%); }
  .app.with-panel .sidebar { display: none; }
}

@media (max-width: 760px) {
  .app.with-panel { grid-template-columns: 1fr; }
  .doc-overlay { padding: 0; }
  .viewer[data-mode="full"] { border-radius: 0; }
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .messages, .composer, .topbar { padding-left: 16px; padding-right: 16px; }
}

/* A message sent while Claude works: shown until it's delivered. */
.user.queued .bubble { opacity: 0.7; border: 1px dashed var(--muted); }
.user.queued .files { max-width: 78%; text-align: right; }

/* Claude's notes about its work (what it wrote before its last message), shown muted beside the steps, never as the answer. */
.assistant.worknote {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9em;
  margin-top: 2px;
  margin-bottom: 2px;
}

/* Where the conversation list has no column (phones, or beside the viewer), the menu opens it as a drawer. */
@media (max-width: 1180px) and (min-width: 761px) {
  .app.with-panel .menu { display: inline-flex; }
}
@media (max-width: 760px) {
  .menu { display: inline-flex; }
}
.app.drawer-open .sidebar { display: flex; position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 40; box-shadow: 0 0 40px rgba(6, 42, 32, 0.3); }
.app.drawer-open .drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(6, 42, 32, 0.35); }

/* Sidebar: the Dashboard link above the conversations */
.side-nav { display: flex; flex-direction: column; padding: 0 8px 10px; border-bottom: 1px solid var(--dark-rule); margin-bottom: 6px; }
.side-nav a { color: var(--on-dark); text-decoration: none; padding: 7px 12px; border-radius: 6px; font-size: 14px; }
.side-nav a:hover { background: var(--dark2); }
.side-nav a.active { background: var(--dark-block); color: #fff; }

/* Dashboard (web/dashboard.js), following the first-version mock: a plain page on white */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dashboard .phone-only { display: none; }
.dash-scroll { flex: 1; overflow-y: auto; }
.dash { max-width: 940px; margin: 0 auto; padding: 28px 40px 56px; }
.dash a { color: inherit; text-decoration: none; }
.dash a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.dash p { margin: 0; }
.dash-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.dash-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dash .kicker { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.dash-date { font: 400 30px/1.15 var(--display); margin: 0; letter-spacing: -0.005em; }
.dash .controls { display: flex; align-items: center; gap: 12px; padding-bottom: 3px; }
.dash .seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: #fff; }
.dash .seg button { border: 0; background: #fff; color: var(--body); padding: 5px 14px; font-size: 13px; line-height: 1.4; }
.dash .seg button + button { border-left: 1px solid var(--rule); }
.dash .seg button.on { background: var(--dark); color: #fff; }
.dash .brief { padding: 6px 16px; font-size: 13.5px; line-height: 1.4; }
.dash-banner { margin: 18px 0 0; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 6px; padding: 9px 14px; background: var(--tint); color: var(--body); font-size: 14px; }
.dash-banner.problem { border-left-color: var(--danger); color: var(--ink); background: #fbf1ef; }
.dash-loading { margin-top: 28px !important; color: var(--muted); }
.dash-note { margin-top: 8px !important; font-size: 12.5px; color: var(--muted); }
.dash-note.problem { color: var(--danger); }
.dash-link { background: none; border: 0; padding: 0; color: var(--accent-on-light); font-size: 13px; font-weight: 500; }
.dash-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Numbers strip: a ruled band, small uppercase labels, hairline dividers; nothing to click */
.strip { display: flex; margin-top: 22px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.strip .kpi { flex: 1 1 auto; padding: 10px 16px 11px; min-width: 0; }
.strip .kpi:first-child { padding-left: 0; }
.strip .kpi:last-child { padding-right: 0; }
.strip .kpi + .kpi { border-left: 1px solid var(--rule-soft); }
.kpi-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); line-height: 1.5; white-space: nowrap; }
.kpi-val { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; margin-top: 1px; }
.kpi-fig { font: 400 21px/1.3 var(--display); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.kpi-note { font-size: 12.5px; color: var(--muted); white-space: normal; }

/* Section heads: a small uppercase label and count, a hint on the right */
.dash .sec { margin-top: 28px; }
.dash .sec.tbl { margin-top: 40px; }
.dash .sec.attn { margin-top: 36px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 10px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.eyebrow .count { color: var(--ink); margin-left: 8px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.dash .hint { font-size: 12.5px; color: var(--muted); white-space: pre; }
.dash .mark { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.dash .hint .mark { margin: 0 1px 1px 0; vertical-align: middle; }
.dash .badge { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--amber); background: var(--amber-bg); border-radius: 4px; padding: 0 6px; margin-right: 6px; vertical-align: 1px; line-height: 1.6; }
.dash .src { display: inline-block; font-size: 11.5px; line-height: 1.45; border: 1px solid var(--rule); border-radius: 999px; padding: 0 8px; color: var(--muted); margin-right: 6px; vertical-align: 1px; }
.dash .ask { background: none; border: 0; padding: 0; font-size: 13px; font-weight: 500; color: var(--accent-on-light); line-height: 1.45; }
.dash .ask:hover { text-decoration: underline; text-underline-offset: 3px; }

/* To do: a tinted panel holding a plain note, one short line per item (the action, then when) */
.todo-panel { background: var(--tint); border: 1px solid var(--rule-soft); border-radius: 10px; }
.todo-list { list-style: none; margin: 0; padding: 9px 8px; }
.todo { position: relative; display: flex; align-items: baseline; gap: 13px; padding: 5px 12px 6px; border-radius: 6px; cursor: pointer; }
.todo .mk { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-4px); }
.todo.late .mk { background: var(--danger); }
.todo.q .mk { background: var(--amber-dot); }
.todo .txt { flex: 1 1 auto; min-width: 0; font: 400 17px/1.5 var(--display); color: var(--ink); letter-spacing: -0.002em; }
.todo .deal { font-weight: 500; text-decoration: underline; text-decoration-color: #bccbc2; text-decoration-thickness: 1px; text-underline-offset: 3.5px; }
.todo a.deal:hover { text-decoration-color: var(--ink); }
.todo span.deal { text-decoration: none; }
.todo .nb { white-space: nowrap; }
.todo .w { color: var(--muted); white-space: nowrap; }
.todo.late .w { color: var(--danger); font-weight: 500; }
.todo .who { color: var(--muted); }
.todo .qtag { margin: 0 0 0 9px; font-family: var(--text); font-size: 10px; vertical-align: 2.5px; }
.todo .go { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px/1 var(--text); color: transparent; }
.todo .go svg { display: block; color: #c4d1c9; transform: translateY(2px); }
.todo:hover, .todo:focus-visible { background: var(--tint-hover); outline: none; }
.todo:hover .go, .todo:focus-visible .go, .todo:hover .go svg, .todo:focus-visible .go svg { color: var(--accent-on-light); }
.todo-empty { padding: 5px 12px 6px; color: var(--muted); font-size: 14px; }
.panel-foot { display: flex; justify-content: flex-end; padding: 8px 2px 0; }

/* Active Deals: the stage filter, then a plain table on white */
.sec-tools { display: inline-flex; align-items: baseline; }
.chips { display: flex; align-items: center; gap: 6px; margin: 2px 0 14px; }
.dash .phase { display: inline-flex; align-items: baseline; gap: 6px; background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px 5px; font-size: 13px; line-height: 1.35; color: var(--body); white-space: nowrap; }
.dash .phase:hover { border-color: #b4c4ba; }
.dash .phase .n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dash .phase.on { background: var(--dark); border-color: var(--dark); color: #fff; }
.dash .phase.on .n { color: rgba(255, 255, 255, 0.62); }
.chips .means { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
table.deals { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; line-height: 1.45; }
.deals col.c-mk { width: 16px; }
.deals col.c-deal { width: 172px; }
.deals col.c-stage { width: 160px; }
.deals col.c-when { width: 100px; }
.deals col.c-fee { width: 74px; }
.deals col.c-ask { width: 34px; }
.deals th { font-size: 12.5px; font-weight: 500; color: var(--muted); text-align: left; padding: 2px 14px 9px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.deals th .sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.deals th.sorted .sort { color: var(--ink); }
.deals th svg { vertical-align: -1px; margin-left: 4px; }
.deals th.sortable svg { color: #a9b8af; }
.deals td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; color: var(--ink); overflow-wrap: anywhere; }
.deals td.mk { padding-right: 0; }
.deals td.mk .mark { margin-top: 7px; }
.deals th:last-child, .deals td:last-child { padding-right: 0; text-align: right; }
.deals .r { text-align: right; }
.deals .sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.deals .sub.danger { color: var(--danger); }
.deals .sub.pending { font-style: italic; }
.d-head { display: inline; }
.d-name { font-weight: 500; color: var(--ink); }
.dash .folder { display: inline-flex; vertical-align: -1px; margin-left: 6px; color: #9aaba1; }
.dash .folder:hover { color: var(--accent-on-light); }
.deals .stage { color: var(--body); }
.deals .stage.none { color: var(--muted); }
.deals .question { display: block; margin-bottom: 4px; }
.deals .line { display: block; }
.dash .lf-next { white-space: pre-line; }
.deals .when { font-variant-numeric: tabular-nums; white-space: nowrap; }
.deals .when.late { color: var(--danger); font-weight: 500; }
.deals .when.none { color: var(--muted); }
.deals .fee { font-variant-numeric: tabular-nums; }
.deals .fee.none { color: var(--muted); }
.dash .ask.inline { font-size: 12.5px; }
.tbl-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.tbl-foot .dash-link { margin-left: 10px; font-size: 12.5px; }

/* Needs attention: a small quiet outlined group at the bottom, only when there's something in it */
.attn-box { border: 1px solid var(--rule); border-radius: 10px; display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; }
.attn-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; column-gap: 16px; align-items: baseline; padding: 11px 14px 12px; font-size: 14px; line-height: 1.5; }
.attn-row + .attn-row { border-top: 1px solid var(--rule-soft); }
.attn-name { white-space: nowrap; }
.attn-deal { font-weight: 500; color: var(--ink); }
.attn-sub { font-size: 12.5px; color: var(--muted); margin-left: 8px; }
.attn-what { color: var(--body); }

/* The phone list (the table's rows, stacked) */
.ph-sort { font-size: 12.5px; color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; padding: 1px 10px; background: #fff; }
.ph-list { border-top: 1px solid var(--rule); }
.ph-row { position: relative; padding: 13px 0 12px 14px; border-bottom: 1px solid var(--rule-soft); }
.ph-row > .mark { position: absolute; left: 0; top: 21px; }
.ph-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ph-name { font-weight: 500; font-size: 15px; color: var(--ink); }
.ph-when { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.ph-when.late { color: var(--danger); font-weight: 500; }
.ph-when.none { color: var(--muted); }
.ph-next { margin-top: 3px !important; font-size: 14px; line-height: 1.5; color: var(--ink); }
.ph-next .question, .ph-next .line { display: block; }
.ph-wait { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.ph-wait.pending { font-style: italic; }
.ph-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.ph-tools { display: inline-flex; align-items: baseline; gap: 10px; flex: none; }

@media (max-width: 760px) {
  .dashboard .wide-only { display: none; }
  .dashboard .phone-only { display: revert; }
  .dashboard .ph-list.phone-only { display: block; }
  .dash { padding: 20px 16px 40px; }
  .dash-top { flex-direction: column; align-items: stretch; gap: 14px; }
  .dash-title { align-items: flex-start; }
  .dash-date { font-size: 25px; line-height: 1.2; }
  .dash .controls { justify-content: space-between; padding-bottom: 0; }
  .strip { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; }
  .strip .kpi { padding: 9px 0 10px; }
  .strip .kpi + .kpi { border-left: 0; }
  .strip .kpi:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--rule-soft); }
  .strip .kpi:nth-child(2), .strip .kpi:nth-child(3) { border-bottom: 1px solid var(--rule-soft); }
  .strip .kpi:nth-child(3), .strip .kpi:nth-child(5) { padding-left: 14px; border-left: 1px solid var(--rule-soft); }
  .kpi-label { font-size: 10.5px; }
  .kpi-fig { font-size: 19px; }
  .kpi-note { font-size: 12px; }
  .todo-list { padding: 7px 2px; }
  .todo { gap: 9px; padding: 6px 9px 7px; }
  .todo .txt { font-size: 15.5px; line-height: 1.45; }
  .todo .go-word { display: none; }
  .todo .go svg { transform: translateY(3px); }
  .dash .sec.tbl { margin-top: 34px; }
  .chips { margin: 0 -16px; padding: 0 16px 12px; overflow-x: auto; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .dash .phase { flex: none; }
  .attn-box { display: block; }
  .attn-row { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 12px 14px; }
  .attn-name { white-space: normal; }
  .attn-what { flex-basis: 100%; }
}
