/* ==========================================================================
   Samrat Power — guide article layer (/guides/<slug>/)
   Loaded on top of samrat-upgrade.css, which supplies the sp- header, footer,
   FAB and theme tokens. Everything here is namespaced `spg-`.
   ========================================================================== */

.spg {
  font-family: "Poppins", sans-serif;
  color: var(--sp-ink);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.spg-hero {
  position: relative;
  overflow: hidden;
  padding: 54px 22px 46px;
  background:
    radial-gradient(900px 380px at 88% -10%, rgba(135, 195, 50, 0.16), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, var(--sp-green-tint) 100%);
  border-bottom: 1px solid rgba(5, 39, 48, 0.07);
}

.spg-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.spg-eyebrow {
  display: inline-block;
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sp-green-dark);
  background: rgba(135, 195, 50, 0.14);
  border-radius: 999px;
  padding: 6px 14px;
  margin: 0 0 16px;
}

.spg-hero h1 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(28px, 4.6vw, 46px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sp-deep);
  margin: 0 0 16px;
  max-width: 20ch;
}

.spg-standfirst {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.66;
  color: #4b5a52;
  max-width: 62ch;
  margin: 0 0 22px;
}

.spg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13.5px;
  color: var(--sp-text);
  margin: 0;
}

.spg-meta b {
  color: var(--sp-deep);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Layout: sticky contents rail + article
   -------------------------------------------------------------------------- */
.spg-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 22px 90px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 54px;
  align-items: start;
}

.spg-toc {
  position: sticky;
  top: 26px;
  font-size: 14px;
}

.spg-toc h2 {
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sp-green-dark);
  margin: 0 0 14px;
}

.spg-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: spgtoc;
  border-left: 2px solid rgba(5, 39, 48, 0.1);
}

.spg-toc li {
  counter-increment: spgtoc;
}

.spg-toc a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: #55635c;
  text-decoration: none;
  line-height: 1.42;
  transition: color 0.2s, border-color 0.2s;
}

.spg-toc a::before {
  content: counter(spgtoc) ". ";
  color: rgba(5, 39, 48, 0.35);
}

.spg-toc a:hover,
.spg-toc a.is-active {
  color: var(--sp-green-dark);
  border-left-color: var(--sp-green);
}

/* --------------------------------------------------------------------------
   Article prose
   -------------------------------------------------------------------------- */
.spg-body {
  max-width: 74ch;
  font-size: 16.5px;
  line-height: 1.78;
  color: #3b4640;
}

.spg-body > * + * {
  margin-top: 1.15em;
}

.spg-body h2 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.26;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--sp-deep);
  margin-top: 2.2em;
  margin-bottom: 0.15em;
  scroll-margin-top: 24px;
}

.spg-body h3 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 700;
  color: var(--sp-ink);
  margin-top: 1.7em;
  margin-bottom: 0.1em;
  scroll-margin-top: 24px;
}

.spg-body a {
  color: var(--sp-green-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}

.spg-body a:hover {
  color: var(--sp-ink);
}

.spg-body strong {
  color: var(--sp-deep);
  font-weight: 600;
}

.spg-body ul,
.spg-body ol {
  padding-left: 1.25em;
}

.spg-body li + li {
  margin-top: 0.5em;
}

.spg-body li::marker {
  color: var(--sp-green-dark);
}

.spg-body blockquote {
  margin: 1.5em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--sp-green);
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--sp-deep);
  font-style: italic;
}

.spg-body figure {
  margin: 1.6em 0;
}

.spg-body figure img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

.spg-body figcaption {
  margin-top: 9px;
  font-size: 13.5px;
  color: var(--sp-text);
}

/* --------------------------------------------------------------------------
   Tables — always scroll inside their own box
   -------------------------------------------------------------------------- */
.spg-tw {
  overflow-x: auto;
  margin: 1.6em 0;
  border: 1px solid rgba(5, 39, 48, 0.11);
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}

.spg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 460px;
}

.spg-table caption {
  caption-side: top;
  text-align: left;
  padding: 13px 16px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text);
  background: #fbfdf8;
  border-bottom: 1px solid rgba(5, 39, 48, 0.09);
}

.spg-table th,
.spg-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(5, 39, 48, 0.08);
  vertical-align: top;
  line-height: 1.55;
}

.spg-table thead th {
  background: var(--sp-green-tint);
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--sp-deep);
  white-space: nowrap;
}

.spg-table tbody tr:last-child td {
  border-bottom: 0;
}

.spg-table tbody tr:hover {
  background: rgba(135, 195, 50, 0.05);
}

.spg-table td:first-child {
  font-weight: 600;
  color: var(--sp-deep);
}

/* --------------------------------------------------------------------------
   Callouts
   -------------------------------------------------------------------------- */
.spg-note,
.spg-warn,
.spg-key {
  border-radius: 16px;
  padding: 18px 22px;
  margin: 1.7em 0;
  font-size: 15.5px;
  line-height: 1.68;
}

.spg-note {
  background: var(--sp-green-tint);
  border: 1px solid rgba(135, 195, 50, 0.4);
}

.spg-warn {
  background: #FFF6F0;
  border: 1px solid rgba(229, 19, 30, 0.22);
}

.spg-key {
  background: #F4F7F8;
  border: 1px solid rgba(5, 39, 48, 0.12);
}

.spg-note > :first-child,
.spg-warn > :first-child,
.spg-key > :first-child {
  margin-top: 0;
}

.spg-note > :last-child,
.spg-warn > :last-child,
.spg-key > :last-child {
  margin-bottom: 0;
}

