/*
 * Shelving Store – Reusable Long-Form Guide Template
 * Version: 2.1 (cleaned and corrected)
 *
 * Use the generic ss-guide-* classes on every guide.
 * Give each post its own unique ID prefix, for example:
 * hcsar-guide-top, gsg-guide-top, retail-guide-top.
 */

html {
  scroll-behavior: smooth;
}

.ss-guide-template {
  --ss-guide-accent: #33cc33;
  --ss-guide-accent-dark: #29a829;
  --ss-guide-dark: #4a4540;
  --ss-guide-text: #3f3f3f;
  --ss-guide-muted: #6b6b6b;
  --ss-guide-border: #e3e3e3;
  --ss-guide-soft: #f7f7f7;
  --ss-guide-soft-green: #f2fff2;
  --ss-guide-warning: #fff8eb;

  position: relative;
  color: var(--ss-guide-text);
}

/* =========================================================
   TWO-COLUMN GUIDE LAYOUT
   ========================================================= */

.ss-guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  grid-template-areas: "content sidebar";
  gap: 52px;
  align-items: start;
}

.ss-guide-content {
  grid-area: content;
  min-width: 0;
}

/* Keep the complete right-hand guide below the website header. */
.ss-guide-sidebar {
  grid-area: sidebar;
  min-width: 0;
  position: sticky;
  top: 120px;
  align-self: start;
}

/* Do not make the sidebar scroll internally. */
.ss-guide-contents {
  position: static;
  max-height: none;
  overflow: visible;
  padding: 8px 12px 8px 0;
}

.ss-guide-contents-title {
  margin: 12px 0 10px;
  color: var(--ss-guide-dark);
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
}

.ss-guide-contents ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ss-guide-contents li {
  margin: 0;
  border-bottom: 1px solid #f0f0f0;
}

.ss-guide-contents li:last-child {
  border-bottom: 0;
}

.ss-guide-contents li a {
  display: block;
  padding: 4px 0;
  color: var(--ss-guide-muted);
  font-size: 0.84rem;
  line-height: 1.22;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.ss-guide-contents li a::before {
  content: "•";
  margin-right: 8px;
  color: var(--ss-guide-accent);
}

.ss-guide-contents li a:hover,
.ss-guide-contents li a:focus {
  color: var(--ss-guide-accent-dark);
  padding-left: 4px;
}

.ss-guide-back-to-top-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--ss-guide-border);
}

.ss-guide-back-to-top {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--ss-guide-dark);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.ss-guide-back-to-top span {
  color: var(--ss-guide-accent);
  font-size: 1.25em;
  line-height: 1;
}

.ss-guide-back-to-top:hover,
.ss-guide-back-to-top:focus {
  color: var(--ss-guide-accent-dark);
}

/* =========================================================
   BRANDED INTRODUCTION PANEL
   ========================================================= */

.ss-guide-intro {
  margin: 0 0 36px;
  padding: 24px 26px;
  background: var(--ss-guide-soft);
  border-left: 5px solid var(--ss-guide-accent);
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.035);
}

.ss-guide-intro p {
  margin-top: 0;
}

.ss-guide-intro p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   HEADINGS
   ========================================================= */

.ss-guide-content h2 {
  margin-top: 48px;
  margin-bottom: 20px;
  padding-bottom: 9px;
  color: var(--ss-guide-dark);
  border-bottom: 3px solid var(--ss-guide-accent);
  line-height: 1.25;
}

.ss-guide-content h3 {
  margin-top: 30px;
  margin-bottom: 12px;
  color: var(--ss-guide-dark);
  line-height: 1.3;
}

/*
 * Anchor offset for links in “In this guide”.
 * Keep the ID directly on the h2 or h3 element.
 */
.ss-guide-content h2[id],
.ss-guide-content h3[id] {
  position: relative;
  scroll-margin-top: 120px;
}

/* Fallback for browsers/themes that ignore scroll-margin-top. */
.ss-guide-content h2[id]::before,
.ss-guide-content h3[id]::before {
  content: "";
  display: block;
  height: 90px;
  margin-top: -90px;
  visibility: hidden;
  pointer-events: none;
}

