:root {
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --surface-muted: #eef2f6;
  --ink: #111827;
  --muted: #5c6675;
  --soft: #d8dee8;
  --line: #c7d0dc;
  --blue: #2458d3;
  --blue-dark: #193f9a;
  --green: #1fbf75;
  --teal: #007c89;
  --yellow: #f7c948;
  --red: #b42318;
  --shadow: 0 18px 40px rgba(17, 24, 39, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 36px;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}

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

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

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

.secondary-button {
  background: #fff;
  font-weight: 700;
}

.secondary-button.compact {
  display: inline-flex;
}

.link-button {
  border: 0;
  padding: 0;
  min-height: auto;
  color: var(--blue);
  background: transparent;
  font-weight: 700;
}

.icon-button {
  background: var(--surface-muted);
  color: var(--muted);
}

.full {
  width: 100%;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 64px 1fr;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: #18202a;
  color: #fff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup span {
  display: block;
  color: #aab4c3;
  font-size: 13px;
  margin-top: 2px;
}

.mark,
.site-badge,
.wp-dot {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
}

.mark {
  width: 42px;
  height: 42px;
  background: #fff;
  color: #111;
  letter-spacing: -1px;
}

.url-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.path-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  width: min(100%, 720px);
  padding: 5px 10px;
  border-radius: 6px;
  background: #303947;
  color: #b8c2d0;
}

