:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #252525;
  background: #fff;
}
* { box-sizing: border-box; }
body { max-width: 1120px; margin: 0 auto; padding: 38px 30px 24px; }
a { color: #245a91; text-underline-offset: 3px; }
a:hover { color: #143b62; }
a:focus-visible { outline: 2px solid #245a91; outline-offset: 4px; }
header { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid #ccc; }
.title { color: #252525; font: bold 27px ui-monospace, SFMono-Regular, Consolas, monospace; text-decoration: none; letter-spacing: -1px; }
nav { display: flex; flex-wrap: wrap; gap: 23px; font-size: 14px; }
main { padding-top: 27px; }
h1 { font-size: 26px; font-weight: 600; line-height: 1.3; margin: 0 0 20px; letter-spacing: -.5px; }
h2 { font-size: 20px; line-height: 1.4; font-weight: 600; margin: 33px 0 12px; }
p { margin: 0 0 15px; }
ul, ol { margin: 0 0 17px; padding-left: 24px; }
li { padding-left: 2px; margin-bottom: 4px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 22px 0 28px; }
.primary-link { display: inline-block; padding: 9px 16px; border-radius: 4px; background: #245a91; color: #fff; text-decoration: none; font-weight: 600; }
.primary-link:hover { background: #143b62; color: #fff; }
footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #ccc; margin-top: 35px; padding-top: 18px; color: #626262; font-size: 12px; }
.skip { position: absolute; top: -100px; padding: 8px 12px; background: #fff; }
.skip:focus { top: 3px; }
@media (max-width: 520px) {
  body { padding: 24px 20px 20px; }
  header { gap: 15px; flex-wrap: wrap; }
  nav { gap: 15px; font-size: 13px; }
  .title { font-size: 25px; }
  h1 { font-size: 24px; }
}

main > p, main > section > p, main > section > ul { max-width: 760px; }
section { margin-top: 42px; }
figure { margin: 22px 0; }
figure a { display: block; border-radius: 8px; }
figure img { display: block; width: 100%; height: auto; border: 1px solid #d4dbe2; border-radius: 8px; }
figcaption { margin-top: 10px; color: #535f6b; font-size: 13px; line-height: 1.55; }
.creation-preview { border: 1px solid #d4dbe2; border-radius: 8px; padding: 16px 20px; }
.creation-preview summary { color: #245a91; cursor: pointer; font-weight: 600; }
.creation-preview summary:focus-visible { outline: 2px solid #245a91; outline-offset: 4px; }
.creation-preview[open] summary { margin-bottom: 14px; }
.creation-preview > p { max-width: 760px; }
.creation-preview figure { margin-bottom: 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
p code { font-size: .9em; overflow-wrap: anywhere; }
.config-example { margin: 22px 0; border: 1px solid #d4dbe2; border-radius: 8px; overflow: hidden; }
.example-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 12px 18px; background: #f3f6f9; border-bottom: 1px solid #d4dbe2; font-size: 13px; }
.example-heading span { font-weight: 600; }
.example-code { max-height: 560px; overflow: auto; font-size: 13px; line-height: 1.65; }
.example-code:focus-visible { outline: 2px solid #245a91; outline-offset: -2px; }
.example-code .highlight pre { margin: 0; padding: 20px; }
@media (max-width: 520px) {
  section { margin-top: 32px; }
  .creation-preview { padding: 14px; }
  .example-heading { padding: 10px 14px; }
  .example-code .highlight pre { padding: 14px; }
}

nav select { font: inherit; color: inherit; background: transparent; border: 1px solid #87919c; border-radius: 4px; padding: 2px 5px; }
:root[data-bs-theme="dark"] { color-scheme: dark; color: #dee2e6; background: #181b20; }
[data-bs-theme="dark"] a, [data-bs-theme="dark"] summary { color: #8bbcf0; }
[data-bs-theme="dark"] a:hover { color: #bddaff; }
[data-bs-theme="dark"] .title { color: #dee2e6; }
[data-bs-theme="dark"] header, [data-bs-theme="dark"] footer,
[data-bs-theme="dark"] figure img, [data-bs-theme="dark"] .creation-preview,
[data-bs-theme="dark"] .config-example, [data-bs-theme="dark"] .example-heading { border-color: #49515b; }
[data-bs-theme="dark"] footer, [data-bs-theme="dark"] figcaption { color: #adb5bd; }
[data-bs-theme="dark"] .example-heading, [data-bs-theme="dark"] .skip { background: #252a31; }
[data-bs-theme="dark"] .primary-link { color: #fff; }

/* Soften bright screenshots while preserving their original colors. */
[data-bs-theme="dark"] img[src^="/screenshots/"] {
  filter: brightness(0.78);
}

/* Hugo's inline Tango colors need explicit overrides on dark surfaces. */
[data-bs-theme="dark"] .highlight pre {
  background-color: #22272e !important;
  color: #dce3eb;
}
[data-bs-theme="dark"] .highlight span[style*="color:"] { color: #dce3eb !important; }
[data-bs-theme="dark"] .highlight span[style*="color:#8f5902"] { color: #a4afbc !important; }
[data-bs-theme="dark"] .highlight span[style*="color:#204a87"] { color: #8bbcf0 !important; }
[data-bs-theme="dark"] .highlight span[style*="color:#4e9a06"] { color: #add58a !important; }
[data-bs-theme="dark"] .highlight span[style*="color:#ce5c00"] { color: #efb478 !important; }

.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: -5px 0; padding: 5px; border: 0; border-radius: 6px; color: inherit; background: transparent; cursor: pointer; }
.theme-toggle:hover { background: #8882; }
.theme-toggle:focus-visible { outline: 2px solid #6b9ed3; outline-offset: 3px; }
