/* DatasheetHub Pro — component sheet (2.5.1)
   Part-page header (scoped to .dsh-sheet, so the homepage's own .dsh-hero
   banner keeps its centred design), meta row, section nav, one shared
   section-card design for every block on the part page, compact listing
   cards for the category / tag / author / manufacturer pages, the back-to-top
   button, and a layout that adapts to the space the page sidebars leave.
   The stylesheet's version in header.php follows this file's modification
   time, so browsers pick up every change. */

.dsh-sheet { display: block; }
.dsh-sheet .dsh-panel__body .dsh-prose { max-width: none; }
.dsh-sheet .dsh-prose img { max-width: 100%; height: auto; }
.dsh-sheet .dsh-prose figure { margin: 1em 0; text-align: center; }
.dsh-sheet [id^="dsh-sec-"], .dsh-sheet #datasheet-preview, .dsh-sheet #comments { scroll-margin-top: 140px; }

/* Part-page header -------------------------------------------------------- */
/* Text on the left, the part's image on the right at a size that balances it. */
.dsh-sheet .dsh-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: center;
  background: #fff; border: 1px solid var(--dsh-line); border-radius: 16px; padding: 24px 26px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -20px rgba(15, 23, 42, .25); }
.dsh-sheet .dsh-hero--noimg { grid-template-columns: minmax(0, 1fr); }
.dsh-sheet .dsh-hero__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--dsh-muted); margin-bottom: 10px; }
.dsh-sheet .dsh-hero__eyebrow a { color: var(--dsh-body); }
.dsh-sheet .dsh-hero__eyebrow a:hover { color: var(--dsh-accent); }
.dsh-sheet .dsh-hero__eyebrow svg { width: 15px; height: 15px; }
/* The maker's logo sits in the eyebrow line, never larger than the text around it. */
.dsh-sheet .dsh-hero__logo { display: block; height: 24px; width: auto; max-width: 120px; object-fit: contain; flex: 0 0 auto; }
.dsh-sheet .dsh-hero__title { margin: 0; font-size: clamp(21px, 3vw, 29px); line-height: 1.28; font-weight: var(--dsh-h-weight, 700); color: var(--dsh-ink); overflow-wrap: anywhere; }
.dsh-sheet .dsh-hero__title .dsh-pn { font-size: 1em; color: var(--dsh-accent); }
.dsh-sheet .dsh-hero__rest { font-weight: 600; }
.dsh-sheet .dsh-hero__pnrow { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.dsh-sheet .dsh-hero__pnrow .dsh-pn { font-size: 15px; }
.dsh-sheet .dsh-hero__title .dsh-copy { vertical-align: middle; font-size: 12px; font-weight: 500; }
.dsh-sheet .dsh-hero__desc { margin: 10px 0 0; color: var(--dsh-body); font-size: 15px; line-height: 1.55; }

.dsh-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 13px; color: var(--dsh-muted); }
.dsh-meta > * { display: inline-flex; align-items: center; gap: 5px; }
.dsh-meta a { color: inherit; }
.dsh-meta a:hover { color: var(--dsh-accent); }
.dsh-meta svg { width: 14px; height: 14px; flex: 0 0 auto; }

.dsh-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dsh-fact { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--dsh-line-2); color: var(--dsh-muted); }
.dsh-fact b { font-weight: 600; color: var(--dsh-ink); font-family: var(--dsh-mono); }

.dsh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.dsh-actions .dsh-btn { padding: 9px 14px; border-radius: 10px; }
.dsh-actions .dsh-btn svg { width: 16px; height: 16px; }
/* The download button: short label, the file size as a small pill. */
.dsh-btn--dl { gap: 8px; box-shadow: 0 6px 16px -10px color-mix(in srgb, var(--dsh-accent) 80%, transparent); }
.dsh-btn--dl:hover { transform: translateY(-1px); }
.dsh-btn__meta { padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.4;
  background: rgba(255, 255, 255, .2); color: inherit; }

