/* DHV Experience 13.49.0 — Smart Navigation + Category Identity Foundation.
 * Presentation-only. Category routes and content truth remain WordPress/Core owned. */

/* Finite editorial identity. Unknown categories fall back to neutral. */
.dhvx-category-link { --dhvx-category:#6e716f; --dhvx-category-soft:color-mix(in srgb,var(--dhvx-category) 11%,var(--dhvx-surface)); }
.dhvx-category-link.tone-teal   { --dhvx-category:#267569; }
.dhvx-category-link.tone-orange { --dhvx-category:#a95026; }
.dhvx-category-link.tone-violet { --dhvx-category:#7658ad; }
.dhvx-category-link.tone-clay   { --dhvx-category:#9b6035; }
.dhvx-category-link.tone-blue   { --dhvx-category:#35658f; }
.dhvx-category-link.tone-rose   { --dhvx-category:#9a5265; }
.dhvx-category-link.tone-slate  { --dhvx-category:#53677d; }
.dhvx-category-link.tone-red    { --dhvx-category:#b64646; }
.dhvx-category-link.tone-neutral{ --dhvx-category:#68706d; }

.dhvx-category-link__icon {
  width:28px;
  height:28px;
  flex:0 0 28px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:var(--dhvx-category-soft);
  color:var(--dhvx-category);
}
.dhvx-category-link__label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Desktop left-rail category map: visual identity without increasing density. */
.dhvx-nav-group__links.is-categories,
.dhvx-site-app.is-listing .dhvx-nav-group__links,
.dhvx-site-app.is-entity .dhvx-nav-group__links { gap:2px; }
.dhvx-nav-group__links .dhvx-category-link.is-rail,
.dhvx-site-app.is-listing .dhvx-nav-group__links .dhvx-category-link.is-rail,
.dhvx-site-app.is-entity .dhvx-nav-group__links .dhvx-category-link.is-rail {
  min-height:40px;
  display:grid;
  grid-template-columns:28px minmax(0,1fr);
  align-items:center;
  gap:8px;
  padding:5px 7px;
  border-radius:9px;
  color:var(--dhvx-text-secondary);
  font-size:12.5px;
  line-height:1.25;
}
.dhvx-nav-group__links .dhvx-category-link.is-rail:hover,
.dhvx-site-app.is-listing .dhvx-nav-group__links .dhvx-category-link.is-rail:hover,
.dhvx-site-app.is-entity .dhvx-nav-group__links .dhvx-category-link.is-rail:hover {
  background:var(--dhvx-category-soft);
  color:var(--dhvx-text);
}
.dhvx-nav-group__links .dhvx-category-link.is-rail.is-active,
.dhvx-site-app.is-listing .dhvx-nav-group__links .dhvx-category-link.is-rail.is-active,
.dhvx-site-app.is-entity .dhvx-nav-group__links .dhvx-category-link.is-rail.is-active {
  background:var(--dhvx-category-soft);
  color:var(--dhvx-category);
  font-weight:720;
}
.dhvx-category-link.is-rail.is-active .dhvx-category-link__icon { box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--dhvx-category) 24%,transparent); }

/* Context-aware journey strip. It reflects current route/primary category only. */
.dhvx-smart-context {
  min-width:0;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:16px;
  padding:11px 18px;
  border-bottom:1px solid var(--dhvx-border);
  background:color-mix(in srgb,var(--dhvx-surface) 96%,var(--dhvx-canvas));
}
.dhvx-smart-context__intro {
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.dhvx-smart-context__eyebrow {
  color:var(--dhvx-text-muted);
  font-size:10.5px;
  font-weight:720;
  letter-spacing:.035em;
  text-transform:uppercase;
}
.dhvx-smart-context__intro > strong {
  color:var(--dhvx-text);
  font-size:12.75px;
  letter-spacing:-.01em;
}
.dhvx-category-link.is-current {
  min-width:0;
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--dhvx-category);
  font-size:13px;
  font-weight:760;
}
.dhvx-category-link.is-current .dhvx-category-link__icon { width:28px; height:28px; flex-basis:28px; }
.dhvx-smart-context__viewport { min-width:0; overflow:hidden; -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 28px),transparent 100%); mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 28px),transparent 100%); }
.dhvx-smart-context__track {
  min-width:0;
  display:flex;
  align-items:center;
  gap:6px;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  padding-right:30px;
}
.dhvx-smart-context__track::-webkit-scrollbar { display:none; }
.dhvx-category-link.is-chip {
  min-height:34px;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 10px 3px 5px;
  border:1px solid color-mix(in srgb,var(--dhvx-category) 18%,var(--dhvx-border));
  border-radius:999px;
  background:var(--dhvx-surface);
  color:var(--dhvx-text-secondary);
  font-size:11.75px;
  font-weight:650;
  line-height:1;
}
.dhvx-category-link.is-chip .dhvx-category-link__icon { width:25px; height:25px; flex-basis:25px; border-radius:50%; }
.dhvx-category-link.is-chip:hover,
.dhvx-category-link.is-chip:focus-visible {
  border-color:color-mix(in srgb,var(--dhvx-category) 40%,var(--dhvx-border));
  background:var(--dhvx-category-soft);
  color:var(--dhvx-category);
}
.dhvx-category-link.is-chip:focus-visible,
.dhvx-category-link.is-current:focus-visible,
.dhvx-category-link.is-rail:focus-visible,
.dhvx-category-link.is-menu:focus-visible { outline:2px solid color-mix(in srgb,var(--dhvx-category) 45%,transparent); outline-offset:2px; }

/* Category cards inside the mobile utility sheet. */
.dhvx-mobile-menu__links.is-categories {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:0 0 14px;
}
.dhvx-mobile-menu__links.is-categories .dhvx-category-link.is-menu {
  min-width:0;
  min-height:58px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 14px;
  align-items:center;
  gap:8px;
  padding:8px;
  border:1px solid color-mix(in srgb,var(--dhvx-category) 14%,var(--dhvx-border));
  border-radius:12px;
  background:color-mix(in srgb,var(--dhvx-category-soft) 72%,var(--dhvx-surface));
  color:var(--dhvx-text);
  font-size:12.5px;
  font-weight:680;
  line-height:1.2;
}
.dhvx-mobile-menu__links.is-categories .dhvx-category-link.is-menu + .dhvx-category-link.is-menu { border-top-width:1px; }
.dhvx-category-link.is-menu .dhvx-category-link__icon { width:34px; height:34px; flex-basis:34px; border-radius:10px; }
.dhvx-category-link.is-menu .dhvx-category-link__arrow { color:color-mix(in srgb,var(--dhvx-category) 70%,var(--dhvx-text-muted)); font-size:18px; font-weight:400; text-align:right; }
.dhvx-category-link.is-menu.is-active {
  border-color:color-mix(in srgb,var(--dhvx-category) 38%,var(--dhvx-border));
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--dhvx-category) 8%,transparent);
  color:var(--dhvx-category);
}

/* Reader/Category continuity: the identity strip is part of the same 720px
 * editorial plane, not a new full-width chrome layer. */
.dhvx-site-app.is-reader .dhvx-smart-context,
.dhvx-site-app.is-listing .dhvx-smart-context,
.dhvx-site-app.is-entity .dhvx-smart-context { width:100%; }

@media (max-width:767px) {
  .dhvx-smart-context {
    grid-template-columns:1fr;
    gap:8px;
    padding:9px 14px 10px;
  }
  .dhvx-smart-context__intro { min-height:30px; }
  .dhvx-smart-context__eyebrow { font-size:9.75px; }
  .dhvx-smart-context__intro > strong { font-size:12px; }
  .dhvx-smart-context__viewport { margin-inline:-14px; padding-left:14px; }
  .dhvx-smart-context__track { gap:6px; padding-right:38px; }
  .dhvx-category-link.is-chip { min-height:32px; font-size:11.5px; }
  .dhvx-category-link.is-current { font-size:12.75px; }
}

@media (max-width:359px) {
  .dhvx-mobile-menu__links.is-categories { grid-template-columns:1fr; }
}

/* Dark appearance keeps category hues recognizable without neon saturation. */
html[data-theme="dark"] .dhvx-category-link { --dhvx-category-soft:color-mix(in srgb,var(--dhvx-category) 17%,var(--dhvx-surface)); }
html[data-theme="dark"] .dhvx-category-link.tone-teal    { --dhvx-category:#5cc3b4; }
html[data-theme="dark"] .dhvx-category-link.tone-orange  { --dhvx-category:#e88b58; }
html[data-theme="dark"] .dhvx-category-link.tone-violet  { --dhvx-category:#b59ae3; }
html[data-theme="dark"] .dhvx-category-link.tone-clay    { --dhvx-category:#d59a6c; }
html[data-theme="dark"] .dhvx-category-link.tone-blue    { --dhvx-category:#81b3dd; }
html[data-theme="dark"] .dhvx-category-link.tone-rose    { --dhvx-category:#d990a3; }
html[data-theme="dark"] .dhvx-category-link.tone-slate   { --dhvx-category:#a2b2c7; }
html[data-theme="dark"] .dhvx-category-link.tone-red     { --dhvx-category:#e98585; }
html[data-theme="dark"] .dhvx-category-link.tone-neutral { --dhvx-category:#b4bbb8; }
html[data-theme="dark"] .dhvx-smart-context { background:color-mix(in srgb,var(--dhvx-surface) 94%,var(--dhvx-canvas)); }
html[data-theme="dark"] .dhvx-category-link.is-chip { background:var(--dhvx-surface); }
html[data-theme="dark"] .dhvx-mobile-menu__links.is-categories .dhvx-category-link.is-menu { background:color-mix(in srgb,var(--dhvx-category-soft) 68%,var(--dhvx-surface)); }

@media (forced-colors:active) {
  .dhvx-category-link__icon,
  .dhvx-category-link.is-chip,
  .dhvx-category-link.is-menu { forced-color-adjust:auto; border:1px solid CanvasText; background:Canvas; color:CanvasText; }
}
