:root {
  color-scheme: light;
  --bg: #f5f6f4;
  --surface: #fff;
  --line: #dfe3df;
  --line-strong: #c7cec8;
  --text: #202622;
  --muted: #69736c;
  --green: #216e4e;
  --green-soft: #e7f4ed;
  --amber: #9b5d0a;
  --amber-soft: #fff3d9;
  --blue: #315f9b;
  --blue-soft: #e9f0fa;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1115;
  --surface: #171c21;
  --line: #2a3138;
  --line-strong: #3b454e;
  --text: #eef1f3;
  --muted: #9aa4ab;
  --green: #287a58;
  --green-soft: #17372b;
  --amber: #d49a45;
  --amber-soft: #342817;
  --blue: #78a7df;
  --blue-soft: #1a2b3e;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 15px; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
a { color: inherit; }
.icon-control { display: inline-grid; align-items: center; justify-items: center; padding: 0; line-height: 0; }
.icon-control svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: 208px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 10; top: 0; bottom: 0; left: 0; width: 208px; overflow-y: auto; padding: 20px 12px; background: #eef0ed; border-right: 1px solid var(--line); }
.sidebar-top { display: flex; min-width: 0; align-items: center; gap: 5px; margin: 0 3px 26px 6px; }
.brand { display: flex; min-width: 0; flex: 1; align-items: center; gap: 9px; text-decoration: none; }
.brand-mark, .avatar, .connection-icon { display: grid; flex: 0 0 auto; place-items: center; color: #fff; background: var(--green); font-weight: 750; }
.brand-mark { width: 34px; height: 34px; border-radius: 7px; }
.brand-image { display: block; object-fit: cover; }
.brand-copy { min-width: 0; }
.brand strong, .brand small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand strong { font-size: 14px; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 12px; }
.workspace-switcher { min-width: 0; margin: -14px 3px 18px 6px; }
.workspace-switcher select { width: 100%; min-width: 0; height: 34px; padding: 0 7px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; font-size: 12px; font-weight: 650; text-overflow: ellipsis; }
.sidebar nav { display: grid; gap: 3px; }
.sidebar nav a { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 6px; color: #4d5750; font-weight: 650; text-decoration: none; }
.sidebar nav a svg, .account-menu button svg { display: block; width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar nav a:hover { background: #e4e8e4; }
.sidebar nav a[aria-current="page"] { color: var(--text); background: var(--surface); box-shadow: 0 1px 2px rgb(31 37 33 / 8%); }
.sidebar nav a[data-conversation-section="tests"] { gap: 6px; }
.nav-test-label { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: space-between; gap: 6px; font-size: 14px; white-space: nowrap; }
.nav-test-progress { flex: 0 0 auto; padding: 2px 4px; border-radius: 5px; background: var(--green-soft); color: var(--muted); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.account-menu { position: absolute; right: 12px; bottom: 18px; left: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.account-menu span { display: block; overflow: hidden; margin-bottom: 4px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu button { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: #4d5750; background: transparent; border: 0; cursor: pointer; font-weight: 650; }
.app-sidebar-toggle { width: 28px; height: 28px; flex: 0 0 auto; color: var(--muted); background: transparent; border: 0; border-radius: 5px; cursor: pointer; }
.app-sidebar-toggle:hover { color: var(--text); background: #e4e8e4; }
.mobile-navigation-toggle { display: none; }
.mobile-list-icon { display: none !important; }

:root[data-app-sidebar-collapsed="true"] .app-shell { grid-template-columns: 60px minmax(0, 1fr); }
:root[data-app-sidebar-collapsed="true"] .sidebar { width: 60px; padding: 14px 8px; }
:root[data-app-sidebar-collapsed="true"] .sidebar-top { display: grid; justify-items: center; gap: 10px; margin: 0 0 20px; }
:root[data-app-sidebar-collapsed="true"] .brand { flex: none; }
:root[data-app-sidebar-collapsed="true"] .brand-copy,
:root[data-app-sidebar-collapsed="true"] .workspace-switcher,
:root[data-app-sidebar-collapsed="true"] .nav-label,
:root[data-app-sidebar-collapsed="true"] .account-menu > span,
:root[data-app-sidebar-collapsed="true"] .account-label { display: none; }
:root[data-app-sidebar-collapsed="true"] .sidebar nav a { justify-content: center; padding: 9px; }
:root[data-app-sidebar-collapsed="true"] .account-menu { right: 8px; bottom: 14px; left: 8px; }
:root[data-app-sidebar-collapsed="true"] .account-menu button { width: 100%; justify-content: center; padding: 8px; }
:root[data-app-sidebar-collapsed="true"] .app-sidebar-toggle svg { transform: scaleX(-1); }

.main { width: min(980px, 100%); min-width: 0; grid-column: 2; padding: 36px 44px 80px; }
.page-header { display: flex; min-height: 58px; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-header h1 { margin: 2px 0 0; font-size: 28px; line-height: 1.15; }
.page-header .subtle { max-width: 700px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.subtle { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.back-link { display: inline-block; margin-bottom: 10px; color: var(--blue); font-size: 13px; text-decoration: none; }
.header-links { display: flex; gap: 18px; }

.tabs { display: flex; gap: 22px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs a { display: flex; gap: 7px; padding: 0 1px 11px; color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--green); }
.tabs span { color: #8a938d; font-variant-numeric: tabular-nums; }

.notice { margin: 0 0 18px; padding: 11px 13px; border: 1px solid; border-radius: 6px; font-size: 14px; }
.notice.warning { color: #704307; background: var(--amber-soft); border-color: #ead5a7; }
.notice.success { color: #17573d; background: var(--green-soft); border-color: #bfdfcc; }

.task-list, .conversation-list, .connection-list, .schedule-list { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.task-row { display: grid; min-height: 88px; grid-template-columns: minmax(0, 1fr) 120px; align-items: center; gap: 20px; padding: 16px 18px; text-decoration: none; border-bottom: 1px solid var(--line); }
.task-row:last-child, .conversation-row:last-child, .connection-row:last-child, .schedule-row:last-child { border-bottom: 0; }
.task-row:hover, .conversation-row:hover { background: #fafbf9; }
.task-copy { min-width: 0; }
.task-copy strong, .task-copy span { display: block; }
.task-copy strong { margin-bottom: 5px; font-size: 16px; }
.task-copy span { overflow: hidden; color: var(--muted); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { color: var(--muted); font-size: 12px; text-align: right; }
.task-meta strong, .task-meta small { display: block; }
.task-meta small { margin-top: 3px; }

.place-list { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.place-row { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 17px; color: inherit; border-bottom: 1px solid var(--line); text-decoration: none; }
.place-row:last-child { border-bottom: 0; }
.place-row.is-link:hover { background: #fafbf9; }
.place-row.is-link:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.monitoring-dialog.task-dialog { width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.monitoring-dialog form { display: grid; gap: 20px; padding: 24px; }
.monitoring-dialog header h2 { margin: 0; }
.monitoring-dialog header p { max-width: 620px; margin: 7px 0 0; color: var(--muted); line-height: 1.45; }
.monitoring-field { display: grid; align-content: start; gap: 7px; }
.monitoring-field label > strong, .monitoring-field label > small { display: block; }
.monitoring-field label > small { color: var(--muted); font-weight: 450; line-height: 1.4; }
.monitoring-query-field textarea { min-height: 168px; }
.monitoring-places { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.monitoring-section-heading { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.monitoring-section-heading > span { min-width: 0; }
.monitoring-section-heading strong, .monitoring-section-heading small { display: block; }
.monitoring-section-heading small { max-width: 480px; margin-top: 4px; color: var(--muted); font-weight: 450; line-height: 1.4; }
.monitoring-place-list { margin: 0; padding: 0; list-style: none; }
.monitoring-place-list li { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.monitoring-place-list li:last-child { border-bottom: 0; }
.monitoring-place-list li > span { min-width: 0; }
.monitoring-place-list li strong, .monitoring-place-list li small { display: block; }
.monitoring-place-list li small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.monitoring-place-list li b { flex: 0 0 auto; color: var(--green); font-size: 11px; }
.monitoring-place-list .text-button { flex: 0 0 auto; color: var(--muted); }
.monitoring-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.monitoring-dialog footer > small { color: var(--muted); }
.monitoring-dialog footer .dialog-actions { flex: 0 0 auto; margin-top: 0; }
.place-picker-dialog.task-dialog { width: min(820px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.place-picker-shell { display: grid; gap: 18px; padding: 24px; }
.place-picker-shell > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.place-picker-shell > header h2 { margin: 0; }
.place-picker-shell > header p { margin: 6px 0 0; color: var(--muted); }
.place-picker-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.place-picker-status { min-height: 20px; margin: -6px 0 0; color: var(--muted); font-size: 12px; }
.place-picker-content { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.2fr); gap: 16px; }
.place-picker-results { display: grid; align-content: start; gap: 6px; }
.place-result { width: 100%; min-height: 54px; padding: 10px 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; text-align: left; cursor: pointer; }
.place-result:hover, .place-result[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.place-result strong, .place-result small { display: block; }
.place-result small { margin-top: 2px; color: var(--muted); line-height: 1.35; }
.place-picker-preview { display: grid; align-content: start; gap: 12px; }
.place-picker-preview[hidden] { display: none; }
.place-picker-map { height: 270px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; touch-action: none; }
.place-picker-preview > span strong, .place-picker-preview > span small { display: block; }
.place-picker-preview > span small { margin-top: 3px; color: var(--muted); line-height: 1.4; }
.place-picker-preview .primary-button { justify-self: start; }
.place-picker-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.place-picker-shell > footer small { color: var(--muted); }
.place-copy { min-width: 0; }
.place-copy strong, .place-copy small { display: block; }
.place-copy strong { margin-bottom: 4px; font-size: 16px; }
.place-copy small, .place-status { color: var(--muted); }
.place-status { display: grid; flex: 0 0 auto; justify-items: end; gap: 3px; font-size: 12px; text-align: right; }
.place-status small { color: var(--muted); }
.place-status form { margin: 2px 0 0; }
.place-status .text-button { padding: 0; color: var(--blue); font-size: 12px; }
.place-metric { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.place-needs-input { color: var(--amber); }
.place-coverage { color: var(--text); }
.visibility-check-note { margin-top: 10px; font-size: 12px; }
.coming-soon { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 14px 17px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 7px; }
.coming-soon-list { display: grid; gap: 8px; margin-top: 18px; }
.coming-soon-list .coming-soon { margin-top: 0; }
.coming-soon strong, .coming-soon small { display: block; }
.coming-soon strong { margin-bottom: 4px; color: var(--text); }
.coming-soon b { flex: 0 0 auto; font-size: 12px; text-transform: uppercase; }
.visibility-empty-header { margin-top: 18px; }
.visibility-empty-card { overflow: hidden; max-width: 780px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgb(28 36 31 / 5%); }
.visibility-empty-copy { padding: 32px 34px; }
.visibility-empty-copy .eyebrow { color: var(--green); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.visibility-empty-copy h2 { margin: 8px 0 10px; font-size: 25px; }
.visibility-empty-copy p { max-width: 660px; margin: 0; color: var(--muted); line-height: 1.6; }
.visibility-empty-questions { padding: 0 34px 28px; }
.visibility-empty-questions header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.visibility-empty-questions header span strong, .visibility-empty-questions header span small { display: block; }
.visibility-empty-questions header small { color: var(--muted); }
.visibility-empty-questions header .text-button { padding: 4px 0; color: var(--green); white-space: nowrap; }
.visibility-empty-questions ol { margin: 0; padding: 0; list-style: none; counter-reset: questions; }
.visibility-empty-questions li { display: grid; min-height: 48px; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 8px; border-bottom: 1px solid var(--line); counter-increment: questions; }
.visibility-empty-questions li::before { color: var(--muted); content: counter(questions); font-size: 11px; }
.visibility-empty-card > footer { display: flex; min-height: 76px; align-items: center; justify-content: flex-end; padding: 16px 34px; background: var(--bg); border-top: 1px solid var(--line); }
.visibility-empty-card > footer form { margin: 0; }
.chatgpt-question-fields { display: grid; gap: 8px; }
.monitoring-dialog .chatgpt-question-fields + footer { margin-top: 2px; }
#chatgpt-questions-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
#chatgpt-questions-dialog header .icon-control { flex: 0 0 auto; }
.chatgpt-question-fields textarea { width: 100%; min-height: 180px; resize: vertical; }
.chatgpt-question-fields small { color: var(--muted); line-height: 1.5; }

.task-trigger { margin: 0 0 24px; padding: 11px 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.task-attention-list { overflow: hidden; margin-bottom: 20px; background: var(--amber-soft); border: 1px solid #ead5a7; border-radius: 7px; }
.task-attention-list h2 { margin: 0; padding: 11px 14px; font-size: 14px; border-bottom: 1px solid #ead5a7; }
.task-attention-list a { display: grid; gap: 3px; padding: 11px 14px; text-decoration: none; border-bottom: 1px solid #ead5a7; }
.task-attention-list a:last-child { border-bottom: 0; }
.task-attention-list a:hover { background: #ffedc6; }
.task-attention-list span { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.recent-work { margin-bottom: 22px; }
.recent-work > summary { width: fit-content; margin-bottom: 0; cursor: pointer; font-size: 15px; font-weight: 680; }
.recent-work[open] > summary { margin-bottom: 10px; }
.compact-list { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.compact-list a, .compact-list > div { display: flex; min-height: 45px; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 13px; text-decoration: none; border-bottom: 1px solid var(--line); }
.compact-list > :last-child { border-bottom: 0; }
.compact-list a:hover { background: #fafbf9; }
.compact-list small { color: var(--muted); }
.run-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-title strong, .run-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-title small { margin-top: 3px; color: var(--muted); font-weight: 400; }
.run-meta { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.load-more-button { display: block; margin: 9px auto 0; padding: 5px 9px; color: var(--blue); background: transparent; border: 0; cursor: pointer; font-size: 13px; font-weight: 650; }
.load-more-button:hover { text-decoration: underline; }
.load-more-button[hidden], [data-run-item][hidden] { display: none; }

.editor-section { background: var(--surface); border: 1px solid var(--line); border-bottom: 0; }
.editor-section:first-of-type { border-radius: 7px 7px 0 0; }
.editor-section:last-of-type { border-bottom: 1px solid var(--line); border-radius: 0 0 7px 7px; }
.editor-section summary { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 16px; cursor: pointer; list-style: none; }
.editor-section summary::-webkit-details-marker { display: none; }
.editor-section summary:hover { background: #fafbf9; }
.editor-section summary span:first-child strong, .editor-section summary span:first-child small { display: block; }
.editor-section summary small { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; }
.section-disclosure { display: grid; place-items: center; color: var(--muted); transition: transform 140ms ease; }
.editor-section[open] .section-disclosure { transform: rotate(180deg); }
.editor-section[open] summary { border-bottom: 1px solid var(--line); }
.editor-section form, .editor-section > .definition-list, .empty-inline { margin: 0; padding: 16px; }
.task-schedule-list { padding: 0 16px; }
.task-schedule-row { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task-schedule-row:last-child { border-bottom: 0; }
.task-schedule-row strong, .task-schedule-row small { display: block; }
.task-schedule-row small { margin-top: 3px; color: var(--muted); }
.file-location { overflow: hidden; margin: 0 0 10px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.document-editor { min-height: 360px; margin-bottom: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.task-editors { margin-bottom: 24px; }
.task-editor-tabs { display: flex; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.task-editor-tabs a { display: flex; flex-shrink: 0; min-height: 48px; align-items: center; padding: 10px 2px; color: var(--muted); border-bottom: 3px solid transparent; text-decoration: none; font-weight: 650; }
.task-editor-tabs a[aria-selected="true"] { color: var(--green); border-bottom-color: currentColor; }
.task-editor-panel { padding-top: 18px; }
.task-editor-panel[hidden] { display: none; }
.task-editor-panel form { margin: 0; }
.task-editor-panel .document-editor { font-family: inherit; font-size: 16px; line-height: 1.6; padding: 16px; }
.task-editor-panel .plain-template-editor { height: min(58dvh, 620px); min-height: 300px; }
.editor-help { margin: 0 0 14px; line-height: 1.5; }
.editor-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 4px 0; }
.editor-actions button { min-height: 44px; }
.editor-actions [data-add-reply] { margin-right: auto; }
@media (max-width: 600px) {
  .task-editor-tabs { gap: 8px; overflow: visible; }
  .task-editor-tabs a { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; font-size: 14px; }
}
.definition-list { display: grid; gap: 0; }
.definition-list div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.definition-list div:last-child { border-bottom: 0; }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; }

.run-page { overflow: hidden; }
.run-page .app-shell { height: 100vh; min-height: 0; }
.run-page .main { width: auto; max-width: none; height: 100vh; overflow: hidden; padding: 0 32px; background: var(--surface); }
.visibility-run-page .main { padding: 0; background: var(--bg); }
.run-chat-workspace { display: grid; width: min(900px, 100%); height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; margin: 0 auto; }
.visibility-report-workspace { display: grid; width: 100%; height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr); margin: 0; }
.run-chat-header { display: grid; min-height: 70px; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.run-chat-back { width: 30px; height: 30px; color: var(--muted); text-decoration: none; border-radius: 50%; }
.run-chat-back svg { width: 19px; height: 19px; }
.run-chat-back:hover { color: var(--text); background: var(--bg); }
.run-chat-title { display: grid; min-width: 0; justify-items: center; gap: 2px; }
.run-chat-title strong { overflow: hidden; max-width: 100%; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.run-chat-title span { color: var(--muted); font-size: 11px; }
.visibility-report-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.visibility-report-actions form { margin: 0; }
.run-helper-launcher { position: relative; z-index: 14; display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 0 14px; color: #fff; background: var(--green); border: 0; border-radius: 20px; box-shadow: 0 4px 14px rgb(28 36 31 / 14%); cursor: pointer; font-weight: 700; }
.run-helper-launcher:hover { background: #185c40; }
.run-helper-launcher:active { transform: scale(.97); }
.run-helper-launcher svg { width: 20px; height: 20px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.visibility-report-workspace[data-helper-collapsed="false"] .run-helper-launcher { background: #174f3a; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 28%), 0 4px 14px rgb(28 36 31 / 14%); }
.visibility-report-main { min-height: 0; overflow-y: auto; padding: 52px max(8px, calc((100% - 920px) / 2)) 72px; background: var(--bg); }
.browser-intervention { overflow: hidden; margin: 0 auto 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 18px rgb(28 36 31 / 8%); }
.browser-intervention > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 20px 22px; }
.browser-intervention > header small { color: var(--amber); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.browser-intervention > header h1 { margin: 4px 0 0; font-size: 22px; }
.browser-intervention > header p { max-width: 720px; margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.browser-intervention > header > b { padding: 5px 9px; color: var(--green); background: var(--green-soft); border-radius: 999px; font-size: 11px; white-space: nowrap; }
.browser-intervention-frame { height: min(620px, 64vh); min-height: 420px; overflow: hidden; background: #eef1ee; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.browser-intervention-frame iframe { display: block; width: 100%; height: 100%; background: #fff; border: 0; }
.browser-intervention > footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 22px; }
.browser-intervention > footer p { max-width: 620px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.browser-intervention > footer > div { display: flex; flex: 0 0 auto; gap: 8px; }
.browser-intervention form { margin: 0; }
.browser-intervention-expired > footer { border-top: 1px solid var(--line); }
.visibility-report-main .run-report-card { margin: 0; padding: 22px; }
.visibility-report-main .run-owner-question { margin: 24px 0 0; }
.run-helper-panel { position: fixed; z-index: 13; right: 28px; bottom: 28px; display: flex; width: min(440px, calc(100vw - 56px)); height: min(680px, calc(100vh - 104px)); min-width: 0; min-height: 0; overflow: hidden; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 18px 56px rgb(28 36 31 / 22%); opacity: 1; transform: translateY(0); transition: visibility 0s, opacity 200ms ease, transform 200ms ease; }
.visibility-report-workspace[data-helper-collapsed="true"] .run-helper-panel { visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(12px); transition: visibility 0s 200ms, opacity 180ms ease-in, transform 180ms ease-in; }
.run-helper-thread { min-height: 0; flex: 1; overflow-y: auto; padding: 20px 16px; background: #fafbf9; }
.run-helper-thread .run-chat-message.inbound { justify-content: flex-end; }
.run-helper-thread .run-chat-empty { padding: 42px 16px; }
.run-helper-composer.run-chat-composer { position: static; padding: 12px 14px; }
.run-helper-composer.run-chat-composer textarea { max-height: min(240px, 34vh); }
.run-chat-thread.chat-thread { min-height: 0; overflow-y: auto; padding: 30px max(24px, calc((100% - 760px) / 2)) 24px; background: var(--surface); border: 0; border-radius: 0; }
.run-chat-intro { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 30px; }
.run-chat-intro .avatar { width: 30px; height: 30px; font-size: 12px; }
.run-chat-intro strong { display: block; margin-bottom: 5px; }
.run-chat-intro p { margin: 0; color: var(--muted); line-height: 1.5; }
.run-chat-message { display: flex; margin: 0 0 20px; }
.run-chat-message.inbound { justify-content: flex-end; }
.run-chat-message .message-bubble { max-width: min(620px, 82%); }
.run-chat-message.inbound .message-bubble { background: var(--green-soft); border-radius: 7px 7px 2px 7px; }
.run-chat-message.outbound .message-bubble { background: transparent; }
.run-report-card { margin: 24px 0 28px 42px; padding: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; }
.run-report-card > header { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.run-report-icon { display: grid; width: 28px; height: 28px; place-items: center; color: #fff; background: var(--green); border-radius: 50%; font-size: 13px; font-weight: 750; }
.run-report-card header small, .run-report-card header strong { display: block; }
.run-report-card header small { margin-bottom: 2px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.run-report-card header time { color: var(--muted); font-size: 11px; }
.run-report-card > p { margin: 16px 0 0; line-height: 1.55; }
.visibility-overview { display: flex; align-items: baseline; gap: 12px; margin-top: 18px; }
.visibility-overview strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.visibility-overview span { color: var(--muted); }
.visibility-findings { overflow: hidden; margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.visibility-findings > div { display: grid; min-height: 58px; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 9px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.visibility-findings > div:last-child { border-bottom: 0; }
.visibility-findings strong, .visibility-findings small { display: block; }
.visibility-findings small { margin-top: 3px; color: var(--muted); }
.visibility-finding-state { display: grid; width: 22px; height: 22px; place-items: center; color: var(--muted); background: var(--bg); border-radius: 50%; font-size: 12px; font-weight: 750; }
.visibility-finding-state.is-found { color: #fff; background: var(--green); }
.visibility-finding-state.is-missing { color: var(--amber); background: var(--amber-soft); }
.visibility-next-step { margin-top: 18px; padding: 13px 14px; background: var(--green-soft); border-radius: 7px; }
.visibility-next-step small { color: var(--green); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.visibility-next-step p { margin: 5px 0 0; line-height: 1.5; }
.visibility-document { max-width: 920px; margin: 0 auto; }
.visibility-document-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 18px 2px 36px; }
.visibility-document-header h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.08; letter-spacing: -.035em; }
.visibility-document-header p { max-width: 720px; margin: 13px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.visibility-report-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; color: var(--muted); font-size: 12px; }
.visibility-report-meta strong { color: var(--text); }
.visibility-language-form { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.visibility-language-form label { flex: 0 0 auto; font-weight: 650; white-space: nowrap; }
.visibility-language-form select { min-height: 32px; padding: 3px 30px 3px 10px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 7px; font: inherit; font-weight: 700; }
.visibility-icon-action { width: 38px; height: 38px; flex: 0 0 auto; color: var(--green); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 50%; text-decoration: none; }
.visibility-icon-action:hover { background: var(--green-soft); }
.visibility-settings-button { width: 40px; height: 40px; flex: 0 0 auto; color: var(--green); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 50%; }
.visibility-settings-button:hover { background: var(--green-soft); }
.visibility-settings-button:active { transform: translateY(1px); }
.visibility-report-notice { max-width: 920px; margin: 0 auto 18px; }
.visibility-quota-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.visibility-quota-notice span { color: var(--muted); }
.visibility-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(240px, .85fr); overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgb(28 36 31 / 5%); }
.visibility-primary-metric, .visibility-secondary-metric { min-width: 0; min-height: 150px; padding: 32px 32px; }
.visibility-secondary-metric { border-left: 1px solid var(--line); }
.visibility-primary-metric > span, .visibility-secondary-metric > span { display: block; color: var(--muted); font-size: 12px; font-weight: 720; }
.visibility-primary-metric > strong, .visibility-secondary-metric > strong { display: block; margin-top: 7px; font-size: 38px; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.035em; }
.visibility-primary-metric > strong small, .visibility-secondary-metric > strong small { color: var(--muted); font-size: 20px; font-weight: 600; }
.visibility-primary-metric p, .visibility-secondary-metric p { margin: 8px 0 0; color: var(--muted); line-height: 1.4; }
.visibility-review-link { display: inline-block; margin: -4px 0; padding: 4px 0; color: var(--green); font-weight: 680; text-decoration: underline; text-decoration-skip-ink: auto; text-underline-offset: 3px; }
.visibility-review-link:hover { text-decoration-thickness: 2px; }
.visibility-primary-metric > small { display: block; margin-top: 7px; color: var(--amber); }
.visibility-recent { color: var(--green); white-space: nowrap; }
.visibility-disclaimer { margin: 18px 2px 44px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.visibility-goal { display: grid; grid-template-columns: minmax(0, 1fr) 200px; overflow: hidden; margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgb(28 36 31 / 4%); }
.visibility-goal.is-complete { border-color: rgb(43 105 77 / 28%); }
.visibility-goal-copy { padding: 22px 24px; }
.visibility-goal-label { display: flex; align-items: center; gap: 10px; }
.visibility-goal-label > span { color: var(--muted); font-size: 11px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.visibility-goal-label > b { padding: 3px 7px; color: var(--amber); background: var(--amber-soft); border-radius: 999px; font-size: 10px; }
.visibility-goal.is-complete .visibility-goal-label > b { color: var(--green); background: var(--green-soft); }
.visibility-goal-copy h2 { margin: 5px 0 0; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
.visibility-goal-copy p { max-width: 64ch; margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; text-wrap: pretty; }
.visibility-goal-score { display: grid; align-content: center; padding: 20px 24px; background: color-mix(in srgb, var(--amber-soft) 42%, var(--surface)); border-left: 1px solid var(--line); }
.visibility-goal.is-complete .visibility-goal-score { background: color-mix(in srgb, var(--green-soft) 45%, var(--surface)); }
.visibility-goal-score > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.visibility-goal-score > strong { margin-top: 5px; color: var(--amber); font-size: 30px; font-variant-numeric: tabular-nums; line-height: 1; }
.visibility-goal.is-complete .visibility-goal-score > strong { color: var(--green); }
.visibility-goal-score > strong small { color: var(--muted); font-size: 17px; }
.visibility-goal-score p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.visibility-goal-details { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.visibility-goal-details > summary { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 24px; color: var(--text); cursor: pointer; font-size: 12px; font-weight: 720; list-style: none; }
.visibility-goal-details > summary::-webkit-details-marker { display: none; }
.visibility-goal-details > summary span { transition: transform 140ms ease; }
.visibility-goal-details[open] > summary span { transform: rotate(180deg); }
.visibility-goal-details > div { padding: 5px 24px 22px; }
.visibility-goal-details > div > p { max-width: 74ch; margin: 0 0 15px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.visibility-goal-details h3 { margin: 20px 0 9px; font-size: 13px; }
.visibility-goal-factors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.visibility-goal-factors article { padding: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.visibility-goal-factors article > span { display: block; color: var(--green); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.visibility-goal-factors article.is-constraint > span { color: var(--muted); }
.visibility-goal-factors strong { display: block; margin-top: 4px; font-size: 13px; }
.visibility-goal-factors p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.visibility-goal-source { margin: 9px 0 0 !important; font-size: 11px !important; }
.visibility-goal-source a { color: var(--green); text-underline-offset: 3px; }
.visibility-goal-targets { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.visibility-goal-targets > div { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.visibility-goal-targets > div:last-child { border-bottom: 0; }
.visibility-goal-targets strong, .visibility-goal-targets small { display: block; }
.visibility-goal-targets strong { font-size: 13px; }
.visibility-goal-targets small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.visibility-goal-targets b { flex: 0 0 auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.visibility-goal-targets b.is-met { color: var(--green); }
.visibility-goal-targets b.is-gap { color: var(--amber); }
.visibility-goal-accuracy-note { margin: 13px 0 0 !important; padding-top: 13px; border-top: 1px solid var(--line); font-size: 11px !important; }
.visibility-section { overflow: hidden; margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgb(28 36 31 / 4%); }
.visibility-section > summary { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; background: var(--surface); cursor: pointer; list-style: none; }
.visibility-section > summary::-webkit-details-marker { display: none; }
.visibility-section > summary:hover .visibility-section-chevron { color: var(--green); }
.visibility-section > summary strong, .visibility-section > summary small { display: block; }
.visibility-section > summary strong { font-size: 18px; }
.visibility-section > summary small { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.visibility-section-chevron { color: var(--muted); font-size: 17px; transition: transform 140ms ease; }
.visibility-section[open] .visibility-section-chevron { transform: rotate(180deg); }
.visibility-section[open] > summary { border-bottom: 0; }
.visibility-section-with-action { position: relative; }
.visibility-section-with-action > summary { padding-right: 190px; }
.visibility-section-with-action .visibility-section-chevron { position: absolute; top: 27px; right: 22px; }
.visibility-section-action { position: absolute; z-index: 1; top: 17px; right: 54px; min-height: 38px; padding: 7px 12px; font-size: 12px; white-space: nowrap; }
.visibility-section-body { padding: 0 22px 22px; }
.visibility-results-list { display: grid; gap: 0; padding: 0 22px 14px; }
.visibility-result-row { margin: 0; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.visibility-result-row:last-child { border-bottom: 0; }
.visibility-result-row > summary { display: grid; min-height: 64px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 12px 0; cursor: pointer; list-style: none; }
.visibility-result-row > summary::-webkit-details-marker { display: none; }
.visibility-result-row > summary:hover, .visibility-result-row.is-search:hover { color: var(--green); }
.visibility-result-row > summary strong, .visibility-result-row > summary small, .visibility-result-row.is-search > span strong, .visibility-result-row.is-search > span small { display: block; }
.visibility-result-row > summary small, .visibility-result-row.is-search > span small { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.visibility-result-row.is-search { display: grid; width: 100%; min-height: 50px; grid-template-columns: minmax(0, 1fr) 100px 24px; align-items: center; gap: 12px; padding: 7px 0; color: var(--text); text-align: left; cursor: pointer; }
.visibility-result-row.is-search > span:first-child strong { font-size: 13px; font-weight: 680; line-height: 1.35; }
.visibility-query-arrow { width: 17px; height: 17px; justify-self: end; color: var(--muted); fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.visibility-result-value { display: inline-flex; min-height: 25px; align-items: center; gap: 5px; justify-self: end; padding: 0 8px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.visibility-result-value.is-found { color: var(--green); background: var(--green-soft); border-color: transparent; }
.visibility-result-value.is-missing { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.visibility-result-value small { font-size: 10px; }
.visibility-evidence-link { justify-self: end; color: var(--green); font-size: 12px; font-weight: 680; text-underline-offset: 3px; }
.visibility-evidence-icon { width: 34px; height: 34px; justify-self: end; color: var(--green); background: transparent; border: 0; border-radius: 7px; text-decoration: none; }
.visibility-evidence-icon:hover { background: var(--green-soft); }
.visibility-evidence-icon svg { width: 17px; height: 17px; }
.visibility-retry-form { justify-self: end; }
.visibility-retry-form .text-button { color: var(--green); font-size: 12px; white-space: nowrap; }
.visibility-query-dialog.task-dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 12px; }
.visibility-query-dialog-shell { display: grid; }
.visibility-query-dialog-shell > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.visibility-query-dialog-shell > header small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 720; text-transform: uppercase; }
.visibility-query-dialog-shell > header h2 { margin: 0; font-size: 21px; }
.visibility-query-dialog-body { display: grid; gap: 16px; padding: 24px; }
.visibility-query-dialog-status { display: flex; align-items: baseline; gap: 12px; }
.visibility-query-dialog-status strong { color: var(--green); font-size: 24px; }
.visibility-query-dialog-status span, .visibility-query-note { color: var(--muted); }
.visibility-query-result-copy { padding: 14px 16px; background: var(--bg); border-radius: 8px; }
.visibility-query-result-copy p, .visibility-query-note { margin: 6px 0 0; line-height: 1.55; }
.visibility-query-evidence { overflow: hidden; margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; }
.visibility-query-evidence a { display: block; cursor: zoom-in; }
.visibility-query-evidence img { display: block; width: 100%; height: auto; max-height: 56vh; object-fit: contain; background: var(--surface); }
.visibility-query-evidence figcaption { padding: 8px 11px; color: var(--muted); font-size: 11px; }
.visibility-query-dialog-shell > footer { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 16px 24px; border-top: 1px solid var(--line); }
.visibility-query-dialog-shell > footer > span { margin-right: auto; color: var(--muted); font-size: 12px; }
.visibility-query-dialog-shell > footer form { padding: 0; }
.visibility-answer-list { display: grid; gap: 0; padding: 0 0 14px; background: transparent; border-top: 0; }
.visibility-question-summary { margin: 0 0 4px; padding: 12px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.visibility-answer { padding: 14px 0; background: var(--surface); border: 0; border-top: 1px solid var(--line); }
.visibility-answer header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.visibility-answer-heading { display: flex; align-items: baseline; gap: 9px; }
.visibility-answer-heading small { color: var(--muted); font-size: 11px; }
.visibility-answer-summary { max-width: 74ch; margin: 7px 44px 0 0; color: var(--text); font-size: 13px; line-height: 1.5; }
.visibility-answer-competitors { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.visibility-answer-competitors span { font-weight: 700; }
.visibility-answer-links, .visibility-answer-full { margin-top: 9px; }
.visibility-answer-links > summary, .visibility-answer-full > summary { width: max-content; color: var(--green); font-size: 11px; font-weight: 680; cursor: pointer; list-style-position: inside; text-underline-offset: 3px; }
.visibility-answer-links[open] > summary, .visibility-answer-full[open] > summary { margin-bottom: 10px; }
.visibility-citations { display: flex; flex-wrap: wrap; gap: 6px 12px; padding-left: 14px; color: var(--muted); font-size: 11px; }
.visibility-citations a { color: var(--green); }
.visibility-answer-full p { max-height: 360px; overflow: auto; margin: 0; padding: 12px 14px; white-space: pre-wrap; color: var(--muted); background: var(--bg); border-radius: 7px; font-size: 12px; line-height: 1.55; }
.visibility-empty-inline { margin: 0; padding: 18px 22px; color: var(--muted); }
.visibility-change-list { display: grid; gap: 6px; }
.visibility-change { display: grid; min-height: 58px; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.visibility-change > span:first-child { display: grid; width: 25px; height: 25px; place-items: center; background: var(--bg); border-radius: 50%; font-weight: 750; }
.visibility-change.is-good > span:first-child { color: var(--green); background: var(--green-soft); }
.visibility-change.is-bad > span:first-child { color: var(--amber); background: var(--amber-soft); }
.visibility-change strong, .visibility-change small { display: block; }
.visibility-change small { margin-top: 3px; color: var(--muted); }
.visibility-change > b { color: var(--muted); font-size: 12px; }
.visibility-grid-layout { display: grid; gap: 22px; }
.visibility-map-frame { position: relative; display: grid; min-height: 280px; place-items: center; overflow: hidden; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; }
.visibility-map-frame [hidden] { display: none !important; }
.visibility-map-frame.has-coordinates { display: block; min-height: 420px; background: #e8eee9; }
.visibility-map-canvas { width: 100%; height: 420px; }
.visibility-map-status { margin: 0; padding: 10px 14px; color: var(--muted); font-size: 11px; text-align: center; }
.visibility-map-status:empty { display: none; }
.visibility-rank-grid { display: grid; width: min(280px, calc(100% - 40px)); grid-template-columns: repeat(var(--grid-columns, 3), 1fr); gap: 10px; }
.visibility-rank-grid span { display: grid; aspect-ratio: 1; place-items: center; color: #fff; background: var(--amber); border-radius: 50%; font-size: 12px; font-weight: 750; }
.visibility-rank-grid .is-top { background: var(--green); }
.visibility-rank-grid .is-mid { background: #b47a22; }
.visibility-rank-grid .is-low { background: #ad654f; }
.visibility-rank-grid .is-missing { color: var(--muted); background: var(--bg); border: 1px solid var(--line); }
.visibility-rank-grid .is-failed { color: var(--muted); background: var(--surface); border: 1px dashed var(--line-strong); }
.visibility-place-fallback { display: grid; width: min(520px, calc(100% - 40px)); gap: 6px; background: transparent; }
.visibility-place-fallback > div { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.visibility-place-fallback span { color: var(--muted); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.visibility-place-fallback span.is-top { color: var(--green); }
.visibility-place-fallback span.is-mid { color: #8d5a0f; }
.visibility-place-fallback span.is-low, .visibility-place-fallback span.is-missing { color: var(--amber); }
.visibility-place-fallback span.is-failed { color: var(--muted); }
.visibility-grid-copy p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.55; }
.visibility-grid-copy dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 22px 0 0; }
.visibility-grid-copy dl div { padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.visibility-grid-copy dt { color: var(--muted); font-size: 11px; }
.visibility-grid-copy dd { margin: 5px 0 0; font-size: 20px; font-weight: 750; }
.visibility-map-canvas.leaflet-container { z-index: 0; background: #e8eee9; font-family: inherit; touch-action: none; }
.visibility-map-canvas .leaflet-control-zoom a { color: var(--text); }
.visibility-map-canvas .leaflet-control-attribution { color: #536059; font-size: 9px; }
.visibility-map-canvas .leaflet-control-attribution a { color: var(--green); }
.visibility-map-div-icon { background: transparent; border: 0; }
.visibility-map-marker { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; background: var(--amber); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 3px 10px rgb(28 36 31 / 24%); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.visibility-map-marker.is-top { background: var(--green); }
.visibility-map-marker.is-mid { background: #b47a22; }
.visibility-map-marker.is-low { background: #ad654f; }
.visibility-map-marker.is-missing { color: var(--muted); background: var(--surface); border-color: var(--line-strong); }
.visibility-map-marker.is-failed { color: var(--muted); background: var(--surface); border-style: dashed; border-color: var(--line-strong); }
.visibility-map-marker.is-business { box-shadow: 0 0 0 4px rgb(255 255 255 / 94%), 0 0 0 6px var(--green), 0 4px 12px rgb(28 36 31 / 26%); }
.visibility-location-report { display: grid; gap: 20px; }
.visibility-location-report > .visibility-section-explainer { margin: 0; }
.visibility-location-map { min-height: 360px !important; }
.visibility-location-map .visibility-map-canvas { height: 360px; }
.visibility-location-map .visibility-map-marker { width: auto; min-width: 42px; padding: 0 7px; border-radius: 22px; }
.visibility-location-fallback { width: min(520px, calc(100% - 40px)); margin: 36px auto; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.visibility-location-fallback > div { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.visibility-location-fallback > div:last-child { border-bottom: 0; }
.visibility-map-popup { display: grid; min-width: 220px; gap: 3px; color: var(--text); }
.visibility-map-popup > small { color: var(--muted); }
.visibility-map-popup ul { display: grid; gap: 0; margin: 8px 0 0; padding: 0; list-style: none; }
.visibility-map-popup li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 5px 0; border-top: 1px solid var(--line); }
.visibility-map-popup li span { max-width: 220px; }
.visibility-location-list { display: grid; gap: 14px; }
.visibility-location-list > details { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.visibility-location-list > details > summary { display: grid; min-height: 62px; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 12px 16px; background: var(--surface); cursor: pointer; list-style: none; }
.visibility-location-list > details > summary::-webkit-details-marker { display: none; }
.visibility-location-list > details[open] > summary { border-bottom: 1px solid var(--line); }
.visibility-location-list > details[open] > summary .visibility-section-chevron { transform: rotate(180deg); }
.visibility-location-list summary strong, .visibility-location-list summary small { display: block; }
.visibility-location-list summary small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.visibility-location-list summary > b { color: var(--green); font-size: 12px; }
.visibility-location-list > details > div { display: grid; gap: 0; padding: 0 16px 8px; }
.visibility-location-check { display: grid; min-height: 66px; grid-template-columns: minmax(180px, 1fr) 110px minmax(150px, .7fr); align-items: center; gap: 16px; padding: 11px 0; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.visibility-location-check:last-child { border-bottom: 0; }
.visibility-query-copy strong, .visibility-query-copy small { display: block; }
.visibility-query-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.visibility-location-evidence { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.visibility-location-evidence > small { color: var(--muted); font-size: 11px; line-height: 1.35; text-align: right; }
.visibility-location-evidence .visibility-retry-form { flex: 0 0 auto; }
.visibility-location-evidence details { position: relative; }
.visibility-location-evidence summary { color: var(--muted); cursor: pointer; font-size: 11px; list-style: none; white-space: nowrap; }
.visibility-location-evidence summary::-webkit-details-marker { display: none; }
.visibility-location-evidence details[open] ol { position: absolute; z-index: 3; top: 24px; right: 0; width: 280px; margin: 0; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 24px rgb(28 36 31 / 16%); list-style: none; }
.visibility-location-evidence li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.visibility-location-evidence li:last-child { border-bottom: 0; }
.visibility-location-evidence li a { color: var(--green); }
.visibility-fact-list { display: grid; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.visibility-fact-list > div { display: grid; min-height: 58px; grid-template-columns: minmax(150px, .7fr) minmax(200px, 1fr) 132px; align-items: center; gap: 16px; padding: 10px 14px; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.visibility-fact-list > div:last-child { border-bottom: 0; }
.visibility-fact-list strong, .visibility-fact-list small, .visibility-fact-list b { display: block; }
.visibility-fact-list small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.visibility-fact-list i { justify-self: end; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 700; }
.visibility-fact-list i.is-verified { color: var(--green); }
.visibility-fact-list i.is-attention { color: var(--amber); }
.visibility-verification-note { color: var(--text) !important; }
.visibility-fact-state { display: grid; justify-items: end; gap: 5px; }
.visibility-fact-state form { margin: 0; }
.visibility-fact-state .text-button { width: fit-content; padding: 2px 0; color: var(--green); font-size: 11px; }
.visibility-finding-list, .visibility-prepared-list { display: grid; gap: 10px; margin-top: 16px; }
.visibility-improvements .visibility-finding-list { gap: 0; overflow: visible; margin-top: 0; padding-top: 0; border: 0; border-radius: 0; }
.visibility-finding-list article { padding: 18px 16px; background: var(--amber-soft); border-radius: 8px; }
.visibility-improvements .visibility-finding-list article { background: var(--surface); border-bottom: 1px solid var(--line); border-radius: 0; }
.visibility-improvements .visibility-finding-list article:last-child { border-bottom: 0; }
.visibility-improvements > summary small { font-size: 14px; line-height: 1.45; }
.visibility-improvement-list { display: grid; gap: 0; padding-top: 0; }
.visibility-improvement-list > article { padding: 20px 0; border-bottom: 1px solid var(--line); }
.visibility-improvement-list > article:last-child { padding-bottom: 0; border-bottom: 0; }
.visibility-improvement-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.visibility-improvement-heading > span small, .visibility-improvement-heading > span strong { display: block; }
.visibility-improvement-heading > span small { color: var(--green); font-size: 10px; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.visibility-improvement-heading > span strong { margin-top: 3px; font-size: 17px; line-height: 1.35; text-wrap: balance; }
.visibility-improvement-heading .text-button { min-height: 36px; flex: 0 0 auto; padding: 6px 8px; color: var(--green); font-size: 13px; white-space: nowrap; }
.visibility-improvement-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; margin: 16px 0 0; border: 1px solid var(--line); border-radius: 8px; }
.visibility-improvement-steps > div { min-width: 0; padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.visibility-improvement-steps > div:nth-child(2n) { border-right: 0; }
.visibility-improvement-steps > div:nth-last-child(-n + 2) { border-bottom: 0; }
.visibility-improvement-steps dt { color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: .05em; text-transform: uppercase; }
.visibility-improvement-steps dd { margin: 5px 0 0; font-size: 13px; line-height: 1.45; text-wrap: pretty; }
.visibility-improvement-list [data-visibility-finding-content] > footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-top: 11px; color: var(--muted); font-size: 11px; }
.visibility-improvement-list [data-visibility-finding-content] > footer details { max-width: 70ch; }
.visibility-improvement-list [data-visibility-finding-content] > footer summary { color: var(--green); cursor: pointer; font-weight: 680; }
.visibility-improvement-list [data-visibility-finding-content] > footer p { margin: 6px 0 0; line-height: 1.5; }
.visibility-improvement-list [data-visibility-finding-content] > footer a { flex: 0 0 auto; color: var(--green); font-weight: 680; text-underline-offset: 3px; }
.visibility-finding-content { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.visibility-finding-content > span { min-width: 0; }
.visibility-finding-content > span > strong { font-size: 16px; line-height: 1.4; text-wrap: pretty; }
.visibility-finding-list p { margin: 7px 0 0; font-size: 15px; line-height: 1.55; text-wrap: pretty; }
.visibility-finding-list small { display: block; margin-top: 11px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.visibility-finding-list small b { display: block; margin-bottom: 3px; color: var(--text); font-size: 14px; }
.visibility-finding-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; }
.visibility-finding-list button { display: inline-flex; width: fit-content; min-height: 38px; align-items: center; flex: 0 0 auto; align-self: center; padding: 7px 9px; color: var(--green); font-size: 14px; white-space: nowrap; }
.visibility-finding-list.is-chatgpt { gap: 0; margin-top: 0; }
.visibility-finding-list.is-chatgpt article { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 18px 0; background: transparent; border-bottom: 1px solid var(--line); border-radius: 0; }
.visibility-finding-list.is-chatgpt article:last-child { border-bottom: 0; }
.visibility-finding-list.is-chatgpt p { margin-top: 6px; color: var(--muted); }
.visibility-finding-evidence { margin-top: 9px; }
.visibility-finding-evidence > summary { width: max-content; color: var(--green); cursor: pointer; font-size: 12px; font-weight: 680; list-style-position: inside; }
.visibility-finding-evidence[open] > summary { margin-bottom: 5px; }
.visibility-finding-evidence p { max-width: 72ch; font-size: 12px; }
.visibility-finding-actions .visibility-finding-dismiss { color: var(--muted); }
.visibility-finding-dismissed { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 14px; }
.visibility-finding-dismissed[hidden] { display: none; }
.visibility-finding-list [hidden] { display: none; }
.visibility-prepared-list article { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.visibility-prepared-list article > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.visibility-prepared-list header strong, .visibility-prepared-list header small { display: block; }
.visibility-prepared-list header small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.visibility-copy-button { padding: 6px 10px; color: var(--green); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 700; }
.visibility-prepared-list pre { overflow-x: auto; margin: 0; padding: 18px 16px; white-space: pre-wrap; word-break: break-word; font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.visibility-prepared-list article > .text-button { margin: 0 16px 16px; color: var(--green); }
.visibility-prepared-list article.is-advanced > details > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; cursor: pointer; list-style: none; }
.visibility-prepared-list article.is-advanced > details > summary::-webkit-details-marker { display: none; }
.visibility-prepared-list article.is-advanced summary strong, .visibility-prepared-list article.is-advanced summary small { display: block; }
.visibility-prepared-list article.is-advanced summary small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.visibility-prepared-list article.is-advanced summary > span:last-child { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.visibility-prepared-list article.is-advanced summary b { padding: 3px 7px; background: var(--green-soft); border-radius: 999px; color: var(--green); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.visibility-prepared-list article.is-advanced details[open] summary i { transform: rotate(180deg); }
.visibility-prepared-body { position: relative; padding-top: 44px; border-top: 1px solid var(--line); }
.visibility-prepared-body > .visibility-copy-button { position: absolute; top: 8px; right: 16px; }
.visibility-prepared-body > .text-button { margin: 0 16px 16px; color: var(--green); }
.visibility-section-explainer { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.visibility-competitor-list { display: grid; gap: 8px; }
.visibility-competitor-list article { display: grid; min-height: 78px; grid-template-columns: minmax(0, 1fr) 100px; gap: 12px 20px; padding: 15px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.visibility-competitor-list strong, .visibility-competitor-list small { display: block; }
.visibility-competitor-list strong a { color: var(--green); text-underline-offset: 3px; }
.visibility-competitor-list small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.visibility-competitor-metric { justify-self: end; text-align: right; }
.visibility-competitor-metric b { display: block; font-size: 20px; }
.visibility-competitor-insight { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); }
.visibility-competitor-insight p { margin: 3px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.visibility-competitor-insight b { color: var(--text); }
.visibility-competitor-summary { margin: 14px 0 0; padding: 14px 16px; background: var(--green-soft); border-radius: 8px; line-height: 1.5; }
.visibility-source-list { display: grid; gap: 6px; }
.visibility-source-list > div { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.visibility-source-list strong, .visibility-source-list small { display: block; }
.visibility-source-list a { color: var(--green); }
.visibility-source-list small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.run-report-card .result-artifacts { grid-template-columns: minmax(0, 1fr); }
.run-report-card .result-artifacts img { max-height: 280px; aspect-ratio: 16 / 9; }
.run-chat-empty { padding: 42px 20px; color: var(--muted); text-align: center; }
.run-owner-question { margin: 24px 0 28px 42px; }
.run-connected-conversations { margin: 24px 0 12px 42px; }
.run-connected-conversations > summary { margin-bottom: 10px; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 680; }
.run-chat-composer { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: end; gap: 9px; padding: 14px max(24px, calc((100% - 760px) / 2)) 20px; background: var(--surface); border-top: 1px solid var(--line); }
.run-chat-composer .photo-preview-strip { grid-column: 1 / -1; }
.run-chat-composer textarea { min-height: 44px; max-height: 140px; overflow-y: auto; padding: 11px 15px; background: var(--bg); border-radius: 22px; resize: none; }
.run-chat-composer button { width: 42px; height: 42px; color: #fff; background: var(--green); border: 0; border-radius: 50%; cursor: pointer; }
.run-chat-composer button:hover { background: #185c40; }
.result-artifacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.result-artifacts a { overflow: hidden; color: var(--blue); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; text-decoration: none; }
.result-artifacts img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.result-file { padding: 14px; }
.channel-thread-list { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.channel-thread-list a { display: grid; min-height: 68px; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 11px 14px; text-decoration: none; border-bottom: 1px solid var(--line); }
.channel-thread-list a:last-child { border-bottom: 0; }
.channel-thread-list a:hover { background: #fafbf9; }
.channel-thread-list strong, .channel-thread-list small { display: block; }
.channel-thread-list small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.channel-thread-preview { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }

.conversation-row { display: grid; min-height: 78px; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 12px 15px; text-decoration: none; border-bottom: 1px solid var(--line); }
.conversation-row.is-current { background: var(--green-soft); }
.conversation-row.is-unread .row-title { font-weight: 760; }
.avatar, .connection-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); }
.channel-icon { display: grid; width: 36px; height: 36px; place-items: center; color: #355d91; background: #edf3fb; border: 1px solid #dce6f2; border-radius: 50%; }
.channel-icon.provider-telegram { color: #2677a9; background: #eaf6fb; border-color: #d4eaf4; }
.channel-icon.provider-test { color: var(--muted); background: transparent; border-color: var(--line-strong); border-style: dashed; border-radius: 8px; }
.test-thread-mark { font-size: 11px; font-weight: 750; line-height: 1; }
.conversation-copy, .row-title, .row-preview, .connection-copy { display: block; min-width: 0; }
.row-title { overflow: hidden; margin-bottom: 4px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.row-preview { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.row-context { display: block; overflow: hidden; margin-top: 4px; color: #8a928c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.row-state { display: block; overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.conversation-row.state-ready_for_review .row-state,
.conversation-row.state-human_needed .row-state { color: #885817; }
.conversation-row.state-working .row-state { color: var(--green); }
.row-meta { display: grid; min-width: 112px; justify-items: end; gap: 8px; color: var(--muted); font-size: 12px; }
.row-indicators { display: inline-flex; min-height: 16px; align-items: center; justify-content: flex-end; gap: 6px; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.needs-answer-badge { display: block; width: 9px; height: 9px; background: #b47a22; border-radius: 50%; box-shadow: 0 0 0 3px var(--amber-soft); }
.empty-state { padding: 64px 28px; color: var(--muted); text-align: center; }
.empty-state h2 { margin: 0 0 6px; color: var(--text); font-size: 18px; }
.empty-state p { margin: 0; }
.conversation-page-control { display: grid; padding: 10px 12px; place-items: center; border-top: 1px solid var(--line); }
.conversation-page-button { min-height: 36px; padding: 6px 12px; }
.conversation-page-button[aria-busy="true"] { color: var(--muted); cursor: progress; }
.conversation-page-control[data-auto-load="true"] { min-height: 18px; padding: 4px; border-top: 0; }
.conversation-page-control[data-auto-load="true"] .conversation-page-button { display: none; }
.conversation-page-control.is-loading::after { width: 14px; height: 14px; border: 2px solid var(--line-strong); border-top-color: var(--green); border-radius: 50%; content: ""; animation: conversation-loading-spin 650ms linear infinite; }
.recovery-state { display: grid; max-width: 520px; justify-items: center; gap: 12px; margin: 16vh auto 0; padding: 28px; text-align: center; }
.recovery-state-icon { display: grid; width: 52px; height: 52px; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 50%; }
.recovery-state-icon svg { width: 25px; height: 25px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.recovery-state h1 { margin: 2px 0 0; font-size: 24px; }
.recovery-state p { max-width: 440px; margin: 0; color: var(--muted); line-height: 1.5; }
.recovery-state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.recovery-state-actions a { display: inline-flex; align-items: center; text-decoration: none; }

.conversation-page { overflow: hidden; }
.conversation-page .app-shell { height: 100vh; min-height: 0; }
.conversation-page .main { width: auto; max-width: none; height: 100vh; overflow: hidden; padding: 0; }
.conversation-screen { position: relative; display: grid; height: 100vh; min-height: 0; grid-template-columns: 304px minmax(420px, 1fr); overflow: hidden; background: var(--surface); border: 0; border-radius: 0; transition: grid-template-columns 180ms ease-in-out; }
.conversation-screen[data-index-collapsed="true"] { grid-template-columns: 0 minmax(420px, 1fr); }
.conversation-screen[data-navigating="true"] { cursor: progress; }
.conversation-dialogs { display: contents; }
.conversation-index { display: flex; min-width: 0; min-height: 0; overflow: hidden; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); }
.conversation-screen[data-index-collapsed="true"] .conversation-index { visibility: hidden; border-right: 0; }
.conversation-index-header { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 15px; border-bottom: 1px solid var(--line); }
.conversation-index-heading { display: flex; min-width: 0; align-items: center; gap: 6px; }
.conversation-index-title { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.conversation-index-header .test-approval-progress { flex: 0 0 auto; padding: 2px 6px; color: var(--muted); background: var(--bg); border-radius: 999px; font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1.35; white-space: nowrap; }
.conversation-section-link { display: inline-grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; color: var(--muted); border-radius: 5px; text-decoration: none; }
.conversation-section-link:hover { color: var(--text); background: var(--bg); }
.conversation-section-link:active { transform: scale(.96); }
.conversation-section-link svg { width: 18px; height: 18px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.conversation-index-header span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.conversation-index-actions { display: flex; align-items: center; gap: 8px; }
.panel-toggle, .conversation-list-toggle, .conversation-add-test { width: 32px; height: 32px; color: var(--muted); background: transparent; border: 0; border-radius: 5px; cursor: pointer; }
.panel-toggle:hover, .conversation-list-toggle:hover, .conversation-add-test:hover { color: var(--text); background: var(--bg); }
.panel-toggle svg, .conversation-list-toggle svg, .conversation-add-test svg { width: 18px; height: 18px; }
.conversation-index-list { min-height: 0; overflow-y: auto; border: 0; border-radius: 0; }
.conversation-index-list .conversation-row { min-height: 72px; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
.conversation-index-list .channel-icon { width: 32px; height: 32px; }
.conversation-index-list .channel-icon.provider-test { width: 28px; height: 28px; margin: 2px; }
.conversation-index-list .row-title { margin-bottom: 3px; font-size: 14px; }
.conversation-index-list .row-preview { font-size: 13px; }
.conversation-index-list .row-context { display: none; }
.conversation-index-list .row-state { font-size: 10px; }
.conversation-index-list .row-meta { min-width: 8px; }
.conversation-index-list .row-meta time { display: none; }
.conversation-index-list .conversation-row:active { background: var(--green-soft); }
.customer-conversation, .assistant-conversation { display: flex; min-width: 0; min-height: 0; overflow: hidden; flex-direction: column; }
.conversation-brief { width: min(680px, 100%); margin: 16px auto; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-inline-start: 3px solid var(--blue); border-radius: 6px; }
.conversation-brief-internal { border-inline-start-color: var(--amber); }
.conversation-brief.conversation-brief-internal .conversation-brief-icon { color: var(--amber); }
.conversation-brief > summary { display: grid; min-height: 36px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 6px; padding: 3px 8px 3px 10px; cursor: pointer; list-style: none; }
.conversation-brief > summary::-webkit-details-marker { display: none; }
.conversation-brief > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: inherit; }
.conversation-brief-heading { display: flex; min-width: 0; align-items: baseline; gap: 6px; }
.conversation-brief-heading strong { flex: 0 0 auto; font-size: 13px; }
.conversation-brief-heading small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-brief-heading small::before { margin-right: 6px; content: "·"; }
.conversation-brief svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.conversation-brief .conversation-brief-icon { width: 16px; height: 16px; color: var(--blue); }
.conversation-brief-toggle { display: inline-flex; min-width: 32px; min-height: 32px; align-items: center; justify-content: center; padding: 5px; color: var(--muted); border-radius: 5px; }
.conversation-brief > summary:hover .conversation-brief-toggle { color: var(--blue); background: var(--bg); }
.conversation-brief > summary:active .conversation-brief-toggle { background: var(--blue-soft); }
.conversation-brief-preview { grid-column: 1 / -1; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.conversation-brief[open] .conversation-brief-preview { display: none; }
.conversation-brief-chevron { transition: transform 160ms ease; }
.conversation-brief[open] .conversation-brief-chevron { transform: rotate(180deg); }
.conversation-brief-body { padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.conversation-brief-text { display: grid; gap: 0; }
.conversation-brief-text > p, .conversation-brief-body > p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; text-wrap: pretty; }
.conversation-brief-text > .conversation-brief-title { padding-bottom: 9px; font-size: 15px; font-weight: 750; }
.conversation-brief-field { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.conversation-brief-field > strong { color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.55; }
.conversation-brief-field > span { min-width: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; text-wrap: pretty; }
.conversation-brief-text > .conversation-brief-note, .conversation-brief-body > .conversation-handover-context { margin-top: 10px; padding: 10px 12px; background: var(--blue-soft); border-radius: 5px; }
.conversation-brief-body > p + p, .conversation-brief-text + p { margin-top: 9px; }
.customer-conversation { position: relative; }
.conversation-header { display: flex; min-height: 64px; align-items: center; gap: 11px; padding: 10px 15px; border-bottom: 1px solid var(--line); }
.conversation-screen:has(.assistant-launcher) .conversation-header { padding-right: 222px; }
.conversation-list-toggle { display: none; color: var(--blue); }
.conversation-screen[data-index-collapsed="true"] .conversation-list-toggle { display: inline-grid; }
.conversation-header .avatar { width: 36px; height: 36px; font-size: 11px; }
.conversation-identity { display: grid; min-width: 0; gap: 2px; }
.conversation-identity { flex: 1; }
.conversation-identity strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-identity small { color: var(--muted); font-size: 12px; }
.conversation-notice { margin: 10px 15px 0; }
.test-undo-notice { display: flex; align-items: center; gap: 12px; }
.test-undo-notice form { margin: 0 0 0 auto; }
.test-undo-notice .text-button { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.conversation-identity small.navigation-loading { display: inline-flex; align-items: center; gap: 7px; }
.conversation-identity small.navigation-loading::before { width: 10px; height: 10px; flex: 0 0 auto; border: 2px solid var(--line-strong); border-top-color: var(--green); border-radius: 50%; content: ""; animation: conversation-loading-spin 650ms linear infinite; }
.conversation-navigation-loading { position: absolute; z-index: 8; inset: 64px 0 0; display: none; place-items: center; padding: 24px; color: var(--muted); background: var(--surface); font-size: 13px; text-align: center; }
.conversation-screen[data-navigating="true"] .conversation-navigation-loading { display: grid; }
@keyframes conversation-loading-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .conversation-brief-chevron { transition: none; }
  .conversation-identity small.navigation-loading::before,
  .conversation-page-control.is-loading::after,
  .test-state.state-running svg,
  .test-turn-status.state-working .test-turn-status-icon svg { animation: none; }
}
.test-state { display: inline-grid; width: 18px; height: 18px; place-items: center; color: var(--muted); }
.test-state svg { width: 17px; height: 17px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.test-state.state-running, .test-state.state-approved { color: var(--green); }
.test-state.state-running svg { animation: conversation-loading-spin 700ms linear infinite; }
.test-state.state-running svg circle { opacity: .28; }
.test-state.state-ready, .test-state.state-takeover { color: #9a6a19; }
.test-state.state-owner-replied { color: var(--green); }
.test-state.state-failed { color: #a33a32; }
.test-state.state-not-run { color: var(--line-strong); }
.test-approval-bar { display: flex; flex-wrap: wrap; min-height: 56px; align-items: center; justify-content: flex-end; gap: 4px 8px; padding: 9px 16px 4px; border-top: 1px solid var(--line); background: var(--surface); }
.test-approval-bar form { margin: 0; }
.test-approval-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.test-delete-button { width: 36px; height: 36px; flex: 0 0 auto; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 6px; cursor: pointer; }
.test-delete-button:hover { color: #9a372f; background: #fbefed; border-color: #e8c7c3; }
.test-delete-button svg { width: 18px; height: 18px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.test-approved-button { display: inline-flex; align-items: center; gap: 7px; color: var(--green); opacity: 1; }
.test-approved-button svg { width: 17px; height: 17px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
.test-awaiting-approval { color: var(--muted); font-size: 13px; }
.test-feedback-hint { margin: 12px 14px; padding: 10px 12px; color: var(--muted); border-left: 2px solid var(--line-strong); font-size: 13px; line-height: 1.45; }
.private-feedback-status { margin-top: 10px; color: var(--danger, #8b382f); font-size: 14px; line-height: 1.45; }
.private-feedback-status p { margin: 0 0 8px; }
.private-feedback-status button { min-height: 32px; }
.customer-attention-card { position: relative; width: min(680px, 100%); margin: 10px auto 20px; padding: 14px; background: var(--amber-soft); border: 1px solid #ead5a7; border-radius: 7px; box-shadow: 0 5px 18px rgb(112 67 7 / 10%); }
.customer-attention-card.reply-review, .customer-attention-card.owner-question { margin: 10px auto 20px; }
.customer-attention-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.customer-attention-heading .eyebrow { margin: 0; color: var(--amber); }
.customer-attention-card .customer-attention-heading small { display: inline; margin-top: 0; color: var(--muted); font-size: 11px; }
.customer-attention-card label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 680; }
.customer-attention-card textarea { background: var(--surface); }
.customer-attention-card .reply-review-reject { right: 14px; bottom: 18px; }
.customer-attention-prompt { margin: 0 0 12px; line-height: 1.5; }
.test-turn-status { display: flex; width: min(680px, 100%); align-items: flex-start; gap: 9px; margin: 10px auto 18px; padding: 9px 11px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; font-size: 12px; }
.test-turn-status-icon { display: inline-grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; }
.test-turn-status-icon svg { width: 18px; height: 18px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.test-turn-status-copy { display: grid; min-width: 0; flex: 1; gap: 1px; }
.test-turn-status-copy strong { color: var(--text); font-size: 13px; }
.test-turn-status-copy small { color: var(--muted); font-size: 11px; }
.test-turn-status.state-working { color: var(--green); background: var(--green-soft); border-color: rgb(33 110 78 / 24%); }
.test-turn-status.state-working .test-turn-status-icon svg { animation: conversation-loading-spin 700ms linear infinite; }
.test-turn-status.state-working .test-turn-status-icon circle { opacity: .28; }
.test-turn-status.state-takeover { color: var(--amber); background: var(--amber-soft); border-color: #ead5a7; }
.test-turn-status.state-failed { align-items: center; color: #a33a32; background: #fff0ee; border-color: #e6b8b3; }
.test-turn-status form { margin: 0 0 0 auto; }
.test-turn-status .secondary-button { min-height: 32px; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.assistant-launcher { position: absolute; z-index: 14; top: 12px; right: 16px; display: inline-flex; max-width: 190px; min-height: 40px; align-items: center; gap: 8px; padding: 0 14px; color: #fff; background: var(--green); border: 0; border-radius: 20px; box-shadow: 0 4px 14px rgb(28 36 31 / 18%); cursor: pointer; transition: background 160ms ease, transform 180ms ease; }
.assistant-launcher:hover { background: #185c40; }
.assistant-launcher:active { transform: scale(.97); }
.assistant-launcher svg { width: 21px; height: 21px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.assistant-launcher span { overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.assistant-count { display: grid; min-width: 22px; height: 22px; place-items: center; padding: 0 6px; color: var(--green); background: #fff; border-radius: 11px; font-size: 12px; font-variant-numeric: tabular-nums; }
.conversation-screen[data-assistant-collapsed="false"] .assistant-launcher { background: #174f3a; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 28%), 0 4px 14px rgb(28 36 31 / 18%); }
.assistant-conversation { position: fixed; z-index: 13; right: 28px; bottom: 28px; width: min(440px, calc(100vw - 56px)); height: min(680px, calc(100vh - 56px)); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 18px 56px rgb(28 36 31 / 22%); opacity: 1; transform: translateY(0); transition: visibility 0s, opacity 200ms ease, transform 200ms ease; }
.conversation-screen[data-assistant-collapsed="true"] .assistant-conversation { visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(12px); transition: visibility 0s 200ms, opacity 180ms ease-in, transform 180ms ease-in; }
.assistant-header { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 15px; border-bottom: 1px solid var(--line); }
.assistant-header-copy { display: grid; min-width: 0; gap: 2px; }
.assistant-header strong { font-size: 15px; }
.assistant-header small { color: var(--muted); font-size: 12px; }
.assistant-close { width: 36px; height: 36px; color: var(--muted); background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.assistant-close:hover { color: var(--text); background: var(--bg); }
.assistant-close:active { transform: scale(.96); }
.assistant-close svg { width: 20px; height: 20px; }
.assistant-thread { min-height: 0; flex: 1; overflow-y: auto; padding: 18px 14px; background: #fafbf9; }
.runbook-proposal { margin: 14px 0; padding: 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 7px; }
.runbook-proposal > strong { display: block; margin: 5px 0 10px; line-height: 1.4; }
.runbook-proposal-diff { overflow: hidden; margin: 12px 0; border: 1px solid var(--line); border-radius: 6px; }
.runbook-proposal-diff summary { display: flex; min-height: 38px; align-items: center; padding: 8px 11px; color: var(--blue); font-size: 13px; font-weight: 700; cursor: pointer; }
.runbook-proposal-diff summary:hover { background: var(--bg); }
.runbook-proposal-version { padding: 10px 11px; border-top: 1px solid var(--line); }
.runbook-proposal-version > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .03em; text-transform: uppercase; }
.runbook-proposal-version pre { overflow-wrap: anywhere; margin: 0; font: inherit; font-size: 12px; line-height: 1.45; white-space: pre-wrap; }
.runbook-proposal-version.proposed { background: var(--green-soft); }
.runbook-proposal-question { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.runbook-proposal-actions { display: flex; gap: 8px; margin-top: 12px; }
.runbook-proposal-actions form { margin: 0; }
.runbook-proposal.state-applied, .runbook-proposal.state-rejected { color: var(--muted); background: transparent; }
.owner-question, .answered-exchange { margin: 0 0 14px; }
.owner-question > .message, .answered-exchange .message { margin-bottom: 8px; }
.question-actions { margin-left: 20px; padding: 12px; background: var(--amber-soft); border: 1px solid #ead5a7; border-radius: 7px; }
.question-actions > .eyebrow { margin-bottom: 9px; }
.test-question-preview { margin: 0 0 12px; padding: 10px 11px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.test-question-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.test-question-preview-heading .eyebrow { margin: 0; }
.test-question-preview-heading span { padding: 2px 7px; color: var(--muted); background: rgb(255 255 255 / 58%); border: 1px solid rgb(112 67 7 / 18%); border-radius: 999px; font-size: 11px; font-weight: 680; }
.test-question-preview-message { margin: 0 0 5px; color: var(--text); line-height: 1.4; }
.test-question-preview-note { margin: 0; color: var(--muted); line-height: 1.4; }
.test-feedback-prompt { grid-column: 1 / -1; margin: 0 2px 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.proposed-reply { margin: 0 0 11px; padding: 10px 11px; background: #fff; border-left: 3px solid var(--green); }
.proposed-reply label { margin-bottom: 6px; }
.proposed-reply textarea { min-height: 88px; }
.missing-proposal { margin: 0; line-height: 1.45; }
.proposed-reply .primary-button { margin-top: 10px; }
.reply-review { position: relative; margin: 0 0 14px 20px; padding: 13px; background: var(--amber-soft); border: 1px solid #ead5a7; border-radius: 7px; }
.reply-review > .eyebrow { margin-bottom: 8px; }
.reply-review textarea { min-height: 104px; background: var(--surface); }
.reply-review-actions { display: flex; align-items: center; margin-top: 10px; }
.reply-review-reject { position: absolute; right: 14px; bottom: 18px; margin: 0; }
.reply-review-reject .text-button { min-height: 32px; padding: 4px 8px; }
.reply-review small { display: block; margin-top: 7px; color: var(--muted); font-weight: 650; }
.reply-review-error { margin: 10px 0 0; color: #9a372f; font-size: 13px; font-weight: 650; }
.reply-review.state-approved { background: var(--green-soft); border-color: #bcdac8; }
.reply-review.state-rejected, .reply-review.state-superseded { background: var(--bg); border-color: var(--line); }
.missing-proposal { margin-bottom: 11px; color: #704307; font-size: 13px; }
.answer-row { display: grid; gap: 8px; }
.answer-row textarea { min-height: 76px; }
.answer-row .primary-button { min-width: 104px; justify-self: end; }
.option-list { display: grid; gap: 8px; }
.option-button { display: grid; width: 100%; gap: 2px; padding: 10px 12px; background: #fff; border: 1px solid #dec89a; border-radius: 5px; cursor: pointer; text-align: left; }
.option-button:hover { border-color: var(--amber); }
.option-button span { color: var(--muted); font-size: 13px; }
.option-answer { margin-top: 10px; }
.chat-thread { min-height: 420px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.customer-conversation > .chat-thread { min-height: 0; flex: 1; overflow-y: auto; border: 0; border-radius: 0; }
.reply-test-composer-region { flex: 0 0 auto; }
.customer-composer { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 9px; padding: 12px 14px max(24px, calc(12px + env(safe-area-inset-bottom, 0px))); border-top: 1px solid var(--line); }
.test-approval-bar + .reply-test-composer-region .customer-composer { padding-top: 4px; border-top: 0; }
.customer-composer:not([data-photo-composer]) { grid-template-columns: minmax(0, 1fr) auto; }
.customer-composer textarea { min-height: 52px; max-height: 132px; overflow-y: auto; padding: 13px 16px; border-radius: 26px; resize: none; }
.owner-reply-composer { background: var(--amber-soft); border-top-color: #ead5a7; }
.photo-picker { width: 52px; height: 52px; align-self: end; color: var(--muted); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer; }
.photo-picker:hover { color: var(--text); background: var(--bg); }
.photo-picker svg { width: 18px; height: 18px; }
.photo-preview-strip { display: flex; grid-column: 1 / -1; overflow-x: auto; gap: 8px; padding-bottom: 2px; }
.photo-preview { position: relative; flex: 0 0 auto; width: 72px; height: 72px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; color: #fff; background: rgb(20 25 22 / 72%); border: 0; border-radius: 50%; cursor: pointer; }
.photo-preview button svg { width: 14px; height: 14px; }
.upload-progress { position: absolute; right: 14px; bottom: 5px; left: 75px; height: 4px; overflow: hidden; background: #dbe2dd; border-radius: 999px; }
.upload-progress span { display: block; width: 0; height: 100%; background: var(--green); border-radius: inherit; transition: width 180ms ease-out; }
.upload-progress.is-indeterminate span { width: 32%; animation: upload-progress-indeterminate 900ms ease-in-out infinite; }
.composer-error { grid-column: 1 / -1; margin: 0; color: #9a372f; font-size: 12px; }
.dictation-input { position: relative; min-width: 0; align-self: stretch; }
.dictation-input textarea { display: block; width: 100%; padding-right: 50px; }
.customer-composer .dictation-input textarea, .assistant-conversation > .message-composer .dictation-input textarea, .run-chat-composer .dictation-input textarea { padding-right: 50px; }
.dictation-input .dictation-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; flex-shrink: 0; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 22px; cursor: pointer; }
.dictation-input .dictation-button:hover { color: var(--green); background: var(--bg); }
.dictation-input .dictation-button:active { transform: scale(.97); }
.dictation-input .dictation-mic { position: absolute; right: 5px; bottom: 4px; }
.dictation-input .dictation-bar { position: absolute; inset: 0; display: flex; align-items: center; gap: 6px; padding: 3px 6px; min-height: 52px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; }
.dictation-input[data-state]:not([data-state="idle"]) textarea { visibility: hidden; }
.dictation-input[data-state="error"] .dictation-bar { position: relative; border-radius: 16px; }
.dictation-input[data-state="error"] textarea { display: none; }
.dictation-status { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.dictation-timer { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.dictation-meter { display: flex; align-items: center; justify-content: center; gap: 2px; width: 22px; height: 28px; }
.dictation-meter i { width: 3px; height: 5px; border-radius: 2px; background: #c34747; }
.dictation-input .dictation-stop { color: #b43d3d; }
.dictation-input .dictation-stop svg { fill: currentColor; }
.dictation-input .dictation-retry { flex-shrink: 0; width: auto; height: auto; min-height: 44px; padding: 4px 8px; color: var(--green); border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; }
.dictation-input[data-state="transcribing"] .dictation-status::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -2px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: dictation-spin 1s linear infinite; }
.dictation-input [hidden] { display: none !important; }
@keyframes dictation-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dictation-input[data-state="transcribing"] .dictation-status::before { animation: none; } }
@media (max-width: 480px) { .dictation-input[data-state="recording"] .dictation-status { font-size: 0; } .dictation-input .dictation-bar { gap: 3px; } }
.primary-button.composer-send { width: 52px; height: 52px; min-height: 52px; padding: 0; border-radius: 50%; }
.photo-drop-active { position: relative; box-shadow: inset 0 0 0 2px var(--green); }
.photo-drop-active::after { position: absolute; z-index: 20; inset: 12px; display: grid; place-items: center; color: var(--green); background: rgb(241 248 244 / 94%); border: 2px dashed var(--green); border-radius: 9px; content: attr(data-photo-drop-label); font-weight: 750; pointer-events: none; }
.message { display: flex; margin-bottom: 14px; }
.message.outbound { justify-content: flex-end; }
.test-tail-delete { width: 32px; height: 32px; align-self: center; margin-left: 7px; color: var(--muted); background: transparent; border: 0; border-radius: 50%; cursor: pointer; opacity: .58; }
.test-tail-delete:hover, .test-tail-delete:focus-visible { color: #963e35; background: #f9ecea; opacity: 1; }
.test-tail-delete svg { width: 17px; height: 17px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.assistant-thread .message.operator { justify-content: flex-end; }
.message-bubble { position: relative; max-width: min(640px, 78%); padding: 10px 12px 7px; background: #eff2ef; border-radius: 7px 7px 7px 2px; }
.message.outbound .message-bubble { background: var(--green-soft); border-radius: 7px 7px 2px 7px; }
.assistant-thread .message.operator .message-bubble { background: var(--green-soft); border-radius: 7px 7px 2px 7px; }
.customer-typing .message-bubble { display: flex; min-width: 48px; align-items: center; justify-content: center; gap: 4px; padding: 14px 13px; }
.customer-typing .message-bubble > span { width: 5px; height: 5px; background: var(--muted); border-radius: 50%; animation: assistant-pulse 1.1s ease-in-out infinite; }
.customer-typing .message-bubble > span:nth-child(2) { animation-delay: 120ms; }
.customer-typing .message-bubble > span:nth-child(3) { animation-delay: 240ms; }
.decision-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 650; }
.message-bubble p { margin: 0; line-height: 1.5; white-space: pre-wrap; }
.message-reply-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; max-width: min(640px, 78%); }
.message.outbound .message-reply-stack { align-items: flex-end; }
.message-reply-stack > .message-bubble { max-width: 100%; }
.message-reply-context { max-width: 100%; color: var(--muted); font-size: 12px; }
.message-reply-label { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.message-reply-label svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.story-reply-quote { display: grid; gap: 5px; margin: 0; padding: 2px 0 2px 9px; border-inline-start: 2px solid var(--line); }
.story-reply-preview { display: block; width: 108px; height: 160px; overflow: hidden; border-radius: 8px; background: var(--surface); }
a.story-reply-preview { cursor: zoom-in; }
.story-reply-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-reply-preview:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.message-media-grid { display: grid; overflow: hidden; gap: 3px; margin: -6px -8px 8px; border-radius: 5px; }
.message-photo { display: block; min-width: 180px; max-width: 360px; max-height: 360px; background: var(--bg); cursor: zoom-in; }
.message-photo img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.message-video { display: block; width: min(360px, 72vw); max-width: 100%; max-height: 420px; border-radius: 9px; background: #111; object-fit: contain; }
.message-shared-item { min-width: 0; overflow: hidden; border-radius: 9px; background: var(--surface); }
.message-shared-content { display: grid; gap: 6px; padding: 12px; font-size: 14px; }
.message-shared-content .message-shared-caption { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.message-shared-link { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; width: fit-content; color: var(--green); text-underline-offset: 3px; }
.message-media-grid.is-carousel .message-shared-item { flex: 0 0 min(280px, 65vw); scroll-snap-align: start; }
.message-media-grid.is-group { width: min(360px, 70vw); grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 145px; }
.message-media-grid.is-group .message-photo { width: 100%; min-width: 0; max-width: none; height: 145px; max-height: none; }
.message-media-grid.is-group .message-photo img { height: 100%; max-height: none; }
.message-media-grid.is-three { grid-template-rows: repeat(2, 112px); grid-auto-rows: 112px; }
.message-media-grid.is-three .message-photo { height: 112px; }
.message-media-grid.is-three .message-photo:first-child { height: 227px; grid-row: span 2; }
.message-media-grid.is-carousel { display: flex; width: min(420px, 70vw); overflow-x: auto; gap: 8px; margin-right: 0; padding: 2px 2px 8px; border-radius: 0; scroll-snap-type: x mandatory; }
.message-media-grid.is-carousel .message-photo { display: grid; height: auto; min-width: min(230px, 60vw); max-width: min(230px, 60vw); max-height: none; overflow: hidden; grid-template-rows: 220px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; scroll-snap-align: start; text-decoration: none; }
.message-media-grid.is-carousel .message-photo img { width: 100%; height: 220px; max-height: none; object-fit: cover; }
.message-photo-title { overflow: hidden; padding: 9px 10px; color: var(--text); font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.attachment-unavailable { display: block; padding: 18px; color: var(--muted); background: var(--bg); font-size: 12px; }
.message.media-unavailable .message-bubble { max-width: 280px; padding: 8px 10px 6px; }
.message.media-unavailable .attachment-unavailable { display: flex; align-items: center; gap: 7px; padding: 0; background: transparent; font-size: 13px; }
.message.media-unavailable .attachment-unavailable .lucide { width: 16px; height: 16px; flex: 0 0 auto; }
.attachment-unavailable-help { position: relative; flex: 0 0 auto; }
.attachment-unavailable-help > summary { display: grid; width: 32px; height: 32px; margin: -8px; place-items: center; color: var(--muted); border-radius: 50%; cursor: pointer; list-style: none; }
.attachment-unavailable-help > summary::-webkit-details-marker { display: none; }
.attachment-unavailable-help > summary:hover, .attachment-unavailable-help > summary:focus-visible, .attachment-unavailable-help[open] > summary { color: var(--text); background: rgb(28 36 31 / 7%); outline: none; }
.attachment-unavailable-help > summary:focus-visible { box-shadow: 0 0 0 2px var(--green); }
.attachment-unavailable-help > summary svg { width: 17px; height: 17px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.attachment-unavailable-explanation { position: absolute; z-index: 8; top: calc(100% + 8px); left: 50%; width: min(270px, calc(100vw - 48px)); padding: 10px 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 24px rgb(28 36 31 / 16%); font-size: 12px; line-height: 1.45; transform: translateX(-50%); }
.message.has-media .message-bubble { width: min(360px, 78%); max-width: none; padding: 8px 8px 7px; border-radius: 12px 12px 12px 4px; }
.message.outbound.has-media .message-bubble { border-radius: 12px 12px 4px; }
.message.has-media-carousel .message-bubble { width: min(420px, 78%); }
.message.has-media .message-media-grid { width: 100%; margin: 0 0 8px; border-radius: 9px; }
.message.has-media .message-media-grid:not(.is-carousel) .message-photo { width: 100%; min-width: 0; max-width: none; max-height: 420px; overflow: hidden; border-radius: 9px; }
.message.has-media .message-media-grid:not(.is-carousel) .message-photo img { width: 100%; max-height: 420px; object-fit: cover; }
.message.has-media .message-media-grid:not(.is-carousel) .message-video { width: 100%; }
.message.has-media .message-media-grid.is-group,
.message.has-media .message-media-grid.is-carousel { width: 100%; }
.message.optimistic .message-bubble { opacity: .82; }
.message.optimistic .message-photo { position: relative; }
.message.optimistic .message-photo::after { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgb(20 25 22 / 34%); content: attr(data-status); font-size: 12px; font-weight: 700; }
.message-bubble time { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; text-align: right; }
.message-timestamp { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.message-timestamp time { margin-top: 0; }
.message.has-reactions { margin-bottom: 24px; }
.message-reactions { position: absolute; bottom: -13px; left: 8px; display: flex; align-items: center; gap: 4px; }
.message.outbound .message-reactions { right: 8px; left: auto; }
.message-reaction-form { display: inline-flex; margin: 0; }
.message-reaction { display: inline-flex; min-width: 25px; height: 25px; align-items: center; justify-content: center; gap: 3px; padding: 0 7px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 1px 3px rgb(20 25 22 / 12%); font-size: 14px; line-height: 1; }
.message-reaction.is-operator { cursor: pointer; border-color: #d7a9b0; background: #fff8f9; }
.message-reaction-add { display: inline-flex; width: 27px; height: 27px; align-items: center; justify-content: center; padding: 0; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 1px 3px rgb(20 25 22 / 10%); cursor: pointer; opacity: 0; transform: translateY(2px); transition: opacity 120ms ease, transform 120ms ease, color 120ms ease; }
.message:hover .message-reaction-add, .message:focus-within .message-reaction-add { opacity: 1; transform: translateY(0); }
.message-reaction-add:hover { color: #a83d4f; }
.message-reaction-add svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.message-reaction-form[data-pending="true"] { opacity: .55; pointer-events: none; }
.message-reaction small { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1; }
.conversation-action-error { position: fixed; z-index: 80; bottom: 24px; left: 50%; max-width: min(420px, calc(100vw - 32px)); padding: 10px 14px; color: #742f28; background: #fff7f5; border: 1px solid #e1b8b2; border-radius: 9px; box-shadow: 0 8px 28px rgb(20 25 22 / 18%); font-size: 13px; font-weight: 650; transform: translateX(-50%); }
@media (hover: none) { .message-reaction-add { opacity: 1; transform: none; } }
.human-authored-label { display: block; margin-top: 5px; color: var(--green); font-size: 11px; font-weight: 700; text-align: right; }
.delivery-status { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; }
.delivery-status.failed { color: #9a372f; }
.delivery-status.pending { color: var(--amber); }
.delivery-failure { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 6px; }
.delivery-failure .delivery-status { margin-top: 0; }
.delivery-failure form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.delivery-failure .text-button { min-height: 32px; padding: 4px 0; font-size: 12px; }
.delivery-failure-help { position: relative; flex: 0 0 auto; }
.delivery-failure-help > summary { display: grid; width: 32px; height: 32px; margin: 0 -7px; place-items: center; color: var(--muted); border-radius: 50%; cursor: pointer; list-style: none; }
.delivery-failure-help > summary::-webkit-details-marker { display: none; }
.delivery-failure-help > summary:hover, .delivery-failure-help > summary:focus-visible, .delivery-failure-help[open] > summary { color: var(--text); background: rgb(28 36 31 / 7%); outline: none; }
.delivery-failure-help > summary:focus-visible { box-shadow: 0 0 0 2px var(--green); }
.delivery-failure-help > summary svg { width: 16px; height: 16px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.delivery-failure-help-text { position: absolute; z-index: 8; right: -6px; bottom: calc(100% + 6px); width: min(280px, calc(100vw - 48px)); padding: 10px 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 24px rgb(28 36 31 / 16%); font-size: 12px; font-weight: 500; line-height: 1.45; text-wrap: pretty; }
.delivery-retry-error { width: 100%; color: #9a372f; font-size: 11px; line-height: 1.4; }
.message-composer { position: sticky; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 14px 0 4px; background: var(--bg); }
.message-composer.photo-composer { grid-template-columns: 52px minmax(0, 1fr) 52px; }
.message-composer.photo-composer .photo-preview-strip { grid-column: 1 / -1; }
.message-composer label { min-width: 0; }
.assistant-conversation > .message-composer { position: static; padding: 12px 14px; background: var(--surface); border-top: 1px solid var(--line); }
.assistant-conversation > .message-composer textarea { min-height: 52px; max-height: 132px; overflow-y: auto; border-radius: 26px; padding: 13px 16px; resize: none; }
.customer-composer .primary-button,
.assistant-conversation > .message-composer .primary-button { border-radius: 26px; }
.instagram-continuation { grid-template-columns: minmax(0, 1fr) 32px; align-items: center; row-gap: 4px; }
.instagram-continuation-action { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.instagram-continuation-action svg { width: 17px; height: 17px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.instagram-continuation .delivery-failure-help > summary { margin: 0; }
.instagram-continuation-note { grid-column: 1 / -1; color: var(--muted); font-size: 11px; line-height: 1.35; text-align: center; text-wrap: pretty; }
.instagram-human-agent-note { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.instagram-human-agent-help { position: relative; display: inline-block; }
.instagram-human-agent-help > summary { display: grid; width: 15px; height: 15px; place-items: center; border: 1px solid currentcolor; border-radius: 50%; font-size: 10px; font-style: normal; font-weight: 700; cursor: pointer; list-style: none; }
.instagram-human-agent-help > summary::-webkit-details-marker { display: none; }
.instagram-human-agent-help > summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.instagram-human-agent-help-text { position: absolute; z-index: 8; right: -6px; bottom: calc(100% + 7px); width: min(280px, calc(100vw - 48px)); padding: 10px 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 24px rgb(28 36 31 / 16%); font-size: 12px; font-weight: 500; line-height: 1.45; text-align: left; text-wrap: pretty; }
.assistant-thinking { display: flex; width: fit-content; align-items: center; gap: 4px; margin: 4px 0 14px; padding: 9px 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.assistant-thinking > span { width: 5px; height: 5px; background: var(--muted); border-radius: 50%; animation: assistant-pulse 1.1s ease-in-out infinite; }
.assistant-thinking > span:nth-child(2) { animation-delay: 120ms; }
.assistant-thinking > span:nth-child(3) { animation-delay: 240ms; }
.assistant-thinking small { margin-left: 5px; }
.test-run-time { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); }
.test-learning-receipt { padding: 12px 0; margin: 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.test-learning-receipt p { margin: 0 0 6px; }
.test-learning-receipt [role="status"], .test-learning-review-link { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.test-learning-receipt .text-button { min-height: 36px; padding: 4px 0; font-size: 14px; text-align: left; }
.test-learning-success { color: var(--green); font-size: 14px; }
.test-learning-review-link small { font-size: 12px; }
.assistant-thread { overflow-anchor: none; }
.chat-history-loader { color: var(--muted); text-align: center; font-size: 14px; flex-shrink: 0; }
.chat-history-loader:empty { display: none; }
.chat-history-loader:not(:has(button)) { display: none; }
.chat-history-loader button { min-height: 44px; padding: 8px 16px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.chat-history-loader button:hover { background: var(--bg); }
.chat-history-loader button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.chat-history-loader[aria-busy] button::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: history-spin 800ms linear infinite; }
.chat-history-loader [role="status"]:not([hidden]) { display: block; }
@keyframes history-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .chat-history-loader[aria-busy] button::before { animation: none; } }
.test-changes-dialog { width: min(840px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 20px 70px rgb(22 37 29 / 24%); }
.test-changes-dialog[open] { display: flex; flex-direction: column; }
.test-changes-dialog::backdrop { background: rgb(20 30 24 / 45%); }
.test-changes-header { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: start; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.test-changes-header h2 { margin: 0; font-size: 21px; line-height: 1.3; }
.test-changes-header p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.test-changes-header .icon-control { width: 36px; height: 36px; flex-shrink: 0; }
.test-changes-header svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.test-changes-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.test-changes-body h3 { margin: 20px 0 8px; font-size: 15px; }
.test-changes-body h3:first-child { margin-top: 0; }
.test-change-summaries { margin: 8px 0 16px; padding-left: 20px; }
.test-change-summaries li + li { margin-top: 8px; }
.test-change-summaries a { display: inline-block; font-size: 13px; }
.test-changes-note { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 6px 0 12px; }
.test-other-changes { margin: 12px 0; }
.test-other-changes > summary { min-height: 36px; cursor: pointer; font-size: 14px; padding: 6px 0; }
.test-wording-change { border-top: 1px solid var(--line); }
.test-wording-change > summary { padding: 12px 0; cursor: pointer; font-size: 14px; }
.test-wording-change > summary small { margin-left: 12px; color: var(--muted); font-weight: 400; }
.test-wording-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 0 0 16px; }
.test-wording-pair section { min-width: 0; padding: 12px; border-radius: 8px; }
.test-wording-before { background: var(--bg); }
.test-wording-after { background: var(--green-soft); }
.test-wording-pair h4 { margin: 0 0 8px; font-size: 13px; }
.test-wording-pair p { margin: 0; white-space: pre-wrap; font: inherit; }
.test-changes-footer { flex: 0 0 auto; padding: 16px 24px; border-top: 1px solid var(--line); }
.test-changes-footer > p { font-size: 13px; line-height: 1.45; margin: 0 0 8px; color: var(--muted); }
.test-changes-footer > [role="alert"] { margin-top: 8px; color: var(--amber); font-size: 14px; }
.test-draft-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.test-draft-actions button { font-size: 14px; min-height: 40px; }
.test-draft-actions form:last-child { margin-left: auto; }
@media (max-width: 600px) {
  .test-changes-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 24px); }
  .test-changes-header, .test-changes-body, .test-changes-footer { padding: 14px 16px; }
  .test-wording-pair { grid-template-columns: minmax(0, 1fr); }
  .test-draft-actions form:last-child { margin-left: 0; }
}
@keyframes assistant-pulse { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }
@keyframes upload-progress-indeterminate { 0% { transform: translateX(-115%); } 55% { transform: translateX(125%); } 100% { transform: translateX(325%); } }
@media (prefers-reduced-motion: reduce) {
  .assistant-thinking > span,
  .customer-typing .message-bubble > span { animation: none; opacity: .65; }
  .upload-progress span { animation: none; transition: none; }
}

.schedule-row { display: grid; min-height: 72px; grid-template-columns: minmax(220px, 1fr) minmax(200px, .8fr) 70px; align-items: center; gap: 20px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.schedule-row strong, .schedule-row small { display: block; }
.schedule-row small { margin-top: 4px; color: var(--muted); }
.schedule-state { color: var(--green); font-size: 13px; font-weight: 700; text-align: right; }
.connection-row { display: grid; min-height: 72px; grid-template-columns: 38px minmax(0, 1fr) 120px auto; align-items: center; gap: 13px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.instagram-connect-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 14px; padding: 16px; background: var(--green-soft); border: 1px solid #c8ddd1; border-radius: 9px; }
.instagram-mark { display: grid; width: 42px; height: 42px; place-items: center; color: #fff; background: var(--green); border-radius: 50%; font-size: 11px; font-weight: 800; }
.instagram-connect-copy { display: block; min-width: 0; }
.instagram-connect-copy strong, .instagram-connect-copy small { display: block; }
.instagram-connect-copy small { max-width: 640px; margin-top: 4px; color: var(--muted); line-height: 1.45; }
.instagram-connect-card form { display: flex; align-items: end; gap: 10px; }
.instagram-connect-card form label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.instagram-connect-card form select { min-height: 38px; max-width: 260px; }
.instagram-connect-card .primary-button { min-height: 40px; white-space: nowrap; }
.instagram-sync-progress { display: block; height: 4px; overflow: hidden; margin-top: 11px; background: rgb(48 111 80 / 15%); border-radius: 999px; }
.instagram-sync-progress i { display: block; width: 35%; height: 100%; background: var(--green); border-radius: inherit; animation: instagram-sync-progress 1.2s ease-in-out infinite; }
.instagram-sync-card.is-complete .instagram-sync-progress i { width: 100%; animation: none; transition: width 220ms ease; }
.instagram-sync-card.is-error { background: var(--amber-soft); border-color: #e4c98c; }
.instagram-sync-card.is-error .instagram-sync-progress { display: none; }
@keyframes instagram-sync-progress { from { transform: translateX(-110%); } to { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .instagram-sync-progress i { animation: none; } }
.browser-alert-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 14px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.browser-alert-card strong, .browser-alert-card small { display: block; }
.browser-alert-card small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.browser-alert-card button { flex: 0 0 auto; min-height: 36px; }
.connection-copy strong, .connection-copy span { display: block; }
.connection-copy span, .connection-count { margin-top: 3px; color: var(--muted); font-size: 13px; }
.connection-count small { display: block; margin-top: 3px; font-variant-numeric: tabular-nums; }
.response-mode-form { display: flex; align-items: center; gap: 7px; margin: 7px 0 0; }
.response-mode-form select { min-height: 32px; padding: 3px 26px 3px 8px; }
.response-mode-form .text-button { min-height: 32px; padding: 3px 7px; }
.connection-state { color: var(--green); font-size: 13px; font-weight: 650; }
.connection-state i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); }
.connection-state.disconnected { color: var(--muted); }
.connection-state.disconnected i { background: var(--muted); }
.connection-state.reconnect-required { color: #915d17; }
.connection-state.reconnect-required i { background: #b77a20; }
.connection-row.reconnect-required { background: color-mix(in srgb, #fff5dc 76%, var(--surface)); }
.connection-health-banner { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 0 24px; padding: 13px 14px; border: 1px solid color-mix(in srgb, #b77a20 45%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--amber-soft) 82%, var(--surface)); color: var(--text); }
.connection-health-banner > svg { width: 24px; height: 24px; fill: none; stroke: #915d17; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.connection-health-banner span { min-width: 0; }
.connection-health-banner strong, .connection-health-banner small { display: block; }
.connection-health-banner small { margin-top: 2px; color: var(--muted); line-height: 1.35; }
.connection-health-banner form { margin: 0; }
.connection-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.connection-actions form { margin: 0; }
.connection-count { text-align: right; }
.settings-section { margin-bottom: 30px; }
.settings-section > h2 { margin: 0 0 11px; font-size: 17px; }
.settings-section > .section-intro { margin: -3px 0 11px; }
.settings-section > .definition-list { padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.settings-section code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.settings-build { margin: 36px 0 0; color: var(--muted); font-size: 12px; }
.settings-build a { color: var(--green); font-weight: 700; text-underline-offset: 3px; }
.release-notes-page { width: min(780px, 100%); margin: 0 auto; }
.release-notes-header { margin-bottom: 18px; }
.release-notes-header .back-link { display: inline-flex; margin-bottom: 14px; }
.release-language-switch { display: inline-flex; overflow: hidden; flex: 0 0 auto; padding: 3px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px; }
.release-language-switch button { min-height: 34px; padding: 6px 11px; color: var(--muted); background: transparent; border: 0; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.release-language-switch button:hover { color: var(--text); }
.release-language-switch button.is-active { color: #fff; background: var(--green); }
.release-note-list { display: grid; gap: 14px; }
.release-note { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.release-note.is-latest { border-color: color-mix(in srgb, var(--green) 42%, var(--line)); box-shadow: 0 8px 24px rgba(31, 72, 52, .07); }
.release-note > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.release-note h2 { margin: 5px 0 0; font-size: 19px; line-height: 1.3; text-wrap: balance; }
.release-note > header p { flex: 0 0 auto; margin: 2px 0 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.release-note-badge { display: inline-flex; padding: 3px 7px; color: var(--green); background: var(--green-soft); border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.release-note ul { display: grid; gap: 8px; margin: 16px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.55; }
.release-note li::marker { color: var(--green); }
.helper-identity-form { display: grid; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.helper-name-field { max-width: 420px; }
.helper-name-field small, .helper-name-toggle small { color: var(--muted); font-weight: 450; line-height: 1.4; }
.helper-name-toggle { display: flex; min-height: 44px; align-items: flex-start; gap: 10px; width: fit-content; cursor: pointer; }
.helper-name-toggle input { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--green); }
.helper-name-toggle input:disabled { cursor: not-allowed; }
.helper-name-toggle span, .helper-name-toggle strong, .helper-name-toggle small { display: block; }
.helper-name-toggle strong { color: var(--text); font-size: 13px; }
.helper-name-toggle small { margin-top: 2px; }
.helper-name-preview { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 10px 8px 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.helper-name-preview > small { color: var(--muted); }
.helper-name-preview > span { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; padding: 6px 10px; color: #fff; background: var(--green); border-radius: 999px; }
.helper-name-preview svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.helper-identity-form > .primary-button { justify-self: end; }
.business-name-form { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.business-name-form label { color: var(--muted); }
.business-profile-card { overflow: hidden; margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.business-profile-card > summary { padding: 14px 16px; cursor: pointer; list-style: none; }
.business-profile-card > summary::-webkit-details-marker { display: none; }
.business-profile-card > summary:hover { background: #fafbf9; }
.business-profile-summary { display: block; min-width: 0; }
.business-profile-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.business-profile-title > span { color: var(--blue); font-size: 13px; font-weight: 650; }
.business-profile-summary small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.business-profile-preview { display: -webkit-box; overflow: hidden; margin-top: 10px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.45; white-space: pre-wrap; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.business-profile-card[open] > summary { border-bottom: 1px solid var(--line); }
.business-profile-card[open] .business-profile-preview { display: none; }
.business-profile-card > form { padding: 16px; }
.business-profile-document { min-height: 300px; }
.business-profile-actions { display: flex; min-height: 34px; justify-content: flex-end; gap: 8px; }
.team-list { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.team-row { display: grid; min-height: 58px; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 13px; border-bottom: 1px solid var(--line); }
.team-row:last-child { border-bottom: 0; }
.team-person { display: flex; min-width: 0; align-items: center; gap: 8px; }
.team-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-person span { padding: 2px 6px; color: var(--muted); background: var(--bg); border-radius: 4px; font-size: 11px; font-weight: 700; }
.team-role, .team-role-form { color: var(--muted); font-size: 13px; }
.team-role-form { display: flex; align-items: center; gap: 7px; }
.team-role-form select { min-width: 100px; }
.team-invite-form { display: grid; grid-template-columns: minmax(220px, 1fr) 140px auto; align-items: end; gap: 10px; margin-top: 12px; }
.compact-button { min-height: 34px; padding: 6px 10px; }
.text-button { padding: 6px; background: transparent; border: 0; cursor: pointer; font-weight: 650; }
.danger-text { color: #9a372f; }
.business-icon-form { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.business-icon-form small { color: var(--muted); }
.business-icon-preview { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; object-fit: cover; }
.business-icon-fallback { display: grid; place-items: center; color: #fff; background: var(--green); font-weight: 750; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.theme-switch { display: inline-grid; grid-template-columns: repeat(2, minmax(84px, 1fr)); padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.theme-switch button { min-height: 34px; padding: 6px 13px; color: var(--muted); background: transparent; border: 0; border-radius: 5px; cursor: pointer; font-weight: 650; }
.theme-switch button[aria-pressed="true"] { color: var(--text); background: var(--bg); box-shadow: 0 1px 3px rgb(0 0 0 / 14%); }
.language-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto; align-items: end; gap: 12px; margin-top: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.language-form label strong, .language-form label small { display: block; }
.language-form label strong { color: var(--text); font-size: 13px; }
.language-form label small { margin-top: 3px; color: var(--muted); font-weight: 450; }

label { display: grid; gap: 6px; color: #545f57; font-size: 12px; font-weight: 680; }
input, select, textarea { width: 100%; padding: 9px 10px; color: var(--text); background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
textarea { line-height: 1.45; resize: vertical; }
.primary-button { min-height: 38px; padding: 8px 14px; color: #fff; background: var(--green); border: 0; border-radius: 6px; cursor: pointer; font-weight: 680; }
.primary-button:hover { background: #185c40; }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.secondary-button { min-height: 38px; padding: 8px 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; font-weight: 650; }
.secondary-button:hover { background: #f4f6f3; }
.secondary-button:disabled, .text-button:disabled { opacity: .48; cursor: not-allowed; }
.task-dialog { width: min(520px, calc(100% - 32px)); padding: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 7px; box-shadow: 0 18px 60px rgb(24 32 27 / 20%); }
.task-dialog::backdrop { background: rgb(24 32 27 / 32%); }
.task-dialog form { padding: 20px; }
.task-dialog h2 { margin: 0 0 18px; font-size: 19px; }
.task-dialog textarea { min-height: 110px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.reply-test-dialog { width: min(620px, calc(100% - 32px)); }
.reply-test-dialog form { position: relative; display: grid; gap: 14px; }
.reply-test-dialog h2 { margin-bottom: 2px; }
.reply-test-dialog textarea { min-height: 76px; }
.reply-test-remove-dialog p { margin: 0; color: var(--muted); line-height: 1.5; }
.danger-button { background: #9a372f; }
.danger-button:hover { background: #7f2d27; }

.image-viewer { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; color: #fff; background: transparent; border: 0; }
.image-viewer::backdrop { background: rgb(7 10 8 / 92%); backdrop-filter: blur(3px); }
.image-viewer-shell { display: grid; width: 100%; height: 100%; grid-template: 60px minmax(0, 1fr) / 68px minmax(0, 1fr) 68px; }
.image-viewer-header { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; padding: 8px 16px 4px; }
.image-viewer-caption { display: grid; min-width: 0; gap: 2px; }
.image-viewer-caption strong { overflow: hidden; max-width: min(720px, calc(100vw - 100px)); color: #fff; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.image-viewer-caption span { color: rgb(255 255 255 / 68%); font-size: 12px; font-weight: 650; }
.image-viewer-close, .image-viewer-nav { width: 44px; height: 44px; color: #fff; background: rgb(255 255 255 / 10%); border: 0; border-radius: 50%; cursor: pointer; }
.image-viewer-nav[hidden] { display: none; }
.image-viewer-close:hover, .image-viewer-nav:hover { background: rgb(255 255 255 / 18%); }
.image-viewer-close:focus-visible, .image-viewer-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.image-viewer-nav { position: relative; z-index: 1; align-self: center; justify-self: center; touch-action: manipulation; }
.image-viewer-previous { grid-area: 2 / 1; }
.image-viewer-next { grid-area: 2 / 3; }
.image-viewer-stage { display: grid; grid-area: 2 / 2; min-width: 0; min-height: 0; overflow: hidden; margin: 0; padding: 8px 0 24px; place-items: center; }
.image-viewer-stage img { display: block; width: auto; max-width: calc(100vw - 136px); height: auto; max-height: calc(100dvh - 92px); object-fit: contain; }
.result-image { cursor: zoom-in; }

.login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.login-shell { width: min(360px, 100%); }
.login-shell .brand-mark { margin-bottom: 22px; }
.login-shell h1 { margin: 0 0 8px; font-size: 26px; }
.login-shell > p { margin: 0 0 24px; color: var(--muted); }
.google-login { display: flex; min-height: 44px; width: 100%; align-items: center; justify-content: center; gap: 10px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; font-weight: 680; text-decoration: none; }
.google-login:hover { background: #fafbf9; border-color: #9ca69f; }
.google-login span { color: var(--blue); font-weight: 750; }
.form-error { padding: 10px 12px; color: #8f3028 !important; background: #faeae8; border-radius: 5px; }

:root[data-theme="dark"] .sidebar { background: #12171c; }
:root[data-theme="dark"] .sidebar nav a,
:root[data-theme="dark"] .account-menu button { color: #aeb7bd; }
:root[data-theme="dark"] .sidebar nav a:hover,
:root[data-theme="dark"] .task-row:hover,
:root[data-theme="dark"] .place-row.is-link:hover,
:root[data-theme="dark"] .conversation-row:hover,
:root[data-theme="dark"] .compact-list a:hover,
:root[data-theme="dark"] .editor-section summary:hover,
:root[data-theme="dark"] .channel-thread-list a:hover,
:root[data-theme="dark"] .secondary-button:hover,
:root[data-theme="dark"] .google-login:hover { background: #1c2329; }
:root[data-theme="dark"] .visibility-section > summary:hover .visibility-section-chevron,
:root[data-theme="dark"] .visibility-result-row > summary:hover,
:root[data-theme="dark"] .visibility-result-row.is-search:hover { color: #9dd6b8; }
:root[data-theme="dark"] .sidebar nav a[aria-current="page"] { background: #20272e; box-shadow: none; }
:root[data-theme="dark"] .app-sidebar-toggle:hover { background: #1c2329; }
:root[data-theme="dark"] .assistant-thread,
:root[data-theme="dark"] .run-helper-thread { background: #11161a; }
:root[data-theme="dark"] .message-bubble { background: #252c32; }
:root[data-theme="dark"] .assistant-thread .message.operator .message-bubble,
:root[data-theme="dark"] .message.outbound .message-bubble { background: #17372b; }
:root[data-theme="dark"] .question-actions { border-color: #5b4626; }
:root[data-theme="dark"] .reply-review { border-color: #5b4626; }
:root[data-theme="dark"] .reply-review.state-approved { border-color: #315d46; }
:root[data-theme="dark"] .proposed-reply,
:root[data-theme="dark"] .option-button,
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { background: #11161a; }
:root[data-theme="dark"] .channel-icon { color: #8eb5e4; background: #192636; border-color: #2a4057; }
:root[data-theme="dark"] .channel-icon.provider-telegram { color: #77badd; background: #172a34; border-color: #294553; }
:root[data-theme="dark"] .channel-icon.provider-test { color: var(--muted); background: transparent; border-color: var(--line-strong); }
:root[data-theme="dark"] .notice.warning,
:root[data-theme="dark"] .missing-proposal { color: #efc580; }
:root[data-theme="dark"] .notice.success { color: #9dd6b8; }
:root[data-theme="dark"] .customer-attention-card { border-color: #5b4626; box-shadow: none; }
:root[data-theme="dark"] .test-turn-status.state-working { border-color: #315d46; }
:root[data-theme="dark"] .test-turn-status.state-failed { color: #ffaaa3; background: #3a1f20; border-color: #724144; }
:root[data-theme="dark"] .form-error { color: #ffaaa3 !important; background: #3a1f20; }

.work-outline { margin: 24px 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.work-outline > h2, .work-outline .run-section-heading { margin: 0 0 16px; }
.work-flow { max-width: 680px; margin: 0; padding: 0; list-style: none; }
.work-flow-phase + .work-flow-phase { margin-top: 18px; }
.work-flow-phase h3 { margin: 0 0 9px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.work-flow-step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; min-height: 52px; color: var(--muted); }
.work-flow-step:not(:last-child)::after { position: absolute; top: 28px; bottom: 0; left: 13px; width: 1px; content: ""; background: var(--line-strong); }
.work-flow-marker { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; color: var(--muted); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 50%; font-size: 12px; font-weight: 700; }
.work-flow-step small, .work-flow-step strong { display: block; }
.work-flow-step small { margin: 0 0 2px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.work-flow-step strong { color: inherit; font-weight: 620; }
.work-flow-step p { margin: 3px 0 12px; color: var(--muted); font-size: 13px; }
.work-flow-step.in_progress { color: var(--text); }
.work-flow-step.in_progress .work-flow-marker { color: #fff; background: var(--green); border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.work-flow-step.completed .work-flow-marker { color: #fff; background: var(--green); border-color: var(--green); }
.work-flow-step.completed strong { color: var(--muted); }
.work-flow-step.blocked { color: var(--amber); }
.work-flow-step.blocked .work-flow-marker { color: var(--amber); border-color: var(--amber); }
.work-flow-step.skipped { opacity: .6; }
.work-flow-template .work-flow-step { color: var(--text); }
.work-flow-sections > .outline-section { grid-template-columns: 38px minmax(0, 1fr); }
.work-flow-sections > .outline-section > .work-flow-marker, .outline-substeps .work-flow-marker { width: 38px; font-size: 10px; }
.outline-substeps { margin-top: 12px; }
.outline-delegation { margin: 3px 0 8px; color: var(--muted); font-size: 12px; }

@media (max-width: 1150px) {
  .conversation-screen,
  .conversation-screen[data-index-collapsed="true"] { grid-template-columns: minmax(0, 1fr); }
  .conversation-index { position: absolute; z-index: 4; top: 0; bottom: 0; left: 0; display: none; width: min(320px, calc(100% - 48px)); visibility: visible !important; border-right: 1px solid var(--line) !important; box-shadow: 12px 0 32px rgb(28 36 31 / 16%); }
  .conversation-screen.index-overlay-open .conversation-index { display: flex; }
  .conversation-list-toggle { display: inline-grid; }
}

@media (max-width: 800px), (max-width: 1150px) and (max-height: 500px) and (pointer: coarse) {
  :root { --app-viewport-height: 100dvh; --app-viewport-top: 0px; }
  .app-shell { display: block; padding-right: env(safe-area-inset-right); padding-left: env(safe-area-inset-left); }
  .sidebar { position: static; width: auto; height: auto; flex: 0 0 auto; padding: max(6px, env(safe-area-inset-top)) 12px 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-top { min-height: 44px; margin: 0; }
  .app-sidebar-toggle { display: none; }
  :root[data-app-sidebar-collapsed="true"] .app-shell { display: block; }
  :root[data-app-sidebar-collapsed="true"] .sidebar { width: auto; padding: max(6px, env(safe-area-inset-top)) 12px 6px; }
  :root[data-app-sidebar-collapsed="true"] .sidebar-top { display: flex; justify-items: initial; margin: 0; }
  :root[data-app-sidebar-collapsed="true"] .brand { flex: 1; }
  :root[data-app-sidebar-collapsed="true"] .brand-copy,
  :root[data-app-sidebar-collapsed="true"] .nav-label,
  :root[data-app-sidebar-collapsed="true"] .account-menu > span,
  :root[data-app-sidebar-collapsed="true"] .account-label { display: initial; }
  :root[data-app-sidebar-collapsed="true"] .nav-test-label { display: flex; }
  :root[data-app-sidebar-collapsed="true"] .workspace-switcher { display: block; }
  .workspace-switcher { width: 100%; margin: 18px 0; }
  .workspace-switcher select { height: 48px; }
  :root[data-app-sidebar-collapsed="true"] .sidebar nav a { justify-content: initial; padding: 12px; }
  :root[data-app-sidebar-collapsed="true"] .account-menu { position: static; }
  :root[data-app-sidebar-collapsed="true"] .account-menu button { width: auto; justify-content: initial; padding: 4px 0; }
  .sidebar nav { display: grid; gap: 6px; margin-top: 16px; }
  .sidebar nav a { min-height: 48px; padding: 12px; }
  .account-menu { position: static; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 10px 0 max(16px, env(safe-area-inset-bottom)); }
  .account-menu span { margin: 0; }
  .mobile-navigation-toggle { display: inline-grid; width: 44px; height: 44px; flex: 0 0 auto; color: var(--text); background: transparent; border: 0; border-radius: 8px; }
  .mobile-navigation-toggle .menu-close { display: none; }
  :root:not([data-mobile-nav-open]) .sidebar > :not(.sidebar-top) { display: none; }
  :root[data-mobile-nav-open] { overflow: hidden; }
  :root[data-mobile-nav-open] .sidebar { position: fixed; z-index: 30; inset: var(--app-viewport-top) 0 auto; height: var(--app-viewport-height, 100vh); overflow-y: auto; padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(12px, env(safe-area-inset-left)); }
  :root[data-mobile-nav-open] .mobile-navigation-toggle .menu-lines { display: none; }
  :root[data-mobile-nav-open] .mobile-navigation-toggle .menu-close { display: block; }
  /* A 16px field avoids automatic input zoom on iOS; pinch zoom stays enabled. */
  .app-shell :is(input, select, textarea) { font-size: 16px; }
  .app-shell :is(.icon-control, .conversation-section-link, .assistant-launcher, .run-helper-launcher) { min-width: 44px; min-height: 44px; }
  .app-shell :is(.primary-button, .secondary-button, .text-button) { min-height: 44px; }
  .main, .customer-attention-card, .runbook-proposal { overflow-wrap: anywhere; }
  .main { grid-column: auto; padding: 24px 16px 56px; }
  .run-page, .conversation-page { overflow: hidden; }
  :is(.run-page, .conversation-page) .app-shell,
  :root[data-app-sidebar-collapsed="true"] :is(.run-page, .conversation-page) .app-shell { position: fixed; inset: var(--app-viewport-top) 0 auto; display: flex; height: var(--app-viewport-height, 100vh); min-height: 0; flex-direction: column; }
  :is(.run-page, .conversation-page) .main { display: flex; height: auto; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; padding: 0; }
  .visibility-report-workspace, .run-chat-workspace { min-height: 0; flex: 1; }
  .run-chat-header { padding-right: 14px; padding-left: 14px; }
  .visibility-report-main { padding: 30px 18px 44px; }
  .browser-intervention > footer { align-items: stretch; flex-direction: column; }
  .browser-intervention > footer > div { justify-content: flex-end; }
  .visibility-document-header h1 { font-size: 30px; }
  .visibility-hero { grid-template-columns: 1fr; }
  .visibility-secondary-metric { border-top: 1px solid var(--line); border-left: 0; }
  .visibility-goal { grid-template-columns: 1fr; }
  .visibility-goal-score { border-top: 1px solid var(--line); border-left: 0; }
  .visibility-goal-factors { grid-template-columns: 1fr; }
  .visibility-result-row.is-search { grid-template-columns: minmax(0, 1fr) auto max-content; }
  .visibility-map-frame.has-coordinates, .visibility-map-canvas { min-height: 360px; height: 360px; }
  .visibility-location-check { grid-template-columns: minmax(0, 1fr) auto; }
  .visibility-location-evidence { grid-column: 1 / -1; justify-content: flex-start; }
  .visibility-location-evidence details[open] ol { right: auto; left: 0; }
  .visibility-rank-grid { width: min(280px, calc(100% - 36px)); }
  .visibility-fact-list > div { grid-template-columns: minmax(0, 1fr) auto; }
  .visibility-fact-list > div > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .visibility-fact-list > div > i { grid-column: 2; grid-row: 1; }
  .visibility-improvement-steps { grid-template-columns: 1fr; }
  .visibility-improvement-steps > div { border-right: 0; }
  .visibility-improvement-steps > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .run-helper-panel, .assistant-conversation { inset: var(--app-viewport-top) 0 auto; width: 100%; height: var(--app-viewport-height, 100vh); max-height: none; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); border: 0; border-radius: 0; }
  [data-helper-collapsed="false"] .run-helper-launcher,
  .conversation-screen[data-assistant-collapsed="false"] .assistant-launcher,
  .conversation-screen.index-overlay-open .assistant-launcher { visibility: hidden; }
  .assistant-conversation > .message-composer, .run-helper-composer { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .run-chat-thread.chat-thread { padding-right: 18px; padding-left: 18px; }
  .run-chat-composer { padding-right: 16px; padding-left: 16px; }
  .conversation-screen,
  .conversation-screen[data-index-collapsed="true"] { display: flex; height: auto; min-height: 0; flex: 1; flex-direction: column; }
  .conversation-index { width: 100%; box-shadow: none; }
  .customer-conversation { min-height: 0; flex: 1; border-right: 0; }
  .mobile-list-icon { display: block !important; }
  .desktop-list-icon { display: none !important; }
  .conversation-header, .assistant-header, .customer-composer, .message-composer, .reply-test-composer-region, .test-approval-bar { flex-shrink: 0; }
  .customer-conversation > .chat-thread { padding: 16px 12px; overscroll-behavior-y: contain; }
  .conversation-header { gap: 8px; padding-left: 8px; }
  .conversation-header .channel-icon { display: none; }
  .conversation-brief > summary { padding-right: 12px; padding-left: 12px; }
  .conversation-brief-body { padding: 12px; }
  .customer-composer { gap: 7px; padding: 8px 10px max(16px, env(safe-area-inset-bottom)); }
  .customer-composer textarea, .assistant-conversation > .message-composer textarea { max-height: min(132px, 25dvh); }
  .customer-composer textarea::placeholder { font-size: 14px; white-space: nowrap; }
  .customer-attention-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .reply-review-reject { position: static; margin-top: 8px; }
  .reply-review-actions .primary-button, .reply-review-reject .text-button { width: 100%; }
  .test-approval-bar { gap: 4px; padding-right: 10px; padding-left: 10px; }
  .test-approval-actions { min-width: 0; gap: 6px; }
  .test-approval-actions button { padding-right: 10px; padding-left: 10px; font-size: 13px; }
  .conversation-screen:has(.assistant-launcher) .conversation-header { padding-right: 64px; }
  .assistant-launcher { right: 12px; width: 40px; justify-content: center; padding: 0; }
  .assistant-launcher span { display: none; }
  .task-row { grid-template-columns: minmax(0, 1fr) auto; }
  .task-meta { display: none; }
  .place-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .monitoring-dialog footer { align-items: stretch; flex-direction: column; }
  .monitoring-section-heading { align-items: stretch; flex-direction: column; }
  .monitoring-section-heading .secondary-button { width: 100%; }
  .place-picker-content { grid-template-columns: 1fr; }
  .place-picker-map { height: 240px; }
  .place-picker-shell > footer { align-items: stretch; flex-direction: column; }
  .place-status { justify-items: start; text-align: left; }
  .connection-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .connection-actions { display: grid; justify-items: end; gap: 2px; }
  .team-invite-form { grid-template-columns: 1fr 120px; }
  .team-invite-form .primary-button { grid-column: 1 / -1; }
  .business-name-form { grid-template-columns: 1fr auto; }
  .business-name-form label { grid-column: 1 / -1; }
  .language-form { grid-template-columns: minmax(0, 1fr) auto; }
  .language-form label { grid-column: 1 / -1; }
  .connection-count { display: none; }
  .schedule-row { grid-template-columns: minmax(0, 1fr) auto; }
  .schedule-row > span:nth-child(2) { grid-column: 1; color: var(--muted); font-size: 13px; }
  .schedule-state { grid-column: 2; grid-row: 1; }
  .channel-thread-list a { grid-template-columns: 120px minmax(0, 1fr); }
  .channel-thread-list a > small:last-child { display: none; }
}

@media (max-width: 520px) {
  .connection-health-banner { grid-template-columns: 24px minmax(0, 1fr); margin-bottom: 18px; }
  .connection-health-banner form, .connection-health-banner > small { grid-column: 1 / -1; }
  .connection-health-banner .primary-button { width: 100%; }
  .instagram-connect-card { grid-template-columns: 42px minmax(0, 1fr); }
  .instagram-connect-card form, .instagram-connect-card > button { grid-column: 1 / -1; width: 100%; }
  .instagram-connect-card form { align-items: stretch; flex-direction: column; }
  .instagram-connect-card form select { width: 100%; max-width: none; }
  .release-note { padding: 17px 18px; }
  .release-notes-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .release-note > header { display: block; }
  .release-note > header p { margin-top: 9px; }
  .browser-alert-card { align-items: stretch; flex-direction: column; }
  .browser-alert-card button { width: 100%; }
  .brand-mark { display: none; }
  .page-header h1 { font-size: 24px; }
  .tabs { overflow-x: auto; gap: 16px; }
  .conversation-row { grid-template-columns: 34px minmax(0, 1fr); }
  .avatar { width: 34px; height: 34px; }
  .row-meta { display: none; }
  .message-bubble { max-width: 90%; }
  .message-reply-stack { max-width: 90%; }
  .message.has-media .message-bubble { width: min(360px, 90%); }
  .message.has-media-carousel .message-bubble { width: min(420px, 90%); }
  .run-chat-message .message-bubble { max-width: 90%; }
  .run-helper-launcher { width: 40px; justify-content: center; padding: 0; }
  .run-helper-launcher span { display: none; }
  .visibility-document-header { align-items: flex-start; padding-top: 8px; padding-bottom: 28px; }
  .visibility-document-header h1 { font-size: 26px; }
  .visibility-document-header p { font-size: 14px; }
  .visibility-primary-metric, .visibility-secondary-metric { min-height: 0; padding: 20px; }
  .visibility-section > summary { padding: 15px 16px; }
  .visibility-section-with-action > summary { padding-right: 142px; }
  .visibility-section-action { top: 17px; right: 44px; min-height: 34px; padding: 6px 9px; }
  .visibility-section-body { padding: 16px; }
  .visibility-result-row > summary { padding: 13px 16px; }
  .visibility-result-row.is-search { padding: 9px 0; }
  .visibility-quota-notice, .visibility-query-dialog-status { align-items: flex-start; flex-direction: column; gap: 5px; }
  .visibility-query-dialog-shell > header, .visibility-query-dialog-body { padding: 18px; }
  .visibility-query-dialog-shell > footer { align-items: stretch; flex-direction: column; padding: 14px 18px; }
  .visibility-answer { padding: 16px; }
  .visibility-answer header { align-items: flex-start; flex-direction: column; gap: 5px; }
  .visibility-grid-copy dl { grid-template-columns: 1fr; }
  .visibility-map-frame.has-coordinates, .visibility-map-canvas { min-height: 310px; height: 310px; }
  .visibility-finding-content { align-items: flex-start; flex-direction: column; }
  .visibility-finding-list.is-chatgpt article { flex-direction: column; gap: 8px; }
  .visibility-finding-actions { width: 100%; flex-wrap: wrap; }
  .visibility-competitor-list article { grid-template-columns: minmax(0, 1fr) auto; }
  .run-report-card, .run-owner-question, .run-connected-conversations { margin-left: 0; }
  .run-report-card > header { grid-template-columns: 28px minmax(0, 1fr); }
  .run-report-card header time { display: none; }
  .team-row { grid-template-columns: 1fr auto; }
  .team-role-form { grid-column: 1 / -1; }
  .team-invite-form { grid-template-columns: 1fr; }
  .answer-row .primary-button { width: 100%; }
  .image-viewer-shell { grid-template: 56px minmax(0, 1fr) / 48px minmax(0, 1fr) 48px; }
  .image-viewer-header { padding-right: 8px; padding-left: 12px; }
  .image-viewer-close, .image-viewer-nav { width: 40px; height: 40px; }
  .image-viewer-stage { padding-bottom: 12px; }
  .image-viewer-stage img { max-width: calc(100vw - 96px); max-height: calc(100dvh - 76px); }
}

@media (max-width: 400px) {
  .settings-tabs { gap: 10px; }
  .settings-tabs a { font-size: 13px; }
}

/* Public policy documents. Rendered without the app shell so platform
   reviewers and data subjects can read them while signed out. */
.legal-page {
  background: var(--surface, #fff);
}

.legal-shell {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border, #e4e4e7);
}

.legal-nav .legal-brand {
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

.legal-nav span {
  display: flex;
  gap: 1rem;
}

.legal-body {
  line-height: 1.65;
}

.legal-body h1 {
  margin-top: 2rem;
}

.legal-body h2 {
  margin-top: 2.5rem;
}

.legal-body h3 {
  margin-top: 1.75rem;
  font-size: 1rem;
}

.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  display: block;
  overflow-x: auto;
}

.legal-body th,
.legal-body td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--border, #e4e4e7);
}

.legal-body dl div,
.legal-body dt {
  margin-top: 0.75rem;
}

.legal-body dt {
  font-weight: 600;
}

.legal-body dd {
  margin: 0;
}

.legal-dates,
.legal-contact {
  color: var(--muted, #71717a);
  font-size: 0.9rem;
}

.legal-warning {
  padding: 0.75rem 1rem;
  border: 1px solid #d6a94d;
  background: #fff8e5;
  color: #5f4618;
}
/* Test definitions stay behind an editor; the conversation remains the main view. */
.test-control-actions { display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin-right:auto; min-width:0; font-size:.875rem; }
.test-control-actions form { display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin:0; }
.test-control-actions .secondary-button, .test-control-actions .text-button { min-height:36px; padding:6px 8px; font-size:inherit; }
.test-control-actions [data-scenario-status] { flex-basis:100%; color:var(--muted); }
.test-scenario-notice { flex-basis:100%; margin:0; padding:4px 0; font-size:.875rem; color:var(--muted); }
.test-scenario-editor { width:min(760px, calc(100vw - 24px)); max-height:calc(100dvh - 32px); padding:0; overflow:hidden; }
.test-scenario-editor form { display:flex; flex-direction:column; max-height:calc(100dvh - 34px); padding:0; }
.test-scenario-editor header, .scenario-step-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.test-scenario-editor header { flex-shrink:0; padding:12px 20px; border-bottom:1px solid var(--line); }
.test-scenario-editor h2, .test-scenario-editor p { margin:0; }
.scenario-editor-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; display:grid; gap:20px; padding:20px; background:var(--bg); }
.scenario-editor-body > p { font-size:14px; line-height:1.5; color:var(--muted); }
.scenario-editor-body > label { display:grid; gap:6px; font-size:14px; }
.test-scenario-editor [data-scenario-steps] { display:grid; gap:20px; }
.test-scenario-editor fieldset { min-width:0; border:1px solid var(--line-strong); border-radius:10px; padding:0; margin:0; background:var(--surface); overflow:hidden; }
.test-scenario-editor fieldset:focus-within { border-color:var(--blue); }
.test-scenario-editor textarea, .test-scenario-editor input[name=title] { width:100%; box-sizing:border-box; font:inherit; font-size:16px; padding:10px 12px; color:var(--text); background:var(--surface); border:1px solid var(--line-strong); border-radius:8px; }
.test-scenario-editor textarea { display:block; resize:vertical; min-height:56px; padding:12px 14px; line-height:1.5; border:0; border-radius:0; }
.test-scenario-editor textarea[data-auto-sized] { resize:none; overflow-y:hidden; }
.test-scenario-editor textarea:focus-visible { outline:2px solid var(--blue); outline-offset:-2px; }
.scenario-step-heading { padding:6px 10px 6px 14px; font-size:14px; background:var(--green-soft); border-bottom:1px solid var(--line); }
.scenario-step-heading > span { display:flex; }
.test-scenario-editor .icon-control { width:36px; height:36px; min-width:36px; font-size:20px; border:0; border-radius:8px; color:var(--muted); background:transparent; cursor:pointer; }
.test-scenario-editor .icon-control:hover { background:var(--bg); }
.test-scenario-editor .icon-control:disabled { opacity:.3; cursor:default; }
.scenario-photos { display:flex; gap:10px; flex-wrap:wrap; }
.test-scenario-editor .scenario-photos:not(:empty) { padding:0 14px 12px; }
.scenario-photos img, .test-next-message img { width:72px; height:72px; object-fit:cover; border-radius:8px; }
.scenario-photo { display:grid; gap:4px; padding-top:8px; font-size:.8rem; }
.scenario-photo span { display:flex; align-items:center; gap:4px; }
.scenario-photo input { width:auto; }
.scenario-photo-picker { display:inline-flex; align-items:center; min-height:36px; padding:6px 8px; border-radius:6px; margin:0 6px 6px; font-size:14px; color:var(--muted); cursor:pointer; }
.scenario-photo-picker:hover { color:var(--text); background:var(--bg); }
.scenario-photo-picker:focus-within { outline:2px solid var(--blue); }
.test-scenario-editor [data-step-add] { justify-self:start; min-height:40px; }
.test-scenario-editor footer { flex-shrink:0; background:var(--surface); border-top:1px solid var(--line); padding:12px 20px; }
.test-scenario-editor footer .dialog-actions { margin-top:0; }
.test-scenario-editor footer progress { width:100%; height:5px; accent-color:#366d51; }
.test-input-edit { align-self:center; opacity:.6; }
.test-input-edit:hover, .test-input-edit:focus-visible { opacity:1; }
.test-next-message { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:8px 24px 0; color:var(--muted, #6b746e); }
.test-next-message img { width:44px; height:44px; }
@media (max-width:700px) {
  .test-control-actions .secondary-button, .test-control-actions .text-button, .test-control-actions .icon-control { min-height:44px; }
  .test-scenario-editor header, .test-scenario-editor footer { padding:10px 12px; }
  .scenario-editor-body { padding:16px 12px; }
  .test-scenario-editor .icon-control { width:40px; height:40px; min-width:40px; }
}