/* =========================================================
   MAIN ARTICLE LISTS
   ========================================================= */

.ss-guide-content ul:not(.ss-guide-checklist),
.ss-guide-content ol {
  margin: 0 0 1.4em;
  padding-left: 1.55em !important;
}

.ss-guide-content ul:not(.ss-guide-checklist) {
  list-style-type: disc !important;
}

.ss-guide-content ol {
  list-style-type: decimal !important;
}

.ss-guide-content ul:not(.ss-guide-checklist) li,
.ss-guide-content ol li {
  display: list-item !important;
  margin-bottom: 0.18em;
  padding-left: 0.15em;
  line-height: 1.32;
  list-style-position: outside;
}

.ss-guide-content ul ul {
  margin-top: 0.35em;
  margin-bottom: 0.35em;
  list-style-type: circle !important;
}

/* =========================================================
   INFORMATION AND WARNING BOXES
   ========================================================= */

.ss-guide-note {
  margin: 28px 0;
  padding: 19px 21px;
  background: var(--ss-guide-soft-green);
  border: 1px solid #bfe9bf;
  border-left: 5px solid var(--ss-guide-accent);
  border-radius: 5px;
}

.ss-guide-note p {
  margin: 0;
}

.ss-guide-note strong {
  color: var(--ss-guide-dark);
}

.ss-guide-note-warning {
  background: var(--ss-guide-warning);
  border-color: #f0d6a4;
  border-left-color: #e5a52f;
}

/* =========================================================
   CHECKLIST
   ========================================================= */

.ss-guide-checklist {
  margin: 0 0 1.5em;
  padding: 0 !important;
  list-style: none !important;
}

.ss-guide-checklist li {
  position: relative;
  display: block !important;
  margin: 0 0 0.45em;
  padding-left: 29px;
  line-height: 1.35;
}

.ss-guide-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ss-guide-accent-dark);
  font-weight: 800;
}

/* =========================================================
   END-OF-GUIDE CALL TO ACTION
   ========================================================= */

.ss-guide-cta {
  margin-top: 46px;
  padding: 32px;
  color: #fff;
  background: var(--ss-guide-dark);
  border-radius: 7px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.1);
}

.ss-guide-content .ss-guide-cta h2 {
  margin: 0 0 12px;
  padding: 0;
  color: #fff;
  border: 0;
}

.ss-guide-cta p {
  margin: 0 0 14px;
  color: #fff;
}

.ss-guide-cta p:last-child {
  margin-bottom: 0;
}

.ss-guide-cta-button {
  display: inline-block;
  margin-top: 4px;
  padding: 12px 22px;
  color: #fff !important;
  background: var(--ss-guide-accent);
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ss-guide-cta-button:hover,
.ss-guide-cta-button:focus {
  color: #fff !important;
  background: var(--ss-guide-accent-dark);
  transform: translateY(-1px);
}

/* =========================================================
   TABLET AND MOBILE
   The “In this guide” panel moves above the article.
   ========================================================= */

@media (max-width: 920px) {
  .ss-guide-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "sidebar"
      "content";
    gap: 32px;
  }

  .ss-guide-sidebar {
    position: static;
    top: auto;
    align-self: auto;
  }

  .ss-guide-contents {
    padding: 22px;
    border: 1px solid var(--ss-guide-border);
    border-left: 4px solid var(--ss-guide-accent);
    border-radius: 5px;
    background: #fff;
  }

  .ss-guide-contents-title {
    margin: 0 0 12px;
  }

  .ss-guide-contents li a {
    padding: 7px 0;
    font-size: 0.92rem;
    line-height: 1.32;
  }

  .ss-guide-back-to-top-wrap {
    display: none;
  }
}

@media (max-width: 520px) {
  .ss-guide-contents {
    padding: 18px 16px;
  }

  .ss-guide-contents-title {
    font-size: 1.05rem;
  }

  .ss-guide-intro,
  .ss-guide-note,
  .ss-guide-cta {
    padding: 20px 18px;
  }

  .ss-guide-content h2 {
    margin-top: 40px;
  }
}
