:root {
  color-scheme: light;
  --ink: #17191c;
  --muted: #5f676b;
  --paper: #f6f7f4;
  --panel: #ffffff;
  --panel-strong: #111417;
  --line: #d9dfdc;
  --line-strong: #9aa7a2;
  --teal: #0f766e;
  --blue: #315f9b;
  --amber: #b46a16;
  --coral: #bf513f;
  --sage: #657c4f;
  --focus: #1e8bd8;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.item-card:focus-visible {
  outline: 3px solid #69afe5;
  outline-offset: 3px;
}

.hero {
  min-height: 88vh;
  padding: 20px;
  color: #f9fbf7;
  background:
    linear-gradient(145deg, rgba(17, 20, 23, 0.94), rgba(17, 20, 23, 0.78)),
    url("/vault-hero.png") center / cover;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto 48px;
  padding: 10px 0;
}

.brand {
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  border: 1px solid rgba(249, 251, 247, 0.24);
  border-radius: 6px;
  color: rgba(249, 251, 247, 0.82);
  padding: 8px 12px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 40px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.hero-copy {
  padding-bottom: 24px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f0b563;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(2.65rem, 7vw, 4.7rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  line-height: 1.04;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.16rem;
  line-height: 1.18;
}

.hero-text {
  max-width: 650px;
  color: rgba(249, 251, 247, 0.8);
  font-size: 1.13rem;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: "Courier New", monospace;
  padding: 0 16px;
}

.button.primary {
  border-color: #67d2c7;
  background: #67d2c7;
  color: #071011;
}

.button.secondary {
  color: inherit;
}

.clear-button {
  min-height: 52px;
  background: var(--panel);
  color: var(--ink);
}

.hero-visual {
  margin: 0;
  border: 1px solid rgba(249, 251, 247, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(249, 251, 247, 0.08);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.hero-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.band {
  padding: 76px 20px;
  border-top: 1px solid var(--line);
}

.section-head,
.metric-grid,
.catalog-tools,
.tag-strip,
.result-meta,
.empty-state,
.item-grid,
.load-more-wrap,
.bundle-list,
.build-grid,
.deploy-grid {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  margin-bottom: 30px;
}

.section-head p:not(.eyebrow) {
  max-width: 740px;
  color: var(--muted);
  line-height: 1.55;
}

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

.metric {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.metric strong {
  display: block;
  color: var(--teal);
  font-family: "Courier New", monospace;
  font-size: 2rem;
  overflow-wrap: anywhere;
}

.metric span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.featured {
  background: #eef4f0;
}

.featured-rail {
  display: grid;
  grid-auto-columns: minmax(220px, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  overflow-x: auto;
  padding-bottom: 8px;
}

.featured-card {
  display: flex;
  min-height: 154px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  padding: 16px;
  text-align: left;
}

.featured-card span,
.featured-card em {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  font-style: normal;
  text-transform: uppercase;
}

.featured-card strong {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(150px, 180px) minmax(140px, 170px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

input[type="search"],
select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 14px;
}

.select-control {
  display: grid;
  gap: 6px;
}

.select-control span {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.segmented {
  display: flex;
  min-height: 52px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
}

.segment {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 13px;
}

.segment:last-child {
  border-right: 0;
}

.segment.active {
  background: var(--panel-strong);
  color: #f9fbf7;
}

.tag-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px;
}

.domain-strip {
  padding-top: 0;
}

.tag {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  padding: 0 12px;
}

.tag span {
  color: var(--amber);
  font-family: "Courier New", monospace;
}

.tag.active {
  border-color: var(--teal);
  background: #e6f2ef;
  color: var(--ink);
}

.tag.domain span {
  color: var(--sage);
}

.result-meta {
  margin-bottom: 16px;
  color: var(--muted);
  font-family: "Courier New", monospace;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  padding: 28px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.item-grid,
.bundle-list,
.build-grid,
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.item-card,
.bundle,
.build-grid article,
.deploy-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.item-card {
  display: flex;
  min-height: 284px;
  flex-direction: column;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.item-card:hover,
.item-card:focus-visible {
  border-color: #168d84;
  box-shadow: 0 18px 38px rgba(23, 25, 28, 0.1);
  transform: translateY(-2px);
}

.item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.kind {
  color: var(--teal);
}

.status {
  color: var(--sage);
}

.item-card h3 {
  overflow-wrap: anywhere;
}

.item-card p,
.bundle p,
.build-grid p,
.deploy-grid p {
  color: var(--muted);
  line-height: 1.48;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}

.item-meta span {
  border-left: 3px solid var(--blue);
  background: #eef3f8;
  color: #25313c;
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  padding: 5px 8px;
}

.card-link {
  align-self: flex-start;
  border: 0;
  border-bottom: 1px solid var(--teal);
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  margin: 0 0 16px;
  padding: 0 0 3px;
  font-family: "Courier New", monospace;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.mini-tags span {
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  padding: 5px 8px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.bundle {
  border-top: 4px solid var(--coral);
}

.bundle:nth-child(2n) {
  border-top-color: var(--teal);
}

.bundle:nth-child(3n) {
  border-top-color: var(--amber);
}

.build {
  background: #f0f4f7;
}

.deploy {
  background: #111417;
  color: #f9fbf7;
}

.deploy .section-head p:not(.eyebrow),
.deploy-grid p {
  color: rgba(249, 251, 247, 0.72);
}

.deploy-grid article {
  border-color: rgba(249, 251, 247, 0.16);
  background: #1a1f24;
}

.deploy-grid code {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
  border: 1px solid rgba(249, 251, 247, 0.18);
  border-radius: 6px;
  background: #0b0d0f;
  color: #f0b563;
  padding: 8px 10px;
}

.step {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--amber);
  font-family: "Courier New", monospace;
}

.detail-dialog {
  width: min(760px, calc(100vw - 28px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 28px;
}

.detail-dialog::backdrop {
  background: rgba(17, 20, 23, 0.68);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.2rem;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.detail-list dt {
  color: var(--amber);
  font-family: "Courier New", monospace;
}

.detail-list dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.detail-list code {
  color: var(--blue);
  font-family: "Courier New", monospace;
}

@media (max-width: 1060px) {
  .catalog-tools {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .select-control,
  .clear-button {
    min-width: 0;
  }
}

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

  .metric-grid,
  .item-grid,
  .bundle-list,
  .build-grid,
  .deploy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .hero {
    min-height: auto;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1;
    text-align: center;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

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

  .segment {
    min-height: 44px;
    border-bottom: 1px solid var(--line);
  }

  .segment:nth-child(2n) {
    border-right: 0;
  }

  .segment:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .metric-grid,
  .item-grid,
  .bundle-list,
  .build-grid,
  .deploy-grid {
    grid-template-columns: 1fr;
  }

  .featured-rail {
    grid-auto-columns: minmax(196px, 82%);
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.private-page {
  min-height: 100vh;
  background: #101315;
  color: #edf1ec;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.private-page .brand,
.private-page .eyebrow,
.private-page code,
.private-page .private-field span,
.private-page .private-toolbar p,
.private-page .private-table th {
  font-family: "Courier New", monospace;
}

.private-shell {
  padding: 18px 20px 28px;
  background:
    linear-gradient(180deg, rgba(16, 19, 21, 0.96), rgba(16, 19, 21, 0.9)),
    url("/vault-hero.png") center / cover;
}

.private-nav,
.private-hero,
.private-metrics,
.private-workspace,
.private-bundles {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.private-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.private-nav .nav-links a {
  border-color: rgba(237, 241, 236, 0.22);
  color: rgba(237, 241, 236, 0.82);
}

.private-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 22px;
  align-items: end;
}

.private-hero h1 {
  max-width: 840px;
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 5vw, 3.65rem);
  line-height: 1;
}

.private-hero p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(237, 241, 236, 0.74);
  line-height: 1.55;
}

.private-command-stack {
  display: grid;
  gap: 8px;
}

.private-command-stack code,
.private-table code,
.private-bundle-grid code {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.private-command-stack code {
  border: 1px solid rgba(237, 241, 236, 0.18);
  border-radius: 6px;
  background: rgba(16, 19, 21, 0.72);
  color: #f0b563;
  padding: 9px 10px;
}

.private-metrics,
.private-workspace,
.private-bundles {
  padding: 34px 20px;
}

.compact-head {
  margin-bottom: 16px;
}

.compact-head h2 {
  font-size: 1.55rem;
}

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

.private-metric-grid article {
  min-height: 104px;
  border: 1px solid rgba(237, 241, 236, 0.12);
  border-radius: 8px;
  background: #171c1f;
  padding: 16px;
}

.private-metric-grid strong {
  display: block;
  color: #67d2c7;
  font-size: 1.75rem;
  overflow-wrap: anywhere;
}

.private-metric-grid span {
  display: block;
  margin-top: 6px;
  color: rgba(237, 241, 236, 0.68);
}

.private-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.private-panel {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(237, 241, 236, 0.12);
  border-radius: 8px;
  background: #171c1f;
  padding: 16px;
}

.private-field {
  display: grid;
  gap: 6px;
}

.private-field span {
  color: rgba(237, 241, 236, 0.62);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.private-page input[type="search"],
.private-page select {
  border-color: rgba(237, 241, 236, 0.18);
  background: #0d1012;
  color: #edf1ec;
}

.private-page .clear-button {
  width: 100%;
  background: #20272b;
  color: #edf1ec;
}

.private-results {
  min-width: 0;
}

.private-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.private-toolbar p {
  margin: 0;
  color: rgba(237, 241, 236, 0.64);
}

.private-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(237, 241, 236, 0.12);
  border-radius: 8px;
  background: #171c1f;
}

.private-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

.private-table th,
.private-table td {
  border-bottom: 1px solid rgba(237, 241, 236, 0.1);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.private-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #20272b;
  color: rgba(237, 241, 236, 0.64);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.private-table td {
  color: rgba(237, 241, 236, 0.82);
  font-size: 0.88rem;
}

.private-table td:first-child {
  width: 27%;
}

.private-table strong {
  display: block;
  margin-bottom: 5px;
  color: #edf1ec;
  overflow-wrap: anywhere;
}

.private-table span {
  display: block;
  color: rgba(237, 241, 236, 0.58);
  line-height: 1.38;
}

.private-table code {
  color: #f0b563;
  font-size: 0.78rem;
}

.private-table mark {
  border-radius: 999px;
  background: #203a35;
  color: #8be0d4;
  padding: 3px 7px;
}

.private-empty {
  margin-bottom: 12px;
  border: 1px dashed rgba(237, 241, 236, 0.22);
  border-radius: 8px;
  background: #171c1f;
  padding: 18px;
}

.private-empty p {
  margin-bottom: 0;
  color: rgba(237, 241, 236, 0.62);
}

.private-bundle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.private-bundle-grid article {
  border: 1px solid rgba(237, 241, 236, 0.12);
  border-radius: 8px;
  background: #171c1f;
  padding: 16px;
}

.private-bundle-grid p {
  color: rgba(237, 241, 236, 0.62);
  line-height: 1.45;
}

.private-bundle-grid dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0 0;
}

.private-bundle-grid div {
  border: 1px solid rgba(237, 241, 236, 0.1);
  border-radius: 6px;
  padding: 8px;
}

.private-bundle-grid dt {
  color: rgba(237, 241, 236, 0.56);
  font-size: 0.72rem;
}

.private-bundle-grid dd {
  margin: 3px 0 0;
  color: #67d2c7;
  font-weight: 700;
}

@media (max-width: 980px) {
  .private-hero,
  .private-workspace {
    grid-template-columns: 1fr;
  }

  .private-panel {
    position: static;
  }

  .private-metric-grid,
  .private-bundle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .private-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .private-metric-grid,
  .private-bundle-grid {
    grid-template-columns: 1fr;
  }

  .private-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .private-toolbar .button {
    width: 100%;
  }
}
