/* Results from your software (A87, INTEGRATIONS_DIRECTION §3–§5): /integrations and /integrations/api-key. The
   prompt is words a person hands over, so it's Archivo, not a monospace. Tokens only. Loaded by both pages
   (content_for :head). */

/* ---------- The page grid: one column, then the prompt sticky on the right (§1 ruling 3, §3.2) ---------- */
.ig { display: flex; flex-direction: column; gap: 24px; }
.ig__lede { margin-top: 8px; }
.ig__facts { margin-top: 8px; }
.ig .page-section { margin-top: 32px; }
@media (min-width: 1024px) {
  .ig {
    display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: start;
    max-width: 1080px; padding: 8px; margin: 0 auto;
  }
  .ig__side { position: sticky; top: calc(var(--header-h) + 24px); grid-column: 2; grid-row: 1 / span 2; }
  .ig__head { grid-column: 1; }
  .ig__body { grid-column: 1; }
}
@media (min-width: 1280px) { .ig { grid-template-columns: minmax(0, 1fr) 440px; } }

/* ---------- The prompt card ---------- */
.prompt { margin: 0; padding-bottom: 0; }
.prompt__plate { margin-bottom: 12px; }
.prompt__field { margin-bottom: 16px; }
.prompt__link { margin-top: 2px; }
.prompt__filled { margin: -4px 0 12px; }
.prompt__well {
  margin: 0; padding: 16px; border-radius: var(--radius-control); background: var(--surface-2); color: var(--ink);
  font-family: var(--font); font-stretch: var(--wdth-read); font-weight: 400; font-size: var(--fs-body); line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; tab-size: 2;
}
.prompt__well:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.prompt__slot {
  padding: 0 4px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-plate);
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.prompt__slot.is-filled { padding: 0; border: 0; color: var(--ink); }

/* The copy bar: sticks to the screen's bottom while the card is in view, above the tab bar and the Play Bar */
.prompt__bar {
  position: sticky; bottom: env(safe-area-inset-bottom); z-index: 2;
  margin: 16px -16px 0; padding: 12px 16px; border-radius: 0 0 var(--radius-card) var(--radius-card);
  background: var(--surface-1); border-top: 1px solid var(--line);
}
body.is-signed-in .prompt__bar { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
body.is-signed-in.has-playbar .prompt__bar { bottom: calc(var(--tabbar-h) + var(--playbar-h) + env(safe-area-inset-bottom)); }
.prompt__under { margin-top: 8px; }
.prompt__label { display: inline-flex; align-items: center; gap: 8px; }
.prompt__label[hidden] { display: none; }
.prompt__copy .prompt__label:not([hidden]) { animation: ig-slot var(--dur-slot) var(--ease-out); }
@keyframes ig-slot { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ig-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .prompt__copy .prompt__label:not([hidden]) { animation: ig-fade 120ms linear; }
}
@media (min-width: 1024px) {
  .ig .prompt__well { max-height: max(280px, calc(100dvh - 400px)); overflow-y: auto; padding-bottom: 0; }
  .ig .prompt__well::after { content: ""; display: block; height: 16px; }
  .prompt__bar { position: static; margin: 16px 0 0; padding: 0 0 16px; border-top: 0; background: none; }
}

/* How it works (§3.4) is the kit's .steps (foos.css). */
.ig .perks { margin: 0; }
.ig-spec { margin-top: 12px; border-top: 1px solid var(--line); text-decoration: none; }
.ig-spec .list-row__end { color: var(--ink-2); }
.ig-foot { margin-top: 32px; }
.ig-foot a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- The key page (§4): a reading column ---------- */
.ik .head { padding-bottom: 0; }
.ik__how { margin: 8px 0; align-self: flex-start; }
.ik__signin { margin-top: 16px; }
.ik__club { border-top: 1px solid var(--line); }
.ik select.input { appearance: auto; }
.ik .prompt { margin-top: 24px; }
.key-well { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border-radius: var(--radius-control); background: var(--surface-2); }
.key-well__key {
  margin: 0; color: var(--ink); font-stretch: var(--wdth-read); font-weight: 600; font-size: var(--fs-body); line-height: 1.5;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all;
}
.key-well .btn { margin-top: 4px; }
.ik-keys { margin: 0; padding: 0; list-style: none; }
.ik-keys .list-row { gap: 12px; }
.ik-keys .btn { flex: none; }
.ik-keys--revoked .list-row__title { color: var(--ink-2); font-weight: 500; }
.ik__used { margin-top: 8px; }
.ik__lost { margin-top: 16px; }
.ik__new { margin-top: 12px; }
