/* Solvora Site Builder — chrome only. The customer site lives in an iframe. */
:root {
  --navy: #132238;
  --navy-soft: #1d3550;
  --ink: #132238;
  --blue: #2d6be4;
  --blue-dark: #1e53bd;
  --blue-ink: #1a4aa8;
  --sky: #e9f1ff;
  --sky-soft: #f4f8ff;
  --red: #df4335;
  --red-soft: #fff0ed;
  --cream: #f7f1e6;
  --paper: #ffffff;
  --muted: #5e6c80;
  --muted-light: #8794a7;
  --line: #e5e9f0;
  --line-dark: #d5dbe5;
  --line-soft: #eef1f5;
  --green: #12805c;
  --green-soft: #e8f7f0;
  --amber: #b54708;
  --amber-soft: #fff4e5;
  --purple: #6941c6;
  --purple-soft: #f3efff;
  --radius: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --surface-muted: #f8fafc;
  --shadow: 0 24px 70px rgba(11, 31, 58, 0.12);
  --shadow-soft: 0 10px 28px rgba(11, 31, 58, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --topbar: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #e9edf3;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { display: block; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.app { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  height: var(--topbar);
  flex: 0 0 var(--topbar);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 18px 0 20px;
  background: var(--navy);
  color: #fff;
  position: relative;
  z-index: 20;
}
.topbar-brand { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #f3d9a4, #e8bd6a);
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 14px; font-weight: 700; letter-spacing: .01em; }
.brand-copy span { font-size: 11.5px; color: #a9b8cc; margin-top: 3px; }

.topbar-center { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.tb-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  color: #eaf0f8;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.tb-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }
.tb-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tb-primary {
  height: 34px; padding: 0 15px;
  border: 0; border-radius: 9px;
  background: #f0c97c;
  color: #2a1c05;
  font-size: 12.5px; font-weight: 750;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .15s ease, background .15s ease;
}
.tb-primary:hover { background: #f6d794; transform: translateY(-1px); }
.save-state { font-size: 11.5px; color: #93a4bb; margin-right: 2px; }

.device-switch {
  display: flex; align-items: center; gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
}
.device-switch button {
  width: 30px; height: 27px;
  display: grid; place-items: center;
  border: 0; border-radius: 6px;
  background: transparent;
  color: #93a4bb;
}
.device-switch button:hover { color: #fff; }
.device-switch button.is-active { background: rgba(255,255,255,.16); color: #fff; }
.device-switch svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- workspace */
.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 322px;
}

.rail {
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}
.rail-section { padding: 18px 14px; border-bottom: 1px solid var(--line-soft); }
.rail-grow { flex: 1; }
.rail-heading {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6px 10px;
  font-size: 10.5px; font-weight: 750;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted-light);
}
.rail-heading span { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted-light); font-size: 11px; }

.page-list { display: flex; flex-direction: column; gap: 2px; }
.page-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 9px;
  border: 0; border-radius: 8px;
  background: transparent;
  color: #344256;
  text-align: left;
  font-size: 12.5px; font-weight: 550;
}
.page-item svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: #8b98aa; }
.page-item:hover { background: var(--surface-muted); }
.page-item.is-active { background: var(--sky); color: var(--blue-ink); font-weight: 700; }
.page-item.is-active svg { color: var(--blue); }
.page-item .home-tag {
  margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted-light);
}

.section-list { display: flex; flex-direction: column; gap: 2px; }
.section-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 6px 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #425066;
  font-size: 12px;
  text-align: left;
  width: 100%;
}
.section-item .grip { color: #c1c9d5; display: grid; place-items: center; }
.section-item .grip svg { width: 12px; height: 12px; fill: currentColor; }
.section-item .sec-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-item:hover { background: var(--surface-muted); }
.section-item.is-active { background: var(--sky-soft); border-color: #cfe0ff; color: var(--blue-ink); font-weight: 650; }
.section-item .sec-actions { display: flex; gap: 1px; opacity: 0; transition: opacity .12s ease; }
.section-item:hover .sec-actions, .section-item.is-active .sec-actions { opacity: 1; }
.sec-mini {
  width: 21px; height: 21px;
  display: grid; place-items: center;
  border: 0; border-radius: 5px;
  background: transparent; color: #7b899c;
}
.sec-mini:hover { background: #fff; color: var(--ink); }
.sec-mini.danger:hover { color: var(--red); }
.sec-mini svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sec-mini:disabled { opacity: .25; cursor: default; }

.add-section-btn {
  width: 100%; margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px;
  border: 1px dashed #ccd6e4;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px; font-weight: 650;
}
.add-section-btn:hover { border-color: var(--blue); color: var(--blue-ink); background: var(--sky-soft); }
.add-section-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.rail-tools { border-bottom: 0; display: flex; flex-direction: column; gap: 1px; padding-bottom: 14px; }
.rail-tool {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  border: 0; border-radius: 8px;
  background: transparent;
  color: #425066;
  font-size: 12.5px; font-weight: 550;
  text-align: left;
}
.rail-tool:hover { background: var(--surface-muted); }
.rail-tool svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: #7b899c; }
.rail-tool .status-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: #c3cbd7; }
.rail-tool .status-dot.is-live { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* ---------------------------------------------------------------- stage */
.stage {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(24, 52, 92, .07) 1px, transparent 0) 0 0 / 20px 20px,
    #eef1f5;
}
.browser-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  border: 1px solid #dde3ec;
  overflow: hidden;
}
.browser-bar {
  flex: 0 0 46px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}
.browser-dots { display: flex; gap: 5px; }
.browser-dots i { width: 8px; height: 8px; border-radius: 50%; background: #dbe2ec; }
.browser-dots i:first-child { background: #eec3bd; }
.browser-dots i:nth-child(2) { background: #eedcb9; }
.browser-dots i:nth-child(3) { background: #bfdcc9; }
.url-pill {
  flex: 1; max-width: 520px;
  display: flex; align-items: center; gap: 7px;
  margin: 0 auto;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #4b5a70;
  font-size: 11.5px;
  overflow: hidden;
}
.url-pill .lock { width: 12px; height: 12px; flex: 0 0 auto; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.url-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-chip {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted-light);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #fff;
}

.canvas { flex: 1; min-height: 0; display: flex; justify-content: center; overflow: hidden; padding: 16px; }
.frame-wrap {
  width: 100%;
  max-width: 1280px;
  height: 100%;
  position: relative;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 14px rgba(16, 36, 66, .08);
  overflow: hidden;
  transition: max-width .28s cubic-bezier(.4, 0, .2, 1);
}
.canvas[data-device="tablet"] .frame-wrap { max-width: 834px; }
.canvas[data-device="mobile"] .frame-wrap { max-width: 390px; }
#site-frame { width: 100%; height: 100%; border: 0; background: #fff; display: block; }

.statusbar {
  flex: 0 0 38px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 4px;
  color: var(--muted-light);
  font-size: 10.5px;
}
.statusbar span { display: inline-flex; align-items: center; gap: 6px; }
.statusbar strong { color: var(--muted); font-weight: 650; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ---------------------------------------------------------------- inspector */
.inspector {
  background: var(--paper);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  padding: 18px 16px 30px;
}
.inspector-head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.inspector-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--sky);
  color: var(--blue-ink);
}
.inspector-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.inspector-head strong { font-size: 13.5px; }
.inspector-head .eyebrow { display: block; }
.inspector-sub { color: var(--muted); font-size: 11.5px; margin: 6px 0 16px; }

.eyebrow {
  display: block;
  font-size: 9.5px; font-weight: 750;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-light);
}
.inspector-group { border-top: 1px solid var(--line-soft); padding: 14px 0 2px; }
.inspector-group:first-of-type { border-top: 0; padding-top: 0; }
.group-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px; font-weight: 750; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 10px;
}
.field { margin-bottom: 12px; }
.field-label { display: block; font-size: 10.5px; font-weight: 700; color: #4a586c; margin-bottom: 5px; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field textarea {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-xs);
  background: #fff;
  color: var(--ink);
  padding: 8px 9px;
  font-size: 12px;
  line-height: 1.45;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field textarea { resize: vertical; min-height: 58px; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45, 107, 228, .12); }
.field-note { font-size: 10.5px; color: var(--muted-light); margin-top: 5px; }

.swatch-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.swatch {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line-dark);
  padding: 0;
  transition: transform .12s ease, box-shadow .12s ease;
}
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { box-shadow: 0 0 0 2px var(--ink); }
.color-wrap {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  margin-left: 2px; padding-left: 8px; border-left: 1px solid var(--line);
  font-size: 10.5px; color: var(--muted);
}
.color-wrap input[type="color"] { width: 25px; height: 25px; border: 0; padding: 0; background: transparent; cursor: pointer; }

.segmented { display: flex; padding: 3px; border-radius: 8px; background: var(--surface-muted); border: 1px solid var(--line-soft); }
.segmented button {
  flex: 1; height: 27px;
  border: 0; border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px; font-weight: 600;
}
.segmented button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(16, 36, 66, .12); }

.inspector-actions { display: flex; gap: 7px; margin-top: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: var(--ink);
  font-size: 11.5px; font-weight: 650;
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--surface-muted); }
.btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-outline { background: #fff; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--red); background: var(--red-soft); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

.panel-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  padding: 11px 12px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.panel-card strong { color: var(--ink); display: block; font-size: 11.5px; margin-bottom: 2px; }
.panel-card + .panel-card { margin-top: 8px; }

/* ---------------------------------------------------------------- popover */
.popover {
  position: fixed;
  z-index: 60;
  width: 236px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
}
.popover-head { font-size: 9.5px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-light); padding: 7px 8px 6px; }
.popover button {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px;
  border: 0; border-radius: 7px;
  background: transparent;
  color: #3b4a60;
  font-size: 12px; text-align: left;
}
.popover button:hover { background: var(--sky-soft); color: var(--blue-ink); }
.popover button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: #7b899c; }
.popover button:disabled { opacity: .4; cursor: default; background: transparent; }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translate(-50%, 14px);
  z-index: 90;
  max-width: 440px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 550;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 14px; height: 14px; fill: none; stroke: #7fe0b4; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- dialogs */
.modal {
  width: min(620px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal-wide { width: min(920px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(12, 24, 42, .55); backdrop-filter: blur(2px); }
.modal[open] { display: flex; flex-direction: column; animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h2 { font-size: 19px; letter-spacing: -.015em; margin-top: 3px; }
.modal-head p { font-size: 12px; color: var(--muted); margin-top: 4px; max-width: 540px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-soft); background: #fbfcfe; }
.modal-foot .spacer { flex: 1; }
.modal-note { font-size: 10.5px; color: var(--muted-light); padding: 0 22px 18px; }
.icon-btn {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}
.icon-btn:hover { background: var(--surface-muted); color: var(--ink); }
.icon-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ---------------------------------------------------------------- templates */
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0 22px 6px; }
.template-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.template-card:hover { border-color: #b9c9e0; box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.template-card.is-active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45, 107, 228, .12); }
.template-thumb {
  display: block;
  height: 132px;
  padding: 12px;
  background: var(--t-bg, #eef5f8);
  position: relative;
  overflow: hidden;
}
.tt-window { position: absolute; inset: 12px; background: #fff; border-radius: 6px; box-shadow: 0 4px 14px rgba(16,36,66,.12); overflow: hidden; }
.tt-nav { height: 16px; background: #fff; border-bottom: 1px solid #eef1f5; display: flex; align-items: center; gap: 3px; padding: 0 6px; }
.tt-nav i { width: 3px; height: 3px; border-radius: 50%; background: #d7dee8; }
.tt-nav b { width: 18px; height: 3px; border-radius: 2px; background: var(--t-accent, #2d6be4); margin-right: auto; }
.tt-hero { padding: 10px 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.tt-kicker { width: 34px; height: 3px; border-radius: 2px; background: var(--t-accent, #2d6be4); opacity: .45; }
.tt-title { width: 74%; height: 7px; border-radius: 2px; background: #1b2b40; }
.tt-title.short { width: 52%; }
.tt-body { width: 84%; height: 3px; border-radius: 2px; background: #dbe2eb; }
.tt-body.short { width: 62%; }
.tt-cta { width: 32px; height: 8px; border-radius: 3px; background: var(--t-accent, #2d6be4); margin-top: 3px; }
.tt-cards { display: flex; gap: 4px; padding: 4px 10px; }
.tt-cards i { flex: 1; height: 22px; border-radius: 3px; background: #f2f5f9; border: 1px solid #e8edf4; }
.template-meta { display: block; padding: 11px 12px 12px; border-top: 1px solid var(--line-soft); }
.template-meta strong { display: block; font-size: 12.5px; }
.template-meta span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.template-meta em { display: inline-block; font-style: normal; font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-ink); background: var(--sky); border-radius: 999px; padding: 2px 6px; margin-top: 7px; }

/* ---------------------------------------------------------------- domain wizard */
.domain-tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-muted); border: 1px solid var(--line-soft); border-radius: 9px; margin-bottom: 18px; }
.domain-tabs button { flex: 1; height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 650; }
.domain-tabs button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(16,36,66,.12); }

.search-row { display: flex; gap: 8px; }
.search-box { flex: 1; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-dark); border-radius: 9px; background: #fff; padding: 0 11px; height: 40px; }
.search-box svg { width: 15px; height: 15px; fill: none; stroke: var(--muted-light); stroke-width: 1.8; stroke-linecap: round; }
.search-box input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--ink); }
.search-box .tld-hint { font-size: 11px; color: var(--muted-light); }
.btn-search { height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; }
.btn-search:hover { background: var(--blue-dark); }
.search-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 10.5px; color: var(--muted-light); }
.search-note svg { width: 12px; height: 12px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.search-note b { color: var(--muted); font-weight: 650; }

.domain-results { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.domain-result {
  display: flex; align-items: center; gap: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  text-align: left;
  width: 100%;
  transition: border-color .12s ease, background .12s ease;
}
.domain-result:hover:not(:disabled) { border-color: #b9c9e0; background: #fbfcfe; }
.domain-result.is-selected { border-color: var(--blue); background: var(--sky-soft); box-shadow: 0 0 0 2px rgba(45,107,228,.1); }
.domain-result:disabled { opacity: .55; cursor: default; }
.dr-radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c3cbd7; flex: 0 0 auto; display: grid; place-items: center; }
.domain-result.is-selected .dr-radio { border-color: var(--blue); }
.domain-result.is-selected .dr-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.dr-name { font-size: 13px; font-weight: 650; color: var(--ink); }
.dr-name span { color: var(--muted-light); font-weight: 500; }
.dr-badge { font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; }
.dr-badge.taken { background: #f0f2f6; color: #8b98aa; }
.dr-badge.premium { background: var(--purple-soft); color: var(--purple); }
.dr-price { margin-left: auto; text-align: right; }
.dr-price strong { display: block; font-size: 13px; }
.dr-price span { display: block; font-size: 9.5px; color: var(--muted-light); }

.review-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.review-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); font-size: 11.5px; }
.review-row:last-child { border-bottom: 0; }
.review-row .k { color: var(--muted); }
.review-row .v { font-weight: 650; text-align: right; }
.review-total { background: var(--surface-muted); }
.review-total .v { font-size: 15px; }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 4px; font-size: 11px; color: var(--muted); line-height: 1.45; }
.check-row input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--blue); flex: 0 0 auto; }
.wizard-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.wizard-actions .spacer { flex: 1; }
.demo-flag { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--amber); background: var(--amber-soft); border-radius: 999px; padding: 3px 8px; }

.prov-list { list-style: none; padding: 0; margin: 4px 0 0; }
.prov-item { display: flex; gap: 11px; padding: 9px 0; position: relative; }
.prov-item:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 33px; bottom: -5px; width: 1.5px; background: var(--line); }
.prov-item.is-done:not(:last-child)::before { background: #b9e6d2; }
.prov-icon { width: 25px; height: 25px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: #f0f3f8; color: #a3afc0; border: 1px solid var(--line); z-index: 1; }
.prov-icon svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.prov-item.is-active .prov-icon { background: var(--sky); border-color: #bcd4ff; color: var(--blue); }
.prov-item.is-done .prov-icon { background: var(--green-soft); border-color: #b9e6d2; color: var(--green); }
.prov-copy strong { display: block; font-size: 12px; font-weight: 650; color: #56657a; }
.prov-item.is-active .prov-copy strong, .prov-item.is-done .prov-copy strong { color: var(--ink); }
.prov-copy span { display: block; font-size: 10.5px; color: var(--muted-light); margin-top: 1px; }
.prov-item.is-active .prov-copy span { color: var(--blue-ink); }
.spinner { width: 11px; height: 11px; border: 1.8px solid #bcd4ff; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.connected-card { border: 1px solid #cfe8dc; border-radius: 13px; background: linear-gradient(180deg, #f4fcf8, #fff); padding: 16px; }
.connected-top { display: flex; align-items: center; gap: 11px; }
.connected-lock { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.connected-lock svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.connected-top strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.connected-top span { display: block; font-size: 10.5px; color: var(--green); font-weight: 650; margin-top: 1px; }
.connected-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.connected-cell { background: #fff; border: 1px solid var(--line-soft); border-radius: 8px; padding: 8px 9px; }
.connected-cell span { display: block; font-size: 8.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-light); }
.connected-cell strong { display: block; font-size: 10.5px; margin-top: 2px; }
.connected-actions { display: flex; gap: 8px; margin-top: 13px; }

/* ---------------------------------------------------------------- code editor */
.code-note { display: flex; gap: 7px; font-size: 11px; color: var(--muted); background: var(--amber-soft); border: 1px solid #f3ddbd; border-radius: 8px; padding: 9px 11px; margin-bottom: 12px; line-height: 1.45; }
.code-note strong { color: var(--amber); }
.code-editor {
  width: 100%;
  height: 48vh;
  resize: vertical;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: #0f1b2b;
  color: #d7e3f4;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  padding: 13px 14px;
  tab-size: 2;
  white-space: pre;
}
.code-editor:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

/* ---------------------------------------------------------------- publish */
.publish-summary { display: grid; gap: 8px; margin-bottom: 14px; }
.publish-line { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--muted); }
.publish-line svg { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.publish-line strong { color: var(--ink); }
.publish-link { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-muted); font-size: 11.5px; color: var(--blue-ink); font-weight: 650; word-break: break-all; }
.publish-link svg { width: 13px; height: 13px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.publish-progress { margin-top: 12px; }

/* ---------------------------------------------------------------- preview mode */
.preview-exit { display: none; }
body.preview-mode { background: #fff; }
body.preview-mode .topbar,
body.preview-mode .rail,
body.preview-mode .inspector,
body.preview-mode .statusbar,
body.preview-mode .browser-bar { display: none; }
body.preview-mode .workspace { display: block; height: 100dvh; }
body.preview-mode .stage { display: block; padding: 0; height: 100dvh; background: #fff; }
body.preview-mode .browser-card { height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
body.preview-mode .canvas { padding: 0; height: 100dvh; }
body.preview-mode .frame-wrap { max-width: none !important; height: 100dvh; border-radius: 0; box-shadow: none; }
body.preview-mode #site-frame { height: 100dvh; }

/* ---------------------------------------------------------------- responsive chrome */
@media (max-width: 1200px) {
  .workspace { grid-template-columns: 238px minmax(0, 1fr) 288px; }
  .topbar-brand { min-width: 180px; }
}
@media (max-width: 1040px) {
  .workspace { display: flex; flex-direction: column; overflow-y: auto; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: flex-start; overflow-x: auto; overflow-y: visible; }
  .rail-section { border-bottom: 0; border-right: 1px solid var(--line-soft); min-width: 190px; padding: 12px; }
  .rail-grow { flex: 0 0 auto; }
  .rail-tools { flex-direction: row; flex-wrap: wrap; min-width: 160px; }
  .rail-tool { width: auto; white-space: nowrap; }
  .stage { min-height: 620px; }
  .inspector { border-left: 0; border-top: 1px solid var(--line); }
  .topbar-center { display: none; }
}
@media (max-width: 720px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .brand-copy span, .save-state { display: none; }
  .topbar-actions .tb-btn { display: none; }
  .template-grid { grid-template-columns: 1fr; }
  .connected-grid { grid-template-columns: 1fr 1fr; }
  .modal-head { padding: 16px 16px 13px; }
  .modal-body { padding: 16px; }
  .template-grid, .modal-note { padding-left: 16px; padding-right: 16px; }
  .search-row { flex-direction: column; }
  .btn-search { width: 100%; }
}
