:root {
  color-scheme: dark;
  --bg: #121316;
  --chrome: #24282d;
  --panel: #282832;
  --panel-soft: #302d3d;
  --panel-strong: #1d2026;
  --text: #f3f0f8;
  --muted: #b6afc5;
  --line: rgba(226, 217, 239, 0.12);
  --line-strong: rgba(198, 172, 223, 0.28);
  --accent: #b69ad8;
  --accent-strong: #8f6ec1;
  --warn: #f0c36a;
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.36);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100svh;
  margin: 0;
  background: linear-gradient(180deg, #1c1d22 0%, #121316 54%, #0e1014 100%);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  color: var(--text);
}

button {
  min-height: 34px;
  border: 1px solid rgba(226, 217, 239, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}

button:hover,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  border-color: rgba(182, 154, 216, 0.55);
  outline: none;
}

button:hover,
button:focus-visible {
  background: rgba(182, 154, 216, 0.13);
}

.primary-action {
  border-color: rgba(182, 154, 216, 0.62);
  background: rgba(143, 110, 193, 0.52);
}

.demo-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: #15171b;
  padding: 0 4vw;
}

.brand,
.demo-header nav {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand,
.demo-header a {
  color: var(--text);
  font-weight: 780;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(226, 217, 239, 0.14);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(182, 154, 216, 0.72), rgba(70, 70, 86, 0.92)),
    #252532;
  color: #ffffff;
  font-size: 0.76rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.demo-header nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.demo-header nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  color: var(--muted);
}

.demo-header nav .nav-back {
  border-color: rgba(182, 154, 216, 0.22);
  background: rgba(182, 154, 216, 0.1);
  color: #efe7ff;
}

.demo-header nav a:hover,
.demo-header nav a:focus-visible {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.demo-shell {
  display: grid;
  width: min(1500px, 90vw);
  gap: 0.9rem;
  margin-inline: auto;
  padding: clamp(0.85rem, 1.7vw, 1.25rem) 0 2rem;
}

.demo-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0 0.15rem;
}

.demo-intro p:not(.eyebrow) {
  max-width: 660px;
  color: #c4bdcd;
  font-size: clamp(1rem, 1.4vw, 1.14rem);
}

