/* ---------- Bundle sub-navigation, documentation and release notes ---------- */
.bnav { position: sticky; top: 68px; z-index: 30; background: var(--ink-1); border-bottom: 1px solid var(--line-2); }
.bnav .wrap { display: flex; align-items: center; gap: 8px 24px; min-height: 52px; flex-wrap: wrap; }
.bnav__name { font-size: 20px; text-transform: uppercase; text-decoration: none; margin-right: auto; }
.bnav ul { display: flex; gap: 4px; }
.bnav li a { display: block; padding: 8px 12px; font-family: var(--f-cond); font-stretch: 62%; font-weight: 700; font-size: 15px; letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none; color: var(--fg-2); }
.bnav li a:hover, .bnav__name:hover { color: var(--fg); }
.bnav li a[aria-current] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--yellow); }
.bnav .btn { --h: 36px; padding: 0 14px; font-size: 13px; }
@media (max-width: 960px) { .bnav { position: static; } .bnav .btn { display: none; } }

.dindex { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--card-gap); }
.dindex__g { background: var(--ink-2); border: 1px solid var(--line); padding: var(--card-pad); }
.dindex__g h2 { font-size: var(--fs-h3); margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.dindex__g ul { display: grid; gap: 2px; }
.dindex__g a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; text-decoration: none; font-size: var(--fs-body); box-shadow: inset 0 -1px 0 var(--line); }
.dindex__g a::after { content: "→"; color: var(--fg-3); transition: transform .35s var(--ease-out), color .2s; }
.dindex__g a:hover { box-shadow: inset 0 -2px 0 var(--yellow); }
.dindex__g a:hover::after { transform: translateX(3px); color: var(--yellow); }
.dempty { color: var(--fg-2); font-size: var(--fs-body); }
@media (max-width: 960px) { .dindex { grid-template-columns: 1fr; } }

.docs { border-top: 1px solid var(--line); }
.docs__g { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 0 56px; padding-block: clamp(36px, 4vw, 56px) clamp(64px, 8vw, 112px); }
.docs__side { position: sticky; top: 140px; align-self: start; max-height: calc(100vh - 160px); overflow-y: auto; padding-right: 8px; border-right: 1px solid var(--line); }
.docs__side .lbl { margin: 22px 0 8px; color: var(--fg-3); }
.docs__side .lbl:first-child { margin-top: 0; }
.docs__side a { display: block; padding: 6px 10px; margin-left: -10px; text-decoration: none; color: var(--fg-2); font-size: var(--fs-sm); line-height: 1.35; border-left: 2px solid transparent; }
.docs__side a:hover { color: var(--fg); }
.docs__side a[aria-current] { color: var(--fg); border-left-color: var(--yellow); background: var(--ink-2); }
/* Sub-chapters of the open page (h2 of its content), indented under the active chapter. */
.docs__toc { margin: 4px 0 8px 2px; padding-left: 10px; border-left: 1px solid var(--line-2); }
.docs__side .docs__toc a { margin-left: -11px; padding: 4px 10px 4px 12px; font-size: 13px; color: var(--fg-3); }
.docs__side .docs__toc a:hover { color: var(--fg); }
.docs__side .docs__toc a[aria-current] { color: var(--fg); background: none; border-left-color: var(--yellow); }
.docs__body h2[id] { scroll-margin-top: 160px; }
.docs__main .crumbs { margin-bottom: 24px; }
.docs__main h1 { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: var(--fs-h2); line-height: 0.98; letter-spacing: -0.035em; }
.docs__meta { margin-top: 14px; color: var(--fg-3); font-size: var(--fs-sm); }
.docs__body { max-width: none; margin: 0; padding: 32px 0 0; border-top: 0; }
.docs__body dl { display: grid; grid-template-columns: 180px minmax(0, 1fr); border-top: 1px solid var(--line-2); max-width: 74ch; }
.docs__body dt, .docs__body dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.docs__body dt { font-weight: 700; color: var(--fg); padding-right: 16px; }
.docs__body dd { color: var(--fg-2); }
.docs__pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line-2); }
.docs__pager a { text-decoration: none; font-weight: 700; box-shadow: inset 0 -1px 0 var(--line-2); }
.docs__pager a:hover { box-shadow: inset 0 -2px 0 var(--yellow); }
@media (max-width: 960px) { .docs__g { grid-template-columns: minmax(0, 1fr); gap: 28px; } .docs__main { order: 1; } .docs__side { order: 2; position: static; max-height: none; border-right: 0; border-top: 1px solid var(--line); padding-top: 24px; } .docs__body h2[id] { scroll-margin-top: 108px; } .docs__body dl { grid-template-columns: 1fr; } .docs__body dt { border-bottom: 0; padding-bottom: 0; } }

