:root {
  color-scheme: light;
  --ink: #101517;
  --muted: #606a73;
  --subtle: #8b949e;
  --line: #d8dee5;
  --soft-line: #edf0f3;
  --panel: #fff;
  --panel-2: #f6f8fa;
  --canvas: #eef2f5;
  --shell: #1d252b;
  --shell-2: #11181d;
  --blue: #007cba;
  --blue-dark: #005a87;
  --green: #008a20;
  --green-soft: #e7f6ed;
  --amber: #b86e00;
  --amber-soft: #fff4d6;
  --red: #b42318;
  --red-soft: #fff0ee;
  --radius: 8px;
  --shadow: 0 18px 60px rgba(16, 21, 23, 0.16);
  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;
}

.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-columns: minmax(0, 1fr) minmax(390px, 460px);
  grid-template-rows: 50px minmax(0, 1fr);
  background: var(--canvas);
}

.command-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 12px;
  background: var(--shell);
  color: #f2f6f9;
  border-bottom: 1px solid #313c44;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.brand-mark,
.avatar,
.row-logo,
.wp-logo {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}

.brand-mark {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #2f6cf6, #0aa775);
}

.path-control {
  flex: 1;
  min-width: 120px;
}

.path-control input {
  width: 100%;
  height: 34px;
  border: 1px solid #3c4852;
  border-radius: 7px;
  background: #303a43;
  color: #edf2f6;
  padding: 0 12px;
  outline: none;
}

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

.button,
.icon-button,
.small-button,
.manager-tabs button,
.command-tabs button,
.filters button,
.toolbar-row button,
.log-tabs button,
.wp-adminbar button,
.site-nav button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  font-weight: 600;
}

.button:hover,
.icon-button:hover,
.small-button:hover,
.manager-tabs button:hover,
.command-tabs button:hover,
.filters button:hover,
.toolbar-row button:hover {
  border-color: var(--blue);
}

.button.primary,
.button.save,
.small-button,
.toolbar-row .filled {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.button.primary:hover,
.button.save:hover,
.small-button:hover,
.toolbar-row .filled:hover {
  background: var(--blue-dark);
}

.button.quiet {
  border-color: #3e4b55;
  background: #25313a;
  color: #ecf3f7;
}

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

.button.full {
  width: 100%;
}

.icon-button {
  width: 34px;
  flex: 0 0 auto;
  padding: 0;
  display: grid;
  place-items: center;
  border-color: #3e4b55;
  color: #f1f6f8;
  background: #25313a;
}

.storage-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: max-content;
  color: #ffd866;
  font-size: 13px;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffd866;
}

.app[data-storage="browser"] .storage-status {
  color: #87e6a8;
}

.app[data-storage="browser"] .status-dot {
  background: #37d67a;
}

.app[data-storage="local"] .storage-status {
  color: #8fd3ff;
}

.app[data-storage="local"] .status-dot {
  background: #4db9ff;
}

.browser {
  min-width: 0;
  padding: 12px;
  background: #12191e;
}

.browser-frame {
  height: calc(100vh - 74px);
  min-height: 680px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid #2e3942;
  background: #fff;
  box-shadow: var(--shadow);
}

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

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

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

.spacer {
  flex: 1;
}

.site-nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid #f0f0f1;
}

.site-nav strong {
  font-size: 20px;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #2f3437;
}

.wordpress-preview {
  flex: 1;
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: 24px;
  overflow: hidden;
  padding: 56px min(7vw, 86px);
  background: #fff;
}

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

.preview-label,
.eyebrow {
  margin: 0 0 6px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.copy h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 4.2vw, 72px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 400;
}

.copy h1 span {
  color: #3858e9;
}

.copy p {
  margin: 20px 0 0;
  font-size: clamp(18px, 1.6vw, 25px);
  line-height: 1.35;
}

.copy .highlight {
  display: inline;
  background: #fff3b8;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.wp-cta {
  min-height: 48px;
  margin-top: 28px;
  border: 0;
  border-radius: 4px;
  padding: 0 22px;
  background: #3858e9;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.preview-art {
  position: relative;
  min-height: 520px;
}

.green-ring,
.green-arc {
  position: absolute;
  right: -20%;
  border: 64px solid #31e879;
  border-radius: 50%;
  transform: rotate(-4deg);
}

