:root {
  color-scheme: dark;
  --ink: #111827;
  --muted: #667085;
  --line: #d7dee8;
  --paper: #f8fafc;
  --card: #ffffff;
  --shell: #151b22;
  --shell-2: #1e262f;
  --shell-3: #27313b;
  --blue: #315cf6;
  --cyan: #0d8bb8;
  --green: #1b8f5a;
  --amber: #d49200;
  --red: #c73d4a;
  --violet: #7254d8;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--shell);
  color: #eef4fb;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid transparent;
  border-radius: 7px;
  background: #eef3f8;
  color: #16202b;
  min-height: 34px;
  padding: 0 12px;
  cursor: pointer;
}

button:hover,
.task-card:hover {
  border-color: var(--blue);
}

button:disabled {
  cursor: progress;
  color: #748094;
}

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

.topbar {
  min-height: 72px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #1a2129;
  border-bottom: 1px solid #2b3641;
}

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

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid #6aa8ff;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 800;
  background: #24334a;
}

.brand h1,
.brand p,
.panel-header h2,
.panel-header p,
.board-header h2,
.board-header p,
.lane-title h3,
.lane-title span {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.2;
}

.brand p {
  margin-top: 3px;
  color: #aeb9c6;
  font-size: 13px;
}

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

.ghost-button {
  background: #242d37;
  color: #e5eef7;
  border-color: #3a4653;
}

.primary-button {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

.danger {
  background: #fff0f1;
  color: #a32331;
  border-color: #ffc9cf;
}

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.75fr);
  gap: 0;
}

.board-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1c242d 0%, #13191f 100%);
  border-right: 1px solid #2b3641;
}

.runtime-bar {
  display: grid;
  grid-template-columns: auto minmax(170px, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #2b3641;
  background: #202832;
}

.icon-button {
  width: 34px;
  padding: 0;
  font-weight: 800;
}

.path-box {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #42505e;
  border-radius: 8px;
  background: #101820;
  color: #aeb9c6;
}

.path-box span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  min-height: 36px;
  padding: 7px 9px;
}

.path-box input {
  border: 0;
  color: #eef4fb;
  min-height: 30px;
  padding: 0;
  background: transparent;
}

.runtime-status {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffd772;
  font-weight: 700;
  font-size: 13px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.amber {
  background: var(--amber);
}

.board-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 18px 18px 12px;
}

.eyebrow {
  color: #7e8da0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.board-header h2 {
  margin-top: 5px;
  font-size: 22px;
  line-height: 1.2;
}

.board-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.board-metrics span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #374554;
  border-radius: 999px;
  color: #c7d2df;
  background: #202a34;
  font-size: 12px;
}

.board-metrics strong {
  color: #ffffff;
}

.lane-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 18px 14px;
}

.lane-nav a {
  color: #d7e2ec;
  text-decoration: none;
  border: 1px solid #384654;
  background: #222c36;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.kanban-board {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(242px, 268px);
  align-items: start;
  gap: 14px;
  overflow: auto;
  padding: 0 18px 22px;
  scroll-snap-type: x proximity;
}

.lane {
  scroll-snap-align: start;
  min-height: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #303c48;
}

.wide-lane {
  grid-row: span 1;
}

.lane-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.lane-title h3 {
  font-size: 16px;
}

.lane-title span {
  color: #9dacba;
  font-size: 12px;
}

.task-card {
  width: 100%;
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  gap: 7px;
  margin-bottom: 10px;
  padding: 13px;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.task-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 92, 246, 0.2), 0 14px 28px rgba(0, 0, 0, 0.18);
}

