/* DAR Article System V4.0.1 - scoped to the article body only. */

body.dar-article-system-v4-active .dar-article-system {
  --dar-ink: #16202a;
  --dar-copy: #243242;
  --dar-muted: #5e6b78;
  --dar-line: #dfe6ee;
  --dar-soft: #f5f7fa;
  --dar-paper: #ffffff;
  --dar-blue: #1c66d8;
  --dar-cyan: #0f8aa8;
  --dar-green: #198754;
  --dar-amber: #b75c00;
  --dar-red: #b42318;
  --dar-media-radius: 6px;
  color: var(--dar-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0 0 36px;
}

/* DAR Pillole: copy left, vertical player right on desktop. Named areas avoid DOM-order regressions. */
@media (min-width: 820px) {
  .dar-pillola-embed {
    grid-template-areas: "actions player" !important;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 390px) !important;
  }

  .dar-pillola-embed > .dar-pillola-actions {
    grid-area: actions !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .dar-pillola-embed > .dar-pillola-player {
    grid-area: player !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
}

/* The existing JPEG logo remains legible on translucent headers without a hard rectangular edge. */
#logo img.logo-main,
#logo img.logo-sticky,
#logo img.logo-mobile,
#logo img.logo-mobile-sticky {
  border-radius: 12px;
  display: block;
  overflow: hidden;
}

body.dar-article-system-v4-active .dar-article-system,
body.dar-article-system-v4-active .dar-article-system * {
  box-sizing: border-box;
}

body.dar-article-system-v4-active .dar-article-system p {
  color: var(--dar-copy);
  font-size: 17px;
  line-height: 1.68;
  margin: 0 0 16px;
}

body.dar-article-system-v4-active .dar-article-system a {
  color: var(--dar-blue);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

body.dar-article-system-v4-active .dar-article-system a:hover {
  color: #124b9f;
}

body.dar-article-system-v4-active .dar-article-system > figure.wp-block-image:first-child {
  margin: 0 0 24px;
}

body.dar-article-system-v4-active .dar-article-system > figure.wp-block-image:first-child img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--dar-media-radius);
}

body.dar-article-system-v4-active .dar-article-system figure:not(:first-child) {
  margin: 28px 0;
}

body.dar-article-system-v4-active .dar-article-system img {
  border-radius: var(--dar-media-radius);
  max-width: 100%;
  height: auto;
}

/* BeTheme renders related posts outside .dar-article-system. */
body.dar-article-system-v4-active .post-related .image_frame,
body.dar-article-system-v4-active .post-related .image_wrapper,
body.dar-article-system-v4-active .post-related .image_wrapper img {
  border-radius: var(--dar-media-radius, 6px);
}

body.dar-article-system-v4-active .post-related .image_frame,
body.dar-article-system-v4-active .post-related .image_wrapper {
  overflow: hidden;
}

body.blog .post-item .image_frame,
body.blog .post-item .image_wrapper,
body.blog .post-item .image_wrapper img {
  border-radius: 6px;
}

body.blog .post-item .image_frame,
body.blog .post-item .image_wrapper {
  overflow: hidden;
}

