:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #5b6475;
  --border: #e5e7eb;
  --dark: #111827;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

.hd-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 16px 50px;
}

.hd-hero {
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.hd-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--orange-dark);
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hd-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--orange);
  display: inline-block;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hd-summary {
  max-width: 920px;
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 24px;
}

.hd-summary p {
  margin: 0 0 12px;
}

.hd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .02em;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.hd-btn:hover {
  transform: translateY(-1px);
}

.hd-btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 12px 25px rgba(249, 115, 22, .25);
}

.hd-btn-primary:hover {
  background: var(--orange-dark);
}

.hd-btn-dark {
  background: var(--dark);
  color: #fff;
  box-shadow: 0 12px 25px rgba(17, 24, 39, .20);
}

.hd-viewer-section {
  margin-top: 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hd-viewer-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.hd-viewer-title {
  font-weight: 800;
  font-size: 17px;
}

.hd-viewer-status {
  color: var(--muted);
  font-size: 14px;
}

.hd-pdf-viewer {
  min-height: 560px;
  padding: 18px;
  background: #e9edf5;
}

.hd-pdf-placeholder {
  height: 760px;
  max-width: 980px;
  margin: 0 auto 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc, #e5e7eb);
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-weight: 700;
}

.hd-pdf-page {
  display: block;
  max-width: 980px;
  width: 100%;
  margin: 0 auto 18px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
}

.hd-foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 28px 0 10px;
}

@media (max-width: 640px) {
  .hd-wrap {
    padding: 14px 10px 34px;
  }

  .hd-hero {
    padding: 20px;
    border-radius: 18px;
  }

  .hd-summary {
    font-size: 16px;
  }

  .hd-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hd-btn {
    width: 100%;
  }

  .hd-viewer-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hd-pdf-viewer {
    padding: 10px;
    min-height: 480px;
  }

  .hd-pdf-placeholder {
    height: 620px;
  }
}

/* HD PDF CLICKABLE LINK OVERLAY START */
.hd-pdf-page-wrap {
  position: relative;
  max-width: 980px;
  width: fit-content;
  margin: 0 auto 18px;
  line-height: 0;
}

.hd-pdf-page-wrap .hd-pdf-page {
  margin: 0;
}

.hd-pdf-link-overlay {
  position: absolute;
  display: block;
  z-index: 5;
  cursor: pointer;
  background: rgba(255,255,255,0);
}

.hd-pdf-link-overlay:hover {
  outline: 2px solid rgba(249,115,22,.45);
  background: rgba(249,115,22,.08);
}
/* HD PDF CLICKABLE LINK OVERLAY END */


/* HD BRANDING START */
.hd-logo {
  height: 28px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  border-radius: 6px;
}

.hd-brand span {
  display: inline-block;
}
/* HD BRANDING END */

/* HD forced branding */
.hd-logo {
  height: 34px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  border-radius: 8px;
}
.hd-brand {
  gap: 10px;
  align-items: center;
}
.hd-brand span {
  display: inline-block;
}

/* HD exact logo fix */
.hd-logo {
  height: 34px !important;
  width: auto !important;
  max-width: 220px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}
.hd-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* remove PDF text from header brand */
.hd-brand {
  display: inline-flex;
  align-items: center;
  gap: 0 !important;
}
.hd-brand span {
  display: none !important;
}

/* PDF lazy text + full manual overlay fix */
.hd-pdf-lazy-note,
.hd-lazy-note,
.lazy-loading,
[data-lazy-text],
[data-status*="lazy" i] {
  display: none !important;
}

.hd-pdf-full-manual-page-link {
  position: absolute !important;
  inset: 0 !important;
  z-index: 50 !important;
  display: block !important;
  background: rgba(255,255,255,0) !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  cursor: pointer !important;
}

.hd-pdf-page-has-link {
  position: relative !important;
}

.hd-pdf-page-has-link::after {
  content: "Open full manual";
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 51;
  background: rgba(15, 23, 42, .92);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(15,23,42,.18);
}

.hd-viewer-meta {
  white-space: nowrap;
}

