/* Nighty Vault (/tools/vault, /tools/vault/guide and /tools/vault/ai): the parts the shared tool styles (tools.css),
   the cards (designer-ai.css) and the guide tiles (designer-guide.css) don't have: the download button and its line,
   the picture of the app, the table next to Obsidian, "Coming soon", name / text rows, the Token Saver's ladder, the
   keys, and Connect an AI's steps, app cards and tools. The page keeps the site's look; only the pictures of the app
   use the app's own night colors (they are SVG). Glass cards like the rest of the site. */

.vault-page {
  display: grid;
  gap: 28px;
}

/* ---------- the download button ---------- */
.vault-get {
  display: grid;
  gap: 10px;
}

.vault-get-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.vault-get-note {
  margin: 0;
  color: var(--text-3);
  font-size: 13.5px;
}

.vault-download {
  min-width: 228px;
  justify-content: center;
}

/* Until latest.json is read the button is off (tools.css dims [aria-disabled]); "Coming soon" swaps the icon. */
.vault-icon-soon,
.vault-download[data-state="soon"] .vault-icon-get {
  display: none;
}

.vault-download[data-state="soon"] .vault-icon-soon {
  display: inline-block;
}

.vault-download[data-state="soon"][aria-disabled="true"] {
  border-color: var(--glass-border-hover);
  background: var(--surface-2);
  color: var(--text-2);
  box-shadow: none;
  opacity: 1;
}

.guide-actions .vault-get {
  margin-top: 0;
}

/* ---------- the picture of the app ---------- */
.vault-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 22px;
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(155, 140, 255, 0.12), transparent 60%),
    radial-gradient(50% 80% at 0% 100%, rgba(200, 107, 255, 0.08), transparent 60%),
    var(--glass-1);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-md);
}

.vault-shot {
  display: grid;
  gap: 14px;
  margin: 0;
}

.vault-shot-frame {
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(155, 140, 255, 0.14), 0 30px 70px -30px rgba(122, 104, 255, 0.55), var(--shadow-lg);
}

.vault-shot-svg {
  display: block;
  width: 100%;
  height: auto;
}

.vault-shot-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 16px;
  color: var(--text-3);
  font-size: 13px;
}

.vault-shot-legend span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.vault-shot-legend strong {
  color: var(--text-2);
  font-size: 13.5px;
}

/* A few stars twinkle, slowly, only while they are on screen (vault.js) and never with reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .vault-twinkle {
    animation: vault-twinkle 4.8s var(--ease-in-out) infinite alternate;
  }

  .vault-twinkle.is-late {
    animation-delay: -1.6s;
  }

  .vault-twinkle.is-later {
    animation-delay: -3.2s;
  }

  .is-paused .vault-twinkle {
    animation-play-state: paused;
  }
}

@keyframes vault-twinkle {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.4;
  }
}

/* ---------- cards and blocks ---------- */
.vault-block .ai-cards,
.ai-cards.vault-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  margin-top: 12px;
}

.vault-card-icon {
  background: rgba(155, 140, 255, 0.14);
  color: #c9bfff;
}

.vault-block > .tool-about-note {
  margin-top: 4px;
}

/* Connect an AI on the product page: across the whole row, a little brighter, with its link. */
.ai-cards .vault-card-wide {
  grid-column: 1 / -1;
  border-color: rgba(155, 140, 255, 0.3);
  background: radial-gradient(80% 160% at 0% 0%, rgba(155, 140, 255, 0.14), transparent 60%), var(--glass-1);
}

.vault-card-wide p:not(.vault-actions) {
  max-width: 72ch;
}

.vault-card-wide .vault-actions {
  margin-top: 8px;
}

.vault-soon-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pill.vault-soon {
  height: 22px;
  padding: 0 9px;
  border-color: rgba(155, 140, 255, 0.4);
  background: rgba(155, 140, 255, 0.1);
  color: #c9bfff;
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.vault-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 16px 0 0;
}

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

.vault-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 20px 22px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-1);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

.vault-card .section-title-sm,
.vault-card .tool-about-note {
  margin: 0;
}

.vault-card-text {
  color: var(--text-2);
  font-size: 15px;
}

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

.vault-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--text-2);
  font-size: 14.5px;
}

.vault-list .icon {
  margin-top: 3px;
  color: var(--accent-ink);
}

.vault-list strong {
  color: var(--text);
}

.vault-list-tight {
  margin-top: 16px;
}

/* Folder trees and pack.json: they wrap on a phone instead of scrolling sideways. */
.vault-tree code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.vault-tree .code-head {
  letter-spacing: 0.04em;
  text-transform: none;
}

.vault-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