.green-ring {
  top: 22%;
  width: min(54vw, 680px);
  height: min(34vw, 430px);
}

.green-arc {
  top: 52%;
  right: -14%;
  width: min(42vw, 560px);
  height: min(20vw, 270px);
  border-top-color: transparent;
  border-left-color: transparent;
  border-right-color: transparent;
}

.wp-emblem {
  position: absolute;
  top: 4%;
  right: 5%;
  display: grid;
  place-items: center;
  width: min(24vw, 310px);
  height: min(24vw, 310px);
  min-width: 160px;
  min-height: 160px;
  border: 16px solid #1d1d1d;
  border-radius: 50%;
  color: #1d1d1d;
  font-family: Georgia, serif;
  font-size: min(19vw, 230px);
  font-weight: 700;
  line-height: 1;
  background: rgba(255, 255, 255, 0.48);
}

.inspector {
  min-width: 0;
  max-height: calc(100vh - 50px);
  overflow: auto;
  border-left: 1px solid #cfd7df;
  background: var(--panel);
}

.identity-card {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.identity-main {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.avatar {
  width: 38px;
  height: 38px;
  background: #111;
}

.identity-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

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

.identity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.badge.amber {
  border-color: #f0c36a;
  color: var(--amber);
  background: var(--amber-soft);
}

.badge.green {
  border-color: #9dd8ad;
  color: var(--green);
  background: var(--green-soft);
}

.badge.red {
  border-color: #f0b4ad;
  color: var(--red);
  background: var(--red-soft);
}

.command-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.command-tabs button,
.filters button,
.manager-tabs button,
.log-tabs button {
  min-height: 34px;
  background: #fff;
  color: #2c3338;
  font-size: 13px;
}

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

.command-panels {
  padding: 14px;
}

.panel {
  display: none;
}

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

.panel-heading {
  margin-bottom: 14px;
}

.panel-heading h3,
.blueprint-detail h4,
.section-title h4 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.panel-heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

.destination-grid,
.route-grid,
.transfer-grid,
.blueprint-list {
  display: grid;
  gap: 10px;
}

.destination,
.route,
.saved-row,
.transfer-grid article,
.blueprint-card,
.callout,
.confirm-box,
.db-card,
.progress-block,
.permission-note,
.code-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.destination,
.blueprint-card {
  width: 100%;
  text-align: left;
  padding: 12px;
}

.destination.selected,
.blueprint-card.selected,
.saved-row.active {
  border-color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
  background: #f3f9fd;
}

.destination strong,
.destination span,
.destination small,
.blueprint-card strong,
.blueprint-card small,
.transfer-grid strong,
.transfer-grid span {
  display: block;
}

.destination span,
.destination small,
.blueprint-card small,
.transfer-grid span,
.route p,
.result-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.field,
.mini-field,
.settings-grid label {
  display: grid;
  gap: 6px;
  color: #3b444b;
  font-size: 13px;
  font-weight: 700;
}

.field {
  margin-top: 12px;
}

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

.permission-note,
.progress-block,
.callout,
.confirm-box {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  background: var(--panel-2);
}

.permission-note span,
.confirm-box span,
.callout span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.confirm-box.warning,
.callout.warning {
  border-color: #f0c36a;
  background: var(--amber-soft);
}

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

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

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

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

.button-row,
.toolbar-row,
.filters,
.log-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.button-row.compact {
  margin-top: 8px;
}

.button-row.wrap {
  flex-wrap: wrap;
}

.route {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  padding: 12px;
}

.route h4 {
  margin: 0 0 4px;
}

.route p {
  margin: 0 0 8px;
}

.route-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: #2c3338;
  font-size: 12px;
  font-weight: 800;
}

.route-icon.blue {
  background: var(--blue);
}

.route-icon.dark {
  background: #24292f;
}

.route-icon.green {
  background: var(--green);
}

.route-icon.amber {
  background: var(--amber);
}

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

.saved-row {
  display: grid;
  grid-template-columns: 34px 1fr auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.saved-row strong,
.saved-row small {
  display: block;
}

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

.row-logo {
  background: #3157a3;
}

.row-logo.local {
  background: var(--green);
}

.manager-tabs,
.filters,
.log-tabs {
  flex-wrap: wrap;
  margin-top: 0;
  margin-bottom: 12px;
}

.manager-panel {
  display: none;
}

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

.settings-grid .check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-editor {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 10px;
}

.file-tree {
  min-height: 240px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  font-size: 13px;
}

.file-tree li {
  padding: 8px;
  border-radius: 5px;
}

.file-tree .selected {
  background: #e6f2fa;
  color: var(--blue-dark);
  font-weight: 700;
}

.code-title,
.detail-head,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.code-card textarea {
  width: 100%;
  min-height: 176px;
  display: block;
  resize: vertical;
  border: 0;
  padding: 12px;
  color: #7a2d00;
  background: #fff;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.json-preview {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  background: #fbfcfd;
  color: #7a2d00;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.db-card {
  display: grid;
  gap: 7px;
  padding: 12px;
}

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

.log-output {
  min-height: 180px;
  padding: 12px;
  border-radius: var(--radius);
  background: #101820;
  color: #dbe7ef;
  font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.log-output p {
  margin: 0;
}

.log-output .warn {
  color: #ffd866;
}

.search {
  margin-bottom: 12px;
}

.blueprint-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.thumb {
  display: block;
  height: 70px;
  margin: -4px -4px 9px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
    var(--blue);
}

.thumb.coffee {
  background:
    linear-gradient(90deg, #5b2a86 0 42%, #f09844 42% 100%),
    #5b2a86;
}

.thumb.art {
  background:
    linear-gradient(90deg, #1f6f6b 0 28%, #d7a44a 28% 55%, #875f32 55% 100%);
}

.thumb.feed {
  background:
    linear-gradient(90deg, #f7f9ff 0 64%, #dfe9ff 64%),
    #fff;
  border: 1px solid #cfd7df;
}

.thumb.gaming {
  background:
    linear-gradient(135deg, #0c0c0c 0 36%, #d24a1e 36% 70%, #fff 70%);
}

.thumb.nonprofit {
  background:
    linear-gradient(135deg, #2d1508, #d08734 48%, #4f1f10);
}

.thumb.blog {
  background:
    linear-gradient(135deg, #5b0934 0 52%, #d6c4ce 52% 72%, #3d0d26 72%);
}

.blueprint-detail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.blueprint-detail .button-row,
.blueprint-detail .progress-block {
  margin: 12px;
}

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

.transfer-grid article {
  display: grid;
  gap: 7px;
  align-content: start;
  padding: 12px;
}

.history {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.history ol {
  margin: 0;
  padding: 10px 12px 12px 34px;
}

.history li {
  margin: 7px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .app {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .shell-actions {
    display: none;
  }

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

  .preview-art {
    position: absolute;
    inset: auto -18% -8% auto;
    width: 58%;
    opacity: 0.82;
    pointer-events: none;
  }
}

@media (max-width: 860px) {
  .app {
    display: block;
  }

  .command-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-wrap: wrap;
    min-height: 94px;
  }

  .brand {
    flex: 1 1 auto;
  }

  .path-control {
    order: 2;
    flex-basis: 100%;
  }

  .storage-status {
    font-size: 12px;
  }

  .browser {
    padding: 8px;
  }

  .browser-frame {
    height: auto;
    min-height: 560px;
  }

  .wp-adminbar {
    gap: 8px;
    overflow: auto;
  }

  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .site-nav nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .wordpress-preview {
    min-height: 500px;
    padding: 34px 22px;
  }

  .copy h1 {
    font-size: 42px;
  }

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

  .preview-art {
    width: 86%;
    opacity: 0.28;
  }

  .inspector {
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .identity-card {
    position: static;
  }

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

  .blueprint-list,
  .transfer-grid {
    grid-template-columns: 1fr;
  }

  .file-editor {
    grid-template-columns: 1fr;
  }

  .saved-row {
    grid-template-columns: 34px 1fr;
  }

  .saved-row .badge,
  .saved-row button {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .button-row,
  .toolbar-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row .button,
  .toolbar-row button {
    width: 100%;
  }

  .progress-copy,
  .detail-head,
  .section-title,
  .code-title {
    align-items: flex-start;
    flex-direction: column;
  }
}
