/* ══════════════════════════════════════════════════════════════════════════
   E94 · v3 chrome — N3's bar. Render-blocking on purpose: this is above-fold
   on every route, and a deferred header sheet flashes an unstyled bar.

   Tokens are the live theme's (assets/css/design-system.css :root, echoed in
   assets/css/critical.css). Only --v3-* are new. They are declared here AND in
   critical-home-v3.css because critical.css defers dc-design-system and
   dc-theme with media="print": at first paint the only tokens that exist are
   the inlined ones.

   NOT USED, deliberately: .dc-header-group (position:fixed in critical.css) and
   .dc-header-spacer. This bar is in normal flow, so there is no reserved height
   to keep in sync with a token — which is where E93's 169 px dead band came
   from. position:sticky is dead sitewide under html,body{overflow-x:hidden}.
   ══════════════════════════════════════════════════════════════════════════ */

:root{
  --v3-max:1240px;
  --v3-gut:clamp(20px,4vw,44px);
  --v3-band:clamp(32px,3.2vw,46px);
  --v3-rule:rgba(255,255,255,.11);
  --v3-rule-2:rgba(255,255,255,.055);
  --v3-hd:60px;
  --v3-paper:#EDEAE3;
  --v3-ink:#14120E;
  --v3-dim:#55504A;
  --v3-paper-rule:#C8C2B4;
  --v3-paper-accent:#A34400;
}

.dc-v3-wrap{width:100%;max-width:var(--v3-max);margin-inline:auto;padding-inline:var(--v3-gut)}
.dc-v3-mono{font-family:var(--dc-font-mono);font-size:.695rem;letter-spacing:.11em;text-transform:uppercase;
  color:var(--dc-text-muted);line-height:1.6}
.dc-v3-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ══ THE BAR ═══════════════════════════════════════════════════════════════
   No drawer, no toggle, no aria-expanded/inert/focus-trap lifecycle. Measured
   with JavaScript disabled: wordmark + five nav words visible at BOTH
   breakpoints. Under 900 px the words wrap to a second row instead of hiding
   behind a control that needs script to open. */
.dc-v3-hd{position:relative;z-index:60;background:rgba(13,13,13,.97);border-bottom:1px solid var(--v3-rule)}
.dc-v3-hd__bar{display:flex;align-items:center;gap:clamp(10px,1.7vw,26px);height:var(--v3-hd)}
.dc-v3-hd__logo{display:flex;align-items:center;gap:.55rem;color:var(--dc-text-primary);flex:0 0 auto}
.dc-v3-hd__mark{width:26px;height:26px;flex:0 0 auto}
.dc-v3-hd__word{font-family:var(--dc-font-heading);font-size:1.16rem;font-weight:800;letter-spacing:.055em;
  text-transform:uppercase;line-height:1}
.dc-v3-hd__logo:hover .dc-v3-hd__word,.dc-v3-hd__logo:focus-visible .dc-v3-hd__word{color:var(--dc-accent)}

.dc-v3-nav{display:flex;align-items:center;gap:clamp(6px,1.4vw,20px);margin-left:clamp(6px,1.6vw,24px)}
.dc-v3-nav__i{position:relative;display:inline-flex;align-items:center;height:var(--v3-hd);padding-inline:.15rem;
  font-family:var(--dc-font-heading);font-size:1.01rem;font-weight:600;letter-spacing:.075em;text-transform:uppercase;
  color:var(--dc-text-primary);transition:color 150ms ease;white-space:nowrap}
.dc-v3-nav__i:hover,.dc-v3-nav__i:focus-visible{color:var(--dc-accent)}
.dc-v3-nav__i--fund{color:var(--dc-accent);border:1.5px solid var(--dc-accent);border-radius:2px;height:34px;padding-inline:.75rem}
.dc-v3-nav__i--fund:hover{background:var(--dc-accent-bg)}

.dc-v3-hd__util{margin-left:auto;display:flex;align-items:center;gap:clamp(8px,1.2vw,16px)}
.dc-v3-hd__search{display:flex;align-items:center;gap:.5rem;height:34px;padding:0 .7rem;min-width:170px;
  background:var(--dc-bg-surface);border:1px solid var(--v3-rule);border-radius:2px;
  font-family:var(--dc-font-mono);font-size:.7rem;letter-spacing:.06em;text-transform:uppercase;color:var(--dc-text-muted)}
.dc-v3-hd__search:hover,.dc-v3-hd__search:focus-visible{color:var(--dc-accent);border-color:var(--dc-accent)}
.dc-v3-hd__btc{font-family:var(--dc-font-mono);font-size:.67rem;letter-spacing:.09em;text-transform:uppercase;
  color:var(--dc-accent);white-space:nowrap}
.dc-v3-hd__ico{position:relative;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;
  color:var(--dc-text-secondary);transition:color 150ms ease}
.dc-v3-hd__ico:hover,.dc-v3-hd__ico:focus-visible{color:var(--dc-accent)}
.dc-v3-hd__cart .dc-header__cart-count{position:absolute;top:-2px;right:-4px;min-width:16px;height:16px;padding:0 4px;
  display:inline-flex;align-items:center;justify-content:center;background:var(--dc-accent);color:#0D0D0D;
  border-radius:999px;font-family:var(--dc-font-mono);font-size:.58rem;font-weight:600;line-height:1}
