:root {
  color-scheme: light;
  --bg: #f6f7f7;
  --panel: #fff;
  --panel-soft: #f0f2f4;
  --ink: #1d2327;
  --muted: #646970;
  --line: #dcdcde;
  --accent: #007cba;
  --accent-dark: #005a87;
  --accent-soft: #e6f2f8;
  --warn: #f6c343;
  --danger: #b32d2e;
  --ok: #008a20;
  --shadow: 0 8px 30px rgba(29, 35, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.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: auto 1fr auto;
}

.side-nav {
  display: none;
}

.mobile-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.mobile-top strong {
  display: block;
  font-size: 15px;
}

.mobile-top span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  min-width: 0;
  padding-bottom: 74px;
}

.browser-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #1d2327;
  color: #fff;
}

.browser-bar .primary,
.browser-bar .ghost:nth-last-child(-n + 2) {
  display: none;
}

.address input {
  width: 100%;
  height: 32px;
  border: 1px solid #3c434a;
  border-radius: 6px;
  padding: 0 10px;
  color: #dcdcde;
  background: #2c3338;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status.warn {
  color: #1d2327;
  background: var(--warn);
}

.view {
  display: none;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.view.active {
  display: block;
}

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

.content-head h1 {
  max-width: 780px;
  margin: 3px 0 0;
  font-size: 25px;
  line-height: 1.14;
  letter-spacing: 0;
}

.eyebrow,
.kicker {
  margin: 0;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.head-actions {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
}

.primary,
.ghost,
.danger,
.icon {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 12px;
  color: var(--ink);
  background: var(--panel);
}

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

.ghost:hover,
.primary:hover {
  border-color: var(--accent-dark);
}

.danger {
  border-color: #f0b8b8;
  color: var(--danger);
  background: #fff8f8;
}

.small {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 13px;
}

.icon {
  width: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
}

.flow-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.flow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.flow-step span {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--muted);
  font-weight: 700;
}

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

.flow-step.done span,
.flow-step.active span {
  background: var(--accent);
}

.flow-step.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.work-grid,
.storage-grid {
  display: grid;
  gap: 14px;
}

.card,
.route-card,
.selected-blueprint,
.manager-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card {
  padding: 14px;
}

.card h2,
.route-card h2,
.selected-blueprint h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

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

.admin-pill,
.file-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
}

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

.wp-adminbar {
  height: 24px;
  background: #1d2327;
}

.site-layout {
  min-height: 260px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  padding: 22px;
}

.site-layout h3 {
  margin: 0 0 10px;
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}

.site-layout h3 span {
  color: #3858e9;
}

.site-layout p {
  max-width: 430px;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.45;
}

mark {
  background: #fff2a8;
}

.wp-mark {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 10px solid #1d2327;
  border-radius: 50%;
  color: #1d2327;
  font-family: Georgia, serif;
  font-size: 68px;
  font-weight: 700;
}

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

.button-row.right {
  justify-content: flex-end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fff;
}

.source-field {
  display: grid;
  gap: 6px;
}

.warning-box,
.info-card {
  border-left: 4px solid var(--accent);
  margin: 12px 0;
  padding: 12px;
  background: #f0f6fc;
  font-size: 14px;
  line-height: 1.45;
}

.warning-box {
  border-left-color: var(--warn);
  background: #fff9e5;
}

.code {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: #1d2327;
  background: #f6f7f7;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

.progress-label strong {
  color: var(--ink);
}

.bar,
.mini-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e5e5;
}

.bar span,
.mini-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

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

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

.destination.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.destination small {
  color: var(--muted);
  line-height: 1.4;
}

.destination em {
  color: var(--accent-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.result-line {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  padding: 10px;
  background: #f4fbf5;
}

.result-line span {
  color: var(--ok);
  font-size: 12px;
  font-weight: 700;
}

.route-list {
  display: grid;
  gap: 12px;
}

.route-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px;
}

.route-card p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.route-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-weight: 800;
}

.route-controls {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.route-controls.compact {
  grid-template-columns: 1fr;
}

.accent-route {
  border-color: var(--accent);
}

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

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.filter-row button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: #fff;
}

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

.search span {
  color: var(--muted);
}

.gallery-layout {
  display: grid;
  gap: 14px;
}

.selected-blueprint {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.selected-blueprint p {
  color: var(--muted);
  line-height: 1.5;
}

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

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

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

.catalog-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  text-align: left;
  background: #fff;
}

.catalog-card.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.catalog-card strong {
  font-size: 13px;
  line-height: 1.25;
}

.catalog-card small {
  color: var(--muted);
  font-size: 12px;
}

.catalog-card.slim {
  min-height: 74px;
}

.catalog-card.more {
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  font-weight: 700;
}

.thumb {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.65) 0 24%, transparent 24%),
    linear-gradient(135deg, #8a6d2f, #0f766e);
}

.thumb.large {
  min-height: 170px;
}

