:root {
  --ink: #111315;
  --ink-2: #22272b;
  --ink-3: #3a4147;
  --muted: #687078;
  --line: #d9dee3;
  --line-dark: #343b42;
  --panel: #ffffff;
  --soft: #f3f5f7;
  --soft-2: #e8ecef;
  --black: #0c0e10;
  --blue: #3157ff;
  --green: #087f4f;
  --yellow: #9b6a00;
  --red: #a32727;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #181b1e;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 12px;
  cursor: pointer;
}

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

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

.danger {
  color: var(--red);
  border-color: #efc8c8;
}

.full {
  width: 100%;
}

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

.browser-top {
  background: #111417;
  color: #fff;
  border-bottom: 1px solid #2c3339;
  padding: 8px 10px 10px;
}

.tab-strip,
.chrome-row,
.chrome-actions,
.status-cluster,
.webview-toolbar,
.webview-actions,
.drawer-head,
.stack-head,
.panel-title-row,
.row-actions,
.filter-row,
.toolbar,
.button-grid,
.result-strip,
.split-warning,
.progress-row {
  display: flex;
  align-items: center;
}

.tab-strip {
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 7px;
}

.tab,
.new-tab {
  background: #242a30;
  border-color: #3a424a;
  color: #fff;
}

.tab {
  min-width: 236px;
  max-width: 290px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 10px;
  text-align: left;
}

.tab.active {
  background: #f8f9fa;
  color: var(--ink);
  border-color: #f8f9fa;
}

.tab-copy {
  min-width: 0;
}

.tab-copy strong,
.tab-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.new-tab {
  width: 40px;
  min-width: 40px;
  height: 40px;
  font-size: 22px;
}

.favicon {
  width: 28px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-family: Georgia, serif;
}

.favicon.muted {
  opacity: .66;
}

.tab-status,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.tab-status.saved,
.chip.green {
  color: var(--green);
  background: #dcf5e8;
}

.tab-status.warn,
.chip.yellow {
  color: var(--yellow);
  background: #fff1c8;
}

.chip.blue {
  color: #173ed4;
  background: #e0e7ff;
}

.chip.black {
  color: #fff;
  background: var(--ink);
}

.chrome-row {
  gap: 8px;
}

.icon-button {
  height: 36px;
  width: 36px;
  padding: 0;
  border-color: #3a424a;
  background: #1f252a;
  color: #fff;
}

.address-field {
  flex: 1 1 360px;
  min-width: 160px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid #3a424a;
  border-radius: 7px;
  background: #262d34;
  color: #aeb7c0;
}

.address-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.chrome-actions {
  gap: 6px;
}

.chrome-actions button {
  border-color: #3a424a;
  background: #1f252a;
  color: #fff;
}

.browser-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(330px, 400px) minmax(430px, 1fr) minmax(300px, 340px);
  gap: 1px;
  background: #2a3035;
}

.drawer,
.inspector,
.webview {
  min-height: 0;
  overflow: auto;
}

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

.drawer {
  padding: 18px;
}

.drawer-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.eyebrow,
.mini-label {
  margin: 0 0 5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

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

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

h2 {
  margin-bottom: 12px;
  font-size: 19px;
}

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

p,
small,
dd,
dt,
li,
label,
select,
input {
  font-size: 14px;
}

.route-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.route-card {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  padding: 12px;
  background: var(--soft);
}

.route-card.selected {
  border-color: var(--ink);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ink);
}

.route-type {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}

.route-card strong,
.route-card small {
  display: block;
}

.route-card small {
  color: var(--muted);
  line-height: 1.35;
}

.route-detail,
.flow-proof,
.stack-card,
.option-card,
.db-card,
.destructive-note,
.consequence {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.route-detail {
  margin-top: 14px;
  padding: 14px;
}

.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-direction: row-reverse;
}

.form-grid,
.settings-grid,
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-3);
}

select,
input[type="text"],
input[type="search"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
}

.consequence,
.destructive-note {
  padding: 11px;
  margin: 12px 0;
  display: grid;
  gap: 4px;
  background: var(--soft);
}

.flow-proof {
  margin-top: 14px;
  padding: 14px;
  background: #f8f9fa;
}

.timeline {
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 18px 1fr;
  column-gap: 8px;
}

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

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

.dot {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 50%;
  border: 2px solid var(--line-dark);
  grid-row: span 2;
}

.dot.done {
  background: var(--green);
  border-color: var(--green);
}

.dot.active {
  background: var(--yellow);
  border-color: var(--yellow);
}

