/* ============================================================================
   Docs / instructions pages (apps/www/docs/*).
   Chrome + design tokens come from /styles.css (the site header, footer, fonts,
   and :root palette). This file adds ONLY the prose / step / figure styling for a
   long-form instructions page. Loaded after styles.css so it can lean on the
   tokens (--bg, --panel, --border, --text, --dim-2, --keeper, --display, --body).
   ========================================================================== */

.docs {
  flex: 1;                      /* push the footer to the bottom on short pages */
  width: 100%;
  max-width: 820px;             /* a readable measure, narrower than the landing */
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) var(--pad) clamp(56px, 8vw, 96px);
}

/* --- headings ------------------------------------------------------------- */
.docs__title {
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.05; letter-spacing: -0.03em; font-weight: 780;
}
.docs__lede {
  color: var(--dim-2);
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.6; margin-top: 16px; max-width: 60ch;
}
.docs h2 {
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.02em; font-weight: 720;
  margin-top: clamp(40px, 6vw, 64px); margin-bottom: 14px;
  padding-top: clamp(24px, 4vw, 36px);
  border-top: 1px solid var(--border);
}
.docs h2:first-of-type { border-top: 0; padding-top: 0; }
.docs h3 {
  font-family: var(--display);
  font-size: 17px; font-weight: 650; letter-spacing: -0.01em;
  margin-top: 28px; margin-bottom: 8px;
}
.docs p { color: var(--dim-2); line-height: 1.62; margin-top: 12px; }
.docs a { color: var(--keeper); text-underline-offset: 2px; }
.docs a:hover { text-decoration: underline; }
.docs strong { color: var(--text); font-weight: 650; }

/* --- inline code + URL ---------------------------------------------------- */
.docs code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 6px; color: var(--text);
  word-break: break-word;
}
/* The MCP server URL, presented as a copy-ready block. */
.docs__url {
  display: block; margin-top: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(14px, 2.2vw, 16px);
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--keeper);
  border-radius: 10px; padding: 13px 16px; color: var(--text);
  word-break: break-all; user-select: all;
}

/* --- "what you'll need" callout ------------------------------------------- */
.callout {
  margin-top: 22px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: clamp(18px, 3vw, 24px);
}
.callout h2 { margin: 0 0 4px; border: 0; padding: 0; font-size: 18px; }
.callout ul { list-style: none; margin-top: 10px; }
.callout li {
  position: relative; color: var(--dim-2); line-height: 1.55;
  padding-left: 24px; margin-top: 9px;
}
.callout li::before {
  content: ""; position: absolute; left: 4px; top: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--keeper); box-shadow: 0 0 10px rgba(245, 200, 75, 0.6);
}

/* --- numbered steps ------------------------------------------------------- */
.steps { list-style: none; counter-reset: step; margin-top: 18px; }
.steps > li {
  position: relative; counter-increment: step;
  padding-left: 46px; margin-top: 24px;
  color: var(--dim-2); line-height: 1.6;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 14.5px;
  color: var(--keeper-ink); background: var(--keeper);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(245, 200, 75, 0.25);
}
.steps > li > .step__lead {
  display: block; color: var(--text); font-weight: 600; margin-bottom: 2px;
  font-family: var(--display); letter-spacing: -0.01em;
}

/* --- figures (screenshots) ------------------------------------------------ */
.fig { margin: 16px 0 0; }
.fig img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel-2);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}
.fig figcaption {
  margin-top: 8px; color: var(--dim); font-size: 13px; line-height: 1.5;
}
/* Placeholder slot for a screenshot not yet captured — renders a labelled box
   instead of a broken <img>. Replace the whole .fig--pending block with a normal
   .fig + <img src="/docs/images/NAME.png"> once the screenshot is dropped in. */
.fig--pending {
  margin: 16px 0 0;
  border: 1px dashed var(--border); border-radius: 12px;
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(255,255,255,0.018) 12px 24px),
    var(--panel-2);
  padding: clamp(22px, 5vw, 40px); text-align: center;
}
.fig--pending .fig__icon { font-size: 22px; opacity: 0.6; }
.fig--pending .fig__what {
  display: block; margin-top: 8px; color: var(--dim-2); font-size: 14px;
}
.fig--pending .fig__file {
  display: inline-block; margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; color: var(--dim);
}

/* --- parameter table (create_frame) --------------------------------------- */
.params {
  width: 100%; margin-top: 16px; border-collapse: collapse;
  font-size: 14.5px;
}
.params caption {
  text-align: left; color: var(--dim); font-size: 13px; padding-bottom: 8px;
}
.params th, .params td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.params thead th {
  font-family: var(--display); font-weight: 650; color: var(--text);
  font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase;
}
.params tbody th {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 500; color: var(--text); white-space: nowrap;
}
.params td { color: var(--dim-2); line-height: 1.5; }

/* --- troubleshooting ------------------------------------------------------ */
.trouble { margin-top: 18px; }
.trouble > div {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel-2); padding: 16px 18px; margin-top: 12px;
}
.trouble dt {
  font-family: var(--display); font-weight: 650; color: var(--text);
  letter-spacing: -0.01em;
}
.trouble dd { color: var(--dim-2); line-height: 1.55; margin-top: 6px; }

/* --- back link ------------------------------------------------------------ */
.docs__back {
  display: inline-block; margin-top: clamp(40px, 6vw, 64px);
  font-family: var(--display); font-weight: 600; color: var(--keeper);
  text-decoration: none;
}
.docs__back:hover { text-decoration: underline; text-underline-offset: 3px; }
