/* Direction A's chrome (SHL-438): the column, the skip link, the utility nav and the footer generator/chrome-a.ts
   writes, on the A pages and on every docs page, which load it inside docs-a.css (generator/site.ts). Every selector
   needs data-site="a", and colours are tokens only. The docs load site.css too: the values marked "site.css" below
   cancel its own .skip, .theme-toggle and .credits rules there and change nothing on the A pages, which don't load it.
   No @layer: layered, these rules would lose to site.css's unlayered ones on the docs. */

[data-site="a"] { --column: 1360px; }
[data-site="a"] .wrap { max-width: var(--column); margin: 0 auto; padding: 0 40px; }
/* margin and the body's padding-top: site.css */
[data-site="a"] .skip { position: absolute; left: 12px; top: 12px; z-index: 1; margin: 0; padding: 8px 14px; background: var(--ink); color: var(--on-ink); font-weight: 600; text-decoration: none; }
[data-site="a"] .skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-site="a"] body:has(> .skip:focus) { padding-top: 0; }

[data-site="a"] .btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 1px solid var(--control); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
[data-site="a"] .btn.primary { background: var(--mint-ink); border-color: var(--mint-ink); color: var(--on-mint); }

/* Below 600px the Menu button discloses the nav; site.js flips its aria-expanded, which the rules below read. */
[data-site="a"] .util { display: flex; align-items: center; gap: 6px; height: 56px; }
[data-site="a"] .util nav { display: flex; gap: 6px; margin-left: 24px; }
[data-site="a"] .util a.nl { padding: 8px 12px; font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; text-decoration: none; }
[data-site="a"] .util a.nl[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
[data-site="a"] .util a.keep { margin-left: auto; }
[data-site="a"] .util .btn.primary { height: 38px; font-size: 15px; }
[data-site="a"] .menu-btn { display: none; }

/* display, gap and the links' underline offset: site.css */
[data-site="a"] .credits { display: block; gap: normal; padding: 56px 0 24px; color: var(--muted); font-size: 14px; }
[data-site="a"] .credits ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 8px 24px; margin-top: 8px; padding: 0; list-style: none; }
[data-site="a"] .credits a { text-underline-offset: auto; }
[data-site="a"] .foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; padding: 24px 0 40px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
[data-site="a"] .foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
/* all but margin-left and text-decoration: site.css */
[data-site="a"] .theme-toggle { align-self: auto; min-height: 0; margin-left: auto; padding: 0; background: none; font-size: inherit; font-weight: inherit; text-decoration: underline; }

@media (max-width: 1023px) {
  [data-site="a"] .util nav { margin-left: 12px; }
  [data-site="a"] .util a.nl { padding-inline: 8px; }
}
/* The bar's row needs 604px at 8px padding: at 601-603px Sign in wrapped onto two lines (SHL-434). Range syntax so a
   zoomed, fractional width between the phone block's 600px and 601px gets the 6px too. */
@media (600px < width < 640px) {
  [data-site="a"] .util a.nl { padding-inline: 6px; }
}
@media (max-width: 600px) {
  [data-site="a"] .wrap { padding: 0 18px; }
  [data-site="a"] .util { flex-wrap: wrap; height: auto; min-height: 52px; }
  [data-site="a"] .util a.nl { padding-inline: 12px; }
  [data-site="a"] .util nav, [data-site="a"] .util .hide-m { display: none; }
  [data-site="a"] .menu-btn { display: inline-flex; order: 1; }
  [data-site="a"] .util:has(.menu-btn[aria-expanded="true"]) nav { display: flex; flex-direction: column; order: 2; flex-basis: 100%; margin: 0 0 8px; }
  /* Start free, the bar's one .hide-m, is the open Menu's last row (SHL-421): another .hide-m in the bar would show there too. */
  [data-site="a"] .util:has(.menu-btn[aria-expanded="true"]) .hide-m { display: flex; order: 3; flex-basis: 100%; justify-content: center; margin: 0 0 8px; }
  [data-site="a"] .foot { gap: 12px; }
}
/* Without script the Menu button can't open, so the links and Start free show under the bar instead. */
@media (max-width: 600px) and (scripting: none) {
  [data-site="a"] .menu-btn { display: none; }
  [data-site="a"] .util nav { display: flex; flex-wrap: wrap; order: 2; flex-basis: 100%; margin: 0 0 8px; }
  [data-site="a"] .util .hide-m { display: flex; order: 3; flex-basis: 100%; justify-content: center; margin: 0 0 8px; }
}
