:root {
  color-scheme: dark;
  --black: #050607;
  --ink: #0d1114;
  --panel: #111820;
  --panel-2: #17222b;
  --line: #2a3a45;
  --line-strong: #4ddfff;
  --text: #f7fbff;
  --muted: #9fb0ba;
  --muted-2: #73838e;
  --cyan: #4ddfff;
  --cyan-2: #00a7d6;
  --white: #ffffff;
  --green: #6bf29c;
  --yellow: #ffd24a;
  --red: #ff6868;
  --blue: #7192ff;
  --radius: 8px;
  --shadow: 0 18px 60px rgba(0, 0, 0, .34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--black);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b1117;
  color: var(--text);
  min-height: 36px;
  padding: 0 12px;
  cursor: default;
}

button:hover,
button:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

input,
select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #071016;
  color: var(--text);
  padding: 0 10px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

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

.top-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: stretch;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #080c10;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand,
.identity-card,
.stage-toolbar,
.panel-head,
.dock-head,
.address-row,
.strip-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark,
.project-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  font-weight: 900;
}

.brand strong,
.brand span,
.identity-card h1,
.identity-card p {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.project-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
  gap: 6px;
  min-width: 0;
}

.project-tab,
.new-project {
  min-width: 0;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  text-align: left;
  background: #0f171e;
}

.project-tab.active {
  border-color: var(--cyan);
  background: #122733;
  box-shadow: inset 0 -2px 0 var(--cyan);
}

.project-tab span:not(.dot),
.project-tab small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-tab small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot.warn,
.status.warn {
  background: rgba(255, 210, 74, .14);
  color: var(--yellow);
}

.dot.ok,
.status.ok {
  background: rgba(107, 242, 156, .14);
  color: var(--green);
}

.dot.cyan {
  background: var(--cyan);
}

.dot.blue {
  background: var(--blue);
}

.new-project {
  grid-template-columns: 1fr;
  text-align: center;
  color: var(--cyan);
  border-color: var(--cyan);
}

.shell-actions,
.quick-actions,
.state-line,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.primary {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #031016;
  font-weight: 800;
}

.secondary {
  background: #101923;
  border-color: #34434f;
}

.ghost {
  background: transparent;
}

.icon {
  width: 48px;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
}

.danger,
.danger-text {
  color: var(--red);
  border-color: rgba(255, 104, 104, .45);
}

.danger-text {
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
}

.workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 360px;
  min-height: 0;
}

.command-rail,
.right-dock {
  background: #070b0f;
  border-right: 1px solid var(--line);
  padding: 14px;
  overflow: auto;
}

.right-dock {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.identity-card {
  align-items: flex-start;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.identity-card h1,
.panel-head h2,
.dock-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.identity-card p,
.source p,
.save-option p,
.manager-row p,
.bp-card p,
.notice p,
.result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.kicker {
  margin: 0 0 4px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.address-row {
  margin-top: 12px;
  align-items: end;
}

.square {
  width: 36px;
  padding: 0;
  color: var(--cyan);
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin: 14px 0;
}

.mode-tab {
  justify-content: center;
  background: #0e151b;
}

.mode-tab.active {
  color: #031016;
  background: var(--cyan);
  border-color: var(--cyan);
  font-weight: 800;
}

.flow-strip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.strip-head {
  justify-content: space-between;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.flow-strip ol {
  list-style: none;
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
}

.flow-strip li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 4px 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b1117;
}

.flow-strip li span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #17242e;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.flow-strip li small {
  color: var(--muted);
}

.flow-strip li.done span {
  background: rgba(107, 242, 156, .16);
  color: var(--green);
}

.flow-strip li.active {
  border-color: var(--cyan);
}

.flow-strip li.active span {
  background: var(--cyan);
  color: #031016;
}

.flow-strip li.risk {
  border-color: rgba(255, 104, 104, .45);
}

.flow-strip li.risk span {
  background: rgba(255, 104, 104, .16);
  color: var(--red);
}

.stage {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #0b0f13;
}

.stage-toolbar {
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #0d1318;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.split-view {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(420px, .92fr) minmax(440px, 1.08fr);
}

.editor-pane,
.preview-pane {
  min-width: 0;
  overflow: auto;
}

.editor-pane {
  padding: 14px;
  border-right: 1px solid var(--line);
}

.panel {
  display: none;
}

.panel.active,
.dock-panel.active {
  display: block;
}

.panel-head {
  justify-content: space-between;
  align-items: start;
  margin-bottom: 14px;
  gap: 14px;
}

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

.metric,
.notice,
.danger-box,
.result-card,
.source,
.save-option,
.log-grid article,
.blueprint-detail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.metric strong,
.metric small,
.saved-list small,
.save-options small {
  display: block;
}

.metric small,
.saved-list small,
.save-options small {
  color: var(--muted);
}

.metric.warning {
  border-color: rgba(255, 210, 74, .5);
}

.manager-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.manager-row.selected {
  border-color: var(--cyan);
}

.row-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  color: var(--cyan);
  background: #101f29;
  font-weight: 900;
}

.file-layout,
.blueprint-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px;
}

