:root {
  --navy: #0b1733;
  --navy-2: #122242;
  --blue: #0b86f9;
  --cyan: #11b8d8;
  --green: #0baa6e;
  --red: #ed4c61;
  --amber: #e99912;
  --ink: #182238;
  --muted: #68758a;
  --line: #d9e0e9;
  --line-strong: #c7d0dc;
  --surface: #ffffff;
  --canvas: #f3f7fb;
  --surface-blue: #eaf5ff;
  --surface-green: #eaf8f2;
  --surface-red: #fff0f2;
  --surface-amber: #fff6e5;
  --shadow: 0 10px 28px rgba(29, 46, 78, 0.08);
  --sidebar-width: 236px;
  --topbar-height: 68px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  letter-spacing: 0;
}

* { box-sizing: border-box; letter-spacing: 0; }
html, body { margin: 0; min-width: 320px; min-height: 100%; background: var(--canvas); }
body { min-height: 100vh; overflow: hidden; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(11, 134, 249, 0.28); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { width: 19px; height: 19px; stroke-width: 1.8; flex: 0 0 auto; }

.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: relative; z-index: 30; display: flex; flex-direction: column; min-height: 100vh; padding: 18px 14px; color: #dce7f5; background: var(--navy); border-right: 1px solid #1f3153; }
.brand { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px 18px; margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; font-size: 18px; font-weight: 900; color: #fff; background: var(--cyan); border-radius: 5px 11px 5px 11px; transform: skew(-7deg); }
.brand-copy { font-size: 18px; font-weight: 650; white-space: nowrap; }
.brand-copy b { color: var(--cyan); }
.primary-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 9px 11px; border: 0; border-radius: 6px; color: #b9c7db; background: transparent; cursor: pointer; text-align: left; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-item.active { color: #fff; background: #16355a; }
.launch-nav { margin-bottom: 8px; color: #48d4f0; background: rgba(17,184,216,.08); }
.launch-nav:hover, .launch-nav.active { color: #fff; background: #135078; }
.nav-item.active::before { position: absolute; left: -14px; top: 7px; width: 3px; height: 30px; background: var(--cyan); content: ""; }
.nav-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { display: grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; font-size: 12px; color: #dce7f5; background: rgba(255,255,255,0.1); }
.sidebar-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.12); }
.workspace-chip { display: grid; grid-template-columns: 36px minmax(0, 1fr) 18px; align-items: center; gap: 10px; margin-top: 12px; padding: 11px 8px; border-radius: 6px; background: rgba(255,255,255,0.05); }
.workspace-chip .avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 12px; font-weight: 800; color: var(--navy); background: var(--cyan); }
.workspace-chip div { display: flex; min-width: 0; flex-direction: column; }
.workspace-chip strong { font-size: 13px; color: #fff; }
.workspace-chip div span { font-size: 11px; color: #8fa2bc; }

.app-content { min-width: 0; height: 100vh; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 10px; height: var(--topbar-height); padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-popover { position: fixed; top: 60px; z-index: 70; width: 330px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 18px 48px rgba(10,27,55,.2); }
.project-popover { left: 258px; }
.notification-popover { right: 92px; width: 390px; padding: 0; overflow: hidden; }
.popover-label { display: block; padding: 7px 9px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.project-option, .popover-action { display: grid; grid-template-columns: 36px minmax(0,1fr) 20px; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 8px; border: 0; border-radius: 6px; color: var(--navy); text-align: left; background: transparent; cursor: pointer; }
.project-option:hover, .popover-action:hover { background: var(--surface-blue); }
.project-option > span:nth-child(2), .popover-action > span { display: grid; gap: 2px; }
.project-option small, .popover-action small { color: var(--muted); }
.project-option > svg { color: var(--green); }
.popover-action { border-top: 1px solid var(--line); border-radius: 0; }
.popover-action > svg { color: var(--blue); }
.popover-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.popover-heading > span { display: grid; gap: 2px; }
.popover-heading small { color: var(--muted); font-size: 11px; }
.popover-heading button { padding: 0; border: 0; color: var(--blue); font-size: 11px; font-weight: 700; background: none; cursor: pointer; }
.notification-item { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { background: #f1f8ff; }
.notification-item > span:last-child { display: grid; gap: 3px; }
.notification-item small { color: var(--muted); }
.topbar-spacer { flex: 1; }
.mobile-menu { display: none !important; }
.project-picker { display: grid; grid-template-columns: 34px minmax(0, auto) 18px; align-items: center; gap: 10px; min-width: 190px; height: 46px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; text-align: left; }
.project-picker > span:nth-child(2) { display: flex; flex-direction: column; }
.project-picker small { color: var(--muted); font-size: 10px; }
.project-picker strong { font-size: 14px; }
.project-favicon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: #fff; font-weight: 800; background: var(--blue); }
.project-favicon.alternate { background: var(--cyan); }
.project-favicon.landing { background: var(--amber); }
.environment-status, .save-state { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 650; color: #0a8054; background: var(--surface-green); white-space: nowrap; }
.topbar-tagline { margin-left: 8px; color: #7a88a0; font-size: 12px; }
.france-status { display: inline-flex; align-items: center; gap: 7px; color: #52627c; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.status-dot.ok { background: var(--green); }
.status-dot.warning { background: var(--amber); }
.has-alert::after { position: absolute; right: 7px; top: 7px; width: 6px; height: 6px; border: 2px solid #fff; border-radius: 50%; background: var(--red); content: ""; }

.icon-button, .tool-button { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); cursor: pointer; }
.icon-button:hover, .tool-button:hover { border-color: var(--line-strong); background: var(--canvas); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 6px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.button.primary { color: #fff; background: #05aee8; box-shadow: 0 5px 14px rgba(5,174,232,.18); }
.button.primary:hover { background: #0398cc; }
.builder-view .button.primary { background: var(--navy); box-shadow: none; }
.button.secondary { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.button.secondary:hover { border-color: var(--blue); }
.button.ghost { color: var(--muted); border-color: transparent; background: transparent; }
.button.ghost:hover { color: var(--ink); background: var(--canvas); }
.button.ai { color: #fff; background: var(--blue); }
.button.danger { color: #fff; background: var(--red); }
.button.compact { min-height: 34px; padding: 0 12px; font-size: 13px; }

.main-area { position: relative; height: calc(100vh - var(--topbar-height)); overflow: auto; }
.view { display: none; min-height: 100%; padding: 26px 28px 44px; }
.view.active { display: block; }
.builder-view.active { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: 1550px; margin: 0 auto 22px; }
.page-heading h1 { margin: 2px 0 5px; font-size: clamp(26px, 3vw, 38px); line-height: 1.12; }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow, .kicker { color: var(--blue) !important; font-size: 11px !important; font-weight: 800; text-transform: uppercase; }
.heading-actions { display: flex; gap: 9px; }

.health-band { display: grid; grid-template-columns: minmax(250px, 1.3fr) repeat(4, minmax(120px, 0.7fr)); align-items: center; max-width: 1550px; min-height: 134px; margin: 0 auto 18px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.score-block { display: flex; align-items: center; gap: 16px; }
.score-ring { --score: 96; position: relative; display: grid; place-items: center; width: 86px; height: 86px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--score) * 1%), #e6ebf1 0); }
.score-ring::before { position: absolute; inset: 9px; border-radius: 50%; background: #fff; content: ""; }
.score-ring span { position: relative; font-size: 29px; font-weight: 800; }
.score-block > div:last-child, .health-metric span { display: flex; flex-direction: column; }
.score-block strong { font-size: 22px; }
.score-block small, .health-metric span, .metric-label { color: var(--muted); }
.metric-label { font-size: 12px; font-weight: 700; }
.health-metric { display: flex; align-items: center; gap: 10px; min-height: 74px; padding-left: 20px; border-left: 1px solid var(--line); }
.health-metric svg { color: var(--green); }
.health-metric strong { margin-top: 3px; font-size: 23px; color: var(--ink); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr); gap: 18px; max-width: 1550px; margin: 0 auto; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 5px 18px rgba(29,46,78,0.05); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 66px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 2px 0 0; font-size: 19px; }
.panel-heading .kicker { display: block; }
.recommendation { display: grid; grid-template-columns: 42px minmax(0, 1fr) 36px 20px; align-items: center; gap: 12px; width: calc(100% - 28px); min-height: 70px; margin: 10px 14px; padding: 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; text-align: left; }
.recommendation:hover { border-color: var(--line); background: var(--canvas); }
.recommendation > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.recommendation small { margin-top: 4px; color: var(--muted); }
.impact { font-weight: 800; color: var(--green); }
.icon-tile { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; }
.icon-tile.amber { color: var(--amber); background: var(--surface-amber); }
.icon-tile.green { color: var(--green); background: var(--surface-green); }
.icon-tile.blue { color: var(--blue); background: var(--surface-blue); }
.state { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 25px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.ok-state { color: #08784e; background: var(--surface-green); }
.neutral-state { color: #5d6a7e; background: #eef1f5; }
.danger-state { color: #ba3145; background: var(--surface-red); }
.service-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 64px; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.service-row:last-child { border-bottom: 0; }
.service-row > span:nth-child(2) { display: flex; flex-direction: column; }
.service-row small { margin-top: 3px; color: var(--muted); }
.traffic-panel { min-width: 0; }
.traffic-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 15px 18px 0; }
.traffic-kpis > div { display: flex; flex-direction: column; padding-right: 18px; border-right: 1px solid var(--line); }
.traffic-kpis > div + div { padding-left: 18px; }
.traffic-kpis > div:last-child { border-right: 0; }
.traffic-kpis strong { font-size: 23px; }
.traffic-kpis span { color: var(--muted); font-size: 12px; }
.traffic-kpis small { margin-top: 4px; color: var(--green); font-weight: 800; }
#overviewChart { display: block; width: calc(100% - 36px); height: 150px; margin: 8px 18px 16px; }
.timeline-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 11px; min-height: 70px; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-item > span:last-child { display: flex; flex-direction: column; }
.timeline-item small { margin-top: 4px; color: var(--muted); }
.timeline-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; }
.timeline-icon.success { color: var(--green); background: var(--surface-green); }
.timeline-icon.info { color: var(--blue); background: var(--surface-blue); }
.timeline-icon.neutral { color: var(--muted); background: var(--canvas); }

/* Import and diagnostic */
.import-layout { display: grid; grid-template-columns: minmax(0,1fr) 390px; gap: 18px; max-width: 1550px; margin: 0 auto; }
.import-main { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
.source-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.source-option { display: grid; grid-template-columns: 46px minmax(0,1fr) 22px; align-items: center; gap: 12px; min-height: 104px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; cursor: pointer; text-align: left; box-shadow: 0 5px 18px rgba(29,46,78,.04); }
.source-option > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.source-option small { color: var(--muted); line-height: 1.35; }
.source-option > svg { color: var(--line-strong); }
.source-option.active { border: 2px solid var(--blue); padding: 13px 15px; background: var(--surface-blue); }
.source-option.active > svg { color: var(--blue); fill: rgba(11,134,249,.08); }
.source-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 7px; }
.source-icon.blue { color: var(--blue); background: var(--surface-blue); }
.source-icon.coral { color: #f05c4f; background: #fff0ee; }
.source-icon.cyan { color: var(--cyan); background: #eafafd; }
.upload-zone { display: grid; grid-template-columns: 70px minmax(220px,1fr) minmax(260px,.75fr); align-items: center; gap: 18px; min-height: 150px; padding: 22px; border: 1px dashed #36b7ee; border-radius: 8px; background: #fafdff; cursor: pointer; }
.upload-zone:focus-visible, .upload-zone.drag-active { outline: 3px solid rgba(11,134,249,.2); outline-offset: 2px; border-color: var(--blue); background: #f2f9ff; }
.upload-icon { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; color: var(--blue); background: var(--surface-blue); }
.upload-icon svg { width: 34px; height: 34px; }
.upload-zone > div:nth-of-type(1) { display: flex; flex-direction: column; gap: 5px; }
.upload-zone > div:nth-of-type(1) > span { color: var(--blue); }
.upload-zone > div:nth-of-type(1) small { color: var(--muted); }
.upload-select { justify-self: start; margin-top: 8px; }
.uploaded-file { display: grid; grid-template-columns: 40px minmax(0,1fr) 34px; align-items: center; gap: 10px; min-height: 78px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 4px 14px rgba(29,46,78,.06); }
.uploaded-file.empty-file { opacity: .62; border-style: dashed; box-shadow: none; }
.file-badge { display: grid; place-items: center; width: 38px; height: 48px; color: var(--muted); background: var(--canvas); border-radius: 5px; }
.uploaded-file > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.uploaded-file small { color: var(--muted); }
.archive-inspection { grid-column: 1 / -1; display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: start; gap: 11px; margin-top: -4px; padding: 12px 14px; border: 1px solid #b9e5d5; border-radius: 7px; color: #086d4a; background: #effaf6; cursor: default; }
.archive-inspection.error { color: #a82332; border-color: #f1bcc2; background: #fff3f4; }
.archive-status-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; background: rgba(10,170,110,.1); }
.archive-inspection.error .archive-status-icon { background: rgba(220,53,69,.09); }
.archive-inspection > div { display: grid; gap: 3px; }
.archive-inspection small { color: var(--muted); }
.archive-signals { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.archive-signals span { padding: 4px 7px; border: 1px solid rgba(8,109,74,.18); border-radius: 4px; color: #315e50; font: 10px Consolas,monospace; background: rgba(255,255,255,.72); }
.upload-meter, .diagnostic-progress > span, .analysis-meter, .dns-propagation > span, .publish-meter { display: block; height: 6px; overflow: hidden; border-radius: 99px; background: #e4eaf1; }
.upload-meter span, #diagnosticMeter, #aiAnalysisMeter, #dnsMeter, #publishMeter { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--green); transition: width .35s ease; }
.detected-grid { display: grid; grid-template-columns: minmax(360px,1fr) minmax(260px,.66fr); gap: 14px; padding: 16px; }
.framework-card { display: flex; align-items: flex-start; gap: 13px; grid-column: 1; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.framework-mark { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; border-radius: 50%; color: #fff; font-size: 22px; background: #080b11; }
.framework-card > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.framework-card p { width: 100%; margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.config-list { display: flex; grid-column: 1; flex-direction: column; gap: 8px; }
.config-list > div { display: grid; grid-template-columns: 30px minmax(0,1fr) 20px; align-items: center; gap: 8px; min-height: 58px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); }
.config-list span { display: flex; flex-direction: column; gap: 3px; }
.config-list small { color: var(--muted); }
.project-preview { grid-column: 2; grid-row: 1 / span 2; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.browser-chrome { display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 9px; color: var(--muted); background: #f3f6f9; }
.browser-chrome i { width: 7px; height: 7px; border-radius: 50%; background: #ccd5e1; }
.browser-chrome span { margin-left: 7px; font-size: 9px; }
.project-preview img { display: block; width: 100%; height: 188px; object-fit: cover; }
.project-preview > div:last-child { display: flex; flex-direction: column; gap: 3px; padding: 11px; }
.project-preview > div:last-child span { color: var(--muted); font-size: 11px; }
.diagnostic-panel { min-height: 620px; padding: 18px; }
.diagnostic-title { display: flex; align-items: center; gap: 13px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.diagnostic-title h2 { margin: 2px 0; font-size: 24px; }
.diagnostic-title p { margin: 0; color: var(--muted); font-size: 12px; }
.diagnostic-pulse { display: grid; place-items: center; width: 48px; height: 48px; color: var(--blue); background: var(--surface-blue); border-radius: 8px; }
.diagnostic-pulse svg { width: 28px; height: 28px; }
.diagnostic-step { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 72px; border-bottom: 1px solid var(--line); }
.diagnostic-step > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); background: var(--canvas); }
.diagnostic-step > div { display: flex; flex-direction: column; gap: 4px; }
.diagnostic-step small { color: var(--muted); }
.diagnostic-step b { color: var(--muted); font-size: 11px; }
.diagnostic-step.running > span { color: var(--blue); background: var(--surface-blue); animation: pulse 1s infinite; }
.diagnostic-step.running b { color: var(--blue); }
.diagnostic-step.complete > span { color: #fff; background: var(--green); }
.diagnostic-step.complete b { color: var(--green); }
.diagnostic-step.warning > span { color: #fff; background: var(--amber); }
.diagnostic-step.warning b { color: var(--amber); }
.diagnostic-progress { display: grid; grid-template-columns: 1fr 38px; align-items: center; gap: 10px; margin: 18px 0 14px; }
#diagnosticMeter { width: 0; background: var(--blue); }
.diagnostic-progress small { color: var(--muted); text-align: right; }
.import-action { width: 100%; }
.import-ready { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 9px; margin-top: 12px; padding: 12px; color: #08784e; border-radius: 7px; background: var(--surface-green); }
.import-ready > div, .sovereign-note > div { display: flex; flex-direction: column; gap: 3px; }
.import-ready small, .sovereign-note small { color: var(--muted); }
.sovereign-note { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 9px; margin-top: 14px; padding: 13px; border-radius: 7px; color: var(--green); background: #f2fbf7; }

/* Builder */
.builder-toolbar { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 9px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.builder-brand { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; margin-right: 4px; padding: 0 14px 0 8px; border: 0; border-right: 1px solid var(--line); color: var(--navy); background: transparent; cursor: pointer; }
.builder-brand > svg { color: var(--muted); }
.builder-brand .brand-mark { width: 28px; height: 28px; font-size: 15px; }
.builder-brand strong { font-size: 16px; white-space: nowrap; }
.builder-brand b { color: var(--cyan); }
body.builder-active { overflow: hidden; }
body.builder-active .app-shell { grid-template-columns: 1fr; }
body.builder-active .sidebar, body.builder-active .topbar { display: none; }
body.builder-active .app-content { height: 100vh; }
body.builder-active .main-area { height: 100vh; }
body.builder-active .builder-view.active { height: 100vh; }
body.builder-active .builder-layout { grid-template-columns: 210px minmax(560px,1fr) 360px; }
.tool-group { display: flex; gap: 4px; padding-right: 12px; border-right: 1px solid var(--line); }
.tool-button.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.segmented { display: inline-flex; min-height: 38px; padding: 3px; border-radius: 6px; background: #edf1f6; }
.segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 102px; padding: 0 10px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; }
.segmented button.active { color: var(--blue); background: #fff; box-shadow: 0 1px 3px rgba(24,34,56,.12); }
.segmented.small button { min-width: 38px; }
.builder-layout { display: grid; grid-template-columns: 220px minmax(520px, 1fr) 310px; min-height: 0; flex: 1; }
.builder-sections, .builder-inspector { min-height: 0; padding: 14px; overflow-y: auto; background: var(--surface); }
.builder-sections { border-right: 1px solid var(--line); }
.builder-inspector { border-left: 1px solid var(--line); }
.builder-panel-title { display: flex; align-items: center; justify-content: space-between; height: 42px; margin-bottom: 8px; font-size: 14px; font-weight: 800; }
.builder-layout.imported-editing .builder-sections > .section-item,
.builder-layout.imported-editing .builder-sections > .add-section,
.builder-layout.imported-editing #addSectionButton { display: none; }
.imported-structure-panel { display: grid; gap: 8px; margin-bottom: 14px; padding: 12px; border: 1px solid #b9e5d5; border-radius: 7px; background: #effaf6; }
.imported-structure-panel[hidden] { display: none; }
.imported-structure-panel > strong { font-size: 14px; }
.imported-structure-panel > small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.imported-structure-panel > button { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 9px; border: 1px solid #a8d9c8; border-radius: 5px; color: #086d4a; background: #fff; cursor: pointer; text-align: left; }
.imported-structure-panel > button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) 18px; align-items: center; gap: 9px; width: 100%; height: 48px; margin-bottom: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); cursor: pointer; text-align: left; }
.section-item.active { color: var(--blue); border-color: var(--blue); background: var(--surface-blue); }
.section-item svg:last-child { color: var(--muted); }
.add-section { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; margin-top: 12px; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--muted); background: var(--canvas); cursor: pointer; }
.canvas-stage { position: relative; display: grid; place-items: center; min-width: 0; overflow: auto; padding: 28px 34px 60px; background-color: #e9edf3; background-image: linear-gradient(#d9dfe8 1px, transparent 1px), linear-gradient(90deg, #d9dfe8 1px, transparent 1px); background-size: 22px 22px; }
.site-frame { position: relative; width: min(960px, 100%); min-width: 560px; overflow: hidden; background: #fff; border: 1px solid #cfd7e2; border-radius: 6px; box-shadow: 0 16px 38px rgba(37,52,80,.16); transform-origin: center top; transition: width .25s ease, transform .2s ease; }
.site-frame.mobile { width: 390px; min-width: 390px; }
.site-frame.imported-project { height: 920px; }
.site-frame.imported-project > .site-nav,
.site-frame.imported-project > [data-preview-section],
.site-frame.imported-project > [data-block-type] { display: none; }
.imported-preview-shell { position: absolute; inset: 0; z-index: 1; display: grid; width: 100%; height: 100%; grid-template-rows: 42px minmax(0,1fr); background: #fff; }
.imported-preview-shell[hidden] { display: none; }
.imported-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; color: #31415e; border-bottom: 1px solid #dce3ec; background: #f8fafc; font-size: 11px; }
.imported-preview-bar > span { display: flex; min-width: 0; align-items: center; gap: 8px; }
.imported-preview-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imported-preview-bar svg { width: 16px; color: var(--green); }
.imported-preview-bar > div { display: flex; align-items: center; gap: 10px; }
.imported-preview-bar small { flex: none; color: var(--muted); }
.imported-preview-bar button { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 8px; border: 1px solid #cbd6e2; border-radius: 4px; color: #38516f; background: #fff; cursor: pointer; font-size: 10px; font-weight: 800; }
.imported-preview-bar button svg { width: 13px; color: currentColor; }
.imported-site-frame { display: block; width: 100%; min-width: 100%; height: 100%; border: 0; background: #fff; }
.site-frame.mobile .imported-preview-bar > span { min-width: 0; }
.site-frame.mobile .imported-preview-bar strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-frame.mobile .imported-preview-bar > div small { display: none; }
.site-frame.mobile #downloadImportedHtml { width: 30px; min-width: 30px; padding: 5px; overflow: hidden; font-size: 0; }
.site-frame.mobile #downloadImportedHtml svg { width: 14px; height: 14px; }
.imported-element-editor { display: grid; gap: 10px; }
.imported-element-editor .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.imported-element-editor label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.imported-element-editor input, .imported-element-editor textarea, .imported-element-editor select { width: 100%; min-height: 36px; padding: 8px 9px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--ink); background: #fff; font: inherit; }
.imported-element-editor textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.imported-element-editor input[type="color"] { padding: 3px; }
.imported-editor-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 3px; }
.imported-editor-actions button { min-height: 35px; border: 1px solid var(--line); border-radius: 5px; color: #40536c; background: #fff; cursor: pointer; font-size: 11px; font-weight: 800; }
.imported-editor-actions button.danger { color: #b12535; border-color: #efc0c6; background: #fff5f6; }
.color-audit { display: grid; gap: 11px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.color-audit > div:first-child { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 9px; }
.color-audit-icon { display: grid; width: 32px; height: 32px; place-items: center; color: var(--blue); border: 1px solid #bfdbf7; border-radius: 6px; background: #eff7ff; }
.color-audit-icon svg { width: 17px; }
.color-audit strong, .color-audit small { display: block; }
.color-audit strong { font-size: 12px; }
.color-audit small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.color-audit-result { display: grid; gap: 9px; padding: 11px; border: 1px solid #cfe0ef; border-radius: 6px; background: #f7fbff; }
.color-audit-result[hidden] { display: none; }
.detected-palette { display: flex; gap: 6px; }
.detected-palette span { width: 30px; height: 30px; border: 2px solid #fff; border-radius: 5px; box-shadow: 0 0 0 1px #cbd7e4; }
.color-audit-result p { margin: 0; color: #52647d; font-size: 10px; line-height: 1.45; }
.site-nav { display: flex; align-items: center; gap: 22px; height: 54px; padding: 0 26px; font-size: 12px; }
.site-nav strong { margin-right: auto; font-size: 19px; }
.site-nav button { min-height: 32px; padding: 0 13px; border: 0; border-radius: 4px; color: #fff; background: var(--navy); }
.site-hero { position: relative; height: var(--hero-height, 380px); overflow: hidden; transition: height .2s ease; }
.site-hero > img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.site-hero-overlay { position: absolute; inset: 0; background: rgba(8,20,39,var(--hero-overlay,.38)); transition: background .2s ease; }
.site-hero-copy { position: absolute; left: 8%; top: 19%; z-index: 2; width: 55%; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.28); }
.site-kicker { color: #0a6da8; font-size: 10px; font-weight: 800; }
.site-hero-copy h2 { max-width: 560px; margin: 12px 0 10px; font-size: 44px; line-height: 1.02; }
.site-hero-copy p { max-width: 470px; margin: 0 0 18px; color: rgba(255,255,255,.88); font-size: 16px; line-height: 1.5; }
.site-hero-copy button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 0; border-radius: 5px; color: #fff; font-weight: 800; background: var(--preview-accent,#0b86f9); }
.selection-outline { position: absolute; inset: 8px; z-index: 5; border: 2px solid var(--blue); pointer-events: none; }
.selection-outline span { position: absolute; width: 9px; height: 9px; border: 2px solid var(--blue); background: #fff; }
.selection-outline span:nth-child(1) { left: -6px; top: -6px; }
.selection-outline span:nth-child(2) { right: -6px; top: -6px; }
.selection-outline span:nth-child(3) { left: -6px; bottom: -6px; }
.selection-outline span:nth-child(4) { right: -6px; bottom: -6px; }
.selection-outline label { position: absolute; left: -2px; top: -27px; padding: 4px 8px; border-radius: 4px; color: #fff; font-size: 10px; font-weight: 800; background: var(--blue); }
#annotationCanvas { position: absolute; inset: 0; z-index: 8; width: 100%; height: 100%; pointer-events: none; touch-action: none; }
.site-frame.pen-mode #annotationCanvas { pointer-events: auto; cursor: crosshair; }
.site-frame.comment-mode { cursor: crosshair; }
.preview-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; min-height: 136px; padding: 18px 20px; }
.preview-services > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-right: 1px solid #e2e7ee; text-align: center; }
.preview-services > div:last-child { border-right: 0; }
.preview-services svg { color: var(--blue); }
.preview-services span { color: var(--muted); font-size: 12px; }
.site-frame.mobile .site-nav span { display: none; }
.site-frame.mobile .site-hero { height: var(--mobile-hero-height,540px); }
.site-frame.mobile .site-hero-copy { left: 7%; top: 16%; width: 84%; }
.site-frame.mobile .site-hero-copy h2 { font-size: 38px; }
.site-frame.mobile .preview-services { grid-template-columns: 1fr; }
.site-frame.mobile .preview-services > div { min-height: 105px; border-right: 0; border-bottom: 1px solid #e2e7ee; }
.canvas-zoom { position: absolute; right: 22px; bottom: 18px; z-index: 14; display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.canvas-zoom span { min-width: 52px; text-align: center; font-size: 12px; font-weight: 800; }
.canvas-zoom .icon-button { width: 30px; height: 30px; }
.inspector-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: -14px -14px 14px; border-bottom: 1px solid var(--line); }
.inspector-tabs button { height: 48px; border: 0; border-bottom: 2px solid transparent; background: #fff; cursor: pointer; }
.inspector-tabs button.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 800; }
.selected-meta { display: flex; flex-direction: column; gap: 8px; padding: 5px 0 16px; border-bottom: 1px solid var(--line); }
.selected-meta > span { color: var(--muted); font-size: 11px; }
.selected-meta strong { display: flex; align-items: center; gap: 8px; }
.drawing-controls { padding: 13px 0; border-bottom: 1px solid var(--line); }
.drawing-controls > span { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 12px; font-weight: 800; }
.drawing-controls > div { display: grid; grid-template-columns: 24px 24px 24px minmax(80px,1fr); align-items: center; gap: 7px; }
.ink-swatch { width: 22px; height: 22px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.ink-swatch.active { box-shadow: 0 0 0 2px var(--blue); }
#penWidth { width: 100%; accent-color: var(--blue); }
.ai-prompt-block { padding: 16px 0; border-bottom: 1px solid var(--line); }
.ai-prompt-block label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 800; }
.ai-prompt-block textarea { width: 100%; min-height: 126px; resize: vertical; padding: 11px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); line-height: 1.45; background: var(--canvas); }
.prompt-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.prompt-suggestions button { min-height: 28px; padding: 4px 8px; border: 1px solid #c5d3e2; border-radius: 5px; color: #40536c; font-size: 10px; font-weight: 700; background: #f7f9fc; cursor: pointer; }
.prompt-suggestions button:hover { color: var(--blue); border-color: #8fc8fa; background: #eef7ff; }
.prompt-actions, .result-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.ai-result { margin-top: 14px; padding: 12px; border: 1px solid #b7d9f8; border-radius: 6px; background: var(--surface-blue); }
.ai-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ai-result-heading > span:first-child { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.change-row { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 12px; }
.change-row svg { color: var(--blue); }
.inspector-section { padding: 15px 0; border-bottom: 1px solid var(--line); }
.row-between { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.progress { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: #e5eaf0; }
.progress span { display: block; height: 100%; background: var(--green); }
.component-library { display: flex; flex-direction: column; gap: 7px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.component-library-title { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.component-library button { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 8px; min-height: 40px; padding: 7px 9px; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--muted); background: #fff; cursor: grab; text-align: left; }
.component-library button:hover { color: var(--blue); border-color: var(--blue); background: var(--surface-blue); }
.section-item.dragging, .component-library button.dragging { opacity: .4; }
.section-item.drag-over { border-color: var(--blue); box-shadow: inset 0 3px 0 var(--blue); }
.site-frame.component-drop-target { box-shadow: 0 0 0 4px rgba(11,134,249,.2), 0 16px 38px rgba(37,52,80,.16); }
.site-frame.ai-applied { animation: ai-applied .65s ease-out; }
@keyframes ai-applied { 35% { box-shadow: 0 0 0 5px rgba(11,170,110,.24), 0 16px 38px rgba(37,52,80,.16); } }
.canvas-drop-hint { position: absolute; left: 50%; bottom: 70px; z-index: 12; display: flex; align-items: center; gap: 7px; padding: 9px 13px; border: 1px dashed var(--blue); border-radius: 6px; color: var(--blue); font-size: 12px; font-weight: 800; background: #fff; opacity: 0; transform: translateX(-50%); pointer-events: none; transition: opacity .15s; }
body.drag-builder-component .canvas-drop-hint { opacity: 1; }
.preview-proof { display: flex; min-height: 150px; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; background: #f6f9fc; }
.proof-stars { color: var(--amber); font-size: 15px; }
.preview-proof blockquote { max-width: 620px; margin: 10px 0; font-size: 18px; line-height: 1.4; }
.preview-proof strong { color: var(--muted); font-size: 11px; }
.preview-contact { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 128px; padding: 24px 34px; color: #fff; background: var(--navy); }
.preview-contact h3 { margin: 5px 0 0; font-size: 22px; }
.preview-contact button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 5px; color: var(--navy); font-weight: 800; background: #fff; }
.dropped-block { position: relative; display: flex; min-height: 112px; align-items: center; justify-content: center; gap: 18px; padding: 20px 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; animation: block-in .3s ease-out; }
.dropped-block strong { font-size: 20px; }
.dropped-block p { margin: 4px 0 0; color: var(--muted); }
.dropped-block .button { margin-left: auto; }
.dropped-block.cards { display: grid; grid-template-columns: repeat(3,1fr); }
.dropped-block.cards > div { min-height: 80px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; }
.dropped-block.testimonial { color: #fff; text-align: center; background: #11284d; }
.comment-pin { position: absolute; z-index: 20; display: grid; grid-template-columns: 18px 12px; place-items: center; width: 38px; height: 30px; padding: 0; border: 2px solid #fff; border-radius: 15px 15px 15px 4px; color: #fff; background: var(--blue); box-shadow: 0 5px 14px rgba(11,134,249,.32); cursor: pointer; }
.comment-pin span { font-size: 10px; font-weight: 800; }
.comment-pin svg { width: 15px; height: 15px; }
.comment-pin.saved { background: var(--green); }
.comment-composer { position: absolute; z-index: 24; width: 290px; padding: 11px; border: 1px solid #258ed0; border-radius: 7px; color: var(--ink); background: #fff; box-shadow: 0 16px 34px rgba(12,29,57,.24); cursor: default; }
.comment-composer-portal { position: fixed; z-index: 95; }
.comment-composer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.comment-composer-head span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; }
.comment-composer textarea { width: 100%; min-height: 82px; resize: vertical; padding: 9px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--ink); background: var(--canvas); }
.comment-composer-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 8px; }
.comment-composer-actions button { min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; font-weight: 800; background: #fff; cursor: pointer; }
.comment-composer-actions .save-comment { color: #fff; border-color: var(--blue); background: var(--blue); }
@keyframes block-in { from { opacity: 0; transform: translateY(10px); } }
.ai-analysis-bar { position: absolute; left: 50%; bottom: 304px; z-index: 16; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 10px; width: min(620px,calc(100% - 80px)); padding: 13px 15px; border: 1px solid #1c78c8; border-radius: 8px; color: #fff; background: #0d203f; box-shadow: 0 18px 44px rgba(8,20,43,.3); transform: translateX(-50%); }
.ai-analysis-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; color: #69d6f0; background: rgba(255,255,255,.08); }
.ai-analysis-bar > div { display: flex; flex-direction: column; gap: 4px; }
.ai-analysis-bar small { color: #aebbd0; }
.analysis-meter { margin-top: 3px; background: rgba(255,255,255,.16); }
#aiAnalysisMeter { width: 0; background: var(--cyan); }
.ai-command-panel { position: absolute; left: 50%; bottom: 104px; z-index: 15; width: min(680px,calc(100% - 80px)); padding: 13px; border: 1px solid #159de1; border-radius: 8px; color: #fff; background: #0b1c39; box-shadow: 0 18px 44px rgba(8,20,43,.34); transform: translateX(-50%); }
.ai-command-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; margin: -4px 0 8px; cursor: grab; user-select: none; }
.ai-command-head:active { cursor: grabbing; }
.ai-command-head > span { display: flex; align-items: center; gap: 7px; }
.ai-command-head > span > svg { color: #9c62ff; }
.ai-command-head small { color: #8fa5c0; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.ai-command-head > div { display: flex; gap: 5px; }
.ai-command-head button { display: grid; place-items: center; width: 30px; height: 28px; padding: 0; border: 1px solid #3d5270; border-radius: 5px; color: #aebed1; background: #132946; cursor: pointer; }
.ai-command-head button.active { color: #fff; border-color: #2db5eb; background: #17618b; }
.ai-command-head button svg { width: 15px; height: 15px; }
.ai-command-panel.docked { position: relative; left: auto; top: auto; bottom: auto; width: 100%; margin: 0 0 14px; transform: none; box-shadow: none; }
.ai-command-panel.docked .ai-command-head { cursor: default; }
.ai-command-panel.docked .ai-command-actions { grid-template-columns: 1fr; }
.ai-command-panel.docked .ai-command-actions button { min-height: 38px; }
.ai-command-input { display: grid; grid-template-columns: 28px minmax(0,1fr) 38px; align-items: center; gap: 8px; height: 46px; padding: 4px 5px 4px 10px; border: 1px solid #3e668c; border-radius: 6px; background: #102746; }
.ai-command-input > svg { color: #9c62ff; }
.ai-command-input input { min-width: 0; height: 34px; border: 0; outline: 0; color: #fff; background: transparent; }
.ai-command-input input::placeholder { color: #92a5bf; }
.ai-command-input button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 6px; color: #09203e; background: #5bc8f0; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.24); }
.ai-command-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 9px; }
.ai-command-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border: 1px solid #435674; border-radius: 6px; color: #fff; font-weight: 750; background: #152743; cursor: pointer; }
.ai-command-actions button:hover { background: #1c3354; }
.ai-command-actions button.apply { border-color: #0dbd73; background: #0dbd73; }
.ai-command-actions button.apply:hover { background: #0aa865; }
.ai-command-status { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: #9eb0c7; font-size: 10px; }

/* Domains */
.domains-layout { display: grid; grid-template-columns: 310px minmax(500px, 1fr) 300px; gap: 18px; max-width: 1550px; margin: 0 auto; }
.domain-list-panel, .connection-panel { min-height: 620px; }
.domain-card { display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(44px, auto) 38px; align-items: center; gap: 8px; min-height: 66px; margin: 10px 12px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: grab; }
.domain-card:active { cursor: grabbing; }
.domain-card.dragging { opacity: .45; }
.domain-card > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.domain-card > span:nth-child(2) strong, .domain-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domain-card small { margin-top: 3px; color: var(--muted); }
.domain-card .state { justify-self: end; white-space: nowrap; }
.domain-dns-button { width: 38px; min-width: 38px; height: 38px; padding: 0; }
.subdomain-card { width: calc(100% - 40px); min-height: 60px; margin-left: 28px; grid-template-columns: 32px minmax(0, 1fr) minmax(44px, auto) 38px; background: #f8fbff; }
.subdomain-card .domain-icon { width: 30px; height: 30px; border-radius: 6px; }
.subdomain-card strong { font-size: 13px; }
.domain-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--blue); background: var(--surface-blue); }
.domain-add-row { display: flex; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 24px); min-height: 54px; margin: 14px 12px; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--muted); background: var(--canvas); cursor: pointer; }
.destination-zone { min-width: 0; }
.section-heading-inline { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.section-heading-inline h2 { margin: 3px 0 0; font-size: 22px; }
.project-destinations { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 14px; }
.project-destinations.list-view { grid-template-columns: 1fr; }
.project-destinations.list-view .destination-card { display: grid; grid-template-columns: minmax(230px,1fr) 190px minmax(180px,.7fr); align-items: center; gap: 14px; }
.project-destinations.list-view .destination-card > img { height: 90px; }
.project-destinations.list-view .domain-drop-zone { grid-column: 1 / -1; }
.destination-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 4px 15px rgba(29,46,78,.05); transition: border-color .15s, box-shadow .15s; }
.destination-card.drop-active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,134,249,.13); }
.destination-header { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 10px 12px; }
.destination-header > span:first-child { display: flex; align-items: center; gap: 9px; }
.destination-header > span:first-child > span:last-child { display: flex; flex-direction: column; }
.destination-header small { color: var(--muted); }
.destination-card > img { display: block; width: calc(100% - 24px); height: 142px; margin: 0 12px; object-fit: cover; object-position: center; border: 1px solid var(--line); border-radius: 5px; }
.domain-drop-zone { display: none; align-items: center; justify-content: center; gap: 8px; height: 44px; margin: 10px 12px 0; border: 1px dashed var(--blue); border-radius: 5px; color: var(--blue); font-size: 12px; font-weight: 800; background: var(--surface-blue); }
body.drag-domain .domain-drop-zone { display: flex; }
.connected-domain { display: flex; align-items: center; gap: 8px; min-height: 46px; margin: 8px 12px 12px; padding: 0 10px; border-radius: 5px; color: var(--green); font-weight: 800; background: var(--surface-green); }
.connected-domain .icon-button { width: 28px; height: 28px; margin-left: auto; border: 0; background: transparent; }
.connected-domain .host-summary { display: flex; min-width: 0; flex-direction: column; }
.connected-domain .host-summary strong, .connected-domain .host-summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connected-domain .host-summary small { margin-top: 2px; color: #3f7863; font-size: 10px; font-weight: 650; }
.connected-domain.empty { color: var(--muted); font-weight: 600; background: var(--canvas); }
.connection-empty { display: flex; min-height: 510px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; color: var(--muted); text-align: center; }
.connection-empty > svg { width: 38px; height: 38px; }
.connection-empty strong { color: var(--ink); }
.connection-progress { padding: 18px; }
.connection-target { display: flex; align-items: center; gap: 10px; min-height: 56px; }
.connection-target > span:last-child { display: flex; flex-direction: column; }
.connection-target small { color: var(--muted); }
.connection-arrow { display: grid; place-items: center; height: 38px; color: var(--blue); }
.workflow-steps { margin-top: 18px; }
.workflow-step { display: grid; grid-template-columns: 30px 1fr; gap: 9px; min-height: 62px; color: var(--muted); opacity: .55; }
.workflow-step > span { display: grid; place-items: center; align-self: start; width: 26px; height: 26px; border: 2px solid var(--line-strong); border-radius: 50%; color: #fff; }
.workflow-step > div { display: flex; flex-direction: column; padding-top: 2px; }
.workflow-step small { margin-top: 3px; }
.workflow-step.active { opacity: 1; color: var(--ink); }
.workflow-step.active > span { border-color: var(--blue); background: var(--blue); }
.workflow-step.complete { opacity: 1; color: var(--ink); }
.workflow-step.complete > span { border-color: var(--green); background: var(--green); }
.connection-status { min-height: 42px; padding: 12px; border-radius: 6px; color: var(--blue); font-size: 12px; font-weight: 800; text-align: center; background: var(--surface-blue); }
.dns-records-mini { margin: 12px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; }
.dns-records-mini > div { display: grid; grid-template-columns: 48px 46px minmax(90px,1fr) auto; align-items: center; gap: 6px; min-height: 38px; padding: 5px 8px; border-bottom: 1px solid var(--line); font-size: 10px; }
.dns-records-mini > div:last-child { border-bottom: 0; }
.dns-records-mini code { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dns-records-mini b { color: var(--amber); font-size: 9px; }
.dns-records-mini b.complete { color: var(--green); }
.dns-propagation { margin: 10px 0; }
.dns-propagation > div { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 10px; }
#dnsMeter { width: 0; background: var(--blue); }

/* Deployments */
.deploy-summary, .analytics-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); max-width: 1550px; margin: 0 auto 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.deploy-summary > div, .analytics-kpis > div { display: flex; min-height: 104px; flex-direction: column; justify-content: center; padding: 16px 22px; border-right: 1px solid var(--line); }
.deploy-summary > div:last-child, .analytics-kpis > div:last-child { border-right: 0; }
.deploy-summary strong, .analytics-kpis strong { margin: 4px 0; font-size: 25px; }
.deploy-summary small, .analytics-kpis small { color: var(--muted); }
.positive { color: var(--green) !important; font-weight: 800; }
.deployment-list-panel { max-width: 1550px; margin: 0 auto; }
.filters { display: flex; gap: 5px; }
.deployment-row { display: grid; grid-template-columns: 34px minmax(220px, 1.5fr) 120px 110px 170px 100px 84px; align-items: center; gap: 12px; min-height: 78px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.deployment-row:last-child { border-bottom: 0; }
.deployment-row.featured { background: #fafdff; }
.deployment-row > span:nth-child(2), .deployment-row > span:nth-child(4), .deployment-row > span:nth-child(5) { display: flex; flex-direction: column; }
.deployment-row small { margin-top: 3px; color: var(--muted); }
.deploy-status { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; }
.deploy-status.success { color: var(--green); background: var(--surface-green); }
.deploy-status.failed { color: var(--red); background: var(--surface-red); }
.commit { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }

/* Security */
.security-layout { display: grid; grid-template-columns: minmax(340px,.75fr) minmax(500px,1.25fr); gap: 18px; max-width: 1550px; margin: 0 auto; }
.security-score-block { display: flex; align-items: center; gap: 24px; min-height: 220px; padding: 28px; border-radius: 8px; color: #fff; background: var(--navy); }
.security-score-block h2 { margin: 6px 0; font-size: 28px; }
.security-score-block p { margin: 0; color: #aab9ce; }
.security-score-ring { display: grid; grid-template-columns: auto auto; place-content: center; align-items: baseline; width: 134px; height: 134px; border: 11px solid var(--green); border-radius: 50%; }
.security-score-ring span { font-size: 45px; font-weight: 800; }
.security-score-ring small { color: #afbdd1; }
.security-score-ring.scanning { animation: pulse 1s infinite; border-color: var(--blue); }
@keyframes pulse { 50% { transform: scale(.96); opacity: .72; } }
.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.controls-panel { grid-row: span 2; }
.control-row { display: grid; grid-template-columns: 42px minmax(0,1fr) 48px; align-items: center; gap: 12px; min-height: 86px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.control-row:last-child { border-bottom: 0; }
.control-row > span:nth-child(2) { display: flex; flex-direction: column; }
.control-row small { margin-top: 4px; color: var(--muted); }
.control-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; }
.control-icon.ok { color: var(--green); background: var(--surface-green); }
.control-icon.warning { color: var(--amber); background: var(--surface-amber); }
.findings-panel { min-height: 300px; }
.finding { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: 0; }
.finding > span { display: inline-grid; place-items: center; min-height: 24px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.finding.medium > span { color: #9a6000; background: var(--surface-amber); }
.finding.low > span { color: #4d617b; background: #edf1f5; }
.finding p { margin: 4px 0; color: var(--muted); font-size: 13px; }
.finding small { color: var(--muted); }
.finding.resolving { opacity: .7; pointer-events: none; }
.finding.resolved { display: none; }
.security-clear { min-height: 220px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; padding: 28px; color: #08794f; text-align: center; }
.security-clear > svg { width: 38px; height: 38px; padding: 8px; border-radius: 50%; color: #07875a; background: #e7f8f1; }
.security-clear span { max-width: 320px; color: var(--muted); font-size: 12px; }

/* Analytics */
.analytics-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(320px,.75fr); gap: 18px; max-width: 1550px; margin: 0 auto; }
.analytics-chart-panel { min-width: 0; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-line { display: inline-block; width: 18px; height: 3px; }
.legend-line.blue { background: var(--blue); }
.legend-line.green { background: var(--green); }
#analyticsChart { display: block; width: calc(100% - 36px); height: 330px; margin: 12px 18px 18px; }
.sources-panel { min-height: 420px; }
.source-row { display: grid; grid-template-columns: 150px minmax(80px,1fr) 44px; align-items: center; gap: 10px; min-height: 72px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.source-row:last-child { border-bottom: 0; }
.bar { height: 7px; overflow: hidden; border-radius: 99px; background: #e9edf2; }
.bar i { display: block; height: 100%; background: var(--cyan); }
.pages-panel { grid-column: 1 / -1; }
.page-stat { display: grid; grid-template-columns: minmax(200px,1fr) 120px 150px; align-items: center; min-height: 68px; padding: 9px 18px; border-bottom: 1px solid var(--line); }
.page-stat:last-child { border-bottom: 0; }
.page-stat > span { display: flex; flex-direction: column; }
.page-stat small { color: var(--muted); }

/* Settings */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0,840px); gap: 24px; max-width: 1200px; margin: 0 auto; }
.settings-nav { display: flex; flex-direction: column; gap: 4px; }
.settings-nav button { min-height: 44px; padding: 0 12px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; text-align: left; }
.settings-nav button.active { color: var(--blue); font-weight: 800; background: var(--surface-blue); }
.settings-content { display: flex; flex-direction: column; gap: 18px; }
.settings-content > [data-settings-panel] { display: flex; flex-direction: column; gap: 18px; }
.settings-section { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.settings-section h2 { margin: 0 0 18px; font-size: 20px; }
.settings-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.settings-section-heading h2 { margin-bottom: 4px; }
.settings-section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.member-list, .environment-settings, .variable-list { display: grid; }
.member-row, .environment-settings > div, .variable-row, .integration-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 66px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.member-row:last-child, .environment-settings > div:last-child, .variable-row:last-child, .integration-row:last-child { border-bottom: 0; }
.member-row > span:nth-child(2), .environment-settings > div > span:nth-child(2), .variable-row > span:first-child, .integration-row > span:nth-child(2) { display: grid; gap: 3px; }
.member-row small, .environment-settings small, .variable-row small, .integration-row small { color: var(--muted); }
.member-avatar, .environment-badge, .integration-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; color: #0879df; font-weight: 800; background: #e9f4ff; }
.environment-badge.staging, .integration-icon.slack { color: #008bb7; background: #e5f9fd; }
.environment-badge.preview { color: #a56600; background: #fff4dc; }
.integration-icon.github { color: #fff; background: #172033; }
.member-role { min-width: 116px; padding: 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--navy); background: #fff; }
.inline-form { display: grid; grid-template-columns: minmax(0,1fr) 180px auto; align-items: end; gap: 10px; }
.inline-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.inline-form input, .inline-form select, .variable-form input { min-width: 0; height: 42px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--navy); background: #fff; }
.variable-row { grid-template-columns: minmax(0,1fr) 130px 36px; }
.variable-row code { color: var(--navy); font-weight: 800; }
.variable-form { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(200px,1fr) auto; gap: 9px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.billing-plan { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.billing-plan > span { display: grid; gap: 5px; }
.billing-plan > span > small { color: var(--blue); font-weight: 800; }
.billing-plan > span > strong { font-size: 24px; }
.billing-plan p { margin: 0; color: var(--muted); }
.billing-plan > strong { font-size: 28px; }
.billing-plan > strong small { color: var(--muted); font-size: 12px; }
.usage-row { display: grid; grid-template-columns: 190px minmax(0,1fr); align-items: center; gap: 16px; padding: 16px 0; }
.usage-row > span { display: grid; gap: 3px; }
.usage-row small { color: var(--muted); }
.deployment-detail-modal { width: min(680px,100%); }
.deployment-detail-modal .modal-header p { margin: 6px 0 0; color: var(--muted); }
.deployment-detail-body { padding: 20px 22px; }
.detail-summary { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: 6px; }
.detail-summary > div { display: grid; gap: 4px; padding: 14px; border-right: 1px solid var(--line); }
.detail-summary > div:last-child { border-right: 0; }
.detail-summary small { color: var(--muted); }
.build-log { display: grid; gap: 9px; margin-top: 16px; padding: 15px; border-radius: 6px; color: #d8e3f1; font: 12px/1.45 Consolas,monospace; background: #0b1c39; }
.build-log span { display: flex; gap: 10px; }
.build-log b { color: #62c7ef; }
.build-log .log-error { color: #ffadb5; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.form-grid label, .release-note { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 800; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea, .release-note textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); background: #fff; }
.form-grid input { height: 42px; }
.toggle-row, .danger-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row > span, .danger-row > span { display: flex; flex-direction: column; }
.toggle-row small, .danger-row small { margin-top: 4px; color: var(--muted); }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #cdd5df; cursor: pointer; }
.switch span::after { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); content: ""; transition: transform .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.danger-zone { border-color: #f3bbc3; }

/* Modal and toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: rgba(6,15,34,.62); }
.modal { width: min(560px,100%); max-height: calc(100vh - 36px); overflow-y: auto; border-radius: 8px; background: #fff; box-shadow: 0 26px 70px rgba(0,0,0,.28); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 3px 0 0; font-size: 24px; }
.release-summary { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 11px; margin: 18px 22px; padding: 14px; border-radius: 6px; background: var(--canvas); }
.release-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 6px; color: var(--blue); background: var(--surface-blue); }
.release-summary > div { display: flex; flex-direction: column; }
.release-summary > div span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.preflight-list { display: grid; grid-template-columns: 1fr 1fr; margin: 0 22px; border: 1px solid var(--line); border-radius: 6px; }
.preflight-list > div { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; min-height: 68px; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.preflight-list > div:nth-child(2n) { border-right: 0; }
.preflight-list > div:nth-last-child(-n+2) { border-bottom: 0; }
.preflight-list > div > svg { color: var(--green); }
.preflight-list span { display: flex; flex-direction: column; }
.preflight-list small { margin-top: 3px; color: var(--muted); }
.release-note { margin: 18px 22px; }
.publish-progress { margin: 0 22px 18px; padding: 14px; border: 1px solid #b9ddf5; border-radius: 7px; background: #f3faff; }
.publish-progress-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }
#publishMeter { width: 0; background: var(--blue); }
.publish-stages { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin-top: 12px; }
.publish-stages span { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; text-align: center; }
.publish-stages span.active { color: var(--blue); font-weight: 800; }
.publish-stages span.complete { color: var(--green); font-weight: 800; }
.publish-stages svg { width: 17px; height: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 22px; border-top: 1px solid var(--line); }
.command-backdrop { position: fixed; inset: 0; z-index: 110; display: grid; place-items: start center; padding: min(14vh,120px) 18px 18px; background: rgba(6,15,34,.54); backdrop-filter: blur(3px); }
.command-dialog { width: min(650px,100%); max-height: min(680px,calc(100vh - 80px)); overflow: hidden; border: 1px solid rgba(255,255,255,.5); border-radius: 8px; background: #fff; box-shadow: 0 30px 80px rgba(4,15,34,.32); }
.command-search { display: grid; grid-template-columns: 24px minmax(0,1fr) 36px; align-items: center; gap: 9px; padding: 13px 14px 13px 18px; border-bottom: 1px solid var(--line); }
.command-search > svg { color: var(--blue); }
.command-search input { min-width: 0; height: 38px; border: 0; outline: none; color: var(--navy); font-size: 16px; background: transparent; }
.command-results { max-height: 515px; overflow-y: auto; padding: 8px; }
.command-group-label { display: block; padding: 9px 10px 5px; color: #718096; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.command-results button { display: grid; grid-template-columns: 38px minmax(0,1fr) 20px; align-items: center; gap: 11px; width: 100%; min-height: 58px; padding: 8px 10px; border: 0; border-radius: 6px; color: var(--navy); text-align: left; background: transparent; cursor: pointer; }
.command-results button:hover, .command-results button.keyboard-active { background: #eef6fd; }
.command-results button > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.command-results button small { color: var(--muted); }
.command-results button > svg { width: 16px; color: #9aabba; }
.command-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; }
.command-icon svg { width: 18px; }
.command-icon.blue { color: #0879df; background: #e9f4ff; }
.command-icon.cyan { color: #008bb7; background: #e5f9fd; }
.command-icon.green { color: #07875a; background: #e7f8f1; }
.command-icon.amber { color: #a56600; background: #fff4dc; }
.command-icon.coral { color: #d83a4b; background: #fff0f1; }
.command-empty { display: flex; min-height: 210px; align-items: center; justify-content: center; flex-direction: column; gap: 7px; padding: 26px; text-align: center; }
.command-empty svg { color: var(--muted); }
.command-empty span { color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .project-popover { right: 10px; left: 10px; width: auto; }
  .notification-popover { right: 10px; left: 10px; width: auto; }
  .project-destinations.list-view .destination-card { display: block; }
  .project-destinations.list-view .destination-card > img { height: 150px; margin-top: 10px; }
  .inline-form, .variable-form { grid-template-columns: 1fr; }
  .billing-plan { align-items: flex-start; flex-direction: column; }
  .usage-row { grid-template-columns: 1fr; gap: 8px; }
  .detail-summary { grid-template-columns: 1fr; }
  .detail-summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-summary > div:last-child { border-bottom: 0; }
}
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 8px; width: min(360px, calc(100vw - 40px)); min-height: 58px; padding: 12px 14px; border: 1px solid #bce4d3; border-radius: 6px; color: #075f3f; background: #f2fcf7; box-shadow: var(--shadow); animation: toast-in .22s ease-out; }
.toast.error { color: #a82f41; border-color: #f1bdc4; background: #fff4f5; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1240px) {
  :root { --sidebar-width: 86px; }
  .brand-copy, .nav-item > span:not(.status-dot):not(.nav-count), .workspace-chip > div, .workspace-chip > svg { display: none; }
  .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .nav-item { grid-template-columns: 1fr; place-items: center; padding: 8px; }
  .nav-count { position: absolute; right: 7px; top: 5px; min-width: 18px; height: 18px; padding: 0 5px; }
  .workspace-chip { display: flex; justify-content: center; }
  .health-band { grid-template-columns: 1.25fr repeat(2,1fr); }
  .health-metric:nth-last-child(-n+2) { display: none; }
  .domains-layout { grid-template-columns: 260px minmax(480px,1fr); }
  .connection-panel { grid-column: 1 / -1; min-height: auto; }
  .connection-empty { min-height: 150px; }
  .builder-layout { grid-template-columns: 74px minmax(500px,1fr) 290px; }
  .builder-panel-title > span, .section-item span, .add-section span { display: none; }
  .component-library-title, .component-library button span { display: none; }
  .component-library button { grid-template-columns: 1fr; place-items: center; padding: 7px; }
  .section-item { grid-template-columns: 1fr; place-items: center; }
  .section-item svg:last-child { display: none; }
  .builder-panel-title { justify-content: center; }
  .add-section { font-size: 0; }
  .deployment-row { grid-template-columns: 34px minmax(220px,1.5fr) 110px 140px 90px 50px; }
  .deployment-row > span:nth-child(4) { display: none; }
  .topbar-tagline { display: none; }
  .import-layout { grid-template-columns: minmax(0,1fr) 330px; }
  .upload-zone { grid-template-columns: 62px minmax(190px,1fr); }
  .uploaded-file { grid-column: 1 / -1; }
  body.builder-active .builder-layout { grid-template-columns: 86px minmax(520px,1fr) 320px; }
  body.builder-active .builder-panel-title > span, body.builder-active .section-item span, body.builder-active .add-section span { display: none; }
}

@media (max-width: 920px) {
  body { overflow: auto; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; width: 250px; height: 100vh; transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .brand-copy, .nav-item > span:not(.status-dot):not(.nav-count), .workspace-chip > div, .workspace-chip > svg { display: initial; }
  .nav-item { grid-template-columns: 26px minmax(0,1fr) auto; place-items: initial; }
  .workspace-chip { display: grid; justify-content: initial; }
  .mobile-menu { display: inline-grid !important; }
  .app-content { height: auto; min-height: 100vh; }
  .topbar { position: sticky; top: 0; z-index: 20; padding: 0 12px; }
  .topbar > .environment-status, .topbar > .secondary { display: none; }
  .france-status { display: none; }
  .project-picker { min-width: 0; width: 180px; }
  .main-area { height: auto; min-height: calc(100vh - var(--topbar-height)); overflow: visible; }
  .view { padding: 20px 16px 36px; }
  .page-heading { align-items: flex-start; }
  .heading-actions { display: none; }
  .health-band { grid-template-columns: 1fr 1fr; }
  .score-block { grid-column: 1 / -1; }
  .health-metric { border-top: 1px solid var(--line); border-left: 0; padding-left: 0; }
  .overview-grid, .security-layout, .analytics-grid { grid-template-columns: 1fr; }
  .controls-panel { grid-row: auto; }
  .analytics-chart-panel, .pages-panel { grid-column: 1; }
  .domains-layout { grid-template-columns: 1fr; }
  .domain-list-panel { min-height: auto; }
  .project-destinations { grid-template-columns: 1fr 1fr; }
  .builder-view.active { min-height: calc(100vh - var(--topbar-height)); }
  .builder-toolbar { flex-wrap: wrap; }
  .builder-toolbar .save-state, .builder-toolbar .topbar-spacer { display: none; }
  .builder-layout { grid-template-columns: 64px minmax(500px,1fr); overflow: auto; }
  .builder-inspector { position: fixed; right: 0; bottom: 0; z-index: 40; width: min(360px, calc(100vw - 20px)); max-height: 62vh; border: 1px solid var(--line); border-radius: 8px 0 0 0; box-shadow: var(--shadow); transform: translateY(calc(100% - 54px)); transition: transform .2s ease; }
  .builder-inspector:hover, .builder-inspector:focus-within, .builder-inspector.open { transform: translateY(0); }
  .deploy-summary, .analytics-kpis { grid-template-columns: 1fr 1fr; }
  .deploy-summary > div:nth-child(2), .analytics-kpis > div:nth-child(2) { border-right: 0; }
  .deploy-summary > div:nth-child(-n+2), .analytics-kpis > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .deployment-row { grid-template-columns: 34px minmax(190px,1fr) 100px 70px; }
  .deployment-row > .commit, .deployment-row > span:nth-child(4), .deployment-row > span:nth-child(5) { display: none; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; overflow-x: auto; }
  .settings-nav button { white-space: nowrap; }
  .import-layout { grid-template-columns: 1fr; }
  .diagnostic-panel { min-height: auto; }
  body.builder-active .builder-layout { grid-template-columns: 64px minmax(500px,1fr); }
  .builder-brand strong { display: none; }
  .builder-brand { padding-right: 8px; }
  .ai-command-panel { position: fixed; left: 50%; bottom: 64px; width: min(520px,calc(100vw - 20px)); }
  .ai-analysis-bar { position: fixed; left: 50%; bottom: 190px; width: min(500px,calc(100vw - 20px)); }
}

@media (max-width: 640px) {
  .topbar { gap: 6px; }
  .project-picker { width: 146px; }
  .project-picker small { display: none; }
  .topbar > .icon-button:not(.mobile-menu) { display: none; }
  .topbar .button.primary span { display: none; }
  .page-heading { margin-bottom: 16px; }
  .page-heading h1 { font-size: 28px; }
  .source-picker { grid-template-columns: 1fr; }
  .source-option { min-height: 82px; }
  .upload-zone { grid-template-columns: 54px minmax(0,1fr); padding: 16px; }
  .uploaded-file { grid-column: 1 / -1; }
  .detected-grid { grid-template-columns: 1fr; }
  .framework-card, .config-list, .project-preview { grid-column: 1; grid-row: auto; }
  .project-preview img { height: 155px; }
  .health-band { grid-template-columns: 1fr; padding: 16px; }
  .score-block { grid-column: 1; }
  .health-metric { display: flex !important; }
  .overview-grid { gap: 12px; }
  .traffic-kpis { grid-template-columns: 1fr; }
  .traffic-kpis > div, .traffic-kpis > div + div { padding: 9px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .traffic-kpis > div:last-child { border-bottom: 0; }
  .recommendation { grid-template-columns: 40px minmax(0,1fr) 20px; }
  .recommendation .impact { display: none; }
  .project-destinations { grid-template-columns: 1fr; }
  .builder-toolbar .segmented span { display: none; }
  .builder-toolbar .segmented button { min-width: 44px; }
  .builder-layout, body.builder-active .builder-layout { display: grid; grid-template-columns: minmax(0,1fr); overflow: visible; }
  .builder-sections { position: relative; z-index: 9; display: flex; align-items: center; gap: 7px; min-height: 58px; padding: 7px 8px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .builder-panel-title { display: none; }
  .section-item { flex: 0 0 42px; width: 42px; height: 42px; margin: 0; padding: 7px; }
  .add-section { flex: 0 0 42px; width: 42px; height: 42px; margin: 0; }
  .component-library { display: flex; flex: none; flex-direction: row; gap: 6px; margin: 0; padding: 0 0 0 7px; border-top: 0; border-left: 1px solid var(--line); }
  .component-library-title { display: none; }
  .component-library button { flex: 0 0 42px; width: 42px; min-height: 42px; padding: 7px; }
  .imported-structure-panel { flex: 0 0 210px; grid-template-columns: 1fr; gap: 3px; margin: 0; padding: 7px 9px; }
  .imported-structure-panel > .state, .imported-structure-panel > small { display: none; }
  .imported-structure-panel > strong { font-size: 11px; }
  .imported-structure-panel > button { min-height: 28px; padding: 4px 7px; font-size: 10px; }
  .builder-brand .brand-mark { display: none; }
  .builder-toolbar { gap: 7px; padding: 8px; }
  .builder-brand { margin-right: 0; padding: 0 7px 0 0; }
  .ai-command-panel { left: 50%; bottom: 56px; width: calc(100vw - 16px); padding: 10px; }
  .ai-command-actions button { min-height: 38px; font-size: 12px; }
  .ai-command-status { display: none; }
  .canvas-stage { min-height: calc(100vh - 168px); padding: 14px 8px 76px; overflow-x: hidden; }
  .site-frame { width: calc(100vw - 16px); min-width: 0; }
  .site-frame.mobile { width: calc(100vw - 16px); min-width: 0; }
  .builder-inspector { right: 0; width: 100vw; max-height: 72vh; border-radius: 8px 8px 0 0; }
  .site-hero-copy h2 { font-size: 34px; }
  .deploy-summary, .analytics-kpis { grid-template-columns: 1fr; }
  .deploy-summary > div, .analytics-kpis > div { min-height: 84px; border-right: 0; border-bottom: 1px solid var(--line); }
  .deploy-summary > div:last-child, .analytics-kpis > div:last-child { border-bottom: 0; }
  .deployment-row { grid-template-columns: 32px minmax(0,1fr) 72px; }
  .deployment-row > .state, .deployment-row > button { display: none; }
  .security-score-block { flex-direction: column; align-items: flex-start; }
  .finding { grid-template-columns: 64px minmax(0,1fr); }
  .finding .button { grid-column: 2; justify-self: start; }
  .analytics-kpis { margin-bottom: 12px; }
  .source-row { grid-template-columns: 120px minmax(60px,1fr) 38px; }
  .page-stat { grid-template-columns: minmax(140px,1fr) 90px; }
  .page-stat > small { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.full { grid-column: 1; }
  .preflight-list { grid-template-columns: 1fr; }
  .preflight-list > div { border-right: 0; }
  .preflight-list > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .release-summary { grid-template-columns: 42px minmax(0,1fr); }
  .release-summary > .state { grid-column: 2; justify-self: start; }
}

/* Local production services */
.service-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.service-inline.ready { color: #08784e; }
.service-inline.warning { color: #9a6110; }
.provider-status { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #f8fafc; }
.provider-status > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.provider-status small { color: var(--muted); font-size: 12px; font-weight: 500; }
.provider-status.ready { border-color: #a9dfc7; background: #f0fbf6; }
.provider-status.warning { border-color: #efd29f; background: #fff9ed; }
.security-actions { display: flex; align-items: flex-end; gap: 9px; }
.security-actions label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.security-actions select { min-width: 210px; height: 38px; padding: 0 34px 0 10px; border: 1px solid #bdcad9; border-radius: 6px; color: var(--navy); background: #fff; font: inherit; font-size: 13px; text-transform: none; }
.scan-engine { display: inline-flex; margin-top: 10px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.18); border-radius: 4px; color: #c6d4e7; font-size: 10px; }
.security-placeholder { display: flex; min-height: 220px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 24px; color: var(--navy); text-align: center; }
.security-placeholder.compact { min-height: 150px; }
.security-placeholder svg { width: 28px; height: 28px; color: var(--blue); }
.security-placeholder span { max-width: 340px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.control-row.failed .control-icon { color: #a63243; background: #fff0f2; }
.control-row > .control-result { color: #08784e; font-size: 12px; }
.control-row.failed > .control-result { color: #a63243; }
.finding.critical > span { color: #fff; background: #a71d32; }
.finding.high > span { color: #9b2435; background: #ffe7eb; }
.finding .finding-proof { color: var(--muted); font-size: 11px; }
.site-modal { width: min(620px,100%); }
.site-modal .modal-header p, .dns-modal .modal-header p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.site-modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px 22px; }
.site-modal-body label, #dnsRecordForm label { display: grid; gap: 7px; color: var(--navy); font-size: 12px; font-weight: 800; }
.site-modal-body label:first-child { grid-column: 1 / -1; }
.site-modal-body input, .site-modal-body select, #dnsRecordForm input, #dnsRecordForm select { width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid #bdcad9; border-radius: 6px; color: var(--navy); background: #fff; font: inherit; }
.destination-card[data-runtime-site="true"] { animation: reveal-row .35s ease both; }
.destination-card .site-card-actions { display: flex; justify-content: flex-end; padding: 8px 12px 12px; }
.dns-modal { width: min(780px,100%); }
.dns-modal-body { display: grid; gap: 18px; padding: 20px 22px; }
.subdomain-wizard { display: grid; gap: 16px; padding: 16px; border: 1px solid #acd7f6; border-radius: 7px; background: #f4faff; }
.subdomain-wizard h3 { margin: 3px 0 4px; font-size: 17px; }
.subdomain-wizard p { margin: 0; color: var(--muted); font-size: 12px; }
.dns-readiness { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border: 1px solid #bce4d3; border-radius: 6px; background: #f2fcf7; }
.dns-readiness-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #087c55; background: #d9f5e9; }
.dns-readiness > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.dns-readiness strong { color: #075f3f; font-size: 12px; }
.dns-readiness small { overflow: hidden; color: #37735d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dns-readiness.checking { border-color: #b9d9f5; background: #f4faff; }
.dns-readiness.checking .dns-readiness-icon { color: var(--blue); background: #dceeff; }
.dns-readiness.warning { border-color: #f0cf91; background: #fff9ec; }
.dns-readiness.warning .dns-readiness-icon { color: #9c6500; background: #ffedc7; }
.dns-readiness.warning strong { color: #7d5000; }
.dns-readiness.warning small { color: #7d6841; white-space: normal; }
.dns-readiness .button { min-height: 34px; padding: 6px 9px; font-size: 11px; }
.subdomain-wizard form { display: grid; grid-template-columns: minmax(190px,1fr) minmax(160px,.8fr) auto; align-items: end; gap: 9px; }
.subdomain-wizard label { display: grid; gap: 6px; color: var(--navy); font-size: 12px; font-weight: 800; }
.subdomain-wizard input, .subdomain-wizard select { width: 100%; min-width: 0; height: 42px; padding: 0 10px; border: 1px solid #b9cadb; border-radius: 6px; color: var(--navy); background: #fff; font: inherit; }
.joined-field { display: grid; grid-template-columns: minmax(70px,1fr) auto; align-items: center; overflow: hidden; border: 1px solid #b9cadb; border-radius: 6px; background: #fff; }
.joined-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,134,249,.1); }
.joined-field input { border: 0; border-radius: 0; outline: none; }
.joined-field span { padding: 0 10px; color: var(--muted); font-size: 12px; }
.dns-advanced { border-top: 1px solid var(--line); }
.dns-advanced summary { padding: 14px 2px; color: var(--navy); cursor: pointer; font-size: 12px; font-weight: 800; }
.dns-advanced[open] summary { margin-bottom: 10px; }
.dns-live-list { display: grid; gap: 7px; max-height: 280px; overflow: auto; }
.dns-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 8px; }
.dns-list-toolbar > span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.dns-list-toolbar .segmented button { min-width: 54px; }
.dns-live-record { display: grid; grid-template-columns: 70px 110px minmax(0,1fr) 60px; gap: 10px; align-items: center; min-height: 42px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; }
.dns-live-record strong { color: var(--blue); }
.dns-live-record code { overflow: hidden; text-overflow: ellipsis; }
#dnsRecordForm { display: grid; grid-template-columns: 110px 150px minmax(0,1fr) auto; align-items: end; gap: 9px; padding-top: 16px; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .security-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .security-actions select { width: 100%; min-width: 0; }
  .site-modal-body { grid-template-columns: 1fr; }
  .site-modal-body label:first-child { grid-column: auto; }
  #dnsRecordForm { grid-template-columns: 1fr 1fr; }
  #dnsRecordForm .wide, #dnsRecordForm .button { grid-column: 1 / -1; }
  .dns-live-record { grid-template-columns: 50px 70px minmax(0,1fr); }
  .dns-live-record span:last-child { display: none; }
  .subdomain-wizard form { grid-template-columns: 1fr; }
  #view-domains .page-heading { flex-wrap: wrap; }
  #view-domains .heading-actions { display: flex; width: 100%; }
  #view-domains .heading-actions .button { min-width: 0; flex: 1; }
}

/* Functional prototype additions */
.launch-mode-switch { width: fit-content; margin: -6px auto 18px; padding: 4px; background: #eaf0f7; }
.launch-mode-switch button { min-height: 38px; padding: 0 16px; gap: 8px; }
.create-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(340px,.65fr); gap: 18px; max-width: 1280px; margin: 0 auto; }
.create-brief, .create-plan { padding: 22px; }
.brief-input { display: grid; gap: 9px; margin-top: 14px; font-size: 13px; font-weight: 750; color: var(--navy); }
.brief-input textarea { min-height: 168px; padding: 16px; resize: vertical; border: 1px solid #cad5e3; border-radius: 6px; color: var(--navy); background: #fbfdff; font: inherit; font-size: 15px; line-height: 1.55; outline: none; }
.brief-input textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,134,249,.11); }
.brief-input > small { justify-self: end; color: var(--muted); font-weight: 600; }
.brief-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.brief-suggestions button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: #40516b; background: #fff; font-weight: 700; cursor: pointer; }
.brief-suggestions button:hover { color: var(--blue); border-color: #87c5fb; background: #eff8ff; }
.brief-file-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px dashed #b9c8da; border-radius: 6px; background: #f8fafc; }
.brief-file-row > span { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brief-file-row > span > svg { width: 24px; color: var(--blue); }
.brief-file-row strong, .brief-file-row small { display: block; }
.brief-file-row small { margin-top: 3px; color: var(--muted); }
.generated-outline { display: grid; gap: 2px; margin: 12px 0 16px; }
.generated-outline > div { display: grid; grid-template-columns: 28px 25px minmax(0,1fr); align-items: center; gap: 9px; min-height: 58px; padding: 9px 5px; border-bottom: 1px solid var(--line); }
.generated-outline > div > span { color: #91a0b3; font-size: 11px; font-weight: 800; }
.generated-outline svg { width: 19px; color: var(--blue); }
.generated-outline strong, .generated-outline small { grid-column: 3; }
.generated-outline small { margin-top: -12px; color: var(--muted); }
.generation-note { display: flex; gap: 11px; padding: 13px; border: 1px solid #bfe9db; border-radius: 6px; color: #126447; background: #effaf6; }
.generation-note > svg { flex: 0 0 auto; width: 21px; }
.generation-note strong, .generation-note small { display: block; }
.generation-note small { margin-top: 3px; color: #487463; line-height: 1.4; }
.create-plan .import-action { margin-top: 16px; }
.source-address { display: grid; gap: 7px; margin-top: 12px; font-size: 12px; font-weight: 800; color: var(--navy); }
.source-address > div { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 8px 8px 8px 12px; border: 1px solid #cad5e3; border-radius: 6px; background: #fff; }
.source-address input { min-width: 0; height: 34px; border: 0; outline: none; font: inherit; }
.source-address svg { width: 18px; color: var(--muted); }
[data-launch-panel][hidden], [data-inspector-panel][hidden], .source-address[hidden] { display: none !important; }
.inspector-form { display: grid; gap: 17px; }
.inspector-form > label { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; color: #53647c; font-size: 12px; font-weight: 750; }
.inspector-form label input:not([type="range"]), .inspector-form label textarea { grid-column: 1 / -1; width: 100%; padding: 10px 11px; border: 1px solid #ced8e5; border-radius: 5px; color: var(--navy); background: #fff; font: inherit; font-size: 13px; line-height: 1.45; outline: none; resize: vertical; }
.inspector-form label input:focus, .inspector-form label textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,134,249,.1); }
.inspector-form label input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--blue); }
.inspector-form label output, .inspector-form label small { color: var(--blue); font-weight: 800; }
.inspector-form fieldset { padding: 0; border: 0; }
.inspector-form legend, .design-palette > span { margin-bottom: 8px; color: #53647c; font-size: 12px; font-weight: 750; }
.inspector-segmented { display: grid; grid-template-columns: repeat(3,1fr); }
.inspector-segmented button { min-width: 0; }
.design-palette > div { display: flex; gap: 9px; }
.design-palette button { width: 31px; height: 31px; border: 3px solid #fff; border-radius: 50%; outline: 1px solid #cbd6e2; background: var(--swatch); cursor: pointer; }
.design-palette button.active { outline: 2px solid var(--swatch); outline-offset: 2px; }
.content-live-note { display: flex; align-items: center; gap: 7px; padding: 10px; border-radius: 5px; color: #146347; background: #effaf6; font-size: 12px; font-weight: 700; }
.site-hero-copy[data-align="center"] { left: 20%; width: 60%; text-align: center; }
.site-hero-copy[data-align="center"] h2, .site-hero-copy[data-align="center"] p { margin-left: auto; margin-right: auto; }
.site-hero-copy[data-align="right"] { right: 8%; left: auto; text-align: right; }
.site-hero-copy[data-align="right"] h2, .site-hero-copy[data-align="right"] p { margin-left: auto; }
.save-state.saving .status-dot { background: #f2a93b; box-shadow: 0 0 0 4px rgba(242,169,59,.12); }
.deployment-row[data-generated="true"] { animation: reveal-row .38s ease both; }
@keyframes reveal-row { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 920px) {
  .create-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .launch-mode-switch { width: 100%; }
  .launch-mode-switch button { flex: 1; min-width: 0; padding: 0 8px; }
  .create-brief, .create-plan { padding: 16px; }
  .brief-file-row { align-items: flex-start; }
}

/* Section library, contextual editing and clean preview */
.compact-form { gap: 17px; }
.dynamic-fields { display: grid; gap: 14px; }
.dynamic-fields .field-divider { display: flex; align-items: center; gap: 8px; margin: 4px 0 -3px; color: var(--blue); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.dynamic-fields .field-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.section-design-summary { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 10px; padding: 14px; border: 1px solid #c8d9ed; border-radius: 6px; color: #244666; background: #f5f9fd; }
.section-design-summary > svg { width: 22px; color: var(--blue); }
.section-design-summary strong, .section-design-summary span { display: block; }
.section-design-summary span { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.section-item.custom-section-item { grid-template-columns: 24px minmax(0,1fr) 25px; }
.section-item .remove-section { display: grid; place-items: center; width: 24px; height: 28px; padding: 0; border: 0; color: #8996a8; background: transparent; cursor: pointer; }
.section-item .remove-section:hover { color: var(--red); }
.section-item .remove-section svg { width: 15px; }
.site-frame [data-preview-section] { position: relative; cursor: pointer; }
.site-frame [data-preview-section]:hover { box-shadow: inset 0 0 0 1px rgba(11,134,249,.42); }
.site-frame [data-preview-section].selected-section { box-shadow: inset 0 0 0 2px var(--blue); }
.site-frame [data-preview-section] > .selection-outline { display: none; }
.site-frame [data-preview-section].selected-section > .selection-outline { display: block; }
.section-modal { width: min(760px,100%); }
.section-modal .modal-header p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.section-template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 20px 22px 24px; }
.section-template-grid > button { display: grid; grid-template-columns: 44px minmax(0,1fr) 22px; align-items: center; gap: 11px; min-height: 86px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.section-template-grid > button:hover { border-color: var(--blue); background: #f7fbff; box-shadow: 0 7px 20px rgba(34,69,111,.08); }
.section-template-grid > button > span:nth-child(2) { display: flex; flex-direction: column; gap: 5px; }
.section-template-grid small { color: var(--muted); }
.section-template-grid > button > svg { width: 18px; color: var(--blue); }
.template-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 7px; }
.template-icon.blue { color: var(--blue); background: var(--surface-blue); }
.template-icon.coral { color: #e9574d; background: #fff0ee; }
.template-icon.green { color: var(--green); background: var(--surface-green); }
.template-icon.amber { color: #b57512; background: #fff7e8; }
.custom-section { padding: 44px 38px; background: #fff; }
.custom-section .section-eyebrow { display: block; margin-bottom: 7px; color: var(--preview-accent,#0b86f9); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.custom-section > h3 { margin: 0 0 22px; color: var(--navy); font-size: 28px; }
.custom-faq .faq-list { border-top: 1px solid var(--line); }
.custom-faq details { padding: 15px 4px; border-bottom: 1px solid var(--line); }
.custom-faq summary { font-weight: 800; cursor: pointer; }
.custom-faq details p { margin: 9px 0 0; color: var(--muted); line-height: 1.5; }
.custom-gallery .gallery-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.custom-gallery figure { min-width: 0; margin: 0; }
.custom-gallery img { width: 100%; height: 148px; object-fit: cover; border-radius: 4px; }
.custom-gallery figcaption { margin-top: 7px; font-weight: 750; }
.custom-team .team-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.custom-team article { padding: 18px; border: 1px solid var(--line); border-radius: 6px; }
.team-avatar { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 13px; border-radius: 50%; color: #fff; font-weight: 850; background: var(--navy); }
.custom-team article span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.custom-pricing .pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.custom-pricing article { padding: 18px; border: 1px solid var(--line); border-radius: 6px; }
.custom-pricing article.featured { border-color: var(--preview-accent,#0b86f9); box-shadow: inset 0 3px 0 var(--preview-accent,#0b86f9); }
.custom-pricing article strong, .custom-pricing article b { display: block; }
.custom-pricing article b { margin: 10px 0; font-size: 24px; }
.custom-pricing article span { color: var(--muted); font-size: 12px; }
.custom-pricing article button { width: 100%; min-height: 36px; margin-top: 15px; border: 0; border-radius: 4px; color: #fff; background: var(--navy); font-weight: 800; }
.preview-overlay { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: #e9edf3; }
.preview-overlay[hidden] { display: none; }
.preview-toolbar { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 9px 18px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: 0 4px 18px rgba(24,37,60,.07); }
.preview-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; padding: 0; border: 0; background: transparent; text-align: left; }
.preview-brand > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.preview-brand small { color: var(--muted); }
.preview-secure { display: inline-flex; align-items: center; gap: 6px; color: #34705a; font-size: 12px; font-weight: 750; }
.preview-secure svg { width: 16px; }
.preview-workspace { min-height: 0; flex: 1; overflow: auto; padding: 34px; }
.preview-viewport { width: min(1120px,100%); min-height: 100%; margin: 0 auto; transition: width .25s ease; }
.preview-viewport.mobile { width: 390px; }
.preview-viewport .site-frame { width: 100%; min-width: 0; margin: 0; transform: none !important; box-shadow: 0 20px 55px rgba(26,40,64,.16); }
.preview-viewport.mobile .site-frame { width: 390px; min-width: 390px; }
.preview-viewport .selection-outline, .preview-viewport .comment-pin, .preview-viewport #annotationCanvas { display: none !important; }
.preview-viewport [data-preview-section] { cursor: default; box-shadow: none !important; }

@media (max-width: 640px) {
  .section-template-grid { grid-template-columns: 1fr; }
  .preview-toolbar { flex-wrap: wrap; }
  .preview-toolbar .preview-secure { display: none; }
  .preview-toolbar .segmented button { min-width: 42px; font-size: 0; }
  .preview-workspace { padding: 14px; }
  .custom-gallery .gallery-grid, .custom-team .team-grid, .custom-pricing .pricing-grid { grid-template-columns: 1fr; }
}

/* Import runtime plan */
.runtime-plan { overflow: hidden; }
.runtime-plan .panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.runtime-topology { display: grid; grid-template-columns: minmax(180px,1fr) 22px minmax(180px,1fr) 22px minmax(180px,1fr); align-items: stretch; gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.runtime-service { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 88px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.runtime-service.primary-service { border-color: #94cdf9; box-shadow: inset 0 3px 0 var(--blue); }
.runtime-service > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; color: var(--blue); background: var(--surface-blue); }
.runtime-service > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.runtime-service small, .runtime-service em { color: var(--muted); font-size: 10px; font-style: normal; }
.runtime-service strong { font-size: 11px; line-height: 1.25; }
.runtime-service > b { padding: 4px 6px; border-radius: 4px; color: #08764e; background: #eaf8f2; font-size: 9px; text-transform: uppercase; }
.topology-arrow { align-self: center; width: 18px; color: #9aa8b9; }
.runtime-config-grid { display: grid; grid-template-columns: 1.15fr .85fr; }
.secrets-config, .permission-config { padding: 18px; }
.secrets-config { border-right: 1px solid var(--line); }
.runtime-subheading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.runtime-subheading > span:first-child { display: flex; align-items: center; gap: 8px; }
.runtime-subheading svg { width: 18px; color: var(--blue); }
.warning-state { color: #9b6412; background: #fff5df; }
#secretFields { display: grid; gap: 8px; }
#secretFields > label { display: grid; grid-template-columns: minmax(145px,.7fr) minmax(180px,1.3fr); align-items: center; gap: 10px; min-height: 54px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
#secretFields > label > span { display: flex; flex-direction: column; gap: 2px; font-size: 11px; font-weight: 800; }
#secretFields > label small { color: var(--muted); font-weight: 500; }
#secretFields > label > div { display: grid; grid-template-columns: minmax(0,1fr) 34px; align-items: center; gap: 5px; }
#secretFields input { min-width: 0; height: 36px; padding: 0 9px; border: 1px solid #cbd6e2; border-radius: 5px; font: inherit; font-size: 12px; outline: none; }
#secretFields input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,134,249,.1); }
#secretFields input:disabled { color: #6e7e92; background: #edf2f7; }
.no-secrets { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 9px 11px; border: 1px solid #bde5d3; border-radius: 6px; color: #116847; background: #f1fbf6; }
.no-secrets > svg { width: 20px; }
.no-secrets > span { display: flex; flex-direction: column; gap: 3px; }
.no-secrets small { color: #54786a; }
.permission-config p { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.permission-config > small { display: block; margin-top: 9px; color: var(--muted); }
.consent-check { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.consent-check input { position: absolute; opacity: 0; }
.consent-check > span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #aebdce; border-radius: 5px; color: transparent; background: #fff; }
.consent-check input:checked + span { color: #fff; border-color: var(--green); background: var(--green); }
.consent-check svg { width: 15px; }
.runtime-plan.configured .warning-state { color: #08764e; background: #eaf8f2; }

@media (max-width: 1120px) {
  .runtime-topology { grid-template-columns: 1fr; }
  .topology-arrow { display: none; }
  .runtime-config-grid { grid-template-columns: 1fr; }
  .secrets-config { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  #secretFields > label { grid-template-columns: 1fr; }
}

/* Action center and domain onboarding */
.recommendation.completed { opacity: .68; background: #f5faf7; }
.recommendation.completed .icon-tile { color: var(--green); background: var(--surface-green); }
.recommendation.completed .impact { color: var(--green); background: #eaf8f2; }
.recommendations-complete { display: flex; min-height: 190px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 24px; color: #126847; text-align: center; }
.recommendations-complete > svg { width: 34px; height: 34px; margin-bottom: 3px; }
.recommendations-complete span { color: var(--muted); font-size: 12px; }
.domain-modal { width: min(680px,100%); }
.domain-modal .modal-header p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.domain-modal-body { display: grid; gap: 18px; padding: 20px 22px; }
.domain-mode { width: fit-content; }
.domain-search-field { display: grid; gap: 8px; color: var(--navy); font-size: 12px; font-weight: 800; }
.domain-search-field > div { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 7px 7px 7px 12px; border: 1px solid #bdcad9; border-radius: 7px; background: #fff; }
.domain-search-field > div:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,134,249,.1); }
.domain-search-field svg { width: 19px; color: var(--muted); }
.domain-search-field input { min-width: 0; height: 38px; border: 0; outline: none; color: var(--navy); font: inherit; font-size: 16px; }
.domain-search-field > small { color: var(--muted); font-weight: 500; }
.domain-checking { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 76px; border: 1px dashed #bad4eb; border-radius: 7px; color: var(--blue); background: #f5faff; }
.domain-checking svg { animation: spin 1s linear infinite; }
.domain-result { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 86px; padding: 13px; border: 1px solid #a9dfc7; border-radius: 7px; color: #0b6744; background: #f0fbf6; }
.domain-result.unavailable { color: #a63243; border-color: #f0bcc4; background: #fff4f5; }
.domain-result-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; background: var(--green); }
.domain-result.unavailable .domain-result-icon { background: var(--red); }
.domain-result > div:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }
.domain-result > div:nth-child(2) span { color: #517264; font-size: 12px; }
.domain-result > div:last-child { text-align: right; }
.domain-result > div:last-child strong, .domain-result > div:last-child small { display: block; }
.domain-result > div:last-child strong { font-size: 20px; }
.domain-result > div:last-child small { margin-top: 2px; color: var(--muted); }
.domain-card.new-domain { animation: reveal-row .35s ease both; }

@media (max-width: 640px) {
  .domain-mode { width: 100%; }
  .domain-mode button { min-width: 0; flex: 1; }
  .domain-search-field > div { grid-template-columns: 20px minmax(0,1fr); }
  .domain-search-field .button { grid-column: 1 / -1; }
  .dns-readiness { grid-template-columns: 30px minmax(0,1fr); }
  .dns-readiness .button { grid-column: 1 / -1; width: 100%; }
}
