/* ==========================================================================
   DatasheetHub theme  ·  datasheethub.css
   --------------------------------------------------------------------------
   A lightweight, namespaced stylesheet for a data-dense technical catalog.

   · Every class is prefixed `dsh-` so it cannot collide with Basehim's admin
     styles, core widgets, or another theme.
   · Design tokens are CSS custom properties under `--dsh-*`. They inherit from
     the Customizer's `--bh-*` properties (emitted by core for colour / range /
     font options) with a hard-coded fallback, so the theme looks right before
     anyone opens the Customizer and follows the operator's choices after.
   · Options that are not CSS variables (density, corner style, sidebar side,
     heading weight) arrive as `data-dsh-*` attributes / an inline token on
     <html>, set from bh_theme_option() in the header partial.
   · No runtime build step. This file is the committed build output; the
     Tailwind source that reproduces/extends it ships in build/ (see README).

   Section index
     1. Tokens
     2. Reset (scoped)
     3. Layout shell
     4. Utility bar
     5. Header + search
     6. Primary navigation
     7. Buttons, chips, labels
     8. Part numbers (the signature treatment)
     9. Hero / homepage discovery
    10. Results: table / list / cards
    11. Filters (sidebar + mobile drawer + active chips)
    12. Breadcrumbs
    13. Detail page: identity, datasheet panel, specs, related
    14. Article / page prose
    15. Pagination
    16. States: empty / error / loading
    17. Footer
    18. Autocomplete
    19. Small utilities (dsh- prefixed)
    20. Responsive
   ========================================================================== */

