/* Install-prompts page styles. Built on the docs.css design tokens so
   typography, palette, and density match the rest of /docs. Nothing
   here overrides docs.css globals — additions only. */

.ip-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 32px 80px;
}

.ip-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ds-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  margin-bottom: 16px;
}
.ip-back:hover { color: var(--ds-text); }
.ip-back svg { width: 14px; height: 14px; }

/* ============================================================
   Hero
   ============================================================ */

.ip-hero {
  margin-bottom: 40px;
}
.ip-hero h1 {
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 700;
  margin: 8px 0 14px;
  color: var(--ds-text);
}
.ip-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ds-muted);
  max-width: 720px;
  margin: 0;
}

/* ============================================================
   Section frames
   ============================================================ */

.ip-section {
  margin-top: 48px;
}
.ip-section h2 {
  font-size: 22px;
  letter-spacing: -0.012em;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--ds-text);
}

/* ============================================================
   Stack picker grid
   ============================================================ */

.ip-stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.ip-stack-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 160ms, border-color 160ms, box-shadow 160ms;
}
.ip-stack-card:hover {
  transform: translateY(-1px);
  border-color: var(--ds-border-strong);
  box-shadow: var(--ds-shadow-sm);
}
.ip-stack-card.is-active {
  border-color: var(--ds-accent);
  box-shadow: 0 0 0 1px var(--ds-accent) inset, var(--ds-shadow-md);
}

.ip-stack-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--ds-surface-soft);
  border: 1px solid var(--ds-border);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ds-text);
}

.ip-stack-meta {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ip-stack-meta strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--ds-text);
  letter-spacing: -0.005em;
}
.ip-stack-meta span {
  font-size: 13px;
  color: var(--ds-muted);
  line-height: 1.4;
}

.ip-stack-arrow {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--ds-muted-soft);
  transition: transform 160ms, color 160ms;
}
.ip-stack-arrow svg { width: 100%; height: 100%; }
.ip-stack-card:hover .ip-stack-arrow {
  transform: translateX(2px);
  color: var(--ds-text);
}
.ip-stack-card.is-active .ip-stack-arrow {
  color: var(--ds-accent);
}

/* ============================================================
   Prompt view
   ============================================================ */

.ip-prompt-view[hidden] { display: none; }

.ip-prompt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ip-prompt-sub {
  font-size: 14px;
  color: var(--ds-muted);
  margin: 4px 0 0;
}

/* Personalization pill */
.ip-personalization { flex: 0 0 auto; }
.ip-pers-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--ds-border);
  background: var(--ds-surface);
}
.ip-pers-pill svg { width: 14px; height: 14px; flex: 0 0 14px; }
.ip-pers-pill.is-on {
  border-color: rgba(14, 122, 82, 0.25);
  background: rgba(14, 122, 82, 0.06);
  color: var(--ds-success);
}
.ip-pers-pill.is-on strong { color: var(--ds-success); }
.ip-pers-pill.is-off { color: var(--ds-muted); }
.ip-pers-pill.is-off a {
  color: var(--ds-accent-strong);
  text-decoration: none;
  font-weight: 600;
}
.ip-pers-pill.is-off a:hover { text-decoration: underline; }

/* Format toggle */
.ip-format-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ip-format-label {
  font-size: 13px;
  color: var(--ds-muted);
  font-weight: 500;
}
.ip-format-tabs {
  display: inline-flex;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  padding: 4px;
  background: var(--ds-surface);
  gap: 2px;
}
.ip-format-tab {
  padding: 6px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms, color 140ms;
}
.ip-format-tab:hover { color: var(--ds-text); }
.ip-format-tab.is-active {
  background: var(--ds-text);
  color: var(--ds-bg);
}
.ip-format-desc {
  font-size: 13px;
  color: var(--ds-muted);
  margin: 0 0 18px;
}

/* Prompt + sidebar */
.ip-prompt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 980px) {
  .ip-prompt-grid { grid-template-columns: 1fr; }
}

.ip-prompt-pane {
  background: #14110f; /* deeper than --ds-text for code surface */
  border-radius: var(--ds-radius);
  overflow: hidden;
  border: 1px solid var(--ds-border-strong);
}

.ip-prompt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.ip-prompt-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.ip-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms;
}
.ip-copy-btn:hover { background: rgba(255, 255, 255, 0.14); }
.ip-copy-btn.is-flashed {
  background: rgba(14, 122, 82, 0.35);
  border-color: rgba(14, 122, 82, 0.5);
}
.ip-copy-btn svg { width: 14px; height: 14px; }

.ip-prompt-body {
  margin: 0;
  padding: 20px 22px;
  max-height: 70vh;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  white-space: pre-wrap;
  word-break: break-word;
}
.ip-prompt-body code {
  font-family: inherit;
  color: inherit;
}

/* Sidebar */
.ip-prompt-side {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  padding: 22px;
  position: sticky;
  top: 96px;
}
.ip-prompt-side h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ds-muted);
  margin: 0 0 14px;
}
.ip-phase-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 12px;
  counter-reset: phase;
}
.ip-phase-list li {
  display: grid;
  gap: 2px;
}
.ip-phase-list strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ds-text);
  letter-spacing: -0.005em;
}
.ip-phase-list span {
  font-size: 13px;
  color: var(--ds-muted);
  line-height: 1.45;
}

.ip-phase-callout {
  margin-top: 14px;
  padding: 14px;
  background: var(--ds-accent-soft);
  border-radius: 10px;
  border: 1px solid rgba(255, 110, 69, 0.18);
}
.ip-phase-callout strong {
  display: block;
  font-size: 13px;
  color: var(--ds-accent-strong);
  margin-bottom: 4px;
}
.ip-phase-callout p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ds-text-soft);
}

/* ============================================================
   Footer compact
   ============================================================ */

.docs-foot {
  border-top: 1px solid var(--ds-border);
  padding: 24px 32px;
  background: var(--ds-bg);
  margin-top: 60px;
}
.docs-foot-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ds-muted);
}
.docs-foot a { color: var(--ds-muted); text-decoration: none; }
.docs-foot a:hover { color: var(--ds-text); }

/* ============================================================
   Mobile tweaks
   ============================================================ */

@media (max-width: 720px) {
  .ip-page { padding: 24px 18px 64px; }
  .ip-hero h1 { font-size: 32px; }
  .ip-lede { font-size: 16px; }
  .ip-prompt-side { position: static; }
  .ip-prompt-body { font-size: 12px; padding: 16px; }
}
