/* chertchain.com — only what the shared CHERT site system does not already provide.
 *
 * Adapted from chertrepat.css: a component card with a bulleted body, a table that scrolls instead of
 * squashing, a note line, and the screenshot gallery. Tokens only — no colour is written here.
 * Logical properties throughout, because this page ships in Arabic from the same stylesheet. */

/* ---- note under a section ------------------------------------------------------------------------ */
.cc-note {
  margin-block-start: 22px; padding-inline-start: 10px;
  display: flex; align-items: flex-start; gap: 10px;
  color: var(--chert-muted); font-size: .92rem; line-height: 1.65; max-inline-size: 70ch;
}
.cc-note svg { flex: 0 0 auto; margin-block-start: 3px; }
.sx-arch .cc-note { color: var(--chert-dark-muted); }

/* ---- component cards --------------------------------------------------------------------------- */
.cc-comps { display: grid; gap: 18px; margin-block-start: 28px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.cc-comp {
  border: 1px solid var(--chert-border); border-radius: 16px;
  background: var(--chert-surface); padding: 22px;
}
.cc-comp header { display: flex; gap: 14px; align-items: flex-start; margin-block-end: 14px; }
.cc-comp h3 { margin: 0 0 2px; font-size: 1.12rem; }
.cc-comp__what { margin: 0; color: var(--chert-muted); font-size: .86rem; }
.cc-comp ul { margin: 0; padding-inline-start: 1.15rem; display: grid; gap: 7px; }
.cc-comp li { font-size: .92rem; line-height: 1.6; }

/* ---- tables that scroll rather than squash ----------------------------------------------------- */
.cc-table { overflow-x: auto; margin-block-start: 26px;
  border: 1px solid var(--chert-border); border-radius: 14px; background: var(--chert-surface); }
.cc-table table { inline-size: 100%; border-collapse: collapse; min-inline-size: 36rem; }
.cc-table th, .cc-table td {
  padding: 13px 16px; text-align: start; vertical-align: top;
  border-block-end: 1px solid var(--chert-border); font-size: .92rem; line-height: 1.6;
}
.cc-table thead th { background: var(--chert-surface-alt); color: var(--chert-ink);
  font-weight: 700; font-size: .84rem; letter-spacing: .02em; }
.cc-table tbody tr:last-child th, .cc-table tbody tr:last-child td { border-block-end: 0; }
.cc-table tbody th { font-weight: 600; inline-size: 30%; }

/* ---- a stage panel needs no JS to be readable -------------------------------------------------- */
.sx-life__panels { display: grid; gap: 16px; margin-block-start: 30px;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }

/* ---- the reveal animates position, never visibility (same fix as chertrepat.com) ---------------- */
.js .sx-reveal { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .sx-reveal, .js .sx-reveal { opacity: 1 !important; transform: none !important; }
}

/* ---- orange cannot carry small text on cream (same fix as chertrepat.com) ----------------------- */
.sx-nav.is-solid .sx-nav__brand b { color: var(--chert-ink); }
.sx-stage__count { color: var(--chert-ink); }

/* ---- the gallery: real screens from the running application ------------------------------------- */
.cc-gallery { background: var(--chert-dark); color: var(--chert-dark-text); }
.cc-gallery__grid { display: grid; gap: 26px; margin-block-start: 34px;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.cc-shot { margin: 0; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--chert-dark-border); background: var(--chert-dark-surface); }
.cc-shot__frame { display: flex; gap: 6px; align-items: center;
  padding: 10px 14px; background: var(--chert-dark); border-block-end: 1px solid var(--chert-dark-border); }
.cc-shot__frame span { inline-size: 9px; block-size: 9px; border-radius: 50%;
  background: color-mix(in srgb, var(--chert-dark-text) 28%, transparent); }
.cc-shot img { display: block; inline-size: 100%; block-size: auto; }
.cc-shot figcaption { padding: 13px 16px; font-size: .88rem; line-height: 1.55;
  color: var(--chert-dark-muted); }
@media (max-width: 420px) { .cc-gallery__grid { grid-template-columns: 1fr; } }

/* ---- the secondary button is ink-on-transparent, which vanishes on a dark ground ----------------- */
/* The nav is transparent over the dark hero until it goes solid on scroll; there the outline button
   takes the dark-ground text colour. Same family bug as the reveal fixes above. */
.sx-nav:not(.is-solid) .btn--secondary { color: var(--chert-dark-text); border-color: var(--chert-dark-text); }
.sx-nav:not(.is-solid) .btn--secondary:hover { background: var(--chert-dark-text); color: var(--chert-ink); }
