:root {
  color-scheme: light;
  --bg: #f4f4f2;
  --ink: #111;
  --muted: #676767;
  --line: #d9d9d4;
  --panel: #fff;
  --panel-2: #eeeeea;
  --black: #181818;
  --warning: #f3c74e;
  --success: #5bc878;
  --info: #79a8ff;
  --danger: #ef6b5d;
  --radius: 8px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  border-color: var(--ink);
}

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

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(340px, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding: 10px 18px;
  background: var(--black);
  color: #fff;
}

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

.brand-mark,
.site-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 800;
}

.brand span:last-child {
  display: block;
  color: #aaa;
  font-size: 12px;
}

.browser-controls {
  display: grid;
  grid-template-columns: 38px minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.browser-controls button,
.top-actions button {
  border-color: #3f3f3f;
  background: #2b2b2b;
  color: #fff;
}

.path-field span {
  color: #c9c9c9;
}

.path-field input {
  border-color: #3f3f3f;
  background: #303030;
  color: #fff;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button {
  width: 38px;
  padding: 0;
}

.small {
  min-height: 34px;
  padding: 0 12px;
}

.primary {
  border-color: #111;
  background: #111;
  color: #fff;
}

.danger {
  border-color: var(--danger);
  background: #fff5f4;
  color: #9f1f14;
}

.mode-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 244, 242, 0.96);
}

.mode-button {
  background: transparent;
}

.mode-button.active,
.filters .active,
.mobile-nav .active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

main {
  width: min(1360px, calc(100% - 36px));
  margin: 18px auto 54px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.launch-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: stretch;
}

.brief-card,
.wizard-panel,
.review-card,
.task-card,
.manager-frame,
.database-card,
.saved-list,
.gallery-grid article,
.export-grid article,
.log-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.brief-card,
.wizard-panel,
.review-card,
.task-card {
  padding: 22px;
}

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

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

h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
  margin-bottom: 0;
}

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

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

.wizard-steps {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.wizard-steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.wizard-steps li.active {
  border-color: var(--ink);
  background: var(--panel-2);
}

.wizard-steps span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}

.wizard-steps em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 26px;
  border-radius: 999px;
  color: #111;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 10px;
}

.chip.warning {
  background: var(--warning);
}

.chip.success {
  background: var(--success);
}

.chip.info {
  background: var(--info);
}

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

.source-card {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  background: #fff;
}

.source-card strong {
  font-size: 16px;
}

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

.source-card.selected {
  border: 2px solid var(--ink);
  padding: 0 13px;
  background: var(--panel-2);
}

.input-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfbfa;
}

.choice-row,
.button-group,
.compact-actions,
.file-actions,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-row {
  margin-top: 14px;
}

.featured-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.featured-strip article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.featured-strip strong,
.featured-strip small {
  display: block;
  padding: 0 10px;
}

.featured-strip strong {
  margin-top: 10px;
}

.featured-strip small {
  padding-bottom: 12px;
}

.thumb,
.preview {
  display: block;
  width: 100%;
  background:
    linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,0) 36%),
    repeating-linear-gradient(90deg, #222 0 22px, #5c5c5c 22px 44px);
}

.thumb {
  height: 76px;
}

.preview {
  height: 210px;
}