/* ---------- Nighty Vault and Obsidian ---------- */
.vault-compare-wrap {
  margin: 0;
}

.vault-compare th,
.vault-compare td {
  vertical-align: top;
}

.vault-compare tbody th {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.vault-compare td {
  color: var(--text-2);
}

.vault-compare .vault-compare-us {
  color: var(--text);
}

.vault-compare .pill {
  margin-left: 4px;
  vertical-align: 1px;
}

/* ---------- the guide ---------- */
.vault-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vault-jump .chip {
  height: 34px;
  font-size: 13.5px;
}

.vault-anchor {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.vault-flow-art {
  background: radial-gradient(120% 90% at 50% 0%, rgba(155, 140, 255, 0.14), transparent 70%), #07060d;
}

.vault-rows {
  display: grid;
  gap: 14px;
  margin: 0;
}

.vault-rows > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.vault-rows dt {
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
}

.vault-rows dd {
  margin: 0;
  color: var(--text-2);
  font-size: 14.5px;
}

.vault-table {
  font-variant-numeric: normal;
}

.vault-table td {
  color: var(--text-2);
  vertical-align: top;
}

.vault-code {
  color: #c9bfff;
  font: 600 13.5px/1.5 var(--font-mono);
  white-space: nowrap;
}

.vault-keys-cell {
  white-space: nowrap;
}

.vault-plus {
  margin: 0 4px;
  color: var(--text-3);
  font-size: 13px;
}

.vault-find {
  justify-items: start;
}

.vault-find p {
  color: var(--text-2);
  font-size: 15px;
}

.vault-find .vault-find-keys .kbd {
  min-width: 44px;
  height: 40px;
  font-size: 16px;
  border-radius: 10px;
}

.vault-crosslinks {
  display: grid;
  gap: 14px;
}

/* ---------- connect an AI ---------- */
/* The three steps: the Tell your AI card of designer-ai.css, in the app's violet. */
.ai-quick.vault-ai-quick {
  border-color: rgba(155, 140, 255, 0.28);
  background: radial-gradient(120% 140% at 0% 0%, rgba(155, 140, 255, 0.14), transparent 60%), var(--glass-1);
}

/* Step 3, per AI app: numbered lines, where the settings are, and an example of what the app shows. */
.vault-app-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.4em;
  list-style: decimal;
  color: var(--text-2);
  font-size: 14.5px;
}

.vault-app-steps li::marker {
  color: #c9bfff;
  font-weight: 700;
}

.vault-app-steps strong {
  color: var(--text);
}

.vault-rows.vault-where {
  gap: 8px;
}

.vault-where dt {
  font-size: 14px;
}

.vault-where dd {
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

/* The 11 tools: the name people read, then the tool's own name. */
.vault-tools-head {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.vault-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  margin-left: 4px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(155, 140, 255, 0.14);
  color: #c9bfff;
  font-size: 12.5px;
  font-weight: 700;
  vertical-align: 2px;
}

.vault-tools dt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}

.vault-tools .vault-code {
  font-size: 12.5px;
  font-weight: 500;
}

/* Things to ask: the words to type stand out. */
.ai-card .vault-ask {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.vault-ai-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 18px;
  color: var(--text-3);
  font-size: 14px;
}

.vault-card .vault-ai-status {
  margin: 0;
}

.vault-ladder-card {
  background: radial-gradient(120% 140% at 0% 0%, rgba(155, 140, 255, 0.12), transparent 60%), var(--glass-1);
}

.vault-ladder {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vault-ladder li {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

/* Each step a little higher than the one before, like a ladder (side by side only). */
.vault-ladder li:nth-child(2) {
  margin-top: -6px;
}

.vault-ladder li:nth-child(3) {
  margin-top: -12px;
}

.vault-ladder li:nth-child(4) {
  margin-top: -18px;
}

.vault-ladder li:nth-child(5) {
  margin-top: -24px;
}

.vault-ladder li > span:last-child {
  display: grid;
  gap: 2px;
}

.vault-ladder strong {
  color: var(--text);
}

.vault-ladder-text {
  color: var(--text-3);
  font-size: 13.5px;
}

.vault-ladder-card .vault-ladder {
  padding-top: 24px;
}

@media (max-width: 1000px) {
  .vault-ladder {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vault-ladder li:nth-child(n) {
    margin-top: 0;
  }

  .vault-ladder-card .vault-ladder {
    padding-top: 0;
  }
}

@media (max-width: 860px) {
  .vault-two {
    grid-template-columns: minmax(0, 1fr);
  }

  .vault-shot-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .vault-card {
    padding: 16px;
  }

  .vault-ladder {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .vault-download,
  .vault-get-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .vault-shot-frame {
    border-radius: 10px;
  }
}
