:where(.psst-article, .psst-header, .psst-footer) {
  --psst-line: color-mix(in srgb, currentColor 18%, transparent);
}
:where(.psst-article) *, :where(.psst-article) *::before, :where(.psst-article) *::after { box-sizing: border-box; }

/* PSST's own shell: only when the page has no site skin, or in @saypsst/next's built-in shell. */
.psst-doc, body:has(.psst-header) {
  color-scheme: light dark;
  --psst-bg: #ffffff;
  --psst-fg: #1a1a1a;
  --psst-accent: #1d4ed8;
  margin: 0;
  background: var(--psst-bg);
  color: var(--psst-fg);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  .psst-doc, body:has(.psst-header) {
    --psst-bg: #121212;
    --psst-fg: #ececec;
    --psst-accent: #8ab4ff;
  }
}
.psst-doc a, body:has(.psst-header) a { color: var(--psst-accent); text-underline-offset: 2px; }
.psst-doc .psst-main, body:has(.psst-header) main:has(> .psst-article), .psst-header, .psst-footer {
  box-sizing: border-box; max-width: 46rem; margin: 0 auto; padding: 0 16px;
}
.psst-doc .psst-main, body:has(.psst-header) main:has(> .psst-article) { padding-top: 32px; padding-bottom: 48px; }
.psst-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding-top: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--psst-line);
}
.psst-brand { font-weight: 650; color: inherit; text-decoration: none; }
.psst-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.psst-footer { padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--psst-line); opacity: .75; font-size: 14px; }
.psst-doc .psst-article h1, body:has(.psst-header) .psst-article h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 12px; }
.psst-doc .psst-article h2, body:has(.psst-header) .psst-article h2 { font-size: 24px; line-height: 1.25; margin: 40px 0 12px; }
.psst-doc .psst-article h3, body:has(.psst-header) .psst-article h3 { font-size: 19px; line-height: 1.3; margin: 28px 0 8px; }
.psst-doc .psst-button-own, body:has(.psst-header) .psst-button {
  background: var(--psst-accent); border-color: var(--psst-accent); color: var(--psst-bg);
}

/* Content parts: zero specificity, inheriting the font and colour of wherever the article sits. */
:where(.psst-lede) { font-size: 1.12em; opacity: .8; margin: 0 0 8px; }
:where(.psst-updated) { font-size: .82em; opacity: .7; margin: 0 0 24px; }
:where(.psst-article) img { max-width: 100%; height: auto; }
:where(.psst-article) figure { margin: 24px 0; }
:where(.psst-table) { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .9em; }
:where(.psst-table) caption { text-align: left; font-weight: 600; padding-bottom: 8px; }
:where(.psst-table) :is(th, td) { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--psst-line); }
:where(.psst-table) thead th { border-bottom-width: 2px; }
:where(.psst-notes) { font-size: .85em; opacity: .75; }
:where(.psst-faq) dt { font-weight: 600; margin-top: 16px; }
:where(.psst-faq) dd { margin: 4px 0 0; }
:where(.psst-facts) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 16px; }
:where(.psst-facts) dt { font-weight: 600; }
:where(.psst-facts) dd { margin: 0; }
:where(.psst-cta) { margin: 32px 0; }
:where(.psst-button-own, .psst-button:not([class*=" "])) {
  display: inline-block; padding: 10px 18px; border: 2px solid currentColor; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
:where(.psst-citation) { font-size: .9em; opacity: .8; }
:where(.psst-sources) { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--psst-line); font-size: .9em; }
:where(.psst-sources) h2 { font-size: 1.1em; margin-top: 0; }
:where(.psst-index-list) { list-style: none; padding: 0; margin: 24px 0 0; }
:where(.psst-index-list) li { padding: 20px 0; border-top: 1px solid var(--psst-line); }
:where(.psst-index-list) h2 { font-size: 1.2em; line-height: 1.3; margin: 0 0 6px; }
:where(.psst-index-list) p { margin: 0 0 6px; }