.demo-cues {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.demo-cues span,
.tag {
  border: 1px solid rgba(182, 154, 216, 0.22);
  border-radius: 999px;
  background: rgba(182, 154, 216, 0.09);
  color: #e8dcf7;
  padding: 0.34rem 0.56rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.eyebrow,
h1,
h2,
p {
  margin: 0;
}

.eyebrow {
  margin-bottom: 0.36rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1 {
  max-width: 850px;
  font-size: clamp(2rem, 3.1vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: 1.06rem;
  line-height: 1.12;
}

.app-window {
  overflow: hidden;
  border: 1px solid rgba(226, 217, 239, 0.16);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.window-titlebar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(280px, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  background: var(--chrome);
  padding: 0 0.8rem;
}

.chrome-cluster,
.traffic-lights,
.chrome-buttons,
.toolbar-actions,
.pane-actions,
.filter-row,
.inspector-actions,
.window-title {
  display: flex;
  align-items: center;
}

.chrome-cluster,
.chrome-buttons,
.toolbar-actions,
.pane-actions {
  gap: 0.45rem;
}

.traffic-lights {
  gap: 0.48rem;
}

.traffic-lights span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.traffic-lights span:nth-child(1) {
  background: #ff5f57;
}

.traffic-lights span:nth-child(2) {
  background: #febc2e;
}

.traffic-lights span:nth-child(3) {
  background: #28c840;
}

.chrome-buttons span {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(226, 217, 239, 0.12);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}

.window-title {
  justify-content: center;
  gap: 0.65rem;
  color: var(--muted);
}

.window-title strong {
  color: var(--text);
}

.toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace {
  display: grid;
  min-height: min(740px, calc(100svh - 194px));
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.05fr) minmax(300px, 0.95fr);
}

.sidebar,
.archive-pane,
.inspector-pane {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--panel-strong);
}

.archive-pane {
  border-color: var(--line-strong);
  background: var(--panel);
}

.inspector-pane {
  border-right: 0;
}

.pane-head {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.9rem;
}

.pane-head.compact {
  min-height: 62px;
}

.pane-actions button.is-active {
  border-color: rgba(182, 154, 216, 0.48);
  background: rgba(182, 154, 216, 0.16);
}

.search-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
}

.search-field input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(226, 217, 239, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 0.45rem 0.62rem;
}

.explorer-pane > .search-field {
  margin: 0.85rem;
}

.filter-row {
  gap: 0.65rem;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0.9rem;
}

.filter-row .search-field {
  flex: 1;
}

.filter-row select {
  max-width: 160px;
}

.tree-list,
.entry-list,
.details-list,
.command-list {
  display: grid;
  align-content: start;
  gap: 0.28rem;
}

.tree-list {
  padding: 0 0.85rem 0.85rem;
}

.archive-tree-region {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.sidebar-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.85rem 0.7rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.tree-row,
.entry-row {
  display: grid;
  width: 100%;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.tree-row {
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  padding: 0.45rem 0.5rem;
}

.tree-row small,
.entry-row small,
.detail-row span,
.status-strip {
  color: var(--muted);
}

.tree-row.is-active,
.entry-row.is-active {
  border-color: rgba(182, 154, 216, 0.42);
  background: rgba(143, 110, 193, 0.42);
}

.tree-icon,
.entry-icon,
.preview-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: rgba(208, 190, 229, 0.16);
  color: #d9c5ed;
  font-size: 0.72rem;
  font-weight: 850;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0.9rem;
}

.summary-item {
  min-width: 0;
  border: 1px solid rgba(226, 217, 239, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0.58rem;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 780;
  text-transform: uppercase;
}

.summary-item strong {
  display: block;
  margin-top: 0.15rem;
  overflow-wrap: anywhere;
}

.entry-list {
  min-height: 396px;
  padding: 0.72rem 0.6rem;
}

.entry-row {
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0.5rem 0.62rem;
}

.entry-name {
  min-width: 0;
}

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

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.warning-badge {
  color: var(--warn);
}

.status-strip {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
}

.preview-surface {
  display: grid;
  min-height: 300px;
  place-items: center;
  margin: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(226, 217, 239, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.preview-card {
  display: grid;
  width: min(440px, calc(100% - 2rem));
  gap: 0.55rem;
  justify-items: center;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

.preview-card strong {
  color: var(--text);
}

.preview-image {
  width: min(360px, 82%);
  aspect-ratio: 1.45;
  border: 1px solid rgba(226, 217, 239, 0.14);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(182, 154, 216, 0.38), transparent 42%),
    linear-gradient(45deg, #353949 25%, transparent 25% 75%, #353949 75%),
    linear-gradient(45deg, #353949 25%, transparent 25% 75%, #353949 75%),
    #262933;
  background-position:
    0 0,
    0 0,
    12px 12px,
    0 0;
  background-size:
    auto,
    24px 24px,
    24px 24px,
    auto;
}

.text-preview {
  width: min(440px, calc(100% - 1.6rem));
  border: 1px solid rgba(226, 217, 239, 0.12);
  border-radius: 10px;
  background: rgba(10, 12, 16, 0.38);
  padding: 1rem;
  color: #ded8e8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  text-align: left;
  white-space: pre-wrap;
}

.details-list {
  padding: 0 0.9rem 0.9rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(226, 217, 239, 0.08);
  padding: 0.55rem 0;
}

.detail-row strong {
  text-align: right;
}

.inspector-actions {
  gap: 0.55rem;
  padding: 0 0.9rem 0.9rem;
}

.demo-overlay {
  position: fixed;
  z-index: 40;
  inset: 0;
  background: rgba(8, 9, 12, 0.56);
  backdrop-filter: blur(10px);
}

.demo-panel {
  position: fixed;
  z-index: 50;
  top: 86px;
  right: max(1rem, 4vw);
  display: grid;
  width: min(420px, calc(100vw - 2rem));
  gap: 0.9rem;
  border: 1px solid rgba(226, 217, 239, 0.14);
  border-radius: 14px;
  background: rgba(32, 34, 42, 0.97);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  padding: 1rem;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.command-list button {
  justify-content: flex-start;
  text-align: left;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-weight: 730;
}

.toggle-row input {
  width: 18px;
  height: 18px;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: minmax(230px, 0.8fr) minmax(360px, 1.2fr);
  }

  .inspector-pane {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
    border-top: 1px solid var(--line);
  }

  .inspector-pane .pane-head {
    grid-column: 1 / -1;
  }

  .preview-surface {
    min-height: 240px;
  }
}

@media (max-width: 760px) {
  .demo-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding-block: 0.85rem;
  }

  .demo-header nav {
    justify-content: flex-start;
  }

  .demo-shell {
    width: min(100% - 1rem, 1500px);
  }

  .demo-intro {
    display: grid;
  }

  .demo-cues {
    justify-content: flex-start;
  }

  .window-titlebar {
    grid-template-columns: 1fr;
    justify-items: stretch;
    padding: 0.8rem;
  }

  .window-title {
    justify-content: flex-start;
  }

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

  .workspace,
  .inspector-pane {
    grid-template-columns: 1fr;
  }

  .workspace {
    min-height: auto;
  }

  .sidebar,
  .archive-pane,
  .inspector-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .filter-row,
  .pane-head {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-row select {
    max-width: none;
  }

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

  .entry-row {
    grid-template-columns: auto 1fr;
  }

  .entry-list {
    min-height: auto;
  }

  .entry-meta {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: 2rem;
  }

  .demo-header nav a {
    padding-inline: 0.58rem;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .chrome-buttons {
    display: none;
  }
}