.dc-v3-hd__cart .dc-header__cart-count--empty{display:none}
.dc-v3-hd__lang{font-family:var(--dc-font-mono);font-size:.7rem;letter-spacing:.08em;color:var(--dc-text-secondary);
  border:1px solid var(--v3-rule);border-radius:2px;padding:4px 7px;line-height:1}
.dc-v3-hd__lang:hover,.dc-v3-hd__lang:focus-visible{color:var(--dc-accent);border-color:var(--dc-accent)}

/* Shop is the ONLY bar item that opens a panel: it is the only one where the
   reader has to choose between many things. Everything else goes to a hub page
   that already does the menu's job better. CSS-only (:hover / :focus-within) —
   no script, and display:none under 900 px where a touch screen cannot hover. */
.dc-v3-shop{position:absolute;left:0;right:0;top:100%;display:none;background:var(--dc-bg-secondary);
  border-bottom:1px solid var(--v3-rule);box-shadow:0 24px 48px rgba(0,0,0,.55);z-index:61}
.dc-v3-nav__has:hover .dc-v3-shop,.dc-v3-nav__has:focus-within .dc-v3-shop{display:block}
.dc-v3-shop__in{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,.9fr);gap:26px;padding-block:26px}
.dc-v3-shop__col{display:block}
.dc-v3-shop__h{display:block;font-family:var(--dc-font-mono);font-size:.65rem;font-weight:400;letter-spacing:.12em;
  text-transform:uppercase;color:var(--dc-text-muted);margin-bottom:.5rem}
.dc-v3-shop__col a{display:block;padding:3px 0;min-height:24px;font-size:.86rem;color:var(--dc-text-secondary)}
.dc-v3-shop__col a:hover,.dc-v3-shop__col a:focus-visible{color:var(--dc-accent)}
.dc-v3-shop__feat{border-left:1px solid var(--v3-rule);padding-left:24px}
.dc-v3-shop__img{width:92px;height:92px;object-fit:contain;margin-bottom:.4rem}
.dc-v3-shop__featname{display:block}

/* ══ SEARCH OVERLAY (progressive enhancement — see assets/js/header-v3.js) ══
   The markup for this is created by script. With JS off there is no overlay and
   the control is simply a link to the site search, which works. */
.dc-v3-pal{position:fixed;inset:0;z-index:1200;display:none;align-items:flex-start;justify-content:center;
  padding:14vh 20px 20px;background:rgba(13,13,13,.94)}
.dc-v3-pal[data-open="1"]{display:flex}
.dc-v3-pal__box{width:100%;max-width:640px}
.dc-v3-pal__form{display:flex;gap:.6rem}
.dc-v3-pal__in{flex:1 1 auto;min-height:56px;padding:.7rem 1rem;background:var(--dc-bg-secondary);
  border:1px solid var(--dc-accent);border-radius:2px;color:var(--dc-text-primary);
  font-family:var(--dc-font-heading);font-size:1.5rem;font-weight:700}
.dc-v3-pal__go,.dc-v3-pal__x{min-height:56px;padding:0 1.1rem;border-radius:2px;cursor:pointer;
  font-family:var(--dc-font-heading);font-size:1rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase}
.dc-v3-pal__go{background:var(--dc-accent);color:#0D0D0D;border:0}
.dc-v3-pal__x{background:transparent;color:var(--dc-text-secondary);border:1px solid var(--dc-border-control)}

@media (max-width:900px){
  :root{--v3-hd:auto}
  /* Two rows, no drawer. The five words stay on screen at 390 px, so nothing in
     this chrome depends on JavaScript or on a hover a touch screen cannot make. */
  .dc-v3-hd__bar{flex-wrap:wrap;height:auto;padding-block:9px 0;gap:8px}
  .dc-v3-hd__btc{display:none}
  /* The search control becomes an icon, but it stays a LINK and it stays
     rendered. N3 hid it outright below 900 px, which left a phone with no way
     to search at all once JavaScript was off — the same class of defect the
     no-JS ruling was written about. Icon-only keeps the 34 px target and the
     accessible name; the visible word is what folds away. */
  .dc-v3-hd__search{min-width:0;width:34px;height:34px;padding:0;justify-content:center;
    background:transparent;border-color:transparent;color:var(--dc-text-secondary)}
  .dc-v3-hd__searcht{position:absolute;width:1px;height:1px;padding:0;margin:-1px;
    overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
  .dc-v3-hd__util{gap:10px;margin-left:auto}
  .dc-v3-nav{order:3;flex:1 0 100%;margin-left:0;gap:0;justify-content:space-between;
    border-top:1px solid var(--v3-rule-2);padding-top:2px;margin-top:1px}
  .dc-v3-nav__has{display:contents}
  .dc-v3-nav__i{height:42px;font-size:.94rem;letter-spacing:.05em;padding-inline:0}
  .dc-v3-nav__i--fund{height:28px;padding-inline:.55rem;align-self:center}
  .dc-v3-shop{display:none!important}
}

@media (prefers-reduced-motion:reduce){
  .dc-v3-hd *{transition:none!important}
}
