:root {
  color-scheme: light;
  --ink: #16202a;
  --muted: #647184;
  --line: #d8dee8;
  --panel: #ffffff;
  --panel-soft: #f5f7fa;
  --blue: #3157df;
  --blue-weak: #e8edff;
  --green: #138a55;
  --green-weak: #e4f7ed;
  --amber: #9b6500;
  --amber-weak: #fff2cc;
  --red: #b42318;
  --red-weak: #ffebe7;
  --dark: #172027;
  --shadow: 0 16px 48px rgba(25, 39, 52, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #eef2f6;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  min-width: 0;
  white-space: normal;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 10px 18px;
  background: var(--dark);
  color: #f7f9fb;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.topbar > * {
  min-width: 0;
}

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

.brand-mark,
.wp-dot {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 800;
}

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

.path-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  color: #aeb8c3;
  font-size: 12px;
}

.path-field input {
  width: 100%;
  border: 1px solid #3b4650;
  border-radius: 6px;
  padding: 8px 10px;
  background: #26313b;
  color: #f7f9fb;
}

.top-actions,
.button-row,
.filter-row,
.file-toolbar,
.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ghost,
.icon-btn,
.secondary,
.primary,
.danger,
.tiny,
.filter,
.tab,
.file-toolbar button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  min-height: 36px;
}

.ghost,
.icon-btn {
  border-color: #3b4650;
  background: #222c35;
  color: #f7f9fb;
}

.icon-btn {
  width: 38px;
  padding: 0;
  font-weight: 800;
}

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

.secondary {
  background: #fff;
}

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

.tiny {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.danger-text {
  color: var(--red);
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.workbench,
.blueprint-gallery,
.site-manager {
  margin-bottom: 28px;
}

.workbench {
  display: flex;
  flex-direction: column;
}

.section-heading,
.card-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.section-heading {
  margin-bottom: 16px;
}

.compact {
  align-items: center;
}

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

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

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.06;
}

h2 {
  margin-bottom: 4px;
  font-size: 22px;
}

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

.section-heading p:not(.eyebrow),
.card-heading p,
.helper,
.subtext,
small {
  color: var(--muted);
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.state {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.state-amber {
  background: var(--amber-weak);
  color: var(--amber);
}

.state-green {
  background: var(--green-weak);
  color: var(--green);
}

.state-blue {
  background: var(--blue-weak);
  color: var(--blue);
}

.dashboard-grid,
.table-layout,
.catalog-layout,
.manager-split {
  display: grid;
  gap: 16px;
}

.dashboard-grid > *,
.table-layout > *,
.catalog-layout > *,
.manager-split > * {
  min-width: 0;
}

.dashboard-grid {
  order: 2;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: stretch;
  margin-top: 16px;
}

.table-layout {
  order: 1;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.manager-card,
.detail-drawer,
.selected-blueprint,
.manager-tools,
.site-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  min-width: 0;
}

.manager-card,
.detail-drawer,
.selected-blueprint,
.manager-tools {
  padding: 20px;
}

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

.action-card,
.destination,
.blueprint-card {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
  overflow-wrap: anywhere;
}

.action-card {
  min-height: 150px;
  padding: 14px;
}

.action-card:hover,
.destination.selected,
.blueprint-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-weak);
}

.action-card.warning {
  border-color: #efd089;
  background: #fffaf0;
}

.card-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.flow-card {
  display: flex;
  flex-direction: column;
}

.flow-steps {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.flow-steps li {
  border-left: 4px solid var(--line);
  padding: 8px 0 8px 12px;
}

.flow-steps li.active {
  border-color: var(--amber);
}

.flow-steps li.complete {
  border-color: var(--green);
}

.flow-steps strong,
.flow-steps span {
  display: block;
}

.linklike {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  text-decoration: underline;
}

.table-card {
  padding: 0;
  overflow: hidden;
}

.table-card .card-heading {
  padding: 20px 20px 12px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

th,
td {
  border-top: 1px solid var(--line);
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--panel-soft);
  color: #3d4855;
  font-size: 12px;
  text-transform: uppercase;
}

tr.selected {
  background: #fffaf0;
}

td strong,
td span {
  display: block;
}

.detail-drawer {
  position: sticky;
  top: 78px;
  align-self: start;
  min-height: 430px;
}

.drawer-panel,
.tab-panel {
  display: none;
}

.drawer-panel.active,
.tab-panel.active {
  display: block;
}

.field,
.search-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #405064;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.search-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
}

.destination-grid,
.settings-grid,
.log-grid {
  display: grid;
  gap: 10px;
}

.destination-grid {
  grid-template-columns: 1fr;
  margin: 12px 0;
}

.destination {
  padding: 12px;
}

.progress-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
  margin: 12px 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #d6dce6;
}

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

