/* InstaHDPro: editorial article + instructions + FAQ
   Native RTL wrapping, no SVG text, no animated gradients.
   Loaded after Simply HD to avoid legacy UI collisions. */

/* Header and prose of server-rendered feature pages (all Arabic & English routes) */
body.simply-hd #guideContentBox {
  max-width: 980px !important; min-width: 0 !important; margin-inline: auto !important;
  background: var(--sh-surface) !important; border: 1px solid var(--sh-line) !important;
  border-radius: 18px !important; padding: clamp(18px, 3.6vw, 38px) !important;
  box-shadow: none !important; overflow: visible !important;
}
body.simply-hd .seo-editorial-article {
  min-width: 0; max-width: 100%; color: var(--sh-ink) !important;
  font-size: .96rem; line-height: 1.95; overflow-wrap: anywhere;
  word-break: normal;
}
body.simply-hd .seo-editorial-article * { box-sizing: border-box; }
body.simply-hd .seo-article-header { margin: 0 0 24px; }
body.simply-hd .seo-badge-wrap { margin-bottom: 14px; }
body.simply-hd .seo-feature-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px;
  background: var(--sh-accent-soft); color: var(--sh-accent);
  border-radius: 8px; font-size: .76rem; font-weight: 800;
}
body.simply-hd .seo-article-h1 {
  color: var(--sh-ink) !important; font-size: clamp(1.45rem, 3.3vw, 2.15rem) !important;
  line-height: 1.5 !important; font-weight: 900 !important;
  margin: 0 0 12px !important; overflow-wrap: anywhere;
}
body.simply-hd .seo-article-intro, body.simply-hd .seo-article-p {
  color: var(--sh-muted) !important; line-height: 2 !important;
  margin: 0 0 16px !important; font-size: .92rem !important;
}
body.simply-hd .seo-article-section, body.simply-hd .seo-faq-section,
body.simply-hd .seo-related-section {
  margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--sh-line);
}
body.simply-hd .seo-article-h2 {
  color: var(--sh-ink) !important; font-size: clamp(1.18rem, 2.7vw, 1.48rem) !important;
  line-height: 1.55 !important; font-weight: 850 !important; margin: 0 0 16px !important;
}
body.simply-hd .seo-steps-ordered-list {
  list-style: none !important; padding: 0 !important; margin: 0 !important;
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px;
}
body.simply-hd .seo-step-item {
  min-width: 0; display: flex; gap: 10px; align-items: flex-start;
  background: var(--sh-bg); border: 1px solid var(--sh-line);
  padding: 16px; border-radius: 13px; color: var(--sh-ink);
}
body.simply-hd .seo-step-num {
  display: inline-grid; place-items: center; flex: 0 0 31px;
  width: 31px; height: 31px; border-radius: 9px;
  background: var(--sh-accent-soft); color: var(--sh-accent);
  font: 800 .84rem/1 "Inter","Cairo",sans-serif;
}
body.simply-hd .seo-step-txt { min-width: 0; line-height: 1.9; font-size: .82rem; }
body.simply-hd .seo-device-cards {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px;
}
body.simply-hd .seo-device-card {
  border: 1px solid var(--sh-line); background: var(--sh-bg);
  padding: 17px; border-radius: 13px; min-width: 0;
}
body.simply-hd .seo-device-title {
  color: var(--sh-ink) !important; font-size: .92rem; font-weight: 800;
  line-height: 1.65; margin: 0 0 8px;
}
body.simply-hd .seo-device-desc {
  color: var(--sh-muted) !important; font-size: .8rem; line-height: 1.95; margin: 0;
}

