:root {
  --surface-canvas: #eceffb;
  --surface-default: #ffffff;
  --surface-subtle: #eef3f8;
  --text-default: #1a1d2e;
  --text-muted: #5b6075;
  --text-on-action: #ffffff;
  --action-primary: #5a8dff;
  --action-primary-hover: #4778e2;
  --focus-indicator: #386fd9;
  --boundary-strong: #8a91ac;
  --divider-weak: rgb(26 29 46 / 14%);
  --status-positive: #0b6b4b;
  --status-attention: #8a4b00;
  --status-critical: #b42318;
  --status-info: #075bb5;
  --status-positive-bg: #e7f6ef;
  --status-attention-bg: #fff4d6;
  --status-critical-bg: #fdecea;
  --status-info-bg: #e8f2fc;
  --control-disabled-bg: #e2e8f0;
  --control-disabled-text: #52647a;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-raised: 0 0 0 1px rgb(26 29 46 / 6%), 0 12px 28px rgb(58 89 199 / 16%);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  font: 16px/1.5 var(--font-sans);
  color: var(--text-default);
  background: var(--surface-canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--surface-canvas); }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 12% -10%, #ffffff 0, transparent 38rem), radial-gradient(circle at 100% 0%, rgb(90 141 255 / 14%) 0, transparent 34rem), var(--surface-canvas); }
a { color: var(--action-primary); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus-indicator); outline-offset: 3px; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: fixed; z-index: 500; left: 16px; top: -5rem; padding: 10px 14px; color: white; background: var(--text-default); border-radius: var(--radius-sm); }
.skip:focus { top: 16px; }

