:root {
  color-scheme: dark;
  --ink: #171b1f;
  --panel: #20262c;
  --panel-2: #252c33;
  --panel-3: #2d343c;
  --line: #3a434d;
  --line-soft: rgba(255, 255, 255, 0.1);
  --text: #f3f0ea;
  --muted: #aeb6bf;
  --quiet: #7f8993;
  --accent: #e8b65b;
  --accent-2: #4fb5a7;
  --blue: #4f70f6;
  --danger: #ef786d;
  --paper: #faf8f2;
  --paper-line: #e2ded5;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(232, 182, 91, 0.06), transparent 280px),
    radial-gradient(circle at top left, rgba(79, 181, 167, 0.08), transparent 340px),
    var(--ink);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  border-color: rgba(232, 182, 91, 0.72);
  outline: none;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15191d;
  color: var(--text);
  min-height: 38px;
  padding: 8px 10px;
}

input:disabled,
select:disabled {
  color: var(--quiet);
  background: rgba(255, 255, 255, 0.04);
}

code,
pre,
kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(340px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(23, 27, 31, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.brand-orbit {
  width: 34px;
  height: 34px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: relative;
}

.brand-orbit::before,
.brand-orbit::after {
  content: "";
  position: absolute;
  border: 2px solid var(--blue);
  border-radius: 50%;
  inset: 5px -2px;
  transform: rotate(38deg);
}

.brand-orbit::after {
  border-color: var(--accent-2);
  inset: 10px 3px;
  transform: rotate(-28deg);
}

.pathbar {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.pathbar label {
  position: relative;
  min-width: 0;
}

.pathbar label span {
  position: absolute;
  left: 12px;
  top: -7px;
  padding: 0 5px;
  background: var(--ink);
  color: var(--quiet);
  font-size: 11px;
}

.pathbar input {
  height: 38px;
}

.refresh,
.icon-grid {
  width: 38px;
  padding: 0;
  font-size: 18px;
}

.status-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.save-action,
.primary,
.form-stack > button,
.toolstrip .accent {
  background: var(--accent);
  border-color: #f3cf87;
  color: #21190c;
  font-weight: 700;
}

.form-stack > .secondary-action {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.ghost {
  background: transparent;
}

.compact {
  padding-inline: 10px;
}

.launcher-layout {
  display: grid;
  grid-template-columns: minmax(410px, 0.88fr) minmax(330px, 0.64fr) minmax(360px, 0.78fr);
  gap: 14px;
  padding: 14px;
  min-height: calc(100vh - 59px);
}

.command-surface,
.detail-pane,
.manager-dock {
  min-width: 0;
}

.command-surface {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
}

.command-card,
.result-pane,
.detail-card,
.active-preview,
.manager-dock {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)), var(--panel);
  box-shadow: var(--shadow);
}

.command-card {
  padding: 18px;
}

.command-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.command-heading p,
.result-header p,
.dock-header p,
.eyebrow,
.modal header p {
  margin: 0 0 4px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.command-heading h1,
.result-header h2,
.dock-header h2,
.detail-content h2,
.modal h2 {
  margin: 0;
  line-height: 1.08;
}

.command-heading h1 {
  font-size: clamp(30px, 4vw, 52px);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.command-input {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid rgba(232, 182, 91, 0.48);
  border-radius: 10px;
  background: #111518;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.command-input input {
  border: 0;
  background: transparent;
  min-height: 52px;
  font-size: 19px;
}

.search-icon {
  text-align: center;
  color: var(--accent);
  font-size: 19px;
}

kbd {
  margin-right: 9px;
  min-width: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 7px;
  color: var(--muted);
  background: var(--panel-2);
  text-align: center;
  font-size: 12px;
}

.query-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.query-chips button {
  min-height: 30px;
  padding-inline: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.query-chips button:first-child {
  color: #251a09;
  background: var(--accent);
  border-color: var(--accent);
}

.search-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.search-meta span {
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
}

.search-meta strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.result-tabs,
.dock-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.result-tabs button,
.dock-tabs button {
  min-height: 34px;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.result-tabs .is-active,
.dock-tabs .is-active,
.filter-row .is-active {
  background: var(--blue);
  border-color: #8aa0ff;
  color: #fff;
}

.result-pane {
  min-height: 0;
  overflow: hidden;
}

.result-view {
  display: none;
  height: 100%;
  min-height: 560px;
  overflow: auto;
  padding: 16px;
}

.result-view.is-active {
  display: block;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.result-header h2 {
  font-size: 22px;
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  min-height: auto;
}

.command-results,
.saved-table,
.manager-jump-grid,
.portable-grid {
  display: grid;
  gap: 8px;
}

.command-row,
.saved-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.command-row.is-selected,
.saved-row.selected {
  border-color: rgba(232, 182, 91, 0.78);
  background: rgba(232, 182, 91, 0.1);
}

.command-row strong,
.saved-row strong {
  display: block;
  margin-bottom: 3px;
}

.command-row small,
.saved-row small,
.manager-jump-grid span,
.portable-grid span {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.command-row code {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--accent-2);
  font-size: 12px;
}

.row-icon,
.wp-badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #111518;
  color: var(--accent);
  font-weight: 800;
}

.row-icon::before {
  content: ">";
}

.row-icon.branch::before {
  content: "PR";
}

.row-icon.fork::before {
  content: "GB";
}

.row-icon.github::before {
  content: "GH";
}

.row-icon.wp::before,
.wp-badge {
  content: "W";
  font-family: Georgia, serif;
}

.row-icon.link::before {
  content: "@";
}

.row-icon.upload::before {
  content: "^";
}

.wp-badge.saved {
  background: rgba(79, 112, 246, 0.2);
  color: #aebcff;
}

.wp-badge.lab {
  background: rgba(79, 181, 167, 0.18);
  color: #8de0d4;
}

.row-buttons {
  display: flex;
  gap: 7px;
}

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

.manager-jump-grid button,
.portable-grid button {
  height: auto;
  min-height: 92px;
  text-align: left;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.manager-jump-grid strong,
.portable-grid strong {
  display: block;
  margin-bottom: 7px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.filter-row button {
  min-height: 30px;
  border-radius: 999px;
  color: var(--muted);
}

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

.blueprint-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.blueprint-card span {
  display: block;
  height: 96px;
  background: linear-gradient(135deg, #6e5520, #18382f 52%, #d9b16f);
}

.blueprint-card.coffee span {
  background: linear-gradient(135deg, #4f2268, #d9813c 58%, #f6c777);
}

.blueprint-card.feed span {
  background: linear-gradient(135deg, #f8f8ff, #dfe8ff 50%, #7990ec);
}

.blueprint-card.gaming span {
  background: linear-gradient(135deg, #050505, #f8f8f8 48%, #d85b25);
}

.blueprint-card.nonprofit span {
  background: linear-gradient(135deg, #311a0c, #8a5725 45%, #f06f67);
}

.blueprint-card.blog span {
  background: linear-gradient(135deg, #620f38, #a55b84);
}

.blueprint-card strong,
.blueprint-card small {
  display: block;
  padding-inline: 12px;
}

.blueprint-card strong {
  padding-top: 10px;
}

.blueprint-card small {
  padding-bottom: 12px;
  color: var(--muted);
}

.detail-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.detail-card {
  padding: 16px;
}

.detail-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.detail-topline button {
  margin-left: auto;
  min-height: 30px;
  background: rgba(79, 181, 167, 0.16);
  border-color: rgba(79, 181, 167, 0.38);
  color: #b7eee7;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.detail-content p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}

.inline-field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.inline-field span {
  color: var(--muted);
  font-size: 12px;
}

.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.active-preview {
  overflow: hidden;
  min-height: 0;
}

.preview-chrome {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #15191d;
}

.preview-chrome span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
}

.preview-chrome strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 13px;
}

.preview-chrome button {
  min-height: 28px;
}

.wp-frame {
  height: 100%;
  min-height: 430px;
  background: var(--paper);
  color: #171717;
  overflow: hidden;
}

.wp-adminbar {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  background: #1f252b;
  color: #f2f2f2;
  font-size: 11px;
}

.wp-adminbar strong {
  margin-left: auto;
}

.wp-sitehead {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 28px;
  font-size: 14px;
}

.wp-sitehead nav {
  display: flex;
  gap: 20px;
  color: #333;
}

.wp-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 20px;
  padding: 46px 24px 32px;
}

.wp-page h3 {
  margin: 0 0 12px;
  font-family: Georgia, serif;
  font-size: 33px;
  line-height: 1.22;
}

.wp-page h3 span {
  color: #3f5bef;
}

.wp-page p {
  line-height: 1.5;
}

.wp-page mark {
  background: #f5df85;
}

.wp-page button {
  margin-top: 18px;
  background: #4059ee;
  border-color: #4059ee;
  color: #fff;
}

.wp-graphic {
  display: grid;
  place-items: center;
  width: 220px;
  height: 220px;
  border: 32px solid #30e777;
  border-radius: 50%;
  color: #191919;
  font-family: Georgia, serif;
  font-size: 130px;
  font-weight: 800;
  transform: translateX(40px);
}

.manager-dock {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

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

.dock-header h2 {
  font-size: 18px;
}

.dock-header button {
  min-height: 32px;
}

.dock-tabs {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.dock-panel {
  display: none;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.dock-panel.is-active {
  display: block;
}

.notice {
  border-left: 3px solid var(--accent);
  padding: 11px 12px;
  margin-bottom: 14px;
  background: rgba(232, 182, 91, 0.1);
  color: #f3dca8;
  line-height: 1.45;
  font-size: 13px;
}

.form-stack {
  display: grid;
  gap: 10px;
}

.form-stack label:not(.check) {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.check {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent-2);
}

.toolstrip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.toolstrip button {
  min-height: 32px;
}

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

.tree {
  list-style: none;
  margin: 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.035);
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

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

.tree .selected {
  color: var(--text);
  background: rgba(79, 112, 246, 0.24);
}

.tree .open {
  color: var(--accent);
}

.file-workspace pre,
.log-stream pre {
  margin: 0;
  overflow: auto;
  padding: 12px;
  background: #101419;
  color: #d7e1ec;
  line-height: 1.6;
  font-size: 12px;
}

.database-card {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(79, 181, 167, 0.32);
  background: rgba(79, 181, 167, 0.1);
}

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

.database-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.database-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
}

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

.database-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.log-stream {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.log-stream header {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.log-stream span {
  color: var(--accent-2);
}

.log-tabs {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.modal {
  width: min(560px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

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

.modal::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.modal form {
  padding: 18px;
}

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

.modal header button {
  width: 34px;
  padding: 0;
  font-size: 22px;
  background: transparent;
}

.modal-copy {
  color: var(--muted);
  line-height: 1.5;
}

.storage-options {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.storage-options label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.storage-options input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
}

.storage-options strong,
.storage-options small {
  grid-column: 2;
}

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

.progress-preview span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
}

.progress-preview div {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #111518;
}

.progress-preview i {
  display: block;
  width: 81%;
  height: 100%;
  background: var(--blue);
}

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

.dialog-table {
  max-height: 420px;
  overflow: auto;
}

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

.action-list button {
  height: 72px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #111518;
  color: var(--text);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1260px) {
  .launcher-layout {
    grid-template-columns: minmax(400px, 1fr) minmax(340px, 0.85fr);
  }

  .manager-dock {
    grid-column: 1 / -1;
    min-height: 520px;
  }

  .result-view {
    min-height: 500px;
  }
}

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

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

  .pathbar button:not(.refresh) {
    display: none;
  }

  .status-actions {
    justify-content: start;
    overflow-x: auto;
  }

  .launcher-layout {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .command-heading {
    display: block;
  }

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

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

  .command-row code,
  .row-buttons,
  .saved-row > button {
    grid-column: 2;
    justify-self: start;
  }

  .manager-jump-grid,
  .portable-grid,
  .blueprint-grid,
  .action-list {
    grid-template-columns: 1fr;
  }

  .wp-sitehead,
  .wp-sitehead nav {
    display: block;
  }

  .wp-sitehead nav span {
    display: block;
    margin-top: 8px;
  }

  .wp-page {
    grid-template-columns: 1fr;
    padding-top: 26px;
  }

  .wp-graphic {
    width: 150px;
    height: 150px;
    border-width: 22px;
    font-size: 86px;
    transform: none;
    justify-self: end;
  }

  .form-stack label:not(.check),
  .database-list div,
  .file-workspace {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .command-input {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .command-input kbd {
    display: none;
  }

  .command-heading h1 {
    font-size: 34px;
  }

  .result-header {
    display: block;
  }

  .text-link {
    margin-top: 8px;
  }

  .search-meta {
    grid-template-columns: 1fr;
  }

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