html[data-theme="light"] {
  --pst-color-primary: #096b76;
  --pst-color-secondary: #b56522;
}
html[data-theme="dark"] {
  --pst-color-primary: #6bd3d9;
  --pst-color-secondary: #f2b36f;
}
.bd-main .bd-content .bd-article-container { max-width: 58rem; }
.navbar-brand-text { font-weight: 650; font-size: 1.05rem; }
.sd-card { border-radius: .6rem; }
.sd-card-title { color: var(--pst-color-primary); }
.sphx-glr-thumbcontainer { border-radius: .5rem; }

/* Outcome-led home and full visual catalogue, with theme-aware surfaces. */
.energy-hero {
  padding: 1.6rem;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--pst-color-border);
  border-left: 5px solid var(--pst-color-primary);
  border-radius: .8rem;
  background: var(--pst-color-surface);
}
.energy-hero .hero-line { font-size: 1.65rem; font-weight: 700; line-height: 1.3; }
.energy-hero .hero-eyebrow, .example-kicker {
  color: var(--pst-color-primary);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .04em;
}
.energy-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.2rem; }
.energy-actions a {
  padding: .6rem 1rem;
  border: 1px solid var(--pst-color-primary);
  border-radius: .4rem;
  font-weight: 600;
}
.energy-actions a:first-child { background: var(--pst-color-primary); color: var(--pst-color-background); }
.featured-examples .sd-card-img-top {
  width: 100%; height: 180px; object-fit: contain; background: white; padding: .5rem;
}
.example-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin: 1rem 0; }
.example-filters label { display: grid; gap: .4rem; font-weight: 600; flex: 1 1 13rem; }
.example-filters input, .example-filters select, .example-reset {
  font: inherit; padding: .6rem .8rem; border: 1px solid var(--pst-color-border);
  border-radius: .4rem; background: var(--pst-color-background); color: var(--pst-color-text-base);
  min-width: 0; width: 100%;
}
.example-reset { width: auto; cursor: pointer; }
.example-count { color: var(--pst-color-text-muted); font-size: .9rem; }
.example-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.example-card {
  border: 1px solid var(--pst-color-border); border-radius: .7rem; overflow: hidden;
  background: var(--pst-color-background); transition: border-color .15s ease;
}
.example-card:hover { border-color: var(--pst-color-primary); }
.example-card a { display: block; height: 100%; color: inherit; text-decoration: none; }
.example-card img { width: 100%; height: 160px; object-fit: contain; background: white; padding: .4rem; }
.example-card-body { padding: 1rem; }
.example-card h3 { font-size: 1rem; line-height: 1.45; margin: .5rem 0; overflow-wrap: anywhere; }
.example-card-body p { font-size: .85rem; margin-bottom: .4rem; }
.example-card-body .example-dates { color: var(--pst-color-text-muted); }
.example-open { display: block; color: var(--pst-color-primary); font-size: .8rem; margin-top: 1rem; }
.example-browser [hidden] { display: none !important; }
.example-card:focus-within, .example-filters :focus-visible, .energy-actions a:focus-visible {
  outline: 3px solid var(--pst-color-primary); outline-offset: 3px;
}
@media (max-width: 1100px) { .example-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) {
  .example-cards { grid-template-columns: 1fr; }
  .energy-hero { padding: 1rem; }
}

/* Category pages show concise navigation; topic pages show readable examples. */
.gallery-navigation .sd-card-title {
  font-size: 1.1rem;
  line-height: 1.4;
}
.gallery-navigation .sd-card-text { line-height: 1.6; }
.gallery-topic .sphx-glr-thumbnails {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.gallery-topic .sphx-glr-thumbcontainer {
  padding: 1.25rem;
  gap: 1rem;
  box-shadow: none;
  border: 1px solid var(--pst-color-border);
}
.gallery-topic .sphx-glr-thumbnail-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}
.gallery-topic .sphx-glr-thumbcontainer:hover {
  border-color: var(--pst-color-primary);
}
.gallery-topic .sphx-glr-thumbcontainer:focus-within,
.gallery-navigation .sd-card:focus-within {
  outline: 3px solid var(--pst-color-primary);
  outline-offset: 3px;
}
/* Preserve the link name for assistive technology instead of display:none. */
.gallery-topic .sphx-glr-thumbcontainer p a span {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 575px) {
  .gallery-topic .sphx-glr-thumbnails { grid-template-columns: 1fr; }
}