.path-field input {
  width: 100%;
  border: 0;
  color: #fff;
  background: transparent;
  outline: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.status.saved {
  background: rgba(31, 191, 117, 0.18);
  color: #89f0be;
}

.workspace {
  display: grid;
  grid-template-columns: 320px minmax(420px, 1fr) 430px;
  gap: 14px;
  padding: 14px;
  min-height: calc(100vh - 64px);
}

.left-rail,
.right-desk {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 14px;
}

.panel,
.manager-card,
.preview-column {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
}

.panel {
  padding: 16px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

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

.source-grid button,
.source-flow-grid button {
  display: grid;
  justify-items: start;
  gap: 8px;
  text-align: left;
}

.source-grid span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border-radius: 5px;
  background: var(--surface-muted);
  color: var(--blue);
  font-weight: 800;
  font-size: 12px;
}

.blueprint-strip {
  display: grid;
  gap: 8px;
}

.blueprint-mini {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
  overflow: hidden;
  text-align: left;
  color: #fff;
  border: 0;
  background: #344152;
}

.blueprint-mini::after,
.gallery-card-item > div::before {
  content: "";
  position: absolute;
  inset: auto -20px -24px auto;
  width: 92px;
  height: 92px;
  border: 18px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}

.blueprint-mini span {
  color: rgba(255, 255, 255, 0.78);
}

.art { background: linear-gradient(135deg, #735923, #0d6f68); }
.coffee { background: linear-gradient(135deg, #5b2a86, #bb6a35); }
.feed { background: linear-gradient(135deg, #eef3ff, #7895d6); color: #14233a; }
.news { background: linear-gradient(135deg, #111, #b33c2f); }
.nonprofit { background: linear-gradient(135deg, #6c361e, #c9864c); }
.personal { background: linear-gradient(135deg, #690d3f, #a95e83); }

.site-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.site-row + .site-row {
  margin-top: 8px;
}

.site-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

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

.site-badge {
  width: 36px;
  height: 36px;
  background: #edf2ff;
  color: var(--blue);
  font-size: 13px;
}

.row-actions {
  display: flex;
  gap: 4px;
}

.row-actions button,
.site-row > button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.preview-column {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
}

.preview-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.browser-dots {
  display: flex;
  gap: 5px;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c6cfdb;
}

.preview-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.preview-tabs button,
.admin-links button,
.tool-tabs button,
.chip-row button {
  min-height: 32px;
  padding: 6px 10px;
  color: var(--muted);
  background: transparent;
}

.preview-tabs .is-active,
.admin-links button:hover,
.tool-tabs .is-active,
.chip-row .is-active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.admin-chip {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.site-frame {
  min-height: 640px;
  background: #fff;
}

.wp-admin-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 34px;
  padding: 0 10px;
  color: #dce2ea;
  background: #1d252d;
  font-size: 13px;
}

.wp-admin-bar strong {
  margin-left: auto;
}

.wp-dot {
  width: 22px;
  height: 22px;
  background: #0b0e12;
  color: #fff;
  border: 1px solid #53606e;
  font-size: 12px;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 34px;
  font-size: 16px;
}

.site-nav nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: #2c2f36;
  text-decoration: none;
}

.site-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 480px) minmax(300px, 1fr);
  align-items: center;
  min-height: 540px;
  padding: 48px 34px 36px;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.hero-copy h2 {
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.25;
}

.hero-copy h2 span {
  color: #3154ee;
}

.hero-copy p {
  font-size: 18px;
  line-height: 1.55;
}

mark {
  background: #ffef87;
}

.playground-glyph {
  position: relative;
  min-height: 460px;
}

.ring {
  position: absolute;
  border: 38px solid #32e676;
  border-radius: 50%;
}

.ring.one {
  width: 520px;
  height: 250px;
  right: -130px;
  top: 92px;
}

.ring.two {
  width: 410px;
  height: 190px;
  right: -76px;
  bottom: 58px;
}

.ring.three {
  width: 270px;
  height: 270px;
  right: 80px;
  top: 12px;
  border-color: #1f1f1f;
}

.wp-orb {
  position: absolute;
  right: 142px;
  top: 88px;
  font-family: Georgia, serif;
  font-size: 170px;
  font-weight: 800;
  color: #1f1f1f;
}

.manager-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.manager-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.manager-header span {
  color: var(--muted);
  font-size: 13px;
}

.manager-actions {
  display: flex;
  gap: 6px;
}

.admin-links,
.tool-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tool-tabs {
  padding-bottom: 0;
}

.tool-tabs button {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 0;
  white-space: nowrap;
}

.tool-panel {
  display: none;
  padding: 16px;
  overflow: auto;
}

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

.notice {
  padding: 12px;
  margin-bottom: 14px;
  color: #283547;
  background: #eef3ff;
  border-left: 4px solid var(--teal);
}

.notice.strong {
  font-weight: 800;
}

.tool-panel label,
.dialog-card label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 700;
}

.tool-panel select,
.tool-panel input,
.dialog-card input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}

.checkbox-line {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: var(--ink);
  font-weight: 500;
}

.checkbox-line input {
  width: auto;
  min-height: auto;
}

.destructive-note {
  margin: 10px 0 0;
  color: var(--red);
  font-size: 13px;
}

.split-tool {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.file-tree {
  background: #f7f9fb;
  border-right: 1px solid var(--line);
}

.tool-actions,
.blueprint-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tool-actions {
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.tool-actions button,
.blueprint-actions button,
.button-row button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 13px;
}

.tree-item {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  text-align: left;
  background: transparent;
}

.tree-item.current {
  color: var(--blue);
  background: #eaf1ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.code-pane {
  min-width: 0;
  background: #fff;
}

.code-pane.single {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.code-head span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

pre {
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: #a33000;
  background: #fcfdff;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
}

.facts dt {
  font-weight: 800;
}

.facts dd {
  margin: 0;
  color: var(--muted);
}

.log-grid,
.share-stack {
  display: grid;
  gap: 10px;
}

.log-grid article,
.share-stack article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.log-grid p,
.share-stack p {
  margin-bottom: 0;
  color: var(--muted);
}

dialog {
  width: min(620px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(11, 18, 28, 0.64);
}

.wide-dialog {
  width: min(1120px, calc(100vw - 24px));
}

.dialog-card {
  position: relative;
  padding: 24px;
}

.close-button {
  position: absolute;
  right: 16px;
  top: 16px;
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.radio-card {
  grid-template-columns: auto 1fr;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
}

.radio-card input {
  width: auto;
  min-height: auto;
}

.radio-card span {
  grid-column: 2;
  color: var(--muted);
  font-weight: 400;
}

.progress-block {
  margin: 16px 0;
  color: var(--muted);
  font-size: 13px;
}

.progress-block div {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.progress-block i {
  display: block;
  width: 76%;
  height: 100%;
  background: var(--blue);
}

menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.source-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.source-flow-grid span {
  color: var(--muted);
  font-size: 13px;
}

.source-detail {
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}

.github-note {
  display: none;
  padding: 10px;
  color: #243143;
  background: #fff9db;
  border: 1px solid #f0d36b;
  border-radius: 6px;
  font-size: 13px;
}

.github-note.is-visible {
  display: block;
}

.gallery-tools {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.search-field {
  max-width: 420px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-height: 55vh;
  padding-right: 4px;
  overflow: auto;
}

.gallery-card-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.gallery-card-item.selected {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 2px var(--blue);
}

.gallery-card-item > div {
  position: relative;
  height: 130px;
  overflow: hidden;
}

.gallery-card-item h3,
.gallery-card-item p,
.gallery-card-item span {
  margin-left: 14px;
  margin-right: 14px;
}

.gallery-card-item h3 {
  margin-top: 14px;
}

.gallery-card-item p {
  min-height: 44px;
  color: var(--muted);
}

.gallery-card-item span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: 300px minmax(360px, 1fr);
  }

  .right-desk {
    grid-column: 1 / -1;
  }

  .manager-card {
    min-height: auto;
  }

  .tool-panel {
    max-height: none;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-rows: auto 1fr;
  }

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

  .top-actions,
  .url-cluster {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

  .source-grid,
  .source-flow-grid,
  .gallery-grid,
  .site-content {
    grid-template-columns: 1fr;
  }

  .site-frame {
    min-height: auto;
  }

  .site-nav,
  .wp-admin-bar {
    flex-wrap: wrap;
  }

  .site-content {
    padding: 28px 20px;
  }

  .playground-glyph {
    min-height: 220px;
  }

  .ring.one {
    width: 310px;
    height: 145px;
    right: -80px;
    top: 34px;
    border-width: 24px;
  }

  .ring.two {
    width: 250px;
    height: 118px;
    right: -32px;
    bottom: 24px;
    border-width: 24px;
  }

  .ring.three {
    width: 150px;
    height: 150px;
    right: 62px;
    top: 12px;
    border-width: 20px;
  }

  .wp-orb {
    right: 96px;
    top: 48px;
    font-size: 88px;
  }

  .split-tool {
    grid-template-columns: 1fr;
  }

  .file-tree {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .preview-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .panel,
  .dialog-card,
  .tool-panel,
  .manager-header {
    padding: 14px;
  }

  .site-row {
    grid-template-columns: 36px 1fr;
  }

  .site-row > button,
  .row-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  menu {
    flex-direction: column-reverse;
  }

  menu button {
    width: 100%;
  }
}
