:root {
  --bg: #15181d;
  --ink: #121416;
  --muted: #61656d;
  --panel: #ffffff;
  --soft: #f3f5f7;
  --line: #d6dae0;
  --dark-line: #303641;
  --blue: #3858e9;
  --blue-dark: #1834aa;
  --green: #067a46;
  --amber: #a45f00;
  --red: #b42318;
  --cyan: #007cba;
  --shadow: 0 18px 55px rgba(0, 0, 0, .2);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid #bcc3cc;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  border-color: #7d8591;
}

button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

button.secondary {
  background: #f8f9fa;
}

button.danger {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

button.danger-ghost {
  border-color: #e8b7b1;
  color: var(--red);
  background: #fff5f3;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid #c5cbd3;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

textarea {
  min-height: 156px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

label {
  display: grid;
  gap: 6px;
  color: #31343a;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

p {
  line-height: 1.45;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shellbar {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #272c34;
  background: #101317;
  color: #fff;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 850;
  flex: 0 0 auto;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand span {
  color: #aeb5bf;
  font-size: 12px;
}

.pathline {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 6px;
}

.pathline input {
  border-color: #3a404a;
  background: #272d36;
  color: #fff;
}

.shell-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.shell-actions button,
.pathline button {
  border-color: #3a404a;
  background: #20262e;
  color: #fff;
}

.pathline .secondary,
.shell-actions .secondary {
  color: #fff;
}

.shell-actions .primary {
  border-color: #f7cf3c;
  background: #f7cf3c;
  color: #151515;
}

.status {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid #c8ced6;
  background: #eef1f4;
  color: #2e343c;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.status.warning {
  border-color: #f0d28b;
  background: #fff7db;
  color: #7a4a00;
}

.status.good {
  border-color: #a7dac1;
  background: #e8f8ef;
  color: #075c37;
}

.status.error {
  border-color: #f3b5ac;
  background: #fff0ee;
  color: #981f12;
}

.status.blue {
  border-color: #b9c6ff;
  background: #eef2ff;
  color: #213ea8;
}

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(540px, 1fr) minmax(420px, 520px);
  gap: 10px;
  padding: 10px;
}

.preview-zone,
.console {
  min-width: 0;
  background: var(--panel);
  border: 1px solid #252a31;
  box-shadow: var(--shadow);
}

.preview-zone {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.object-strip {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 48%);
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.object-strip h1 {
  margin-bottom: 6px;
  font-size: clamp(22px, 2vw, 32px);
}

.object-strip p {
  margin-bottom: 0;
  color: #4a4f58;
}

.object-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.object-metrics div {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 10px;
}

.object-metrics span,
.object-metrics strong {
  display: block;
}

.object-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.object-metrics strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.browser {
  flex: 1;
  min-height: 500px;
  margin: 10px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.browser-chrome {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  background: #20262e;
  color: #fff;
}

.browser-chrome strong {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.browser-chrome #previewState {
  color: #b7d7ff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9aa3af;
  flex: 0 0 auto;
}

.wp-adminbar {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
  background: #1f252b;
  color: #eef1f5;
  font-size: 13px;
}

.wp-adminbar span {
  white-space: nowrap;
}

.wp-adminbar .push {
  margin-left: auto;
}

.wp-dot {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid #d7dade;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 850;
}

.site-nav {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 26px;
  border-bottom: 1px solid #eef0f3;
}

.site-nav strong {
  font-size: 20px;
}

.site-nav nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav button {
  min-width: 0;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1d2327;
  font-weight: 500;
  overflow-wrap: anywhere;
  white-space: normal;
}

.site-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 50%) minmax(230px, 1fr);
  gap: 26px;
  align-items: center;
  padding: clamp(24px, 6vw, 78px);
  background:
    linear-gradient(140deg, rgba(56, 88, 233, .06), transparent 38%),
    #fff;
}

.site-copy {
  max-width: 520px;
}

.page-path {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-copy h2 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.15;
  font-weight: 500;
}

.site-copy h2 span {
  color: var(--blue);
}

.site-copy p {
  font-size: clamp(16px, 1.4vw, 21px);
  line-height: 1.35;
}

.site-copy .note {
  display: inline;
  background: #fff1a7;
}

.wp-button {
  margin-top: 22px;
  width: min(360px, 100%);
  min-height: 48px;
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.preview-card {
  border: 1px solid #cbd3dd;
  background: #f7f9fc;
  padding: 18px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.preview-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.flow-steps span {
  min-height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.flow-steps span.done {
  border-color: #a7dac1;
  background: #e8f8ef;
  color: var(--green);
}

.mobile-quickbar {
  display: none;
}

.console {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.console-head {
  min-height: 68px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.console-head h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.console-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #f8f9fa;
}

.console-tabs button {
  min-width: 0;
  border-width: 0 1px 0 0;
  border-color: var(--line);
  background: transparent;
  color: #2e3339;
  font-size: 12px;
  padding: 0 6px;
}

.console-tabs button.active {
  background: #fff;
  color: var(--blue-dark);
  box-shadow: inset 0 -3px 0 var(--blue);
}

.panel {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.panel.active {
  display: block;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.route {
  min-height: 96px;
  display: grid;
  align-content: start;
  gap: 4px;
  text-align: left;
  background: #fff;
}

.route.active {
  border-color: var(--blue);
  background: #f2f5ff;
}

.route span,
.route small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.route strong {
  font-size: 14px;
}

.command-card,
.transfer-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}

.command-card + .command-card {
  margin-top: 12px;
}

.command-card.compact {
  margin-top: 12px;
}

.card-head,
.split-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-head h3,
.split-head h3 {
  margin-bottom: 0;
}

.hint,
.result,
.save-consequence {
  color: #4f5660;
  font-size: 13px;
}

.result,
.save-consequence {
  margin: 12px 0 0;
  border-left: 3px solid #b7c1d0;
  background: #f6f8fa;
  padding: 10px;
}

.progress-block {
  margin: 12px 0;
}

.progress-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: #4e5661;
  font-size: 12px;
  font-weight: 800;
}

.progress {
  height: 8px;
  overflow: hidden;
  background: #dde2e8;
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--blue);
  transition: width .25s ease;
}

.timeline {
  margin: 0 0 14px;
  padding-left: 20px;
  color: #4d535c;
  font-size: 13px;
  line-height: 1.55;
}

.timeline li.current {
  color: var(--blue-dark);
  font-weight: 800;
}

.timeline li.done {
  color: var(--green);
}

.button-row,
.tool-row,
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.destination-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.destination {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 6px;
  text-align: left;
}

.destination span {
  color: #59606a;
  font-size: 13px;
  font-weight: 500;
}

.destination.active {
  border-color: var(--blue);
  background: #f2f5ff;
}

.object-list {
  display: grid;
  gap: 8px;
}

.object-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}

.object-row.active {
  border-color: var(--blue);
  box-shadow: inset 4px 0 0 var(--blue);
}

.object-row strong,
.object-row span {
  display: block;
}

.object-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.row-actions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.confirm-box {
  margin-top: 12px;
  border: 1px solid #f0b7ae;
  background: #fff5f3;
  padding: 12px;
}

.confirm-box strong {
  display: block;
  margin-bottom: 6px;
}

.confirm-box p {
  color: #5e3732;
  font-size: 13px;
}

.manager-toolbar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.manager-toolbar button {
  min-width: 0;
  padding: 0 7px;
  font-size: 12px;
}

.manager-toolbar button.active,
.filter-row button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.manager-panel {
  display: none;
}

.manager-panel.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-weight: 600;
}

.check input {
  width: auto;
  min-height: auto;
}

.file-layout {
  display: grid;
  grid-template-columns: minmax(130px, 35%) minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.file-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  overflow: hidden;
}

.file-tree li {
  padding: 9px 10px;
  border-bottom: 1px solid #e7ebef;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.file-tree li:last-child {
  border-bottom: 0;
}

.file-tree .selected {
  background: #eef4ff;
  color: var(--blue-dark);
  font-weight: 800;
}

.notice {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  border-left: 4px solid var(--cyan);
  background: #eef5ff;
  padding: 14px;
}

.facts {
  margin: 0;
  display: grid;
  gap: 8px;
}

.facts div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
}

.facts dt {
  color: #30343a;
  font-weight: 800;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #565d67;
}

.log-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.log-tabs button.active {
  border-color: var(--blue);
  background: #eef2ff;
  color: var(--blue-dark);
}

.logs {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  background: #15181d;
  color: #eef1f5;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.filter-row {
  margin: 0 0 10px;
}

.filter-row button {
  min-height: 30px;
  font-size: 12px;
}

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.blueprint-card {
  min-height: 150px;
  display: grid;
  grid-template-rows: 66px auto;
  padding: 0;
  text-align: left;
  overflow: hidden;
}

.blueprint-card.active {
  border-color: var(--blue);
}

.blueprint-thumb {
  display: grid;
  align-items: end;
  padding: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.blueprint-card:nth-child(1) .blueprint-thumb {
  background: linear-gradient(135deg, #7b5c24, #1f8a77);
}

.blueprint-card:nth-child(2) .blueprint-thumb {
  background: linear-gradient(135deg, #4a1d75, #f3923f);
}

.blueprint-card:nth-child(3) .blueprint-thumb {
  background: linear-gradient(135deg, #e9eefb, #4567e8);
  color: #13214f;
}

.blueprint-card:nth-child(4) .blueprint-thumb {
  background: linear-gradient(135deg, #050505, #c42b1f);
}

.blueprint-card:nth-child(5) .blueprint-thumb {
  background: linear-gradient(135deg, #2d170b, #d78a55);
}

.blueprint-card:nth-child(6) .blueprint-thumb {
  background: linear-gradient(135deg, #6b0f37, #271a38);
}

.blueprint-info {
  padding: 10px;
}

.blueprint-info strong,
.blueprint-info span {
  display: block;
}

.blueprint-info span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.transfer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.transfer-card {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transfer-card span {
  flex: 1;
  color: #59606a;
  font-size: 13px;
  line-height: 1.4;
}

.history {
  margin: 0;
  padding-left: 20px;
  color: #4b535e;
  font-size: 13px;
  line-height: 1.55;
}

.history li + li {
  margin-top: 6px;
}

@media (max-width: 1180px) {
  .shellbar {
    grid-template-columns: 1fr;
  }

  .shell-actions {
    justify-content: flex-start;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .browser {
    min-height: 460px;
  }

  .console {
    min-height: 680px;
  }
}

@media (max-width: 760px) {
  html,
  body,
  .app,
  .shellbar,
  .workspace,
  .preview-zone,
  .console,
  .browser {
    max-width: 100vw;
    overflow-x: hidden;
  }

  body {
    background: #fff;
  }

  .shellbar {
    position: sticky;
    top: 0;
    z-index: 30;
    gap: 8px;
    padding: 8px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .pathline {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .shell-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .shell-actions .status {
    width: 100%;
    min-width: 0;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .shell-actions button {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .shell-actions .primary {
    grid-column: 1 / -1;
  }

  .workspace {
    padding: 0 0 112px;
    gap: 0;
  }

  .preview-zone,
  .console {
    border-width: 0 0 1px;
    box-shadow: none;
  }

  .object-strip {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .object-metrics {
    grid-template-columns: 1fr;
  }

  .browser {
    min-height: 420px;
    margin: 0;
    border-width: 1px 0;
  }

  .wp-adminbar {
    overflow: hidden;
    gap: 9px;
    font-size: 12px;
  }

  .wp-adminbar span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 14px;
    min-width: 0;
    width: 100%;
  }

  .site-nav nav {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .site-stage {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 22px 16px;
    gap: 18px;
  }

  .site-copy h2 {
    font-size: 34px;
  }

  .site-copy p {
    font-size: 16px;
  }

  .preview-card {
    align-self: auto;
  }

  .mobile-quickbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border-top: 1px solid var(--line);
    background: #fff;
  }

  .mobile-quickbar button {
    min-width: 0;
    padding: 0 6px;
    font-size: 12px;
  }

  .console {
    min-height: 650px;
  }

  .console-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, .14);
  }

  .console-tabs button {
    min-width: 0;
    min-height: 48px;
    border-width: 0 1px 0 0;
    font-size: 11px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .panel {
    max-height: none;
    padding: 12px;
  }

  .route-grid,
  .destination-grid,
  .blueprint-grid,
  .transfer-grid,
  .form-grid,
  .file-layout {
    grid-template-columns: 1fr;
  }

  .manager-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .facts div {
    grid-template-columns: 1fr;
  }

  .object-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .button-row button,
  .tool-row button {
    flex: 1 1 150px;
  }
}
