/* SecurePeak — global chrome. Only what cannot be an inline style:
   selection, scrollbars, link mechanics, numeral + ligature behaviour, read-state. */

:root { color-scheme: dark; accent-color: var(--signal-500); }

/* No ::selection or link-underline rule here on purpose. The design system's
   base.css already ships both (`[data-mode="terminal"] ::selection` in signal-700,
   and `a{text-underline-offset:2px}`), and its sheets are injected a second time
   AFTER this file, so any non-!important rule of ours that collides with base.css
   silently loses on order. Overriding them would mean beating the DS with
   !important to no benefit — its values are correct. Anything added below must
   either not collide with base.css, or carry !important with a stated reason. */

/* Default scrollbars render light furniture on an ink page. */
* { scrollbar-width: thin; scrollbar-color: var(--ink-700) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-700); border: 3px solid var(--surface-page); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-600); }
::-webkit-scrollbar-corner { background: transparent; }

/* Underlines: handled by the design system (see note at top). */

/* A register you can see yourself having read. Documents only — never nav. */
a[href*="advisories/"]:visited, a[href*="datasheets/"]:visited { color: var(--text-faint); }

/* Figures are compared, so they align; and a transcript must render literally —
   JetBrains Mono's ligatures would redraw != and => inside a payload or a hash.
   !important is required, not sloppiness: every mono element is authored as inline
   `font: var(--type-mono)`, and the `font:` shorthand RESETS font-variant-numeric
   and font-variant-ligatures to their initial values. Without it this rule is a
   no-op on all of its targets. Same mechanism tokens/responsive.css uses to beat
   inline component styles. Do not strip. */
[style*="--type-mono"], [style*="--font-mono"], code, kbd, pre, samp {
  font-variant-numeric: tabular-nums !important;
  font-variant-ligatures: none !important;
}
/* An attribute selector can only reach elements that declare the token inline, and
   three sets never do: DataTable rowHeader <th>s expand `font` to longhands with
   EMPTY values (occupying the cascade slot, computing to normal, and leaving no
   token string to match); <a style="font:inherit"> inside them re-resets from that
   broken parent; and the footer digest is a bare <span> that merely inherits.
   Those are precisely the reference codes and hashes a reader compares character
   by character, so cover them structurally. Ligatures off on body-font cells is
   harmless and wanted in a data table anyway. */
table th, table td, table a, table a *,
[data-page-hash], [data-page-hash] * {
  font-variant-numeric: tabular-nums !important;
  font-variant-ligatures: none !important;
}
/* Plain inheritance is enough here — tables carry no inline font shorthand. */
table { font-variant-numeric: tabular-nums; }

/* Skip link: off-screen until focused. */
[data-skip] {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 9px 14px; background: var(--ink-950);
  border: 1px solid var(--border-accent); border-radius: var(--radius-sm);
  font: var(--type-mono); letter-spacing: var(--track-mono); text-transform: uppercase;
  color: var(--text-display); text-decoration: none;
  transition: top 140ms cubic-bezier(.2,0,.2,1);
}
[data-skip]:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  [data-skip] { transition: none; }
}

/* Site layout hooks the DS responsive layer does not cover. Same mechanism
   (attribute + !important over an inline style), scoped to this site. */
@media (max-width:1200px){
  [data-hide="lg"]{display:none!important}
  [data-foot]{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  [data-foot-brand]{grid-column:1/-1}
}
@media (max-width:900px){
  [data-foot]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:600px){
  [data-foot]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* Scrolling table wells: the table keeps its fixed columns and scrolls inside
   the well instead of pushing the page wide. */
@media (max-width:900px){ [data-scroll-x] table { min-width:560px } }

/* Mobile header: one row (logo · Client area · Menu). The nav collapses into
   a full-width panel toggled by [data-menu-btn]; Practices render inline in it. */
[data-menu-btn],[data-nav-mobile]{display:none!important}
@media (max-width:900px){
  [data-head]{flex-wrap:wrap!important;row-gap:0!important;min-height:56px!important}
  [data-menu-btn]{display:inline-flex!important}
  [data-nav]{display:none!important}
  [data-nav][data-open="true"]{display:flex!important;order:3;flex:1 1 100%!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;margin:6px 0 4px;border-top:1px solid var(--border-hairline);max-height:calc(100vh - 110px);overflow-y:auto}
  [data-nav][data-open="true"] > a,[data-nav][data-open="true"] [data-nav-mobile]{display:block!important;padding:14px 0!important;border-bottom:1px solid var(--border-hairline)!important;font-size:13px!important}
  [data-nav][data-open="true"] [data-shelf]{display:block!important;position:static!important;border-bottom:1px solid var(--border-hairline)}
  [data-nav][data-open="true"] [data-shelf-tab]{padding:14px 0 6px!important;border:0!important;pointer-events:none;color:var(--text-faint)!important;font-size:13px!important}
  [data-nav][data-open="true"] [data-shelf-tab] span{display:none}
  [data-nav][data-open="true"] [data-shelf-menu]{position:static!important;opacity:1!important;visibility:visible!important;transform:none!important;min-width:0!important;background:transparent!important;border:0!important;padding-bottom:6px}
  [data-nav][data-open="true"] [data-shelf-menu] a{padding:10px 0!important;border:0!important}
}
@media (max-width:600px){
  [data-client-btn]{display:none!important}
  [data-head]{gap:12px!important}
}