.webview {
  background: #f7f7f7;
  padding: 12px;
}

.webview-toolbar {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.webview-actions {
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-frame {
  min-height: calc(100vh - 156px);
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.wp-adminbar {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 32px;
  padding: 0 12px;
  background: #1f2427;
  color: #f4f4f4;
  font-size: 13px;
}

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

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

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

.wp-hero {
  display: grid;
  grid-template-columns: minmax(270px, 470px) 1fr;
  gap: 24px;
  align-items: center;
  min-height: 620px;
  padding: 58px 46px;
  overflow: hidden;
}

.wp-hero h2 {
  font-family: Georgia, serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.14;
  font-weight: 400;
}

.wp-hero em {
  color: #3157ff;
  font-style: normal;
}

.wp-hero p,
.wp-hero mark {
  font-size: 22px;
  line-height: 1.45;
}

.wp-hero button {
  margin-top: 16px;
  background: #3157ff;
  border-color: #3157ff;
  color: #fff;
  min-height: 52px;
  padding-inline: 24px;
}

.wp-glyph {
  width: min(44vw, 560px);
  aspect-ratio: 1;
  border: 28px solid #222;
  outline: 62px solid #35e975;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #222;
  font-family: Georgia, serif;
  font-size: min(30vw, 360px);
  font-weight: 900;
  transform: translateX(16%);
}

.inspector {
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.stack-card {
  padding: 13px;
}

.stack-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.stack-head h2 {
  margin: 0;
}

.save-destinations {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.destination {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
}

.destination.selected {
  border-color: var(--ink);
  background: #fff;
}

.single-field {
  margin: 10px 0;
}

.progress-row {
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.progress {
  height: 8px;
  border-radius: 99px;
  background: var(--soft-2);
  overflow: hidden;
  margin: 8px 0 12px;
}

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

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

.dense-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

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

.button-grid {
  gap: 8px;
  flex-wrap: wrap;
}

.button-grid button {
  flex: 1 1 118px;
}

.panel-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(8, 10, 12, .56);
  z-index: 20;
  padding: 26px;
  overflow: auto;
}

.panel-overlay.open {
  display: block;
}

.panel {
  position: relative;
  width: min(820px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .35);
}

.panel.wide,
.manager-panel,
.gallery-panel {
  width: min(1180px, 100%);
}

.panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  padding: 4px 8px;
}

.option-card {
  padding: 16px;
  background: var(--soft);
}

.option-card.selected {
  border-color: var(--ink);
  background: #fff;
}

.result-strip {
  gap: 10px;
  justify-content: space-between;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.result-strip span {
  color: var(--ink-3);
}

.panel-title-row {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-right: 36px;
}

.library-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, .8fr) minmax(110px, .5fr) minmax(260px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.table-row:first-child {
  border-top: 0;
}

.table-head {
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.table-row small {
  display: block;
  color: var(--muted);
}

.row-actions {
  gap: 7px;
  flex-wrap: wrap;
}

.manager-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.manager-tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  border-bottom: 3px solid transparent;
}

.manager-tabs button.active {
  border-bottom-color: var(--ink);
  font-weight: 800;
}

.manager-content {
  display: none;
}

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

.settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-grid.compact {
  grid-template-columns: 1fr 1fr;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.split-warning {
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  margin-top: 12px;
  border: 1px solid #efc8c8;
  border-radius: var(--radius);
  background: #fff7f7;
}

.split-warning span {
  display: block;
  color: var(--muted);
}

.split-warning.calm {
  border-color: var(--line);
  background: var(--soft);
}

.file-layout {
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 390px;
}

.tree {
  border-right: 1px solid var(--line);
  background: var(--soft);
  overflow: auto;
}

.toolbar {
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.toolbar button {
  padding: 7px 9px;
}

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

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

.tree li.selected {
  background: #fff;
  outline: 1px solid var(--ink);
}

.code {
  margin: 0;
  padding: 16px;
  overflow: auto;
  background: #fbfbfb;
  color: #8f2a00;
  font-size: 14px;
  line-height: 1.55;
}

.db-card {
  padding: 16px;
}

dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
}

dt {
  font-weight: 800;
}

dd {
  margin: 0;
  color: var(--ink-3);
}

.log-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

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

.log-grid pre {
  white-space: pre-wrap;
  color: var(--muted);
}

.search {
  width: min(340px, 100%);
}

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

.filter-row button {
  border-radius: 999px;
  background: var(--soft);
}

.filter-row button.active {
  background: var(--ink);
  color: #fff;
}

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
}

.catalog-column {
  display: grid;
  gap: 12px;
}

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

.blueprint-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--soft);
}

.blueprint-grid article.selected {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.blueprint-grid strong,
.blueprint-grid small {
  display: block;
  padding: 0 10px;
}

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

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

.thumb {
  height: 110px;
  border-bottom: 1px solid var(--line);
}

.thumb.art { background: linear-gradient(135deg, #1f332f, #c4b48b 48%, #4d2c2c); }
.thumb.coffee { background: linear-gradient(135deg, #4b2467, #f1a861 65%, #723f29); }
.thumb.feed { background: linear-gradient(135deg, #f4f7ff, #fff 46%, #3157ff); }
.thumb.game { background: linear-gradient(135deg, #060606, #fbfbfb 45%, #991d1d); }
.thumb.nonprofit { background: linear-gradient(135deg, #3d160e, #c47c40 54%, #131313); }
.thumb.blog { background: linear-gradient(135deg, #68123a, #2d0a1d); }
.thumb.resume { background: linear-gradient(135deg, #eeeeee, #202020 58%, #d8d8d8); }
.thumb.photo { background: linear-gradient(135deg, #111, #777 50%, #f3f3f3); }
.thumb.lab { background: repeating-linear-gradient(45deg, #111, #111 12px, #e9e9e9 12px, #e9e9e9 24px); }

.blueprint-detail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  align-self: start;
}

.catalog-index {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.catalog-index > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
}

.catalog-index > div strong {
  color: var(--ink);
}

.catalog-index ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 16px;
}

.catalog-index li {
  break-inside: avoid;
  padding: 6px 0;
  border-bottom: 1px solid var(--soft-2);
}

.bottom-nav {
  display: none;
}

@media (max-width: 1180px) {
  .browser-body {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  }

  .inspector {
    display: none;
  }

  .site-frame {
    min-height: calc(100vh - 150px);
  }
}

@media (max-width: 820px) {
  body {
    background: #fff;
  }

  .browser-top {
    padding-bottom: 8px;
  }

  .tab-strip {
    display: none;
  }

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

  .status-cluster,
  .chrome-actions {
    grid-column: 1 / -1;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .browser-body {
    display: block;
    background: #fff;
    padding-bottom: 64px;
  }

  .drawer {
    display: none;
  }

  .app-shell[data-active-drawer="launch"] .drawer {
    display: block;
  }

  .webview {
    padding: 8px;
  }

  .app-shell[data-active-drawer="launch"] .webview {
    display: none;
  }

  .site-frame {
    min-height: 620px;
  }

  .wp-adminbar {
    gap: 9px;
    overflow: hidden;
  }

  .wp-adminbar span:nth-child(3),
  .wp-adminbar span:nth-child(4) {
    display: none;
  }

  .wp-nav {
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .wp-nav strong {
    flex-basis: 100%;
  }

  .wp-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 34px 22px 80px;
  }

  .wp-hero p,
  .wp-hero mark {
    font-size: 18px;
  }

  .wp-glyph {
    width: 78vw;
    margin: 40px auto 0;
    transform: none;
    outline-width: 34px;
    border-width: 18px;
    font-size: 46vw;
  }

  .route-board,
  .form-grid,
  .two-col,
  .settings-grid,
  .settings-grid.compact,
  .gallery-layout,
  .file-layout,
  .log-grid {
    grid-template-columns: 1fr;
  }

  .catalog-index ul {
    columns: 1;
  }

  .panel-overlay {
    padding: 8px;
    padding-bottom: 72px;
  }

  .panel {
    padding: 18px;
    border-radius: 8px;
  }

  .panel-title-row,
  .result-strip,
  .split-warning {
    display: grid;
    padding-right: 36px;
  }

  .library-table,
  .table-row {
    display: block;
  }

  .table-head {
    display: none;
  }

  .table-row {
    padding: 14px;
  }

  .table-row > span {
    display: block;
    margin-bottom: 10px;
  }

  .manager-tabs {
    margin-inline: -18px;
    padding-inline: 18px;
  }

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

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

  .thumb {
    height: 88px;
  }

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

  .bottom-nav button {
    min-width: 0;
    border: 0;
    border-radius: 0;
    padding: 12px 4px;
    font-size: 12px;
    background: #fff;
  }
}

@media (max-width: 480px) {
  .drawer {
    padding: 14px;
  }

  h1 {
    font-size: 22px;
  }

  .route-card {
    min-height: 112px;
  }

  .webview-toolbar {
    display: grid;
  }

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

  .webview-actions button {
    flex: 1;
  }

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

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