:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: #1d1d21; background: #fff; font-synthesis: none; font-size: 14px;
  --blue: #0866f5; --blue-hover: #0055d5; --green: var(--blue);
  --muted: #6c707a; --border: #e0e2e8; --surface: #f7f8fa; --selected: #eaf2ff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { border: 1px solid transparent; border-radius: 9px; padding: 10px 17px; background: var(--blue); color: #fff; font-weight: 600; cursor: pointer; line-height: 1.4; transition: background .15s, box-shadow .15s; }
button:hover { background: var(--blue-hover); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.secondary { background: #fff; color: #424650; border-color: #d9dce3; box-shadow: 0 1px 2px #1d253008; }
button.secondary:hover { background: #f3f5f8; }
button.text-button { background: transparent; color: var(--blue); padding: 4px 0; border-radius: 4px; box-shadow: none; }
button.text-button:hover { color: var(--blue-hover); text-decoration: underline; }
button.danger { color: #a33631; background: #fff1ef; }
button.danger:hover { background: #ffe5e1; }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #7eb2ff; outline-offset: 3px; }
input, select, textarea { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid #cfd3dc; background: #fff; border-radius: 8px; color: #26282f; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #8c909b; opacity: 1; }
input[readonly] { background: #f9fafb; color: #5e6470; }
input:disabled, select:disabled, textarea:disabled { background: #f4f5f7; color: #777d88; }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--blue); vertical-align: middle; cursor: pointer; }
input[type=file] { padding: 8px; }
input[type=file]::file-selector-button { border: 0; border-radius: 4px; background: #edf1f7; padding: 4px 8px; margin-right: 10px; color: #474e5a; }
textarea { resize: vertical; min-height: 110px; }
label { display: block; font-size: 13px; font-weight: 600; line-height: 1.55; }
label input, label select, label textarea { margin-top: 7px; font-weight: 400; }
a { color: var(--blue); text-underline-offset: 3px; }
svg { display: block; flex-shrink: 0; }
.sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; width: 228px; background: #f4f5f8; border-right: 1px solid var(--border); padding: 33px 15px 22px; display: flex; flex-direction: column; }
.brand { display: flex; gap: 11px; align-items: center; color: #15161a; text-decoration: none; font-size: 23px; font-weight: 700; letter-spacing: -.65px; padding: 0 9px; }
.mark { background: var(--blue); border-radius: 11px; color: #fff; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 750; letter-spacing: -1.2px; flex: 0 0 44px; box-shadow: 0 2px 4px #0866f51f; }
.brand-sub { display: block; font-size: 9px; letter-spacing: 1.2px; margin-top: 2px; color: #7b7f89; font-weight: 500; }
.sidebar nav { display: grid; gap: 5px; margin-top: 43px; }
.sidebar nav a { display: flex; align-items: center; gap: 13px; color: #4c515c; text-decoration: none; font-size: 14px; font-weight: 500; padding: 12px 14px; border-radius: 8px; transition: background .15s; }
.sidebar nav a:hover { background: #e9ebf0; color: #1d2530; }
.sidebar nav a[aria-current=page] { background: #dceaff; color: #095fd7; font-weight: 600; }
.nav-icon { width: 21px; height: 21px; display: inline-flex; flex: 0 0 21px; align-items: center; justify-content: center; }
.nav-icon svg { width: 21px; height: 21px; }
.sidebar-bottom, .sidebar-note { margin-top: auto; padding: 26px 13px 0; color: #737985; font-size: 11px; }
.sidebar-bottom p, .sidebar-note p { font-size: 11px; line-height: 1.7; max-width: 170px; margin: 9px 0 0; }
.sidebar-bottom small, .sidebar-note small { display: block; margin-top: 17px; color: #9095a0; font-size: 10px; }
.dot { display: inline-block; width: 6px; height: 6px; background: #44916b; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
body > main { margin-left: 228px; min-width: 0; min-height: 100vh; }
.workspace-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 72px; padding: 0 34px; border-bottom: 1px solid #e8eaf0; }
.workspace-label { color: #626873; font-size: 12px; font-weight: 500; }
.workspace-label strong { color: #363b45; font-weight: 600; }
.workspace-actions { display: flex; gap: 12px; align-items: center; }
.workspace-actions button { padding: 7px 11px; font-size: 12px; }
#workspace-mode { color: #6c7380; font-size: 10px; font-weight: 600; letter-spacing: .3px; background: #f2f4f7; padding: 5px 9px; border-radius: 5px; }
section[data-view] { padding: 34px; min-width: 0; margin: 0 auto; max-width: 1600px; }
section { scroll-margin-top: 24px; }
.view-heading { margin: 0 0 29px; }
.view-heading p { margin: 7px 0 0; color: var(--muted); font-size: 15px; }
h1 { margin: 0; font-size: 34px; line-height: 1.18; font-weight: 720; letter-spacing: -1.3px; }
h1 span { font-weight: 450; color: #737985; }
h2 { font-size: 23px; letter-spacing: -.6px; line-height: 1.3; margin: 0 0 12px; font-weight: 680; }
h3 { margin: 0 0 9px; font-size: 16px; letter-spacing: -.2px; font-weight: 650; }
p { overflow-wrap: break-word; }
.muted { color: var(--muted); line-height: 1.65; }
.small { font-size: 12px; }
.eyebrow { font-size: 10px; letter-spacing: 1.2px; font-weight: 650; color: #7a808c; margin: 0 0 10px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin: 27px 0 18px; }
.section-head > .muted { font-size: 12px; }
.section-head h2 { margin-bottom: 0; }
.title-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 35px; align-items: center; }
.run-card { background: #f8f9fc; border: 1px solid var(--border); border-radius: 13px; padding: 24px; }
.run-card h2 { margin-top: 14px; }
.run-card p { font-size: 13px; line-height: 1.65; color: var(--muted); }
.pill { font-size: 10px; font-weight: 650; letter-spacing: .3px; background: #edf3fd; color: #3f6497; padding: 4px 8px; border-radius: 5px; display: inline-block; overflow-wrap: anywhere; }
.button-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 28px 0 20px; }
.metric { border: 1px solid var(--border); border-radius: 11px; padding: 22px; background: #fff; }
.metric strong { display: block; font-size: 32px; line-height: 1.15; font-weight: 650; letter-spacing: -1px; margin-bottom: 10px; }
.metric span { font-size: 12px; color: var(--muted); }
.note { padding: 12px 15px; background: #f4f7fb; border-radius: 8px; font-size: 12px; color: #647184; line-height: 1.65; }
.panel { padding: 23px; border: 1px solid var(--border); background: #fff; border-radius: 11px; margin-top: 16px; min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 17px; }
.card { padding: 24px; border: 1px solid var(--border); background: #fff; border-radius: 11px; min-width: 0; }
.card p { font-size: 12px; line-height: 1.7; color: var(--muted); }
.card .button-row button { font-size: 12px; padding: 8px 11px; }
.card .pill { margin-bottom: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 17px; align-items: end; }
.form-grid > * { min-width: 0; }
.form-grid:has(> label:only-child) { grid-template-columns: 1fr; }
.form-grid button { align-self: end; }
#campaign-form .form-grid { grid-template-columns: 1fr 1fr; }
summary { cursor: pointer; font-weight: 600; font-size: 14px; }
summary::marker { color: #8a919e; }
details[open] > summary { margin-bottom: 22px; }
.sequence-start { display: flex; align-items: center; gap: 14px; padding: 22px 0; }
.step { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: #eaf2ff; color: var(--blue); font-size: 13px; font-weight: 650; }
.sequence-start p { margin: 4px 0; }
.step-editor { border-top: 1px solid var(--border); padding: 20px 0; }
.step-editor .row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.step-editor input { width: 85px; }
.step-editor button { margin-left: auto; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; min-width: 0; }
.search-main { min-width: 0; padding-right: 30px; }
.context-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 23px; }
.context-grid > * { min-width: 0; }
.status-banner { display: flex; gap: 14px; align-items: center; padding: 17px 19px; margin: 0 0 25px; border-radius: 10px; background: #f4f6fa; }
.status-banner strong { display: block; font-size: 15px; font-weight: 650; }
.status-banner p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.status-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--blue); background: #e4edff; font-size: 18px; font-weight: 700; }
.status-icon svg { width: 20px; height: 20px; }
.search-link-row { display: flex; align-items: center; gap: 9px; margin-top: 7px; }
.search-link-row input { flex: 1; min-width: 0; margin: 0; height: 44px; }
.search-link-row button { flex: 0 0 auto; min-height: 44px; }
.search-options { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 13px 0 15px; }
.search-options label { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.search-options select { width: 112px; margin: 0; padding: 6px 9px; font-size: 12px; }
.search-options p { font-size: 11px; margin: 0; }
.search-buttons { margin: 14px 0; }
#search-status { margin: 15px 0 0; }
#search-results { margin-top: 24px; min-width: 0; }
.review-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; }
.review-toolbar > label { flex: 1; min-width: 0; max-width: 340px; }
.review-toolbar button { font-size: 11px; padding: 7px 10px; }
.review-toolbar .button-row { flex: 0 0 auto; }
#batch-summary { font-size: 12px; color: var(--muted); }
#batch-summary p { margin: 7px 0; }
#batch-summary ul { padding-left: 18px; }
.table-wrap { overflow-x: auto; max-width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 10px; margin-top: 16px; }
.tablebar, .table-bar { padding: 12px 16px; background: #f8f9fc; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #525965; font-size: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th { text-align: left; background: #f8f9fb; color: #737985; font-size: 11px; font-weight: 600; padding: 13px 15px; white-space: nowrap; }
td { border-top: 1px solid #e8ebf0; padding: 15px; vertical-align: middle; }
td small { display: block; color: var(--muted); margin-top: 5px; font-size: 11px; line-height: 1.55; }
td button { font-size: 11px; padding: 6px 9px; margin: 3px; }
td a { text-decoration: none; font-weight: 600; }
td a:hover { text-decoration: underline; }
.search-table td:first-child, .search-table th:first-child { width: 43px; padding-right: 4px; }
.search-table td:nth-child(2) { min-width: 185px; }
.search-table td:nth-child(3), .search-table td:nth-child(4) { min-width: 125px; }
.search-table td:last-child { min-width: 102px; font-size: 10px; color: var(--muted); }
.search-table input:not([type=checkbox]) { min-width: 100px; font-size: 12px; padding: 7px 9px; background: #ffffffb3; border-color: #e0e3e9; }
.search-table input:not([type=checkbox]):hover { border-color: #bdc9da; }
.search-table tr:has(input[type=checkbox]:checked), .search-table tr.selected, .search-table tr.is-selected { background: var(--selected); }
.search-table tr[data-preview=true], .search-table tr.preview-active { box-shadow: inset 3px 0 var(--blue); }
.prospect-name { display: inline-flex; align-items: center; gap: 9px; }
.prospect-avatar { display: inline-flex; justify-content: center; align-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #e9eff9; color: #5577a7; font-size: 10px; font-weight: 650; }
.selection-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0 4px; margin-top: 12px; border-top: 1px solid var(--border); }
.selection-footer p { margin: 0; font-size: 12px; color: var(--muted); }
.selection-footer strong { display: block; color: #3e4653; font-size: 13px; margin-bottom: 3px; }
.selection-footer button { flex: 0 0 auto; }
#selection-count { margin: 0; color: #3f4651; font-weight: 600; }
.message-inspector { min-width: 0; padding: 0 0 0 27px; border-left: 1px solid var(--border); }
.inspector-head h2 { margin-bottom: 8px; font-size: 23px; }
.inspector-head p { margin: 0; font-size: 13px; color: var(--muted); }
.inspector-person { display: flex; align-items: center; gap: 11px; margin: 25px 0; }
.preview-avatar { display: inline-flex; align-items: center; justify-content: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 50%; background: #e9f1ff; color: #4375b7; font-weight: 650; }
.inspector-person strong { font-size: 13px; display: block; }
.inspector-person small { color: var(--muted); display: block; font-size: 11px; margin-top: 2px; }
.inspector-message { padding: 18px; border: 1px solid #dce0e8; border-radius: 10px; background: linear-gradient(#fafbfe, #fff 75%); margin: 22px 0; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.inspector-message .message-label, .inspector-message > small { display: block; font-size: 11px; font-weight: 600; line-height: 1.5; color: #6e7684; margin: 0 0 15px; }
.inspector-message p { margin: 0; white-space: pre-wrap; }
.inspector-empty { padding: 29px 17px; border: 1px dashed #d8dfe9; border-radius: 10px; background: #fafbfd; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.7; margin-top: 25px; }
.inspector-empty svg { margin: 0 auto 12px; color: #9ba9be; }
.sequence-mini { margin: 25px 0; padding-top: 20px; border-top: 1px solid #e8eaf0; font-size: 12px; color: var(--muted); }
.sequence-mini h3 { font-size: 12px; color: #555e6c; margin-bottom: 13px; }
.sequence-mini ol { list-style: none; padding: 0; margin: 0; }
.sequence-mini li { position: relative; margin: 0 0 13px; padding-left: 20px; font-size: 11px; }
.sequence-mini li::before { content: ""; position: absolute; width: 6px; height: 6px; left: 0; top: 5px; border-radius: 50%; background: #c1d5f4; }
.sequence-mini li strong { display: block; font-size: 12px; font-weight: 500; color: #4f5867; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty-state { padding: 48px 25px; text-align: center; border: 1px dashed #dbe1eb; border-radius: 12px; background: #fbfcfe; margin-top: 23px; color: var(--muted); }
.empty-state svg { margin: 0 auto 15px; color: #9cacc5; }
.empty-state h3 { color: #4c5564; font-size: 15px; }
.empty-state p { max-width: 360px; margin: 7px auto 18px; font-size: 12px; }
.event { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; padding: 14px 0; border-bottom: 1px solid #edf0f4; font-size: 12px; overflow-wrap: anywhere; }
.event:last-child { border-bottom: 0; }
.event time { color: #8a909b; font-size: 11px; }
#notice { position: sticky; top: 12px; z-index: 11; padding: 13px 17px; background: #edf5ff; border: 1px solid #c3dcff; border-radius: 9px; margin: 14px 34px 0; font-size: 13px; color: #345d96; box-shadow: 0 4px 15px #2e4f7f0b; }
.error, #notice.error { background: #fff2f0; color: #9d3d37; border: 1px solid #efcbc6; padding: 15px; border-radius: 9px; margin-top: 15px; font-size: 13px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f3f5f9; padding: 16px; border-radius: 8px; font-size: 12px; line-height: 1.65; }
footer { font-size: 10px; color: #9298a4; border-top: 1px solid #edf0f5; padding: 20px 34px; line-height: 1.7; }
dialog { border: 1px solid #d9dee7; border-radius: 16px; width: min(760px, 92vw); max-height: 88vh; color: #252832; padding: 29px; box-shadow: 0 18px 65px #1b2c4d2e; }
dialog::backdrop { background: #1b233452; backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.dialog-head h2 { margin: 0; }
dialog p { line-height: 1.7; }
.preview-message { white-space: pre-wrap; padding: 18px; background: #f4f7fc; margin: 10px 0 22px; border-radius: 9px; line-height: 1.7; font-size: 14px; overflow-wrap: anywhere; }
.preview-lead { padding: 18px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 16px; }
.review-card { background: #fff9ef; border: 1px solid #eadbc3; padding: 22px; border-radius: 10px; margin: 12px 0; }
.review-card label { margin: 15px 0; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 30; left: 16px; top: 12px; padding: 10px 16px; border-radius: 7px; background: #fff; box-shadow: 0 4px 20px #15254424; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.nav-icon { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.nav-badge { display: inline-flex; justify-content: center; align-items: center; min-width: 19px; height: 19px; border-radius: 50%; margin-left: auto; background: #e9b75d; color: #5f441b; font-size: 10px; }
.workspace-label > span { color: #c4c8d0; margin: 0 9px; }
.pause-symbol { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--blue); background: #e4edff; font-size: 21px; font-weight: 750; }
.status-banner > div { flex: 1; min-width: 0; }
.status-banner > a { color: #7b8596; font-size: 10px; white-space: nowrap; text-decoration: none; }
.status-banner > a:hover { color: var(--blue); }
.search-options > .small { font-size: 10px; text-align: right; }
.search-empty { padding: 39px 24px 28px; margin: 22px 0 0; border: 1px dashed #dce2ec; border-radius: 11px; text-align: center; background: #fcfdff; }
.empty-symbol { display: inline-flex; align-items: center; justify-content: center; width: 47px; height: 47px; background: #edf3fe; color: #7396c5; border-radius: 12px; font-size: 33px; margin-bottom: 18px; }
.search-empty h3 { font-size: 15px; color: #4f5968; }
.search-empty p { font-size: 12px; color: var(--muted); max-width: 340px; margin: 10px auto; line-height: 1.7; }
.search-empty p.small { font-size: 11px; margin-top: 23px; color: #959ca7; }
.setup-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 20px 0 0; font-size: 11px; }
.setup-links a { text-decoration: none; }
.setup-links span { color: #a6afbd; }
.inline-link { font-size: 13px; text-decoration: none; font-weight: 500; }
.review-alert { display: block; background: #fff8e8; color: #8c6420; border: 1px solid #eddbb2; padding: 12px 16px; margin: 15px 34px 0; border-radius: 9px; font-size: 12px; text-decoration: none; }
body > main > #error { margin-left: 34px; margin-right: 34px; }
.search-details { position: relative; flex: 0 0 auto; margin-bottom: 10px; }
.search-details summary { color: #6f7785; font-size: 11px; font-weight: 500; }
.search-details[open] > summary { margin-bottom: 0; }
.search-details #batch-summary { position: absolute; z-index: 4; right: 0; top: calc(100% + 12px); width: min(410px, calc(100vw - 72px)); padding: 18px; border: 1px solid #dbe1ea; border-radius: 10px; background: #fff; box-shadow: 0 10px 34px #1426491c; max-height: 360px; overflow: auto; overflow-wrap: anywhere; }
.table-bar { min-width: 580px; }
.table-bar button { margin-left: 12px; font-size: 11px; font-weight: 500; }
button.prospect-name { display: inline; background: none; color: #252b36; border: 0; box-shadow: none; font-size: 12px; font-weight: 650; padding: 0; margin: 0; text-align: left; border-radius: 3px; }
button.prospect-name:hover { background: none; color: var(--blue); }
.profile-link { display: inline-block; font-size: 10px; font-weight: 400; margin-top: 7px; color: #7688a1; }
.preview-person { display: flex; align-items: center; gap: 11px; margin: 26px 0 19px; }
.preview-person > div { min-width: 0; }
.preview-person strong { display: block; font-size: 13px; }
.preview-person .small { display: block; font-size: 11px; margin-top: 3px; overflow-wrap: anywhere; }
#inspector-step { font-size: 12px; padding: 9px 11px; }
#inspector-delay { font-size: 10px; font-weight: 600; line-height: 1.6; color: #7a8290; margin: 0 0 16px; }
#inspector-message { white-space: pre-wrap; }
#inspector-warning { padding: 11px 13px; border: 1px solid #efdcb4; border-radius: 8px; background: #fff8e9; color: #966a23; line-height: 1.65; font-size: 11px; }
#inspector-review { width: 100%; font-size: 12px; padding: 9px 12px; }
.inspector-empty .preview-avatar { margin: 0 auto 10px; }
.sequence-mini li { color: #515e70; font-weight: 500; font-size: 12px; }
.sequence-mini li span { display: block; font-size: 10px; font-weight: 400; color: #8b94a1; margin-top: 3px; }
#import-target { display: block; margin-top: 5px; font-size: 10px; color: #8b95a4; }
@media (min-width: 1600px) {
  .workspace-bar { padding-left: 42px; padding-right: 42px; }
  section[data-view] { padding: 42px; }
  .studio-grid { grid-template-columns: minmax(0, 1fr) 330px; }
  .search-main { padding-right: 38px; }
  .message-inspector { padding-left: 33px; }
}
@media (max-width: 1200px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .search-main { padding-right: 0; }
  .message-inspector { border-left: 0; border-top: 1px solid var(--border); padding: 28px 0 0; margin-top: 30px; }
  .inspector-message { max-width: 640px; }
  .inspector-empty { max-width: 640px; }
  .title-row { grid-template-columns: 1fr; gap: 24px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid > button { justify-self: start; }
}
@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; padding: 17px 22px 11px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { font-size: 20px; padding: 0; }
  .mark { width: 36px; height: 36px; flex-basis: 36px; font-size: 21px; border-radius: 9px; }
  .brand-sub { display: none; }
  .sidebar nav { display: flex; overflow-x: auto; gap: 4px; margin-top: 17px; padding-bottom: 3px; max-width: 100%; }
  .sidebar nav a { flex: 0 0 auto; white-space: nowrap; gap: 7px; padding: 9px 11px; font-size: 12px; }
  .nav-icon, .nav-icon svg { width: 17px; height: 17px; flex-basis: 17px; }
  .sidebar-bottom, .sidebar-note { display: none; }
  body > main { margin: 0; }
  .workspace-bar { height: 60px; padding: 0 24px; }
  section[data-view] { padding: 28px 24px; }
  #notice { margin-left: 24px; margin-right: 24px; }
  .review-alert, body > main > #error { margin-left: 24px; margin-right: 24px; }
  footer { padding: 20px 24px; }
}
@media (max-width: 600px) {
  .sidebar { padding: 16px 16px 9px; }
  .sidebar nav { margin-top: 15px; }
  .sidebar nav a { padding: 8px 10px; }
  .workspace-bar { padding: 12px 18px; gap: 10px; height: auto; min-height: 57px; flex-direction: column; align-items: stretch; }
  .workspace-label { font-size: 11px; }
  .workspace-actions { gap: 7px; flex-wrap: wrap; }
  .workspace-actions button { font-size: 11px; padding: 7px 9px; }
  #workspace-mode { max-width: 120px; font-size: 9px; padding: 4px 6px; margin-right: auto; }
  section[data-view] { padding: 25px 18px; }
  h1 { font-size: 29px; letter-spacing: -1px; }
  h2 { font-size: 21px; }
  .view-heading { margin-bottom: 24px; }
  .view-heading p { font-size: 13px; }
  .context-grid, .form-grid, #campaign-form .form-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .status-banner { padding: 14px; margin-bottom: 22px; }
  .status-banner strong { font-size: 14px; }
  .status-banner p { font-size: 11px; }
  .status-banner { flex-wrap: wrap; }
  .status-banner > a { margin-left: 54px; }
  .search-link-row { flex-wrap: wrap; }
  .search-link-row input { flex: 1 0 100%; width: 100%; }
  .search-link-row button { flex: 1; }
  .search-options { align-items: start; flex-direction: column; gap: 9px; }
  .review-toolbar { align-items: stretch; flex-direction: column; }
  .review-toolbar > label { max-width: none; }
  .review-toolbar .button-row { margin-top: 2px; }
  .search-details { align-self: flex-end; margin-bottom: 0; }
  .selection-footer { flex-direction: column; align-items: stretch; gap: 13px; }
  .selection-footer button { width: 100%; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 11px; }
  .metric { padding: 17px; }
  .metric strong { font-size: 28px; }
  .metric span { font-size: 11px; }
  .section-head { display: block; }
  .section-head > .muted { display: block; margin-top: 7px; }
  .card, .panel, .run-card { padding: 19px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .event { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  #notice { margin-left: 18px; margin-right: 18px; }
  .review-alert, body > main > #error { margin-left: 18px; margin-right: 18px; }
  footer { padding: 17px 18px; }
  dialog { padding: 21px; border-radius: 12px; }
  .dialog-head { align-items: start; gap: 12px; }
  .dialog-head button { font-size: 12px; padding: 8px 10px; }
  .step-editor .row { gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* Cloud sign-in shares the Studio visual language. */
body.auth-loading > .sidebar, body.auth-loading > main,
body.auth-locked > .sidebar, body.auth-locked > main,
body.auth-locked > .skip-link, body.auth-loading > .skip-link { display:none; }
.cloud-login { min-height:100vh; display:grid; place-items:center; padding:28px; background:#f4f6fa; }
.login-card { width:min(420px,100%); background:#fff; border:1px solid var(--border); border-radius:20px; padding:38px; box-shadow:0 12px 45px #233e6010; }
.login-card .mark { margin-bottom:24px; }
.login-card label { margin-top:20px; }
.login-card button { margin-top:24px; width:100%; }
.login-card > p:last-child { margin:24px 0 0; }
#login-error { color:#9d3d37; }
#cloud-desktop[aria-disabled=true] { color:var(--muted); cursor:not-allowed; }
#cloud-sender-help { margin-top:0; margin-bottom:18px; }
@media(max-width:600px){.login-card{padding:26px;} .workspace-actions{gap:6px;}}

/* Business profile and outreach copy studio. */
.business-progress { display:flex; flex-wrap:wrap; gap:12px 28px; padding:0; margin:0 0 25px; list-style:none; color:#697482; font-size:12px; }
.business-progress li { display:flex; align-items:center; gap:9px; }
.business-progress li > span { width:24px; height:24px; border-radius:50%; background:#eef3fc; color:#4675b8; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:650; }
.business-grid { display:grid; grid-template-columns:minmax(260px,.85fr) minmax(0,1.15fr); gap:22px; align-items:start; margin-top:24px; }
.business-grid > .panel { margin:0; min-width:0; }
.business-card-heading { display:flex; align-items:flex-start; gap:12px; margin-bottom:24px; }
.business-card-heading .step { margin-top:2px; }
.business-card-heading h2 { font-size:20px; margin:0; letter-spacing:-.45px; }
.business-card-heading p { margin:6px 0 0; line-height:1.65; }
.business-source #business-url { margin-top:7px; }
.business-source form > button { width:100%; margin-top:13px; }
.business-paste { margin-top:24px; padding-top:20px; border-top:1px solid #e7ebf1; }
.business-paste summary { font-size:12px; color:#657388; }
.business-paste label { margin-top:15px; }
.business-paste textarea { margin-top:7px; font-size:13px; }
.business-paste button { margin-top:12px; }
.business-source-footnote { margin:23px 0 0; font-size:11px; line-height:1.7; }
.business-divider { border-top:1px solid var(--border); margin:27px 0; }
.business-source h3 { font-size:12px; color:#626d7c; }
.business-source-page { border-bottom:1px solid #edf0f5; padding:12px 0; font-size:11px; overflow-wrap:anywhere; }
.business-source-page summary { font-size:12px; font-weight:500; }
.business-source-page[open] > summary { margin-bottom:10px; }
.business-excerpt { max-height:220px; overflow:auto; white-space:pre-wrap; padding:12px; background:#f6f8fb; border-radius:7px; color:#697584; line-height:1.7; }
#business-source-warnings { padding-left:18px; line-height:1.75; }
.business-empty { padding:38px 10px 34px; text-align:center; color:var(--muted); }
.business-empty h3 { font-size:14px; color:#515e70; }
.business-empty p { max-width:300px; margin:12px auto; font-size:12px; line-height:1.75; }
.business-state-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:18px; }
.business-state-row .pill { color:#58739a; background:#eef4fd; font-size:10px; }
.business-profile form > label { margin-top:17px; }
.business-profile textarea { min-height:85px; font-size:13px; line-height:1.65; }
.business-profile form > button { margin-top:4px; }
.label-hint { font-weight:400; color:#939ba8; font-size:10px; margin-left:5px; }
#business-profile-conflict p { margin:0 0 8px; }
.business-writing { margin-top:23px; }
.ai-budget-card { padding:20px 23px 18px; margin:0 0 27px; border:1px solid #dfe7f3; border-radius:12px; background:linear-gradient(120deg,#f4f8ff,#fbfcff); }
.ai-budget-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.ai-budget-heading .eyebrow { margin:0 0 5px; color:#7790b2; font-size:9px; letter-spacing:1.3px; }
.ai-budget-heading h3 { margin:0; font-size:17px; letter-spacing:-.3px; }
.ai-budget-limit { text-align:right; flex-shrink:0; }
.ai-budget-limit strong { display:block; font-size:22px; font-weight:650; letter-spacing:-.7px; font-variant-numeric:tabular-nums; }
.ai-budget-limit span { display:block; margin-top:3px; font-size:10px; color:#728199; }
.ai-budget-amounts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin:23px 0 14px; }
.ai-budget-amounts > div + div { border-left:1px solid #dfe6f1; padding-left:22px; }
.ai-budget-amounts dt { color:#738097; font-size:11px; line-height:1.5; }
.ai-budget-amounts dd { margin:5px 0 0; color:#334661; font-size:20px; font-weight:600; letter-spacing:-.4px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ai-budget-amounts > div:last-child dd { color:#155bce; }
#ai-budget-progress { display:block; width:100%; height:5px; border:0; border-radius:4px; overflow:hidden; appearance:none; accent-color:#4c83df; background:#e3eaf5; }
#ai-budget-progress::-webkit-progress-bar { background:#e3eaf5; border-radius:4px; }
#ai-budget-progress::-webkit-progress-value { background:#4c83df; border-radius:4px; }
#ai-budget-progress::-moz-progress-bar { background:#4c83df; border-radius:4px; }
.ai-budget-meta { display:flex; justify-content:space-between; flex-wrap:wrap; gap:5px 14px; margin-top:9px; color:#7b8798; font-size:10px; line-height:1.6; }
.ai-budget-status { margin:15px 0 7px; color:#465e7c; font-size:12px; line-height:1.65; }
.ai-budget-status.is-blocked { color:#965536; font-weight:550; }
#ai-budget-reserve { margin:0; color:#74839a; font-size:11px; line-height:1.7; }
.ai-budget-scope { border-top:1px solid #e2e9f3; padding-top:11px; margin:12px 0 0; color:#8994a5; font-size:10px; line-height:1.65; }
@media(max-width:600px){.ai-budget-card{padding:17px;} .ai-budget-heading{gap:12px;} .ai-budget-heading h3{font-size:15px;} .ai-budget-limit strong{font-size:20px;} .ai-budget-amounts{gap:10px;} .ai-budget-amounts > div + div{padding-left:10px;} .ai-budget-amounts dt{font-size:10px;} .ai-budget-amounts dd{font-size:16px;} .ai-budget-meta{flex-direction:column;gap:3px;} }
.business-brief-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px 22px; }
.business-brief-grid .business-goal { grid-column:1/-1; }
.business-generate-row { display:flex; align-items:center; gap:16px; margin-top:20px; }
.business-generate-row .small { max-width:400px; }
.business-draft-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:20px; }
.business-draft-heading .eyebrow { margin:0 0 7px; font-size:9px; letter-spacing:1.4px; color:#8b95a4; }
.business-draft-heading h3 { margin:0; font-size:22px; letter-spacing:-.5px; overflow-wrap:anywhere; }
.business-draft-heading > label { min-width:0; width:270px; flex-shrink:0; font-size:11px; color:#737e8e; }
.business-draft-heading select { font-size:12px; }
.business-angle { font-size:14px; color:#48566a; line-height:1.75; max-width:760px; }
.business-assumptions { margin:20px 0 24px; padding:15px 18px; background:#f7f9fc; border-radius:9px; }
.business-assumptions summary { font-size:12px; color:#6d7c90; }
.business-assumptions ul { padding-left:18px; line-height:1.75; }
#business-draft-sources { overflow-wrap:anywhere; line-height:1.8; }
.business-message-editor { border-top:1px solid #e7ebf1; padding:19px 0 21px; }
.business-message-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:13px; }
.business-message-heading > strong { font-size:13px; }
.business-message-heading label { display:flex; align-items:center; gap:8px; font-size:11px; font-weight:400; color:#7c8797; }
.business-message-heading input { width:66px; padding:7px 8px; margin:0; font-size:12px; }
.business-message-editor textarea { min-height:125px; line-height:1.75; font-size:14px; padding:16px 18px; border-color:#dbe2ed; background:linear-gradient(#fafcff,#fff); }
.business-use-row { display:flex; align-items:center; justify-content:space-between; gap:25px; border-top:1px solid var(--border); padding-top:22px; margin-top:3px; }
.business-use-row strong { font-size:14px; }
.business-use-row p { max-width:480px; margin:6px 0 0; line-height:1.75; }
.business-use-row button { flex-shrink:0; }
#business-copy > .view-heading > .eyebrow { font-size:9px; letter-spacing:1.5px; color:#8a96a6; margin-bottom:13px; }
@media(max-width:1150px){.business-grid{grid-template-columns:minmax(0,1fr);} .business-source form{max-width:600px;} .business-empty{padding:20px 10px;} .business-draft-heading{align-items:start;} .business-use-row{align-items:start;} }
@media(max-width:600px){.business-progress{gap:10px 14px;font-size:10px;} .business-progress li{gap:7px;} .business-progress li > span{width:21px;height:21px;} .business-card-heading{gap:10px;} .business-card-heading h2{font-size:18px;} .business-brief-grid{grid-template-columns:minmax(0,1fr);} .business-generate-row,.business-draft-heading,.business-use-row{flex-direction:column;align-items:stretch;gap:13px;} .business-draft-heading > label{width:100%;} .business-message-heading{align-items:start;flex-direction:column;} .business-message-heading label{flex-wrap:wrap;line-height:1.5;} .business-message-editor textarea{padding:13px;font-size:13px;} .business-use-row button{width:100%;} #business-copy > .view-heading > .eyebrow{line-height:1.8;} }