/* FINAL PDF annotation URL overlay fix */
.hd-pdf-page-wrap {
  position: relative !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hd-pdf-page {
  display: block !important;
  position: relative !important;
  z-index: 1 !important;
}

.hd-pdf-link-overlay {
  position: absolute !important;
  display: block !important;
  z-index: 999 !important;
  pointer-events: auto !important;
  background: rgba(255,255,255,0) !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  cursor: pointer !important;
}

/* FINAL brand, favicon, and PDF click overlay fix */
.hd-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}
.hd-brand span {
  display: none !important;
}
.hd-logo {
  height: 34px !important;
  width: auto !important;
  max-width: 220px !important;
  object-fit: contain !important;
  display: inline-block !important;
}
.hd-pdf-page-wrap {
  position: relative !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.hd-pdf-page {
  display: block !important;
  position: relative !important;
  z-index: 1 !important;
}
.hd-pdf-link-overlay,
.hd-pdf-fullpage-link-overlay {
  position: absolute !important;
  display: block !important;
  z-index: 1000 !important;
  pointer-events: auto !important;
  background: rgba(255,255,255,0) !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  cursor: pointer !important;
}
.hd-pdf-fullpage-link-overlay {
  inset: 0 !important;
  z-index: 999 !important;
}

/* HD safe no-SVG share buttons + mobile fix */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.hd-sharebar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #fff 0%, #fff7ed 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hd-share-copywrap {
  min-width: 185px;
}

.hd-share-kicker {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .08em;
  color: #111827;
}

.hd-share-subtitle {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.25;
  color: #6b7280;
  font-weight: 700;
}

.hd-share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hd-share-btn {
  min-height: 36px;
  padding: 8px 12px 8px 9px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  appearance: none;
  box-shadow: 0 7px 16px rgba(15, 23, 42, .07);
  transition: transform .15s ease, box-shadow .15s ease;
}

.hd-share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .11);
}

.hd-share-ico {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  border-radius: 999px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 10px !important;
  font-weight: 900;
  line-height: 1 !important;
  color: #fff;
  overflow: hidden;
}

