/* Article additions adapted from the 2.0 blog. */
.yh-article-layout {
  --yh-accent: #f7670a;
  --yh-header-offset: 140px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 32px;
  color: rgb(var(--color-text, 36 36 36));
}
.yh-article-layout [hidden] { display: none !important; }
.yh-article-layout *, .yh-article-layout *::before, .yh-article-layout *::after { box-sizing: border-box; }
.yh-article-main { min-width: 0; }
.yh-article-main .main-article__title { overflow-wrap: anywhere; }
.yh-article-main .main-article__content { overflow-wrap: anywhere; }
.yh-article-main .main-article__content img { max-width: 100%; height: auto; }
.yh-article-main .main-article__content table { display: block; max-width: 100%; overflow-x: auto; }
.yh-article-main .main-article__content :is(h2, h3) { scroll-margin-top: calc(var(--yh-header-offset) + 16px); }
.yh-article-layout a:focus-visible, .yh-article-layout button:focus-visible { outline: 2px solid var(--yh-accent); outline-offset: 4px; }
.yh-toc-rail { min-width: 0; position: sticky; top: var(--yh-header-offset); }
.yh-toc-panel { color: #242424; background: linear-gradient(180deg, #fff, #fafafa); border: 1px solid rgb(36 36 36 / 8%); border-radius: 14px; box-shadow: 0 8px 28px -12px rgb(0 0 0 / 12%); overflow: hidden; }
.yh-toc-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px; border-bottom: 1px solid rgb(36 36 36 / 6%); }
.yh-toc-title { margin: 0; color: #111; font-size: 16px; font-weight: 700; line-height: 1.4; }
.yh-toc-panel nav { overflow: auto; max-height: calc(100dvh - var(--yh-header-offset) - 100px); }
.yh-toc-list { list-style: none; margin: 0; padding: 10px 8px 12px; counter-reset: yh-toc; }
.yh-toc-list li { margin: 0 0 4px; padding: 0; counter-increment: yh-toc; }
.yh-toc-list a { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 10px 12px; border-radius: 10px; color: #3a3a3a; font-size: 13px; font-weight: 500; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.yh-toc-list a::before { content: counter(yh-toc, decimal-leading-zero); color: #919191; font-size: 11px; font-weight: 700; padding-top: 1px; }
.yh-toc-list a:hover { background: rgb(36 36 36 / 4%); }
.yh-toc-list a.is-active { background: rgb(247 103 10 / 8%); box-shadow: inset 0 0 0 1px rgb(247 103 10 / 12%); color: var(--yh-accent); font-weight: 600; }
.yh-toc-list a.is-active::before { color: var(--yh-accent); }
.yh-toc-list a.is-active::after { content: ""; position: absolute; inset-inline-start: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--yh-accent); }
.yh-toc-trigger, .yh-toc-close, .yh-toc-overlay { display: none; }
.yh-hot-products { min-width: 0; border-inline-start: 1px solid #ddd; padding-inline-start: 24px; position: sticky; top: var(--yh-header-offset); }
.yh-hot-products__title { font-size: 24px; color: var(--yh-accent); margin: 0 0 16px; line-height: 1.3; }
.yh-hot-products__list { display: grid; gap: 16px; }
.yh-hot-product { display: flex; align-items: center; gap: 16px; color: inherit; text-decoration: none; }
.yh-hot-product:hover .yh-hot-product__title { color: var(--yh-accent); }
.yh-hot-product__image { flex: 0 0 90px; width: 90px; height: 90px; overflow: hidden; }
.yh-hot-product__image :is(img, svg) { display: block; width: 100%; height: 100%; object-fit: contain; }
.yh-hot-product__title { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; line-clamp: 3;-webkit-line-clamp: 3; overflow: hidden; }
.yh-adjacent { width: 100%; margin: 40px 0 32px; padding-top: 32px; border-top: 1px solid rgb(36 36 36 / 10%); }
.yh-adjacent__heading { margin: 0 0 20px; font-size: 22px; font-weight: 600; line-height: 1.3; }
.yh-adjacent__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.yh-adjacent__card { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; min-width: 0; min-height: 96px; }
.yh-adjacent__card:hover .yh-adjacent__title { color: var(--yh-accent); }
.yh-adjacent__card--previous { padding-inline-end: 16px; }
.yh-adjacent__card--next { grid-column: 2; flex-direction: row-reverse; text-align: end; padding-inline-start: 16px; border-inline-start: 1px solid rgb(36 36 36 / 10%); }
.yh-adjacent__media { display: block; flex: 0 0 96px; width: 96px; height: 76px; background: linear-gradient(135deg, #ececec, #f7f7f7); border-radius: 8px; overflow: hidden; }
.yh-adjacent__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.yh-adjacent__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.yh-adjacent__label { color: var(--yh-accent); font-size: 13px; text-transform: uppercase; font-weight: 600; line-height: 1.2; }
.yh-adjacent__title { font-size: 16px; line-height: 1.4; font-weight: 500; overflow-wrap: anywhere; display: -webkit-box; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yh-adjacent--single .yh-adjacent__grid { grid-template-columns: minmax(0, 1fr); }
.yh-adjacent--single .yh-adjacent__card { grid-column: 1; padding-inline: 0; border: 0; }
@media (min-width: 960px) {
  .yh-article-layout.yh-has-products { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (min-width: 1200px) {
  .yh-article-layout.yh-has-toc { grid-template-columns: 220px minmax(0, 1fr); }
  .yh-article-layout.yh-has-toc.yh-has-products { grid-template-columns: 220px minmax(0, 1fr) 260px; gap: 24px; }
}
@media (max-width: 1199px) {
  .yh-toc-rail { width: 0; height: 0; position: static; }
  .yh-article-layout { column-gap: 24px; }
  .yh-toc-rail:not([hidden]) { position: absolute; }
  .yh-toc-trigger { display: inline-flex; align-items: center; justify-content: center; position: fixed; inset-inline-start: 0; top: 35%; z-index: 120; width: 44px; height: 44px; padding: 0; background: #111; color: #fff; border: 0; border-radius: 0 8px 8px 0; cursor: pointer; box-shadow: 0 2px 12px rgb(0 0 0 / 18%); }
  .yh-toc-panel { display: flex; flex-direction: column; position: fixed; inset-inline-start: 0; top: 50%; transform: translate(-105%, -50%); width: min(88vw, 352px); max-height: 70dvh; border-radius: 0 14px 14px 0; z-index: 202; visibility: hidden; pointer-events: none; transition: transform .25s ease, visibility .25s; }
  .yh-toc-panel.is-open { transform: translate(0, -50%); visibility: visible; pointer-events: auto; }
  .yh-toc-panel nav { max-height: none; min-height: 0; overflow: auto; }
  .yh-toc-header { flex-shrink: 0; background: #f3f3f3; }
  .yh-toc-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; background: none; border: 0; font-size: 28px; color: #111; cursor: pointer; }
  .yh-toc-overlay { display: block; position: fixed; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgb(0 0 0 / 28%); z-index: 201; }
}
@media (max-width: 959px) {
  .yh-hot-products { position: static; padding: 24px 0 0; border-inline-start: 0; border-top: 1px solid #ddd; }
  .yh-hot-products__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .yh-hot-products__title { font-size: 22px; }
}
@media (max-width: 767px) {
  .yh-adjacent__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .yh-adjacent__card--previous { padding-inline: 0; }
  .yh-adjacent__card--next { grid-column: 1; flex-direction: row; text-align: start; padding: 16px 0 0; border-inline-start: 0; border-top: 1px solid rgb(36 36 36 / 10%); }
  .yh-adjacent__title { font-size: 15px; }
  .yh-adjacent__heading { font-size: 20px; }
}
@media (max-width: 599px) {
  .yh-hot-products__list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .yh-toc-panel { transition: none; }
}
