:root {
  color-scheme: light;
  --ink: #14191f;
  --muted: #5d6875;
  --subtle: #8a96a3;
  --line: #d7dde4;
  --soft-line: #e8edf2;
  --panel: #ffffff;
  --panel-2: #f6f8fa;
  --panel-3: #eef3f7;
  --shell: #1f262d;
  --shell-2: #151b20;
  --blue: #0b70b7;
  --blue-dark: #07598f;
  --blue-soft: #e6f2fb;
  --green: #147d3f;
  --green-soft: #e7f5ec;
  --amber: #a66100;
  --amber-soft: #fff2cc;
  --red: #b42318;
  --red-soft: #fff0ee;
  --radius: 8px;
  --shadow: 0 18px 70px rgba(12, 18, 25, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--shell-2);
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

code {
  border-radius: 4px;
  padding: 2px 5px;
  background: #edf1f5;
}

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

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr);
  background: #11171c;
}

.shellbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 12px;
  color: #f5f7f9;
  background: var(--shell);
  border-bottom: 1px solid #313b45;
}

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

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

.brand span:not(.brand-mark) {
  color: #b7c1cb;
  font-size: 12px;
}

.brand-mark,
.wp-logo {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #2f6cf6, #1f9d62);
  font-weight: 800;
}

.path-stack {
  flex: 1;
  min-width: 230px;
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.path-field input {
  width: 100%;
  height: 34px;
  border: 1px solid #46515d;
  border-radius: 7px;
  background: #303a44;
  color: #f3f6f8;
  padding: 0 12px;
  outline: none;
}

.path-field input:focus {
  border-color: #79b7e8;
  box-shadow: 0 0 0 2px rgba(11, 112, 183, 0.25);
}

#pathState {
  color: #b8c5cf;
  font-size: 12px;
}

.shell-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

button,
.storage-pill,
.state {
  border-radius: 6px;
}

button {
  min-height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 650;
}

button:hover {
  border-color: var(--blue);
}

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

button.primary:hover,
.primary:hover {
  background: var(--blue-dark);
}

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

.danger-ghost {
  border-color: #d8a4a0;
  color: var(--red);
  background: var(--red-soft);
}

.icon-button,
.shell-actions button {
  border-color: #414c56;
  color: #eef3f7;
  background: #2b3540;
}

.shell-actions button.primary {
  border-color: #ffd866;
  color: #14191f;
  background: #ffd866;
}

.storage-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.workspace {
  min-height: calc(100vh - 54px);
  display: grid;
  grid-template-columns: minmax(330px, 410px) minmax(420px, 1fr) minmax(350px, 430px);
  gap: 12px;
  padding: 12px;
  background: #11171c;
}

.command-column,
.preview-column,
.detail-panel {
  min-width: 0;
}

.command-column,
.detail-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-card,
.table-card,
.detail-card,
.identity-strip,
.manager-dock {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(10, 20, 30, 0.04);
}

.search-card,
.table-card,
.detail-card,
.manager-dock {
  padding: 14px;
}

.section-title,
.detail-card header,
.manager-dock header,
.table-head {
  min-width: 0;
}

.section-title h1,
.table-head h2,
.detail-card h2,
.manager-dock h2,
.identity-strip h2,
.selected-blueprint h3 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.2;
}

.section-title p,
.detail-card p,
.selected-blueprint p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search-box {
  display: block;
  margin-top: 12px;
}

.search-box.small {
  margin-top: 10px;
}

.search-box input,
.field input,
.form-grid input,
.settings-grid select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

.search-box input:focus,
.field input:focus,
.form-grid input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(11, 112, 183, 0.22);
  border-color: var(--blue);
}

.command-groups {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  max-height: 355px;
  overflow: auto;
  padding-right: 3px;
}

.command-group {
  border: 1px solid var(--soft-line);
  border-radius: 7px;
  overflow: hidden;
}

.command-group h3 {
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--soft-line);
}

.command-result {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  border-radius: 0;
  padding: 9px 10px;
  background: #fff;
}

.command-result:last-child {
  border-bottom: 0;
}

.command-result.is-active {
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}

.command-result strong,
.command-result small,
.table-row strong,
.table-row small {
  display: block;
  min-width: 0;
}

.command-result small,
.table-row small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.command-result span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.table-card {
  flex: 1;
  min-height: 0;
}

.table-head,
.compact-head,
.manager-dock header,
.editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.segmented,
.filters,
.manager-tabs,
.log-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.segmented button,
.filters button,
.manager-tabs button,
.log-tabs button {
  min-height: 30px;
  padding: 0 9px;
  color: var(--muted);
  background: var(--panel-2);
}