.notice {
  display: grid;
  gap: 4px;
  border-left: 4px solid currentColor;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
}

.notice span {
  color: #405064;
}

.notice.amber {
  background: var(--amber-weak);
  color: var(--amber);
}

.notice.green {
  background: var(--green-weak);
  color: var(--green);
}

.notice.blue {
  background: var(--blue-weak);
  color: var(--blue);
}

.notice.red {
  background: var(--red-weak);
  color: var(--red);
}

.hidden {
  display: none;
}

.file-drop {
  display: grid;
  gap: 4px;
  border: 1px dashed #aeb8c3;
  border-radius: 8px;
  padding: 18px;
  background: var(--panel-soft);
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 12px;
}

.mini-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #405064;
  font-size: 14px;
}

.catalog-tools {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.filter {
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
}

.filter.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.search-field {
  max-width: 520px;
  margin: 0;
}

.catalog-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}

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

.blueprint-card {
  padding: 0;
  overflow: hidden;
}

.blueprint-card strong,
.blueprint-card small,
.tag-row {
  margin-left: 14px;
  margin-right: 14px;
}

.blueprint-card .tag-row {
  margin-bottom: 14px;
}

.preview {
  display: block;
  height: 118px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #dce5ef, #f7f9fb);
}

.preview.art {
  background: linear-gradient(90deg, #806421 0 35%, #d8c79f 35% 55%, #2d7a83 55% 100%);
}

.preview.coffee {
  background: linear-gradient(180deg, #552878 0 50%, #f2a556 50% 100%);
}

.preview.feed {
  background: linear-gradient(180deg, #f7f9fb 0 38%, #dde8ff 38% 44%, #fff 44% 100%);
}

.preview.gaming {
  background: linear-gradient(135deg, #050505 0 36%, #f7f9fb 36% 58%, #c45020 58% 100%);
}

.preview.nonprofit {
  background: linear-gradient(135deg, #8a3a16, #f6b26b 45%, #231f20);
}

.preview.blog {
  background: linear-gradient(135deg, #6b0f3a, #f3e7ee);
}

.preview.blocks {
  background: repeating-linear-gradient(45deg, #3157df 0 14px, #e8edff 14px 28px);
}

.preview.docs {
  background: linear-gradient(90deg, #ffffff 0 33%, #dbe4ef 33% 36%, #ffffff 36% 100%);
}

.preview.stylelab {
  background: linear-gradient(135deg, #192734, #fff 40%, #138a55);
}

.preview.product {
  background: linear-gradient(135deg, #f8d34f, #fff 45%, #3157df);
}

.preview.interactivity {
  background: radial-gradient(circle at 50% 50%, #138a55 0 22%, #e4f7ed 22% 42%, #fff 42%);
}

.preview.newsroom {
  background: linear-gradient(180deg, #172027 0 28%, #fff 28% 100%);
}

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

.tag-row span {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
}

.selected-blueprint {
  position: sticky;
  top: 78px;
  align-self: start;
}

dl,
.fact-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

dl div,
.fact-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  margin: 0;
}

.manager-split {
  grid-template-columns: 44% minmax(0, 1fr);
}

.site-identity {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.site-identity span:not(.wp-dot) {
  display: block;
  color: var(--muted);
}

.tab-row {
  border-bottom: 1px solid var(--line);
  margin: 0 -20px 16px;
  padding: 0 20px;
}

.tab {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
}

.tab.active {
  border-bottom-color: var(--ink);
  font-weight: 800;
}

.file-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.file-tree {
  background: var(--panel-soft);
}

.file-toolbar {
  padding: 8px;
}

.file-toolbar.wrap {
  margin-bottom: 12px;
}

.file-toolbar button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.file-tree ul {
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
}

.file-tree li {
  padding: 8px 12px;
  border-top: 1px solid #e6ebf2;
}

.file-tree li.selected {
  background: var(--blue-weak);
  color: var(--blue);
  font-weight: 800;
}

.code-view {
  min-height: 250px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  background: #111820;
  color: #e8eef5;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.code-view.tall {
  min-height: 340px;
  border-radius: 8px;
}

.site-preview {
  overflow: hidden;
  background: #fff;
}

.wp-admin-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 9px 12px;
  background: #1f252b;
  color: #f7f9fb;
  font-size: 13px;
}

.wp-page {
  padding: 28px 34px;
  min-height: 560px;
}

.wp-page header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 80px;
}

.wp-page nav {
  color: #333;
}

.wp-hero {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 30px;
  align-items: center;
}

.wp-hero h3 {
  color: #3157df;
  font-family: Georgia, serif;
  font-size: 40px;
  font-weight: 400;
}

.wp-hero p {
  font-size: 20px;
}

mark {
  background: #fff2a8;
}

.wp-hero button {
  display: block;
  width: 100%;
  margin-top: 22px;
  border: 0;
  border-radius: 3px;
  padding: 14px;
  background: #3157df;
  color: #fff;
}

.wp-shape {
  display: grid;
  place-items: center;
  min-height: 300px;
  border: 28px solid #31e878;
  border-radius: 50%;
  color: #171717;
  font-family: Georgia, serif;
  font-size: 170px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .dashboard-grid,
  .table-layout,
  .catalog-layout,
  .manager-split {
    grid-template-columns: 1fr;
  }

  .detail-drawer,
  .selected-blueprint {
    position: static;
  }

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

@media (max-width: 840px) {
  .topbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .brand,
  .path-field,
  .top-actions {
    min-width: 0;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-actions > * {
    width: 100%;
  }

  main {
    padding: 16px;
  }

  .section-heading,
  .card-heading {
    display: grid;
  }

  .status-strip,
  .top-actions {
    justify-content: flex-start;
  }

  .action-grid,
  .blueprint-grid,
  .file-layout,
  .wp-hero {
    grid-template-columns: 1fr;
  }

  .action-card {
    min-height: 0;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tr {
    border-top: 1px solid var(--line);
    padding: 12px;
  }

  td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    border: 0;
    padding: 6px 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  dl div,
  .fact-list div {
    grid-template-columns: 1fr;
  }

  .wp-page {
    padding: 20px;
    min-height: auto;
  }

  .wp-page header {
    display: grid;
    margin-bottom: 32px;
  }

  .wp-shape {
    min-height: 190px;
    border-width: 18px;
    font-size: 96px;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 20px;
  }

  .manager-card,
  .detail-drawer,
  .selected-blueprint,
  .manager-tools {
    padding: 14px;
  }

  .table-card .card-heading {
    padding: 14px;
  }

  td {
    grid-template-columns: 1fr;
  }

  .button-row,
  .filter-row,
  .top-actions {
    align-items: stretch;
  }

  .button-row > *,
  .top-actions > * {
    flex: 1 1 auto;
  }

  .preview {
    height: 96px;
  }
}
