p { color: var(--muted); line-height: 1.48; }
.top-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr); gap: 22px; }
.panel, .health-card, .platform-row, .third-party article, .profile-card, .empty-state, .doc-link, .step, .billing-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel { padding: 24px; }
.panel-title { font-size: 18px; font-weight: 600; margin-bottom: 24px; }
.metric-row, .usage-line, .health-card, .band-head, .platform-row, .doc-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.metric-row.small { align-items: flex-start; }
.muted, .fine { color: var(--muted); }
.muted { display: block; font-size: 13px; }
.fine { font-size: 12px; margin-bottom: 0; }
.pill, .badge, .tag { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; }
.pill.success { background: #c9f7cf; color: #15843b; }
.badge, .tag { background: #eef2f7; color: #667085; text-transform: uppercase; }
.split-line { height: 1px; background: var(--line); margin: 22px 0; }
.progress, .usage-meter { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin: 12px 0; }
.progress span { display: block; width: 70%; height: 100%; background: var(--blue); border-radius: inherit; }
.usage-meter span { display: block; width: 0; height: 100%; background: var(--blue); border-radius: inherit; }
.health-card { margin: 28px 0 30px; padding: 16px 22px; }
.health-card > div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.plan-band, .plans-band { background: linear-gradient(115deg, #a8b6e4 0%, #aee5ee 48%, #f19ade 100%); border-radius: var(--radius); padding: 26px; }
.band-head { margin-bottom: 22px; }
.segment { background: white; padding: 5px; border-radius: var(--radius); display: inline-flex; gap: 4px; }
.segment button { border: 0; border-radius: 6px; background: transparent; padding: 10px 16px; color: #344054; font-weight: 600; }
.segment button.active { background: var(--blue); color: white; }
.capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.capability { position: relative; background: white; border: 1px solid #edf0f3; border-radius: var(--radius); padding: 24px; min-height: 320px; }
.capability.selected { border: 3px solid #111111; }
.capability .tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--blue); color: white; }
.price { font-size: 30px; font-weight: 600; color: #111111; margin-bottom: 14px; }
ul { padding-left: 18px; color: #26303f; line-height: 1.55; }
li::marker { color: var(--green); }
.primary, .secondary, .ghost, .danger, .icon-button { border-radius: var(--radius); min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; cursor: pointer; }
.primary { color: #ffffff; background: var(--blue); border: 0; padding: 0 18px; }
.primary:hover { background: var(--blue-2); }
.secondary { color: #344054; background: #ffffff; border: 1px solid #d8dde5; padding: 0 16px; }
.compact { min-height: 34px; padding: 0 12px; font-size: 12px; }
.wide { width: 100%; }
.ghost { color: var(--blue); background: transparent; border: 0; padding: 0 12px; }
.danger { width: 100%; color: #ffffff; background: var(--red); border: 0; margin-top: 16px; }
.icon-button { width: 42px; background: var(--workspace-tint); color: var(--blue); border: 0; }
.notice { display: flex; align-items: flex-start; gap: 10px; color: var(--blue); background: var(--workspace-tint); border: 1px solid #cbded4; border-radius: var(--radius); padding: 14px; font-size: 13px; font-weight: 600; margin-bottom: 22px; }
.connection-help { margin-bottom: 22px; padding: 20px; border: 1px solid #cbded4; border-radius: var(--radius); background: var(--workspace-tint); font-size: 14px; line-height: 1.6; }
.connection-help-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.connection-help h2 { margin: 0; font-size: 19px; line-height: 1.4; }
.connection-help-heading button { flex-shrink: 0; padding: 8px 10px; }
.connection-help p { margin: 12px 0; }
.connection-help ul { padding-left: 20px; margin: 12px 0 20px; }
.connection-help li + li { margin-top: 10px; }
.connection-help-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.connection-help-actions .action { white-space: normal; text-align: center; }
.connection-help:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 600px) {
  .connection-help { padding: 16px; }
  .connection-help-actions .action { width: 100%; justify-content: center; }
}
.section-label { font-size: 16px; font-weight: 600; margin: 16px 0 14px; }
.section-label.lower { margin-top: 34px; }
.platform-list { display: grid; gap: 8px; }
.platform-row { min-height: 74px; padding: 14px 16px; }
.platform-info { display: flex; align-items: center; gap: 14px; min-width: 0; }
.platform-logo, .app-dot, .avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; font-weight: 600; }
.platform-logo { border: 1px solid #e2e7ef; background: #ffffff; flex-shrink: 0; }
.app-dot, .avatar { background: var(--workspace-tint); color: var(--blue); }
.provider-logo-image { display: block; width: 25px; height: 25px; object-fit: contain; }
.platform-logo.google .provider-logo-image,
.snapshot-mark.google .provider-logo-image,
.account-avatar.google .provider-logo-image { width: 28px; height: 28px; }
.platform-logo.meta .provider-logo-image,
.snapshot-mark.meta .provider-logo-image,
.account-avatar.meta .provider-logo-image { width: 28px; height: 21px; }
.platform-logo.shopify .provider-logo-image,
.snapshot-mark.shopify .provider-logo-image,
.account-avatar.shopify .provider-logo-image { width: 25px; height: 25px; }
.platform-logo.tiktok .provider-logo-image,
.snapshot-mark.tiktok .provider-logo-image,
.account-avatar.tiktok .provider-logo-image { width: 30px; height: 30px; border-radius: 4px; }
.platform-info p, .third-party p { margin: 3px 0 0; font-size: 13px; }
.platform-signup a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.platform-signup svg { width: 14px; height: 14px; }
.platform-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.eyebrow { color: #087443; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.third-party { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.third-party article { padding: 16px; display: flex; align-items: center; gap: 14px; }
.third-party .badge { margin-left: auto; }
.tabs { max-width: 760px; margin: 0 auto 30px; display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 14px 18px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs button.active { color: #111827; border-color: var(--blue); }
.setup-page-head { max-width: 1080px; margin-left: auto; margin-right: auto; }
.setup-page-kicker, .setup-section-kicker { display: block; color: var(--blue); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.setup-page-head h1 { margin-top: 7px; font-size: 32px; }
.setup-page-head p { max-width: 720px; margin-bottom: 0; }
.setup-paths { max-width: 1080px; margin: 0 auto; display: grid; gap: 24px; }
.setup-section { padding: 26px; border: 1px solid #dde2ea; border-radius: 14px; background: #ffffff; box-shadow: 0 16px 46px rgba(15, 23, 42, 0.055); }
.setup-section-head { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; gap: 8px 15px; }
.setup-section-number { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #ffffff; background: var(--blue); font-size: 14px; font-weight: 600; box-shadow: 0 8px 20px rgba(6, 79, 67, 0.18); }
.setup-section-head h2 { margin: 4px 0 5px; font-size: 21px; }
.setup-section-head p { max-width: 700px; margin-bottom: 0; font-size: 14px; }
.setup-section-head > .pill { margin-top: 2px; }
.setup-tabs { max-width: none; margin: 24px 0 22px; padding: 5px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; overflow: visible; border: 1px solid #e3e7ed; border-radius: 10px; background: #f5f7fa; }
.setup-tabs button { min-height: 48px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; }
.setup-tabs button img { width: 22px; height: 22px; object-fit: contain; }
.setup-tabs button.active { border-color: #cbd8f3; background: #ffffff; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08); }
.setup-client-note { margin: -10px 0 22px; color: var(--muted); font-size: 13px; }
.setup-steps { margin: 0; padding: 0; list-style: none; display: grid; }
.setup-step { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; padding-bottom: 26px; }
.setup-step:last-child { padding-bottom: 0; }
.setup-step::before { content: ""; position: absolute; top: 38px; bottom: 6px; left: 15px; width: 2px; border-radius: 2px; background: var(--line); }
.setup-step:last-child::before { display: none; }
.setup-step-number { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: #edf0f4; color: #667085; font-size: 14px; font-weight: 600; }
.setup-step.active .setup-step-number { background: var(--blue); color: #ffffff; }
.setup-step.ready .setup-step-number { background: #15843b; color: #ffffff; }
.setup-step-body { min-width: 0; padding-top: 5px; }
.setup-step-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.setup-step-head .pill:not(.success) { background: #f2f4f7; color: #475467; }
.setup-step h3 { margin: 0; font-size: 16px; }
.setup-step p { max-width: 760px; margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.setup-step-body > .primary { margin-top: 14px; }
.setup-output { margin-top: 14px; overflow: hidden; border: 1px solid #dfe3e8; border-radius: 10px; background: #f7f8fa; }
.setup-output-head { min-height: 44px; padding: 6px 6px 6px 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; border-bottom: 1px solid #dfe3e8; background: #ffffff; color: #4b5563; font-size: 13px; font-weight: 600; }
.setup-output .action { min-height: 32px; padding: 0 11px; font-size: 13px; }
.setup-output .action svg { width: 15px; height: 15px; }
.setup-output pre { margin: 0; border-radius: 0; background: transparent; }
.setup-output .secret { min-height: 0; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.setup-command { overflow-x: auto; white-space: pre; word-break: normal; color: var(--text); line-height: 1.65; }
.setup-command code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.setup-prompt { padding: 6px 6px 6px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #ffffff; }
.setup-prompt code { min-width: 0; color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.platform-plugin-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.platform-plugin-card { min-height: 190px; padding: 22px; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 18px; border: 1px solid #e0e5ec; border-radius: 12px; background: linear-gradient(145deg, #ffffff, #fafbfc); }
.platform-plugin-logo { display: inline-grid; place-items: center; width: 58px; height: 58px; border: 1px solid #e2e6ec; border-radius: 14px; background: #ffffff; box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08); }
.platform-plugin-logo img { width: 31px; height: 31px; object-fit: contain; }
.platform-plugin-logo.claude { background: #fff8f4; border-color: #f3d9cb; }
.platform-plugin-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.platform-plugin-title { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.platform-plugin-title h3 { margin: 2px 0 0; font-size: 19px; }
.platform-plugin-copy p { margin: 13px 0 16px; font-size: 13px; }
.plugin-status { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.plugin-status.approved { color: #067647; background: #dcfae6; }
.plugin-status.soon { color: #4f46a5; background: #ede9fe; }
.platform-plugin-actions { margin-top: auto; display: grid; justify-items: start; gap: 9px; }
.platform-plugin-note, .platform-plugin-link { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; }
.platform-plugin-note { color: #667085; }
.platform-plugin-link { color: var(--blue); text-decoration: none; }
.platform-plugin-link:hover { text-decoration: underline; }
.platform-plugin-note svg, .platform-plugin-link svg { width: 15px; height: 15px; }
.empty-state { min-height: 280px; border-style: dashed; display: grid; place-items: center; text-align: center; padding: 36px; }
.empty-state svg { width: 42px; height: 42px; color: var(--purple); }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.code-panel, .keys { max-width: 640px; margin: 22px auto 0; }
pre { background: #f0f1f4; border-radius: 6px; padding: 14px; white-space: pre-wrap; word-break: break-word; color: #4b5563; font-size: 13px; overflow: auto; }
label { display: block; color: #4b5563; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
.doc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.doc-link { min-height: 96px; justify-content: flex-start; padding: 20px; color: #111827; font-weight: 600; text-align: left; }
.profile-card { max-width: 640px; margin: 0 auto; padding: 24px; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profile-card .avatar { width: 76px; height: 76px; border-radius: 999px; color: white; background: var(--blue); }
.profile-card input, .modal input { width: 100%; min-height: 42px; border: 1px solid #d0d5dd; border-radius: var(--radius); padding: 0 12px; background: #fbfcfd; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 340px; padding: 12px 14px; color: white; background: #111827; border-radius: var(--radius); box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28); }
dialog::backdrop { background: rgba(7, 11, 34, 0.42); }
.modal { padding: 26px; position: relative; }
.shopify-install-step {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid #dbe6ff;
  border-radius: var(--radius);
  background: #f6f9ff;
}
.shopify-install-step[hidden] { display: none; }
.shopify-install-step .secondary { width: 100%; }
.shopify-owned-step {
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid #dbe6ff;
  border-radius: var(--radius);
  background: #f6f9ff;
}
.shopify-owned-step[hidden] { display: none; }
.account-modal { background: var(--workspace-soft); }
.account-modal h2 { margin-bottom: 6px; padding-right: 36px; }
.account-modal .wide { width: 100%; margin-top: 14px; }
.close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 999px; background: #f2f4f7; display: grid; place-items: center; }
.secret { min-height: 48px; }
.search-box { display: flex; align-items: center; gap: 8px; background: #ffffff; border: 1px solid #d8dde5; border-radius: var(--radius); padding: 0 12px; }
.search-box svg { width: 16px; height: 16px; color: var(--muted); }
.search-box input { border: 0; background: transparent; min-height: 42px; outline: none; width: 100%; }
.account-list { display: grid; gap: 8px; max-height: 320px; overflow: auto; margin-top: 14px; }
.account-option { width: 100%; display: grid; grid-template-columns: 40px 1fr auto 30px; align-items: center; gap: 12px; min-height: 70px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #ffffff; text-align: left; cursor: pointer; }
.account-option.selected { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.account-avatar, .account-check { display: inline-grid; place-items: center; border-radius: 8px; }
.account-avatar { width: 34px; height: 34px; border: 1px solid #e2e7ef; background: #ffffff; color: var(--blue); }
.account-avatar svg, .account-check svg { width: 18px; height: 18px; }
.account-copy { min-width: 0; display: grid; gap: 3px; }
.account-copy span { color: var(--muted); font-size: 12px; }
.account-state { color: var(--green); font-size: 12px; font-weight: 600; }
.account-check { width: 26px; height: 26px; background: #edf0f4; color: transparent; }
.account-option.selected .account-check { background: var(--blue); color: #ffffff; }
.account-empty { padding: 18px; border: 1px dashed #cfd6e1; border-radius: var(--radius); color: var(--muted); text-align: center; background: #ffffff; }
.center { text-align: center; }
.center-column { max-width: 608px; margin: 0 auto; }
.keys-head { align-items: flex-start; margin-bottom: 22px; }
.keys-head h1 { margin: 0 0 8px; font-size: 24px; font-weight: 600; }
.keys-head p { max-width: 480px; margin-bottom: 0; color: #667085; font-size: 14px; font-weight: 600; }
.generate-top { width: 128px; min-height: 50px; padding: 0 16px; text-align: center; }
.key-empty { min-height: 238px; border-style: solid; margin-bottom: 22px; }
.key-empty svg { color: #98a2b3; width: 44px; height: 44px; }
.key-empty h2 { margin: 4px 0 8px; color: #667085; font-size: 16px; }
.key-empty p { margin-bottom: 18px; color: #98a2b3; font-size: 13px; font-weight: 600; }
.key-code-panel { max-width: none; margin: 0; padding: 18px 16px 16px; }
.key-code-panel .panel-title { margin-bottom: 4px; font-size: 14px; }
.key-code-panel .fine { margin-bottom: 16px; font-size: 11px; font-weight: 600; }
.key-code-panel label { margin-top: 12px; font-size: 12px; color: #475467; }
.key-code-panel pre { margin: 7px 0 0; background: #f2f3f6; color: #424958; font-weight: 600; }
.profile-column { max-width: 696px; margin: 0 auto; }
.profile-title { margin-bottom: 26px; }
.profile-title h1 { margin: 0; font-size: 28px; font-weight: 600; }
.account-card { max-width: none; padding: 26px; margin-bottom: 24px; }
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.profile-head strong { display: block; color: #101828; font-size: 20px; font-weight: 600; }
.profile-head p { margin: 3px 0 0; color: #667085; font-weight: 600; }
.profile-avatar { display: grid; place-items: center; width: 86px; height: 86px; border-radius: 999px; color: #ffffff; background: var(--blue); }
.profile-avatar svg { width: 48px; height: 48px; }
.profile-card input, .profile-card select, .modal input { width: 100%; min-height: 46px; border: 1px solid #d0d5dd; border-radius: var(--radius); padding: 0 12px; background: #fbfcfd; color: #344054; font-weight: 600; }
.profile-card select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #98a2b3 50%), linear-gradient(135deg, #98a2b3 50%, transparent 50%); background-position: calc(100% - 16px) 20px, calc(100% - 11px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.signout { min-height: 44px; margin-top: 24px; font-size: 15px; }
.language-card { max-width: none; padding: 26px; }
.language-card p { margin: 2px 0 14px; font-size: 13px; }
.visually-hidden { position: absolute; width: 1px !important; max-width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; border: 0; clip: rect(0 0 0 0); white-space: nowrap; }
.billing-title { margin: 0 0 32px; }
.billing-title h1 { margin: 0; font-size: 26px; font-weight: 600; }
.billing-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr); gap: 24px; align-items: stretch; margin-bottom: 30px; }
.billing-card { padding: 24px; }
.billing-card h2 { font-size: 20px; margin: 0 0 28px; font-weight: 600; }
.current-plan-card { min-height: 260px; }
.plan-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.plan-summary strong { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; }
.plan-summary .pill { margin-left: 10px; vertical-align: middle; }
.plan-summary.bottom { align-items: center; }
.right-metric { text-align: right; }
.right-metric strong { font-size: 18px; }
.inline-metric { display: flex; align-items: center; gap: 12px; }
.inline-metric svg { color: #98a2b3; }
.billing-side { display: grid; gap: 16px; }
.api-card { min-height: 166px; }
.api-card h2 { margin-bottom: 18px; }
.usage-totals { display: flex; justify-content: space-between; gap: 12px; color: #667085; font-size: 14px; font-weight: 600; }
.remaining { margin: 10px 0 6px; color: var(--green); font-weight: 600; }
.api-card .fine { display: flex; align-items: center; gap: 7px; color: #7b8496; font-size: 12px; }
.api-card .fine svg { width: 16px; height: 16px; }
.community-card { min-height: 76px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 14px; padding: 18px 20px; }
.community-card > svg { color: #6675ff; width: 28px; height: 28px; }
.community-card p { margin: 2px 0 0; font-size: 13px; }
.billing-health { margin: 0 0 32px; min-height: 58px; }
.plans-band { margin-top: 0; }
.plans-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.plans-head h2 { margin: 0 0 6px; font-size: 24px; font-weight: 600; }
.plans-head p { margin: 0; color: #101828; }
.billing-toggle { display: inline-flex; gap: 4px; padding: 5px; border-radius: var(--radius); background: #ffffff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.billing-toggle button { min-height: 38px; border: 0; border-radius: 6px; background: transparent; padding: 0 16px; color: #667085; font-weight: 600; cursor: pointer; }
.billing-toggle button.active { background: var(--blue); color: #ffffff; }
.billing-toggle span { margin-left: 6px; border-radius: 999px; padding: 2px 7px; background: #c9f7cf; color: #168039; font-size: 11px; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.plan-card { position: relative; min-height: 524px; border: 1px solid #e5e7ec; border-radius: var(--radius); background: #ffffff; padding: 28px 24px 24px; }
.plan-card.active { border: 3px solid #111111; padding: 26px 22px 22px; }
.plan-ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); border-radius: 5px; background: var(--blue); color: white; padding: 6px 14px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.plan-card h3 { margin: 0 0 22px; font-size: 22px; font-weight: 600; }
.plan-price { margin: 0 0 14px; color: #0f172a; font-size: 34px; line-height: 1; font-weight: 600; }
.plan-price span { color: #667085; font-size: 16px; font-weight: 600; }
.callout { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 30px; margin-bottom: 22px; border-radius: 7px; background: #eef3ff; color: var(--blue); padding: 8px 10px; font-size: 14px; font-weight: 600; }
.callout svg { width: 15px; height: 15px; }
.callout small { flex-basis: 100%; color: #6b8dff; font-size: 10px; line-height: 1.2; padding-left: 22px; }
.plan-card .primary { min-height: 40px; border-radius: 999px; margin-bottom: 22px; }
.savings { margin: -12px 0 16px; color: #475467; font-size: 12px; }
.savings strong { border-radius: 999px; background: #18a84a; color: white; padding: 3px 9px; font-size: 12px; }
.included { margin: 0 0 10px; color: #8a8f9b; font-size: 13px; font-weight: 600; }
.plan-card ul { margin: 0; padding-left: 22px; color: #111827; line-height: 1.45; }
.plan-card li { margin-bottom: 11px; }
.plan-card li::marker { color: var(--green); }
/* Disabled actions (Coming soon / current plan) for plan + connection buttons. */
button:disabled, .primary:disabled, .secondary:disabled { cursor: not-allowed; opacity: 0.55; }
.primary:disabled:hover { background: var(--blue); }
.billing-toggle button:disabled { opacity: 0.6; }
/* Coming-soon platform connections (Shopify, Meta) */
.badge.badge-soon { background: #fff4e5; color: #b25f00; }
.badge.badge-review { background: #fff1c7; color: #8a5700; }
.badge.badge-review-approved { background: #dcfae6; color: #067647; }
/* Paid plans preview: grayed out until billing is live */
.plans-soon-note { display: flex; align-items: center; gap: 8px; margin: -14px 0 24px; color: #344054; background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(16, 24, 40, 0.1); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; font-weight: 600; }
.plans-soon-note svg { width: 15px; height: 15px; flex: 0 0 auto; }
.plan-ribbon.soon { background: #667085; }
.plan-card.disabled { opacity: 0.6; }
.snapshot-section { margin-top: 6px; padding: 26px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff; }
.snapshot-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.snapshot-head h2 { margin: 4px 0 6px; font-size: 24px; font-weight: 600; }
.snapshot-head p { margin: 0; }
.snapshot-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.snapshot-filters { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: #f7f8fa; }
.snapshot-filters button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: #667085; cursor: pointer; font-size: 12px; font-weight: 600; }
.snapshot-filters button.active { color: #ffffff; background: var(--navy); }
.snapshot-period { display: grid; gap: 4px; color: #667085; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.snapshot-period select { min-height: 42px; padding: 0 34px 0 12px; border: 1px solid #d0d5dd; border-radius: 8px; background: #ffffff; color: #344054; font-weight: 600; }
.snapshot-status { min-height: 20px; margin: 22px 0 10px; color: #667085; font-size: 12px; font-weight: 600; }
.snapshot-empty { display: flex; align-items: center; gap: 16px; padding: 22px; border: 1px dashed #cfd5df; border-radius: 10px; background: #fafbfc; }
.snapshot-empty p { margin: 3px 0 0; font-size: 13px; }
.snapshot-empty .action { margin-left: auto; text-decoration: none; }
.snapshot-empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: #eaf1ff; color: var(--blue); }
.snapshot-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 18px; align-items: start; }
.snapshot-ledger { display: grid; gap: 8px; }
.snapshot-row { display: grid; grid-template-columns: minmax(190px, 1.3fr) repeat(3, minmax(86px, 0.7fr)) 24px; align-items: center; gap: 12px; width: 100%; min-height: 82px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #ffffff; color: inherit; text-align: left; cursor: pointer; }
.snapshot-row:hover { border-color: #aeb9ca; box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06); }
.snapshot-row.selected { border-color: #315efb; box-shadow: 0 0 0 2px rgba(49, 94, 251, 0.12); }
.snapshot-account { display: flex; align-items: center; gap: 11px; min-width: 0; }
.snapshot-mark { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid #e2e7ef; border-radius: 9px; background: #ffffff; }
.snapshot-account-copy { min-width: 0; }
.snapshot-account-copy strong, .snapshot-account-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snapshot-account-copy span { margin-top: 3px; color: #667085; font-size: 11px; }
.snapshot-primary { margin-left: 5px; color: #1f6d3a; font-size: 10px; font-style: normal; font-weight: 600; text-transform: uppercase; }
.snapshot-metric span, .snapshot-detail-metric span { display: block; color: #667085; font-size: 10px; font-weight: 600; text-transform: uppercase; }
.snapshot-metric strong { display: block; margin-top: 4px; font-size: 15px; }
.snapshot-row > svg { width: 18px; height: 18px; color: #98a2b3; }
.snapshot-detail { min-height: 264px; padding: 20px; border: 1px solid #dce1e9; border-radius: 10px; background: #f8fafc; }
.snapshot-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.snapshot-detail-head h3 { margin: 2px 0 4px; font-size: 19px; }
.snapshot-detail-head p { margin: 0; font-size: 12px; }
.snapshot-detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.snapshot-state { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; color: #18713c; background: #d9f7e1; font-size: 10px; font-weight: 600; text-transform: uppercase; }
.snapshot-state.partial, .snapshot-state.busy { color: #8b5b00; background: #fff0c7; }
.snapshot-state.unavailable { color: #9d2828; background: #ffe0e0; }
.snapshot-manage-link { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 9px; border: 1px solid #d8dde5; border-radius: 8px; color: var(--blue); background: #ffffff; font-size: 10px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.snapshot-manage-link:hover { border-color: #aeb9ca; background: #f8faff; }
.snapshot-manage-link svg { width: 13px; height: 13px; }
.snapshot-detail-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.snapshot-detail-metric { padding: 12px; border: 1px solid #e2e7ef; border-radius: 8px; background: #ffffff; }
.snapshot-detail-metric strong { display: block; margin-top: 5px; font-size: 19px; }
.snapshot-breakdown { display: grid; gap: 9px; }
.snapshot-breakdown-title { display: flex; align-items: center; justify-content: space-between; color: #344054; font-size: 12px; font-weight: 600; }
.snapshot-bar-row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(80px, 1.2fr) auto; align-items: center; gap: 8px; color: #475467; font-size: 11px; }
.snapshot-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snapshot-bar { height: 7px; overflow: hidden; border-radius: 999px; background: #e5eaf1; }
.snapshot-bar span { display: block; height: 100%; border-radius: inherit; background: #4b72f2; }
.snapshot-unavailable-note { margin: 18px 0 0; padding: 12px; border-radius: 8px; color: #7a4c00; background: #fff6dc; font-size: 12px; }
.snapshot-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; color: #667085; font-size: 11px; }
.snapshot-foot span, .snapshot-foot a { display: inline-flex; align-items: center; gap: 6px; }
.snapshot-foot svg { width: 14px; height: 14px; }
.snapshot-foot a { color: var(--blue); font-weight: 600; text-decoration: none; }
.connections-data-note { display: flex; align-items: center; gap: 9px; margin: 18px 0 0; color: #667085; font-size: 12px; }
.connections-data-note svg { width: 16px; height: 16px; color: #6675ff; }
.connections-data-note a { color: var(--blue); font-weight: 600; text-decoration: none; }
.connections-data-note a:hover { text-decoration: underline; }
@media (max-width: 980px) {
  .auth-gate { padding: 82px 16px 60px; align-items: start; }
  .auth-brand { top: 24px; left: 20px; }
  .auth-card { padding: 28px 20px 24px; }
  .auth-card h1 { font-size: 28px; }
  .auth-assurance { width: min(490px, calc(100vw - 32px)); }
  .auth-float { display: none; }
  /* The drawer is outside grid flow; both desktop nav preferences need one content column. */
  .shell, body.nav-expanded .shell { grid-template-columns: minmax(0, 1fr); }
  /* On mobile the sidebar becomes an off-canvas drawer opened by the hamburger. */
  .sidebar {
    display: flex !important;
    position: fixed;
    inset: 0 auto 0 0;
    height: 100vh;
    /* Follow Safari's visible viewport as its browser controls expand/collapse. */
    height: 100dvh;
    width: min(280px, 82vw);
    transform: translateX(-100%);
    z-index: 70;
    padding: 20px 14px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    box-shadow: none;
  }
  /* Keep footer/plan content in the drawer's scroll flow on short screens. */
  .sidebar > * { flex-shrink: 0; }
  body.nav-ready .sidebar { transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1); }
  body.mobile-nav-open .sidebar { transform: translateX(0); box-shadow: 6px 0 40px rgba(15, 23, 42, 0.35); }
  /* Always show the full labelled nav inside the drawer, regardless of the desktop collapse state.
     Labels are visible here, so restore the icon→label gap that the collapsed-rail rule zeroes out. */
  .sidebar .brand { justify-content: flex-start !important; padding: 0 9px !important; gap: 10px !important; }
  .sidebar .nav a { justify-content: flex-start !important; padding: 0 9px !important; gap: 12px !important; }
  .sidebar .brand span:last-child, .sidebar .nav a span { opacity: 1 !important; max-width: 200px !important; overflow: visible !important; }
  .nav-toggle { display: none !important; }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 60; opacity: 0; pointer-events: none; }
  body.nav-ready .nav-backdrop { transition: opacity 200ms ease; }
  body.mobile-nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  body.mobile-nav-open { overflow: hidden; }
  .mobile-menu { display: inline-grid !important; }
  .mobile-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
  .mobile-bar .brand { color: var(--text); padding: 0; margin-right: auto; gap: 10px !important; }
  .mobile-bar .brand span:last-child { opacity: 1; max-width: none; overflow: visible; white-space: normal; }
  .top-grid, .capability-grid, .third-party, .platform-plugin-grid, .doc-grid, .billing-grid, .pricing-grid { grid-template-columns: 1fr; }
  .page-head, .band-head, .plans-head, .health-card, .platform-row { align-items: stretch; flex-direction: column; }
  .community-card { grid-template-columns: 34px 1fr; }
  .community-card button { grid-column: 1 / -1; }
  .right-metric { text-align: left; }
  .plan-summary { flex-direction: column; }
  .platform-actions { justify-content: stretch; }
  .platform-actions .action { flex: 1 1 180px; }
  .main { padding: 18px 14px 48px; }
  .center-column, .profile-column { max-width: none; }
  .keys-head { gap: 16px; }
  .generate-top { width: 100%; }
  .profile-head { align-items: flex-start; }
  .snapshot-head, .snapshot-foot { align-items: stretch; flex-direction: column; }
  .snapshot-controls { justify-content: flex-start; }
  .snapshot-layout { grid-template-columns: 1fr; }
  .snapshot-row { grid-template-columns: minmax(170px, 1.2fr) repeat(3, minmax(76px, 0.7fr)) 20px; overflow-x: auto; }
}

@media (max-width: 640px) {
  .setup-section { padding: 18px; }
  .setup-section-head { grid-template-columns: 36px minmax(0, 1fr); }
  .setup-section-head > .pill { grid-column: 2; justify-self: start; }
  .setup-tabs { grid-template-columns: 1fr; }
  .setup-step { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
  .setup-step::before { top: 34px; left: 13px; }
  .setup-step-number { width: 28px; height: 28px; font-size: 13px; }
  .setup-step-body { padding-top: 3px; }
  .setup-prompt { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
  .platform-plugin-card { grid-template-columns: 48px minmax(0, 1fr); padding: 18px; gap: 14px; }
  .platform-plugin-logo { width: 48px; height: 48px; border-radius: 12px; }
  .platform-plugin-logo img { width: 27px; height: 27px; }
  .platform-plugin-title { align-items: flex-start; flex-direction: column; }
  .snapshot-section { padding: 18px; }
  .snapshot-filters { width: 100%; }
  .snapshot-filters button { flex: 1; padding: 0 8px; }
  .snapshot-period { width: 100%; }
  .snapshot-period select { width: 100%; }
  .snapshot-empty { align-items: flex-start; flex-wrap: wrap; }
  .snapshot-empty .action { width: 100%; margin-left: 0; }
  .snapshot-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .snapshot-row .snapshot-metric { display: none; }
  .snapshot-row > svg { justify-self: end; }
}

/* --- Automation pages: Objectives and Guardrails (issue #239) ------------------------- */
.callout.warn { background: #fdf3e3; color: #8a5a00; align-items: flex-start; }
.callout.warn strong { display: block; }
.callout.warn p { margin: 4px 0 0; font-weight: 500; font-size: 13px; line-height: 1.5; }
.callout.warn code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.callout > div { flex: 1; min-width: 0; }

.growth-form { display: grid; gap: 18px; }
.growth-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 18px; margin: 0; }
.growth-form legend { font-size: 13px; font-weight: 600; padding: 0 6px; color: var(--text); }
.growth-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.growth-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text); }
.growth-form label .fine { font-weight: 500; color: var(--muted); }
.growth-form input[type="text"], .growth-form input[type="number"], .growth-form select {
  border: 1px solid var(--line); border-radius: 7px; padding: 9px 10px;
  font: inherit; font-size: 13px; font-weight: 500; background: var(--panel); color: var(--text);
}
.growth-form input:focus-visible, .growth-form select:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 1px;
}
.field-legend { font-size: 12px; font-weight: 600; color: var(--muted); margin: 16px 0 7px; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check-row .check { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.form-error { color: var(--red); font-size: 13px; font-weight: 600; margin: 0; }

.kv-list { display: grid; grid-template-columns: minmax(140px, auto) minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 14px; }
.kv-list dt { color: var(--muted); font-weight: 600; }
.kv-list dd { margin: 0; overflow-wrap: anywhere; }

.version-list { display: grid; gap: 0; }
.version-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.version-row:first-child { border-top: 0; }
.version-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }
.badge.ok { background: #e7f8ec; color: #12833c; }
.growth-record-row { align-items: flex-start; }
.growth-record-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.growth-record-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }

/* --- Reviews, Scheduled, Activity (issue #239) ---------------------------------------- */
.nav-count {
  margin-left: auto; background: var(--blue); color: #fff; font-size: 10.5px;
  font-weight: 600; min-width: 18px; height: 18px; border-radius: 9px;
  display: grid; place-items: center; padding: 0 5px; flex: none;
}
/* The rail is COLLAPSED by default, and the generic rule that hides labels there
   (`.nav a span { opacity: 0; max-width: 0 }`) also hid this badge — so the one signal on the
   nav that asks for attention was invisible in the default state. Collapsed, it becomes a dot
   on the icon; expanded, it returns to a counted pill. */
body:not(.nav-expanded) .nav a .nav-count {
  position: absolute; top: 6px; right: 10px; margin: 0; padding: 0;
  min-width: 8px; width: 8px; height: 8px; border-radius: 50%;
  opacity: 1; max-width: 8px; overflow: hidden; color: transparent;
  box-shadow: 0 0 0 2px var(--rail);
}
body:not(.nav-expanded) .nav a { position: relative; }
body.nav-expanded .nav a .nav-count { opacity: 1; max-width: 40px; }
.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 26px 0 10px;
}
.section-label:first-of-type { margin-top: 8px; }

.review-card, .run-card, .run-row { margin-bottom: 12px; }
.review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.review-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.button-row.start { justify-content: flex-start; align-items: center; }
.growth-empty { text-align: center; }
.growth-empty p { margin: 0; }

.run-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.disclosure { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.disclosure-body { display: grid; gap: 14px; }
.disclosure-node { border-left: 3px solid var(--blue); padding-left: 14px; }

.reason-list { margin: 0; padding-left: 20px; display: grid; gap: 5px; font-size: 13px; color: var(--text); }
/* A blocked proposal now leads with WHAT it would change, so that preview needs to read as
   information rather than as something already agreed to: same left rule as an approvable node,
   no approve affordance anywhere near it. */
.proposed-changes { display: grid; gap: 12px; }
.proposed-changes > p.fine { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--muted); }
.proposed-change { border-left: 3px solid var(--line); padding-left: 14px; display: grid; gap: 6px; }
.callout.warn .reason-list { color: inherit; font-weight: 500; margin-top: 6px; }
.callout.warn .next-step { margin-top: 10px; font-weight: 500; font-size: 13px; line-height: 1.5; }
.callout.warn .next-step strong { display: inline; }
/* Overriding StoreAdOps' own advice is a deliberate, recorded act, so the control that does it
   is styled as consequential rather than as an ordinary next step. */
.action.danger { border-color: #d9534f; color: #b4221f; }
button.primary.action.danger { background: #b4221f; border-color: #b4221f; color: #fff; }
.override-confirm { margin-top: 14px; }
.override-confirm .button-row { margin-top: 12px; }
/* Consent vocabulary and the opaque revision ref are support material, not decision material. */
details.tech { border-top: 1px solid var(--line); padding-top: 10px; }
details.tech summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); }
details.tech .kv-list { margin-top: 10px; font-size: 13px; }
.reason-list.warn { color: #8a5a00; }
.warn-text { color: #8a5a00; font-weight: 600; }

/* Outcome tone. outcome_unknown gets its own colour on purpose: it is a third state, and
   showing it as either success or failure would be a lie about a provider write. */
.badge.info { background: #eaf1fe; color: var(--blue-2); }
.badge.warn { background: #fdf3e3; color: #8a5a00; }
.badge.bad { background: #fdeaea; color: #b4221f; }
.badge.unknown { background: #f2effe; color: #4b3fd6; }
.badge.mute { background: #f1f3f7; color: var(--muted); }
.run-card.stripe-ok { border-left: 3px solid var(--green); }
.run-card.stripe-bad { border-left: 3px solid var(--red); }
.run-card.stripe-warn { border-left: 3px solid #d99a1f; }
.run-card.stripe-unknown { border-left: 3px solid var(--purple); }
.run-card.stripe-info { border-left: 3px solid var(--blue); }
.run-card.stripe-mute { border-left: 3px solid var(--line); }

button.danger {
  background: var(--panel); border: 1px solid #f3c9c8; color: var(--red);
  border-radius: 7px; padding: 8px 13px; font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
button.danger:hover { background: #fdf2f2; }

/* Group headings in the rail. Ten primary items in one flat list gave no clue that accounts,
   automation, and developer tooling are different kinds of thing. Collapsed, the label cannot
   be read, so it degrades to a plain divider rather than disappearing entirely. */
.nav-group {
  margin: 14px 0 4px; padding: 0 10px; color: var(--muted);
  font-size: 12px; font-weight: 500;
}
.nav-group span { display: block; overflow: hidden; white-space: nowrap; }
body.nav-ready .nav-group span { transition: opacity 200ms, max-width 260ms cubic-bezier(.4, 0, .2, 1); }
body:not(.nav-expanded) .nav-group {
  margin: 10px 12px 8px; padding: 0; border-top: 1px solid var(--line);
}
body:not(.nav-expanded) .nav-group span { opacity: 0; max-width: 0; height: 0; }
body.nav-expanded .nav-group span { opacity: 1; max-width: 180px; }