/* 1. Tokens ================================================================ */
:root {
  /* colour — inherits the Customizer value, falls back to the default */
  --dsh-accent:        var(--bh-accent, #2563eb);
  --dsh-accent-hover:  var(--bh-accent-hover, #1d4ed8);
  --dsh-link:          var(--bh-link-color, #1d4ed8);
  --dsh-header-bg:     var(--bh-header-bg, #ffffff);
  --dsh-utility-bg:    var(--bh-utility-bg, #0f172a);
  --dsh-utility-text:  var(--bh-utility-text, #cbd5e1);
  --dsh-footer-bg:     var(--bh-footer-bg, #0f172a);
  --dsh-page-bg:       var(--bh-page-bg, #f8fafc);

  /* fixed palette — not exposed, kept restrained on purpose */
  --dsh-surface: #ffffff;
  --dsh-ink:     #0f172a;   /* slate-900  headings, part numbers       */
  --dsh-body:    #334155;   /* slate-700  body text                    */
  --dsh-muted:   #64748b;   /* slate-500  secondary                    */
  --dsh-faint:   #94a3b8;   /* slate-400  icons, meta                  */
  --dsh-line:    #e2e8f0;   /* slate-200  hairlines                    */
  --dsh-line-2:  #f1f5f9;   /* slate-100  zebra / subtle fills         */
  --dsh-tint:    #eff6ff;   /* blue-50    accent wash                  */
  --dsh-tint-2:  #dbeafe;   /* blue-100                                */
  --dsh-ok:      #15803d;
  --dsh-ok-bg:   #f0fdf4;
  --dsh-warn:    #b45309;
  --dsh-warn-bg: #fffbeb;
  --dsh-danger:  #b91c1c;

  /* type */
  --dsh-font:    var(--bh-font-body, Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --dsh-font-h:  var(--bh-font-heading, var(--dsh-font));
  --dsh-mono:    var(--bh-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  --dsh-fs:      var(--bh-font-size, 15px);
  --dsh-h-weight: 700;        /* overridden inline from heading_weight  */

  /* geometry */
  --dsh-content: var(--bh-content-width, 1280px);
  --dsh-rail:    var(--bh-sidebar-width, 260px);
  --dsh-radius:  8px;         /* overridden by [data-dsh-radius]         */
  --dsh-gutter:  16px;

  /* density — overridden by [data-dsh-density] */
  --dsh-cell-y:  8px;
  --dsh-cell-x:  12px;
  --dsh-row:     1.45;

  --dsh-focus:   0 0 0 3px color-mix(in srgb, var(--dsh-accent) 32%, transparent);
}

:root[data-dsh-radius="sharp"] { --dsh-radius: 0; }
:root[data-dsh-radius="soft"]  { --dsh-radius: 8px; }
:root[data-dsh-radius="round"] { --dsh-radius: 14px; }

:root[data-dsh-density="comfortable"] { --dsh-cell-y: 12px; --dsh-cell-x: 16px; --dsh-row: 1.6; }
:root[data-dsh-density="compact"]     { --dsh-cell-y: 7px;  --dsh-cell-x: 11px; --dsh-row: 1.4; }

/* 2. Reset (scoped to the theme body) ===================================== */
.dsh-body { margin: 0; background: var(--dsh-page-bg); color: var(--dsh-body);
  font-family: var(--dsh-font); font-size: var(--dsh-fs); line-height: var(--dsh-row);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; min-height: 100vh; }
.dsh-body *, .dsh-body *::before, .dsh-body *::after { box-sizing: border-box; }
.dsh-body h1, .dsh-body h2, .dsh-body h3, .dsh-body h4 {
  font-family: var(--dsh-font-h); color: var(--dsh-ink); font-weight: var(--dsh-h-weight);
  line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
.dsh-body img { max-width: 100%; height: auto; }
.dsh-body a { color: var(--dsh-link); text-decoration: none; }
.dsh-body a:hover { text-decoration: underline; }
.dsh-body :focus-visible { outline: 2px solid var(--dsh-accent); outline-offset: 2px; border-radius: 2px; }
.dsh-main { flex: 1 0 auto; width: 100%; }
.dsh-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dsh-skip { position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--dsh-accent); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--dsh-radius) 0; }
.dsh-skip:focus { left: 0; }

/* 3. Layout shell ========================================================= */
.dsh-wrap { max-width: var(--dsh-content); margin-inline: auto; padding-inline: var(--dsh-gutter); width: 100%; }
.dsh-wrap--narrow { max-width: 760px; }
.dsh-wrap--mid { max-width: 1040px; }
.dsh-section { padding-block: 28px; }
.dsh-stack > * + * { margin-top: 16px; }

/* 4. Utility bar ========================================================== */
.dsh-utility { background: var(--dsh-utility-bg); color: var(--dsh-utility-text); font-size: 12.5px; }
.dsh-utility a { color: var(--dsh-utility-text); }
.dsh-utility a:hover { color: #fff; text-decoration: none; }
.dsh-utility__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.dsh-utility__links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.dsh-utility__note { color: color-mix(in srgb, var(--dsh-utility-text) 72%, transparent); }

/* 5. Header + search ====================================================== */
.dsh-header { background: var(--dsh-header-bg); border-bottom: 1px solid var(--dsh-line); }
.dsh-header--sticky { position: sticky; top: 0; z-index: 40; }
.dsh-header__row { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.dsh-brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dsh-brand:hover { text-decoration: none; }
.dsh-brand__mark { width: 34px; height: 34px; border-radius: var(--dsh-radius);
  background: var(--dsh-ink); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.dsh-brand__mark svg { width: 20px; height: 20px; }
.dsh-brand__name { font-family: var(--dsh-font-h); font-weight: 700; color: var(--dsh-ink);
  font-size: 17px; letter-spacing: -0.02em; line-height: 1.1; }
.dsh-brand__name b { color: var(--dsh-accent); font-weight: 700; }
.dsh-brand__tag { display: block; font-size: 11.5px; color: var(--dsh-muted); font-weight: 400; letter-spacing: 0; }
.dsh-brand__logo { height: 34px; width: auto; }

.dsh-header__search { flex: 1 1 auto; min-width: 0; }
.dsh-header__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* the search control — used in header, hero and results header */
.dsh-search { position: relative; display: flex; width: 100%;
  background: #fff; border: 1.5px solid var(--dsh-line); border-radius: var(--dsh-radius); }
.dsh-search:focus-within { border-color: var(--dsh-accent); box-shadow: var(--dsh-focus); }
.dsh-search__icon { display: grid; place-items: center; padding-inline: 10px 2px; color: var(--dsh-faint); }
.dsh-search__icon svg { width: 18px; height: 18px; }
.dsh-search__input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent;
  padding: 9px 10px; font-size: 14px; color: var(--dsh-ink); font-family: var(--dsh-font); }
.dsh-search__input::placeholder { color: var(--dsh-faint); }
.dsh-search__input:focus { outline: none; }
.dsh-search__btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  margin: 3px; padding: 0 16px; border: 0; border-radius: calc(var(--dsh-radius) - 2px);
  background: var(--dsh-accent); color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.dsh-search__btn:hover { background: var(--dsh-accent-hover); }
.dsh-search__btn svg { width: 16px; height: 16px; }
.dsh-search--lg .dsh-search__input { padding: 15px 12px; font-size: 16px; }
.dsh-search--lg .dsh-search__icon svg { width: 20px; height: 20px; }
.dsh-search--lg .dsh-search__btn { padding: 0 22px; font-size: 15px; }

.dsh-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius); background: #fff;
  color: var(--dsh-body); cursor: pointer; }
.dsh-iconbtn:hover { background: var(--dsh-line-2); }
.dsh-iconbtn svg { width: 20px; height: 20px; }

/* 6. Primary navigation =================================================== */
/* Dropdown mechanics (positioning, show-on-hover) come from core's
   menu_assets(); these rules are cosmetic only so they never fight it. */
.dsh-nav { border-top: 1px solid var(--dsh-line); background: var(--dsh-header-bg); }
.dsh-nav__row { display: flex; align-items: stretch; min-height: 44px; }
.dsh-nav .bh-menu { gap: 2px; }
.dsh-nav .bh-menu__link { padding: 10px 12px; font-size: 13.5px; font-weight: 500;
  color: var(--dsh-body); border-bottom: 2px solid transparent; border-radius: 0; }
.dsh-nav .bh-menu__link:hover { color: var(--dsh-accent); text-decoration: none; }
.dsh-nav .bh-menu__item--parent > .bh-menu__link[aria-expanded="true"],
.dsh-nav .bh-active > .bh-menu__link,
.dsh-nav [aria-current] { color: var(--dsh-accent); border-bottom-color: var(--dsh-accent); }
.dsh-nav .bh-submenu .bh-menu__link { color: var(--dsh-body); border-bottom: 0; }
.dsh-nav .bh-submenu .bh-menu__link:hover { color: var(--dsh-accent); background: var(--dsh-tint); }
.dsh-nav .bh-menu__icon { width: 15px; height: 15px; color: var(--dsh-faint); }

/* 7. Buttons, chips, labels =============================================== */
.dsh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--dsh-radius); font-weight: 600; font-size: 13.5px;
  border: 1px solid transparent; cursor: pointer; line-height: 1; }
.dsh-btn svg { width: 16px; height: 16px; }
.dsh-btn:hover { text-decoration: none; }
.dsh-btn--primary { background: var(--dsh-accent); color: #fff; }
.dsh-btn--primary:hover { background: var(--dsh-accent-hover); color: #fff; }
.dsh-btn--ghost { background: #fff; color: var(--dsh-body); border-color: var(--dsh-line); }
.dsh-btn--ghost:hover { background: var(--dsh-line-2); color: var(--dsh-ink); }
.dsh-btn--subtle { background: var(--dsh-tint); color: var(--dsh-accent-hover); }
.dsh-btn--subtle:hover { background: var(--dsh-tint-2); }
.dsh-btn--block { width: 100%; }
.dsh-btn--sm { padding: 6px 11px; font-size: 12.5px; }

.dsh-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: 999px; background: #fff; border: 1px solid var(--dsh-line);
  font-size: 12.5px; color: var(--dsh-body); white-space: nowrap; }
.dsh-chip:hover { border-color: var(--dsh-accent); color: var(--dsh-accent); text-decoration: none; }
.dsh-chip svg { width: 13px; height: 13px; }

.dsh-label { display: inline-flex; align-items: center; gap: 5px; font-size: 11px;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--dsh-muted); }
.dsh-label svg { width: 13px; height: 13px; }

.dsh-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1.5; }
.dsh-badge svg { width: 12px; height: 12px; }
.dsh-badge--ok { background: var(--dsh-ok-bg); color: var(--dsh-ok); }
.dsh-badge--warn { background: var(--dsh-warn-bg); color: var(--dsh-warn); }
.dsh-badge--muted { background: var(--dsh-line-2); color: var(--dsh-muted); }

/* 8. Part numbers ========================================================= */
.dsh-pn { font-family: var(--dsh-mono); font-weight: 600; color: var(--dsh-ink);
  letter-spacing: -0.01em; font-feature-settings: "tnum" 1; overflow-wrap: anywhere; }
.dsh-pn--lg { font-size: clamp(22px, 4vw, 30px); }
.dsh-copy { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 3px 7px;
  border: 1px solid var(--dsh-line); border-radius: 6px; background: #fff; color: var(--dsh-muted);
  font-family: var(--dsh-font); font-size: 11.5px; font-weight: 500; cursor: pointer; vertical-align: middle; }
.dsh-copy:hover { color: var(--dsh-accent); border-color: var(--dsh-accent); }
.dsh-copy svg { width: 13px; height: 13px; }
.dsh-copy.is-done { color: var(--dsh-ok); border-color: var(--dsh-ok); }

/* 9. Hero / discovery ===================================================== */
.dsh-hero { border-bottom: 1px solid var(--dsh-line); }
.dsh-hero--plain { background: var(--dsh-surface); }
.dsh-hero--tint { background:
  radial-gradient(1200px 300px at 50% -40%, var(--dsh-tint), transparent 70%), var(--dsh-surface); }
.dsh-hero--grid { background:
  linear-gradient(var(--dsh-line-2) 1px, transparent 1px) 0 0 / 28px 28px,
  linear-gradient(90deg, var(--dsh-line-2) 1px, transparent 1px) 0 0 / 28px 28px,
  var(--dsh-surface); }
.dsh-hero__inner { max-width: 760px; margin-inline: auto; text-align: center;
  padding-block: clamp(36px, 7vw, 68px); }
.dsh-hero__title { font-size: clamp(26px, 4.5vw, 40px); margin-bottom: 10px; }
.dsh-hero__sub { color: var(--dsh-muted); font-size: clamp(14px, 2vw, 17px); max-width: 60ch; margin: 0 auto 22px; }
.dsh-hero__search { max-width: 640px; margin-inline: auto; text-align: left; }
.dsh-examples { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; }
.dsh-examples__label { font-size: 12.5px; color: var(--dsh-muted); }

.dsh-discover { display: grid; gap: 28px; }
.dsh-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; border-bottom: 1px solid var(--dsh-line); padding-bottom: 8px; }
.dsh-block__title { font-size: 16px; font-weight: 700; color: var(--dsh-ink); }
.dsh-block__more { font-size: 12.5px; font-weight: 600; }

.dsh-tilegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.dsh-tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff;
  border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius); color: var(--dsh-ink); font-weight: 500; font-size: 13.5px; }
.dsh-tile:hover { border-color: var(--dsh-accent); color: var(--dsh-accent); text-decoration: none; }
.dsh-tile__ico { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 7px; background: var(--dsh-tint); color: var(--dsh-accent); }
.dsh-tile__ico svg { width: 17px; height: 17px; }
.dsh-tile__meta { display: block; font-size: 11.5px; color: var(--dsh-muted); font-weight: 400; }

/* 10. Results ============================================================= */
.dsh-results__head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px; }
.dsh-results__count { font-size: 13px; color: var(--dsh-muted); }
.dsh-results__count b { color: var(--dsh-ink); font-weight: 700; }

/* table */
.dsh-tablewrap { border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius); overflow: hidden; background: #fff; }
.dsh-tablescroll { overflow-x: auto; }
.dsh-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dsh-table th, .dsh-table td { text-align: left; padding: var(--dsh-cell-y) var(--dsh-cell-x);
  border-bottom: 1px solid var(--dsh-line); vertical-align: top; }
.dsh-table thead th { background: var(--dsh-line-2); color: var(--dsh-muted); font-weight: 600;
  font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; position: sticky; top: 0; }
.dsh-table tbody tr:last-child td { border-bottom: 0; }
.dsh-table tbody tr:hover { background: var(--dsh-tint); }
.dsh-table td.dsh-num { font-family: var(--dsh-mono); font-feature-settings: "tnum" 1; white-space: nowrap; }
.dsh-table__title { font-weight: 600; color: var(--dsh-ink); }
.dsh-table__desc { color: var(--dsh-muted); font-size: 12.5px; margin-top: 2px; max-width: 60ch; }
.dsh-table__thumb { width: 44px; }
.dsh-table__thumb img { width: 44px; height: 44px; object-fit: contain; border: 1px solid var(--dsh-line); border-radius: 6px; background: #fff; }

/* list */
.dsh-list { display: grid; gap: 0; border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius); overflow: hidden; background: #fff; }
.dsh-rowitem { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--dsh-line); }
.dsh-rowitem:last-child { border-bottom: 0; }
.dsh-rowitem:hover { background: var(--dsh-tint); }
.dsh-rowitem__body { flex: 1 1 auto; min-width: 0; }
.dsh-rowitem__title { font-size: 15px; font-weight: 600; color: var(--dsh-ink); margin: 0 0 3px; }
.dsh-rowitem__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--dsh-muted); margin-top: 6px; }
.dsh-rowitem__meta span { display: inline-flex; align-items: center; gap: 5px; }
.dsh-rowitem__meta svg { width: 13px; height: 13px; color: var(--dsh-faint); }
.dsh-rowitem__desc { color: var(--dsh-body); font-size: 13px; margin: 4px 0 0; }
.dsh-rowitem__actions { flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* cards */
.dsh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.dsh-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: #fff;
  border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius); }
.dsh-card:hover { border-color: var(--dsh-accent); }
.dsh-card__title { font-size: 15px; font-weight: 600; color: var(--dsh-ink); }
.dsh-card__desc { font-size: 13px; color: var(--dsh-muted); }
.dsh-card__thumb { aspect-ratio: 16/10; background: var(--dsh-line-2); border-radius: 6px; overflow: hidden; }
.dsh-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 11. Filters ============================================================= */
.dsh-layout { display: grid; gap: 24px; align-items: start; }
.dsh-layout--left  { grid-template-columns: var(--dsh-rail) minmax(0, 1fr); }
.dsh-layout--right { grid-template-columns: minmax(0, 1fr) var(--dsh-rail); }
.dsh-layout--right .dsh-rail { order: 2; }
.dsh-layout--none  { grid-template-columns: minmax(0, 1fr); }

.dsh-rail { position: sticky; top: 76px; }
.dsh-filters { background: #fff; border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius); }
.dsh-filters__head { display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-bottom: 1px solid var(--dsh-line); }
.dsh-filters__head h2 { font-size: 13px; font-weight: 700; color: var(--dsh-ink); }
.dsh-filters__body { padding: 6px 14px 14px; }
.dsh-fgroup { border-bottom: 1px solid var(--dsh-line-2); padding: 12px 0; }
.dsh-fgroup:last-child { border-bottom: 0; }
.dsh-fgroup > summary, .dsh-fgroup__title { font-size: 12.5px; font-weight: 700; color: var(--dsh-ink);
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.dsh-fgroup > summary::-webkit-details-marker { display: none; }
.dsh-fgroup > summary svg { width: 15px; height: 15px; color: var(--dsh-faint); transition: transform .15s; }
.dsh-fgroup[open] > summary svg { transform: rotate(180deg); }
.dsh-fopts { margin-top: 10px; display: grid; gap: 7px; }
.dsh-fopt { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dsh-body); }
.dsh-fopt input { accent-color: var(--dsh-accent); }
.dsh-fopt__count { margin-left: auto; font-size: 11.5px; color: var(--dsh-faint); font-family: var(--dsh-mono); }

/* active filter chips */
.dsh-active { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.dsh-active__chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px;
  border-radius: 999px; background: var(--dsh-tint); color: var(--dsh-accent-hover); font-size: 12.5px; }
.dsh-active__chip b { font-weight: 600; }
.dsh-active__x { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 999px;
  background: rgba(37,99,235,.14); color: var(--dsh-accent-hover); }
.dsh-active__x:hover { background: var(--dsh-accent); color: #fff; text-decoration: none; }
.dsh-active__x svg { width: 11px; height: 11px; }
.dsh-active__clear { font-size: 12.5px; font-weight: 600; margin-left: 2px; }

/* mobile filter controls */
.dsh-filterbar { display: none; }
.dsh-drawer__scrim { display: none; }
.dsh-drawer-close { display: none; }

/* 12. Breadcrumbs ========================================================= */
.dsh-crumbs { font-size: 12.5px; color: var(--dsh-muted); padding-block: 12px; }
.dsh-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.dsh-crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.dsh-crumbs svg { width: 13px; height: 13px; color: var(--dsh-faint); }
.dsh-crumbs a { color: var(--dsh-muted); }
.dsh-crumbs a:hover { color: var(--dsh-accent); }
.dsh-crumbs [aria-current] { color: var(--dsh-ink); font-weight: 600; font-family: var(--dsh-mono); }

/* 13. Detail page ========================================================= */
.dsh-detail { display: grid; gap: 22px; align-items: start; }
.dsh-detail--sidebar { grid-template-columns: minmax(0,1fr) 320px; }
.dsh-identity { background: #fff; border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius); padding: 20px 22px; }
.dsh-identity__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dsh-identity__maker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dsh-muted); margin-bottom: 8px; }
.dsh-identity__maker a { font-weight: 600; color: var(--dsh-body); }
.dsh-identity__makerlogo { height: 28px; width: auto; max-width: 120px; object-fit: contain; }
.dsh-identity__desc { color: var(--dsh-body); margin-top: 10px; max-width: 70ch; }
.dsh-identity__pn { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

.dsh-panel { background: #fff; border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius); }
.dsh-panel__head { padding: 12px 16px; border-bottom: 1px solid var(--dsh-line);
  display: flex; align-items: center; gap: 8px; }
.dsh-panel__head h2 { font-size: 14px; font-weight: 700; color: var(--dsh-ink); }
.dsh-panel__head svg { width: 16px; height: 16px; color: var(--dsh-accent); }
.dsh-panel__body { padding: 16px; }

/* datasheet panel */
.dsh-ds { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.dsh-ds__file { display: flex; gap: 12px; align-items: flex-start; flex: 1 1 260px; min-width: 0; }
.dsh-ds__ico { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 8px; background: var(--dsh-tint); color: var(--dsh-accent); }
.dsh-ds__ico svg { width: 24px; height: 24px; }
.dsh-ds__name { font-weight: 600; color: var(--dsh-ink); overflow-wrap: anywhere; }
.dsh-ds__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--dsh-muted); margin-top: 4px; }
.dsh-ds__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dsh-ds__src { font-size: 12px; color: var(--dsh-muted); margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.dsh-ds__src svg { width: 14px; height: 14px; }

/* specs */
.dsh-specs { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dsh-specs th, .dsh-specs td { text-align: left; padding: var(--dsh-cell-y) var(--dsh-cell-x); border-bottom: 1px solid var(--dsh-line-2); vertical-align: top; }
.dsh-specs tr:last-child th, .dsh-specs tr:last-child td { border-bottom: 0; }
.dsh-specs th { font-weight: 500; color: var(--dsh-muted); width: 42%; }
.dsh-specs td { color: var(--dsh-ink); font-family: var(--dsh-mono); font-feature-settings: "tnum" 1; }
.dsh-specs td .dsh-cond { font-family: var(--dsh-font); color: var(--dsh-faint); font-size: 12px; display: block; }
.dsh-specgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px; background: var(--dsh-line-2); border: 1px solid var(--dsh-line-2); border-radius: var(--dsh-radius); overflow: hidden; }
.dsh-specgrid__item { background: #fff; padding: 10px 12px; }
.dsh-specgrid__k { font-size: 11.5px; color: var(--dsh-muted); }
.dsh-specgrid__v { font-family: var(--dsh-mono); font-weight: 600; color: var(--dsh-ink); margin-top: 2px; }

/* related */
.dsh-related { display: grid; gap: 1px; background: var(--dsh-line); border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius); overflow: hidden; }
.dsh-related__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; background: #fff; }
.dsh-related__item:hover { background: var(--dsh-tint); text-decoration: none; }
.dsh-related__pn { font-family: var(--dsh-mono); font-weight: 600; color: var(--dsh-ink); font-size: 13.5px; }
.dsh-related__sub { font-size: 12px; color: var(--dsh-muted); }

/* 14. Prose =============================================================== */
.dsh-prose { color: var(--dsh-body); line-height: 1.7; max-width: 72ch; overflow-wrap: break-word; }
.dsh-prose > * + * { margin-top: 1em; }
.dsh-prose h2 { font-size: 1.4em; margin-top: 1.6em; }
.dsh-prose h3 { font-size: 1.15em; margin-top: 1.4em; }
.dsh-prose a { color: var(--dsh-link); text-decoration: underline; text-underline-offset: 2px; }
.dsh-prose code { font-family: var(--dsh-mono); background: var(--dsh-line-2); padding: .12em .4em; border-radius: 4px; font-size: .9em; }
.dsh-prose pre { background: var(--dsh-ink); color: #e2e8f0; padding: 14px 16px; border-radius: var(--dsh-radius); overflow-x: auto; }
.dsh-prose pre code { background: none; padding: 0; color: inherit; }
.dsh-prose img { border-radius: var(--dsh-radius); border: 1px solid var(--dsh-line); }
.dsh-prose table { width: 100%; border-collapse: collapse; font-size: .95em; display: block; overflow-x: auto; }
.dsh-prose th, .dsh-prose td { border: 1px solid var(--dsh-line); padding: 8px 10px; text-align: left; }
.dsh-prose blockquote { border-left: 3px solid var(--dsh-accent); padding-left: 14px; color: var(--dsh-muted); }
.dsh-toc { background: #fff; border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius); padding: 14px 16px; font-size: 13px; }
.dsh-toc ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.dsh-toc a { color: var(--dsh-body); }

/* 15. Pagination ========================================================== */
.dsh-pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.dsh-pager a, .dsh-pager span { display: inline-flex; align-items: center; gap: 5px; min-width: 38px; height: 38px;
  padding: 0 11px; justify-content: center; border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius);
  background: #fff; font-size: 13.5px; color: var(--dsh-body); font-family: var(--dsh-mono); }
.dsh-pager a:hover { border-color: var(--dsh-accent); color: var(--dsh-accent); text-decoration: none; }
.dsh-pager [aria-current] { background: var(--dsh-accent); border-color: var(--dsh-accent); color: #fff; }
.dsh-pager__gap { border: 0; background: none; color: var(--dsh-faint); min-width: 20px; }
.dsh-pager svg { width: 15px; height: 15px; }

/* 16. States ============================================================== */
.dsh-empty { text-align: center; padding: 48px 20px; color: var(--dsh-muted);
  background: #fff; border: 1px dashed var(--dsh-line); border-radius: var(--dsh-radius); }
.dsh-empty__ico { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 14px;
  background: var(--dsh-line-2); color: var(--dsh-faint); margin-bottom: 14px; }
.dsh-empty__ico svg { width: 26px; height: 26px; }
.dsh-empty h2 { font-size: 17px; margin-bottom: 6px; }
.dsh-empty p { margin: 0 auto; max-width: 48ch; }
.dsh-empty--error { border-style: solid; border-color: #fecaca; background: #fef2f2; color: var(--dsh-danger); }
.dsh-empty--error .dsh-empty__ico { background: #fee2e2; color: var(--dsh-danger); }
.dsh-loading { display: none; align-items: center; gap: 10px; justify-content: center; padding: 28px; color: var(--dsh-muted); font-size: 13px; }
.dsh-loading.is-on { display: flex; }
.dsh-spin { width: 18px; height: 18px; border: 2px solid var(--dsh-line); border-top-color: var(--dsh-accent); border-radius: 999px; animation: dsh-spin .7s linear infinite; }
@keyframes dsh-spin { to { transform: rotate(360deg); } }

/* 17. Footer ============================================================== */
.dsh-footer { margin-top: 40px; background: var(--dsh-footer-bg); color: #cbd5e1; }
.dsh-footer a { color: #cbd5e1; }
.dsh-footer a:hover { color: #fff; }
.dsh-footer__wide { padding-block: 18px; border-bottom: 1px solid rgba(148,163,184,.18); }
.dsh-footer__cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; padding-block: 36px; }
.dsh-footer__about { font-size: 13px; color: #94a3b8; max-width: 40ch; margin-top: 10px; }
.dsh-footer h4 { color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 12px; }
.dsh-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 13.5px; }
.dsh-footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.dsh-footer__brand .dsh-brand__mark { background: var(--dsh-accent); }
.dsh-footer__brand .dsh-brand__name { color: #fff; }
.dsh-footer__social { display: flex; gap: 8px; margin-top: 14px; }
.dsh-footer__social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--dsh-radius);
  background: rgba(148,163,184,.12); color: #cbd5e1; }
.dsh-footer__social a:hover { background: var(--dsh-accent); color: #fff; }
.dsh-footer__social svg { width: 17px; height: 17px; }
.dsh-footer__bar { border-top: 1px solid rgba(148,163,184,.18); padding-block: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: #94a3b8; }
.dsh-footer__attrib { font-size: 11.5px; color: #64748b; max-width: 80ch; padding-bottom: 14px; }

/* 18. Autocomplete ======================================================== */
.dsh-ac { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  background: #fff; border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius);
  box-shadow: 0 12px 34px rgba(15,23,42,.14); padding: 5px; display: none; max-height: 70vh; overflow-y: auto; }
.dsh-ac.is-open { display: block; }
.dsh-ac__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: calc(var(--dsh-radius) - 2px); cursor: pointer; }
.dsh-ac__item[aria-selected="true"], .dsh-ac__item:hover { background: var(--dsh-tint); }
.dsh-ac__pn { font-family: var(--dsh-mono); font-weight: 600; color: var(--dsh-ink); font-size: 13.5px; }
.dsh-ac__sub { font-size: 12px; color: var(--dsh-muted); }
.dsh-ac__maker { margin-left: auto; font-size: 11.5px; color: var(--dsh-faint); white-space: nowrap; }
.dsh-ac__empty { padding: 12px; font-size: 13px; color: var(--dsh-muted); text-align: center; }

/* 18b. Widgets (theme + core, placed in theme areas) ====================== */
.dsh-widget__title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--dsh-ink); margin: 0 0 10px; }
.dsh-widget__search { margin-bottom: 4px; }
.dsh-widget__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.dsh-widget__links a { color: var(--dsh-body); display: inline-flex; align-items: center; gap: 7px; }
.dsh-widget__links a:hover { color: var(--dsh-accent); }
.dsh-widget__chips { display: flex; flex-wrap: wrap; gap: 7px; }
/* give core widgets (search/recent-posts/categories) sane styling inside our areas */
.dsh-areawrap .widget { margin-bottom: 20px; }
.dsh-areawrap .widget:last-child { margin-bottom: 0; }
.dsh-areawrap .widget-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dsh-ink); margin: 0 0 10px; }
.dsh-areawrap .widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.dsh-areawrap .widget a { color: var(--dsh-body); }
.dsh-areawrap .widget a:hover { color: var(--dsh-accent); }
.dsh-areawrap .widget-search { display: flex; border: 1.5px solid var(--dsh-line); border-radius: var(--dsh-radius); overflow: hidden; }
.dsh-areawrap .widget-search input { flex: 1; border: 0; padding: 9px 11px; font: inherit; }
.dsh-areawrap .widget-search input:focus { outline: none; }
.dsh-areawrap .widget-search button { border: 0; background: var(--dsh-accent); color: #fff; padding: 0 14px; cursor: pointer; font-weight: 600; }

/* 19. Utilities (dsh- prefixed, used by templates) ======================== */
.dsh-hide { display: none !important; }
.dsh-flex { display: flex; }
.dsh-aic { align-items: center; }
.dsh-jcb { justify-content: space-between; }
.dsh-gap { gap: 10px; }
.dsh-gap-sm { gap: 6px; }
.dsh-wrap-f { flex-wrap: wrap; }
.dsh-grow { flex: 1 1 auto; min-width: 0; }
.dsh-mt { margin-top: 16px; }
.dsh-mt-lg { margin-top: 28px; }
.dsh-mb { margin-bottom: 16px; }
.dsh-muted { color: var(--dsh-muted); }
.dsh-small { font-size: 12.5px; }
.dsh-center { text-align: center; }
.dsh-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsh-divider { height: 1px; background: var(--dsh-line); border: 0; margin-block: 20px; }

/* 20. Responsive ========================================================== */
@media (max-width: 1024px) {
  .dsh-detail--sidebar { grid-template-columns: minmax(0,1fr); }
  .dsh-footer__cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 860px) {
  /* collapse the results filter rail into a drawer */
  .dsh-layout--left, .dsh-layout--right { grid-template-columns: minmax(0,1fr); }
  .dsh-rail { position: fixed; inset: 0 auto 0 0; width: min(86vw, 340px); z-index: 70;
    background: #fff; border-right: 1px solid var(--dsh-line); transform: translateX(-100%);
    transition: transform .22s ease; overflow-y: auto; padding: 12px; top: 0; }
  .dsh-rail.is-open { transform: none; box-shadow: 0 0 60px rgba(15,23,42,.3); }
  .dsh-drawer__scrim.is-on { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 65; }
  .dsh-filterbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
  .dsh-drawer-close { display: inline-grid; }
}
@media (max-width: 720px) {
  .dsh-header__search { display: none; }      /* moves to a dedicated row below */
  .dsh-header__search--mobile { display: block; flex-basis: 100%; order: 3; padding-bottom: 12px; }
  .dsh-nav__row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .dsh-nav__row::-webkit-scrollbar { display: none; }
  .dsh-nav a { white-space: nowrap; }
  .dsh-footer__cols { grid-template-columns: 1fr; gap: 22px; padding-block: 28px; }
  .dsh-rowitem { flex-direction: column; }
  .dsh-rowitem__actions { flex-direction: row; align-items: center; }
  /* dense tables: let the body stack into labelled rows on the narrowest views */
  .dsh-table.dsh-table--stack thead { display: none; }
  .dsh-table.dsh-table--stack tbody tr { display: block; border-bottom: 1px solid var(--dsh-line); padding: 6px 0; }
  .dsh-table.dsh-table--stack td { display: flex; justify-content: space-between; gap: 16px; border: 0; padding: 5px 14px; }
  .dsh-table.dsh-table--stack td::before { content: attr(data-label); color: var(--dsh-muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
  .dsh-table.dsh-table--stack td.dsh-table__cell--main::before { display: none; }
}
@media (min-width: 721px) {
  .dsh-header__search--mobile { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dsh-rail { transition: none; }
  .dsh-spin { animation: none; }
  * { scroll-behavior: auto !important; }
}
@media print {
  .dsh-utility, .dsh-nav, .dsh-footer, .dsh-rail, .dsh-filterbar, .dsh-header__actions { display: none !important; }
  .dsh-body { background: #fff; }
}


/* 21. Navigation + form fields (1.0.2) ==================================== */
/* The header toggle buttons (search + menu) are a mobile affordance only; on
   wider screens the inline search field and the horizontal nav bar are shown
   instead. This overrides the `display:flex` set in section 5. */
.dsh-header__actions { display: none; }

/* Standard theme form field — a real, bordered control. The search input is
   deliberately borderless and transparent (it lives inside .dsh-search), so it
   must not be reused for form fields like the comment form. */
.dsh-input, .dsh-textarea {
  display: block; width: 100%; box-sizing: border-box;
  font: inherit; font-size: 14px; color: var(--dsh-ink); background: #fff;
  border: 1.5px solid var(--dsh-line); border-radius: var(--dsh-radius);
  padding: 10px 12px; }
.dsh-input::placeholder, .dsh-textarea::placeholder { color: var(--dsh-faint); }
.dsh-input:focus, .dsh-textarea:focus { outline: none; border-color: var(--dsh-accent); box-shadow: var(--dsh-focus); }
.dsh-textarea { min-height: 120px; resize: vertical; }

/* Mobile navigation drawer (revealed by the menu toggle) */
#dsh-mobile-nav { border-top: 1px solid var(--dsh-line); background: var(--dsh-header-bg); }
#dsh-mobile-nav .bh-menu--stack { gap: 0; }
#dsh-mobile-nav .bh-menu__link { color: var(--dsh-body); padding: 11px 0; font-size: 14px; font-weight: 500; }
#dsh-mobile-nav .bh-menu__link:hover { color: var(--dsh-accent); text-decoration: none; }
#dsh-mobile-nav .bh-menu__item + .bh-menu__item { border-top: 1px solid var(--dsh-line-2); }
#dsh-mobile-nav .bh-submenu .bh-menu__link { color: var(--dsh-muted); font-weight: 400; padding: 8px 0; }

@media (min-width: 721px) {
  /* The drawer and its toggles never appear on the desktop layout. */
  #dsh-mobile-nav, #dsh-mobile-search { display: none !important; }
}
@media (max-width: 720px) {
  .dsh-header__actions { display: flex; }  /* reveal the search + menu toggles */
  .dsh-nav { display: none; }              /* the horizontal bar becomes the drawer */
}