.segmented button.is-active,
.filters button.is-active,
.manager-tabs button.is-active,
.log-tabs button.is-active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.object-table {
  display: none;
  margin-top: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 7px;
  overflow: hidden;
}

.object-table.is-active {
  display: block;
}

.table-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(72px, 0.65fr) minmax(92px, 0.8fr);
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  border-radius: 0;
  padding: 9px 11px;
  background: #fff;
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row.is-selected {
  background: #edf6ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.table-header {
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: var(--panel-2);
}

.state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.amber {
  color: #6b3d00;
  background: var(--amber-soft);
}

.green {
  color: #0d5d2c;
  background: var(--green-soft);
}

.blue {
  color: #074f80;
  background: var(--blue-soft);
}

.neutral {
  color: #4d5863;
  background: #edf1f4;
}

.red {
  color: #7e1a12;
  background: var(--red-soft);
}

.preview-column {
  display: grid;
  grid-template-rows: auto minmax(430px, 0.95fr) minmax(315px, 0.75fr);
  gap: 12px;
  min-height: 0;
}

.identity-strip {
  display: grid;
  grid-template-columns: minmax(200px, 0.45fr) minmax(280px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
}

.identity-grid {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.browser-frame {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #2e3842;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.browser-toolbar {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  color: #c2cad2;
  background: #242d35;
  border-bottom: 1px solid #1a2229;
}

.traffic {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.traffic.red {
  background: #ff5f57;
}

.traffic.yellow {
  background: #ffbd2e;
}

.traffic.green {
  background: #28c840;
}

#browserUrl {
  margin-left: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wp-adminbar {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  color: #f0f0f1;
  background: #1d2327;
  font-size: 13px;
}

.wp-adminbar button,
.wp-nav button {
  min-height: 24px;
  border: 0;
  color: inherit;
  background: transparent;
  padding: 0 4px;
  font-weight: 500;
}

.wp-logo {
  width: 22px;
  height: 22px;
  background: #2c3338;
  border: 1px solid #8c8f94;
  font-size: 13px;
}

.push {
  margin-left: auto;
}

.wp-nav {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 28px;
  font-size: 15px;
  border-bottom: 1px solid #f1f2f3;
}

.wp-nav strong {
  margin-right: auto;
  font-size: 20px;
}

.wp-nav button {
  color: #2a2f35;
  font-size: 15px;
}

.preview-surface {
  position: relative;
  min-height: 340px;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(190px, 0.28fr);
  gap: 22px;
  align-items: center;
  overflow: hidden;
  padding: 34px 28px;
  background: #fff;
}

.preview-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
}

.preview-copy h3 {
  margin: 7px 0 0;
  color: #101517;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  font-weight: 400;
}

.preview-copy h3 a {
  color: #3558f4;
  text-decoration: none;
}

.preview-copy p {
  color: #15191f;
  font-size: 18px;
  line-height: 1.5;
}

.highlight {
  display: inline;
  background: #fff0a8;
  box-decoration-break: clone;
}

.wp-cta {
  min-height: 48px;
  margin-top: 18px;
  padding: 0 18px;
  border-color: #3858e9;
  color: #fff;
  background: #3858e9;
}

.preview-state {
  position: relative;
  z-index: 2;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
}

.preview-state strong {
  font-size: 16px;
}

.preview-state ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.wp-art {
  position: absolute;
  right: -160px;
  bottom: -150px;
  width: 420px;
  height: 420px;
  opacity: 0.95;
}

.ring {
  position: absolute;
  border: 36px solid #33e777;
  border-radius: 50%;
}

.ring.one {
  inset: 36px 0 70px 10px;
}

.ring.two {
  inset: 190px 48px 16px 48px;
}

.big-w {
  position: absolute;
  top: 0;
  left: 82px;
  display: grid;
  place-items: center;
  width: 210px;
  height: 210px;
  border: 16px solid #1d1d1f;
  border-radius: 50%;
  color: #1d1d1f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 126px;
  font-weight: 800;
}

.manager-dock {
  min-height: 0;
  overflow: auto;
}

.manager-dock header {
  margin-bottom: 11px;
}

.dock-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.manager-tabs {
  margin-bottom: 12px;
}

.manager-panel {
  display: none;
}

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

.notice {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  border-left: 4px solid var(--blue);
  border-radius: 4px;
  padding: 11px 12px;
  color: #26313a;
  background: #edf5fb;
  line-height: 1.45;
}

.notice.warning {
  border-color: var(--amber);
  background: var(--amber-soft);
}

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

.settings-grid label,
.form-grid label,
.field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.settings-grid .check {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: var(--ink);
}

.button-row,
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tool-layout,
.blueprint-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.38fr) minmax(260px, 0.62fr);
  gap: 12px;
  min-height: 250px;
}

.file-tree {
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--panel-2);
}

