/* GripBat UAT pack — ONE shared header, breadcrumb and "next" block (NAV-UNIFY, 2026-09-19). Linked by every tester page
   (demo / features / tutorial / test-plan / fixed / parity / qa). Three levels: GripBat (/) › How it works (/how.html)
   › In depth (/depth.html). Brand tokens are those of uat.css (navy ink, coral only on the primary action, paper, pill
   radius), with literal fallbacks because qa / test-plan / fixed do not load uat.css. The bar is 50px tall on every width
   (test-plan's toolbar sticks at top:50px, qa's anchors pad 64px). */
.gbnav,.gbcrumb,.gbnext{font-family:"Albert Sans","Noto Sans TC","Noto Sans SC",-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang HK","PingFang SC","Microsoft JhengHei","Microsoft YaHei",Roboto,sans-serif;line-height:1.3;color:var(--ink,#0B192C)}
html[lang^="zh"] .gbnav,html[lang^="zh"] .gbcrumb,html[lang^="zh"] .gbnext{font-family:"Noto Sans TC","Noto Sans SC","Albert Sans",-apple-system,BlinkMacSystemFont,"PingFang HK","PingFang SC","Microsoft JhengHei","Microsoft YaHei",sans-serif}
.gbnav *,.gbcrumb *,.gbnext *{box-sizing:border-box}
.gbnav a,.gbcrumb a,.gbnext a{text-decoration:none;color:inherit}
.gbnav a:focus-visible,.gbnav button:focus-visible,.gbcrumb a:focus-visible,.gbnext a:focus-visible{outline:3px solid var(--coral,#FF5A36);outline-offset:2px}

/* header bar */
.gbnav{position:sticky;top:0;z-index:50;background:rgba(244,246,248,.94);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-bottom:1px solid var(--line,#E6E9EE);padding-top:env(safe-area-inset-top,0px)}
.gbnav-in{max-width:1120px;height:50px;margin:0 auto;padding:0 16px;display:flex;align-items:center;gap:6px}
.gbnav-brand{display:flex;align-items:center;flex-shrink:0;border-radius:8px;margin-right:auto}
.gbnav-brand img{display:block;height:28px;width:auto}
.gbnav-brand picture{display:contents}
.gbnav-brand .gbnav-icon{display:none;height:28px;width:28px;border-radius:7px}
.gbnav-menu{display:flex;align-items:center;gap:2px;flex-shrink:0}
.gbnav-menu a{display:flex;align-items:center;height:36px;padding:0 12px;border-radius:999px;font-size:14px;font-weight:500;color:var(--sec,#5C6675);white-space:nowrap;position:relative}
.gbnav-menu a:hover{background:var(--navy-s,#EEF2F7);color:var(--ink,#0B192C)}
/* the level this page belongs to: ink, bold, white chip + 2px navy underline */
.gbnav-menu a[aria-current="page"]{color:var(--ink,#0B192C);font-weight:700;background:#fff;box-shadow:0 1px 3px rgba(11,25,44,.1)}
.gbnav-menu a[aria-current="page"]::after{content:"";position:absolute;left:12px;right:12px;bottom:4px;height:2px;border-radius:2px;background:var(--navy,#0B192C)}
.gbnav-menu a.gbnav-try{background:var(--coral,#FF5A36);color:#fff;font-weight:600;margin-left:4px}
.gbnav-menu a.gbnav-try:hover{background:var(--coral-d,#E6491F);color:#fff}
/* language switch — both markups the pack uses (.langbar/setLang on demo·features·tutorial·parity, .lang/data-lang on qa·test-plan·fixed) */
.gbnav .langbar,.gbnav .lang{display:inline-flex;align-items:center;gap:2px;height:34px;padding:3px;border-radius:999px;background:var(--navy-s,#EEF2F7);flex-shrink:0;margin-left:6px}
/* CO-FIX CO-15 (stranger walk webkit-zh 002): right after a switch to 繁 the chips painted blank — the CJK webfont sheet (font-display:optional) holds
   text invisible for its block period, and 简 waits for Noto Sans SC. The language chips are drawn in the device face, which never waits. */
.gbnav .langbar button,.gbnav .lang button{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang HK","PingFang SC","Microsoft JhengHei","Microsoft YaHei",Roboto,"Noto Sans CJK TC",sans-serif;font-size:12.5px;font-weight:600;height:28px;min-width:32px;padding:0 9px;border-radius:999px;border:0;background:transparent;color:var(--sec,#5C6675);cursor:pointer}
.gbnav .langbar button.on,.gbnav .lang button.on{background:var(--navy,#0B192C);color:#fff}

/* breadcrumb */
.gbcrumb{background:transparent}
.gbcrumb ol{list-style:none;max-width:1120px;margin:0 auto;padding:10px 16px 0;display:flex;flex-wrap:wrap;align-items:center;gap:2px 0;font-size:13px;color:var(--sec,#5C6675)}
.gbcrumb li{display:flex;align-items:center;margin:0;padding:0}
.gbcrumb li+li::before{content:"›";margin:0 8px;color:var(--ter,#8A93A0)}
.gbcrumb a{font-weight:500;border-radius:6px;text-decoration:underline;text-decoration-color:rgba(92,102,117,.35);text-underline-offset:3px}
.gbcrumb a:hover{color:var(--ink,#0B192C);text-decoration-color:currentColor}
.gbcrumb .gbcrumb-here{color:var(--ink,#0B192C);font-weight:600}

/* next block (bottom of the page) */
.gbnext{max-width:1120px;margin:40px auto 8px;padding:0 16px}
.gbnext-h{font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--sec,#5C6675);margin:0 0 10px}
.gbnext-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.gbnext-card{display:flex;flex-direction:column;gap:3px;background:#fff;border:1px solid var(--line,#E6E9EE);border-radius:13px;padding:14px 16px;transition:box-shadow .15s,transform .15s}
.gbnext-card:hover{box-shadow:0 6px 20px rgba(11,25,44,.10);transform:translateY(-1px)}
.gbnext-k{font-size:12px;font-weight:600;color:var(--sec,#5C6675)}
.gbnext-t{font-size:16px;font-weight:700;color:var(--ink,#0B192C)}
.gbnext-t::after{content:" →"}
.gbnext-card.gbnext-deeper{background:var(--navy,#0B192C);border-color:var(--navy,#0B192C)}
.gbnext-card.gbnext-deeper .gbnext-k{color:#cdd6e3}
.gbnext-card.gbnext-deeper .gbnext-t{color:#fff}
.gbnext-back{display:inline-block;margin-top:12px;font-size:14px;font-weight:600;color:var(--ink,#0B192C);text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(11,25,44,.3);border-radius:6px}

@media(max-width:760px){
  .gbnav-in{gap:4px}
  .gbnav-brand .gbnav-word{display:none}
  .gbnav-brand .gbnav-icon{display:block}
  .gbnav-menu a{padding:0 8px;font-size:13px;height:34px}
  .gbnav-menu a[aria-current="page"]::after{left:8px;right:8px}
  .gbnav-menu a.gbnav-try{padding:0 11px;margin-left:2px}
  .gbnav .langbar,.gbnav .lang{margin-left:2px}
  .gbnav .langbar button,.gbnav .lang button{min-width:28px;padding:0 6px}
  .gbnext{margin-top:32px}
}
@media(max-width:380px){
  .gbnav-in{padding:0 10px}
  .gbnav-menu a{padding:0 6px;font-size:12.5px}
  .gbnav .langbar button,.gbnav .lang button{min-width:24px;padding:0 4px;font-size:12px}
}

/* SITE-A11Y-V1 (lane demo-site, 2026-09-25): the filled "Try it" pill met axe color-contrast only at 3.1:1 (white on #FF5A36);
   the filled action uses #D23F1C (4.7:1). Breadcrumb links get a 24 px tall target (WCAG 2.5.8; they were 17 px). */
.gbnav-menu a.gbnav-try{background:#D23F1C}
.gbnav-menu a.gbnav-try:hover{background:#C93D1F}
.gbcrumb a{display:inline-flex;align-items:center;min-height:24px}

/* PE-TARGET-44-V1 (lane press-every, 2026-09-27): the nav's links measured 34-36 px tall, the language buttons 28 px and the
   logo 28x28 on a 50 px bar. Every nav target is 44 px TALL now (the bar already had the room); the logo is 44x44. Widths are
   unchanged: at 320 px three language buttons + the menu must fit without sideways scroll (they stay >= 24 px, WCAG 2.5.8). */
.gbnav-brand{min-height:44px;min-width:44px;justify-content:center}
.gbnav-menu a,.gbnav-menu a.gbnav-try{height:44px}
.gbnav .langbar,.gbnav .lang{height:44px;padding:0}
.gbnav .langbar button,.gbnav .lang button{height:44px}

/* PE-HIT-44-V1 (lane press-every 2026-09-27; operator: "fix the family and at root"). The public site's ONE hit-area rule —
   every link and button on every page that links nav.css: an invisible ::before centred on the control, at least 44 × 44,
   never smaller than the control. Nothing is drawn and no box changes, so no page moves. Specificity 0 (:where), so a
   page's own positioning wins. ::before is RESERVED for this on links / buttons (the one decoration, the current-page
   underline, is on ::after). Guard: tools/hit-area-guard.cjs --site. */
:where(a[href], button, summary, [role=button], [role=link], [role=tab]) { position: relative; }
:where(a[href], button, summary, [role=button], [role=link], [role=tab])::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 100%; height: 100%; min-width: 44px; min-height: 44px;
  transform: translate(-50%, -50%); background: none; border: 0;
}
/* the language buttons sit side by side (3 × 28 px): extensions that overlap each other cannot all be 44, so from 360 px up
   each button IS 44 px wide (the pill grows 48 px; the nav still fits at 360). Below 360 they keep the WCAG 2.5.8 spacing. */
@media (min-width: 360px) { .gbnav .langbar button, .gbnav .lang button { min-width: 44px; } }