.art {
  background:
    linear-gradient(90deg, #313131 0 28%, #cfcfcf 28% 56%, #777 56%),
    linear-gradient(135deg, #8d7d52, #262626);
}

.coffee {
  background:
    linear-gradient(180deg, #2b2b2b 0 44%, #b9b9b9 44%),
    repeating-linear-gradient(90deg, #6e6e6e 0 12px, #d4d4d4 12px 24px);
}

.feed {
  background:
    linear-gradient(180deg, #f7f7f7 0 26%, #d9d9d9 26%),
    repeating-linear-gradient(180deg, transparent 0 24px, rgba(0,0,0,.16) 24px 26px);
}

.news {
  background:
    linear-gradient(180deg, #050505 0 34%, #fff 34%),
    linear-gradient(135deg, #242424, #a7a7a7);
}

.nonprofit {
  background: linear-gradient(135deg, #111, #777 48%, #dbdbdb);
}

.personal {
  background: linear-gradient(135deg, #2b2b2b, #909090 50%, #f2f2f2);
}

.live-mini {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

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

.wp-page {
  min-height: 270px;
  padding: 22px;
  background:
    radial-gradient(circle at 100% 55%, transparent 0 70px, #1d1d1d 72px 92px, transparent 94px),
    radial-gradient(circle at 92% 64%, transparent 0 120px, #36df77 122px 148px, transparent 150px),
    #fff;
}

.wp-page h3 {
  max-width: 230px;
  margin-top: 64px;
  color: #284de8;
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.14;
}

.wp-page p {
  max-width: 220px;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.summary-list div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: baseline;
}

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

.summary-list dd {
  margin: 0;
}

.danger-note {
  margin-top: 16px;
  border-left: 4px solid var(--danger);
  padding: 12px;
  background: #fff5f4;
  font-size: 13px;
}

.saved-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.saved-list {
  overflow: hidden;
}

.saved-row {
  display: grid;
  grid-template-columns: 40px minmax(160px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.saved-row:last-child {
  border-bottom: 0;
}

.saved-row.active {
  background: var(--panel-2);
}

.saved-row small {
  display: block;
}

.manager-frame {
  overflow: hidden;
}

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

.tool-tab {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.tool-tab.active {
  background: var(--ink);
  color: #fff;
}

.tool-panel {
  display: none;
  padding: 20px;
}

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

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

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

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

.manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.file-workspace {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 420px;
  border: 1px solid var(--line);
}

.file-tree {
  border-right: 1px solid var(--line);
  background: #fbfbfa;
}

.file-actions {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

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

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

.file-tree .selected {
  background: var(--ink);
  color: #fff;
}

.code-view {
  overflow: auto;
  margin: 0;
  padding: 20px;
  background: #fff;
  color: #8c2200;
  font: 14px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.database-card {
  padding: 22px;
}

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

.log-grid article,
.export-grid article {
  padding: 18px;
}

.search-field {
  width: min(420px, 100%);
}

.filters {
  margin-bottom: 16px;
}

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

.gallery-grid article {
  overflow: hidden;
}

.gallery-grid h3,
.gallery-grid p,
.gallery-grid small {
  display: block;
  padding: 0 16px;
}

.gallery-grid h3 {
  margin-top: 14px;
}

.gallery-grid small {
  padding-bottom: 18px;
}

.transfer-grid label {
  display: block;
  margin: 12px 0;
}

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

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

.mobile-nav {
  display: none;
}

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

  .brand {
    min-width: 0;
  }

  .launch-grid,
  .saved-layout {
    grid-template-columns: 1fr;
  }

  .review-card {
    order: 2;
  }

  .source-board,
  .gallery-grid,
  .transfer-grid,
  .log-grid,
  .export-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  body {
    padding-bottom: 66px;
  }

  .topbar {
    position: static;
    padding: 12px;
  }

  .browser-controls {
    grid-template-columns: 38px 1fr;
  }

  .browser-controls button:not(.icon-button) {
    display: none;
  }

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

  .mode-nav {
    display: none;
  }

  main {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .brief-card,
  .wizard-panel,
  .review-card,
  .task-card,
  .tool-panel {
    padding: 16px;
  }

  .panel-heading,
  .section-head {
    display: grid;
  }

  .source-board,
  .featured-strip,
  .gallery-grid,
  .transfer-grid,
  .log-grid,
  .export-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .input-strip,
  .file-workspace {
    grid-template-columns: 1fr;
  }

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

  .saved-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

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

  .summary-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
  }

  .mobile-nav button {
    min-height: 44px;
    padding: 0 4px;
    font-size: 12px;
  }
}