.tl { max-width: 900px; border-top: 1px solid var(--line-2); }
.tl__r { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px 32px; padding-block: 28px; border-bottom: 1px solid var(--line-2); scroll-margin-top: 140px; }
.tl__r:target { background: linear-gradient(90deg, rgba(254,168,0,0.10), rgba(254,168,0,0) 60%); }
.tl__r header { display: grid; gap: 6px; align-content: start; }
.tl__r h2 { font-family: var(--f-text); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 34px; line-height: 1; letter-spacing: -0.03em; }
.tl__r h2 a { text-decoration: none; }
.tl__r h2 a:hover { color: var(--yellow); }
.tl__r time { color: var(--fg-2); font-variant-numeric: tabular-nums; }
.tl__comp { color: var(--fg-3); font-size: var(--fs-sm); }
.tl__r ul { display: grid; gap: 12px; align-content: start; }
.tl__r li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: baseline; color: var(--fg-2); }
.tl__txt { display: grid; gap: 10px; justify-items: start; }
.tl__txt p { color: inherit; }
.tl__txt h3 { font-family: var(--f-text); font-weight: 700; font-size: var(--fs-body); line-height: 1.3; color: var(--fg); }
.chip { justify-self: start; padding: 3px 8px; border: 1px solid var(--line-2); font-family: var(--f-cond); font-stretch: 62%; font-weight: 700; font-size: 14px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--fg); }
.chip--new { border-color: var(--yellow); color: var(--yellow); }
.chip--security, .chip--breaking { border-color: var(--danger); color: #ff8d83; }
@media (max-width: 600px) { .tl__r { grid-template-columns: 1fr; } }

/* ---------- Light theme of the bundles section (body.fd-light, set in functions.php) ----------
   Everything between the site header and the footer turns light by swapping the colour tokens: white sheet, light grey
   raised surfaces, dark text. The header and the footer stay dark, as on the rest of the site. Below the tokens are the
   few places where a colour was written for the dark sheet. */
.fd-light main { color-scheme: light; background: var(--ink-0); color: var(--fg);
  --ink-0: #FFFFFF; --ink-1: #F4F4F1; --ink-2: #F7F7F4; --ink-3: #ECECE8;
  --fg: #141414; --fg-2: rgba(20,20,20,0.74); --fg-3: rgba(20,20,20,0.66);
  --line: rgba(20,20,20,0.12); --line-2: rgba(20,20,20,0.24);
  --glass-edge: rgba(20,20,20,0.14); --glass-hi: rgba(255,255,255,0.9); --danger: #B3261E; }
/* Yellow as text does not carry on white: the darker yellow takes over. Yellow marks, rules and buttons stay. */
.fd-light main :is(.it, .ben__n, .card__k, .lcard__n, .chip--new, .faq summary:hover, .tl__r h2 a:hover) { color: var(--yellow-30); }
.fd-light main .chip--new { border-color: var(--yellow-30); }
/* Small yellow text (numbers, labels) needs 4.5:1 on white and light grey (WCAG AA); the large italic accent keeps --yellow-30. */
.fd-light main :is(.ben__n, .card__k, .lcard__n, .chip--new, .faq summary:hover, .tl__r h2 a:hover) { color: #966300; }
.fd-light main :is(.chip--security, .chip--breaking) { color: var(--danger); }
/* Dark text that was written with the surface token. */
.fd-light main :is(.btn--y, .paper) { color: #141414; }
.fd-light main .paper .btn--line { color: #141414; }
.fd-light main .paper .btn--line:hover { border-color: #141414; }
.fd-light main .paper :focus-visible { box-shadow: 0 0 0 5px #141414; }
.fd-light main .btn--y { box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 0 1px rgba(229,151,0,0.7), 0 8px 24px -10px rgba(254,168,0,0.7); }
.fd-light main .card__icon { filter: none; opacity: 1; }
.fd-light main .crop > i::before, .fd-light main .crop > i::after { background: rgba(20,20,20,0.4); }
.fd-light main .caps { background: radial-gradient(60% 70% at 0% 0%, rgba(68,64,255,0.12) 0%, rgba(68,64,255,0.05) 40%, rgba(68,64,255,0) 76%), var(--ink-0); }
.fd-light main .caps ~ .caps { background: var(--ink-0); }
.fd-light main .glass { background: rgba(255,255,255,0.72); }
.fd-light main .glass::after { content: none; }
.fd-light main .form :is(input[type=text], input[type=email], textarea, select, .check input) { background: #fff; }
.fd-light main .form .check input:checked { background: var(--yellow) linear-gradient(#141414, #141414) center / 8px 8px no-repeat; }
@media (min-width: 1300px) { .fd-light main .sec::before { border-inline-color: rgba(20,20,20,0.12); } }