.dsh-sheet .dsh-hero__media { width: 300px; margin: 0; }
.dsh-sheet .dsh-hero__media a { display: block; border: 1px solid var(--dsh-line); border-radius: 12px; overflow: hidden; background: #fff; aspect-ratio: 1 / 1; }
.dsh-sheet .dsh-hero__media img { display: block; width: 100%; height: 100%; object-fit: contain; border: 0; border-radius: 0; }
.dsh-sheet .dsh-hero__media figcaption { font-size: 11.5px; color: var(--dsh-faint); text-align: center; margin-top: 6px; }

/* Section nav ----------------------------------------------------------- */
.dsh-sheetnav { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; margin: 14px 0 16px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.dsh-sheetnav a { flex: 0 0 auto; font-size: 12.5px; padding: 5px 12px; border: 1px solid var(--dsh-line); border-radius: 999px; background: #fff; color: var(--dsh-body); text-decoration: none; white-space: nowrap; }
.dsh-sheetnav a:hover, .dsh-sheetnav a:focus-visible { border-color: var(--dsh-accent); color: var(--dsh-accent); }

/* Section cards: one design for every block on the part page ------------ */
.dsh-sheet .dsh-panel { border-radius: 14px; overflow: hidden; border-color: var(--dsh-line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 26px -24px rgba(15, 23, 42, .3); }
.dsh-sheet .dsh-panel__head { gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--dsh-line-2);
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--dsh-line-2) 55%, #fff)); }
/* the heading icon becomes a small tinted tile */
.dsh-sheet .dsh-panel__head > svg { box-sizing: content-box; flex: none; width: 16px; height: 16px; padding: 6px; border-radius: 9px;
  color: var(--dsh-accent); background: var(--dsh-tint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dsh-accent) 14%, transparent); }
.dsh-sheet .dsh-panel__head h2 { margin: 0; font-size: 15.5px; font-weight: 700; letter-spacing: -.005em; color: var(--dsh-ink); }
.dsh-sheet .dsh-panel__body { padding: 18px; }

/* Key specifications: tiles inside the card */
.dsh-sheet .dsh-specgrid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; background: none; border: 0; border-radius: 0; overflow: visible; }
.dsh-sheet .dsh-specgrid__item { position: relative; padding: 12px 14px 12px 16px; border-radius: 11px; background: color-mix(in srgb, var(--dsh-line-2) 70%, #fff);
  border: 1px solid var(--dsh-line-2); transition: border-color .15s, background .15s; }
.dsh-sheet .dsh-specgrid__item::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0;
  background: color-mix(in srgb, var(--dsh-accent) 55%, transparent); }
.dsh-sheet .dsh-specgrid__item:hover { border-color: color-mix(in srgb, var(--dsh-accent) 35%, var(--dsh-line)); background: #fff; }
.dsh-sheet .dsh-specgrid__k { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--dsh-muted); }
.dsh-sheet .dsh-specgrid__v { margin-top: 4px; font-family: var(--dsh-font); font-size: 15px; font-weight: 650; line-height: 1.35; color: var(--dsh-ink); overflow-wrap: anywhere; }

/* Datasheet card */
.dsh-sheet .dsh-ds { align-items: center; gap: 16px; }
.dsh-sheet .dsh-ds__ico { width: 50px; height: 50px; border-radius: 13px; color: var(--dsh-accent);
  background: linear-gradient(145deg, var(--dsh-tint), color-mix(in srgb, var(--dsh-tint) 60%, var(--dsh-accent) 12%));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dsh-accent) 16%, transparent); }
.dsh-sheet .dsh-ds__name { font-size: 15px; }
.dsh-sheet .dsh-ds__meta { gap: 6px; margin-top: 6px; }
.dsh-sheet .dsh-ds__meta > span:not(.dsh-badge) { padding: 1px 8px; border-radius: 999px; background: var(--dsh-line-2); color: var(--dsh-body); }
.dsh-sheet .dsh-ds__actions .dsh-btn { padding: 9px 14px; border-radius: 10px; }
.dsh-sheet .dsh-ds__src { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--dsh-line); }

/* PDF preview card */
.dsh-sheet .dsh-pdfsec .dsh-panel__head { flex-wrap: wrap; }
.dsh-sheet .dsh-pdfsec__meta { margin-left: auto; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--dsh-line-2); color: var(--dsh-muted); }
.dsh-sheet .dsh-pdfsec__body { padding: 12px; }
.dsh-sheet .dsh-pdfsec__body .dpv { border-radius: 10px; }

