:root {
  --ink: #15171a;
  --muted: #68707a;
  --line: #d6dbe1;
  --panel: #ffffff;
  --soft: #f5f7fa;
  --chrome: #1d2327;
  --chrome-2: #2c3338;
  --blue: #2458d8;
  --blue-2: #0f7eb8;
  --green: #1f9d63;
  --yellow: #f8d24a;
  --red: #b42318;
  --shadow: 0 12px 32px rgba(19, 26, 33, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: #111517;
}

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-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 50px 1fr;
}

.topbar {
  display: grid;
  grid-template-columns: auto 34px minmax(180px, 1fr) auto auto auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--chrome);
  color: #f6f7f7;
  border-bottom: 1px solid #121618;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.brand-mark,
.wp-dot,
.wp-badge {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #f6f7f7;
  color: #111;
  font-family: Georgia, serif;
  font-weight: 900;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--blue);
  border: 2px solid var(--blue);
  background: transparent;
}

.address-wrap,
.address {
  width: 100%;
}

.address {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: #dce3ea;
  background: #3b444d;
}

.top-status {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.top-status.unsaved {
  color: var(--yellow);
}

.top-status.saved {
  color: #88e0ad;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  color: inherit;
  background: transparent;
}

.icon-button:hover,
.ghost:hover,
.outline:hover {
  background: rgba(36, 88, 216, 0.08);
}

.workbench {
  min-height: calc(100vh - 50px);
  display: grid;
  grid-template-columns: 320px minmax(360px, 1fr) 390px;
  gap: 10px;
  padding: 10px;
}

.left-rail,
.browser-pane,
.inspector {
  min-width: 0;
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
}

.left-rail,
.inspector {
  display: flex;
  flex-direction: column;
}

.left-rail {
  padding: 16px;
  gap: 18px;
}

.rail-section {
  display: grid;
  gap: 10px;
}

.section-heading,
.site-title-row,
.quick-actions,
.file-toolbar,
.blueprint-actions,
.action-stack {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-heading {
  justify-content: space-between;
}

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

h1 {
  font-size: 22px;
  margin-bottom: 0;
}

h2 {
  font-size: 15px;
  margin-bottom: 0;
}

.rail-section > h2 {
  margin-bottom: 0;
}

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

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

.saved-item.active {
  border-color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

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

.saved-item small,
.muted,
label,
.data-list,
.gallery-card p,
.gallery-card small {
  color: var(--muted);
}

.wp-dot {
  width: 32px;
  height: 32px;
  background: #0b1620;
  color: #fff;
}

.wp-dot.saved {
  background: #eaf0ff;
  color: var(--blue);
}

.kebab,
.link-button {
  border: 0;
  background: transparent;
}

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

.start-card {
  min-height: 80px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.start-card span {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  color: #fff;
  background: var(--chrome-2);
  font-size: 12px;
  font-weight: 800;
}

.start-card strong {
  font-size: 13px;
}

.blueprint-strip {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.blueprint-strip:hover {
  border-color: var(--line);
  background: var(--soft);
}

.thumb,
.gallery-image {
  display: block;
  border-radius: 6px;
  background: linear-gradient(135deg, #6172a0, #c9d96d);
}

.thumb {
  height: 38px;
}

.art {
  background: linear-gradient(135deg, #3e7d79 0 35%, #d7c07b 36% 64%, #7d2d4b 65%);
}

.coffee {
  background: linear-gradient(135deg, #462466 0 42%, #f19b48 43% 100%);
}

.feed {
  background: linear-gradient(135deg, #ffffff 0 50%, #6984d8 51%);
}

.game {
  background: linear-gradient(135deg, #0c0c0f 0 44%, #b83018 45%, #f2d076);
}

.nonprofit {
  background: linear-gradient(135deg, #6f3f18, #d08d3c 48%, #231b16);
}

.blog {
  background: linear-gradient(135deg, #6e0f3f, #f0d7e4);
}

.browser-pane {
  display: grid;
  grid-template-rows: 48px 1fr;
  background: #f6f7f7;
}

.site-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.saved-state {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.wp-frame {
  min-height: 0;
  overflow: auto;
  background: #fff;
}

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

.wp-logo {
  font-family: Georgia, serif;
  font-weight: 900;
}

.push {
  margin-left: auto;
}

.wp-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 22px 34px;
}

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

.wp-content {
  position: relative;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(260px, 470px) 1fr;
  gap: 40px;
  align-items: center;
  padding: 60px 36px 80px;
  overflow: hidden;
}

.welcome-copy {
  position: relative;
  z-index: 1;
}

.welcome-copy h2 {
  font-family: Georgia, serif;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.1;
  font-weight: 400;
  margin-bottom: 24px;
}

.welcome-copy h2 span {
  color: #3358f4;
}

.welcome-copy p {
  font-size: 20px;
  line-height: 1.45;
}

mark {
  background: #ffe889;
}

.playground-symbol {
  position: relative;
  min-width: 420px;
  height: 560px;
}

.loop {
  position: absolute;
  left: 5%;
  width: 92%;
  height: 220px;
  border: 58px solid #31e779;
  border-radius: 50%;
  transform: rotate(1deg);
}

.loop-one {
  top: 130px;
}

.loop-two {
  top: 360px;
}

.letter {
  position: absolute;
  top: 20px;
  right: 8%;
  width: 290px;
  height: 290px;
  display: grid;
  place-items: center;
  border: 18px solid #1d1d1f;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 220px;
  font-weight: 900;
  line-height: 1;
  background: rgba(255, 255, 255, 0.72);
}

.inspector {
  background: var(--panel);
}

.site-card {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.site-title-row {
  align-items: flex-start;
  margin-bottom: 12px;
}

.wp-badge {
  width: 44px;
  height: 44px;
  border: 2px solid #111;
}

.quick-actions {
  flex-wrap: wrap;
}

.tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: #fff;
  font-weight: 700;
}

.tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  background: #f8fbff;
}

.tab-panels {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.panel {
  display: none;
  gap: 12px;
}

.panel.active {
  display: grid;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

input,
select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}

.check,
.radio {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input,
.radio input {
  min-height: auto;
}

.notice {
  padding: 12px;
  border-left: 4px solid var(--blue-2);
  background: #eef5fb;
  font-size: 13px;
  line-height: 1.45;
}

.notice.warning {
  border-left-color: #d89a1c;
  background: #fff7e6;
}

.primary,
.outline,
.ghost,
.danger,
.file-toolbar button,
.filters button,
.log-tabs button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-weight: 700;
}

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

.primary.subtle {
  background: var(--blue-2);
}

.primary.small {
  min-height: 30px;
  color: #111;
  background: var(--yellow);
}

.outline {
  border-color: var(--line);
  background: #fff;
}

.ghost {
  color: var(--blue);
  background: transparent;
}

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

.full {
  width: 100%;
}

.split-mini {
  display: grid;
  grid-template-columns: 135px 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.file-tree {
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--soft);
  border-right: 1px solid var(--line);
  font-size: 13px;
}

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

.file-tree .selected {
  color: var(--blue);
  background: #eaf0ff;
}

.code-view {
  min-height: 250px;
  max-height: 360px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: #963900;
  background: #fff;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.code-view.tall {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.blueprint-actions,
.file-toolbar,
.action-stack {
  flex-wrap: wrap;
}

.data-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 12px;
  margin: 0;
  font-size: 13px;
}

.data-list dt {
  color: var(--ink);
  font-weight: 800;
}

.log-tabs {
  display: flex;
  gap: 6px;
}

.log-tabs button {
  border-color: var(--line);
  background: #fff;
}

.log-tabs .active {
  color: #fff;
  border-color: var(--chrome-2);
  background: var(--chrome-2);
}

.empty-log {
  min-height: 220px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.floating-menu {
  position: fixed;
  z-index: 10;
  right: 24px;
  top: 120px;
  display: grid;
  min-width: 170px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.floating-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
}

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

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: #111517;
  box-shadow: var(--shadow);
}

dialog {
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(17, 21, 23, 0.62);
}

.modal {
  width: min(560px, calc(100vw - 28px));
  padding: 0;
}

.modal.narrow {
  width: min(460px, calc(100vw - 28px));
}

.modal form,
.gallery-modal form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.modal header,
.gallery-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal header h2,
.gallery-modal header h2 {
  font-size: 22px;
}

.modal header button,
.gallery-modal header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 22px;
}

fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

legend {
  padding: 0 5px;
  font-weight: 800;
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5e9ee;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--green);
  transition: width 0.2s ease;
}

.modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.gallery-modal {
  width: min(1180px, calc(100vw - 28px));
  max-height: min(900px, calc(100vh - 28px));
  padding: 0;
  background: #1d2327;
  color: #f6f7f7;
}

.gallery-modal .search input {
  width: min(420px, 100%);
  border-color: #49535c;
  color: #f6f7f7;
  background: #2c3338;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters button {
  color: #d4dae0;
  border-color: #46515b;
  background: #303940;
}

.filters .active {
  border-color: var(--blue);
  background: var(--blue);
}

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

.gallery-card {
  overflow: hidden;
  border: 1px solid #34414b;
  border-radius: 8px;
  background: #2c3338;
}

.gallery-card.selected {
  border-color: var(--blue);
}

.gallery-image {
  height: 170px;
  border-radius: 0;
}

.gallery-card h4,
.gallery-card p,
.gallery-card small {
  margin-left: 16px;
  margin-right: 16px;
}

.gallery-card h4 {
  margin-top: 14px;
  margin-bottom: 6px;
}

.gallery-card p {
  min-height: 46px;
  margin-bottom: 10px;
  color: #b5bec7;
}

.gallery-card small {
  display: inline-block;
  margin-bottom: 16px;
  color: #d6dce2;
}

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: 280px 1fr;
  }

  .inspector {
    grid-column: 1 / -1;
  }

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

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

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

  .topbar .brand,
  .topbar .icon-button:nth-last-child(-n+3) {
    display: none;
  }

  .top-status {
    grid-column: 1 / 3;
  }

  .workbench {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .left-rail {
    order: 2;
  }

  .browser-pane {
    order: 1;
  }

  .inspector {
    order: 3;
  }

  .wp-adminbar {
    overflow: hidden;
    white-space: nowrap;
  }

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

  .wp-content {
    min-height: 560px;
    grid-template-columns: 1fr;
    padding: 32px 20px;
  }

  .welcome-copy p {
    font-size: 17px;
  }

  .playground-symbol {
    min-width: 0;
    height: 260px;
    opacity: 0.75;
  }

  .loop {
    height: 115px;
    border-width: 28px;
  }

  .loop-one {
    top: 30px;
  }

  .loop-two {
    top: 150px;
  }

  .letter {
    top: 0;
    right: 6%;
    width: 150px;
    height: 150px;
    border-width: 10px;
    font-size: 110px;
  }

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

  .split-mini,
  .data-list,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .topbar {
    grid-template-columns: 34px 1fr auto;
  }

  .topbar .primary.small {
    grid-column: 3;
  }

  .top-status {
    grid-column: 1 / -1;
  }

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

  .site-switcher,
  .quick-actions,
  .modal footer {
    align-items: stretch;
    flex-direction: column;
  }

  .saved-state {
    margin-left: 0;
  }

  .welcome-copy h2 {
    font-size: 36px;
  }
}