.topbar { position: sticky; top: 0; z-index: 100; min-height: 68px; background: rgb(255 255 255 / 96%); border-bottom: 1px solid var(--divider-weak); backdrop-filter: blur(12px); }
.topbar-inner { min-height: 68px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-default); font-weight: 800; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; color: white; background: linear-gradient(145deg, #5a8dff, #8b6bf0); border-radius: 10px; font-size: 13px; }
.brand em { color: var(--action-primary); font-style: normal; }
.tenant-label { margin-right: auto; color: var(--text-muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions form { margin: 0; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; gap: 8px; padding: 0 16px; border: 1px solid var(--boundary-strong); border-radius: var(--radius-sm); color: var(--text-default); background: var(--surface-default); font-weight: 700; text-decoration: none; transition: background 120ms ease-out, border-color 120ms ease-out, transform 120ms ease-out; }
.button:hover { border-color: var(--action-primary); transform: translateY(-1px); }
.button-primary { color: var(--text-default); background: var(--action-primary); border-color: var(--action-primary); box-shadow: 0 4px 14px rgb(90 141 255 / 30%); }
.button-primary:hover { color: white; background: var(--action-primary-hover); border-color: var(--action-primary-hover); }
.button-quiet { min-height: 36px; padding-inline: 10px; color: var(--text-muted); border-color: transparent; background: transparent; }
.button-quiet:hover { color: var(--text-default); background: var(--surface-subtle); border-color: var(--divider-weak); }
.button.secondary { color: white; background: #1a1d2e; border-color: #1a1d2e; }
button[disabled], .button[aria-disabled="true"] { color: var(--control-disabled-text); background: var(--control-disabled-bg); border-color: var(--control-disabled-bg); cursor: not-allowed; transform: none; }
input:disabled, select:disabled, textarea:disabled { color: var(--control-disabled-text); background: var(--control-disabled-bg); cursor: not-allowed; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; gap: 8px; padding: 0 14px; border: 1px solid var(--boundary-strong); border-radius: var(--radius-sm); font-weight: 700; }
.btn-primary { color: var(--text-default); background: var(--action-primary); border-color: var(--action-primary); box-shadow: 0 4px 14px rgb(90 141 255 / 30%); }
.btn-secondary { color: var(--text-default); background: var(--surface-default); border-color: var(--boundary-strong); }
.btn-ghost { color: var(--text-default); background: transparent; border-color: transparent; }
.btn-block { width: 100%; }
.tag { display: inline-flex; width: max-content; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; color: var(--text-muted); background: var(--surface-subtle); font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag-accent { color: #315fb8; background: #dce8ff; }
.tag-accent-2 { color: #6244ba; background: #e9e1ff; }
.tag-neutral { color: var(--text-muted); background: #e3e7f7; }
.card-kicker { color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.card-title { color: var(--text-default); font-weight: 600; }
.hr { height: 1px; background: var(--divider-weak); }
.field { display: grid; gap: 6px; }
.input { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--text-default); background: var(--surface-default); border: 1px solid var(--boundary-strong); border-radius: var(--radius-sm); }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-subtle); border-radius: var(--radius-sm); }
.seg-opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; color: var(--text-muted); font-size: 12px; cursor: pointer; }
.seg-opt:has(input:checked) { color: var(--text-default); background: var(--surface-default); box-shadow: 0 1px 2px rgb(26 29 46 / 12%); }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }

.shell-body { flex: 1; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { min-height: calc(100vh - 68px); padding: 24px 16px; background: var(--surface-default); border-right: 1px solid var(--divider-weak); }
.sidebar nav { display: grid; gap: 4px; }
.sidebar a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.sidebar a:hover, .sidebar a:focus-visible { color: var(--text-default); background: var(--surface-subtle); }
.sidebar-label { margin: 0 12px 8px; color: var(--text-muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-label-spaced { margin-top: 28px; }
.mobile-nav { display: none; width: min(100% - 40px, 1120px); margin: 16px auto 0; border: 1px solid var(--divider-weak); border-radius: var(--radius-md); background: var(--surface-default); box-shadow: var(--shadow-raised); }
.mobile-nav summary { min-height: 44px; padding: 11px 16px; color: var(--text-default); font-weight: 800; cursor: pointer; }
.mobile-nav-panel { padding: 0 12px 12px; border-top: 1px solid var(--divider-weak); }
.mobile-nav-panel .sidebar-label { margin: 12px 8px 6px; }
.mobile-nav-panel nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; }
.mobile-nav-panel nav a { min-height: 44px; padding: 11px 12px; color: var(--text-default); border-radius: var(--radius-sm); font-weight: 700; text-decoration: none; }
.mobile-nav-panel nav a:hover, .mobile-nav-panel nav a:focus-visible { background: var(--surface-subtle); }
.page-content { width: 100%; min-width: 0; }

main > .shell, main > section.shell { max-width: 1120px; }
.page-head { padding-block: 44px 28px; }
.page-head h1, .page-head h2 { margin: 4px 0 10px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
.eyebrow { margin: 0; color: var(--action-primary); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.lede { max-width: 680px; margin: 0; color: var(--text-muted); font-size: 1.05rem; }
.fine, .muted, small { color: var(--text-muted); }
.section { padding-bottom: 40px; }
.panel-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; background: var(--surface-subtle); border: 1px solid var(--divider-weak); border-radius: var(--radius-md); }
.panel-tab { padding: 9px 13px; color: var(--text-muted); border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; text-decoration: none; }
.panel-tab:hover, .panel-tab.active { color: var(--text-default); background: var(--surface-default); box-shadow: var(--shadow-raised); }
.card-subsection { padding: 16px 0; border-top: 1px solid var(--divider-weak); }
.card-subsection h3 { margin: 0 0 8px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; }
.checkbox-row input { width: 16px; height: 16px; }
.email-limit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; background: var(--surface-subtle); border-radius: var(--radius-sm); }
.email-limit-grid span { display: grid; gap: 2px; }
.email-limit-grid strong { font-size: 1.1rem; }
.email-limit-grid small { font-size: 11px; }
.setup-steps { display: grid; gap: 8px; padding-left: 22px; color: var(--text-muted); }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 18px; background: var(--surface-subtle); border: 1px solid var(--divider-weak); border-radius: var(--radius-md); }
.callout h3, .callout p { margin: 0; }
.empty-state { display: grid; gap: 10px; }
.empty-state h2, .empty-state p { margin: 0; }
@media (max-width: 700px) { .callout { align-items: stretch; flex-direction: column; } }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--divider-weak); }
.section-title h2, .section-title h3 { margin: 0; }

.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding-block: 84px; }
.hero h1 { max-width: 13ch; margin: 8px 0 20px; font-size: clamp(2.8rem, 7vw, 5.5rem); line-height: .98; }
.hero .lede { font-size: 1.2rem; }
.signal-card, .action-card, .card, .state-panel, .receipt { padding: 24px; background: var(--surface-default); border: 1px solid var(--divider-weak); border-radius: var(--radius-md); box-shadow: var(--shadow-raised); }
.signal-card ol { list-style: none; padding: 0; margin: 16px 0 0; }
.signal-card li { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--divider-weak); }
.signal-card li strong { color: var(--action-primary); }
.ink { color: white; background: var(--text-default); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; padding-block: 28px; }
.metrics div { display: grid; gap: 4px; padding: 8px 24px; border-left: 1px solid rgb(255 255 255 / 22%); }
.metrics span { color: #c7d4e3; font-size: 14px; }
.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-bottom: 36px; }
.metric-card { display: grid; gap: 6px; padding: 18px 20px; background: var(--surface-default); border: 1px solid var(--divider-weak); border-left: 4px solid var(--action-primary); border-radius: var(--radius-md); box-shadow: var(--shadow-raised); }
.metric-card span { color: var(--text-muted); font-size: 13px; font-weight: 700; }
.metric-card strong { font-size: 2rem; line-height: 1; }
.metric-card small { font-size: 12px; }
.metric-purple { border-left-color: #8b6bf0; }
.empty-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 8px; color: #6244ba; background: #e9e1ff; border-radius: 50%; font-size: 24px; }
.login-wrap { display: grid; min-height: calc(100vh - 136px); place-items: center; padding: 48px 16px; }
.auth-card { width: min(100%, 380px); padding: 28px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 24px; font-size: 18px; font-weight: 800; }
.auth-brand em { color: var(--action-primary); font-style: normal; }
.auth-card h1 { margin: 4px 0 6px; font-size: 32px; }
.auth-card .muted { margin: 0 0 20px; color: var(--text-muted); }
.button-block { width: 100%; }
.auth-error { margin: 16px 0; padding: 12px; color: var(--status-critical); background: var(--status-critical-bg); border: 1px solid rgb(180 35 24 / 24%); border-radius: var(--radius-sm); font-size: 14px; }
.error-page { display: grid; min-height: min(68vh, 720px); place-items: center; padding-top: 48px; padding-bottom: 48px; }
.error-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; width: min(100%, 760px); padding: clamp(24px, 5vw, 48px); }
.error-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; color: var(--status-critical); background: var(--status-critical-bg); border: 2px solid rgb(180 35 24 / 30%); border-radius: 50%; font-size: 28px; font-weight: 800; }
.error-panel h1 { margin: 4px 0 12px; max-width: 18ch; }
.error-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.error-reference { margin: 24px 0 0; color: var(--text-muted); font-size: 14px; overflow-wrap: anywhere; }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.status-card { display: grid; align-content: start; gap: 10px; }
.status-card h2, .status-card p { margin: 0; }
.status-card .status { justify-self: start; margin-top: 8px; }
.status-help { display: grid; gap: 12px; }
.status-help h2, .status-help p { margin: 0; }
.auth-divider { height: 1px; margin: 20px 0 14px; background: var(--divider-weak); }
.auth-note { margin: 0; color: var(--text-muted); font-size: 12px; text-align: center; }
.signup-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: clamp(36px, 8vw, 112px); align-items: center; min-height: calc(100vh - 136px); padding-block: 56px; }
.signup-story h1 { max-width: 12ch; margin: 8px 0 18px; font-size: clamp(2.5rem, 6vw, 4.6rem); line-height: 1; }
.signup-story .lede { max-width: 50ch; }
.signup-steps { display: grid; gap: 10px; margin-top: 28px; }
.signup-steps > div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: rgb(255 255 255 / 76%); border: 1px solid var(--divider-weak); border-radius: var(--radius-md); }
.signup-steps > div > span { display: grid; place-items: center; width: 30px; height: 30px; color: #1a1d2e; background: #dce8ff; border-radius: 50%; font-weight: 800; }
.signup-steps p { display: grid; gap: 2px; margin: 0; }
.signup-steps small { color: var(--text-muted); }
.signup-card { display: grid; gap: 16px; padding: 28px; }
.signup-card .auth-brand { justify-content: flex-start; margin-bottom: 4px; }
.signup-card h2 { margin: 0; }
.signup-card > .muted { margin: -8px 0 4px; }
.plan-picker { display: grid; gap: 8px; }
.plan-picker > span { font-weight: 700; }
.plan-picker > div { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-page { padding-bottom: 32px; }
.admin-head { padding-bottom: 24px; }
.admin-grid { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.65fr); gap: 20px; align-items: start; }
.admin-create-card { border-top: 4px solid var(--action-primary); }
.admin-create-card h2 { margin: 4px 0 8px; }
.admin-accounts-card { min-width: 0; }
.admin-accounts-card .section-title { align-items: center; }
.admin-accounts-card table { min-width: 820px; font-size: 13px; }
.admin-accounts-card th { white-space: nowrap; }
.row-actions { min-width: 210px; }
.row-actions form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.row-actions select { min-height: 34px; width: auto; padding-block: 5px; font-size: 12px; }
.row-actions .button { min-height: 34px; padding-inline: 9px; font-size: 12px; }
.admin-section { padding-top: 24px; }
.admin-section .page-head { padding-block: 0 18px; }
.admin-wide-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.admin-wide-form > button { width: max-content; }
.offer-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.offer-grid { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.offer-grid form { border-top: 4px solid #8b6bf0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.email-builder details > summary { cursor: pointer; color: var(--text-default); }
.email-builder textarea { min-height: 150px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.45; }
.email-builder .preset-grid .project-card { min-height: 200px; }
.email-template-list { margin-top: 24px; }
.email-template-card { scroll-margin-top: 24px; }
.email-template-card:target { border-color: var(--action-primary); box-shadow: 0 0 0 3px rgb(90 141 255 / 16%), var(--shadow-raised); }
.email-live-preview { display: grid; gap: 14px; padding: 18px; background: var(--surface-subtle); border: 1px solid var(--divider-weak); border-radius: var(--radius-md); }
.email-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.email-preview-toolbar h4, .email-test-panel h4 { margin: 2px 0 0; font-size: 1.05rem; }
.email-preview-toolbar .button.is-selected { color: white; background: var(--action-primary); border-color: var(--action-primary); }
.email-envelope-preview { overflow: hidden; background: white; border: 1px solid var(--divider-weak); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.email-envelope-head { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 10px; padding: 12px 16px; background: #f8f9fd; border-bottom: 1px solid var(--divider-weak); font-size: 13px; }
.email-envelope-head span { color: var(--text-muted); }
.email-preview-stage { width: 100%; padding: 20px; overflow: auto; background: #eef1f8; }
.email-preview-stage .email-preview { display: block; width: min(100%, 760px); min-height: 440px; margin: 0 auto; background: white; border: 0; box-shadow: 0 10px 28px rgb(29 35 65 / 12%); transition: width .18s ease; }
.email-preview-stage.is-mobile .email-preview { width: min(100%, 390px); }
.email-text-preview { max-height: 260px; overflow: auto; padding: 16px; white-space: pre-wrap; background: white; border: 1px solid var(--divider-weak); border-radius: var(--radius-sm); }
.email-test-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .75fr); gap: 18px; align-items: end; padding: 18px; color: #15233f; background: #edf4ff; border: 1px solid #cbdcff; border-radius: var(--radius-md); }
.email-test-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.email-editor { padding: 16px; border: 1px solid var(--divider-weak); border-radius: var(--radius-md); }
.email-editor > summary { margin-bottom: 14px; }
.email-composer { display: grid; gap: 12px; padding: 16px; background: var(--surface-subtle); border: 1px solid var(--divider-weak); border-radius: var(--radius-md); }
.email-composer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.email-composer-heading h4 { margin: 2px 0 0; font-size: 1.05rem; }
.email-composer-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 7px; background: var(--surface-default); border: 1px solid var(--boundary-strong); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.email-composer-toolbar button { min-width: 38px; min-height: 36px; padding: 6px 9px; color: var(--text-default); background: var(--surface-default); border: 1px solid transparent; border-radius: 5px; font-weight: 700; }
.email-composer-toolbar button:hover, .email-composer-toolbar button:focus-visible, .email-composer-toolbar button.is-active { color: var(--action-primary); background: var(--status-info-bg); border-color: var(--action-primary); outline: 0; }
.email-composer-surface { min-height: 280px; margin-top: -12px; overflow: auto; color: #1a1d2e; background: #fff; border: 1px solid var(--boundary-strong); border-top: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.email-prose { min-height: 278px; padding: 18px; outline: 0; }
.email-prose:focus { box-shadow: inset 0 0 0 3px rgb(0 95 204 / 18%); }
.email-prose p, .email-prose ul, .email-prose ol, .email-prose blockquote { margin: 0 0 12px; }
.email-prose h2 { margin: 18px 0 10px; font-size: 1.5rem; }
.email-prose a { color: #005fcc; text-decoration: underline; }
.email-prose img { max-width: 100%; height: auto; }
.email-prose p.is-editor-empty:first-child::before { float: left; height: 0; color: var(--text-muted); content: attr(data-placeholder); pointer-events: none; }
.email-composer-dialog { padding: 14px; background: var(--surface-default); border: 1px solid var(--action-primary); border-radius: var(--radius-sm); box-shadow: var(--shadow-raised); }
.email-composer-dialog[hidden] { display: none; }
.email-composer-dialog .muted { margin-bottom: 0; }
.email-composer-status { min-height: 1.25em; margin: 0; color: var(--action-primary); font-weight: 700; }
@media (max-width: 820px) {
  .email-preview-toolbar, .email-test-panel { align-items: stretch; grid-template-columns: 1fr; flex-direction: column; }
  .email-test-form, .email-envelope-head { grid-template-columns: 1fr; }
  .email-preview-stage { padding: 10px; }
  .email-preview-stage .email-preview { min-height: 520px; }
}
.offer-list { min-width: 0; }
.usage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.plan-page-head { padding-bottom: 20px; }
.plan-notice { margin: 0 0 22px; padding: 12px 14px; color: var(--status-positive); background: var(--status-positive-bg); border: 1px solid rgb(11 107 75 / 24%); border-radius: var(--radius-sm); font-weight: 700; }
.plan-editor-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .65fr); gap: 20px; align-items: start; }
.plan-form { border-top: 4px solid var(--action-primary); }
.plan-form h2, .plan-guide h2 { margin: 4px 0 8px; }
.plan-form small { display: block; font-weight: 500; }
.plan-validation { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; color: var(--status-critical); background: var(--status-critical-bg); border: 1px solid rgb(180 35 24 / 24%); border-radius: var(--radius-sm); }
.plan-allowance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-advanced { padding: 14px; background: var(--surface-subtle); border: 1px solid var(--divider-weak); border-radius: var(--radius-sm); }
.plan-advanced summary { cursor: pointer; font-weight: 800; }
.plan-advanced[open] summary { margin-bottom: 12px; }
.plan-guide { position: sticky; top: 92px; }
.plan-guide dl { display: grid; gap: 16px; margin: 18px 0 0; }
.plan-guide dl div { padding-top: 12px; border-top: 1px solid var(--divider-weak); }
.plan-guide dt { font-weight: 800; }
.plan-guide dd { margin: 4px 0 0; color: var(--text-muted); }
.plan-catalog { display: grid; gap: 16px; }
.plan-catalog-card { display: grid; gap: 18px; }
.plan-card-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.plan-card-head h3 { margin: 10px 0 3px; font-size: 1.35rem; }
.plan-card-head code { overflow-wrap: anywhere; }
.plan-price { display: flex; align-items: baseline; gap: 3px; font-size: 1.7rem; white-space: nowrap; }
.plan-price small { font-size: 12px; font-weight: 600; }
.plan-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.plan-metrics div { padding: 12px; background: var(--surface-subtle); border-radius: var(--radius-sm); }
.plan-metrics dt { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.plan-metrics dd { margin: 3px 0 0; font-size: 1.1rem; font-weight: 800; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-actions form { margin: 0; }
.plan-actions .button { min-height: 38px; }
.plan-warning { margin: 0; padding: 12px; color: var(--status-attention); background: var(--status-attention-bg); border-radius: var(--radius-sm); }
.plan-history-note { margin: 0; }
.plan-delete { padding-top: 14px; border-top: 1px solid var(--divider-weak); }
.plan-delete summary { width: max-content; color: var(--status-critical); cursor: pointer; font-weight: 700; }
.plan-delete form { max-width: 520px; margin-top: 14px; padding: 16px; background: var(--status-critical-bg); border-radius: var(--radius-sm); }
.plan-delete .plan-danger { color: white; background: var(--status-critical); border-color: var(--status-critical); }

.stack { display: grid; gap: 16px; }
.cube-page { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-block: 44px 56px; }
.cube-heading { display: flex; width: min(100%, 560px); align-items: end; justify-content: space-between; gap: 20px; }
.cube-heading h1 { margin: 4px 0 8px; font-size: clamp(2rem, 5vw, 3rem); }
.queue-count { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.disposition-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.disposition-tags strong { margin-left: 4px; }
.lead-cube-card { position: relative; isolation: isolate; width: min(100%, 560px); overflow: hidden; padding: 0; border-radius: var(--radius-lg); }
.lead-cube-card::before, .lead-cube-card::after { position: absolute; z-index: -1; inset: 18px 8px -8px; content: ""; background: var(--surface-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); }
.lead-cube-card::before { transform: rotate(-3deg); }
.lead-cube-card::after { inset: 10px 4px -4px; transform: rotate(2deg); }
.lead-photo-strip { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2px; height: 176px; background: #dbe4ff; }
.lead-photo-strip span { background: linear-gradient(145deg, #b7c9ff, #eef0ff 56%, #b8a7f1); }
.lead-photo-strip span:nth-child(2) { background: linear-gradient(145deg, #8b6bf0, #e9e1ff); }
.lead-photo-strip span:nth-child(3) { background: linear-gradient(145deg, #5a8dff, #dce8ff); }
.lead-cube-body { display: grid; gap: 12px; padding: 20px 22px 22px; }
.lead-cube-body h2 { margin: 0; font-size: 1.65rem; }
.lead-location { margin: -4px 0 4px; color: var(--text-muted); }
.lead-facts { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--divider-weak); border-bottom: 1px solid var(--divider-weak); }
.lead-facts div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.lead-facts span { color: var(--text-muted); }
.lead-facts strong { text-align: right; }
.cube-actions { display: grid; grid-template-columns: repeat(3, 1fr); width: min(100%, 560px); gap: 8px; }
.cube-actions .button { min-height: 46px; padding-inline: 10px; font-size: 13px; text-align: center; }
.cube-empty { width: min(100%, 560px); }
.queue-section { padding-bottom: 56px; }
.queue-grid { display: grid; gap: 8px; }
.queue-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text-default); background: var(--surface-default); border: 1px solid var(--divider-weak); border-radius: var(--radius-md); text-decoration: none; }
.queue-card:hover { border-color: var(--action-primary); }
.queue-card strong, .queue-card small { display: block; }
.queue-card small { margin-top: 2px; color: var(--text-muted); }
.queue-position { display: grid; place-items: center; width: 30px; height: 30px; color: var(--action-primary); background: var(--status-info-bg); border-radius: 50%; font-weight: 800; }
.studio-page { padding-block: 42px 56px; }
.studio-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.studio-header .back { margin-bottom: 12px; }
.studio-header h1 { margin: 4px 0 8px; }
.studio-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.studio-sidebar { display: grid; gap: 16px; }
.source-facts { display: grid; gap: 12px; margin: 0; }
.source-facts div { display: grid; gap: 2px; }
.source-facts dt { color: var(--text-muted); font-size: 12px; }
.source-facts dd { margin: 0; font-weight: 700; }
.check-row { display: flex; align-items: center; gap: 10px; color: var(--text-default); font-size: 14px; }
.check-muted { color: var(--text-muted); }
.check-dot { display: grid; place-items: center; width: 24px; height: 24px; color: white; background: var(--status-positive); border-radius: 50%; font-size: 12px; font-weight: 800; }
.check-muted .check-dot { color: var(--text-muted); background: var(--surface-subtle); }
.studio-action { border-color: rgb(90 141 255 / 36%); background: linear-gradient(145deg, #ffffff, #f4f6ff); }
.design-preset-fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.design-preset-fieldset legend { padding: 0; color: var(--text-strong); font-size: 16px; font-weight: 800; }
.design-preset-grid { display: grid; gap: 9px; }
.design-preset-card { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; padding: 12px; border: 1px solid var(--divider-weak); border-radius: var(--radius-md); background: var(--surface-default); cursor: pointer; }
.design-preset-card:has(input:checked) { border-color: var(--action-primary); box-shadow: 0 0 0 2px rgb(90 141 255 / 14%); }
.design-preset-card input { grid-row: 1 / span 4; align-self: start; margin-top: 4px; }
.design-preset-card strong, .design-preset-card span, .design-preset-card small { grid-column: 2; }
.design-preset-card span, .design-preset-card small { color: var(--text-muted); line-height: 1.35; }
.design-preset-card small { font-size: 11px; }
.design-preset-swatches { display: flex; gap: 4px; margin-bottom: 3px; }
.design-preset-swatches i { width: 18px; height: 8px; background: var(--swatch); border-radius: 99px; }
.browser-preview { min-height: 620px; overflow: hidden; padding: 0; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; color: var(--text-muted); background: var(--surface-subtle); border-bottom: 1px solid var(--divider-weak); }
.browser-bar > span { width: 9px; height: 9px; background: #c3cadb; border-radius: 50%; }
.browser-bar small { overflow: hidden; margin-left: 8px; white-space: nowrap; text-overflow: ellipsis; }
.preview-direction-label { min-width: 190px; margin-left: auto; color: var(--text-default); font-size: 11px; text-align: right; }
.preview-direction-label > span { display: none; }
.preview-direction-clean { display: inline !important; }
.preview-canvas { min-height: 565px; background: #f5f7fa; transition: background 180ms ease-out; }
.preview-hero { margin: 20px; padding: 64px 48px; color: #263447; text-align: left; background: #ffffff; border-radius: 18px; box-shadow: 0 18px 50px rgb(38 52 71 / 14%); transition: background 180ms ease-out, border-radius 180ms ease-out, color 180ms ease-out; }
.preview-kicker { margin: 0 0 10px; color: #456f9f; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.preview-hero h2 { max-width: 14ch; margin: 0 0 12px; color: inherit; font-size: clamp(2rem, 5vw, 3rem); }
.preview-hero p:not(.preview-kicker) { max-width: 38ch; margin: 0 0 24px; color: rgb(38 52 71 / 76%); }
.preview-cta { display: inline-flex; padding: 10px 18px; color: #ffffff; background: #456f9f; border-radius: 9px; font-weight: 800; }
.preview-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 30px 40px 36px; background: #f5f7fa; }
.preview-services div { display: grid; gap: 6px; }
.preview-services span { color: var(--text-muted); font-size: 13px; }
.preview-photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; height: 130px; background: #d9dfff; }
.preview-photo-row span:nth-child(1) { background: linear-gradient(140deg, #456f9f, #dce7f1); }
.preview-photo-row span:nth-child(2) { background: linear-gradient(140deg, #263447, #a9bfd4); }
.preview-photo-row span:nth-child(3) { background: linear-gradient(140deg, #7c98b5, #edf2f6); }

/* Design-direction preview switching is browser-only: no generation or credit use. */
.studio-grid:has(input[value="clean-professional"]:checked) .preview-direction-clean { display: inline !important; }
.studio-grid:has(input[value="clean-professional"]:checked) .preview-direction-bold,
.studio-grid:has(input[value="clean-professional"]:checked) .preview-direction-warm { display: none !important; }

.studio-grid:has(input[value="bold-local"]:checked) .preview-direction-clean,
.studio-grid:has(input[value="bold-local"]:checked) .preview-direction-warm { display: none !important; }
.studio-grid:has(input[value="bold-local"]:checked) .preview-direction-bold { display: inline !important; }
.studio-grid:has(input[value="bold-local"]:checked) .preview-canvas { background: #f7f8fc; }
.studio-grid:has(input[value="bold-local"]:checked) .preview-hero { margin: 0; padding: 78px 48px; color: #ffffff; background: linear-gradient(135deg, #172033 0 68%, #ef6a5b 68%); border-radius: 0; box-shadow: none; font-family: Arial, Helvetica, sans-serif; }
.studio-grid:has(input[value="bold-local"]:checked) .preview-kicker { color: #ffd9d5; }
.studio-grid:has(input[value="bold-local"]:checked) .preview-hero h2 { font-weight: 900; letter-spacing: -.04em; text-transform: uppercase; }
.studio-grid:has(input[value="bold-local"]:checked) .preview-hero p:not(.preview-kicker) { color: rgb(255 255 255 / 82%); }
.studio-grid:has(input[value="bold-local"]:checked) .preview-cta { color: #172033; background: #ef6a5b; border-radius: 2px; text-transform: uppercase; }
.studio-grid:has(input[value="bold-local"]:checked) .preview-services { padding-block: 30px; background: #ffffff; }
.studio-grid:has(input[value="bold-local"]:checked) .preview-services div { padding-left: 12px; border-left: 4px solid #ef6a5b; }
.studio-grid:has(input[value="bold-local"]:checked) .preview-photo-row { gap: 0; }
.studio-grid:has(input[value="bold-local"]:checked) .preview-photo-row span:nth-child(1) { background: linear-gradient(140deg, #172033, #48546a); }
.studio-grid:has(input[value="bold-local"]:checked) .preview-photo-row span:nth-child(2) { background: linear-gradient(140deg, #ef6a5b, #ffc0b8); }
.studio-grid:has(input[value="bold-local"]:checked) .preview-photo-row span:nth-child(3) { background: linear-gradient(140deg, #29364e, #8996aa); }

.studio-grid:has(input[value="established-warm"]:checked) .preview-direction-clean,
.studio-grid:has(input[value="established-warm"]:checked) .preview-direction-bold { display: none !important; }
.studio-grid:has(input[value="established-warm"]:checked) .preview-direction-warm { display: inline !important; }
.studio-grid:has(input[value="established-warm"]:checked) .preview-canvas { background: #f6f8f3; }
.studio-grid:has(input[value="established-warm"]:checked) .preview-hero { margin: 14px; padding: 68px 48px; color: #ffffff; background: linear-gradient(135deg, #173326, #285844); border-radius: 24px 24px 7px 24px; box-shadow: 0 18px 46px rgb(23 51 38 / 22%); }
.studio-grid:has(input[value="established-warm"]:checked) .preview-kicker { color: #f1d594; }
.studio-grid:has(input[value="established-warm"]:checked) .preview-hero h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: -.02em; }
.studio-grid:has(input[value="established-warm"]:checked) .preview-hero p:not(.preview-kicker) { color: rgb(255 255 255 / 82%); }
.studio-grid:has(input[value="established-warm"]:checked) .preview-cta { color: #173326; background: #d5ad4d; border-radius: 999px; }
.studio-grid:has(input[value="established-warm"]:checked) .preview-services { background: #f6f8f3; }
.studio-grid:has(input[value="established-warm"]:checked) .preview-services div { padding: 14px; background: #ffffff; border-radius: 14px; box-shadow: 0 8px 24px rgb(23 51 38 / 9%); }
.studio-grid:has(input[value="established-warm"]:checked) .preview-photo-row { gap: 6px; padding: 6px; background: #f6f8f3; }
.studio-grid:has(input[value="established-warm"]:checked) .preview-photo-row span { border-radius: 9px; }
.studio-grid:has(input[value="established-warm"]:checked) .preview-photo-row span:nth-child(1) { background: linear-gradient(140deg, #173326, #7da18c); }
.studio-grid:has(input[value="established-warm"]:checked) .preview-photo-row span:nth-child(2) { background: linear-gradient(140deg, #c28b19, #f0dba9); }
.studio-grid:has(input[value="established-warm"]:checked) .preview-photo-row span:nth-child(3) { background: linear-gradient(140deg, #315f49, #b9d0c1); }
.portal-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.portal-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.35fr); gap: 20px; align-items: start; }
.portal-column { display: grid; gap: 16px; }
.portal-site-card h2 { margin: 16px 0 4px; }
.portal-thumbnail { display: grid; min-height: 170px; place-items: center; margin-top: 12px; color: #ffffff; background: linear-gradient(145deg, #1d2341, #8b6bf0 64%, #c9d8ff); border-radius: var(--radius-md); font-weight: 700; }
.portal-empty { color: var(--text-muted); background: var(--surface-subtle); }
.portal-billing dl { display: grid; gap: 10px; margin: 14px 0 18px; }
.portal-billing dl div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.portal-billing dt { color: var(--text-muted); }
.portal-billing dd { margin: 0; text-align: right; font-weight: 700; }
.agent-panel { display: grid; min-height: 520px; grid-template-rows: auto 1fr auto; padding: 0; overflow: hidden; }
.agent-header { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--divider-weak); }
.agent-header h2 { margin: 8px 0 4px; font-size: 1.25rem; }
.agent-header p { margin: 0; font-size: 13px; }
.agent-messages { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: linear-gradient(180deg, #fbfbff, #f3f5ff); }
.agent-message { max-width: 82%; padding: 11px 14px; border-radius: var(--radius-md); font-size: 14px; }
.agent-message-system { color: var(--text-muted); background: var(--surface-default); border: 1px solid var(--divider-weak); }
.agent-message-user { align-self: end; color: #1a1d2e; background: #dce8ff; }
.agent-input { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--divider-weak); }
.agent-input input { flex: 1; }
.card-grid, .lead-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.project-card, .lead-card { display: flex; min-height: 180px; flex-direction: column; justify-content: space-between; gap: 16px; padding: 20px; color: var(--text-default); background: var(--surface-default); border: 1px solid var(--divider-weak); border-radius: var(--radius-md); box-shadow: var(--shadow-raised); text-decoration: none; transition: border-color 120ms ease-out, box-shadow 120ms ease-out, transform 120ms ease-out; }
.project-card:hover, .lead-card:hover { border-color: var(--action-primary); box-shadow: 0 10px 28px rgb(16 35 63 / 12%); transform: translateY(-2px); }
.project-card h3, .lead-card h2 { margin: 8px 0; }
.project-card p, .lead-card p { margin: 0; color: var(--text-muted); }
.arrow { color: var(--action-primary); font-weight: 800; }

.status { display: inline-flex; width: max-content; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; color: var(--status-info); background: var(--status-info-bg); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.status.active, .status.ready, .status.completed, .status.ready_for_review, .status.success { color: var(--status-positive); background: var(--status-positive-bg); }
.status.disabled, .status.failed, .status.failed_terminal, .status.terminal { color: var(--status-critical); background: var(--status-critical-bg); }
.status.warning, .status.queued, .status.running, .status.pending { color: var(--status-attention); background: var(--status-attention-bg); }
.status-positive { color: var(--status-positive); background: var(--status-positive-bg); }
.industry, .provenance { display: inline-flex; width: max-content; padding: 4px 8px; border-radius: 999px; color: var(--text-muted); background: var(--surface-subtle); font-size: 12px; font-weight: 700; }

label { display: grid; gap: 6px; color: var(--text-default); font-weight: 700; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--text-default); background: var(--surface-default); border: 1px solid var(--boundary-strong); border-radius: var(--radius-sm); }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--action-primary); box-shadow: 0 0 0 3px rgb(0 95 204 / 18%); outline: 0; }
form.card button:not(.button-quiet), form.stack > button, .actions button { width: max-content; min-height: 42px; padding: 0 16px; color: white; background: var(--action-primary); border: 1px solid var(--action-primary); border-radius: var(--radius-sm); font-weight: 800; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions form { margin: 0; }
.actions .secondary { color: var(--text-default); background: var(--surface-default); border-color: var(--boundary-strong); }
.error { color: var(--status-critical); font-weight: 700; }
.empty { padding: 44px 24px; text-align: center; background: var(--surface-default); border: 1px dashed var(--boundary-strong); border-radius: var(--radius-md); }
.empty h3 { margin-top: 0; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0 0; }
.facts div { padding-top: 10px; border-top: 2px solid var(--text-default); }
.facts dt { color: var(--text-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; font-weight: 700; }
.back { display: inline-flex; margin-bottom: 20px; color: var(--text-muted); font-weight: 700; }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 56px; align-items: start; padding-block: 56px; }
.progress-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; background: var(--surface-default); border: 1px solid var(--divider-weak); border-radius: var(--radius-md); box-shadow: var(--shadow-raised); }
.progress-card h2 { margin: 10px 0 4px; }
.project-review-page { display: grid; gap: 22px; padding-block: 42px 56px; }
.project-prompt-library-link { display: flex; align-items: center; gap: 10px; margin: -6px 0 0; }
.prompt-library-page { display: grid; gap: 24px; padding-block: 42px 64px; }
.prompt-library-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.prompt-library-head h1 { margin: 4px 0 8px; }
.prompt-category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.prompt-category-card h2 { margin: 4px 0 12px; font-size: 20px; letter-spacing: -.02em; }
.prompt-mini-list, .prompt-run-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.prompt-mini-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--divider-weak); }
.prompt-mini-list span { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.prompt-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.prompt-workspace-main, .prompt-run-sidebar { display: grid; gap: 16px; }
.prompt-selected-card, .prompt-run-form, .prompt-run-result, .prompt-readonly-note { display: grid; gap: 16px; }
.prompt-selected-card > p { max-width: 76ch; color: var(--text-muted); }
.prompt-contract-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.prompt-contract-grid > div { padding: 14px; background: var(--surface-subtle); border: 1px solid var(--divider-weak); border-radius: var(--radius-sm); }
.prompt-contract-grid h3 { margin: 0 0 6px; font-size: 13px; }
.prompt-contract-grid ul { margin: 0; padding-left: 18px; color: var(--text-muted); }
.prompt-contract-grid code { color: var(--text-default); }
.prompt-run-form textarea { resize: vertical; }
.prompt-run-form .section-title, .prompt-run-result .section-title { margin-bottom: 0; }
.prompt-run-sidebar { position: sticky; top: 88px; }
.prompt-run-list li { border-bottom: 1px solid var(--divider-weak); }
.prompt-run-list a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; color: var(--text-default); text-decoration: none; }
.prompt-run-list span { color: var(--text-muted); font-size: 12px; }
.prompt-governance-card ul { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--text-muted); }
.validation-summary { padding: 12px 14px; color: var(--status-positive); background: var(--status-positive-bg); border-radius: var(--radius-sm); }
.validation-summary ul { margin: 8px 0 0; padding-left: 18px; color: var(--status-critical); }
.prompt-evidence-list ul { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.prompt-evidence-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--divider-weak); }
.prompt-evidence-list li span { color: var(--text-muted); font-size: 12px; }
.prompt-run-result pre { max-width: 100%; overflow: auto; padding: 14px; background: #182036; color: #edf3ff; border-radius: var(--radius-sm); }
.prompt-admin-page { display: grid; gap: 24px; padding-block: 42px 64px; }
.prompt-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.prompt-admin-card { display: grid; gap: 14px; }
.prompt-admin-card h2 { margin: 4px 0 0; font-size: 20px; letter-spacing: -.02em; }
.prompt-admin-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.prompt-admin-facts > div { padding: 10px; background: var(--surface-subtle); border-radius: var(--radius-sm); }
.prompt-admin-facts dt { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.prompt-admin-facts dd { margin: 3px 0 0; font-size: 13px; }
.prompt-version-lines { color: var(--text-muted); font-size: 13px; }
.prompt-version-lines p { margin: 0 0 4px; }
.prompt-version-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.project-review-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.project-review-head .back { margin-bottom: 12px; }
.project-review-head h1 { margin: 4px 0 8px; }
.review-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.project-preview-workspace { overflow: hidden; padding: 0; }
.project-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border-bottom: 1px solid var(--divider-weak); }
.project-preview-toolbar h2, .project-preview-toolbar p { margin: 0; }
.preview-viewport-picker { display: inline-flex; gap: 3px; margin: 0; padding: 4px; border: 0; border-radius: var(--radius-sm); background: var(--surface-subtle); }
.preview-viewport-picker label { position: relative; display: block; cursor: pointer; }
.preview-viewport-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.preview-viewport-picker span { display: block; min-width: 86px; padding: 8px 12px; border-radius: 6px; color: var(--text-muted); text-align: center; }
.preview-viewport-picker label:has(input:checked) span { color: var(--text-default); background: var(--surface-default); box-shadow: var(--shadow-sm); font-weight: 800; }
.project-preview-stage { display: flex; min-height: 720px; justify-content: center; padding: 18px; background: #dfe4ee; overflow: auto; }
.project-preview-frame { width: 100%; min-height: 720px; border: 0; border-radius: 8px; background: #ffffff; box-shadow: 0 12px 36px rgb(26 29 46 / 18%); transition: width 180ms ease-out; }
.project-preview-workspace:has(input[value="desktop"]:checked) .project-preview-frame { width: 100%; }
.project-preview-workspace:has(input[value="mobile"]:checked) .project-preview-frame { width: 390px; max-width: 100%; }
.project-preview-note { margin: 0; padding: 12px 18px; border-top: 1px solid var(--divider-weak); }
.project-share-section { display: grid; gap: 0; }
.project-change-section { display: grid; gap: 14px; }
.project-change-section .section-title { margin: 0; }
.project-change-section .section-title p { margin: 0 0 4px; }
.project-change-form textarea { min-height: 128px; }
.change-request-list { display: grid; gap: 10px; }
.change-request-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.change-request-card strong { display: block; max-width: 72ch; white-space: pre-wrap; }
.change-request-card p { margin: 6px 0 0; }
.change-request-decision { display: grid; justify-items: end; gap: 8px; }
.revision-approval-form { display: grid; grid-template-columns: minmax(12rem, 1fr) auto; gap: 6px 10px; align-items: end; }
.revision-approval-form label { grid-column: 1 / -1; font-size: 12px; font-weight: 750; color: var(--text-muted); }
.revision-approval-form select { min-width: 15rem; }
.version-compare-form { display: grid; grid-template-columns: auto minmax(10rem, 1fr) auto minmax(10rem, 1fr) auto; align-items: end; gap: 8px; }
.version-compare-form label { font-size: 12px; font-weight: 750; color: var(--text-muted); }
.version-history-list { display: grid; gap: 10px; }
.version-history-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.version-history-card h3, .version-history-card p { margin: 0; }
.project-compare-page { display: grid; gap: 22px; padding-block: 42px 56px; }
.project-version-compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.version-compare-panel { min-width: 0; padding: 14px; }
.version-compare-panel .project-preview-frame { min-height: 760px; margin-top: 12px; }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; list-style: none; margin: 28px 0 0; padding: 0; }
.timeline li { display: grid; gap: 6px; padding: 16px; color: var(--text-muted); border-top: 3px solid var(--divider-weak); }
.timeline li.done { color: var(--text-default); border-color: var(--status-positive); }

table { width: 100%; min-width: 640px; border-collapse: collapse; background: var(--surface-default); }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--divider-weak); }
th { color: var(--text-muted); background: var(--surface-subtle); font-size: 13px; }
.table-wrap { overflow-x: auto; }
.footer { margin-top: auto; border-top: 1px solid var(--divider-weak); background: var(--surface-default); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding-block: 22px; color: var(--text-muted); font-size: 13px; }

/* Accepted SiteForge v2 light handoff primitives. */
:root {
  --color-bg: var(--surface-canvas);
  --color-surface: var(--surface-default);
  --color-text: var(--text-default);
  --color-accent: var(--action-primary);
  --color-accent-2: #8b6bf0;
  --color-divider: var(--divider-weak);
  --shadow-sm: 0 1px 3px rgb(26 29 46 / 10%);
  --shadow-md: var(--shadow-raised);
  --shadow-lg: 0 18px 44px rgb(58 89 199 / 18%);
  --font-heading: var(--font-sans);
}
.light-surface { color: var(--color-text); background: var(--color-bg); }
.design-surface { isolation: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.design-dispositions { width: min(100%, 560px); padding: 18px; background: rgb(255 255 255 / 72%); border: 1px solid var(--color-divider); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.design-dispositions > .card-kicker { margin: 0 0 10px; }
.design-disposition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.design-disposition { display: grid; gap: 3px; min-height: 64px; padding: 11px 12px; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-divider); border-left: 4px solid var(--color-accent); border-radius: var(--radius-sm); text-decoration: none; box-shadow: var(--shadow-sm); }
.design-disposition:hover { border-color: var(--color-accent); transform: translateY(-1px); }
.design-disposition span { color: var(--text-muted); font-size: 12px; }
.disposition-hosting { border-left-color: var(--color-accent-2); }
.disposition-later { border-left-color: #c18a25; }
.disposition-passed { border-left-color: var(--boundary-strong); }
.design-dispositions .fine { margin: 12px 0 0; font-size: 11px; }
.disposition-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-left: 4px solid var(--color-accent-2); }
.disposition-summary h3, .disposition-summary p { margin: 0; }
.disposition-summary-copy { display: grid; gap: 6px; }
.studio-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 10px 12px; background: rgb(255 255 255 / 72%); border: 1px solid var(--color-divider); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.studio-toolbar .card-kicker { margin: 0; }
.studio-toolbar-note { margin-right: auto; color: var(--text-muted); font-size: 13px; }
.studio-toolbar .button { min-height: 34px; padding-inline: 11px; font-size: 12px; }
.plan-picker { margin: 0; padding: 0; border: 0; }
.plan-picker legend { margin-bottom: 8px; font-weight: 700; }
.plan-selector { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 4px; padding: 4px; }
.plan-selector .seg-opt { display: grid; gap: 2px; min-height: 68px; padding: 8px; }
.plan-selector .seg-opt small { font-size: 10px; line-height: 1.25; }

@media (max-width: 1279px) { .shell-body { display: block; } .sidebar { display: none; } .mobile-nav { display: block; } }
@media (max-width: 767px) {
  .shell { width: min(100% - 32px, 1120px); }
  .tenant-label { display: none; }
  .topbar-login { min-height: 36px; padding-inline: 11px; }
  .page-head { padding-block: 32px 20px; }
  .hero, .split { grid-template-columns: 1fr; gap: 28px; padding-block: 44px; }
  .studio-grid, .portal-grid, .signup-page, .admin-grid, .offer-grid, .plan-editor-grid, .prompt-workspace { grid-template-columns: 1fr; }
  .prompt-library-head { align-items: flex-start; flex-direction: column; }
  .prompt-contract-grid { grid-template-columns: 1fr; }
  .prompt-admin-facts { grid-template-columns: 1fr; }
  .prompt-run-sidebar { position: static; }
  .studio-header, .dashboard-head, .portal-head, .project-review-head { align-items: flex-start; flex-direction: column; }
  .studio-header .tag, .dashboard-head .button, .portal-head .tag { align-self: flex-start; }
  .metric-grid, .usage-grid { grid-template-columns: repeat(2, 1fr); }
  .status-grid { grid-template-columns: 1fr; }
  .error-panel { grid-template-columns: 1fr; }
  .error-mark { width: 48px; height: 48px; }
  .form-row { grid-template-columns: 1fr; }
  .email-composer-heading { flex-direction: column; }
  .email-composer-toolbar button { flex: 1 0 auto; }
  .preview-services { grid-template-columns: 1fr; padding: 24px; }
  .browser-preview { min-height: 0; }
  .signup-story h1 { max-width: 14ch; }
  .cube-heading { align-items: flex-start; flex-direction: column; }
  .cube-actions { grid-template-columns: 1fr; }
  .design-disposition-grid, .plan-selector { grid-template-columns: 1fr; }
  .studio-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .studio-toolbar-note { flex-basis: 100%; order: 3; }
  .disposition-summary { align-items: flex-start; flex-direction: column; }
  .admin-wide-form { grid-template-columns: 1fr; }
  .plan-guide { position: static; }
  .plan-allowance-grid, .plan-metrics { grid-template-columns: 1fr; }
  .plan-card-head { flex-direction: column; }
  .hero h1 { font-size: clamp(2.7rem, 14vw, 4.2rem); }
  .metrics, .facts, .timeline { grid-template-columns: 1fr; }
  .metrics div { border-top: 1px solid rgb(255 255 255 / 22%); border-left: 0; }
  .progress-card { align-items: flex-start; flex-direction: column; }
  .progress-card .button { width: 100%; }
  .review-actions { width: 100%; }
  .project-preview-toolbar { align-items: flex-start; flex-direction: column; }
  .project-preview-stage { min-height: 600px; padding: 10px; }
  .project-preview-frame { min-height: 600px; }
  .change-request-card { flex-direction: column; }
  .change-request-decision { justify-items: start; width: 100%; }
  .version-compare-form, .project-version-compare-grid { grid-template-columns: 1fr; }
  .version-history-card { align-items: flex-start; flex-direction: column; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 420px) { .metric-grid, .usage-grid { grid-template-columns: 1fr; } .lead-facts div { align-items: flex-start; flex-direction: column; gap: 2px; } .lead-facts strong { text-align: left; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
.build-brief-fieldset{display:grid;gap:.75rem;margin:0 0 1rem}.build-brief-fieldset>label{display:grid;gap:.3rem}.build-brief-fieldset textarea,.build-brief-fieldset input,.build-brief-fieldset select{width:100%}.preview-page-links{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.5rem}.preview-page-links a{font-size:.85rem}.site-preview-shell{background:#f3f5fb;color:#14213d;margin:0;min-height:100vh}.site-preview-nav{display:flex;align-items:center;gap:1rem;padding:1rem 1.5rem;background:#fff;border-bottom:1px solid #dce2ef;flex-wrap:wrap}.site-preview-nav strong{margin-right:auto}.site-preview-nav a{padding:.35rem .6rem;border-radius:999px}.site-preview-nav a.active{background:#e5edff;font-weight:700}.site-preview-content{max-width:1100px;margin:2rem auto;padding:0 1rem}.site-preview-note{text-align:center;color:#66738d;font-size:.85rem;padding:1rem}.preview-empty{background:#fff;border:1px dashed #aeb9cf;border-radius:1rem;padding:3rem;text-align:center}
.portal-project-list{display:grid;gap:1rem}.portal-project-row{display:grid;grid-template-columns:120px minmax(0,1fr);gap:1rem;align-items:center;padding:1rem;border:1px solid var(--line,#d8deeb);border-radius:1rem;background:#fff}.portal-project-row .portal-thumbnail{min-height:84px}.project-row-heading{display:flex;gap:.75rem;align-items:center;justify-content:space-between}.project-row-heading h2{margin:0;font-size:1.15rem}.portal-project-row .actions{display:flex;flex-wrap:wrap;gap:.5rem}.portal-project-row .button{font-size:.82rem;padding:.5rem .7rem}@media(max-width:680px){.portal-project-row{grid-template-columns:1fr}.portal-project-row .portal-thumbnail{min-height:110px}}