.spg-note b,
.spg-warn b,
.spg-key b {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.spg-note b { color: var(--sp-green-dark); }
.spg-warn b { color: var(--sp-red); }
.spg-key  b { color: var(--sp-deep); }

/* --------------------------------------------------------------------------
   Stat row
   -------------------------------------------------------------------------- */
.spg-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 1.8em 0;
  padding: 0;
  list-style: none;
}

.spg-stats li {
  background: #fff;
  border: 1px solid rgba(5, 39, 48, 0.11);
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin: 0;
}

.spg-stats b {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sp-green-dark);
  line-height: 1.1;
  margin-bottom: 5px;
}

.spg-stats span {
  font-size: 13.5px;
  color: var(--sp-text);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Numbered process
   -------------------------------------------------------------------------- */
.spg-steps {
  list-style: none;
  counter-reset: spgstep;
  padding: 0;
  margin: 1.7em 0;
}

.spg-steps li {
  counter-increment: spgstep;
  position: relative;
  padding-left: 52px;
  margin: 0 0 20px;
}

.spg-steps li::before {
  content: counter(spgstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--sp-green-dark), var(--sp-green));
}

.spg-steps h3 {
  margin: 3px 0 4px;
}

/* --------------------------------------------------------------------------
   Product call-out card
   -------------------------------------------------------------------------- */
.spg-cta {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #052730, #0b3a45);
  border-radius: 20px;
  padding: 24px 26px;
  margin: 2em 0;
  color: #eaf3ec;
}

.spg-cta img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  padding: 8px;
  flex: none;
}

.spg-cta__body {
  flex: 1 1 260px;
}

.spg-cta__body h3 {
  font-family: "Outfit", sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}

.spg-cta__body p {
  margin: 0 0 4px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #b9cfc6;
}

.spg-cta__price {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  color: var(--sp-green);
  font-size: 16px;
}

.spg-cta a.spg-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sp-green);
  color: #08222a;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 999px;
  flex: none;
  transition: transform 0.2s var(--sp-ease), box-shadow 0.2s var(--sp-ease);
}

.spg-cta a.spg-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(135, 195, 50, 0.8);
  color: #08222a;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.spg-faq {
  margin-top: 2.4em;
}

.spg-faq details {
  border: 1px solid rgba(5, 39, 48, 0.12);
  border-radius: 14px;
  padding: 0 18px;
  margin-bottom: 10px;
  background: #fff;
  transition: border-color 0.2s;
}

.spg-faq details[open] {
  border-color: rgba(135, 195, 50, 0.55);
}

.spg-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 30px 15px 0;
  position: relative;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--sp-deep);
  line-height: 1.5;
}

.spg-faq summary::-webkit-details-marker {
  display: none;
}

.spg-faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 22px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--sp-green-dark);
  border-bottom: 2px solid var(--sp-green-dark);
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.spg-faq details[open] summary::after {
  transform: rotate(-135deg);
  top: 26px;
}

.spg-faq details > p,
.spg-faq details > ul {
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.7;
  color: #4b5a52;
}

/* --------------------------------------------------------------------------
   Related guides
   -------------------------------------------------------------------------- */
.spg-next {
  margin-top: 3em;
  padding-top: 30px;
  border-top: 1px solid rgba(5, 39, 48, 0.11);
}

.spg-next h2 {
  font-family: "Outfit", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--sp-deep);
  margin: 0 0 18px;
}

.spg-next ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.spg-next li {
  margin: 0;
}

.spg-next a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  border-radius: 15px;
  background: var(--sp-green-tint);
  text-decoration: none;
  transition: transform 0.2s var(--sp-ease), box-shadow 0.2s var(--sp-ease);
}

.spg-next a:hover {
  transform: translateY(-3px);
  box-shadow: var(--sp-shadow-sm);
}

.spg-next strong {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 15.5px;
  color: var(--sp-deep);
  margin-bottom: 4px;
  line-height: 1.4;
}

.spg-next span {
  font-size: 13.5px;
  color: var(--sp-text);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Guide hub
   -------------------------------------------------------------------------- */
.spg-hub {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 22px 90px;
}

.spg-hub section {
  margin-bottom: 46px;
}

.spg-hub h2 {
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sp-green-dark);
  margin: 0 0 6px;
}

.spg-hub__lede {
  font-size: 15px;
  color: var(--sp-text);
  margin: 0 0 20px;
  max-width: 68ch;
  line-height: 1.65;
}

.spg-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.spg-cards a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 22px 20px;
  border: 1px solid rgba(5, 39, 48, 0.11);
  border-radius: 18px;
  background: #fff;
  text-decoration: none;
  transition: transform 0.25s var(--sp-ease), box-shadow 0.25s var(--sp-ease),
    border-color 0.25s var(--sp-ease);
}

.spg-cards a:hover {
  transform: translateY(-4px);
  border-color: rgba(135, 195, 50, 0.6);
  box-shadow: var(--sp-shadow-lg);
}

.spg-cards strong {
  font-family: "Outfit", sans-serif;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--sp-deep);
  margin-bottom: 8px;
}

.spg-cards p {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--sp-text);
  flex: 1;
}

.spg-cards em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sp-green-dark);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .spg-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding-top: 30px;
  }

  .spg-toc {
    position: static;
    background: var(--sp-green-tint);
    border-radius: 16px;
    padding: 18px 20px;
  }

  .spg-toc ol {
    border-left: 0;
    columns: 2;
    column-gap: 22px;
  }

  .spg-toc a {
    padding-left: 0;
    border-left: 0;
    break-inside: avoid;
  }

  .spg-body {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  .spg-toc ol {
    columns: 1;
  }

  .spg-cta {
    padding: 20px;
  }

  .spg-cta a.spg-cta__btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spg-cards a,
  .spg-next a,
  .spg-cta a.spg-cta__btn {
    transition: none;
  }
}
