:root {
  color-scheme: light;
  --ink: #211d18;
  --muted: #6f675d;
  --subtle: #91887b;
  --paper: #f7f1e6;
  --paper-2: #eee2cf;
  --panel: #fffaf2;
  --line: #dacbb6;
  --line-strong: #ad9b85;
  --chrome: #2b2722;
  --chrome-2: #373129;
  --chrome-3: #4a4036;
  --blue: #2457d6;
  --blue-dark: #183e9b;
  --ochre: #c98517;
  --rust: #a34d25;
  --green: #2e7a50;
  --danger: #b33434;
  --shadow: 0 18px 50px rgba(58, 46, 31, 0.22);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(173, 155, 133, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, rgba(173, 155, 133, 0.14) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 48px 56px minmax(0, 1fr);
}

.tab-chrome,
.address-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fffaf2;
  background: var(--chrome);
  border-bottom: 1px solid #4d443b;
}

.tab-chrome {
  padding: 8px 12px 0;
}

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

.brand-lockup small,
.browser-tab small,
.save-state small,
.source-row small,
.site-row small,
.gallery-card small,
.transfer-grid small {
  color: var(--subtle);
}

.brand-mark,
.wp-badge,
.wp-mini {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: 2px solid #e7c98b;
  color: #e7c98b;
}

.tab-strip {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 4px;
  align-self: end;
  overflow-x: auto;
}

.browser-tab,
.new-tab {
  height: 40px;
  border: 1px solid #564c41;
  border-bottom: 0;
  color: #eae2d6;
  background: var(--chrome-2);
  border-radius: 8px 8px 0 0;
}

.browser-tab {
  min-width: 190px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  text-align: left;
}

.browser-tab.active {
  color: var(--ink);
  background: var(--paper);
}

.new-tab,
.chrome-icon,
.icon-button {
  display: inline-grid;
  place-items: center;
}

.new-tab {
  width: 42px;
  color: #f2d28d;
  font-size: 21px;
  font-weight: 800;
}

.chrome-icon {
  width: 34px;
  height: 34px;
  border: 1px solid #594f45;
  border-radius: 6px;
  color: #d7c6ae;
  background: transparent;
}

.tab-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--ochre);
  box-shadow: 0 0 0 3px rgba(201, 133, 23, 0.18);
}

.tab-dot.saved {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 122, 80, 0.18);
}

.tab-dot.neutral {
  background: #88919a;
  box-shadow: 0 0 0 3px rgba(136, 145, 154, 0.15);
}

.address-chrome {
  padding: 8px 12px;
}

.icon-button,
.route-button,
.chrome-nav button,
.viewport-bar button,
.head-actions button,
.tool-tabs button,
.tool-row button,
.inline-runner button,
.site-row button,
.row-actions button {
  min-height: 34px;
  border: 1px solid #5a5045;
  border-radius: 6px;
  color: #f8efe1;
  background: var(--chrome-2);
}

.icon-button {
  width: 36px;
  padding: 0;
  font-weight: 900;
  color: #f3cf7b;
}

.address-field {
  flex: 1;
  min-width: 180px;
  height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #62574a;
  border-radius: 8px;
  background: #fff7ea;
  color: var(--ink);
}

.address-field span {
  padding: 0 10px 0 12px;
  color: var(--rust);
  font-weight: 800;
  font-size: 12px;
  border-right: 1px solid var(--line);
}

.address-field input {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  padding: 0 12px;
}

.route-button,
.chrome-nav button {
  padding: 0 11px;
}

.save-state {
  min-width: 190px;
  height: 38px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #6c604e;
  border-radius: 8px;
  background: var(--chrome-3);
}

.save-state .tab-dot {
  grid-row: 1 / span 2;
}

.save-state strong {
  font-size: 13px;
}

.save-state small {
  font-size: 11px;
}

.save-button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: #211d18;
  background: #f0c85d;
  font-weight: 800;
}

.chrome-nav {
  display: flex;
  gap: 6px;
}

.chrome-nav button.active,
.tool-tabs button.active,
.filter-pills button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 320px minmax(380px, 1fr) 430px;
  gap: 12px;
  padding: 12px;
}

