/* Campaign Studio. Kept separate from email-content styles and templates. */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f4f5;
  --border: #dce2e4;
  --text: #202a2e;
  --muted: #626e75;
  --accent: #087e68;
  --accent-hover: #086653;
  --accent-soft: #e5f4ee;
  --accent-text: #fff;
  --ok: #157752;
  --danger: #b33f4f;
  --danger-soft: #fbeef0;
  --warn: #8b641e;
  --warn-soft: #fbf4e4;
  --radius: 8px;
  --shadow: 0 6px 24px #202a2e0d;
}
:root[data-theme="night"] {
  color-scheme: dark;
  --bg: #171b1e;
  --surface: #20262a;
  --surface-2: #293136;
  --border: #3b454b;
  --text: #eef3f5;
  --muted: #acb8be;
  --accent: #75d5b7;
  --accent-hover: #94e3ca;
  --accent-soft: #1b3d34;
  --accent-text: #112c24;
  --ok: #85d4b1;
  --danger: #ff9ca7;
  --danger-soft: #412a31;
  --warn: #e3bf76;
  --warn-soft: #393325;
}
body, h1, h2, h3, h4, button, label, .brand, .eyebrow { letter-spacing: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
.page-head > div { min-width: 0; }
body { font-family: "Segoe UI", Arial, sans-serif; }
h1 { font-size: 32px; font-weight: 650; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
button, .btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 40px; border-radius: 6px; }
button.small, .btn.small { min-height: 34px; }
.lucide { width: 18px; height: 18px; flex: 0 0 18px; vertical-align: middle; }
a .lucide { margin-left: 2px; }
.btn { text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); border: 0; }
.eyebrow { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 10px; text-transform: uppercase; }
.studio-app.app { display: block; min-height: 100vh; }
.studio-header { display: flex; align-items: center; gap: 40px; padding: 0 40px; min-height: 80px; border-bottom: 1px solid var(--border); background: var(--surface); position: relative; z-index: 10; }
#root[aria-busy="true"] .studio-header::after { content: ''; height: 2px; background: var(--accent); position: absolute; bottom: 0; left: 0; width: 30%; animation: studio-loading 1s ease-in-out infinite alternate; }
@keyframes studio-loading { to { left: 70%; } }
.studio-brand { display: inline-flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; font-size: 25px; font-weight: 700; flex: none; }
.brand-period { color: var(--accent); }
.seal-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--accent); color: var(--accent-text); }
.seal-mark .lucide { width: 22px; height: 22px; }
.studio-header nav { display: flex; align-self: stretch; gap: 28px; align-items: center; }
.studio-header nav a { align-self: stretch; display: flex; align-items: center; color: var(--muted); border-bottom: 2px solid transparent; text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 0; }
.studio-header nav a.active, .studio-header nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.studio-account { margin-left: auto; display: flex; align-items: center; gap: 16px; min-width: 0; }
.firm-name { color: var(--muted); font-size: 13px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px; text-decoration: none; cursor: pointer; flex-shrink: 0; }
.icon-button:hover { color: var(--accent); background: var(--accent-soft); }
.icon-button.danger { color: var(--danger); background: var(--surface); border-color: var(--border); }
.icon-button.danger:hover { background: var(--danger-soft); }
dialog.decision-dialog { width: min(480px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 24px; }
.decision-heading { display: flex; align-items: flex-start; gap: 12px; }
.decision-heading h2 { flex: 1; min-width: 0; margin: 4px 0 0; font-size: 20px; line-height: 1.4; }
.decision-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.decision-description { margin: 18px 0 24px; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-line; }
.decision-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.decision-actions button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.decision-actions button.danger { color: var(--surface); }
.decision-dialog .field { margin-bottom: 20px; }
.session-warning { position: fixed; right: 24px; bottom: 24px; z-index: 45; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 20px; border: 1px solid var(--warn); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.session-warning p { margin: 10px 0 16px; font-size: 14px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.session-warning .row { flex-wrap: wrap; }
@media (max-width: 600px) { .session-warning { right: 16px; bottom: 16px; } }
.pill { white-space: nowrap; flex-shrink: 0; letter-spacing: 0; }
.first-run-checklist td:first-child { width: 104px; min-width: 104px; }
.first-run-checklist td:last-child { width: 90px; }
.workspace-form { max-width: 800px; padding: 24px 0; }
.support-thread { list-style: none; max-width: 900px; padding: 0; margin: 0; }
.support-thread li { padding: 24px 0; border-top: 1px solid var(--border); }
.support-thread li > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.support-thread time { font-size: 12px; color: var(--muted); }
.support-thread p { white-space: pre-wrap; overflow-wrap: anywhere; }
.support-shortcut { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 36px; min-height: 36px; flex-shrink: 0; }
.support-shortcut > svg { width: 19px; height: 19px; }
[data-support-unread] { min-width: 23px; height: 23px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--accent); color: var(--accent-text); font-size: 11px; font-weight: 700; }
[data-support-unread][hidden] { display: none; }
.support-attachment { display: flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 12px; }
.support-attachment > a { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.support-attachment svg { width: 18px; height: 18px; flex-shrink: 0; }
.support-attachment small { white-space: nowrap; }
.support-upload { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; max-width: 900px; padding: 20px 0; border-top: 1px solid var(--border); }
.support-upload .field { flex: 1 1 280px; min-width: 0; }
.support-upload input { max-width: 100%; }
.support-upload .form-status { flex-basis: 100%; }
.designer-toolbar [data-editor-size] { width: 76px; min-width: 76px; }
.designer-toolbar button svg { width: 17px; height: 17px; }
.composer-finishers { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border); }
.composer-finishers label { flex: 1 1 180px; min-width: 0; font-size: 12px; color: var(--muted); }
.composer-finishers select { display: block; width: 100%; margin-top: 5px; }
.composer-finishers > a { font-size: 12px; padding-bottom: 10px; }
.fragment-editor { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.design-choice[hidden] { display: none; }
.support-alert-settings { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 18px 0; margin-bottom: 24px; }
.support-alert-settings summary { cursor: pointer; font-weight: 600; }
.support-alert-settings form { margin-top: 18px; }
.form-status { color: var(--danger); overflow-wrap: anywhere; margin-top: 12px; }
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(260px,100%),1fr)); gap: 32px; }
.tier-grid article { border-top: 1px solid var(--border); padding: 20px 0; min-width: 0; }
.tier-grid ul { padding-left: 20px; line-height: 2; }
.tier-grid p { color: var(--muted); }
.tier-form, .tier-assignment { padding: 28px 0; border-top: 1px solid var(--border); }
.tier-form fieldset { margin: 12px 0 24px; border: 0; padding: 0; }
.tier-form legend { font-weight: 600; }
.tier-form .check-row { margin: 10px 0; }
.journey-step { display: grid; grid-template-columns: minmax(0,1fr) 150px 36px; align-items: end; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.journey-step .field { margin: 0; min-width: 0; }
.header-menu { position: relative; flex-shrink: 0; }
.settings-menu > summary { list-style: none; }
.settings-menu > summary::-webkit-details-marker { display: none; }
.settings-menu[open] > summary { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.settings-popover { position: absolute; right: 0; top: 48px; width: 284px; max-width: calc(100vw - 40px); padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); z-index: 1; }
.settings-menu-heading { padding: 8px 10px; color: var(--muted); font-size: 12px; font-weight: 600; }
.settings-popover a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px; border-radius: 4px; color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.4; }
.settings-popover a:hover, .settings-popover a:focus-visible { background: var(--accent-soft); color: var(--accent); }
.settings-popover a span { min-width: 0; overflow-wrap: anywhere; }
.settings-popover a.settings-menu-all { justify-content: space-between; margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0; color: var(--accent); font-weight: 600; }
.avatar { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; list-style: none; background: var(--accent-soft); color: var(--accent); cursor: pointer; font-weight: 600; }
.avatar::-webkit-details-marker { display: none; }
.account-popover { position: absolute; right: 0; top: 48px; width: 280px; max-width: calc(100vw - 32px); padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); display: grid; gap: 7px; overflow-wrap: anywhere; }
.account-popover small { color: var(--muted); }
.account-popover button { background: transparent; color: var(--text); justify-content: start; padding: 8px; border: none; text-align: left; }
.account-popover button:hover { background: var(--surface-2); }
.studio-app .main { width: 100%; max-width: 1600px; margin: auto; padding: 40px; min-width: 0; }
.page-head { margin-bottom: 30px; align-items: center; }
.page-head h1 { margin: 0; }
.page-head p { font-size: 14px; }
.page-head > button, .page-head > .btn { flex-shrink: 0; }
.studio-app .main > .card { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 28px 0; }
.studio-app .main > .card:has(> .stat) { margin: 0 0 34px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 23px 0; }
.studio-app .stat { display: flex; flex-wrap: wrap; gap: 24px 44px; }
.studio-app .stat > div { min-width: 135px; }
.studio-app .stat b { font-size: 28px; font-weight: 600; color: var(--text); }
.studio-app .stat span { font-size: 12px; color: var(--muted); }
.studio-section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 32px 0 20px; }
.studio-section-title h2 { margin: 0; }
.studio-section-title a { font-size: 13px; text-decoration: none; }
.surface-table, .studio-app .table-wrap { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; }
.surface-table > .table-wrap { border: 0; }
.surface-table { overflow: hidden; }
.studio-app .table-wrap { position: relative; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { color: var(--accent); background: var(--accent-soft); }
.draft-queue { margin: 0 0 30px; border-top: 1px solid var(--border); }
.draft-queue > a { display: flex; align-items: center; gap: 16px; min-height: 86px; padding: 16px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.draft-queue > a:hover { color: var(--accent); }
.draft-queue strong { font-size: 14px; font-weight: 600; }
.draft-queue small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.queue-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--accent); background: var(--accent-soft); border-radius: 6px; flex-shrink: 0; }
.queue-next { margin-left: auto; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; flex: none; }
.studio-app table { min-width: 640px; width: 100%; }
.studio-app th { color: var(--muted); background: var(--surface-2); font-size: 11px; text-transform: uppercase; font-weight: 600; padding: 13px 16px; }
.studio-app td { padding: 18px 16px; font-size: 13px; }
.studio-app td a { text-decoration: none; }
.studio-app td a:hover { text-decoration: underline; }
.empty-state { padding: 60px 20px !important; text-align: center; color: var(--muted); }
.campaign-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.search-field { position: relative; flex: 1 1 260px; display: flex; align-items: center; }
.search-field > .lucide { position: absolute; left: 13px; color: var(--muted); }
.search-field input { padding-left: 40px; width: 100%; }
.campaign-tools select { min-width: 160px; }
.campaign-tools > span { font-size: 13px; }
.settings-back { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; text-decoration: none; margin-bottom: 24px; }
.settings-layout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; padding: 26px 0 48px; }
.settings-group h2 { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.settings-links { border-top: 1px solid var(--border); }
.settings-links a { display: flex; align-items: center; gap: 14px; min-height: 78px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 14px; padding: 14px 0; }
.settings-links a:hover { color: var(--accent); }
.settings-links a > .lucide:first-child { color: var(--accent); }
.settings-links a > .lucide:last-child { margin-left: auto; color: var(--muted); }
.appearance-row { border-top: 1px solid var(--border); padding: 28px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.appearance-row h2 { font-size: 16px; margin: 0; }
.segmented { display: inline-flex; gap: 4px; }
.segmented .selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.report-toolbar { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); padding: 24px 0; }
.report-toolbar .field { margin: 0; }
.report-toolbar label { font-size: 12px; }
.report-toolbar input { min-height: 40px; }
.studio-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--border); padding: 0 0 24px; margin-bottom: 28px; gap: 24px; }
.studio-metrics span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.studio-metrics strong { font-size: 30px; font-weight: 600; }
.report-notes { margin-top: 24px; font-size: 13px; color: var(--muted); max-width: 800px; }
.report-notes summary { cursor: pointer; }
.report-tabs { display: flex; gap: 8px; margin: 0 0 22px; }
.report-tabs .selected { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.report-metrics { grid-template-columns: repeat(6,minmax(0,1fr)); }
.readiness-alerts { margin: 0 0 38px; }
.readiness-alerts .notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.history-heading { margin-top: 30px; }
.recipient-timeline { list-style: none; padding: 0; margin: 18px 0; }
.recipient-timeline li { display: grid; grid-template-columns: 190px 1fr; gap: 20px; padding: 15px 0; border-top: 1px solid var(--border); }
.recipient-timeline time, .recipient-timeline span { color: var(--muted); font-size: 12px; }
.recipient-timeline span { display: block; margin-top: 5px; }
dialog:has(.audience-inspector) { max-width: 900px; }
.contact-preview { max-height: 320px; }
.contact-preview table { min-width: 580px; width: 100%; }
.contact-preview td, .contact-preview th { padding: 12px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); }
.saved-segments > div { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.saved-segments span { margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.saved-segments small { display: block; color: var(--muted); margin-top: 5px; }
.segment-form { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; align-items: end; margin-top: 26px; }
.segment-form .field { margin: 0; }
.segment-form label { font-size: 12px; }
.segment-form > button[type="submit"] { grid-column: 1 / -1; justify-self: end; min-width: 140px; }
#segment-status { grid-column: 1 / -1; }
#segment-status:empty { display: none; }
.check-row { display: flex; align-items: start; gap: 12px; font-size: 13px; margin: 20px 0; }
.check-row input { flex: 0 0 17px; margin-top: 3px; }
.login-wrap { position: relative; min-height: 100dvh; grid-template-columns: minmax(0, 1fr); background: var(--surface); padding: 100px 24px 48px; }
.auth-home { position: absolute; top: 28px; left: 36px; }
.login { width: 100%; max-width: 420px; min-width: 0; }
.login > .brand { display: none; }
.login > .card { background: transparent; border: none; box-shadow: none; border-radius: 0; padding: 0; }
.login h1 { font-size: 30px; margin-bottom: 32px; }
.login .field { margin-bottom: 22px; }
.login input { min-height: 46px; }
.public-site { background: var(--surface); }
.public-header { display: flex; align-items: center; justify-content: space-between; padding: 26px 6%; gap: 20px; border-bottom: 1px solid var(--border); }
.public-header nav { display: flex; gap: 32px; align-items: center; }
.public-header nav a { font-size: 14px; color: var(--text); text-decoration: none; white-space: nowrap; }
.public-hero { position: relative; background: var(--surface-2); padding: 40px 6% 30px; }
.public-intro { position: relative; z-index: 1; text-align: center; }
.public-intro h1 { font-size: 68px; line-height: 1; margin: 0 0 14px; }
.public-intro p { font-size: 22px; line-height: 1.3; margin: 0 0 22px; color: var(--muted); }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 28px; }
.hero-actions a { font-size: 14px; }
.text-link { color: var(--text); text-decoration: none; }
.public-showcase { background: var(--surface-2); padding: 0 6% 42px; border-bottom: 1px solid var(--border); }
.feature-gallery { max-width: 1120px; margin: 0 auto; }
.feature-gallery [hidden] { display: none !important; }
.gallery-media { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 520px; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.gallery-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; }
.gallery-slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-image-error { padding: 28px; color: var(--muted); text-align: center; }
.gallery-demo { position: absolute; bottom: 12px; left: 12px; padding: 6px 10px; border: 1px solid var(--border); color: var(--muted); background: var(--surface); font-size: 12px; }
.gallery-icon { display: inline-flex; align-items: center; justify-content: center; padding: 10px; min-width: 44px; width: 44px; min-height: 44px; height: 44px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; flex-shrink: 0; }
.gallery-icon:hover:not(:disabled) { color: var(--accent); background: var(--accent-soft); }
.gallery-icon:disabled { opacity: .55; cursor: not-allowed; }
.gallery-icon > span { display: inline-flex; align-items: center; justify-content: center; }
.gallery-zoom { position: absolute; top: 12px; right: 12px; }
.gallery-caption-row { display: flex; align-items: start; justify-content: space-between; gap: 28px; margin: 22px 0; }
.gallery-caption { min-width: 0; min-height: 112px; flex: 1; }
.gallery-caption h2 { margin: 0 0 10px; font-size: 28px; line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; }
.gallery-caption p { color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 68ch; margin: 0; }
.gallery-controls { display: flex; align-items: center; gap: 7px; }
.gallery-count { margin-right: 6px; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.gallery-thumbnails { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.gallery-thumbnail { display: flex; flex-direction: column; gap: 0; min-width: 0; padding: 0; color: var(--text); background: var(--surface); border: 2px solid var(--border); border-radius: 6px; overflow: hidden; }
.gallery-thumbnail:hover { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.gallery-thumbnail[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.gallery-thumbnail img { display: block; width: 100%; height: 72px; flex-shrink: 0; object-fit: contain; background: var(--surface-2); }
.gallery-thumbnail span { display: block; width: 100%; padding: 9px 4px; font-size: 14px; line-height: 1.25; white-space: nowrap; }
dialog.gallery-dialog { width: min(1280px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 20px; }
.gallery-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.gallery-dialog-heading h2 { min-width: 0; margin: 0; font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.gallery-dialog-content { overflow: auto; max-height: calc(100dvh - 180px); overscroll-behavior: contain; }
.gallery-dialog-content img { display: block; width: max(1100px, 100%); max-width: none; height: auto; }
.gallery-dialog p { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.public-band { padding: 64px 6%; }
.public-band h2 { font-size: 36px; font-weight: 600; line-height: 1.25; }
.public-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 50px; margin-top: 40px; }
.public-features article { border-top: 1px solid var(--border); padding-top: 24px; }
.public-features .lucide { width: 26px; height: 26px; color: var(--accent); margin-bottom: 20px; }
.public-features p { color: var(--muted); max-width: 34ch; font-size: 15px; }
.control-band { background: var(--surface-2); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.control-list { padding-top: 10px; }
.control-list p { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--border); padding: 14px 0; margin: 0; }
.control-list .lucide { color: var(--accent); }
.public-close { padding: 56px 6%; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.public-close h2 { margin: 0; }
.public-footer { display: flex; align-items: center; justify-content: space-between; padding: 26px 6%; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.public-footer a { margin-left: 18px; }
@media (max-width: 1100px) {
  .studio-header { padding: 0 24px; gap: 28px; }
  .studio-header nav { gap: 22px; }
  .firm-name { display: none; }
  .studio-app .main { padding: 32px 24px; }
  .settings-layout { gap: 24px; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .gallery-caption { min-height: 156px; }
}
@media (max-width: 760px) {
  .studio-header { min-height: 110px; flex-wrap: wrap; gap: 0; padding: 16px 20px 0; }
  .studio-brand { font-size: 23px; }
  .studio-header nav { order: 3; width: 100%; overflow-x: auto; gap: 26px; min-height: 50px; }
  .studio-header nav a { flex: none; }
  .studio-account { gap: 6px; }
  .journey-step { grid-template-columns: minmax(0,1fr) 36px; }
  .journey-step .field:first-child { grid-column: 1 / -1; }
  .settings-popover { right: -42px; }
  .studio-app .main { padding: 28px 20px; }
  h1 { font-size: 27px; }
  .page-head { gap: 18px; flex-wrap: wrap; }
  .settings-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 8px; }
  .settings-group h2 { margin-bottom: 14px; }
  .settings-links a { min-height: 66px; }
  .studio-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipient-timeline li { grid-template-columns: 1fr; gap: 6px; }
  .segment-form { grid-template-columns: 1fr 1fr; }
  .saved-segments > div { flex-wrap: wrap; }
  .saved-segments span { flex: 1 1 100%; }
  .contact-preview table { min-width: 0; }
  .contact-preview thead { display: none; }
  .contact-preview tbody, .contact-preview tr, .contact-preview td { display: block; }
  .contact-preview tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .contact-preview td { border: 0; padding: 6px 0; overflow-wrap: anywhere; }
  .contact-preview td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
  .campaign-tools > label { flex: 1 1 100%; }
  .campaign-tools select { width: 100%; }
  .auth-home { left: 24px; }
  .public-header { padding: 22px 6%; }
  .public-header nav { gap: 14px; }
  .public-header nav a:not(:last-child) { display: none; }
  .public-hero { padding-top: 35px; padding-bottom: 26px; }
  .public-intro h1 { font-size: 48px; }
  .public-intro p { font-size: 20px; }
  .hero-actions { flex-direction: column; gap: 16px; }
  .public-showcase { padding-bottom: 30px; }
  .gallery-media { aspect-ratio: 16 / 10; }
  .gallery-caption-row { flex-direction: column; gap: 18px; margin: 18px 0; }
  .gallery-caption h2 { font-size: 24px; }
  .gallery-caption { min-height: 144px; }
  .gallery-controls { align-self: flex-end; }
  .gallery-thumbnails { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .gallery-thumbnail img { height: 54px; }
  .gallery-demo { font-size: 12px; bottom: 8px; left: 8px; padding: 4px 7px; }
  .gallery-zoom { top: 8px; right: 8px; }
  .public-band { padding: 40px 6%; }
  .public-band h2 { font-size: 28px; }
  .public-features { grid-template-columns: 1fr; gap: 20px; margin-top: 28px; }
  .public-features .lucide { margin-bottom: 12px; }
  .control-band { grid-template-columns: 1fr; gap: 12px; }
  .public-close { flex-direction: column; align-items: start; padding: 40px 6%; }
}
@media (max-width: 440px) {
  .gallery-caption { min-height: 168px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