/* Semantic HTML diagram replaces the overflowing, dark SVG. */
body.simply-hd .tool-diagram-container {
  display: block; margin: 24px 0 30px !important; padding: 0;
  max-width: 100%; min-width: 0;
}
body.simply-hd .tool-diagram-steps {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px;
  width: 100%; min-width: 0; align-items: stretch;
}
body.simply-hd .tool-diagram-card {
  display: flex; flex-direction: column; gap: 11px;
  padding: 19px; min-width: 0; min-height: 153px;
  border: 1px solid var(--sh-line); background: var(--sh-bg);
  border-radius: 14px; color: var(--sh-ink);
  overflow-wrap: anywhere; text-align: start;
}
body.simply-hd .tool-diagram-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--sh-accent-soft); color: var(--sh-accent);
  font: 800 .84rem/1 "Inter","Cairo",sans-serif;
}
body.simply-hd .tool-diagram-title {
  margin: 0 0 5px !important; color: var(--sh-ink) !important;
  font-size: .97rem !important; font-weight: 800 !important;
  line-height: 1.7 !important;
}
body.simply-hd .tool-diagram-subtitle {
  margin: 0 !important; color: var(--sh-muted) !important;
  font-size: .79rem !important; line-height: 1.85 !important;
}
body.simply-hd .tool-diagram-caption {
  color: var(--sh-muted) !important; font-size: .75rem;
  line-height: 1.8; margin-top: 10px !important; text-align: start;
}

/* SSR feature FAQs: native accessible <details>, not missing toggleSeoFaq() */
body.simply-hd .seo-faq-accordion {
  display: grid; gap: 10px; min-width: 0; width: 100%;
}
body.simply-hd .seo-faq-item {
  min-width: 0; background: var(--sh-surface) !important;
  border: 1px solid var(--sh-line) !important;
  border-radius: 13px; overflow: hidden; color: var(--sh-ink);
}
body.simply-hd .seo-faq-item[open] { border-color: var(--sh-accent) !important; }
body.simply-hd .seo-faq-trigger {
  display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  gap: 14px; cursor: pointer; padding: 14px 18px;
  width: 100%; min-width: 0; list-style: none; text-align: start;
  background: transparent; color: var(--sh-ink); line-height: 1.75;
}
body.simply-hd .seo-faq-trigger::-webkit-details-marker { display:none; }
body.simply-hd .seo-faq-trigger::marker { content: ""; }
body.simply-hd .seo-faq-trigger:hover { background: var(--sh-hover); }
body.simply-hd .seo-faq-trigger:focus-visible {
  outline: 2px solid var(--sh-accent) !important; outline-offset: -3px !important;
}
body.simply-hd .seo-faq-q {
  min-width: 0; flex: 1; font-weight: 800; font-size: .9rem;
  color: var(--sh-ink); line-height: 1.85;
}
body.simply-hd .seo-faq-arrow {
  flex: 0 0 25px; width: 25px; height: 25px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sh-accent-soft); color: var(--sh-accent); font-size: .67rem;
  transition: transform .18s ease;
}
body.simply-hd .seo-faq-item[open] .seo-faq-arrow { transform: rotate(180deg); }
body.simply-hd .seo-faq-answer {
  padding: 0 18px 16px; color: var(--sh-muted) !important;
  font-size: .85rem; line-height: 2 !important; text-align: start;
}
body.simply-hd .seo-faq-answer p { color: var(--sh-muted) !important; margin: 0; }

/* Related tools keep their content readable and restrained. */
body.simply-hd .seo-related-grid {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px;
}
body.simply-hd .seo-related-card {
  min-width: 0; padding: 15px; display: flex; flex-direction: column; gap: 6px;
  text-decoration: none; background: var(--sh-bg); border: 1px solid var(--sh-line);
  border-radius: 12px; color: var(--sh-ink) !important;
}
body.simply-hd .seo-related-card:hover { border-color: var(--sh-accent); }
body.simply-hd .seo-related-title { color: var(--sh-ink) !important; font-size: .84rem; }
body.simply-hd .seo-related-desc { color: var(--sh-muted) !important; font-size: .76rem; line-height: 1.8; }