.bookmark-shelf,
.site-tools,
.browser-viewport {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.95);
  box-shadow: var(--shadow);
}

.bookmark-shelf,
.site-tools {
  overflow: hidden;
}

.left-panel,
.tool-panel {
  display: none;
}

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

.left-panel {
  padding: 18px;
}

.panel-title {
  margin-bottom: 16px;
}

.panel-title p,
.tools-head p {
  margin: 0 0 5px;
  color: var(--rust);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-title h1,
.tools-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.16;
}

.start-stack,
.site-list,
.gallery-list,
.transfer-grid {
  display: grid;
  gap: 10px;
}

.source-row {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 12px;
  padding: 11px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fffaf2;
}

.source-row span {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--rust);
  font-weight: 900;
  font-size: 13px;
}

.source-row.primary {
  border-color: #d0a544;
  background: #fff5d8;
}

.inline-runner,
.url-runner,
.save-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
}

.inline-runner label,
.url-runner label,
.save-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.inline-runner div,
.url-runner div {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.inline-runner input,
.url-runner input,
.save-card input,
.search-field input,
.settings-grid select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: white;
}

.inline-runner input,
.url-runner input,
.save-card input {
  flex: 1;
  padding: 9px 10px;
}

.inline-runner button,
.url-runner button {
  color: white;
  border-color: var(--blue);
  background: var(--blue);
  padding: 0 12px;
}

.inline-runner p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.site-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
}

.site-row.current {
  border-color: var(--ochre);
  background: #fff5d8;
}

.wp-badge {
  width: 36px;
  height: 36px;
  color: white;
  background: var(--ochre);
}

.wp-badge.saved {
  background: var(--green);
}

.site-row button,
.row-actions button {
  color: var(--ink);
  border-color: var(--line);
  background: white;
  padding: 0 10px;
}

.row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.row-actions .danger {
  color: white;
  border-color: var(--danger);
  background: var(--danger);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.filter-pills button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--ink);
  background: white;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-field input {
  width: 100%;
  padding: 9px 10px;
}

.gallery-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

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

.thumb {
  grid-row: 1 / span 2;
  height: 48px;
  border-radius: 6px;
  background: var(--paper-2);
}