.blueprint-grid {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.tree,
.catalog,
.code {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #071016;
}

.tree {
  padding: 10px;
}

.tree strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.tree-item {
  width: 100%;
  min-height: 30px;
  margin: 2px 0;
  border: 0;
  text-align: left;
  background: transparent;
  color: var(--muted);
}

.tree-item.selected {
  color: var(--black);
  background: var(--cyan);
  font-weight: 800;
}

.code {
  margin: 0;
  padding: 12px;
  color: #ddf9ff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.code.small {
  font-size: 11px;
}

.catalog {
  padding: 12px;
}

.catalog-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  min-height: 28px;
  border-radius: 999px;
  color: var(--muted);
}

.chip.active {
  color: #031016;
  background: var(--cyan);
  border-color: var(--cyan);
  font-weight: 800;
}

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

.bp-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #0e151b;
}

.bp-card.selected {
  border-color: var(--cyan);
}

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

.bp-card small {
  color: var(--muted-2);
}

.thumb {
  display: block;
  height: 62px;
  margin-bottom: 9px;
  border-radius: 5px;
  border: 1px solid #30424d;
  background:
    linear-gradient(90deg, rgba(77, 223, 255, .8), transparent 38%),
    repeating-linear-gradient(0deg, #17222b 0 8px, #1d2d38 8px 16px);
}

.thumb.art {
  background:
    linear-gradient(135deg, #a460ff, transparent 45%),
    linear-gradient(90deg, #f5cf7a 0 30%, #294e5e 30% 62%, #1b2119 62%);
}

.thumb.shop {
  background:
    linear-gradient(90deg, #2b143c, #7a3aa4 46%, #ffb064 46% 100%);
}

.thumb.news {
  background:
    linear-gradient(135deg, #121212 0 50%, #ffffff 50% 100%),
    linear-gradient(90deg, #ff6868, #7192ff);
}

.thumb.nonprofit {
  background:
    radial-gradient(circle at 70% 35%, #ffd24a, transparent 28%),
    linear-gradient(90deg, #4b190a, #130d0a);
}

.thumb.blog {
  background:
    linear-gradient(135deg, #5e0730 0 48%, #f5f5f5 48% 51%, #260b16 51%);
}

.blueprint-detail h3,
.log-grid h3 {
  margin-top: 0;
}

.notice {
  border-left: 4px solid var(--cyan);
  margin-bottom: 14px;
}

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

.facts div {
  display: grid;
  grid-template-columns: 170px 1fr;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
}

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

.empty {
  color: var(--green);
}

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

.check {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #0b1117;
}

.check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--cyan);
}

.danger-box {
  margin-top: 14px;
  border-color: rgba(255, 104, 104, .45);
}

.preview-pane {
  background: #f7f7f7;
  color: #101214;
}

.browser-bar {
  display: grid;
  grid-template-columns: repeat(3, 12px) minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 10px;
  background: #1b2227;
}

.browser-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #52616b;
}

.browser-bar input {
  min-height: 28px;
  background: #313c44;
  border: 0;
  color: #d7e0e6;
}

.wp-admin-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 32px;
  padding: 0 12px;
  background: #20282d;
  color: #f5f5f5;
  font-size: 13px;
}

.wp-admin-bar em {
  margin-left: auto;
  font-style: normal;
}

.wp-page {
  min-height: 720px;
  background: var(--white);
}

.wp-page nav {
  display: flex;
  gap: 26px;
  justify-content: flex-end;
  align-items: center;
  padding: 24px 36px;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(260px, 470px) minmax(280px, 1fr);
  gap: 40px;
  align-items: center;
  padding: 120px 34px 60px;
  overflow: hidden;
}

.hero h2 {
  font-family: Georgia, serif;
  font-size: 48px;
  line-height: 1.2;
  margin: 0 0 24px;
  font-weight: 400;
}

.hero h2 span {
  color: #3355f5;
}

.hero p {
  max-width: 520px;
  font-size: 21px;
  line-height: 1.45;
}

.hero mark {
  background: #fff2a1;
}

.hero button {
  min-width: 320px;
  min-height: 58px;
  border: 0;
  color: white;
  background: #3955ed;
  font-size: 18px;
}

.wp-symbol {
  display: grid;
  place-items: center;
  width: min(38vw, 560px);
  min-width: 280px;
  aspect-ratio: 1;
  border: 28px solid #23e86e;
  border-radius: 50%;
  color: #191919;
  font-family: Georgia, serif;
  font-size: 260px;
  font-weight: 900;
  justify-self: center;
}

.dock-panel {
  display: none;
}

.dock-head {
  display: block;
  margin-bottom: 12px;
}

.source-list,
.save-options,
.saved-list {
  display: grid;
  gap: 10px;
}

.source {
  display: grid;
  gap: 10px;
}

.source.selected {
  border-color: var(--cyan);
}

.source.danger-source {
  border-color: rgba(255, 104, 104, .45);
}

.save-name {
  margin-bottom: 12px;
}

.save-option.selected {
  border-color: var(--cyan);
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #26323b;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--cyan);
}

.progress.local span {
  background: var(--green);
}

.result-card {
  margin-top: 12px;
  border-color: rgba(107, 242, 156, .45);
}

.result-card.import-result {
  border-color: rgba(255, 210, 74, .45);
}

.saved-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel);
}

.saved-list small {
  grid-column: 1;
}

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

  .right-dock {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: none;
  }

  .source-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .save-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  .top-shell {
    grid-template-columns: 1fr;
  }

  .project-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

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

  .preview-pane {
    min-height: 620px;
  }

  .source-list,
  .site-grid,
  .settings-grid,
  .log-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .top-shell,
  .stage-toolbar,
  .command-rail,
  .right-dock,
  .editor-pane {
    padding: 10px;
  }

  .project-tabs {
    grid-template-columns: 1fr;
  }

  .shell-actions,
  .quick-actions,
  .state-line,
  .button-row,
  .stage-toolbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .mode-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .manager-row,
  .file-layout,
  .blueprint-grid,
  .facts div,
  .saved-list article {
    grid-template-columns: 1fr;
  }

  .tree {
    max-height: 260px;
    overflow: auto;
  }

  .blueprint-cards {
    grid-template-columns: 1fr;
  }

  .save-options {
    grid-template-columns: 1fr;
  }

  .wp-admin-bar {
    overflow-x: auto;
    white-space: nowrap;
  }

  .wp-page nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 50px 18px;
  }

  .hero p {
    font-size: 18px;
  }

  .hero h2 {
    font-size: 36px;
  }

  .hero button {
    min-width: 0;
    width: 100%;
  }

  .wp-symbol {
    width: min(82vw, 360px);
    min-width: 0;
    font-size: 160px;
    border-width: 18px;
  }
}