.toolbar-row {
  margin: 0;
  padding: 8px;
  border-bottom: 1px solid var(--soft-line);
  background: #fff;
}

.toolbar-row button {
  min-height: 28px;
  padding: 0 8px;
}

.tree-row {
  width: 100%;
  min-height: 34px;
  display: block;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  border-radius: 0;
  padding: 0 10px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #fff;
}

.tree-row.is-active {
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}

.editor-card,
.blueprint-actions,
.selected-blueprint {
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

textarea {
  width: 100%;
  min-height: 164px;
  resize: vertical;
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  color: #3b2600;
  background: #fffdf8;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#blueprintEditor {
  min-height: 208px;
}

.result-line {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.blueprint-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.database-grid dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 7px 12px;
  margin: 0;
}

.database-grid dt {
  color: var(--muted);
  font-weight: 800;
}

.database-grid dd {
  margin: 0;
}

.log-tabs {
  margin-bottom: 10px;
}

pre {
  min-height: 170px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--soft-line);
  border-radius: 7px;
  padding: 12px;
  color: #d7f0d9;
  background: #11171c;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.detail-panel {
  min-height: 0;
  overflow: auto;
}

.detail-card {
  flex: 0 0 auto;
}

.form-grid {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}

.constraint-box,
.confirm-box,
.progress-box {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 7px;
  padding: 11px;
  color: var(--muted);
  background: var(--panel-2);
  line-height: 1.45;
}

.confirm-box {
  border-color: #d8a4a0;
  background: var(--red-soft);
}

.confirm-box strong {
  color: var(--red);
}

.progress-box {
  background: #f5f9fc;
}

.meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dde3e9;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 220ms ease;
}

.filters {
  margin-top: 10px;
  max-height: 76px;
  overflow: auto;
}

.blueprint-list {
  display: grid;
  gap: 8px;
  max-height: 235px;
  overflow: auto;
  margin-top: 10px;
  padding-right: 2px;
}

.blueprint-card {
  width: 100%;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  border: 1px solid var(--soft-line);
  padding: 8px;
  text-align: left;
  background: #fff;
}

.blueprint-card.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.thumb {
  width: 58px;
  height: 46px;
  border-radius: 5px;
  background: linear-gradient(135deg, #82652c, #d4c391 48%, #24525f);
}

.thumb.coffee {
  background: linear-gradient(135deg, #5d2c83, #d9742f);
}

.thumb.feed {
  background: linear-gradient(135deg, #f6f7ff, #6083e6);
}

.thumb.gaming {
  background: linear-gradient(135deg, #050505, #c23b2d 55%, #f2f2f2);
}

.thumb.nonprofit {
  background: linear-gradient(135deg, #3a1d11, #d19a50);
}

.thumb.blog {
  background: linear-gradient(135deg, #6d0f3a, #d8a6bc);
}

.thumb.news {
  background: linear-gradient(135deg, #111, #3876d8);
}

.thumb.shop {
  background: linear-gradient(135deg, #2c4c37, #d6ece0);
}

.thumb.experiment {
  background: linear-gradient(135deg, #10213a, #39c3b2);
}

.blueprint-card strong,
.blueprint-card small {
  display: block;
}

.blueprint-card small {
  color: var(--muted);
  line-height: 1.35;
}

.selected-blueprint {
  margin-top: 11px;
}

.activity-card {
  min-height: 190px;
}

#activityList {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  max-height: 240px;
  overflow: auto;
}

#activityList li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 1320px) {
  .workspace {
    grid-template-columns: minmax(310px, 390px) minmax(430px, 1fr);
  }

  .detail-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 980px) {
  .app {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .shellbar {
    flex-wrap: wrap;
  }

  .brand {
    min-width: 160px;
  }

  .path-stack {
    order: 3;
    flex-basis: 100%;
  }

  .shell-actions {
    flex: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

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

  .preview-column {
    grid-template-rows: auto auto auto;
  }

  .browser-frame {
    min-height: 600px;
  }

  .detail-panel {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .command-groups {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 8px;
    gap: 8px;
  }

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

  .path-stack {
    grid-template-columns: 1fr;
  }

  .path-stack .icon-button,
  #pathState {
    justify-self: start;
  }

  .identity-strip,
  .preview-surface,
  .tool-layout,
  .blueprint-layout,
  .settings-grid,
  .database-grid dl {
    grid-template-columns: 1fr;
  }

  .wp-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
  }

  .preview-surface {
    padding: 24px 18px;
  }

  .preview-copy h3 {
    font-size: 34px;
  }

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

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

  .wp-art {
    right: -250px;
    opacity: 0.35;
  }

  .table-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .table-header {
    display: none;
  }

  .compact-head,
  .manager-dock header,
  .table-head {
    flex-direction: column;
  }
}
