:root {
  --ink: #17231c;
  --muted: #68766d;
  --faint: #9aa69e;
  --canvas: #f5f3ed;
  --paper: #fffefa;
  --line: #dedfd9;
  --line-soft: #e9e8e2;
  --green: #1e6049;
  --green-dark: #154b39;
  --green-pale: #dcebe1;
  --lime: #d7ef8f;
  --orange: #ec8f50;
  --red: #b94b42;
  --shadow: 0 18px 54px rgba(31, 49, 39, .09);
  --sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 14px; }
body.menu-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

#app { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; min-height: 0; padding: 28px 20px 20px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; background: #ece9e0; border-right: 1px solid #dcd9d0; display: flex; flex-direction: column; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 10px; background: #c8c8c0; background-clip: padding-box; }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 0 8px; font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: -.5px; }
.brand-mark { display: inline-flex; align-items: end; gap: 2px; height: 24px; transform: rotate(-5deg); }
.brand-mark i { width: 5px; border-radius: 4px; background: var(--green); display: block; }
.brand-mark i:nth-child(1) { height: 13px; }
.brand-mark i:nth-child(2) { height: 21px; }
.brand-mark i:nth-child(3) { height: 16px; }
.workspace-picker { width: 100%; margin: 30px 0 20px; padding: 10px; border: 1px solid #d4d3cc; border-radius: 12px; background: rgba(255,255,255,.48); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.workspace-avatar, .profile-avatar { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--green); color: white; font-size: 11px; font-weight: 700; }
.workspace-picker span:nth-child(2), .profile span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.workspace-picker small, .profile small { color: var(--muted); font-size: 11px; }
.workspace-picker strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.agency-nav[hidden] { display: none; }
.chevron, .more { color: var(--muted); }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: #526058; font-weight: 500; transition: .18s ease; }
.nav a:hover { background: rgba(255,255,255,.55); color: var(--ink); }
.nav a.active { background: var(--paper); color: var(--green-dark); box-shadow: 0 2px 6px rgba(44,50,45,.05); }
.nav svg { width: 18px; height: 18px; stroke-width: 1.8; }
.sidebar-bottom { margin-top: auto; }
.nav.compact { margin-bottom: 18px; }
.usage-mini { padding: 14px 12px; margin-bottom: 10px; border-top: 1px solid #d8d6ce; border-bottom: 1px solid #d8d6ce; }
.usage-mini > div:first-child { display: flex; justify-content: space-between; margin-bottom: 9px; font-size: 11px; color: var(--muted); }
.usage-mini strong { color: var(--ink); font-weight: 600; }
.progress { height: 5px; overflow: hidden; background: #d7d8d0; border-radius: 10px; }
.progress i { display: block; height: 100%; width: 0; background: var(--green); border-radius: inherit; transition: width .5s ease; }
.profile { width: 100%; border: 0; background: transparent; padding: 10px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: left; cursor: pointer; }
.profile-avatar { border-radius: 50%; background: #c6d3c9; color: var(--green-dark); }
.profile strong { font-size: 13px; }
.main { min-width: 0; }
.page { max-width: 1400px; margin: 0 auto; padding: 42px 54px 80px; }
.mobile-header { display: none; }
.loading-state { min-height: 70vh; display: grid; place-items: center; align-content: center; color: var(--muted); }
.spinner { width: 24px; height: 24px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-family: var(--serif); font-size: clamp(35px, 4vw, 48px); line-height: 1.02; letter-spacing: -1.5px; font-weight: 600; }
h2 { font-family: var(--serif); font-size: 28px; letter-spacing: -.5px; }
h3 { font-size: 16px; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 15px; }
.head-actions, .button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button { min-height: 42px; padding: 9px 17px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; line-height: 1.15; text-align: center; cursor: pointer; transition: .18s ease; }
.button:hover { border-color: #bfc5c0; transform: translateY(-1px); }
.button.primary { background: var(--green); border-color: var(--green); color: white; box-shadow: 0 7px 16px rgba(30,96,73,.16); }
.button.primary:hover { background: var(--green-dark); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.ai-button { border-color: #cfc7f2; color: #5545b8; background: #f5f2ff; }
.button.ghost { background: transparent; }
.button.small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.button.danger { color: var(--red); }
.button svg { width: 16px; height: 16px; }
.icon-button { width: 38px; height: 38px; min-width: 38px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); display: inline-grid; place-items: center; line-height: 1; cursor: pointer; }
.icon-button.active { border-color: var(--green); color: var(--green); box-shadow: 0 0 0 2px rgba(30,96,73,.1); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 20px; }
.card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: 17px; box-shadow: 0 3px 12px rgba(37,45,40,.025); }
.feature-card { min-height: 277px; padding: 33px 34px; position: relative; overflow: hidden; background: var(--green); color: white; display: flex; flex-direction: column; align-items: flex-start; }
.feature-card::before { content: ""; position: absolute; width: 350px; height: 350px; right: -120px; top: -130px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 38px rgba(255,255,255,.035), 0 0 0 76px rgba(255,255,255,.025); }
.feature-card > * { position: relative; z-index: 1; }
.feature-card .kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 45px; font-size: 12px; color: #d5e6dd; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.feature-card h2 { max-width: 560px; margin-bottom: 11px; font-size: 35px; line-height: 1.08; }
.feature-card p { max-width: 540px; color: #d5e3dc; line-height: 1.55; }
.feature-card .button { margin-top: auto; background: var(--lime); color: var(--green-dark); border: 0; }
.mode-choice-grid { display: grid; gap: 9px; margin-top: 8px; }
.mode-choice { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #faf9f5; cursor: pointer; }
.mode-choice:has(input:checked) { border-color: var(--green); background: #edf6f1; box-shadow: 0 0 0 2px rgba(30,96,73,.08); }
.mode-choice input { margin-top: 3px; accent-color: var(--green); }
.mode-choice span { display: flex; flex-direction: column; }
.mode-choice small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.creator-hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 20px; }
.creator-publish-card { min-height: 285px; padding: 34px; color: white; background: linear-gradient(135deg, #5545a9, #7866d0); }
.creator-publish-card .kicker { color: #ddd7ff; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 800; }
.creator-publish-card h2 { max-width: 650px; margin: 42px 0 10px; font-size: 36px; }
.creator-publish-card p { max-width: 590px; color: #e8e4ff; line-height: 1.55; }
.creator-publish-card .button { margin-top: 18px; border: 0; background: white; color: #4f409c; }
.creator-growth-card { display: flex; flex-direction: column; justify-content: center; padding: 30px; background: #ecf6df; }
.creator-growth-card > small { color: #55713b; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.creator-growth-card > strong { margin: 10px 0; font-family: var(--serif); font-size: 58px; }
.creator-growth-card p { color: var(--muted); line-height: 1.5; }
.creator-tool-list { padding: 8px 20px; }
.creator-tool-list a { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line-soft); }
.creator-tool-list a:last-child { border-bottom: 0; }
.creator-tool-list a > span:first-child { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #ede9fb; color: #5849aa; }
.creator-tool-list a > span:last-child { display: flex; flex-direction: column; }
.creator-tool-list small { margin-top: 3px; color: var(--muted); }
.creator-offer-badge { display: inline-flex; width: fit-content; padding: 7px 10px; border-radius: 999px; color: #5746b3; background: #ede9fb; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.creator-welcome-modal { max-width: 610px; }
.creator-welcome-modal .modal-head h2 { margin-top: 14px; }
.creator-welcome-offer { margin-top: 22px; padding: 22px; border: 1px solid #d8d1f4; border-radius: 16px; background: #f5f2ff; }
.creator-welcome-offer strong { display: block; margin-bottom: 8px; font-family: var(--serif); font-size: 25px; color: #342b69; }
.creator-welcome-offer p { margin: 0; color: #5f5879; line-height: 1.55; }
.creator-billing-offer { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; margin-bottom: 20px; padding: 26px; border-color: #d8d1f4; background: linear-gradient(135deg, #f7f5ff, #efebff); }
.creator-billing-offer.warning { border-color: #f0c779; background: linear-gradient(135deg, #fff8e8, #fff1c9); }
.creator-billing-offer.expired { border-color: #e3a0a0; background: linear-gradient(135deg, #fff1f1, #ffe3e3); }
.creator-billing-offer h2 { margin: 0 0 7px; font-size: 27px; }
.creator-billing-offer p { margin: 0; color: var(--muted); line-height: 1.55; }
.trial-progress { overflow: hidden; height: 9px; margin-top: 17px; border-radius: 999px; background: rgba(87, 70, 179, .13); }
.trial-progress i { display: block; height: 100%; border-radius: inherit; background: #5746b3; }
.creator-billing-offer.warning .creator-offer-badge { color: #7a4e09; background: #ffe8ad; }
.creator-billing-offer.warning .trial-progress { background: rgba(191, 123, 15, .14); }
.creator-billing-offer.warning .trial-progress i { background: #bf7b0f; }
.creator-billing-offer.expired .creator-offer-badge { color: #8a2222; background: #ffd6d6; }
.creator-billing-offer.expired .trial-progress { background: rgba(138, 34, 34, .14); }
.creator-billing-offer.expired .trial-progress i { background: #b63a3a; }
@media (max-width: 640px) {
  .creator-billing-offer { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
  .creator-billing-offer h2 { font-size: 25px; }
  .creator-welcome-modal .modal-actions { align-items: stretch; }
  .creator-welcome-modal .modal-actions .button { width: 100%; justify-content: center; }
}
.agency-portfolio-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 34px; border-radius: 18px; color: white; background: linear-gradient(125deg, #173d32, #226a53); overflow: hidden; }
.agency-portfolio-hero h2 { max-width: 700px; margin: 28px 0 8px; font-size: 37px; }
.agency-portfolio-hero p { margin: 0; color: #cce0d8; }
.agency-portfolio-hero .kicker { color: #d7ef8f; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 800; }
.agency-portfolio-hero .button { flex: 0 0 auto; border: 0; background: var(--lime); color: var(--green-dark); }
.agency-principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 15px; background: var(--line); }
.agency-principles > span { display: grid; grid-template-columns: auto 1fr; gap: 5px 11px; padding: 18px; background: var(--paper); }
.agency-principles b { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--green); background: var(--green-pale); }
.agency-principles small { color: var(--muted); line-height: 1.45; }
.agency-client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.agency-client-card { min-width: 0; padding: 20px; }
.agency-client-card > div:first-child { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; }
.agency-client-card h3 { overflow: hidden; margin: 2px 0 0; font-family: var(--serif); font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.agency-client-card small { color: var(--muted); font-size: 9px; }
.agency-client-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 20px 0 15px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--line-soft); }
.agency-client-card dl div { padding: 10px; background: var(--paper); }
.agency-client-card dt { color: var(--muted); font-size: 9px; }
.agency-client-card dd { margin: 3px 0 0; font-weight: 800; }
.agency-client-card .progress { margin-bottom: 15px; }
.agency-client-card > .button { width: 100%; }
.agency-isolation-note { padding: 14px; border-radius: 11px; color: #315d55; background: #e8f3ef; }
.agency-isolation-note p { margin: 4px 0 0; font-size: 11px; line-height: 1.5; }
.workspace-switcher-list { display: grid; gap: 8px; max-height: 55vh; overflow-y: auto; }
.workspace-switcher-list > button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); text-align: left; cursor: pointer; }
.workspace-switcher-list > button:hover { border-color: #aebbb3; }
.workspace-switcher-list > button.active { background: #edf4ef; border-color: #b8d1c3; }
.workspace-switcher-list > button span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.workspace-switcher-list > button small { margin-top: 3px; color: var(--muted); }
.workspace-switcher-list > button b { color: var(--green); font-size: 11px; }
.readiness-card { padding: 28px; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.readiness-card h3 { margin-bottom: 4px; }
.readiness-card > p { color: var(--muted); font-size: 13px; }
.readiness-list { display: grid; gap: 9px; margin-top: 22px; }
.readiness-item { padding: 11px 0; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; }
.status-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--green-pale); color: var(--green); font-size: 12px; font-weight: 700; }
.status-dot.pending { background: #f2e9d1; color: #9a6c27; }
.readiness-item small { color: var(--muted); }
.readiness-item strong { display: block; font-size: 13px; margin-bottom: 2px; }
.text-link { border: 0; background: none; color: var(--green); padding: 0; font-weight: 600; cursor: pointer; }

.section { margin-top: 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 25px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric { padding: 22px; }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.metric-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #edf0eb; color: var(--green); }
.metric-icon svg { width: 15px; }
.metric-value { margin: 20px 0 4px; font-family: var(--serif); font-size: 31px; }
.metric-note { color: var(--muted); font-size: 12px; }
.positive { color: var(--green); }
.report-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.report-head h1 { margin-bottom: 7px; }
.report-period { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.65); }
.report-period button, .report-tabs button { border: 0; background: transparent; cursor: pointer; font-weight: 700; }
.report-period button { min-height: 34px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-size: 11px; }
.report-period button.active { background: var(--ink); color: white; box-shadow: 0 3px 10px rgba(23,35,28,.14); }
.report-tabs { display: flex; gap: 28px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.report-tabs button { padding: 0 2px 13px; color: var(--muted); position: relative; }
.report-tabs button.active { color: var(--ink); }
.report-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: #7165ff; }
.revenue-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid #dedce9; border-radius: 18px; background: #dedce9; box-shadow: 0 14px 40px rgba(66,55,128,.08); }
.report-metric { min-width: 0; padding: 23px; background: white; position: relative; overflow: hidden; }
.report-metric::after { content: ""; position: absolute; width: 100px; height: 100px; right: -42px; bottom: -55px; border-radius: 50%; background: currentColor; opacity: .06; }
.report-metric.revenue { color: #6659ee; }
.report-metric.average { color: #ef5da8; }
.report-metric.orders { color: #17a96a; }
.report-metric.rate { color: #df812d; }
.report-metric-top { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.report-metric-icon { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 12%, white); color: inherit; font-weight: 800; }
.report-metric > strong { display: block; margin: 18px 0 12px; color: var(--ink); font-family: var(--serif); font-size: clamp(29px, 3vw, 39px); line-height: 1; letter-spacing: -.8px; }
.report-metric > div:last-child { display: flex; align-items: center; gap: 8px; min-width: 0; }
.report-metric small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.change { flex: 0 0 auto; padding: 5px 8px; border-radius: 20px; font-size: 10px; font-weight: 800; }
.change.up { background: #dcf7e9; color: #148656; }
.change.down { background: #ffebe5; color: #c4523d; }
.report-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; margin-top: 18px; }
.report-panel { padding: 25px; border: 1px solid #e4e2eb; border-radius: 17px; background: white; box-shadow: 0 5px 18px rgba(42,35,75,.035); }
.report-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.report-panel-head h2 { margin: 0 0 5px; font-family: var(--sans); font-size: 16px; letter-spacing: 0; }
.report-panel-head p { margin: 0; color: var(--muted); font-size: 11px; }
.delivery-history-panel { margin: 0 0 18px; }
.delivery-history-note { margin-bottom: 18px; padding: 13px 15px; border: 1px solid #e8d6a9; border-radius: 12px; color: #6c592b; background: #fff9e9; }
.delivery-history-note.ready { color: #225844; border-color: #cce3d5; background: #edf7f1; }
.delivery-history-note p { margin: 4px 0 0; font-size: 12px; line-height: 1.5; }
.delivery-history-loading { padding: 18px; border-radius: 13px; color: var(--muted); background: #f6f8f5; }
.delivery-history-metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--line); }
.delivery-history-metrics span { min-width: 0; padding: 14px; background: #fbfcfa; }
.delivery-history-metrics b { display: block; font-family: var(--serif); font-size: 26px; line-height: 1; }
.delivery-history-metrics small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.delivery-history-table { overflow-x: auto; }
.delivery-event-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #245340; background: #e6f4ec; font-size: 11px; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.delivery-event-pill.bounced, .delivery-event-pill.complained { color: #94361d; background: #ffe9df; }
.delivery-event-pill.deferred { color: #7a5b16; background: #fff2cf; }
.delivery-event-pill.opened, .delivery-event-pill.clicked { color: #5546d9; background: #eeeaff; }
.report-total { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--serif); font-size: 22px; font-weight: 700; white-space: nowrap; }
.report-total small { margin-top: 2px; color: var(--muted); font-family: var(--sans); font-size: 9px; font-weight: 500; }
.conversion-funnel { display: grid; gap: 14px; }
.funnel-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 11px; }
.funnel-label strong { font-size: 12px; }
.funnel-track { height: 12px; overflow: hidden; border-radius: 20px; background: #f0eef5; }
.funnel-track i { display: block; height: 100%; border-radius: inherit; box-shadow: 0 2px 7px rgba(55,45,110,.18); transition: width .35s ease; }
.funnel-step small { display: block; margin-top: 5px; color: var(--faint); font-size: 9px; text-align: right; }
.trend-panel select { height: 35px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: 11px; font-weight: 700; }
.chart-summary { display: flex; align-items: baseline; gap: 9px; }
.chart-summary strong { font-family: var(--serif); font-size: 31px; }
.chart-summary span { color: var(--muted); font-size: 10px; }
.line-chart { height: 205px; margin-top: 8px; }
.line-chart svg { width: 100%; height: 175px; overflow: visible; }
.chart-grid-line { stroke: #e7e5ef; stroke-width: .5; }
.chart-line { fill: none; stroke: #7165ff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-dot { fill: white; stroke: #7165ff; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.chart-axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 9px; }
.report-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 18px; }
.report-campaign-row, .order-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 64px; border-top: 1px solid var(--line-soft); }
.campaign-rank { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: white; font-size: 11px; font-weight: 800; }
.report-campaign-row > span:nth-child(2), .order-row > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.report-campaign-row strong, .order-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.report-campaign-row small, .order-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.report-campaign-row b, .order-row b { font-family: var(--serif); font-size: 17px; }
.order-mark { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: #ddf7e9; color: #148656; font-size: 11px; font-weight: 800; }
.live-indicator { display: inline-flex; align-items: center; gap: 6px; color: #148656; font-size: 10px; font-weight: 700; }
.live-indicator::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c77a; box-shadow: 0 0 0 4px #e0f8eb; }
.comparison-panel { padding: 0; overflow: hidden; }
.comparison-panel > .report-panel-head { padding: 25px 25px 0; }
.report-table td:first-child strong, .report-table td:first-child small { display: block; }
.report-table td:first-child small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.report-table td:nth-last-child(-n+2) { color: #148656; }
.lower-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 20px; }
.campaign-list { overflow: hidden; }
.campaign-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(330px, 1.35fr) 80px 164px; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.campaign-row:last-child { border-bottom: 0; }
.campaign-name { display: flex; align-items: center; gap: 13px; min-width: 0; }
.campaign-thumb { width: 43px; height: 43px; border-radius: 9px; background: #e7e4db; display: grid; place-items: center; color: var(--green); flex: 0 0 auto; }
.campaign-name strong, .campaign-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.campaign-name small { color: var(--muted); margin-top: 3px; }
.campaign-metrics { min-width: 0; display: grid; grid-template-columns: repeat(6, minmax(50px, 1fr)); gap: 4px; padding: 8px; border: 1px solid var(--line-soft); border-radius: 13px; background: #faf9f4; }
.campaign-metrics span { min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 0 6px; border-right: 1px solid var(--line-soft); }
.campaign-metrics span:last-child { border-right: 0; }
.campaign-metrics strong { overflow: hidden; max-width: 100%; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.campaign-metrics small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.campaign-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; }
.campaign-row-actions .button { min-height: 36px; padding: 0 12px; }
.campaign-stat { text-align: right; }
.campaign-stat strong, .campaign-stat small { display: block; }
.campaign-stat small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.campaign-action { justify-self: end; }
.campaign-row-summary { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.campaign-row-summary .campaign-metrics { grid-column: 1 / -1; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.campaign-row-summary .campaign-metrics span { align-items: flex-start; }
.campaign-review-head .builder-title { gap: 14px; }
.campaign-review-layout { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 22px; padding: 22px 32px 38px; }
.campaign-review-summary { padding: 28px; align-self: start; }
.campaign-review-summary h2 { margin: 6px 0 12px; font-family: var(--serif); font-size: clamp(32px, 4vw, 48px); line-height: .98; letter-spacing: -.04em; }
.campaign-review-summary dl { display: grid; gap: 14px; margin: 24px 0; }
.campaign-review-summary dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.campaign-review-summary dd { margin: 4px 0 0; color: var(--ink); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.campaign-review-summary .campaign-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.campaign-review-summary .campaign-metrics span { align-items: flex-start; min-width: 0; }
.campaign-review-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.campaign-review-metrics span { padding: 16px; border-radius: 14px; background: var(--cream); }
.campaign-review-metrics strong { display: block; font-size: 24px; font-family: var(--serif); }
.campaign-review-metrics small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.campaign-review-preview { padding: 0; overflow: hidden; }
.campaign-review-preview-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.campaign-review-preview-head strong, .campaign-review-preview-head small { display: block; }
.campaign-review-preview-head small { color: var(--muted); font-size: 11px; }
.campaign-review-preview iframe { display: block; width: 100%; height: min(980px, calc(100vh - 220px)); min-height: 620px; border: 0; background: #fff; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 9px; border-radius: 20px; background: var(--green-pale); color: var(--green-dark); font-size: 11px; font-weight: 700; text-transform: capitalize; }
.status-badge.draft { background: #ebeae5; color: #656b67; }
.status-badge.simulated { background: #f4ead5; color: #8b642a; }
.activity-card { padding: 22px; }
.activity-list { display: grid; margin-top: 8px; }
.activity-item { display: grid; grid-template-columns: auto 1fr; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 31px; height: 31px; border-radius: 50%; background: #edf0eb; display: grid; place-items: center; color: var(--green); }
.activity-item p { margin: 0; font-size: 12px; line-height: 1.5; }
.activity-item small { color: var(--muted); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.search { position: relative; width: min(360px, 100%); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--muted); }
.search input { width: 100%; height: 42px; padding: 0 14px 0 39px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); outline: none; }
.search input:focus, input:focus, textarea:focus, select:focus { border-color: #83a395; box-shadow: 0 0 0 3px rgba(30,96,73,.09); outline: none; }
.table-card { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { height: 43px; padding: 0 20px; background: #f8f7f2; color: var(--muted); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .05em; }
.data-table td { padding: 16px 20px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tr:hover td { background: #fdfcf8; }
.contact-cell { display: flex; align-items: center; gap: 11px; }
.contact-record-link { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.contact-record-link:hover strong { color: var(--green); }
.contact-avatar { width: 34px; height: 34px; border-radius: 50%; background: #e2e9e3; color: var(--green); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.contact-avatar.large { width: 48px; height: 48px; flex: 0 0 auto; font-size: 14px; }
.contact-cell strong, .contact-cell small { display: block; }
.contact-cell small { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { display: inline-flex; padding: 4px 8px; border-radius: 12px; background: #eef0eb; color: #58635c; font-size: 11px; }
.tag-button { border: 0; cursor: pointer; font: inherit; }
.tag-button:hover { color: var(--green-dark); background: #e0eee6; }
.tag-manager { display: grid; gap: 14px; margin-bottom: 16px; padding: 18px; }
.tag-manager-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.tag-manager-head h2 { margin: 0 0 4px; font-size: 18px; }
.tag-manager-head p { margin: 0; color: var(--muted); font-size: 12px; }
.tag-manager-head > span { padding: 7px 10px; border-radius: 999px; color: var(--green-dark); background: #e4f1e9; font-size: 11px; font-weight: 800; white-space: nowrap; }
.tag-manager-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-manager-chip { display: inline-flex; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: #fbfcfa; }
.tag-manager-chip.active { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30,104,78,.1); }
.tag-manager-chip > button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px 7px 12px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.tag-manager-chip small { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; color: var(--green); background: #e9f3ee; font-size: 10px; font-weight: 800; }
.tag-manager-chip > span { display: inline-flex; border-left: 1px solid var(--line); }
.tag-manager-chip > span button { border: 0; padding: 0 9px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; cursor: pointer; }
.tag-manager-chip > span button:hover { color: var(--green-dark); background: #f0f5f1; }
.bulk-tag-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 11px 13px; border: 1px solid #cce3d5; border-radius: 13px; background: #edf7f1; }
.bulk-tag-bar span { margin-right: auto; color: var(--green-dark); font-size: 12px; }
.table-empty { padding: 50px; text-align: center; color: var(--muted); }

.composer-layout { display: grid; grid-template-columns: minmax(340px, .78fr) minmax(440px, 1.22fr); gap: 22px; align-items: start; }
.composer-panel { padding: 25px; }
.form-section { padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid var(--line-soft); }
.form-section:last-child { margin: 0; padding: 0; border: 0; }
.form-section h3 { margin-bottom: 15px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: grid; gap: 7px; margin-bottom: 13px; }
.field:last-child { margin-bottom: 0; }
.field label { font-size: 12px; font-weight: 600; }
.field .hint { color: var(--muted); font-size: 11px; font-weight: 400; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.field input, .field select { height: 41px; padding: 0 12px; }
.field textarea { min-height: 96px; padding: 11px 12px; resize: vertical; }
.domain-field-hint { margin: -4px 0 14px; color: var(--muted); font-size: 11px; }
.editor-tools { display: flex; gap: 4px; padding: 8px; border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; background: #f8f7f3; }
.editor-tools button { min-width: 31px; height: 30px; border: 0; border-radius: 6px; background: transparent; font-weight: 700; cursor: pointer; }
.editor-tools button:hover { background: #e9e9e3; }
.content-editor { min-height: 250px !important; border-radius: 0 0 9px 9px !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55; }
.preview-wrap { position: sticky; top: 28px; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.device-toggle { display: flex; padding: 3px; background: #e9e7e0; border-radius: 8px; }
.device-toggle button { border: 0; background: transparent; min-width: 34px; height: 29px; border-radius: 6px; cursor: pointer; }
.device-toggle button.active { background: white; box-shadow: 0 1px 5px rgba(0,0,0,.08); }
.email-shell { min-height: 660px; padding: 38px; background: #dfddd6; border-radius: 17px; display: grid; place-items: start center; transition: .2s ease; }
.email-shell.mobile .email-preview { max-width: 360px; }
.email-preview { width: 100%; max-width: 680px; min-height: 560px; background: white; box-shadow: 0 10px 38px rgba(36,42,38,.13); transition: max-width .2s ease; }
.email-meta { padding: 17px 22px; background: #f8f8f6; border-bottom: 1px solid #ecece8; font-size: 11px; color: #6c746e; }
.email-meta strong { color: var(--ink); }
.email-content { padding: 50px 52px; font-family: Arial, sans-serif; color: #222; line-height: 1.55; }
.email-content h1 { font-family: Georgia, serif; font-size: 37px; letter-spacing: -1px; }
.email-content img { max-width: 100%; }
.email-content a { color: #1e6049; text-decoration: underline; }
.recipient-count { padding: 12px 14px; border-radius: 9px; background: #edf4ef; color: var(--green-dark); font-size: 12px; }

.builder-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(250,249,245,.94); box-shadow: 0 10px 30px rgba(31,42,36,.06); }
.page.builder-page { max-width: none; padding: 22px 24px 38px; }
.builder-title, .builder-head-actions { min-width: 0; display: flex; align-items: center; gap: 10px; }
.builder-title { flex: 1 1 300px; max-width: 430px; }
.builder-head-actions { position: relative; flex: 0 1 auto; justify-content: flex-end; gap: 9px; }
.builder-action-group { display: inline-flex; align-items: center; gap: 6px; }
.builder-create-group, .builder-view-group, .builder-publish-group { flex-wrap: wrap; justify-content: flex-end; }
.builder-head-actions .button { min-height: 42px; padding: 9px 14px; font-size: 12px; line-height: 1.15; white-space: nowrap; }
.builder-head-actions .icon-button { width: 38px; height: 38px; }
.builder-head-actions .ai-button { min-width: 0; border-color: #d7cdfa; background: #f3efff; color: #5640a8; }
.builder-save-status { align-self: center; min-width: 104px; padding: 0 3px; color: var(--muted); font-size: 11px; text-align: right; white-space: nowrap; }
.builder-title > span { display: flex; flex-direction: column; min-width: 0; }
.builder-title small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.builder-title strong { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-size: 20px; }
.builder-head .icon-button:disabled { opacity: .38; cursor: default; }
.builder-tools-menu { position: relative; }
.builder-tools-menu summary { min-height: 42px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; display: grid; place-items: center; background: white; color: var(--green-dark); font-size: 12px; font-weight: 800; list-style: none; cursor: pointer; }
.builder-tools-menu summary::-webkit-details-marker { display: none; }
.builder-tools-menu[open] summary { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30,96,73,.08); }
.builder-tools-popover { position: absolute; z-index: 30; top: calc(100% + 10px); right: 0; width: min(360px, calc(100vw - 48px)); padding: 12px; border: 1px solid var(--line); border-radius: 15px; display: grid; gap: 10px; background: #fffdfa; box-shadow: 0 24px 55px rgba(25,35,29,.18); }
.builder-tools-section { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px; padding: 9px; border-radius: 11px; background: #f5f4ee; }
.builder-tools-section > span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.builder-tools-section .button, .builder-tools-section .context-help { width: 100%; min-height: 36px; padding: 8px 10px; background: white; font-size: 11px; }
.builder-tool-inline { display: flex; gap: 7px; }
.builder-tool-inline .icon-button { width: 38px; height: 38px; background: white; }
.visual-builder { position: relative; height: calc(100dvh - 154px); min-height: 660px; display: grid; grid-template-columns: minmax(236px, 15vw) minmax(430px, 1fr) minmax(320px, 23vw); border: 1px solid #d9dad4; border-radius: 16px; overflow: hidden; background: white; box-shadow: var(--shadow); transition: grid-template-columns .2s ease; }
.visual-builder.palette-collapsed { grid-template-columns: 0 minmax(430px, 1fr) minmax(320px, 23vw); }
.visual-builder.inspector-collapsed { grid-template-columns: minmax(236px, 15vw) minmax(430px, 1fr) 0; }
.visual-builder.palette-collapsed.inspector-collapsed { grid-template-columns: 0 minmax(0, 1fr) 0; }
.visual-builder.palette-collapsed .builder-palette,
.visual-builder.inspector-collapsed .builder-inspector { visibility: hidden; opacity: 0; pointer-events: none; }
.builder-panel-rail { position: absolute; z-index: 9; display: none; width: 34px; min-height: 110px; border: 1px solid var(--line); background: #fffdfa; color: var(--green); box-shadow: 0 8px 22px rgba(20,45,34,.12); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; writing-mode: vertical-rl; cursor: pointer; }
.builder-panel-rail-left { left: 0; top: 88px; border-radius: 0 10px 10px 0; }
.builder-panel-rail-right { right: 0; top: 88px; border-radius: 10px 0 0 10px; }
.visual-builder.palette-collapsed .builder-panel-rail-left,
.visual-builder.inspector-collapsed .builder-panel-rail-right { display: grid; place-items: center; }
.builder-palette, .builder-inspector { min-width: 0; background: #faf9f5; }
.builder-palette { border-right: 1px solid var(--line); overflow-y: auto; }
.builder-inspector { border-left: 1px solid var(--line); overflow-y: auto; }
.builder-panel-head { min-height: 67px; padding: 15px 16px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255,255,255,.82); }
.builder-palette-head { align-items: flex-start; }
.builder-palette-head > span { width: 100%; }
.builder-panel-head > span { display: flex; flex-direction: column; }
.builder-panel-head strong { font-size: 14px; }
.builder-panel-head small, .builder-panel-head > span:not(:has(strong)) { color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.25; }
.module-library { padding: 5px 0 10px; }
.module-library section + section { border-top: 1px solid var(--line-soft); }
.module-library h3 { margin: 0; padding: 12px 11px 2px; color: var(--muted); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 9px 12px 12px; }
.builder-palette-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px; border-bottom: 1px solid var(--line-soft); background: #f4f3ef; }
.builder-palette-tabs button { min-width: 0; padding: 9px 5px; overflow: hidden; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.builder-palette-tabs button.active { color: var(--green); background: white; box-shadow: 0 1px 5px rgba(25,58,42,.08); }
.builder-palette-body { min-height: 190px; }
.saved-section-list, .builder-outline { display: grid; gap: 7px; padding: 10px; }
.saved-section-card, .builder-outline button { min-width: 0; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.saved-section-card > span:first-child, .builder-outline button > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--green); background: #edf3ef; }
.saved-section-card > span:nth-child(2), .builder-outline button > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.saved-section-card strong, .builder-outline strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.saved-section-card small, .builder-outline small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8px; }
.saved-section-card b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--muted); font-size: 15px; }
.saved-section-card b:hover { color: #a33; background: #f8e9e6; }
.builder-outline button { grid-template-columns: 30px minmax(0,1fr); }
.builder-outline button.active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(30,96,73,.08); }
.palette-empty { padding: 28px 18px; color: var(--muted); text-align: center; }
.palette-empty strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 12px; }
.palette-empty p { margin: 0; font-size: 10px; line-height: 1.5; }
.module-tile { min-height: 78px; padding: 11px 7px; border: 1px solid #dedfd9; border-radius: 12px; background: white; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; cursor: grab; transition: .16s ease; }
.module-tile:hover { border-color: #94aa9e; box-shadow: 0 5px 15px rgba(31,64,47,.08); transform: translateY(-1px); }
.module-tile:active { cursor: grabbing; }
.module-tile span { width: 29px; height: 29px; border-radius: 8px; background: #edf1ec; color: var(--green); display: grid; place-items: center; font-family: Georgia, serif; font-size: 17px; }
.module-tile strong { font-size: 11px; line-height: 1.15; text-align: center; }
.builder-layout-list { display: grid; gap: 8px; padding: 10px; }
.builder-layout-card { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) 22px; gap: 10px; align-items: center; padding: 12px 10px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); text-align: left; cursor: pointer; }
.builder-layout-card:hover { border-color: #94aa9e; box-shadow: 0 5px 15px rgba(31,64,47,.08); }
.builder-layout-card > span:first-child { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--green); background: #edf3ef; font-family: var(--serif); font-weight: 700; }
.builder-layout-card > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.builder-layout-card strong { font-size: 10px; }
.builder-layout-card small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.builder-layout-card b { color: var(--green); font-size: 17px; }
.builder-panel-section { padding: 14px; border-top: 1px solid var(--line-soft); }
.builder-global-button { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: white; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.builder-global-button + .builder-global-button { margin-top: 8px; }
.builder-global-button.active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(30,96,73,.08); }
.builder-global-button > span:first-child { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #edf1ec; color: var(--green); }
.builder-global-button > span:nth-child(2) { display: flex; flex-direction: column; }
.builder-global-button strong { font-size: 11px; }
.builder-global-button small { color: var(--muted); font-size: 9px; }
.builder-tip { margin: 0 14px 14px; padding: 12px; border-radius: 9px; background: #f0eee7; color: var(--muted); font-size: 10px; line-height: 1.45; }
.builder-tip strong { display: block; color: var(--ink); margin-bottom: 4px; }
.builder-tip p { margin: 0; }
.builder-tip code { color: var(--green-dark); }
.builder-workspace { min-width: 0; display: flex; flex-direction: column; background: #e7e7e2; overflow: hidden; }
.builder-toolbar { min-height: 74px; padding: 12px 20px; border-bottom: 1px solid #d2d3ce; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #f6f5f1; }
.builder-toolbar > span { min-width: 0; display: flex; flex-direction: column; }
.builder-toolbar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.builder-toolbar small { color: var(--muted); font-size: 10px; }
.builder-preview-controls { min-width: 0; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.builder-preview-controls select { height: 38px; width: min(220px, 32vw); padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 11px; }
.builder-selection-bar { min-height: 48px; padding: 8px 16px; border-bottom: 1px solid #d8d9d3; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(250,249,245,.94); }
.builder-selection-bar.empty { color: var(--muted); font-size: 11px; }
.builder-selection-bar > span { min-width: 0; display: flex; flex-direction: column; }
.builder-selection-bar strong { font-size: 12px; }
.builder-selection-bar small { max-width: 300px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.builder-selection-bar > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.builder-selection-bar button { min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--green-dark); font-size: 10px; font-weight: 800; cursor: pointer; }
.builder-selection-bar button:hover { border-color: #93ad9f; box-shadow: 0 4px 12px rgba(31,64,47,.08); }
.builder-canvas-wrap { flex: 1; overflow: auto; padding: 32px clamp(18px, 3vw, 42px) 80px; }
.builder-canvas { min-height: 100%; display: flex; justify-content: center; align-items: flex-start; transition: .2s ease; }
.builder-email { max-width: 100%; min-height: 420px; box-shadow: 0 10px 35px rgba(35,45,39,.14); transition: width .2s ease, border-radius .2s ease; }
.builder-canvas.mobile .builder-email { width: 360px !important; }
.builder-canvas.mobile .sp-columns, .builder-canvas.mobile .sp-column { display: block !important; width: 100% !important; box-sizing: border-box; }
.builder-canvas.mobile .sp-column { padding-left: 0 !important; padding-right: 0 !important; }
.builder-canvas.mobile .sp-column + .sp-column { padding-top: 20px !important; }
.builder-canvas.mobile .sp-image { width: 100% !important; height: auto !important; }
.builder-canvas.dark-preview { padding: 22px; border-radius: 12px; background: #1d2420 !important; }
.builder-canvas.dark-preview .builder-email { filter: brightness(.78) contrast(1.12); box-shadow: 0 10px 35px rgba(0,0,0,.38); }
.builder-block { position: relative; cursor: pointer; outline: 0 solid transparent; transition: outline .1s ease; }
.builder-block:hover { outline: 1px solid #77a08d; z-index: 2; }
.builder-block.selected { outline: 2px solid var(--green); z-index: 3; }
.builder-block-hidden { opacity: .35; filter: grayscale(.5); }
.builder-block-hidden::after { content: "Hidden on this device"; position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; color: #174f3b; background: rgba(238,246,241,.72); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; pointer-events: none; }
.builder-block-preview { pointer-events: none; overflow: hidden; }
.builder-block-actions { position: absolute; z-index: 4; right: 12px; top: 0; display: none; flex-wrap: wrap; max-width: calc(100% - 24px); padding: 6px; border-radius: 12px; background: var(--green); box-shadow: 0 10px 24px rgba(0,0,0,.18); transform: translateY(calc(-100% - 8px)); }
.builder-block:hover:not(.selected) .builder-block-actions { display: flex; }
.builder-block-actions button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: white; font-size: 14px; cursor: pointer; }
.builder-block-actions button:hover { background: rgba(255,255,255,.17); }
.builder-drop-zone { height: 8px; position: relative; z-index: 5; margin: -4px 0; transition: height .14s ease; }
.builder-drop-zone span { display: none; }
.builder-drop-zone.active { height: 35px; margin: 0; border: 2px dashed #4d8c70; background: #dff0e5; }
.builder-drop-zone.active span { height: 100%; display: grid; place-items: center; color: var(--green); font-size: 10px; font-weight: 700; }
.builder-empty-drop { min-height: 380px; display: grid; place-items: center; align-content: center; gap: 5px; border: 2px dashed #c8cec9; color: var(--muted); text-align: center; }
.builder-empty-drop strong { color: var(--ink); }
.builder-empty-drop span { max-width: 300px; padding: 0 18px; line-height: 1.5; }
.dynamic-hidden { min-height: 75px; padding: 18px; border: 2px dashed #d1b989; background: #fff9e9; display: grid; place-items: center; align-content: center; text-align: center; color: #80662f; }
.dynamic-hidden strong { font-size: 11px; }
.dynamic-hidden span { margin-top: 4px; font-size: 9px; }
.inspector-scroll { min-width: 0; padding: 16px; overflow-x: hidden; }
.inspector-empty { height: 100%; padding: 35px 24px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.inspector-empty > span { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #e8ece7; color: var(--green); font-size: 23px; }
.inspector-empty h3 { margin: 13px 0 5px; color: var(--ink); }
.inspector-empty p { line-height: 1.5; font-size: 11px; }
.builder-inspector-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); background: #f4f3ef; }
.builder-inspector-actions button { min-height: 34px; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--green-dark); font-size: 10px; font-weight: 800; cursor: pointer; }
.builder-inspector-actions button:hover { border-color: #93ad9f; box-shadow: 0 4px 12px rgba(31,64,47,.08); }
.builder-inspector-actions button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.inspector-field { min-width: 0; display: grid; gap: 6px; margin-bottom: 14px; }
.inspector-field > span:first-child { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 800; color: #59655e; }
.inspector-field output { color: var(--muted); font-weight: 500; }
.inspector-field input:not([type="color"]):not([type="range"]), .inspector-field textarea, .inspector-field select { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.inspector-field input:not([type="color"]):not([type="range"]), .inspector-field select { height: 42px; padding: 0 12px; font-size: 13px; }
.inspector-field textarea { min-height: 104px; padding: 11px 12px; resize: vertical; line-height: 1.45; font-size: 13px; }
.inspector-field textarea.inspector-code { min-height: 250px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.inspector-code-warning { margin-bottom: 14px; padding: 12px; border: 1px solid #e4c982; border-radius: 9px; background: #fff8e6; color: #72581d; }
.inspector-code-warning strong { font-size: 11px; }
.inspector-code-warning p { margin: 4px 0 0; font-size: 9px; line-height: 1.45; }
.inspector-field small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.color-field > span:last-child { display: grid; grid-template-columns: 42px 1fr; gap: 8px; }
.color-field input[type="color"] { width: 42px; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.number-input { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.number-input input { border-radius: 8px 0 0 8px !important; }
.number-input b { height: 42px; min-width: 38px; padding: 0 9px; border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; display: grid; place-items: center; background: #f0f0eb; color: var(--muted); font-size: 10px; }
.inspector-field input[type="range"] { width: 100%; accent-color: var(--green); }
.alignment-control { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; background: #e9e9e3; border-radius: 10px; }
.alignment-control button { height: 37px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.alignment-control button.active { background: white; color: var(--green); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.inspector-details { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.inspector-details summary { margin-bottom: 14px; font-size: 11px; font-weight: 700; cursor: pointer; }
.spacing-grid { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 9px; }
.inspector-transparent { font-size: 10px; }
.inspector-help { margin: -4px 0 13px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.panel-toggle.active { color: white; border-color: var(--green); background: var(--green); }
.field-grid.compact { gap: 8px; }
.template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.template-card { min-width: 0; overflow: hidden; }
.template-preview { position: relative; height: 350px; overflow: hidden; }
.template-preview::after { content: ""; position: absolute; inset: auto 0 0; height: 52px; background: linear-gradient(transparent, rgba(255,255,255,.22)); pointer-events: none; }
.template-preview iframe { position: absolute; top: 18px; left: 50%; width: 660px; height: 900px; overflow: hidden; border: 0; background: transparent; transform: translateX(-50%) scale(.43); transform-origin: top center; pointer-events: none; }
.media-field-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.media-field-row input { min-width: 0; }
.media-tabs { display: flex; gap: 5px; margin-bottom: 18px; padding: 4px; border-radius: 10px; background: #ecebe5; }
.media-tabs button { min-height: 36px; flex: 1; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.media-tabs button.active { background: white; color: var(--green); box-shadow: 0 2px 7px rgba(23,35,28,.08); }
.media-storage-status { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; padding: 13px 15px; border: 1px solid #cce3d5; border-radius: 12px; background: #edf7f1; }
.media-storage-status strong, .media-storage-status small { display: block; }
.media-storage-status small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.media-upload { min-height: 105px; padding: 18px; border: 2px dashed #b9c9be; border-radius: 13px; display: grid; place-items: center; align-content: center; gap: 4px; background: #f7faf7; cursor: pointer; text-align: center; }
.media-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.media-upload svg { width: 22px; color: var(--green); }
.media-upload small, .media-card small { color: var(--muted); font-size: 10px; }
.media-upload-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.media-upload-meta input { min-width: 0; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 14px; max-height: 420px; overflow-y: auto; }
.media-card { min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); cursor: pointer; text-align: left; }
.media-card:hover { border-color: #81a391; box-shadow: 0 5px 16px rgba(31,64,47,.09); }
.media-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #ecece6; }
.media-card > span { min-width: 0; display: flex; flex-direction: column; padding: 9px 10px; }
.media-card strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.media-card em { overflow: hidden; margin-top: 3px; color: var(--green); font-size: 9px; font-style: normal; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.media-empty { grid-column: 1 / -1; padding: 42px 18px; border-radius: 11px; background: #f4f3ee; color: var(--muted); text-align: center; }
.media-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.media-search input { min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; }
.pexels-credit { margin: 13px 0 0; color: var(--muted); font-size: 10px; text-align: right; }
.pexels-credit a { color: var(--green); font-weight: 700; }
.template-info { padding: 22px; }
.template-category { display: inline-flex; margin-bottom: 9px; padding: 5px 8px; border-radius: 999px; background: #edf2ee; color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.template-info h3 { margin-bottom: 6px; font-family: var(--serif); font-size: 23px; }
.template-info .page-subtitle { min-height: 44px; }
.template-info .button { margin-top: 15px; }
.audience-tabs { display: flex; gap: 5px; margin: -12px 0 24px; padding: 4px; width: fit-content; background: #e9e7e0; border-radius: 10px; }
.audience-tabs button { min-height: 35px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-weight: 600; color: var(--muted); }
.audience-tabs button.active { background: white; color: var(--green); box-shadow: 0 1px 5px rgba(0,0,0,.08); }
.audience-tabs span { margin-left: 5px; color: var(--faint); font-size: 10px; }
.segment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.segment-grid .empty-card { grid-column: 1 / -1; }
.segment-card { padding: 21px; }
.segment-card > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.segment-icon { width: 37px; height: 37px; border-radius: 10px; display: grid; place-items: center; background: #e6eee8; color: var(--green); }
.segment-icon svg { width: 18px; }
.segment-card h3 { margin: 17px 0 5px; font-family: var(--serif); font-size: 22px; }
.segment-card > p { color: var(--muted); font-size: 11px; }
.segment-rule-summary { min-height: 67px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 5px; margin: 15px 0; }
.segment-rule-summary span { padding: 5px 7px; border-radius: 6px; background: #f0f0eb; color: #5e6962; font-size: 9px; }
.segment-match-row { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: var(--muted); font-size: 12px; }
.segment-match-row select { height: 35px; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 0 9px; }
.segment-ai-intro { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 2px 0 14px; padding: 13px 14px; border: 1px solid #d8e4dc; border-radius: 12px; background: #f8fbf7; }
.segment-ai-intro strong,
.segment-ai-intro small { display: block; }
.segment-ai-intro small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.segment-activity-builder { display: grid; gap: 11px; margin: -4px 0 15px; padding: 14px; border: 1px solid #cfe0d6; border-radius: 14px; background: #f6fbf8; box-shadow: inset 0 0 0 1px rgba(30,96,73,.03); }
.segment-activity-builder strong,
.segment-activity-builder small { display: block; }
.segment-activity-builder strong { color: var(--green); font-size: 14px; }
.segment-activity-builder small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.segment-activity-controls { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(140px, .7fr) auto; gap: 8px; align-items: center; }
.segment-activity-controls select { min-width: 0; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 0 9px; }
.segment-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.segment-rule { display: grid; grid-template-columns: minmax(170px, 1.25fr) minmax(145px, 1fr) minmax(150px, 1fr) auto; gap: 7px; margin-bottom: 8px; }
.segment-rule input, .segment-rule select { min-width: 0; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 0 9px; }
.segment-preview-count { margin-top: 17px; padding: 12px; border-radius: 9px; background: #edf4ef; color: var(--green-dark); font-size: 12px; font-weight: 600; }
.custom-fields-editor { margin: 15px 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.custom-fields-editor summary { cursor: pointer; font-weight: 600; font-size: 12px; margin-bottom: 12px; }
.custom-field-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; margin-bottom: 7px; }
.custom-field-row input { min-width: 0; height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; }
.contact-record-modal { width: min(1380px, calc(100vw - 40px)); max-width: 1380px; max-height: calc(100dvh - 40px); padding: 0; overflow-x: hidden; overflow-y: auto; }
.contact-record-head { padding: 30px 36px; border-bottom: 1px solid var(--line-soft); }
.contact-record-identity { min-width: 0; display: flex; align-items: center; gap: 13px; }
.contact-record-identity > span:last-child { min-width: 0; }
.contact-record-identity h2 { margin: 0 0 5px; overflow: hidden; font-size: 34px; text-overflow: ellipsis; white-space: nowrap; }
.contact-record-identity p { margin: 0; color: var(--muted); font-size: 15px; }
.contact-record-summary { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line-soft); background: #faf9f5; }
.contact-record-summary span { min-width: 0; padding: 21px 28px; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; }
.contact-record-summary span:last-child { border-right: 0; }
.contact-record-summary b { font-family: var(--serif); font-size: 28px; }
.contact-record-summary small { margin-top: 3px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.contact-record-layout { min-height: 0; display: grid; grid-template-columns: minmax(540px, 1.05fr) minmax(520px, .95fr); }
.contact-profile-panel, .contact-history-panel { min-width: 0; padding: 30px 36px 36px; }
.contact-profile-panel { border-right: 1px solid var(--line-soft); }
.contact-section-head { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.contact-section-head > span { display: flex; flex-direction: column; }
.contact-section-head strong { font-size: 19px; }
.contact-section-head small { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.contact-profile-panel .field { margin-bottom: 18px; }
.contact-profile-panel .field label { margin-bottom: 8px; font-size: 14px; }
.contact-profile-panel .field input,
.contact-profile-panel .field select { min-width: 0; height: 50px; padding: 0 14px; font-size: 16px; }
.contact-profile-panel .field small { font-size: 12px; }
.contact-profile-panel .field-grid { gap: 16px; }
.contact-profile-panel .custom-fields-editor { margin: 22px 0; padding: 18px; border-radius: 12px; }
.contact-profile-panel .custom-fields-editor summary { font-size: 14px; }
.contact-profile-panel .custom-field-row { grid-template-columns: minmax(140px, .9fr) minmax(180px, 1.1fr) 46px; gap: 10px; margin-bottom: 10px; }
.contact-profile-panel .custom-field-row input { height: 46px; padding: 0 12px; font-size: 14px; }
.contact-profile-panel .button,
.contact-history-panel .button { min-height: 46px; padding-inline: 18px; font-size: 14px; }
.contact-profile-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.contact-verification-picker { display: grid; gap: 7px; margin: -6px 0 18px; }
.contact-verification-picker label { font-size: 14px; font-weight: 800; color: var(--ink); }
.contact-verification-picker small,
.import-provider-field small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.contact-verification-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin: 0; }
.contact-verification-row select { min-width: 0; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); font-size: 14px; }
.import-provider-field { margin: -4px 0 12px 30px; display: grid; gap: 7px; }
.import-provider-field select { height: 44px; }
.contact-note-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-bottom: 18px; }
.contact-note-form textarea { min-height: 90px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; resize: vertical; font-size: 15px; line-height: 1.45; }
.contact-note-form .button { align-self: end; }
.contact-event-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.contact-event-filters button { min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.contact-event-filters button.active { border-color: var(--green); background: var(--green); color: white; }
.contact-timeline { display: grid; }
.contact-event { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.contact-event:last-child { border-bottom: 0; }
.contact-event-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #edf1ed; color: var(--green); font-size: 12px; font-weight: 800; }
.contact-event-icon.campaign { background: #e7edff; color: #3f61b5; }
.contact-event-icon.automation { background: #eee9ff; color: #684fd0; }
.contact-event-icon.commerce { background: #e0f5e8; color: #16734c; }
.contact-event-icon.note { background: #fff0d9; color: #8b5c1e; }
.contact-event-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.contact-event-title strong { font-size: 14px; }
.contact-event-title time { flex: 0 0 auto; color: var(--faint); font-size: 11px; }
.contact-event p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.contact-event-meta { display: block; margin-top: 4px; color: var(--faint); font-size: 10px; line-height: 1.35; word-break: break-word; }
.contact-event a { display: inline-block; margin-top: 6px; color: var(--green); font-size: 12px; font-weight: 700; }
.contact-timeline-empty { padding: 48px 12px; color: var(--muted); font-size: 15px; text-align: center; }
.import-option { display: flex; align-items: center; gap: 9px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.personalization-example { padding: 16px; margin-bottom: 17px; border-radius: 10px; background: #eef3ee; }
.personalization-example strong, .personalization-example code, .personalization-example p { display: block; }
.personalization-example code { margin: 9px 0; color: var(--green-dark); font-size: 15px; }
.personalization-example p { margin: 0; color: var(--muted); font-size: 11px; }
.merge-tag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 17px; }
.merge-tag { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: white; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; text-align: left; }
.merge-tag:hover { border-color: #92aa9e; }
.merge-tag span { font-weight: 600; font-size: 11px; text-transform: capitalize; }
.merge-tag code { color: var(--green); font-size: 9px; }
.automation-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.automation-list { overflow: hidden; }
.automation-list-row { min-height: 78px; padding: 15px 20px; display: grid; grid-template-columns: auto 1fr 110px 90px auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line-soft); }
.automation-list-row:last-child { border-bottom: 0; }
.automation-list-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: #e3eee7; color: var(--green); }
.automation-list-icon svg { width: 21px; }
.automation-list-row > span:nth-child(2), .automation-list-stat { display: flex; flex-direction: column; }
.automation-list-row small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.automation-list-stat { text-align: right; }
.automation-outcome-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.automation-outcome-chips i { padding: 4px 7px; border-radius: 20px; background: #edf1ed; color: #59675e; font-size: 9px; font-style: normal; }
.automation-outcome-chips i.success { background: #ddf3e6; color: #176b49; }
.automation-outcome-chips i.warning { background: #fff0dc; color: #8a5919; }
.automation-outcome-chips b { font-size: 10px; }
.automation-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.automation-builder { height: calc(100vh - 150px); min-height: 700px; display: grid; grid-template-columns: minmax(600px, 1fr) 280px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #f1f2ef; box-shadow: var(--shadow); }
.automation-canvas { min-width: 0; overflow: auto; padding: 42px 50px 100px; background-color: #eff0ed; background-image: radial-gradient(#cfd4cf 1px, transparent 1px); background-size: 20px 20px; }
.automation-palette { border-left: 1px solid var(--line); background: #fbfaf6; overflow-y: auto; }
.automation-flow { min-width: 620px; width: fit-content; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.flow-trigger, .flow-node { width: 300px; min-height: 66px; padding: 12px 15px; border: 1px solid #d8dcd8; border-radius: 11px; background: white; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; text-align: left; box-shadow: 0 4px 14px rgba(30,44,36,.07); cursor: pointer; position: relative; z-index: 2; }
.flow-trigger { border-top: 3px solid #60a979; }
.flow-trigger > span:first-child, .flow-node-icon { width: 35px; height: 35px; border-radius: 9px; display: grid; place-items: center; background: #e5f2e9; color: var(--green); font-size: 18px; }
.flow-node-condition .flow-node-icon, .flow-node-split .flow-node-icon,
.automation-palette-condition > span:first-child, .automation-palette-split > span:first-child { background: #e9e5fb; color: #6357b5; }
.flow-node-delay .flow-node-icon, .automation-palette-delay > span:first-child { background: #fff0d5; color: #9b651c; }
.flow-node-email .flow-node-icon, .automation-palette-email > span:first-child { background: #dff1ff; color: #26719b; }
.flow-node-tag .flow-node-icon, .automation-palette-tag > span:first-child { background: #e3f3e7; color: #24704a; }
.flow-node-webhook .flow-node-icon, .automation-palette-webhook > span:first-child { background: #f2e5f5; color: #814b8e; }
.flow-node-jump .flow-node-icon, .automation-palette-jump > span:first-child { background: #fde7e2; color: #a24f3d; }
.flow-node-exit .flow-node-icon, .automation-palette-exit > span:first-child { background: #eceeed; color: #59625c; }
.flow-trigger > span:nth-child(2), .flow-node > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.flow-trigger small, .flow-node small { color: var(--muted); font-size: 10px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-trigger strong, .flow-node strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-trigger b, .flow-node b { color: var(--faint); }
.flow-node:hover, .flow-node.selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(30,96,73,.08), 0 5px 17px rgba(30,44,36,.08); }
.flow-line { width: 2px; height: 34px; background: #9ba59e; }
.flow-add { width: 29px; height: 29px; flex: 0 0 auto; border: 2px solid #82a491; border-radius: 50%; background: white; color: var(--green); font-size: 19px; line-height: 1; cursor: pointer; position: relative; z-index: 3; transition: .15s ease; }
.flow-add:hover, .flow-add.dragging { transform: scale(1.12); background: var(--green); color: white; }
.flow-branch-wrap { display: flex; flex-direction: column; align-items: center; }
.flow-branch-labels { width: 482px; height: 35px; display: flex; justify-content: space-between; align-items: end; position: relative; }
.flow-branch-labels::before { content: ""; position: absolute; left: 70px; right: 70px; bottom: 9px; height: 25px; border-left: 2px solid #9ba59e; border-right: 2px solid #9ba59e; border-top: 2px solid #9ba59e; border-radius: 45% 45% 0 0; }
.flow-branch-labels span { z-index: 1; min-width: 56px; padding: 3px 7px; border-radius: 12px; background: #dcebdc; color: #3d6f4d; font-size: 9px; font-weight: 700; text-align: center; }
.flow-branch-labels span:last-child { background: #f4ddd3; color: #8b5541; }
.flow-branches { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; align-items: start; }
.flow-branch { min-width: 300px; display: flex; flex-direction: column; align-items: center; }
.automation-palette-section { padding: 15px; border-bottom: 1px solid var(--line-soft); }
.automation-palette-section h3 { margin: 0 0 9px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.automation-palette-item { width: 100%; min-height: 58px; margin-bottom: 7px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; text-align: left; cursor: grab; }
.automation-palette-item:hover { border-color: #8ca598; box-shadow: 0 3px 11px rgba(30,60,44,.07); }
.automation-palette-item > span:first-child { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: #edf1ed; color: var(--green); }
.automation-palette-item > span:last-child { display: flex; flex-direction: column; }
.automation-palette-item strong { font-size: 11px; }
.automation-palette-item small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.automation-help { margin: 15px; padding: 13px; border-radius: 9px; background: #efeee8; font-size: 10px; color: var(--muted); }
.automation-help strong, .automation-help code { display: block; }
.automation-help code { margin: 6px 0; color: var(--green-dark); }
.automation-help p { margin: 0; line-height: 1.45; }
.automation-chooser { display: grid; gap: 8px; }
.automation-chooser button { width: 100%; min-height: 60px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; text-align: left; cursor: pointer; }
.automation-chooser button:hover { border-color: var(--green); }
.automation-chooser button > span:first-child { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #e8efe9; color: var(--green); }
.automation-chooser button > span:nth-child(2) { display: flex; flex-direction: column; }
.automation-chooser small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.modal-note { color: var(--muted); font-size: 11px; line-height: 1.5; }
.automation-run-log { display: grid; }
.automation-run-log > div { min-height: 58px; padding: 10px 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px; border-bottom: 1px solid var(--line-soft); }
.automation-run-log > div > span:first-child { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #e7eee8; color: var(--green); }
.automation-run-log > div > span:last-child { display: flex; flex-direction: column; }
.automation-run-log small { color: var(--muted); margin-top: 3px; font-size: 10px; }
.attribution-explainer { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 16px; margin: 0 0 22px; padding: 15px 18px; border: 1px solid #d9e4dc; border-radius: 13px; background: #f4faf6; color: var(--muted); font-size: 11px; }
.attribution-explainer > span:first-child { min-width: 250px; flex: 1; display: flex; flex-direction: column; }
.attribution-explainer strong { margin-bottom: 3px; color: var(--ink); font-size: 12px; }
.attribution-explainer b { color: var(--green); }
.nav-help { width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: flex; align-items: center; gap: 11px; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.nav-help:hover { color: var(--green); background: var(--green-pale); }
.nav-help span { width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }
.context-help-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.context-help { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--paper); font-size: 11px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.context-help > span { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; }
.context-help:hover { border-color: var(--green); color: var(--green); background: var(--green-pale); }
.builder-panel-head .context-help { flex: 0 0 auto; min-height: 32px; padding: 6px 8px; }
.help-kicker { display: inline-block; margin-bottom: 6px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.help-quick-links { display: grid; gap: 8px; margin: 22px 0; }
.help-quick-links button { min-height: 54px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; color: var(--ink); text-align: left; cursor: pointer; }
.help-quick-links button:hover { border-color: var(--green); }
.help-quick-links span { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--green); background: var(--green-pale); font-weight: 800; }
.help-topic-grid { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.help-topic-grid button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 20px; background: transparent; color: var(--muted); cursor: pointer; }
.help-topic-grid button.active, .help-topic-grid button:hover { border-color: var(--green); color: var(--green); background: var(--green-pale); }
.help-support { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding: 15px; border-radius: 11px; background: #f1f3ef; }
.help-support span { display: flex; flex-direction: column; }
.help-support small { margin-top: 3px; color: var(--muted); }

.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan-card { padding: 25px; position: relative; }
.plan-card.featured { border: 2px solid var(--green); }
.plan-card .popular { position: absolute; top: 0; right: 22px; transform: translateY(-50%); padding: 5px 9px; background: var(--green); color: white; border-radius: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.plan-card h3 { font-family: var(--serif); font-size: 25px; }
.plan-price { margin: 20px 0; font-family: var(--serif); font-size: 37px; }
.plan-price small { font-family: var(--sans); color: var(--muted); font-size: 12px; }
.plan-card ul { padding: 0; margin: 22px 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: 12px; }
.plan-card li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 8px; }
.usage-card { padding: 27px; margin-bottom: 30px; display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; }
.usage-card .progress { height: 8px; margin-top: 14px; }
.usage-number { font-family: var(--serif); font-size: 30px; text-align: right; }
.usage-number small { display: block; font-family: var(--sans); font-size: 11px; color: var(--muted); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(16,28,21,.48); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; animation: fade .15s ease; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 28px; background: var(--paper); border-radius: 18px; box-shadow: var(--shadow); animation: rise .2s ease; }
.modal.wide { width: min(720px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.modal-head h2 { margin: 0 0 4px; }
.modal-head p { color: var(--muted); margin: 0; }
.close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #efeee8; cursor: pointer; font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.dropzone { min-height: 190px; border: 1.5px dashed #b8c1ba; border-radius: 12px; background: #f9f8f4; display: grid; place-items: center; text-align: center; padding: 30px; cursor: pointer; }
.dropzone.dragging { background: #edf5ef; border-color: var(--green); }
.dropzone input { display: none; }
.dropzone strong { display: block; margin: 10px 0 4px; }
.dropzone p { color: var(--muted); margin: 0; font-size: 12px; }
.send-confirm { padding: 15px; background: #f1f3ed; border-radius: 10px; margin-bottom: 18px; }
.send-confirm strong { display: block; margin-bottom: 4px; }
.send-confirm p { margin: 0; color: var(--muted); font-size: 12px; }
.experiment-active { border-color: #7359c8; background: #f1edff; color: #5d43ad; }
.send-time-active { border-color: #157a73; background: #e5f5f1; color: #12645f; }
.experiment-modal, .experiment-report-modal { width: min(1180px, calc(100vw - 32px)); max-width: 1180px; }
.experiment-master { margin-bottom: 20px; padding: 17px; border: 1px solid #d8d0f0; border-radius: 13px; background: #f7f4ff; }
.experiment-setup-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.experiment-guidance { margin: 4px 0 22px; padding: 15px 17px; border-left: 4px solid #7359c8; border-radius: 0 11px 11px 0; background: #f5f2fb; }
.experiment-guidance strong { display: block; margin-bottom: 4px; }
.experiment-guidance p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.help-tip { position: relative; display: inline-grid; width: 17px; height: 17px; place-items: center; margin-left: 5px; border: 1px solid #aebbb3; border-radius: 50%; color: var(--green); background: var(--paper); font-size: 10px; font-weight: 900; line-height: 1; vertical-align: 1px; cursor: help; }
.help-tip::after { content: attr(data-tooltip); position: absolute; z-index: 240; bottom: calc(100% + 9px); left: 50%; width: min(270px, calc(100vw - 38px)); padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--paper); box-shadow: var(--shadow); font-size: 11px; font-weight: 500; line-height: 1.45; text-align: left; opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .15s ease, transform .15s ease; }
.help-tip:hover::after, .help-tip:focus::after, .help-tip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.experiment-help-link { display: inline-flex; margin: -5px 0 18px; padding: 0; border: 0; color: var(--green); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.experiment-help-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.experiment-section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 24px 0 13px; }
.experiment-section-head h3, .experiment-section-head p { margin: 0; }
.experiment-section-head p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.experiment-variants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.experiment-variant-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfaf7; }
.experiment-variant-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: start; }
.experiment-variant-head .field { margin: 0; }
.experiment-letter { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; background: #e9e3fb; color: #5d43ad; font-weight: 900; }
.variant-creative-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 10px; background: #eeeee8; }
.variant-creative-note > span { display: flex; flex-direction: column; min-width: 0; }
.variant-creative-note small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.experiment-send-summary { border: 1px solid #d8d0f0; background: #f7f4ff; }
.experiment-readiness { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, auto); gap: 13px; align-items: center; margin-bottom: 18px; padding: 16px 18px; border-radius: 13px; background: #edf4ef; }
.experiment-readiness > span:first-child { display: flex; flex-direction: column; }
.experiment-readiness small { margin-top: 3px; color: var(--muted); }
.experiment-readiness b { color: var(--green); }
.experiment-readiness .help-tip::after { right: -8px; left: auto; transform: translateY(4px); }
.experiment-readiness .help-tip:hover::after, .experiment-readiness .help-tip:focus::after, .experiment-readiness .help-tip:focus-visible::after { transform: translateY(0); }
.experiment-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.experiment-result-card { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.experiment-result-card.leader { border-color: #7359c8; box-shadow: 0 10px 28px rgba(93,67,173,.11); }
.experiment-result-card > div:first-child { display: flex; align-items: center; gap: 10px; }
.experiment-result-card > div:first-child > span:nth-child(2) { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.experiment-result-card > div:first-child small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.experiment-primary-metric { display: block; margin-top: 18px; font-family: var(--serif); font-size: 32px; }
.experiment-result-card > small { color: var(--muted); }
.experiment-result-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 17px 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--line-soft); }
.experiment-result-card dl div { padding: 10px; background: var(--paper); }
.experiment-result-card dt { color: var(--muted); font-size: 9px; }
.experiment-result-card dd { margin: 3px 0 0; font-weight: 800; }
.experiment-result-card .button { width: 100%; }
.campaign-advanced { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #faf9f5; }
.campaign-advanced summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.campaign-advanced > p { margin: 8px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.audience-picker-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.audience-picker-row .field { margin: 0; }
.audience-helper-panel { display: grid; gap: 12px; margin: 12px 0 14px; padding: 16px; border: 1px solid #d8e4dc; border-radius: 14px; background: #f3faf6; }
.audience-helper-panel[hidden] { display: none; }
.audience-helper-panel strong { display: block; color: var(--ink); }
.audience-helper-panel p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.audience-helper-panel textarea { min-height: 96px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; resize: vertical; font: inherit; line-height: 1.45; }
.audience-helper-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.audience-helper-actions span { color: var(--muted); font-size: 12px; }
.audience-helper-actions strong { display: inline; color: var(--green); }
.send-time-settings { border-color: #b8dcd4; background: #f3faf8; }
.send-time-note { padding: 11px 13px; border-radius: 9px; background: #e3f0ed; color: #315d55; font-size: 11px; line-height: 1.5; }
.schedule-send-summary { border: 1px solid #d3c7ff; background: #f3efff; }
.send-time-send-summary { border: 1px solid #b8dcd4; background: #edf8f5; }
.crm-sync-panel { display: grid; gap: 14px; margin-top: 16px; padding: 18px; border: 1px solid #cfe2dc; border-radius: 16px; background: #f3faf7; }
.crm-sync-panel h3, .crm-sync-panel p { margin: 0; }
.crm-sync-panel p, .crm-sync-panel small { color: var(--muted); line-height: 1.5; }
.crm-sync-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.send-time-report-modal { width: min(1040px, calc(100vw - 32px)); max-width: 1040px; }
.send-time-hero { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.send-time-hero > span { padding: 18px; background: var(--paper); }
.send-time-hero small, .send-time-hero p { color: var(--muted); }
.send-time-hero small { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.send-time-hero strong { display: block; margin-top: 5px; font-family: var(--serif); font-size: 28px; }
.send-time-hero p { margin: 5px 0 0; font-size: 11px; }
.send-time-source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.send-time-source-grid article { position: relative; min-width: 0; padding: 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.send-time-source-grid article > strong { display: block; padding-right: 16px; }
.send-time-source-grid article > b { display: block; margin: 12px 0 3px; font-family: var(--serif); font-size: 29px; }
.send-time-source-grid article p, .send-time-source-grid article small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.send-time-source-grid article p { min-height: 42px; margin: 0 0 8px; }
.send-time-source { position: absolute; top: 18px; right: 17px; width: 10px; height: 10px; border-radius: 50%; background: #147c72; }
.send-time-source.audience { background: #7c67cf; }
.send-time-source.fallback { background: #cf8b38; }
.send-time-distribution { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #faf9f6; }
.send-time-distribution h3, .send-time-distribution p { margin: 0; }
.send-time-distribution p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.send-time-bars { display: flex; align-items: end; gap: 8px; height: 190px; margin-top: 18px; padding-top: 10px; overflow-x: auto; }
.send-time-bars > span { display: grid; flex: 1 0 46px; grid-template-rows: minmax(0, 1fr) auto auto; align-items: end; height: 100%; text-align: center; }
.send-time-bars i { display: block; width: min(32px, 72%); min-height: 8px; margin: auto auto 7px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #24a390, #17634f); }
.send-time-bars b { font-size: 9px; white-space: nowrap; }
.send-time-bars small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.send-time-guidance { margin-top: 16px; padding: 14px 16px; border-left: 4px solid #157a73; border-radius: 0 10px 10px 0; background: #eef7f4; }
.send-time-guidance strong { display: block; margin-bottom: 3px; }
.send-time-guidance p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.toggle-row { margin-bottom: 15px; padding: 12px; display: flex; align-items: flex-start; gap: 10px; border-radius: 10px; background: #eef3ef; }
.toggle-row input { margin-top: 3px; accent-color: var(--green); }
.toggle-row span { display: flex; flex-direction: column; }
.toggle-row small { margin-top: 2px; color: var(--muted); }
.theme-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.audit-summary { padding: 14px; border-radius: 10px; }
.audit-summary.warning { background: #fff3d9; color: #805b18; }
.audit-summary.ready { background: #e2f4e9; color: #176a48; }
.audit-list { display: grid; margin-top: 12px; }
.audit-list > div { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.audit-list span { font-weight: 800; color: var(--green); }
.audit-list p { margin: 0; line-height: 1.45; }
.toast-root { position: fixed; z-index: 200; right: 24px; bottom: 24px; display: grid; gap: 9px; }
.toast { min-width: 280px; max-width: 390px; padding: 14px 17px; border-radius: 11px; background: var(--ink); color: white; box-shadow: var(--shadow); animation: rise .2s ease; }
.toast.error { background: #873e38; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.empty-card { padding: 65px 30px; text-align: center; }
.empty-icon { width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 16px; display: grid; place-items: center; background: #e7eee8; color: var(--green); }
.empty-icon svg { width: 28px; }
.empty-card p { max-width: 430px; margin: 0 auto 20px; color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 25px; }
.settings-nav { padding: 12px; align-self: start; }
.settings-nav button { width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.settings-nav button.active { background: #eef0eb; color: var(--green); font-weight: 600; }
.settings-panel { padding: 28px; }
.integration-status { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 12px; }
.integration-logo { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--green); color: white; font-weight: 700; }
.integration-status span:nth-child(2) { flex: 1; }
.integration-status strong, .integration-status small { display: block; }
.integration-status small { color: var(--muted); margin-top: 3px; }
.integration-connected-count { padding: 8px 12px; border-radius: 20px; background: #e5efe8; color: var(--green-dark); font-size: 11px; font-weight: 700; }
.integration-security-note { margin: -10px 0 22px; padding: 12px 15px; border: 1px solid #ead7a9; border-radius: 11px; background: #fff8e7; display: flex; align-items: center; gap: 12px; color: #715a24; }
.integration-security-note span { flex: 0 0 auto; padding: 4px 7px; border-radius: 6px; background: #f4dfaa; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.integration-security-note p { margin: 0; font-size: 11px; }
.integration-security-note code { color: #5c4514; font-weight: 700; }
.integration-spotlight { min-height: 175px; padding: 31px 34px; border-radius: 18px; background: linear-gradient(125deg, #17231c 0%, #1c4938 62%, #315b49 100%); color: white; display: flex; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; position: relative; }
.integration-spotlight::after { content: ""; position: absolute; width: 290px; height: 290px; right: -80px; top: -130px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 38px rgba(255,255,255,.035), 0 0 0 76px rgba(255,255,255,.025); }
.integration-spotlight > * { position: relative; z-index: 1; }
.integration-spotlight h2 { max-width: 550px; margin-bottom: 8px; font-size: 30px; }
.integration-spotlight p { max-width: 620px; margin: 0; color: #d6e4dc; line-height: 1.55; }
.integration-flow { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; }
.integration-flow span { min-width: 82px; padding: 12px 13px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: rgba(255,255,255,.09); text-align: center; font-size: 11px; font-weight: 700; backdrop-filter: blur(4px); }
.integration-flow b { color: #bfe681; }
.mcp-access { margin-top: 18px; border: 1px solid #d9d6e9; border-radius: 17px; background: linear-gradient(135deg, #fff 0%, #f7f5ff 100%); overflow: hidden; box-shadow: 0 5px 18px rgba(74,62,140,.04); }
.mcp-access-head { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.mcp-access-head > div { display: flex; align-items: center; gap: 12px; }
.mcp-access-head > div > span:last-child { display: flex; flex-direction: column; }
.mcp-access-head h2 { margin: 0 0 3px; font-family: var(--sans); font-size: 15px; letter-spacing: 0; }
.mcp-access-head p { margin: 0; color: var(--muted); font-size: 10px; }
.mcp-mark { width: 43px; height: 43px; border-radius: 12px; display: grid; place-items: center; background: #7165ff; color: white; box-shadow: 0 7px 16px rgba(113,101,255,.2); font-size: 10px; font-weight: 800; }
.mcp-endpoint { min-height: 58px; padding: 10px 22px; border-top: 1px solid #e7e4f0; border-bottom: 1px solid #e7e4f0; background: rgba(255,255,255,.7); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mcp-endpoint > span { min-width: 0; display: flex; flex-direction: column; }
.mcp-endpoint small { color: var(--muted); font-size: 9px; }
.mcp-endpoint code { margin-top: 3px; overflow: hidden; color: #4e438c; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mcp-key-list { padding: 0 22px; }
.mcp-key-row { min-height: 65px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; border-bottom: 1px solid #ebe8f2; }
.mcp-key-row:last-child { border-bottom: 0; }
.mcp-key-icon { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; background: #ece9ff; color: #6254dc; }
.mcp-key-icon svg { width: 15px; }
.mcp-key-row > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.mcp-key-row strong { font-size: 11px; }
.mcp-key-row small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mcp-empty { padding: 22px 0; text-align: center; }
.mcp-empty strong { font-size: 11px; }
.mcp-empty p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.mcp-warning { margin-top: 15px; padding: 13px; border: 1px solid #ead7a9; border-radius: 10px; background: #fff8e7; color: #715a24; }
.mcp-warning strong { display: block; font-size: 11px; }
.mcp-warning p { margin: 4px 0 0; font-size: 10px; line-height: 1.45; }
.mcp-token { padding: 16px; border-radius: 11px; background: #1b211d; color: white; display: grid; gap: 9px; }
.mcp-token small { color: #b9c4bc; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.mcp-token code { overflow-wrap: anywhere; color: #d9ef9c; font-size: 12px; line-height: 1.5; }
.mcp-token .button { justify-self: start; }
.mcp-client-config { margin-top: 14px; padding: 14px; border-radius: 10px; background: #f0eef9; }
.mcp-client-config strong { display: block; margin-bottom: 6px; font-size: 11px; }
.mcp-client-config p { margin: 4px 0; color: #5d557e; font-size: 10px; overflow-wrap: anywhere; }
.mcp-client-config code { color: #453b75; }
.mcp-setup-row { padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #e7e4f0; }
.mcp-setup-row span { display: flex; flex-direction: column; }
.mcp-setup-row strong { font-size: 11px; }
.mcp-setup-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.mcp-client-tabs { display: grid; gap: 10px; }
.mcp-client-tabs details { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #faf9f5; }
.mcp-client-tabs summary { cursor: pointer; font-weight: 800; }
.mcp-client-tabs p { margin: 8px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.mcp-client-tabs pre { max-height: 230px; margin: 10px 0; padding: 13px; overflow: auto; border-radius: 9px; background: #1b211d; color: #d9ef9c; font-size: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.developer-access { margin-top: 18px; border-color: #cfe1d8; background: linear-gradient(135deg, #fff 0%, #f2f8f4 100%); }
.developer-access .mcp-mark { background: var(--green); box-shadow: 0 7px 16px rgba(30,96,73,.2); }
.developer-access .mcp-endpoint { border-color: #dce9e1; }
.developer-access .mcp-endpoint code { color: var(--green-dark); }
.developer-access .mcp-key-icon { color: var(--green); background: var(--green-pale); }
.integration-filters { display: flex; gap: 7px; margin: 25px 0 16px; overflow-x: auto; }
.integration-filters button { min-height: 35px; padding: 0 13px; border: 1px solid var(--line); border-radius: 20px; background: white; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.integration-filters button.active { border-color: var(--ink); background: var(--ink); color: white; }
.integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.integration-how { margin-top: 16px; padding: 17px 20px; display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 18px; align-items: center; }
.integration-how > strong { color: var(--green); }
.integration-how span { display: flex; flex-direction: column; color: var(--muted); font-size: 10px; line-height: 1.45; }
.integration-how b { color: var(--ink); font-size: 11px; }
.integration-card { min-height: 345px; padding: 21px; border: 1px solid var(--line-soft); border-radius: 16px; background: white; display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(30,42,34,.03); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.integration-card:hover { transform: translateY(-2px); border-color: #c9cec9; box-shadow: 0 12px 26px rgba(30,42,34,.07); }
.integration-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.integration-brand { width: 45px; height: 45px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--provider-color); color: white; box-shadow: 0 7px 16px color-mix(in srgb, var(--provider-color) 25%, transparent); font-size: 12px; font-weight: 800; letter-spacing: -.03em; }
.integration-state { padding: 5px 8px; border-radius: 20px; background: #eeefeb; color: var(--muted); font-size: 9px; font-weight: 700; }
.integration-state.connected { background: #ddf4e7; color: #16734c; }
.integration-state.connected.untested { background: #fff0d8; color: #87591d; }
.integration-state.connected.attention { background: #fbe1dd; color: #994839; }
.integration-category { color: var(--faint); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.integration-card h3 { margin: 5px 0 6px; font-family: var(--serif); font-size: 24px; }
.integration-card p { min-height: 53px; margin-bottom: 14px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.integration-capabilities { display: grid; gap: 6px; margin-bottom: 17px; color: #526058; font-size: 10px; }
.integration-capabilities span::first-letter { color: var(--green); }
.integration-connect-method { width: fit-content; margin: -4px 0 14px; padding: 6px 9px; border-radius: 999px; background: #eef4ef; color: var(--green); display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 800; }
.integration-connect-method svg { width: 12px; height: 12px; }
.integration-account { margin: 0 0 14px; padding: 10px; border-radius: 9px; background: #f1f5f1; display: flex; flex-direction: column; }
.integration-account strong { font-size: 10px; }
.integration-account small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.integration-account > span { margin-top: 6px; color: var(--faint); font-size: 9px; }
.integration-card > .button { width: 100%; margin-top: auto; }
.integration-modal-title { display: flex; align-items: center; gap: 13px; }
.integration-modal-title > span:last-child { display: flex; flex-direction: column; }
.integration-modal-title h2 { margin: 0 0 4px; }
.integration-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 13px; }
.integration-fields.single { grid-template-columns: minmax(0, 1fr); }
.field-help { display: block; margin: 6px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.integration-quick-modal { width: min(720px, 100%); }
.integration-quick-start { margin-bottom: 20px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #f7f8f5; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.integration-step-badge { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: white; font-size: 11px; font-weight: 800; }
.integration-quick-start h3 { margin: 1px 0 4px; font-family: var(--serif); font-size: 20px; }
.integration-quick-start p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.integration-quick-start a { margin-top: 4px; color: var(--green); font-size: 10px; font-weight: 800; white-space: nowrap; }
.integration-mode-switch { margin: -3px 0 18px; padding: 0; border: 0; background: transparent; color: var(--green); cursor: pointer; font: inherit; font-size: 10px; font-weight: 800; }
.integration-mode-switch:hover { text-decoration: underline; }
.integration-advanced { margin: 17px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.integration-advanced > summary { padding: 14px 15px; cursor: pointer; font-size: 11px; font-weight: 800; }
.integration-advanced > summary span { margin-left: 7px; color: var(--muted); font-size: 9px; font-weight: 500; }
.integration-option-list { margin: 0; padding: 13px 15px; border: 0; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.integration-option-list legend { padding: 0 5px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.integration-option-list label { min-width: 0; padding: 10px; border-radius: 9px; background: #f7f8f5; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; cursor: pointer; }
.integration-option-list input { margin-top: 2px; accent-color: var(--green); }
.integration-option-list span { min-width: 0; display: flex; flex-direction: column; }
.integration-option-list strong { font-size: 10px; }
.integration-option-list small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.integration-security-inline { margin-top: 8px; padding: 11px 13px; border-radius: 10px; background: #eef5f0; color: var(--muted); display: flex; align-items: center; gap: 9px; font-size: 9px; line-height: 1.45; }
.integration-security-inline svg { width: 15px; flex: 0 0 auto; color: var(--green); }
.integration-security-inline strong { color: var(--ink); }
.generated-secret-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.generated-secret-field .button { height: 42px; }
.integration-pending { padding: 20px; border: 1px solid #d8d2ef; border-radius: 13px; background: #f4f1fb; display: grid; grid-template-columns: auto 1fr; gap: 13px; color: #574b85; }
.integration-pending > span { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; background: white; }
.integration-pending svg { width: 18px; }
.integration-pending strong { display: block; color: #3f3569; }
.integration-pending p { margin: 5px 0 0; font-size: 10px; line-height: 1.5; }
.integration-wizard-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 8px 0 24px; }
.integration-wizard-steps span { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 10px; font-weight: 700; }
.integration-wizard-steps span::after { content: ""; height: 2px; flex: 1; background: var(--line-soft); }
.integration-wizard-steps span:last-child::after { display: none; }
.integration-wizard-steps b { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; background: #eceeea; color: var(--muted); }
.integration-wizard-steps span.active { color: var(--green); }
.integration-wizard-steps span.active b { background: var(--green); color: white; }
.integration-wizard-panel[hidden], .integration-actions [hidden] { display: none; }
.wizard-intro { margin-bottom: 17px; }
.wizard-intro strong { font-family: var(--serif); font-size: 24px; }
.wizard-intro p, .integration-review p { margin: 5px 0 0; color: var(--muted); line-height: 1.5; }
.integration-recipes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.integration-recipes label { position: relative; cursor: pointer; }
.integration-recipes input { position: absolute; opacity: 0; pointer-events: none; }
.integration-recipes label > span { min-height: 124px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); display: flex; flex-direction: column; transition: .15s ease; }
.integration-recipes input:checked + span { border-color: var(--green); box-shadow: 0 0 0 2px rgba(30,96,73,.1); background: #f4faf6; }
.integration-recipes strong { font-size: 13px; }
.integration-recipes small { margin: 6px 0 13px; color: var(--muted); line-height: 1.45; }
.integration-recipes i { margin-top: auto; color: var(--green); font-size: 9px; font-style: normal; font-weight: 700; }
.integration-review { padding: 22px; border: 1px solid #cfe0d4; border-radius: 13px; background: #f4faf6; }
.integration-review strong { font-family: var(--serif); font-size: 24px; }
.integration-health { display: grid; gap: 16px; }
.integration-health-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; }
.integration-health-head > span:nth-child(2) { display: flex; flex-direction: column; }
.integration-health-head small { margin-top: 3px; color: var(--muted); }
.health-dot { width: 12px; height: 12px; border-radius: 50%; background: #9ba59e; box-shadow: 0 0 0 5px #edf0ed; }
.health-dot.healthy { background: #27a66d; box-shadow: 0 0 0 5px #dff3e8; }
.health-dot.untested { background: #d69432; box-shadow: 0 0 0 5px #fff0d8; }
.health-dot.attention { background: #c65342; box-shadow: 0 0 0 5px #fbe1dd; }
.integration-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.integration-metrics span { padding: 14px; background: var(--paper); display: flex; flex-direction: column; }
.integration-metrics b { font-family: var(--serif); font-size: 22px; }
.integration-metrics small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.integration-activity { padding: 17px; border-radius: 12px; background: #f3f5f1; }
.integration-activity > strong { display: block; margin-bottom: 9px; }
.integration-activity > div { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.integration-activity > div > span { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--green); }
.integration-activity p { margin: 0; display: flex; flex-direction: column; }
.integration-activity b { font-size: 10px; }
.integration-activity small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.oauth-explainer { margin-bottom: 18px; padding: 14px; border-radius: 10px; background: #f0edfb; color: #544987; }
.oauth-explainer strong { display: block; margin-bottom: 4px; }
.oauth-explainer p { margin: 0; font-size: 10px; line-height: 1.5; }
.oauth-explainer code { word-break: break-all; }
.capability-picker { margin: 8px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 11px; }
.capability-picker legend { padding: 0 6px; font-size: 11px; font-weight: 700; }
.capability-picker label { min-height: 48px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; border-top: 1px solid var(--line-soft); cursor: pointer; }
.capability-picker label:first-of-type { border-top: 0; }
.capability-picker input { width: 16px; height: 16px; accent-color: var(--green); }
.capability-picker label span { display: flex; flex-direction: column; }
.capability-picker strong { font-size: 11px; }
.capability-picker small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.commerce-setup { display: grid; gap: 13px; margin-top: 8px; padding: 18px; border: 1px solid #cfe1d8; border-radius: 13px; background: #f1f8f4; }
.commerce-setup-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.commerce-setup-head > span:first-child { display: flex; flex-direction: column; }
.commerce-setup-head small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.commerce-setup-step { display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 10px; }
.commerce-setup-step > b { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 10px; }
.commerce-setup-step span { min-width: 0; display: flex; flex-direction: column; }
.commerce-setup-step small { margin-top: 3px; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.5; }
.commerce-code { overflow: hidden; border: 1px solid #d7e3dc; border-radius: 9px; background: #16241d; }
.commerce-code pre { max-height: 230px; margin: 0; padding: 15px; overflow: auto; color: #d9efe4; font: 9px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.commerce-code .button { margin: 0 0 12px 15px; border-color: #b9d2c5; color: #173e30; background: #edf7f2; }
.commerce-setup .mcp-endpoint { padding-right: 0; padding-left: 0; border-color: #d7e3dc; background: transparent; }
.commerce-setup-note { padding: 12px 14px; border-radius: 9px; background: white; }
.commerce-setup-note strong { font-size: 11px; }
.commerce-setup-note p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.integration-actions .danger { margin-right: auto; }

body.auth-mode { background: #eef3ee; }
.legal-page { min-height: 100vh; padding: 60px 24px; background: #f4f2eb; }
.legal-page main { max-width: 760px; margin: 0 auto; padding: 46px; border-radius: 22px; background: white; box-shadow: var(--shadow); }
.legal-page h1 { margin: 45px 0 18px; font-family: var(--serif); font-size: 48px; }
.legal-page p { color: #4f6257; font-size: 16px; line-height: 1.75; }
.legal-page a { color: var(--green); }
body.auth-mode #app { display: block; min-height: 100vh; }
body.auth-mode .sidebar,
body.auth-mode .mobile-header { display: none; }
body.auth-mode .main { min-height: 100vh; }
body.auth-mode .page { max-width: none; padding: 0; }
.auth-shell { display: grid; grid-template-columns: minmax(340px, .9fr) minmax(500px, 1.1fr); min-height: 100vh; }
.auth-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 54px 64px; color: #f7fbf7; background: linear-gradient(145deg, #102e24 0%, #185c44 58%, #50a66f 145%); }
.auth-story::after { content: ""; position: absolute; width: 460px; height: 460px; right: -180px; bottom: -220px; border: 80px solid rgba(255,255,255,.08); border-radius: 50%; }
.auth-story .brand { color: white; position: relative; z-index: 1; }
.auth-story > div { position: relative; z-index: 1; max-width: 580px; }
.auth-story h1 { margin: 0 0 18px; font-family: var(--serif); font-size: clamp(44px, 5vw, 72px); line-height: .98; letter-spacing: -.035em; }
.auth-story p { max-width: 500px; margin: 0; color: rgba(255,255,255,.78); font-size: 18px; line-height: 1.65; }
.auth-story blockquote { position: relative; z-index: 1; max-width: 480px; margin: 0; padding: 18px 22px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; color: rgba(255,255,255,.8); background: rgba(255,255,255,.07); backdrop-filter: blur(10px); line-height: 1.5; }
.auth-panel { display: grid; place-items: center; padding: 48px; }
.auth-card { width: min(100%, 470px); padding: 42px; border: 1px solid rgba(31,67,49,.1); border-radius: 24px; background: white; box-shadow: 0 28px 80px rgba(25,58,42,.13); }
.auth-card h2 { margin: 18px 0 8px; font-family: var(--serif); font-size: 36px; }
.auth-card > p { margin: 0 0 28px; color: var(--muted); line-height: 1.55; }
.auth-lock { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: white; background: var(--green); font-size: 21px; }
.google-auth-button { width: 100%; justify-content: center; border-color: #ccd6cf; color: #17231c; background: white; box-shadow: 0 5px 16px rgba(25,58,42,.06); }
.google-auth-button:hover { border-color: #9fb2a6; background: #f9fbf9; }
.google-auth-button svg { width: 20px; height: 20px; }
.auth-divider { display: flex; align-items: center; gap: 13px; margin: 22px 0; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-submit { width: 100%; justify-content: center; margin-top: 8px; }
.auth-assurance { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.auth-new-account { margin-bottom: 8px; }
.auth-new-account summary { margin-bottom: 16px; color: var(--green); cursor: pointer; font-size: 13px; font-weight: 700; }
.otp-field { display: block; margin-bottom: 18px; }
.otp-field span { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.otp-field input { width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 10px; font-size: 28px; font-weight: 700; letter-spacing: .45em; text-align: center; }
.development-code { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; margin-top: 22px; padding: 16px; border-radius: 12px; color: #315244; background: #eef8f1; font-size: 12px; }
.development-code code { font-size: 18px; font-weight: 700; letter-spacing: .16em; }
.development-code a { grid-column: 1 / -1; color: var(--green); font-weight: 700; }
.auth-back { margin-top: 22px; }
.auth-legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 18px; font-size: 12px; }
.auth-legal a { color: var(--muted); }
.builder-save-status { color: var(--muted); font-size: 10px; white-space: nowrap; }
.preflight-modal { max-width: 920px; }
.preflight-summary > div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 16px; border-radius: 11px; }
.preflight-summary .ready { color: #176a48; background: #e1f3e8; }
.preflight-summary .warning { color: #76550e; background: #fff1c8; }
.preflight-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 20px; margin-top: 20px; }
.preflight-grid h3, .test-send-panel h3 { margin: 0 0 10px; }
.link-inventory { max-height: 290px; overflow-y: auto; display: grid; gap: 7px; }
.link-inventory button { min-width: 0; display: grid; grid-template-columns: minmax(100px,.5fr) minmax(0,1fr); gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.link-inventory button span { min-width: 0; display: flex; flex-direction: column; }
.link-inventory button strong { font-size: 11px; }
.link-inventory button small { color: var(--muted); font-size: 9px; }
.link-inventory code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--green); font-size: 9px; }
.test-send-panel { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(0,1.3fr); gap: 20px; align-items: end; margin-top: 22px; padding: 18px; border-radius: 12px; background: #f2f5f1; }
.test-send-panel p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.test-send-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 8px; }
.test-send-fields input, .test-send-fields select { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; }

.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.account-card { padding: 26px; }
.account-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.account-card-head h2 { margin: 0 0 3px; }
.account-card-head p { margin: 0; color: var(--muted); font-size: 13px; }
.hosted-form-overview { display: grid; gap: 12px; margin: 2px 0 24px; }
.hosted-form-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #f7faf7; }
.hosted-form-link > span { min-width: 0; display: grid; gap: 5px; }
.hosted-form-link small { color: var(--muted); font-weight: 700; }
.hosted-form-link code { overflow: hidden; color: var(--green-dark); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.hosted-form-link > div { flex: 0 0 auto; display: flex; gap: 7px; }
.hosted-form-note { padding: 15px; border-radius: 12px; color: #315244; background: #edf5f0; }
.hosted-form-note p { margin: 4px 0 0; font-size: 12px; line-height: 1.55; }
.hosted-forms-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.hosted-forms-form fieldset { min-width: 0; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 13px; }
.hosted-forms-form .hosted-form-branding { grid-column: 1 / -1; }
.hosted-forms-form legend { padding: 0 7px; font-weight: 800; }
.hosted-forms-form input[type="color"] { min-height: 46px; padding: 6px; cursor: pointer; }
.preference-topic-editor { display: grid; gap: 8px; }
.preference-topic-row { display: grid; grid-template-columns: 28px minmax(120px, .7fr) minmax(180px, 1.3fr); gap: 8px; align-items: center; }
.preference-topic-row > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--green); background: #edf5ef; font-size: 11px; font-weight: 800; }
.preference-topic-row input { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.hosted-form-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hosted-form-actions p { margin: 0; color: var(--muted); font-size: 12px; }
.account-icon { display: grid; place-items: center; flex: 0 0 auto; width: 50px; height: 50px; border-radius: 15px; color: white; background: var(--green); font-weight: 800; }
.account-icon.workspace { color: #764c08; background: #f7d995; }
.member-list, .session-list { display: grid; }
.member-row, .session-row, .integration-status { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 13px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.member-row small, .session-row small, .integration-status small, .pending-invites small { display: block; margin-top: 3px; color: var(--muted); }
.session-device, .integration-logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--green); background: #edf5ef; font-weight: 800; }
.session-device svg { width: 20px; }
.pending-invites { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.pending-invites h3 { margin: 0 0 8px; }
.pending-invites > div { padding: 10px 0; }
.integration-status { grid-template-columns: auto minmax(0, 1fr) auto; border-top: 0; padding-bottom: 0; }
.tracking-domain-empty { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px; border: 1px dashed #b9c9be; border-radius: 14px; background: #f7faf7; }
.tracking-domain-empty p { margin: 5px 0 0; color: var(--muted); }
.tracking-domain-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center; }
.tracking-domain-head small { display: block; margin-top: 3px; color: var(--muted); }
.dns-record { display: grid; grid-template-columns: 100px minmax(140px, .6fr) minmax(220px, 1fr); gap: 12px; margin-top: 18px; padding: 16px; border-radius: 12px; background: #f3f6f3; }
.dns-record span { min-width: 0; }
.dns-record small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.dns-record strong, .dns-record code { overflow-wrap: anywhere; }
.dns-record-list { display: grid; gap: 10px; margin-top: 18px; }
.dns-record.sending-record { grid-template-columns: 120px 70px minmax(160px, .65fr) minmax(260px, 1.35fr); margin-top: 0; }
.domain-checks { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.domain-checks span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 9px; background: #f0eee8; color: #665f52; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.domain-checks span.ready { background: #e1f3e8; color: #176a48; }
.domain-checks b { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: white; font-size: 10px; }
.domain-note, .domain-modal-note { margin: 14px 0 0; padding: 12px 14px; border: 1px solid #e8d6a9; border-radius: 10px; background: #fff9e9; color: #6c592b; font-size: 11px; line-height: 1.55; }
.domain-modal-note { margin: 4px 0 16px; }
.tracking-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.tracking-actions { display: flex; gap: 10px; margin-top: 16px; }
.billing-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 20px; padding: 0; overflow: hidden; background: var(--line); }
.billing-status span { padding: 20px 22px; background: white; }
.billing-status small { display: block; margin-bottom: 5px; color: var(--muted); }

@media (max-width: 1280px) {
  .contact-record-modal { width: min(920px, calc(100vw - 24px)); }
  .contact-record-layout { display: block; }
  .contact-profile-panel { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

@media (max-width: 1100px) {
  #app { grid-template-columns: 220px minmax(0,1fr); }
  .page { padding: 36px 32px 70px; }
  .metric-grid, .plans { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .lower-grid { grid-template-columns: 1fr; }
  .creator-hero-grid { grid-template-columns: 1fr; }
  .agency-client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readiness-card { min-height: auto; }
  .page.builder-page { padding-inline: 16px; }
  .builder-head { flex-wrap: wrap; }
  .builder-title { flex-basis: 100%; }
  .builder-head-actions { width: 100%; justify-content: flex-start; }
  .visual-builder { grid-template-columns: 196px minmax(0, 1fr) 280px; }
  .visual-builder.palette-collapsed { grid-template-columns: 0 minmax(0, 1fr) 280px; }
  .visual-builder.inspector-collapsed { grid-template-columns: 196px minmax(0, 1fr) 0; }
  .builder-palette-tabs { grid-template-columns: 1fr 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .segment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .automation-builder { grid-template-columns: minmax(520px, 1fr) 240px; }
  .revenue-hero { grid-template-columns: repeat(2, 1fr); }
  .report-grid, .report-split { grid-template-columns: 1fr; }
  .delivery-history-metrics { grid-template-columns: repeat(3, 1fr); }
  .integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .integration-how { grid-template-columns: 1fr; }
  .integration-spotlight { align-items: flex-start; flex-direction: column; }
  .auth-story { padding: 44px; }
  .contact-record-modal { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .experiment-setup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder-head .context-help { width: 38px; padding: 7px; font-size: 0; }
}

@media (max-width: 900px) {
  .auth-shell { display: block; }
  .auth-story { min-height: 310px; padding: 30px 24px; }
  .auth-story h1 { margin-top: 60px; font-size: 42px; }
  .auth-story blockquote { display: none; }
  .auth-panel { padding: 24px 16px 48px; }
  .auth-card { margin: -34px auto 0; padding: 28px 22px; }
}

@media (max-width: 760px) {
  #app { display: block; }
  .sidebar { position: fixed; z-index: 90; left: 0; top: 0; width: 260px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  body.menu-open::after { content: ""; position: fixed; z-index: 80; inset: 0; background: rgba(23,35,28,.38); backdrop-filter: blur(2px); }
  body.menu-open .sidebar { transform: translateX(0); }
  .mobile-header { height: 66px; padding: 0 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: var(--canvas); position: sticky; top: 0; z-index: 50; }
  .mobile-header .brand { font-size: 22px; }
  .page { padding: 25px 16px 56px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .report-head { align-items: flex-start; flex-direction: column; }
  .report-period { width: 100%; }
  .report-period button { flex: 1; }
  .page-head .head-actions { width: 100%; }
  .page-head .button { flex: 1; }
  .page-head .context-help { flex: 0 0 auto; }
  .hero-grid, .lower-grid, .composer-layout, .settings-grid { grid-template-columns: 1fr; }
  .creator-hero-grid, .agency-client-grid, .agency-principles { grid-template-columns: 1fr; }
  .agency-portfolio-hero { align-items: flex-start; flex-direction: column; }
  .agency-portfolio-hero .button { width: 100%; }
  .preview-wrap { position: static; }
  .email-shell { min-height: 500px; padding: 15px; }
  .email-content { padding: 32px 25px; }
  .metric-grid, .plans { grid-template-columns: 1fr; }
  .revenue-hero { grid-template-columns: 1fr; }
  .delivery-history-metrics { grid-template-columns: repeat(2, 1fr); }
  .tag-manager-head, .bulk-tag-bar { align-items: flex-start; flex-direction: column; }
  .bulk-tag-bar span { margin-right: 0; }
  .report-tabs { gap: 19px; overflow-x: auto; }
  .report-panel { padding: 20px; }
  .report-panel-head { margin-bottom: 19px; }
  .report-panel-head .report-total { display: none; }
  .report-metric { padding: 20px; }
  .report-table { min-width: 850px; }
  .integration-grid, .integration-fields { grid-template-columns: 1fr; }
  .integration-recipes, .integration-metrics { grid-template-columns: 1fr 1fr; }
  .integration-quick-start { grid-template-columns: auto minmax(0, 1fr); }
  .integration-quick-start a { grid-column: 2; }
  .integration-option-list { grid-template-columns: 1fr; }
  .integration-wizard-steps span { font-size: 0; }
  .integration-wizard-steps span::after { display: block; }
  .integration-health-head { grid-template-columns: auto 1fr; }
  .integration-health-head .button { grid-column: 2; justify-self: start; }
  .integration-spotlight { padding: 25px; }
  .integration-spotlight h2 { font-size: 27px; }
  .integration-flow { width: 100%; gap: 5px; }
  .integration-flow span { min-width: 0; flex: 1; padding: 10px 7px; }
  .integration-security-note { align-items: flex-start; flex-direction: column; }
  .integration-actions { align-items: stretch; flex-direction: column-reverse; }
  .integration-actions .danger { margin: 0; }
  .mcp-access-head { align-items: stretch; flex-direction: column; }
  .mcp-access-head .button { width: 100%; }
  .mcp-endpoint { align-items: stretch; flex-direction: column; }
  .mcp-setup-row { align-items: stretch; flex-direction: column; }
  .mcp-endpoint .button { align-self: flex-start; }
  .campaign-row { grid-template-columns: 1fr auto; }
  .campaign-row { padding: 15px 14px; }
  .campaign-metrics { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .campaign-metrics span { align-items: flex-start; }
  .campaign-metrics span:nth-child(3n) { border-right: 0; }
  .campaign-row-summary { grid-template-columns: 1fr auto; }
  .campaign-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .campaign-stat { display: none; }
  .campaign-action { display: block; grid-column: 1 / -1; justify-self: start; text-align: left; }
  .campaign-review-layout { grid-template-columns: 1fr; padding: 16px; }
  .campaign-review-preview iframe { min-height: 520px; height: 70vh; }
  .audience-picker-row { grid-template-columns: 1fr; }
  .audience-picker-row .button { width: 100%; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .table-card { overflow-x: auto; }
  .data-table { min-width: 720px; }
  .modal-backdrop { padding: 9px; }
  .contact-record-modal { width: 100%; max-height: calc(100dvh - 18px); border-radius: 15px; }
  .contact-record-summary { grid-template-columns: repeat(3, 1fr); }
  .contact-record-summary span:nth-child(3) { border-right: 0; }
  .contact-record-summary span { padding: 13px 15px; }
  .contact-record-head .context-help { width: 36px; padding: 7px; font-size: 0; }
  .contact-record-layout { display: block; }
  .experiment-modal, .experiment-report-modal { width: 100%; }
  .send-time-report-modal { width: 100%; }
  .experiment-variants, .experiment-result-grid { grid-template-columns: 1fr; }
  .send-time-source-grid { grid-template-columns: 1fr; }
  .send-time-source-grid article p { min-height: 0; }
  .experiment-readiness { grid-template-columns: 1fr; }
  .experiment-section-head { align-items: stretch; flex-direction: column; }
  .feature-card { padding: 26px; }
  .feature-card .kicker { margin-bottom: 30px; }
  .feature-card h2 { font-size: 31px; }
  .field-grid { grid-template-columns: 1fr; }
  .usage-card { grid-template-columns: 1fr; }
  .usage-number { text-align: left; }
  .builder-head { align-items: stretch; flex-direction: column; }
  .builder-title { width: 100%; }
  .builder-title > span { flex: 1; }
  .builder-title strong { max-width: min(250px, 55vw); }
  .builder-title > .text-link { display: none; }
  .builder-head-actions { width: 100%; align-items: stretch; display: grid; grid-template-columns: 1fr 1fr; }
  .builder-head-actions .builder-save-status { grid-column: 1 / -1; min-width: 0; text-align: left; }
  .builder-head-actions #ai-email-assistant,
  .builder-head-actions #review-send { grid-column: 1 / -1; }
  .builder-tools-menu { grid-column: 2; }
  .builder-tools-menu summary { width: 100%; }
  .builder-tools-popover { left: 0; right: auto; width: 100%; }
  .builder-tools-section { grid-template-columns: 1fr; align-items: stretch; }
  .builder-action-group { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .builder-help-group, .builder-history-group { display: flex; width: auto; align-self: flex-start; }
  .builder-head-actions .button { width: 100%; white-space: normal; }
  .builder-head-actions .icon-button { flex: 0 0 38px; }
  .builder-save-status { width: 100%; padding: 3px 0; }
  .visual-builder { height: auto; min-height: 0; display: flex; flex-direction: column; overflow: visible; }
  .builder-panel-rail { display: none !important; }
  .visual-builder.palette-collapsed .builder-palette,
  .visual-builder.inspector-collapsed .builder-inspector { display: none; }
  .builder-palette, .builder-inspector { border: 0; overflow: visible; }
  .builder-palette { order: 1; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .builder-workspace { order: 2; min-height: 540px; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; }
  .builder-inspector { order: 3; }
  .builder-inspector { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .inspector-scroll { overflow: visible; }
  .module-grid { grid-template-columns: repeat(4, minmax(72px, 1fr)); overflow-x: auto; }
  .module-tile { min-height: 68px; }
  .builder-tip { display: none; }
  .builder-canvas-wrap { padding: 24px 10px 55px; }
  .builder-toolbar { align-items: stretch; flex-direction: column; }
  .builder-selection-bar { align-items: stretch; flex-direction: column; }
  .builder-selection-bar > div { justify-content: stretch; }
  .builder-selection-bar button { flex: 1 1 calc(50% - 6px); }
  .builder-preview-controls { align-items: center; justify-content: space-between; }
  .builder-preview-controls select { min-width: 0; max-width: none; flex: 1; }
  .builder-email { width: 100% !important; }
  .preflight-grid, .test-send-panel { grid-template-columns: 1fr; }
  .test-send-fields { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: 1fr; }
  .template-preview { height: 330px; }
  .template-preview iframe { transform: translateX(-50%) scale(.41); }
  .segment-grid, .merge-tag-grid { grid-template-columns: 1fr; }
  .segment-rule { grid-template-columns: 1fr; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
  .segment-activity-controls { grid-template-columns: 1fr; }
  .segment-activity-controls .button { width: 100%; }
  .automation-summary { grid-template-columns: 1fr; }
  .automation-list-row { grid-template-columns: auto 1fr auto; }
  .automation-list-stat { display: none; }
  .automation-list-row .status-badge { display: none; }
  .automation-outcome-chips { grid-column: 1 / -1; }
  .automation-head { align-items: flex-start; flex-direction: column; }
  .automation-head .head-actions { width: 100%; }
  .automation-head .button { flex: 1; }
  .automation-builder { height: auto; min-height: 760px; display: flex; flex-direction: column; overflow: visible; }
  .automation-palette { order: 1; border: 0; }
  .automation-canvas { order: 2; min-height: 650px; padding: 30px 20px 80px; }
  .automation-palette-section { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .automation-palette-section h3 { grid-column: 1 / -1; }
  .automation-palette-item { margin: 0; }
  .auth-assurance { align-items: flex-start; flex-direction: column; gap: 8px; }
  .account-grid { grid-template-columns: 1fr; }
  .hosted-forms-form { grid-template-columns: 1fr; }
  .hosted-form-actions { grid-column: auto; align-items: stretch; flex-direction: column; }
  .hosted-form-link { align-items: stretch; flex-direction: column; }
  .hosted-form-link > div { flex-wrap: wrap; }
  .preference-topic-row { grid-template-columns: 28px minmax(0, 1fr); }
  .preference-topic-row input:last-child { grid-column: 2; }
  .dns-record, .dns-record.sending-record, .billing-status { grid-template-columns: 1fr; }
  .tracking-domain-empty { align-items: flex-start; flex-direction: column; }
  .tracking-actions { align-items: stretch; flex-direction: column; }
  .member-row, .session-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .member-row .button, .session-row .button { grid-column: 2 / -1; justify-self: start; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

[data-theme="dark"] {
  --ink: #f1f5f2;
  --muted: #a9b5ae;
  --faint: #7f8d85;
  --canvas: #101512;
  --paper: #18201b;
  --line: #344039;
  --line-soft: #29332d;
  --green: #62bd95;
  --green-dark: #8ad4b3;
  --green-pale: #244437;
  --shadow: 0 18px 54px rgba(0,0,0,.28);
}
[data-theme="dark"] body { color-scheme: dark; }
[data-theme="dark"] .sidebar { background: #141a16; border-color: #2b352f; }
[data-theme="dark"] .workspace-picker,
[data-theme="dark"] .button,
[data-theme="dark"] .icon-button,
[data-theme="dark"] .card,
[data-theme="dark"] .modal,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .integration-card,
[data-theme="dark"] .module-tile,
[data-theme="dark"] .builder-layout-card,
[data-theme="dark"] .builder-global-button { background: var(--paper); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .visual-builder,
[data-theme="dark"] .builder-panel-head,
[data-theme="dark"] .builder-toolbar,
[data-theme="dark"] .builder-palette,
[data-theme="dark"] .builder-inspector { background: #171e1a; border-color: var(--line); }
[data-theme="dark"] .builder-workspace { background: #0f1411; }
[data-theme="dark"] .integration-account,
[data-theme="dark"] .integration-connect-method,
[data-theme="dark"] .integration-quick-start,
[data-theme="dark"] .integration-option-list label,
[data-theme="dark"] .integration-security-inline,
[data-theme="dark"] .integration-recipes label > span,
[data-theme="dark"] .integration-review,
[data-theme="dark"] .integration-health-head,
[data-theme="dark"] .integration-metrics span,
[data-theme="dark"] .integration-activity,
[data-theme="dark"] .contact-record-summary,
[data-theme="dark"] .campaign-advanced,
[data-theme="dark"] .mcp-client-tabs details,
[data-theme="dark"] .media-empty { background: #202923; }
[data-theme="dark"] .integration-recipes input:checked + span { background: #1c3127; }
[data-theme="dark"] .integration-review { border-color: #365b48; }
[data-theme="dark"] .integration-activity > div { border-color: var(--line); }
[data-theme="dark"] .data-table th { background: #1c241f; }
[data-theme="dark"] .data-table tr:hover td { background: #202923; }

@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --ink: #f1f5f2;
    --muted: #a9b5ae;
    --faint: #7f8d85;
    --canvas: #101512;
    --paper: #18201b;
    --line: #344039;
    --line-soft: #29332d;
    --green: #62bd95;
    --green-dark: #8ad4b3;
    --green-pale: #244437;
    --shadow: 0 18px 54px rgba(0,0,0,.28);
  }
}

@media (max-width: 480px) {
  h1 { font-size: 36px; }
  .mobile-header { height: 60px; padding: 0 13px; }
  .page { padding: 21px 12px 48px; }
  .page-head { gap: 17px; margin-bottom: 24px; }
  .page-head .head-actions { align-items: stretch; flex-direction: column; }
  .page-head .button { width: 100%; }
  .feature-card { min-height: 250px; padding: 23px 21px; }
  .feature-card h2 { font-size: 28px; }
  .readiness-card, .metric, .report-panel, .composer-panel { padding: 19px; }
  .module-grid { grid-template-columns: repeat(3, minmax(78px, 1fr)); padding: 10px; }
  .builder-panel-section { padding: 10px; }
  .builder-canvas-wrap { padding: 18px 6px 45px; }
  .builder-email { min-height: 350px; }
  .builder-empty-drop { min-height: 310px; }
  .builder-preview-controls { align-items: stretch; flex-direction: column; }
  .device-toggle { align-self: flex-end; }
  .spacing-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr 1fr; }
  .media-search { grid-template-columns: 1fr; }
  .integration-quick-start { padding: 14px; }
  .integration-quick-start a { grid-column: 1 / -1; }
  .integration-advanced > summary span { display: block; margin: 3px 0 0; }
  .generated-secret-field { grid-template-columns: 1fr; }
  .generated-secret-field .button { width: 100%; }
  .attribution-explainer { align-items: flex-start; flex-direction: column; }
  .help-support { align-items: stretch; flex-direction: column; }
  .modal { width: calc(100% - 18px); max-height: calc(100vh - 18px); padding: 20px 17px; }
  .contact-record-modal { width: 100%; max-height: calc(100dvh - 18px); padding: 0; }
  .experiment-setup-grid { grid-template-columns: 1fr; }
  .send-time-hero { grid-template-columns: 1fr; }
  .experiment-variant-card, .experiment-result-card { padding: 15px; }
  .experiment-result-card dl { grid-template-columns: repeat(2, 1fr); }
  .contact-record-summary { grid-template-columns: repeat(2, 1fr); }
  .contact-record-summary span:nth-child(3) { border-right: 1px solid var(--line-soft); }
  .contact-record-summary span:nth-child(even) { border-right: 0; }
  .contact-record-summary span { padding: 12px 14px; }
  .contact-record-summary span:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); }
  .contact-record-head, .contact-profile-panel, .contact-history-panel { padding-right: 17px; padding-left: 17px; }
  .contact-record-head { padding-top: 17px; padding-bottom: 17px; }
  .contact-record-identity { align-items: flex-start; }
  .contact-record-identity h2 { font-size: 21px; white-space: normal; overflow-wrap: anywhere; }
  .contact-record-identity p { overflow-wrap: anywhere; }
  .contact-profile-panel .field-grid { grid-template-columns: 1fr; }
  .contact-verification-row { grid-template-columns: 1fr; }
  .contact-verification-row .button { width: 100%; }
  .contact-profile-panel .custom-field-row { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) 42px; }
  .contact-note-form { grid-template-columns: 1fr; }
  .contact-note-form .button { width: 100%; justify-self: stretch; }
  .contact-event-filters { margin-right: -17px; padding-right: 17px; scrollbar-width: none; }
  .contact-event-filters::-webkit-scrollbar { display: none; }
  .contact-profile-actions { align-items: stretch; flex-direction: column-reverse; }
  .contact-profile-actions .button { width: 100%; }
  .toast-root { left: 10px; right: 10px; bottom: 10px; }
  .toast { min-width: 0; width: 100%; }
}