.thumb.coffee {
  background:
    linear-gradient(180deg, #532b78 0 42%, transparent 42%),
    linear-gradient(135deg, #f6ad55, #7c2d12);
}

.thumb.feed {
  background:
    linear-gradient(90deg, #fff 0 70%, #e5e7eb 70%),
    linear-gradient(180deg, #dbeafe, #fff);
}

.thumb.gaming {
  background:
    linear-gradient(180deg, #111 0 28%, transparent 28%),
    linear-gradient(135deg, #7f1d1d, #fbbf24);
}

.thumb.nonprofit {
  background:
    linear-gradient(90deg, rgba(0,0,0,.25), transparent),
    linear-gradient(135deg, #78350f, #fcd34d);
}

.thumb.blog {
  background:
    linear-gradient(180deg, #6b113b 0 60%, #3f0c25 60%),
    linear-gradient(135deg, #f3e8ff, #9f1239);
}

.saved-list,
.result-list {
  display: grid;
  gap: 9px;
}

.saved-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.saved-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.saved-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.site-dot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2c3338;
  font-family: Georgia, serif;
  font-weight: 700;
}

.saved-actions {
  display: flex;
  gap: 8px;
  padding-left: 44px;
}

.result-list > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.result-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.manager-shell {
  overflow: hidden;
}

.manager-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.manager-tabs button {
  flex: 0 0 auto;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 13px 14px;
  color: var(--muted);
  background: #fff;
  font-weight: 700;
}

.manager-tabs .active {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.manager-panel {
  display: none;
  padding: 14px;
}

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

.settings-grid {
  display: grid;
  gap: 12px;
}

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

.check input {
  width: 18px;
  min-height: 18px;
}

.file-workbench {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.tree {
  min-height: 160px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
  background: #fff;
}

.tree li {
  padding: 7px 8px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
}

.tree .open,
.tree .selected {
  color: var(--ink);
  background: var(--accent-soft);
}

.editor {
  min-height: 260px;
  margin: 0;
}

.info-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

.db-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 14px;
  overflow: auto;
}

.db-list dt {
  font-weight: 700;
}

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

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

.log-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.log-grid pre {
  margin: 8px 0 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
}

.bottom-nav a {
  min-width: 0;
  padding: 11px 3px 12px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.bottom-nav a.active {
  color: var(--accent-dark);
  box-shadow: inset 0 3px 0 var(--accent);
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(29, 35, 39, 0.58);
}

.dialog-backdrop[hidden] {
  display: none;
}

.dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog h2 {
  margin: 0;
}

.dialog-copy {
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.45;
}

@media (min-width: 560px) {
  .flow-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .route-controls.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 780px) {
  .app {
    grid-template-columns: 218px minmax(0, 1fr);
    grid-template-rows: 1fr;
  }

  .side-nav {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: #fff;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 68px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 2px solid #1d2327;
    border-radius: 50%;
    font-family: Georgia, serif;
    font-weight: 800;
  }

  .side-nav nav {
    display: grid;
    gap: 4px;
    padding: 12px;
  }

  .side-nav nav a {
    display: grid;
    gap: 3px;
    border-radius: 6px;
    padding: 11px 12px;
    color: var(--ink);
    text-decoration: none;
  }

  .side-nav nav a.active {
    color: #fff;
    background: var(--accent);
  }

  .side-nav nav small {
    color: inherit;
    opacity: 0.72;
  }

  .mobile-top,
  .bottom-nav {
    display: none;
  }

  .workspace {
    min-height: 100vh;
    max-height: 100vh;
    overflow: auto;
    padding-bottom: 0;
  }

  .browser-bar {
    position: sticky;
    top: 0;
    z-index: 15;
    grid-template-columns: auto minmax(260px, 1fr) auto auto auto auto;
  }

  .browser-bar .primary,
  .browser-bar .ghost:nth-last-child(-n + 2) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .view {
    width: min(1180px, calc(100% - 40px));
    padding: 24px 0 36px;
  }

  .content-head h1 {
    font-size: 32px;
  }

  .head-actions {
    display: flex;
  }

  .flow-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .work-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    align-items: start;
  }

  .preview-card {
    grid-row: span 2;
  }

  .site-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 430px;
  }

  .wp-mark {
    width: 170px;
    height: 170px;
    font-size: 102px;
  }

  .route-card {
    grid-template-columns: auto minmax(0, 0.86fr) minmax(320px, 1.14fr);
    align-items: center;
  }

  .route-controls {
    grid-column: auto;
  }

  .gallery-layout {
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
    align-items: start;
  }

  .selected-blueprint {
    position: sticky;
    top: 84px;
  }

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

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

  .storage-grid .card:last-child {
    grid-column: 1 / -1;
  }

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

  .file-workbench {
    grid-template-columns: 250px minmax(0, 1fr);
  }

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

  .dialog-backdrop {
    place-items: center;
  }
}

@media (min-width: 1180px) {
  .catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