body.dar-article-system-v4-active .dar-article-system figcaption {
  color: var(--dar-muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 8px;
  text-align: left;
}

body.dar-article-system-v4-active .dar-article-system > h2:not(.dar-step-title) {
  color: var(--dar-ink);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 40px 0 14px;
}

body.dar-article-system-v4-active .dar-article-system > h3 {
  color: var(--dar-ink);
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: 0;
  margin: 28px 0 10px;
}

body.dar-article-system-v4-active .dar-article-system > ul,
body.dar-article-system-v4-active .dar-article-system > ol,
body.dar-article-system-v4-active .dar-article-system .wp-block-list {
  color: var(--dar-copy);
  font-size: 17px;
  line-height: 1.62;
  margin: 0 0 22px;
  padding-left: 24px;
}

body.dar-article-system-v4-active .dar-article-system li {
  margin-bottom: 8px;
}

body.dar-article-system-v4-active .dar-article-system blockquote {
  background: #f2f7ff;
  border: 0;
  border-left: 5px solid var(--dar-blue);
  border-radius: 6px;
  color: var(--dar-copy);
  margin: 26px 0;
  padding: 18px 20px;
}

body.dar-article-system-v4-active .dar-article-system blockquote p:last-child {
  margin-bottom: 0;
}

body.dar-article-system-v4-active .dar-article-system table {
  border: 1px solid var(--dar-line);
  border-collapse: collapse;
  display: block;
  margin: 26px 0;
  max-width: 100%;
  overflow-x: auto;
  width: max-content;
}

body.dar-article-system-v4-active .dar-article-system th,
body.dar-article-system-v4-active .dar-article-system td {
  border: 1px solid var(--dar-line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

body.dar-article-system-v4-active .dar-article-system th {
  background: var(--dar-soft);
  color: var(--dar-ink);
}

body.dar-article-system-v4-active .dar-article-system pre {
  background: #111820;
  border-radius: 6px;
  color: #f4f7fa;
  margin: 24px 0;
  overflow-x: auto;
  padding: 18px;
}

body.dar-article-system-v4-active .dar-article-system code {
  overflow-wrap: anywhere;
}

body.dar-article-system-v4-active .dar-article-system .dar-seo-preview {
  background: #fbfdff;
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  margin: 0 0 24px;
  padding: 16px;
}

body.dar-article-system-v4-active .dar-article-system .dar-seo-url {
  color: #188038;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

body.dar-article-system-v4-active .dar-article-system .dar-seo-title {
  color: #1a0dab;
  font-size: 20px;
  line-height: 1.25;
  margin-bottom: 5px;
}

body.dar-article-system-v4-active .dar-article-system .dar-seo-desc {
  color: #4d5156;
  font-size: 14px;
  line-height: 1.45;
}

body.dar-article-system-v4-active .dar-article-system .dar-answer-strip {
  background: #f2f7ff;
  border-left: 5px solid var(--dar-blue);
  border-radius: 6px;
  margin: 24px 0;
  padding: 18px 20px;
}

body.dar-article-system-v4-active .dar-article-system .dar-answer-strip h2 {
  color: var(--dar-ink);
  font-size: 20px;
  line-height: 1.2;
  margin: 0 0 8px;
}

body.dar-article-system-v4-active .dar-article-system .dar-answer-strip p:last-child {
  margin-bottom: 0;
}

body.dar-article-system-v4-active .dar-article-system .dar-step-title {
  align-items: center;
  color: var(--dar-ink);
  display: flex;
  font-size: 26px;
  gap: 12px;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 38px 0 12px;
}

body.dar-article-system-v4-active .dar-article-system .dar-step-title > span:last-child {
  min-width: 0;
}

body.dar-article-system-v4-active .dar-article-system .dar-step-num,
body.dar-article-system-v4-active .dar-article-system .dar-icon-badge {
  align-items: center;
  background: var(--dar-blue);
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 16px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

body.dar-article-system-v4-active .dar-article-system .dar-blue { background: var(--dar-blue); }
body.dar-article-system-v4-active .dar-article-system .dar-cyan { background: var(--dar-cyan); }
body.dar-article-system-v4-active .dar-article-system .dar-green { background: var(--dar-green); }
body.dar-article-system-v4-active .dar-article-system .dar-orange { background: var(--dar-amber); }
body.dar-article-system-v4-active .dar-article-system .dar-red { background: var(--dar-red); }
body.dar-article-system-v4-active .dar-article-system .dar-purple { background: #6246c7; }
body.dar-article-system-v4-active .dar-article-system .dar-teal { background: #0f766e; }

body.dar-article-system-v4-active .dar-article-system .dar-step-box,
body.dar-article-system-v4-active .dar-article-system .dar-quick-box,
body.dar-article-system-v4-active .dar-article-system .dar-faq-box,
body.dar-article-system-v4-active .dar-article-system .dar-product-box {
  background: var(--dar-paper);
  border: 1px solid var(--dar-line);
  border-radius: 8px;
  margin: 0 0 26px;
  padding: 22px;
}

body.dar-article-system-v4-active .dar-article-system .dar-quick-box {
  background: #f7fbff;
  border-color: #c9def7;
}

body.dar-article-system-v4-active .dar-article-system .dar-list {
  display: grid;
  gap: 10px 16px;
  margin-top: 14px;
}

body.dar-article-system-v4-active .dar-article-system .dar-step-box > .dar-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.dar-article-system-v4-active .dar-article-system .dar-list p {
  display: block;
  margin: 0;
  min-width: 0;
  padding-left: 32px;
  position: relative;
}

body.dar-article-system-v4-active .dar-article-system .dar-list p strong {
  display: inline;
}

body.dar-article-system-v4-active .dar-article-system .dar-check {
  align-items: center;
  background: #e7f6ef;
  border-radius: 50%;
  color: var(--dar-green);
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  left: 0;
  line-height: 1;
  position: absolute;
  top: 2px;
  width: 22px;
}

body.dar-article-system-v4-active .dar-article-system .dar-inner-card {
  background: var(--dar-soft);
  border: 1px solid var(--dar-line);
  border-radius: 8px;
  margin-top: 16px;
  padding: 18px;
}

body.dar-article-system-v4-active .dar-article-system .dar-warning-card {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  margin-top: 16px;
  padding: 18px;
}

body.dar-article-system-v4-active .dar-article-system .dar-inner-card h3,
body.dar-article-system-v4-active .dar-article-system .dar-warning-card h3,
body.dar-article-system-v4-active .dar-article-system .dar-faq-item h3 {
  color: var(--dar-ink);
  font-size: 19px;
  letter-spacing: 0;
  line-height: 1.3;
  margin: 0 0 9px;
}

body.dar-article-system-v4-active .dar-article-system .dar-inner-card p:last-child,
body.dar-article-system-v4-active .dar-article-system .dar-warning-card p:last-child {
  margin-bottom: 0;
}

body.dar-article-system-v4-active .dar-article-system .dar-product-box {
  background: #f5fbf8;
  border-color: #bfe5d1;
}

body.dar-article-system-v4-active .dar-article-system .dar-product-box h2,
body.dar-article-system-v4-active .dar-article-system .dar-faq-box > h2 {
  color: var(--dar-ink);
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0 0 12px;
}

body.dar-article-system-v4-active .dar-article-system .dar-product-box p:last-child {
  margin-bottom: 0;
}

body.dar-article-system-v4-active .dar-article-system .dar-faq-item {
  border-top: 1px solid var(--dar-line);
  margin-top: 16px;
  padding-top: 16px;
}

body.dar-article-system-v4-active .dar-article-system .dar-faq-item:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

body.dar-article-system-v4-active .dar-article-system .dar-faq-item p:last-child {
  margin-bottom: 0;
}

body.dar-article-system-v4-active .dar-article-system .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--dar-line);
  margin: 34px 0;
}

@media (max-width: 767px) {
  /* BeTheme adds 33px mobile gutters and a 67px boxed reduction globally.
   * DAR owns the mobile editorial frame, so restore the intended 2px shell. */
  body.dar-article-system-v4-active #Wrapper,
  body.dar-home-v43-active #Wrapper {
    margin-left: 2px !important;
    margin-right: 2px !important;
    max-width: calc(100% - 4px) !important;
    width: calc(100% - 4px) !important;
  }

  body.dar-article-system-v4-active #Content .content_wrapper .section_wrapper,
  body.dar-article-system-v4-active #Content .content_wrapper .container,
  body.dar-home-v43-active #Content .content_wrapper .section_wrapper,
  body.dar-home-v43-active #Content .content_wrapper .container {
    max-width: none !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    width: 100% !important;
  }

  body.dar-article-system-v4-active #Content .content_wrapper .section_wrapper,
  body.dar-article-system-v4-active #Content .content_wrapper .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.dar-article-system-v4-active .dar-article-system {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 28px;
    width: 100%;
  }

  body.dar-article-system-v4-active .dar-article-system > figure.wp-block-image:first-child img {
    aspect-ratio: 16 / 9;
  }

  body.dar-article-system-v4-active .dar-article-system p,
  body.dar-article-system-v4-active .dar-article-system > ul,
  body.dar-article-system-v4-active .dar-article-system > ol,
  body.dar-article-system-v4-active .dar-article-system .wp-block-list {
    font-size: 18px;
  }

  body.dar-article-system-v4-active .dar-article-system > h2:not(.dar-step-title) {
    font-size: 24px;
  }

  body.dar-article-system-v4-active .dar-article-system .dar-step-title {
    align-items: flex-start;
    font-size: 22px;
  }

  body.dar-article-system-v4-active .dar-article-system .dar-step-box > .dar-list {
    grid-template-columns: 1fr;
  }

  body.dar-article-system-v4-active .dar-article-system .dar-step-box,
  body.dar-article-system-v4-active .dar-article-system .dar-quick-box,
  body.dar-article-system-v4-active .dar-article-system .dar-faq-box,
  body.dar-article-system-v4-active .dar-article-system .dar-product-box {
    padding: 9px;
  }

  /* BeTheme's related-post columns keep desktop widths on mobile. */
  body.dar-article-system-v4-active .section-post-related,
  body.dar-article-system-v4-active .section-post-related .section_wrapper,
  body.dar-article-system-v4-active .section-post-related .section-related-adjustment,
  body.dar-article-system-v4-active .section-post-related .section-related-ul {
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    overflow: hidden;
    padding-left: 2px !important;
    padding-right: 2px !important;
    width: 100% !important;
  }

  body.dar-article-system-v4-active .section-post-related .section-related-ul {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr);
  }

  body.dar-article-system-v4-active .section-post-related .post-related,
  body.dar-article-system-v4-active .section-post-related .post-related .mcb-column-inner,
  body.dar-article-system-v4-active .section-post-related .single-photo-wrapper,
  body.dar-article-system-v4-active .section-post-related .image_frame,
  body.dar-article-system-v4-active .section-post-related .image_wrapper {
    float: none !important;
    margin: 0 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  body.dar-article-system-v4-active .section-post-related .post-related .image_wrapper img {
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
  }

  /* The title header and related-posts section are rendered outside the article body. */
  body.dar-article-system-v4-active .section-post-header .section_wrapper,
  body.dar-article-system-v4-active .section-post-header .post-header,
  body.dar-article-system-v4-active .section-post-related .section_wrapper,
  body.dar-article-system-v4-active .section-post-related .section-related-adjustment,
  body.dar-article-system-v4-active .section-post-related .section-related-ul {
    box-sizing: border-box;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.dar-home-v43-active #Content,
  body.dar-home-v43-active .dar-home-v43,
  body.dar-home-v43-active .dar43-container,
  body.dar-home-v43-active .dar43-lead-grid,
  body.dar-home-v43-active .dar43-gallery,
  body.dar-home-v43-active .dar43-latest-grid,
  body.dar-home-v43-active .dar43-problem-finder {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }
}