/* Tags */
.dsh-tagcloud { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dsh-tag { display: inline-flex; align-items: center; gap: 2px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--dsh-body); background: #fff; border: 1px solid var(--dsh-line); text-decoration: none; transition: border-color .15s, color .15s, background .15s; }
.dsh-tag::before { content: "#"; color: var(--dsh-accent); font-weight: 700; opacity: .8; }
.dsh-tag:hover { text-decoration: none; color: var(--dsh-accent); border-color: color-mix(in srgb, var(--dsh-accent) 45%, var(--dsh-line)); background: var(--dsh-tint); }

/* Lists ------------------------------------------------------------------ */
.dsh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; color: var(--dsh-body); line-height: 1.55; }
.dsh-list li { position: relative; padding-left: 20px; }
.dsh-list li::before { content: ""; position: absolute; left: 5px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--dsh-accent); opacity: .7; }
.dsh-list li.dsh-list__head { padding-left: 0; font-weight: 600; color: var(--dsh-ink); margin-top: 8px; grid-column: 1 / -1; }
.dsh-list li.dsh-list__head:first-child { margin-top: 0; }
.dsh-list li.dsh-list__head + li.dsh-list__head { margin-top: 0; font-weight: 500; color: var(--dsh-muted); }
.dsh-list li.dsh-list__head::before { display: none; }
.dsh-list--cols { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 24px; }

/* Overview + more ------------------------------------------------------- */
.dsh-overview__lead { font-size: 15.5px; color: var(--dsh-ink); }
.dsh-more { margin-top: 10px; }
.dsh-more > summary { cursor: pointer; color: var(--dsh-link); font-size: 13px; padding: 6px 0; list-style: none; }
.dsh-more > summary::-webkit-details-marker { display: none; }
.dsh-more > summary::before { content: "▸ "; }
.dsh-more[open] > summary::before { content: "▾ "; }