/* The separate landing-page steps and FAQ use a different class naming system. */
body.simply-hd .steps-grid {
  display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: 15px !important; align-items: stretch; min-width: 0;
}
body.simply-hd .step-card {
  display: flex !important; flex-direction: column !important; align-items: flex-start !important;
  position: relative !important; min-width: 0 !important;
  min-height: 205px !important; padding: 20px !important;
  background: var(--sh-surface) !important; border: 1px solid var(--sh-line) !important;
  border-radius: 15px !important; box-shadow: none !important;
  transform: none !important; overflow-wrap: anywhere; text-align: start !important;
}
body.simply-hd .step-card:hover { border-color: var(--sh-accent) !important; }
body.simply-hd .step-num {
  position: static !important; inset: auto !important; display: inline-block !important;
  color: var(--sh-accent) !important; background: var(--sh-accent-soft) !important;
  padding: 4px 9px !important; border-radius: 7px !important;
  font: 800 .8rem/1.6 "Inter","Cairo",sans-serif !important;
  margin: 0 0 14px !important;
}
body.simply-hd .step-icon-wrap {
  width: 41px !important; height: 41px !important;
  margin: 0 0 14px !important; border-radius: 11px !important;
  background: var(--sh-accent-soft) !important; color: var(--sh-accent) !important;
  box-shadow: none !important; flex-shrink: 0;
}
body.simply-hd .step-card h3 {
  color: var(--sh-ink) !important; font-size: .99rem !important;
  margin: 0 0 9px !important; line-height: 1.75 !important;
}
body.simply-hd .step-card p {
  color: var(--sh-muted) !important; font-size: .83rem !important;
  line-height: 1.9 !important; margin: 0 !important;
}
body.simply-hd .faq-accordion-list {
  display: grid !important; grid-template-columns: minmax(0,1fr) !important;
  gap: 11px !important; width: 100%; max-width: 930px !important;
  margin-inline: auto !important;
}
body.simply-hd .faq-accordion-item {
  background: var(--sh-surface) !important; border: 1px solid var(--sh-line) !important;
  border-radius: 14px !important; box-shadow: none !important; overflow: hidden;
}
body.simply-hd .faq-accordion-item.active { border-color: var(--sh-accent) !important; }
body.simply-hd .faq-accordion-header {
  display: flex !important; align-items: center !important; justify-content: space-between !important;
  width: 100% !important; gap: 15px !important; padding: 15px 19px !important;
  border: 0 !important; background: transparent !important; color: var(--sh-ink) !important;
  text-align: start !important; line-height: 1.7 !important;
}
body.simply-hd .faq-accordion-title-wrap {display: flex; gap: 12px; align-items: center; min-width: 0; flex: 1;}
body.simply-hd .faq-accordion-question {
  font-size: .9rem !important; color: var(--sh-ink) !important; margin: 0 !important;
  line-height: 1.8 !important; font-weight: 800 !important;
}
body.simply-hd .faq-icon-badge {flex: 0 0 32px; border-radius: 9px !important;}
body.simply-hd .faq-chevron {color: var(--sh-accent) !important; flex-shrink: 0;}
body.simply-hd .faq-accordion-content {
  color: var(--sh-muted) !important; line-height: 1.95 !important;
  padding: 0 19px 17px !important; font-size: .85rem !important;
}

@media(max-width:900px){
  body.simply-hd .seo-steps-ordered-list,
  body.simply-hd .seo-device-cards, body.simply-hd .seo-related-grid,
  body.simply-hd .tool-diagram-steps {grid-template-columns: repeat(2,minmax(0,1fr));}
  body.simply-hd .steps-grid {grid-template-columns: repeat(2,minmax(0,1fr)) !important;}
}
@media(max-width:640px){
  body.simply-hd #guideContentBox {padding: 17px !important;}
  body.simply-hd .seo-steps-ordered-list, body.simply-hd .seo-device-cards,
  body.simply-hd .seo-related-grid, body.simply-hd .tool-diagram-steps {
    grid-template-columns: minmax(0,1fr);
  }
  body.simply-hd .steps-grid {grid-template-columns: minmax(0,1fr) !important;}
  body.simply-hd .step-card {min-height: 0 !important; padding: 18px !important;}
  body.simply-hd .tool-diagram-card {min-height: 0; padding: 15px;}
  body.simply-hd .seo-faq-trigger, body.simply-hd .faq-accordion-header {padding: 13px 14px !important;}
  body.simply-hd .seo-faq-answer {padding: 0 14px 15px !important;}
  body.simply-hd .seo-article-h1 {font-size: 1.43rem !important;}
}
@media(prefers-reduced-motion:reduce) {
  body.simply-hd .seo-faq-arrow {transition:none;}
}
