/* Impossible Creature Generator — docs-only layer on top of styles.css.
 *
 * Kept separate so the app bundle does not carry the weight of the code-sample
 * styling. Loaded by api.html only. Every custom property has a fallback so the
 * page still reads correctly if it is ever served without the app stylesheet. */

main.doc { max-width: 1000px; }

main h1 { font-size: 27px; line-height: 1.2; margin: 8px 0 14px; letter-spacing: -0.01em; }
main h2 {
  font-size: 19px;
  margin: 34px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line, #2a2a33);
}
main h3 { font-size: 15px; margin: 22px 0 8px; color: var(--ink2, #b9b9c4); }
main p { max-width: 78ch; color: var(--ink2, #b9b9c4); }
main p strong, main li strong, main td strong { color: var(--ink, #f2f2f5); }
main ul, main ol { max-width: 78ch; color: var(--ink2, #b9b9c4); padding-left: 20px; }
main li { margin: 7px 0; }

main .hint {
  border-left: 2px solid var(--line, #2a2a33);
  padding-left: 12px;
  font-size: 13.5px;
  color: var(--ink3, #8b8b98);
}

code {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 0.88em;
  background: var(--panel2, #16161c);
  border: 1px solid var(--line, #2a2a33);
  border-radius: 4px;
  padding: 1px 5px;
}

pre {
  background: var(--panel2, #16161c);
  border: 1px solid var(--line, #2a2a33);
  border-radius: 0 8px 8px 8px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 22px;
}
pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink, #f2f2f5);
  white-space: pre;
}
/* A standalone block with no tab strip above it wants all four corners. */
pre:not([data-lang]), pre.plainpre { border-radius: 8px; margin: 12px 0; }

/* --- language tabs ------------------------------------------------------- */

main.doc .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 16px 0 0;
  border-bottom: 1px solid var(--line, #2a2a33);
}
main.doc .tabs button[data-lang] {
  background: transparent;
  color: var(--ink3, #8b8b98);
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  padding: 6px 13px;
  font-size: 13px;
  cursor: pointer;
}
main.doc .tabs button[data-lang]:hover { color: var(--ink, #f2f2f5); }
main.doc .tabs button[data-lang].is-on {
  background: var(--panel2, #16161c);
  color: var(--ink, #f2f2f5);
  border-color: var(--line, #2a2a33);
  position: relative;
  top: 1px;
}

/* api-docs.js hides the seven inactive samples with this class. Declared here
 * too so the page never flashes all eight blocks before the script runs. */
.hidden { display: none !important; }

/* --- tables -------------------------------------------------------------- */

main table {
  width: 100%;
  max-width: 78ch;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 13.5px;
}
main th, main td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line, #2a2a33);
  color: var(--ink2, #b9b9c4);
}
main th { color: var(--ink, #f2f2f5); font-weight: 600; }
main td code { white-space: nowrap; }

/* --- token callout ------------------------------------------------------- */

main .token-box {
  background: var(--panel, #101015);
  border: 1px solid var(--line, #2a2a33);
  border-radius: var(--radius, 10px);
  padding: 14px 16px;
  margin: 14px 0;
  max-width: 78ch;
}
main .token-val {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 13px;
  word-break: break-all;
  color: var(--ink2, #b9b9c4);
}

@media (max-width: 640px) {
  main.doc .tabs button[data-lang] { padding: 6px 9px; }
  pre code { font-size: 12px; }
}