/* FAQ ------------------------------------------------------------------- */
.dsh-faq details { border-bottom: 1px solid var(--dsh-line-2); padding: 11px 0; }
.dsh-faq details:first-child { padding-top: 0; }
.dsh-faq details:last-child { border-bottom: 0; padding-bottom: 0; }
.dsh-faq summary { cursor: pointer; font-weight: 600; color: var(--dsh-ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.dsh-faq summary::-webkit-details-marker { display: none; }
.dsh-faq summary::after { content: "+"; color: var(--dsh-muted); font-weight: 400; font-size: 18px; line-height: 1; }
.dsh-faq details[open] summary::after { content: "–"; }
.dsh-faq details p { margin: 8px 0 0; color: var(--dsh-body); line-height: 1.6; }

/* Aside details --------------------------------------------------------- */
.dsh-sheet .dsh-details td { font-family: var(--dsh-font); }
.dsh-sheet .dsh-details td.is-mono { font-family: var(--dsh-mono); }

/* Comments -------------------------------------------------------------- */
.dsh-comment--reply { margin-left: 26px; border-left: 3px solid var(--dsh-line); }
.dsh-comment__reply { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--dsh-link); font-size: 12.5px; cursor: pointer; }
.dsh-comment__reply:hover { text-decoration: underline; }
/* the comment count beside the heading reads as a small pill, not a stray number */
.dsh-comments__title [data-bh-comment-count] { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; margin-left: 4px;
  border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1; vertical-align: middle; color: var(--dsh-accent-hover); background: var(--dsh-tint); }

/* Listing cards (category, tag, author and manufacturer pages) ---------- */
.dsh-pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.dsh-pcard { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: #fff;
  border: 1px solid var(--dsh-line); border-radius: 14px; isolation: isolate;
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.dsh-pcard:hover { border-color: color-mix(in srgb, var(--dsh-accent) 45%, var(--dsh-line)); box-shadow: 0 12px 26px -20px rgba(15, 23, 42, .45); transform: translateY(-1px); }
.dsh-pcard__thumb { display: grid; place-items: center; flex: none; width: 76px; height: 76px; border-radius: 11px; overflow: hidden;
  background: #fff; border: 1px solid var(--dsh-line-2); color: var(--dsh-accent); }
.dsh-pcard__thumb img { width: 100%; height: 100%; object-fit: contain; }
.dsh-pcard__thumb svg { width: 26px; height: 26px; opacity: .6; }
.dsh-pcard__body { min-width: 0; flex: 1; }
.dsh-pcard__title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.dsh-pcard__title a { color: var(--dsh-ink); text-decoration: none; }
.dsh-pcard__title a.dsh-pn { color: var(--dsh-accent); font-size: 1em; }
.dsh-pcard__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }   /* whole card clickable */
.dsh-pcard:hover .dsh-pcard__title a { text-decoration: underline; text-underline-offset: 2px; }
.dsh-pcard__mfr { margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--dsh-muted); }
.dsh-pcard__desc { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--dsh-body);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dsh-pcard__chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.dsh-pchip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  color: var(--dsh-muted); background: var(--dsh-line-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsh-pchip svg { width: 12px; height: 12px; flex: none; }
.dsh-pchip--mono { font-family: var(--dsh-mono); }
.dsh-pchip--ds { color: var(--dsh-accent-hover); background: var(--dsh-tint); }
a.dsh-pchip:hover { text-decoration: none; color: var(--dsh-accent); background: var(--dsh-tint-2); }

/* Back to top ------------------------------------------------------------- */
.dsh-totop { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: var(--dsh-accent);
  box-shadow: 0 10px 24px -10px rgba(15, 23, 42, .55), 0 0 0 1px rgba(255, 255, 255, .25) inset;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s, background .15s; }
.dsh-totop.is-on { opacity: 1; transform: none; pointer-events: auto; }
.dsh-totop:hover { background: var(--dsh-accent-hover); }
.dsh-totop:focus-visible { outline: 3px solid color-mix(in srgb, var(--dsh-accent) 40%, transparent); outline-offset: 2px; }
.dsh-totop svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  .dsh-pcard, .dsh-btn--dl, .dsh-totop { transition: none; }
  .dsh-pcard:hover, .dsh-btn--dl:hover { transform: none; }
}

/* Layout: adapt to the room the page sidebars leave --------------------- */
.dsh-shell__main { container-type: inline-size; }
@container (max-width: 920px) {
  .dsh-sheet .dsh-detail--sidebar { grid-template-columns: minmax(0, 1fr); }
  .dsh-sheet .dsh-hero { grid-template-columns: minmax(0, 1fr) 240px; gap: 22px; }
  .dsh-sheet .dsh-hero__media { width: 240px; }
}
@container (max-width: 580px) {
  .dsh-sheet .dsh-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .dsh-sheet .dsh-hero__media { order: -1; width: 100%; max-width: 260px; margin: 0 auto; }
  .dsh-comment--reply { margin-left: 12px; }
  .dsh-pcards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .dsh-sheet .dsh-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .dsh-sheet .dsh-hero__media { order: -1; width: 100%; max-width: 260px; margin: 0 auto; }
  .dsh-sheet .dsh-panel__body { padding: 14px; }
  .dsh-sheet .dsh-specgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dsh-pcards { grid-template-columns: minmax(0, 1fr); }
  .dsh-pcard__thumb { width: 64px; height: 64px; }
  .dsh-totop { right: 12px; width: 42px; height: 42px; }
}
@media print {
  .dsh-sheetnav, .dsh-actions, .dsh-comments, .dsh-pdfsec, .dsh-totop { display: none !important; }
}

/* Form success message: large and unmistakable (Form Builder) ---------- */
.fb .fb-success { align-items: center; gap: 16px; padding: 22px 24px; border-radius: 16px; background: #ecfdf5; border: 2px solid #34d399; color: #065f46; box-shadow: 0 12px 30px -18px rgba(5, 150, 105, .55); animation: dsh-pop .35s ease-out; scroll-margin-top: 140px; }
.fb .fb-success__icon { width: 44px; height: 44px; padding: 8px; border-radius: 50%; background: #10b981; color: #fff; box-sizing: border-box; }
.fb .fb-success p { font-size: 15.5px; line-height: 1.55; color: #065f46; }
.fb .fb-success p::first-line { font-size: 19px; font-weight: 800; color: #047857; }
@keyframes dsh-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fb .fb-success { animation: none; } }

/* Pages: same width as part pages ------------------------------------------ */
.dsh-page { width: 100%; }
.dsh-page .dsh-prose { max-width: none; }
.dsh-page .dsh-prose .fb { max-width: 900px; }

/* No hover underlines anywhere in the theme (links inside article text keep their normal underline) */
html .dsh-body a:hover, html .dsh-pcard:hover .dsh-pcard__title a, html .dsp-pn:hover, html .dsp-mf:hover, html .dsp-mfcell:hover .dsp-mfname, html .dsp-pnlink:hover, html .dsp-desc:hover, html .dsh-comment__reply:hover, html .dsh-catcard__name a:hover, html .dsh-mfrcard:hover, html .dsh-footer a:hover, html .dsh-nav a:hover { text-decoration: none; }
html .dsh-prose a:hover { text-decoration: underline; }

/* Footer logo (light variant for the dark footer) */
.dsh-footer__logo { display: block; height: auto; max-width: 100%; }
.dsh-footer__brand:has(.dsh-footer__logo) { display: inline-block; }

/* Voice search button (inside every search box) */
.dsh-search__voice { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-right: 6px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--dsh-muted); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.dsh-search__voice:hover { background: var(--dsh-line-2); color: var(--dsh-accent); }
.dsh-search__voice:focus-visible { outline: 2px solid color-mix(in srgb, var(--dsh-accent) 45%, transparent); outline-offset: 2px; }
.dsh-search__voice svg { width: 20px; height: 20px; }
.dsh-search__voice.is-listening { color: #fff; background: var(--dsh-accent); animation: dsh-mic 1.2s ease-in-out infinite; }
@keyframes dsh-mic { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dsh-accent) 45%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
@media (prefers-reduced-motion: reduce) { .dsh-search__voice.is-listening { animation: none; } }

/* Image search + AI Mode ------------------------------------------------------ */
.dsh-search__ai { flex: none; display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 0 14px; height: 40px; border: 0; border-radius: 999px; background: var(--dsh-line-2); color: var(--dsh-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, color .15s ease; }
.dsh-search__ai svg { width: 17px; height: 17px; color: var(--dsh-accent); }
.dsh-search__ai:hover { background: color-mix(in srgb, var(--dsh-tint) 70%, var(--dsh-accent) 10%); }
.dsh-search__ai:focus-visible { outline: 2px solid color-mix(in srgb, var(--dsh-accent) 45%, transparent); outline-offset: 2px; }
@media (max-width: 640px) { .dsh-search__ai span { display: none; } .dsh-search__ai { padding: 0 11px; margin-left: 6px; } }
html.dsh-tool-open { overflow: hidden; }
.dsh-tool { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.dsh-tool__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.dsh-tool__panel { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .45); overflow: hidden; }
.dsh-tool__panel--ai { width: min(760px, 100%); height: min(720px, calc(100vh - 32px)); }
.dsh-tool__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--dsh-line-2); }
.dsh-tool__head h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.dsh-tool__badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--dsh-tint); color: var(--dsh-accent); }
.dsh-tool__x { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; line-height: 1; color: var(--dsh-muted); cursor: pointer; }
.dsh-tool__x:hover { background: var(--dsh-line-2); color: var(--dsh-ink); }
.dsh-tool__body { padding: 18px 20px 16px; overflow: auto; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.dsh-tool__lead { margin: 0; color: var(--dsh-body); font-size: 14.5px; }
.dsh-tool__note { margin: 0; font-size: 12.5px; color: var(--dsh-muted); }
.dsh-tool__pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dsh-tool__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--dsh-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.dsh-tool__btn:hover { background: var(--dsh-accent-hover); color: #fff; }
.dsh-tool__btn--ghost { background: var(--dsh-line-2); color: var(--dsh-ink); }
.dsh-tool__btn--ghost:hover { background: var(--dsh-line); color: var(--dsh-ink); }
.dsh-tool__link { padding: 0; border: 0; background: none; color: var(--dsh-link, var(--dsh-accent)); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.dsh-tool__preview { display: block; max-width: 100%; max-height: 240px; margin: 0 auto; border-radius: 10px; border: 1px solid var(--dsh-line); }
.dsh-tool__status { margin: 10px 0 6px; text-align: center; font-size: 14px; color: var(--dsh-body); }
.dsh-tool__bar { height: 6px; border-radius: 99px; background: var(--dsh-line-2); overflow: hidden; }
.dsh-tool__bar i { display: block; height: 100%; width: 0; background: var(--dsh-accent); transition: width .2s ease; }
.dsh-tool__go { display: flex; gap: 8px; }
.dsh-tool__go .dsh-input { flex: 1; font-size: 16px; font-weight: 600; letter-spacing: .02em; }
.dsh-tool__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dsh-ai__log { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }
.dsh-ai__msg { max-width: 92%; font-size: 14.5px; line-height: 1.6; }
.dsh-ai__msg p { margin: 0 0 8px; } .dsh-ai__msg p:last-child { margin-bottom: 0; }
.dsh-ai__msg--me { align-self: flex-end; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--dsh-accent); color: #fff; }
.dsh-ai__msg--bot { align-self: flex-start; padding: 12px 14px; border-radius: 16px 16px 16px 4px; background: var(--dsh-line-2); color: var(--dsh-ink); }
.dsh-ai__answer ul { margin: 0 0 8px; padding-left: 1.2em; }
.dsh-ai__cite { font-size: .85em; font-weight: 700; text-decoration: none; }
.dsh-ai__notice { color: var(--dsh-body); }
.dsh-ai__sources { display: grid; gap: 6px; margin-top: 10px; }
.dsh-ai__label { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--dsh-muted); }
.dsh-ai__src { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border-radius: 10px; background: #fff; border: 1px solid var(--dsh-line); color: var(--dsh-ink); text-decoration: none; transition: border-color .15s ease; }
.dsh-ai__src:hover { border-color: color-mix(in srgb, var(--dsh-accent) 40%, var(--dsh-line)); }
.dsh-ai__src strong { display: block; font-size: 13.5px; } .dsh-ai__src small { display: block; color: var(--dsh-muted); font-size: 12.5px; margin-top: 2px; }
.dsh-ai__n { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--dsh-tint); color: var(--dsh-accent); font-size: 12px; font-weight: 700; }
.dsh-ai__form { display: flex; gap: 8px; align-items: flex-end; }
.dsh-ai__form textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; font-size: 15px; }
.dsh-ai__typing { display: inline-flex; gap: 4px; } .dsh-ai__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--dsh-muted); animation: dsh-dot 1s infinite ease-in-out; } .dsh-ai__typing i:nth-child(2) { animation-delay: .15s; } .dsh-ai__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dsh-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 640px) { .dsh-tool { padding: 0; } .dsh-tool__panel, .dsh-tool__panel--ai { width: 100%; height: 100%; max-height: none; border-radius: 0; } .dsh-tool__pick { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .dsh-ai__typing i { animation: none; } }
/* Search box — organised controls: input · mic · camera · AI Mode · Search ----- */
.dsh-search { align-items: center; gap: 2px; padding-right: 4px; }
.dsh-search .dsh-search__icon { align-self: stretch; }
.dsh-search .dsh-search__voice { width: 32px; height: 32px; margin: 0; }
.dsh-search .dsh-search__voice svg { width: 18px; height: 18px; }
.dsh-search .dsh-search__btn { height: 32px; margin: 0 0 0 4px; padding: 0 14px; font-size: 13.5px; border-radius: calc(var(--dsh-radius) - 3px); }
.dsh-search .dsh-search__ai { height: 32px; margin: 0 2px 0 6px; padding: 0 12px; font-size: 13px; }
.dsh-search--lg { gap: 4px; padding-right: 7px; }
.dsh-search--lg .dsh-search__voice { width: 40px; height: 40px; }
.dsh-search--lg .dsh-search__voice svg { width: 20px; height: 20px; }
.dsh-search--lg .dsh-search__ai { height: 40px; margin: 0 2px 0 8px; padding: 0 14px; font-size: 14px; }
.dsh-search--lg .dsh-search__btn { height: 40px; margin-left: 4px; padding: 0 18px; font-size: 14.5px; }
@media (max-width: 640px) {
  .dsh-search--lg { gap: 2px; padding-right: 5px; }
  .dsh-search--lg .dsh-search__voice { width: 36px; height: 36px; }
  .dsh-search--lg .dsh-search__ai { height: 36px; padding: 0 10px; margin-left: 4px; }
  .dsh-search--lg .dsh-search__btn { height: 36px; padding: 0 13px; }
}