.thumb.art {
  background: linear-gradient(135deg, #3d7a74, #e8b267 48%, #653f2f);
}

.thumb.coffee {
  background: linear-gradient(135deg, #612c72, #d08a52 52%, #51341f);
}

.thumb.feed {
  background: linear-gradient(135deg, #ffffff, #dce6ff 50%, #4668d9);
}

.thumb.game {
  background: linear-gradient(135deg, #111, #c84d2d 52%, #f2cf65);
}

.thumb.nonprofit {
  background: linear-gradient(135deg, #6f311c, #d99d6c 52%, #2f4029);
}

.transfer-grid button {
  min-height: 72px;
  display: grid;
  gap: 5px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: white;
  padding: 13px;
}

.browser-viewport {
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  overflow: hidden;
}

.viewport-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #fff7ea;
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-weight: 900;
}

.status-pill.amber {
  color: #5a3c00;
  background: #f5d77e;
}

.spacer {
  flex: 1;
}

.viewport-bar button {
  color: var(--ink);
  border-color: var(--line);
  background: white;
  padding: 0 10px;
}

.wp-frame {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 32px 62px 1fr;
  background: white;
}

.wp-admin-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px;
  color: #e8e8e8;
  background: #1d2327;
  font-size: 13px;
}

.wp-mini {
  width: 20px;
  height: 20px;
  color: #1d2327;
  background: #dcdcde;
}

.wp-site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 34px;
  border-bottom: 1px solid #eee;
}

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

.wp-site-nav a {
  color: #2c2722;
  text-decoration: none;
}

.wp-page {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(270px, 0.95fr) minmax(230px, 1.05fr);
  gap: 20px;
  align-items: center;
  padding: 40px 36px;
}

.wp-copy {
  max-width: 460px;
  z-index: 1;
}

.wp-copy h2 {
  margin: 0 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.15;
  font-weight: 400;
}

.wp-copy h2 span {
  color: #3858e9;
}

.wp-copy p {
  margin: 0 0 18px;
  font-size: 19px;
  line-height: 1.45;
}

.wp-copy mark {
  background: #f8e39a;
}

.wp-copy button {
  border: 0;
  border-radius: 4px;
  padding: 14px 22px;
  color: white;
  background: #3858e9;
  font-weight: 800;
}

.wp-art {
  position: relative;
  min-height: 360px;
}

.ring {
  position: absolute;
  border: 36px solid #31e56f;
  border-radius: 50%;
}

.ring.one {
  width: min(480px, 56vw);
  height: 240px;
  right: -150px;
  top: 92px;
}

.ring.two {
  width: min(390px, 46vw);
  height: 210px;
  right: -85px;
  bottom: 20px;
}

.letter {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 210px;
  height: 210px;
  display: grid;
  place-items: center;
  border: 16px solid #1d1d1d;
  border-radius: 50%;
  color: #1d1d1d;
  background: rgba(255, 255, 255, 0.4);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 152px;
  font-weight: 900;
}

.site-tools {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.tools-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.head-actions {
  display: flex;
  gap: 7px;
}

.head-actions button {
  color: var(--ink);
  border-color: var(--line);
  background: white;
  padding: 0 10px;
}

.tool-tabs {
  display: flex;
  gap: 6px;
  padding: 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tool-tabs button {
  color: var(--ink);
  border-color: var(--line);
  background: white;
  padding: 0 10px;
}

.tool-panel {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.notice {
  padding: 12px;
  border-left: 4px solid var(--blue);
  border-radius: 4px;
  color: #443b32;
  background: #edf2ff;
  line-height: 1.45;
}

.notice.compact {
  font-size: 13px;
}

.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.tool-row button {
  color: var(--ink);
  border-color: var(--line);
  background: white;
  padding: 0 10px;
}

.tool-row .run,
.url-runner button {
  color: white;
  border-color: var(--blue);
  background: var(--blue);
}

.mini-workbench {
  display: grid;
  grid-template-columns: 150px 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}

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

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

.file-tree .selected {
  color: var(--ink);
  background: #eadcc8;
  font-weight: 800;
}

.file-tree .root {
  color: var(--rust);
  font-weight: 900;
}

.code-view {
  min-height: 260px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  color: #44200e;
  background: #fffdf8;
  font: 12px/1.55 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

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

.settings-grid select {
  min-height: 38px;
  padding: 0 10px;
}

.settings-grid .check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

.database-list {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  margin: 14px 0;
}

.database-list dt {
  color: var(--muted);
  font-weight: 800;
}

.database-list dd {
  margin: 0;
}

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

.log-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.log-grid span {
  color: var(--green);
}

.radio-stack {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.save-progress {
  margin-top: 14px;
  display: grid;
  gap: 7px;
}

.save-progress span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.save-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ochre), var(--green));
}

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

  .site-tools {
    grid-column: 1 / -1;
    min-height: 520px;
  }

  .route-button {
    display: none;
  }
}

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

  .tab-chrome,
  .address-chrome {
    flex-wrap: wrap;
  }

  .brand-lockup,
  .save-state {
    min-width: 0;
  }

  .tab-strip,
  .address-field {
    flex-basis: 100%;
    order: 2;
  }

  .chrome-nav {
    flex-wrap: wrap;
  }

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

  .bookmark-shelf,
  .browser-viewport,
  .site-tools {
    min-height: auto;
  }

  .wp-frame {
    grid-template-rows: auto auto minmax(560px, auto);
  }

  .wp-admin-bar,
  .wp-site-nav {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 12px;
  }

  .wp-page {
    grid-template-columns: 1fr;
    padding: 28px 20px;
  }

  .wp-art {
    min-height: 260px;
  }

  .mini-workbench {
    grid-template-columns: 1fr;
  }

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

  .database-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .browser-tab {
    min-width: 165px;
  }

  .inline-runner div,
  .url-runner div,
  .tools-head,
  .viewport-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .site-row,
  .gallery-card {
    grid-template-columns: 1fr;
  }

  .thumb {
    width: 100%;
  }

  .wp-copy h2 {
    font-size: 34px;
  }

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