.task-kicker {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.task-card strong {
  font-size: 15px;
  line-height: 1.25;
}

.task-card span:last-child {
  color: var(--muted);
  line-height: 1.35;
  font-size: 13px;
}

.meter,
.big-meter {
  display: block;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #dce3ec;
}

.meter span,
.big-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.side-stack {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(280px, 0.92fr) minmax(320px, 1.08fr);
  gap: 12px;
  padding: 12px;
  background: #10161c;
}

.preview-panel,
.editor-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

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

.panel-header h2 {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.25;
}

.pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.pill.green {
  background: #e7f7ef;
  color: #087247;
}

.pill.blue {
  background: #e8edff;
  color: #2545bd;
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #202832;
  color: #d7e2ec;
}

.round {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6a7685;
}

.address {
  flex: 1;
  min-width: 0;
  margin-left: 5px;
  border-radius: 7px;
  background: #374250;
  padding: 5px 9px;
  font-size: 12px;
  color: #e8eef5;
}

.wp-preview {
  height: calc(100% - 104px);
  min-height: 210px;
  overflow: auto;
  background: #ffffff;
}

.wp-adminbar {
  display: flex;
  gap: 14px;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  background: #1d2327;
  color: #f0f3f5;
  font-size: 11px;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 18px 22px;
  color: #1e1e1e;
  font-size: 13px;
}

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

.site-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 16px;
  align-items: center;
  min-height: 210px;
  padding: 22px;
}

.site-hero h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.18;
  font-weight: 400;
}

.site-hero h3 span {
  color: #315cf6;
}

.site-hero p {
  color: #111827;
  line-height: 1.45;
}

.site-hero button {
  background: #315cf6;
  color: #ffffff;
}

.wp-symbol {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 10px solid #1edb73;
  color: #1d1d1d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 92px;
  font-weight: 700;
}

.editor-panel {
  overflow: auto;
}

.panel-content {
  display: none;
  padding: 16px;
}

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

.panel-content p {
  margin: 0 0 14px;
  color: #354052;
  line-height: 1.45;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

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

legend {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.check-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  margin: 7px 0;
  font-weight: 500;
}

.check-row input {
  width: auto;
  min-height: auto;
}

.button-row,
.filter-row,
.toolbar,
.log-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.full {
  width: 100%;
}

.note {
  margin-top: 12px;
  border-left: 4px solid var(--amber);
  background: #fff8e6;
  color: #5e4300;
  padding: 10px 12px;
  border-radius: 6px;
  line-height: 1.4;
  font-size: 13px;
}

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

.filter-row {
  margin-bottom: 12px;
}

.filter-row button,
.log-tabs button {
  min-height: 30px;
  background: #eef3f8;
}

.filter-row .selected,
.log-tabs .selected {
  background: var(--blue);
  color: #ffffff;
}

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

.blueprint-list span {
  display: block;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #dce3ec;
  border-radius: 7px;
  background: #ffffff;
  color: #344054;
  font-weight: 700;
  font-size: 12px;
}

.big-meter {
  height: 14px;
  margin: 18px 0;
}

.toolbar {
  margin-bottom: 12px;
}

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

.file-tree {
  list-style: none;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-size: 12px;
  line-height: 1.85;
}

pre {
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6f9;
  color: #9a3412;
  padding: 12px;
  font-size: 12px;
  line-height: 1.55;
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0 0 14px;
  color: #344054;
}

.facts dt {
  font-weight: 800;
}

.facts dd {
  margin: 0;
  min-width: 0;
  word-break: break-word;
}

.logs {
  margin-top: 12px;
  background: #111827;
  color: #b6f2c8;
  border-color: #263344;
}

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

  .board-area {
    min-height: 58vh;
    border-right: 0;
    border-bottom: 1px solid #2b3641;
  }

  .side-stack {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(420px, auto);
  }
}

@media (max-width: 760px) {
  .topbar,
  .board-header {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: stretch;
  }

  .top-actions button {
    flex: 1 1 150px;
  }

  .runtime-bar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .runtime-bar button:not(.icon-button),
  .runtime-status {
    grid-column: span 2;
  }

  .kanban-board {
    grid-auto-columns: minmax(250px, 84vw);
  }

  .side-stack {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .site-hero {
    grid-template-columns: 1fr;
  }

  .wp-symbol {
    width: 112px;
    height: 112px;
    font-size: 68px;
  }

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