/* ------------------------------------------------------------------
   The guide pages: integration, and prompt-studio on top of it (see
   prompt-studio.css). The tokens, the header, the footer and the
   section rhythm come from style.css, which every page shares.

   Class names are prefixed `doc-` so that this file and the front
   page's can be read side by side without wondering which `.card` is
   meant. What is not prefixed — .wrap, .section, .tick-list — is
   deliberately the same component in both places.
   ------------------------------------------------------------------ */

/* ---------------- the top of the page ---------------- */
.doc-hero { padding: clamp(40px, 6vw, 76px) 0 clamp(30px, 4vw, 52px); }
.doc-hero .eyebrow { margin-bottom: 18px; }
.doc-h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.1;
  letter-spacing: -.02em; max-width: 20ch; margin-bottom: .4em;
}
.doc-lede { font-size: clamp(1.05rem, 1.9vw, 1.24rem); color: var(--text-soft); max-width: 62ch; margin: 0 0 14px; }
.doc-sub { font-size: .98rem; color: var(--text-mute); max-width: 76ch; margin: 0; }
.doc-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.doc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .94rem; font-weight: 620; text-decoration: none;
  padding: 11px 20px; border-radius: 13px;
  border: 1px solid var(--border-strong); color: var(--text-soft); background: var(--surface);
  transition: transform .16s ease, box-shadow .16s ease, color .16s ease;
}
.doc-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none; }
.doc-btn.primary {
  color: var(--accent-ink); border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 26px rgba(var(--accent-rgb), .3);
}
.doc-btn.primary:hover { color: var(--accent-ink); filter: brightness(1.06); }

.doc-stats {
  list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0;
  display: grid; gap: 18px 26px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  border-top: 1px solid var(--border); padding-top: 22px;
}
.doc-stats li { display: flex; flex-direction: column; gap: 4px; }
.doc-stats b {
  font-family: var(--mono); font-size: .95rem; font-weight: 620;
  color: var(--accent); letter-spacing: -.01em;
}
.doc-stats span { font-size: .84rem; color: var(--text-mute); }

/* ---------------- two cards side by side ---------------- */
.doc-two {
  display: grid; gap: clamp(16px, 2vw, 22px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.doc-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: clamp(20px, 2.6vw, 30px);
}
.doc-card h3 { font-size: 1.16rem; margin: 0 0 .45em; }
.doc-card > p { color: var(--text-soft); font-size: .96rem; margin: 0 0 1.1em; }
.doc-num {
  display: inline-block; margin-bottom: 12px;
  font-family: var(--mono); font-size: .72rem; font-weight: 620; letter-spacing: .08em;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), .26);
  border-radius: 999px; padding: 3px 10px;
}

/* ---------------- prose ---------------- */
.doc-h3 { font-size: 1.2rem; margin: clamp(30px, 4vw, 44px) 0 .5em; }
.doc-p { color: var(--text-soft); font-size: .98rem; max-width: 80ch; margin: 0 0 16px; }
.doc code, .doc-p code, .doc-note code, .doc-steps code, .doc-figure code {
  font-family: var(--mono); font-size: .86em;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 5px; color: var(--text);
  overflow-wrap: anywhere;
}

/* a paragraph that is worth stopping at, and its louder cousin */
.doc-note {
  margin: 20px 0; padding: 16px 18px; max-width: 84ch;
  font-size: .92rem; color: var(--text-soft);
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 12px;
}
.doc-note.warn {
  border-left-color: var(--warn);
  background: rgba(var(--warn-rgb), .07); border-color: rgba(var(--warn-rgb), .3);
}
.doc-note b, .doc-note strong { color: var(--text); }

/* ---------------- the numbered steps ---------------- */
.doc-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.doc-steps li {
  counter-increment: step; position: relative;
  padding: 16px 18px 16px 56px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.doc-steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 15px;
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: .82rem; font-weight: 700;
  color: var(--accent); background: var(--accent-soft);
}
.doc-steps b { display: block; font-size: 1rem; font-weight: 640; margin-bottom: 4px; }
.doc-steps p { margin: 0; font-size: .93rem; color: var(--text-soft); }

/* ---------------- the screenshots of the settings ---------------- */
/* One panel under the other rather than two side by side: these are
   dense windows, and half a column is not enough to read a label in. */
.doc-shots { display: grid; gap: clamp(16px, 2vw, 24px); margin-bottom: clamp(24px, 3vw, 36px); }
.doc-figure { margin: 0 0 clamp(24px, 3vw, 34px); max-width: 760px; }
/* The panels are photographed with their own corners and their own
   shadow, and the space around them is cut out — so no border, no
   rounding and no background of ours underneath. */
.doc-figure img { display: block; width: 100%; height: auto; }
.doc-figure figcaption { margin-top: 10px; font-size: .86rem; color: var(--text-mute); }

/* ---------------- tables ---------------- */
.doc-tablewrap {
  overflow-x: auto; margin: 0 0 22px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.doc-tablewrap table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.doc-tablewrap th, .doc-tablewrap td {
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.doc-tablewrap th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-mute); font-weight: 620; }
.doc-tablewrap tr:last-child td { border-bottom: 0; }
.doc-tablewrap td { color: var(--text-soft); }
.doc-eps td:first-child, .doc-eps td:nth-child(2) { white-space: nowrap; }
.doc-eps .m {
  font-family: var(--mono); font-size: .74rem; font-weight: 700; letter-spacing: .04em;
  color: var(--text-mute); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px;
}
.doc-eps .m.post { color: var(--accent); background: var(--accent-soft); border-color: rgba(var(--accent-rgb), .3); }

/* ---------------- code ---------------- */
.doc-code {
  margin: 0 0 22px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--code-border); background: var(--code-bg);
}
.doc-code-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; font-size: .8rem; color: var(--code-mute);
  border-bottom: 1px solid var(--code-border); font-family: var(--mono);
}
.doc-tag {
  margin-left: auto; font-size: .72rem; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px;
  color: var(--code-mute); border: 1px solid var(--code-border);
}
.doc-code pre {
  margin: 0; padding: 16px; overflow-x: auto;
  font-family: var(--mono); font-size: .84rem; line-height: 1.6;
  color: var(--code-text);
}
.doc-code .k { color: #8ab4ff; }        /* keys and keywords */
.doc-code .s { color: #7fd8a4; }        /* strings */
.doc-code .n { color: #f0b866; }        /* numbers and literals */
.doc-code .c { color: var(--code-mute); font-style: italic; }

/* An event name is one token an integration matches on; broken at its hyphen
   it reads as two. */
.doc-ev { white-space: nowrap; }