.hd-share-native {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.hd-share-native .hd-share-ico {
  background: #f97316;
  font-size: 13px !important;
}

.hd-share-whatsapp {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.hd-share-whatsapp .hd-share-ico {
  background: #22c55e;
  font-size: 8px !important;
}

.hd-share-facebook {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.hd-share-facebook .hd-share-ico {
  background: #2563eb;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px !important;
}

.hd-share-x {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

.hd-share-x .hd-share-ico {
  background: #111827;
  font-size: 12px !important;
}

.hd-share-telegram {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.hd-share-telegram .hd-share-ico {
  background: #0ea5e9;
  font-size: 8px !important;
}

.hd-share-email {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.hd-share-email .hd-share-ico {
  background: #f97316;
  font-size: 12px !important;
}

.hd-share-copy {
  background: #fffbeb;
  border-color: #fdba74;
  color: #7c2d12;
}

.hd-share-copy .hd-share-ico {
  background: #fb923c;
  font-size: 11px !important;
}

.hd-share-copy.is-copied {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.hd-share-copy.is-copied .hd-share-ico {
  background: #16a34a;
}

@media (max-width: 760px) {
  .hd-wrap {
    padding: 10px 8px 32px !important;
  }

  .hd-hero {
    padding: 18px 16px !important;
    border-radius: 18px !important;
    overflow: hidden;
  }

  .hd-logo {
    max-width: min(260px, 84vw) !important;
    height: auto !important;
  }

  h1 {
    font-size: clamp(28px, 9vw, 38px) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.035em !important;
    overflow-wrap: anywhere;
  }

  .hd-summary {
    font-size: 16px !important;
  }

  .hd-viewer-section {
    border-radius: 18px !important;
    margin-top: 18px !important;
  }

  .hd-viewer-head {
    padding: 14px 16px !important;
  }

  .hd-sharebar {
    padding: 14px;
    align-items: stretch;
    flex-direction: column;
  }

  .hd-share-copywrap {
    min-width: 0;
  }

  .hd-share-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 8px;
  }

  .hd-share-btn {
    width: 100%;
    min-height: 42px;
    font-size: 13px;
  }

  .hd-pdf-viewer {
    padding: 8px !important;
  }
}

@media (max-width: 380px) {
  .hd-share-actions {
    grid-template-columns: 1fr;
  }
}

/* HD SHARE FINAL CLEAN OVERRIDE */
.hd-share-final,
.hd-share-final * {
  box-sizing: border-box !important;
}

.hd-share-final {
  padding: 14px 20px !important;
  border-bottom: 1px solid #e5e7eb !important;
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.hd-share-final .hd-share-copywrap {
  min-width: 190px !important;
  flex: 0 0 auto !important;
}

.hd-share-final .hd-share-kicker {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  color: #111827 !important;
  text-transform: uppercase !important;
}

.hd-share-final .hd-share-subtitle {
  margin: 3px 0 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  color: #6b7280 !important;
  font-weight: 700 !important;
}

.hd-share-final .hd-share-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.hd-share-final .hd-share-btn {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 36px !important;
  height: 36px !important;
  padding: 7px 12px 7px 8px !important;
  border-radius: 999px !important;
  border: 1px solid #e5e7eb !important;
  background: #ffffff !important;
  color: #111827 !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  cursor: pointer !important;
  font-family: Arial, Helvetica, sans-serif !important;
  box-shadow: 0 7px 16px rgba(15, 23, 42, .07) !important;
  appearance: none !important;
  vertical-align: middle !important;
}

.hd-share-final .hd-share-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .11) !important;
}

.hd-share-final .hd-share-ico {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: #ffffff !important;
  overflow: hidden !important;
  text-decoration: none !important;
}

.hd-share-final .hd-share-native {
  background: #111827 !important;
  color: #ffffff !important;
  border-color: #111827 !important;
}
.hd-share-final .hd-share-native .hd-share-ico {
  background: #f97316 !important;
  font-size: 13px !important;
}

.hd-share-final .hd-share-whatsapp {
  background: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
  color: #15803d !important;
}
.hd-share-final .hd-share-whatsapp .hd-share-ico {
  background: #22c55e !important;
  font-size: 8px !important;
}

.hd-share-final .hd-share-facebook {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}
.hd-share-final .hd-share-facebook .hd-share-ico {
  background: #2563eb !important;
  font-size: 15px !important;
}

.hd-share-final .hd-share-x {
  background: #f9fafb !important;
  border-color: #d1d5db !important;
  color: #111827 !important;
}
.hd-share-final .hd-share-x .hd-share-ico {
  background: #111827 !important;
  font-size: 12px !important;
}

.hd-share-final .hd-share-telegram {
  background: #f0f9ff !important;
  border-color: #bae6fd !important;
  color: #0369a1 !important;
}
.hd-share-final .hd-share-telegram .hd-share-ico {
  background: #0ea5e9 !important;
  font-size: 8px !important;
}

.hd-share-final .hd-share-email {
  background: #fff7ed !important;
  border-color: #fed7aa !important;
  color: #c2410c !important;
}
.hd-share-final .hd-share-email .hd-share-ico {
  background: #f97316 !important;
  font-size: 12px !important;
}

.hd-share-final .hd-share-copy {
  background: #fffbeb !important;
  border-color: #fdba74 !important;
  color: #7c2d12 !important;
}
.hd-share-final .hd-share-copy .hd-share-ico {
  background: #fb923c !important;
  font-size: 11px !important;
}
.hd-share-final .hd-share-copy.is-copied {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

@media (max-width: 760px) {
  .hd-share-final {
    padding: 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .hd-share-final .hd-share-copywrap {
    min-width: 0 !important;
  }

  .hd-share-final .hd-share-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 8px !important;
  }

  .hd-share-final .hd-share-btn {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
  }
}

@media (max-width: 380px) {
  .hd-share-final .hd-share-actions {
    grid-template-columns: 1fr !important;
  }
}

/* HD LOGO SIZE FINAL FIX */

/* Product pages: desktop logo was too small */
@media (min-width: 761px) {
  body.hd-product-page .hd-hero .hd-brand {
    display: inline-flex !important;
    max-width: 360px !important;
  }

  body.hd-product-page .hd-hero .hd-logo {
    width: 300px !important;
    max-width: 300px !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block !important;
  }
}

/* Product pages: keep logo sane on mobile */
@media (max-width: 760px) {
  body.hd-product-page .hd-hero .hd-brand {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  body.hd-product-page .hd-hero .hd-logo {
    width: min(250px, 76vw) !important;
    max-width: 76vw !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}

/* Home page: mobile logo was overflowing/stretching */
@media (max-width: 760px) {
  body.hd-home-page .hd-brand,
  body.hd-home-page .hd-logo {
    max-width: 100% !important;
  }

  body.hd-home-page .hd-logo {
    width: min(250px, 76vw) !important;
    max-width: 76vw !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block !important;
  }
}

@media (max-width: 380px) {
  body.hd-home-page .hd-logo,
  body.hd-product-page .hd-hero .hd-logo {
    width: min(220px, 72vw) !important;
    max-width: 72vw !important;
  }
}

