/* htmlcssjs.net: the colours of the module pages around the Playground, tutorials, search and docs (integration plan 2, "Colours").
   It maps the module tokens (--hcj-*) onto the site's own palette (Tailwind indigo and gray, as the header, cards and buttons use) and
   gives the module pages the site's rhythm. The three Playground themes (dark, light, contrast) keep their tested values: nothing here
   touches --pg-*. The site has one light look, so the tokens stay light when the visitor's system prefers dark. */
html:root {
  --hcj-fg: #1f2937;
  --hcj-bg: #ffffff;
  --hcj-muted: #4b5563;
  --hcj-line: #6b7280;
  --hcj-soft: #f3f4f6;
  --hcj-accent: #3730a3;
  --hcj-on-accent: #ffffff;
  --hcj-focus: #3730a3;
  --hcj-mark-bg: #fde68a;
  --hcj-mark-fg: #1f2937;
  --hcj-active-bg: #e0e7ff;
  --hcj-ring: #4338ca;
}
@media (prefers-color-scheme: dark) {
  html:root {
    --hcj-fg: #1f2937; --hcj-bg: #ffffff; --hcj-muted: #4b5563; --hcj-line: #6b7280; --hcj-soft: #f3f4f6; --hcj-accent: #3730a3;
    --hcj-on-accent: #ffffff; --hcj-focus: #3730a3; --hcj-mark-bg: #fde68a; --hcj-mark-fg: #1f2937; --hcj-active-bg: #e0e7ff; --hcj-ring: #4338ca;
  }
}
/* the page around a module (the shell prints <main class="hcj-shell-main"> in the site's own layout) */
.hcj-shell-main { display: block; max-width: 80rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; color: #1f2937; }
@media (min-width: 640px) { .hcj-shell-main { padding: 2rem 1.5rem 4rem; } }
.hcj-page-title { font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; color: #1f2937; margin: 0 0 .5rem; }
.hcj-page-lead { margin: 0 0 1rem; color: #4b5563; max-width: 60rem; }
.hcj-page-lead a { color: #3730a3; text-decoration: underline; }
.hcj-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin: 0 0 1rem; }
.hcj-page-actions a { color: #3730a3; text-decoration: underline; }
.hcj-tour-btn { display: inline-flex; align-items: center; min-height: 36px; margin: 0; padding: .25rem .875rem; font: inherit; font-weight: 500; color: #3730a3; background: #ffffff; border: 1px solid #6b7280; border-radius: .5rem; cursor: pointer; }
.hcj-tour-btn:hover { background: #e0e7ff; }
.hcj-tour-btn:focus-visible { outline: 3px solid #3730a3; outline-offset: 2px; }
.hcj-page-actions a:focus-visible { outline: 3px solid #3730a3; outline-offset: 2px; border-radius: 2px; }

/* ---- documentation pages (/docs/playground/): the site's reset removes heading sizes, list marks and link colours; this restores a readable page in the site's look */
.hcj-page-docs { max-width: 64rem; margin: 0 auto; padding: 1.25rem; color: #1f2937; background: #ffffff; border: 1px solid #e5e7eb; border-radius: .75rem; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); line-height: 1.65; }
@media (min-width: 768px) { .hcj-page-docs { padding: 2rem 2.5rem; } }
.hcj-page-docs h1 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; margin: 0 0 1rem; color: #111827; }
.hcj-page-docs h2 { font-size: 1.5rem; line-height: 2rem; font-weight: 700; margin: 2.5rem 0 .75rem; padding-top: 1.25rem; border-top: 1px solid #d1d5db; color: #111827; }
.hcj-page-docs h3 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; margin: 1.5rem 0 .5rem; color: #111827; }
.hcj-page-docs [id] { scroll-margin-top: 6rem; }
.hcj-page-docs p { margin: 0 0 1rem; max-width: 48rem; }
.hcj-page-docs ul, .hcj-page-docs ol { margin: 0 0 1rem; padding-left: 1.5rem; max-width: 48rem; }
.hcj-page-docs ul { list-style: disc; }
.hcj-page-docs ol { list-style: decimal; }
.hcj-page-docs li { margin: .25rem 0; }
.hcj-page-docs a { color: #3730a3; text-decoration: underline; text-underline-offset: .15em; }
.hcj-page-docs a:hover { color: #312e81; }
.hcj-page-docs a:focus-visible { outline: 3px solid #3730a3; outline-offset: 2px; border-radius: 2px; }
.hcj-page-docs code { font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; padding: .05em .35em; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 4px; }
.hcj-page-docs nav[aria-label="On this page"] { margin: 0 0 1.5rem; padding: 1rem 1.25rem; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: .5rem; }
.hcj-page-docs .docs-toc { columns: 2 16rem; column-gap: 2rem; list-style: none; margin: 0; padding: 0; max-width: none; }
.hcj-page-docs .docs-toc li { break-inside: avoid; }
.hcj-page-docs .docs-table { max-width: 100%; }
.hcj-page-docs .docs-table th { background: #f3f4f6; }
.hcj-page-docs .docs-table caption { font-size: 1rem; }
.hcj-page-docs .docs-table tbody th { font-weight: 500; }
@media (max-width: 30em) { .hcj-page-docs .docs-table th { background: transparent; } }
.hcj-page-docs section { margin: 0; }

/* ---- the Playground page fits one screen (round 1): the title, the one-line lead and the two links share one row, and the Playground is as
   tall as the window leaves room for, so the console and the status bar are in view at 1440 x 900 (and at 1280 x 720 down to 30rem).
   Below 720 px the module's own phone layout and heights are kept. The height leaves room for the tour banner (first visit only, a sibling before the Playground), so the page does not jump when the banner is answered. */
@media (min-width: 720px) {
  .hcj-page-pg { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.5rem; }
  .hcj-page-pg > .hcj-page-title { font-size: 1.5rem; line-height: 2rem; margin: 0; }
  .hcj-page-pg > .hcj-page-lead { flex: 1 1 18rem; margin: 0; }
  .hcj-page-pg > .hcj-page-actions { margin: 0; }
  .hcj-page-pg > .hcj-tour-banner, .hcj-page-pg > .hcj-pg { flex: 1 1 100%; min-width: 0; }
  .hcj-page-pg > .hcj-pg[data-hcj-pg="full"] { height: clamp(30rem, calc(100vh - 16.5rem), 60rem); }   /* room for the first-visit banner too, so nothing jumps when it appears or goes (and a film's promised size does not change under the dialog) */
}
