/* Shared inner-page story layout — matches homepage cream/white bands + 80rem shell */

html {
  scroll-behavior: auto;
  scroll-padding-top: 7.5rem;
}

body.has-fixed-header {
  background: #fcfaf6;
  color: #1a2420;
}

.story-band[id] {
  scroll-margin-top: 7.5rem;
}

.story-jump {
  position: sticky;
  top: 4.5rem; /* flush under .site-topbar__inner height */
  z-index: 20;
  margin: 0 0 1.35rem;
  background: #fcfaf6;
  border-bottom: 1px solid rgba(26, 36, 32, 0.1);
  box-shadow: 0 8px 20px rgba(8, 18, 12, 0.08);
}

/* Full-bleed track; first/last links align with page-banner / story-shell gutters */
.story-jump__track {
  --site-gutter: 1rem;
  --site-max: 80rem;
  --site-inline: max(
    var(--site-gutter),
    calc((100% - min(var(--site-max), 100%)) / 2 + var(--site-gutter))
  );
  display: flex;
  gap: 1.15rem;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.45rem var(--site-inline) 0.55rem;
  scroll-padding-inline: var(--site-inline);
  cursor: grab;
  user-select: none;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: none;
  scrollbar-width: none;
}

@media (min-width: 768px) {
  .story-jump__track {
    --site-gutter: 2rem;
  }
}

.story-jump__track::-webkit-scrollbar {
  display: none;
}

.story-jump__track.is-dragging {
  cursor: grabbing;
}

.story-jump__track a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.2rem 0.15rem;
  border: 0;
  border-radius: 0;
  background: none;
  color: #2f6b4f;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  white-space: nowrap;
  scroll-snap-align: none;
}

.story-jump__track a:hover,
.story-jump__track a:focus-visible {
  color: #173d29;
  outline: none;
}

/* Fallback for direct #hash URLs; click jumps use JS offset past sticky strip */
.tech-box[id],
.tech-step[id],
.tech-panel[id],
.tech-alert[id] {
  scroll-margin-top: calc(4.5rem + 4.5rem);
}

.story-band {
  position: relative;
  overflow: clip;
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}

.story-band--cream {
  background: #fcfaf6;
}

.story-band--white {
  background: #fff;
}

.story-band--ink {
  background: #233e2b;
  color: #fff;
}

.story-shell {
  margin-inline: auto;
  max-width: 80rem;
  padding-inline: 1rem;
}

.story-head {
  max-width: 42rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.story-head h2 {
  margin: 0;
  max-width: 18ch;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: clamp(2.15rem, 4.4vw, 3.65rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.story-head h2 .text-accent {
  color: #2f6b4f;
}

.story-band--ink .story-head h2 .text-accent {
  color: #f1e9bd;
}

.story-head p {
  margin: 1rem 0 0;
  max-width: 38rem;
  font-size: 1.08rem;
  line-height: 1.65;
  color: rgba(26, 36, 32, 0.78);
}

.story-band--ink .story-head p {
  color: rgba(255, 255, 255, 0.78);
}

.story-lede {
  max-width: 44rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.7;
  color: rgba(26, 36, 32, 0.82);
}

.story-lede + .story-lede {
  margin-top: 1rem;
}

.story-split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.story-media {
  position: relative;
  isolation: isolate;
}

.story-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 18px 44px rgba(20, 32, 24, 0.12);
}

.story-media__blob {
  position: absolute;
  z-index: -1;
  width: min(18rem, 70%);
  height: min(18rem, 70%);
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  background: rgba(47, 107, 79, 0.12);
  filter: blur(2px);
  pointer-events: none;
}

.story-media__blob--tl {
  top: -8%;
  left: -8%;
}

.story-media__blob--br {
  right: -10%;
  bottom: -10%;
  background: rgba(177, 138, 74, 0.14);
  border-radius: 55% 45% 48% 52% / 42% 58% 42% 58%;
}

.story-facts {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.story-facts li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 1.35rem;
  border-radius: 1.15rem;
  background: #f6f7f4;
}

.story-facts strong {
  display: block;
  margin-bottom: 0.3rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.15;
}

.story-facts span {
  display: block;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(26, 36, 32, 0.75);
}

.story-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: #fff;
  color: #2f6b4f;
  box-shadow: 0 4px 12px rgba(20, 32, 24, 0.08);
}

.story-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.story-benefits {
  display: grid;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-benefits li {
  padding: 1.5rem 1.5rem 1.55rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 4px 16px rgba(20, 32, 24, 0.06);
}

.story-band--white .story-benefits li {
  background: #f6f7f4;
  box-shadow: none;
}

.story-benefits h3 {
  margin: 0 0 0.55rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 800;
  line-height: 1.15;
}

.story-benefits p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(26, 36, 32, 0.78);
}

.story-methods {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-methods li {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.4rem 1.55rem;
  border: 1px solid #ececec;
  border-radius: 1.35rem;
  background: #fff;
  box-shadow: 0 4px 12px rgba(20, 32, 24, 0.06);
}

.story-methods h3 {
  margin: 0 0 0.55rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
}

.story-methods p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(26, 36, 32, 0.78);
}

.story-note {
  margin-top: 1.5rem;
  padding: 1.35rem 1.45rem;
  border-radius: 1.15rem;
  background: rgba(47, 107, 79, 0.08);
  font-size: 1.02rem;
  line-height: 1.6;
}

.story-note strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.story-rules {
  display: grid;
  gap: 1.15rem;
}

.story-rule {
  padding: 1.6rem 1.5rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 4px 16px rgba(20, 32, 24, 0.06);
}

.story-rule h3 {
  margin: 0 0 0.65rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.15;
}

.story-rule p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: rgba(26, 36, 32, 0.8);
}

.story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.story-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.story-actions a.primary {
  background: #2f6b4f;
  color: #fff;
  box-shadow: 0 10px 24px rgba(20, 32, 24, 0.16);
}

.story-actions a.primary:hover {
  background: #275a42;
}

.story-actions a.secondary {
  background: #fff;
  color: #2f6b4f;
  border: 1px solid rgba(47, 107, 79, 0.28);
}

.story-actions a.secondary:hover {
  background: #eef5ef;
}

.story-band--ink .story-actions a.secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.story-band--ink .story-actions a.primary {
  background: #f1e9bd;
  color: #1a2420;
  box-shadow: none;
}

.story-plant {
  position: absolute;
  bottom: 0;
  width: min(14rem, 22vw);
  pointer-events: none;
  opacity: 0.9;
  user-select: none;
}

.story-plant--left {
  left: max(-1rem, calc((100% - 80rem) / 2 - 2rem));
}

.story-plant--right {
  right: max(-1rem, calc((100% - 80rem) / 2 - 2rem));
  transform: scaleX(-1);
}

.story-path {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: path;
}

.story-path li {
  position: relative;
  padding: 1.4rem 1.4rem 1.45rem 4.25rem;
  border-radius: 1.15rem;
  background: #f6f7f4;
  counter-increment: path;
}

.story-path li::before {
  content: counter(path);
  position: absolute;
  left: 1.15rem;
  top: 1.35rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: #2f6b4f;
  color: #fff;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
}

.story-path h3 {
  margin: 0 0 0.4rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
}

.story-path p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(26, 36, 32, 0.78);
}

.story-points {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-points li {
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 4px 16px rgba(20, 32, 24, 0.06);
}

.story-band--white .story-points li {
  background: #f6f7f4;
  box-shadow: none;
}

.story-points strong {
  display: block;
  margin-bottom: 0.45rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
}

.story-points p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(26, 36, 32, 0.78);
}

.story-contact {
  display: grid;
  gap: 1.5rem;
}

.story-contact__card {
  padding: 1.6rem 1.5rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 4px 16px rgba(20, 32, 24, 0.06);
}

.story-link,
.story-contact__card a,
.story-benefits a,
.story-rule a {
  color: #2f6b4f;
  font-weight: 800;
  text-decoration: none;
}

.story-link:hover,
.story-contact__card a:hover,
.story-benefits a:hover {
  text-decoration: underline;
}

.story-contact__card a:hover {
  text-decoration: underline;
}

.story-form {
  display: grid;
  gap: 1rem;
  padding: 1.6rem 1.5rem;
  border-radius: 1.25rem;
  background: #f6f7f4;
}

.story-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.story-form input,
.story-form textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(26, 36, 32, 0.16);
  border-radius: 0.75rem;
  background: #fff;
  font: inherit;
  color: inherit;
}

.story-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.story-form .check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.45;
}

.story-form .check input {
  width: 1.1rem;
  height: 1.1rem;
  min-height: 0;
  margin-top: 0.2rem;
  flex: none;
}

.story-form button {
  justify-self: start;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: #2f6b4f;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.story-form button:hover {
  background: #275a42;
}

@media (min-width: 760px) {
  .story-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .story-facts li {
    grid-template-columns: 1fr;
    min-height: 100%;
  }

  .story-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-points {
    grid-template-columns: 1fr;
  }

  .story-contact {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
}

@media (min-width: 980px) {
  .story-split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3.5rem;
  }

  .story-split--flip {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  .story-split--flip .story-media {
    order: 2;
  }

  .story-methods {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .story-methods li:nth-child(4),
  .story-methods li:nth-child(5) {
    grid-column: span 1;
  }

  .story-benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .story-path {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .story-points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .story-plant {
    display: none;
  }
}

.story-shell > .archive-grid,
.story-shell > .hub-grid {
  width: 100%;
  max-width: none;
  margin: 0;
}

.story-band.guide-section {
  overflow: visible;
  /* No big standalone title anymore — keep jump nav tight under the hero */
  padding-block: 0.85rem clamp(2.5rem, 5vw, 4.5rem);
}

.story-guide-title {
  margin: 0 0 1rem;
  max-width: 16ch;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: clamp(2.15rem, 4.4vw, 3.65rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-align: left;
}

.story-shell--guide {
  max-width: 80rem;
}

@media (min-width: 768px) {
  .story-shell--guide {
    padding-inline: 2rem;
  }
}

.tech-stack {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
}

.tech-figure {
  margin: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #e8efe6;
  box-shadow: 0 8px 28px rgba(20, 32, 24, 0.12);
}

.tech-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.tech-figure--hero {
  background: #1a2420;
}

.tech-figure--hero img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  max-height: min(52vh, 28rem);
}

/* Original WP body photos were portraits (~350–400px wide) */
.tech-figure--portrait {
  max-width: min(100%, 26rem);
}

.tech-box,
.tech-step {
  padding: clamp(1.35rem, 2.4vw, 1.85rem) clamp(1.25rem, 2.2vw, 1.85rem);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 4px 18px rgba(20, 32, 24, 0.06);
}

/* After-steps sections (Резултати / Препоръки) — open on the page, no white card */
.tech-panel {
  padding: 0.35rem 0 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tech-box h3,
.tech-step h3,
.tech-panel h3 {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin: 0 0 1.25rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: #1a2420;
}

.tech-box__num,
.tech-step__num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-top: calc((1.15 * clamp(1.35rem, 2.6vw, 1.75rem) - 2.15rem) / 2);
  border-radius: 999px;
  background: #e8efe6;
  color: #2f6b4f;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
}

/* Process nodes — solid marker + ring, aligned with list bullets */
.tech-step {
  --step-num-size: 2.5rem;
  --step-num-gap: 0.95rem;
}

.tech-step__num {
  width: var(--step-num-size);
  height: var(--step-num-size);
  margin-top: calc((1.15 * clamp(1.35rem, 2.6vw, 1.75rem) - var(--step-num-size)) / 2);
  background: #2f6b4f;
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 4.5px rgba(47, 107, 79, 0.32);
}

.tech-box ul,
.tech-step__content ul,
.tech-kare ul,
.tech-panel ul,
.tech-step__note ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.tech-box li,
.tech-step__content li,
.tech-kare li,
.tech-panel li,
.tech-step__note li {
  --li-pad-top: 0.7rem;
  position: relative;
  margin: 0;
  padding: var(--li-pad-top) 0 0.7rem 1.15rem;
  border-top: 1px solid rgba(26, 36, 32, 0.08);
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(26, 36, 32, 0.84);
}

.tech-box li:first-child,
.tech-step__content li:first-child,
.tech-kare li:first-child,
.tech-panel li:first-child,
.tech-step__note li:first-child {
  --li-pad-top: 0.15rem;
  border-top: 0;
}

.tech-box li::before,
.tech-step__content li::before,
.tech-kare li::before,
.tech-panel li::before,
.tech-step__note li::before {
  content: "";
  position: absolute;
  left: 0;
  /* Dot center = padding-top + half of first line box */
  top: calc(var(--li-pad-top) + 0.5lh);
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: #2f6b4f;
  transform: translateY(-50%);
}

/* Step lists: bullets sit on a dashed rail under the number node */
.tech-step__content > ul {
  position: relative;
}

.tech-step__content > ul::before {
  content: "";
  position: absolute;
  left: calc(var(--step-num-size) / 2);
  top: 0.15rem;
  bottom: 0.85rem;
  width: 0;
  border-left: 1.5px dashed rgba(47, 107, 79, 0.3);
  transform: translateX(-50%);
  pointer-events: none;
}

.tech-step__content > ul > li {
  padding-left: calc(var(--step-num-size) + var(--step-num-gap));
}

.tech-step__content > ul > li::before {
  left: calc(var(--step-num-size) / 2);
  width: 0.55rem;
  height: 0.55rem;
  background: #2f6b4f;
  box-shadow: 0 0 0 3px #fff;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* —— Single application step: white box, text + square image —— */
.tech-step {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "media"
    "content";
  gap: 1.15rem 1.75rem;
  align-items: start;
}

.tech-step > h3 {
  grid-area: title;
  margin-bottom: 1.25rem;
}

.tech-step__media {
  grid-area: media;
  margin: 0;
  width: 100%;
  max-width: 28rem;
  overflow: hidden;
  border-radius: 1rem;
  background: #e8efe6;
  aspect-ratio: 1 / 1;
  justify-self: start;
}

.tech-step__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.tech-step__content {
  grid-area: content;
  min-width: 0;
}

.tech-step__content > ul {
  margin-top: 0;
}

.tech-step__block {
  margin-top: 1.1rem;
}

.tech-step__block:first-child {
  margin-top: 0;
}

.tech-step__block h4 {
  margin: 0 0 0.55rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.2;
  color: #1a2420;
}

.tech-step__block ul {
  margin-top: 0.35rem;
}

.tech-alert {
  padding: clamp(1.1rem, 2vw, 1.35rem) clamp(1.1rem, 2vw, 1.45rem);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #fbf6f4 0%, #f4e8e4 100%);
  box-shadow: 0 4px 18px rgba(20, 32, 24, 0.05);
  border: 1px solid rgba(145, 72, 64, 0.28);
}

.tech-alert p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #8a4a43;
}

.tech-alert strong {
  color: #7a3d37;
}

.tech-after {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 0.35rem;
}

.tech-panel h3 {
  margin-bottom: 0.15rem;
}

.tech-kare-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
}

.tech-kare {
  padding: 1rem 1.1rem 1.05rem;
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 4px 18px rgba(20, 32, 24, 0.06);
}

.tech-kare h4 {
  margin: 0;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  color: #1a2420;
}

.tech-kare ul {
  margin-top: 0.7rem;
}

.tech-kare p {
  margin: 0.55rem 0 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(26, 36, 32, 0.84);
}

.tech-kare p:first-of-type {
  margin-top: 0.65rem;
}

@media (min-width: 800px) {
  /* Block + absolute media: keeps text top-aligned when shorter than the image */
  .tech-step {
    display: block;
    position: relative;
    padding-inline-end: calc(clamp(1.25rem, 2.2vw, 1.85rem) + 22rem + 3rem);
    min-height: calc(22rem + 2 * clamp(1.35rem, 2.4vw, 1.85rem));
  }

  .tech-step > h3 {
    margin-bottom: 1.5rem;
  }

  .tech-step__media {
    position: absolute;
    top: clamp(1.35rem, 2.4vw, 1.85rem);
    inset-inline-end: clamp(1.25rem, 2.2vw, 1.85rem);
    width: 22rem;
    max-width: 22rem;
    margin: 0;
  }

  .tech-kare-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
  }

  .tech-kare-grid--tips {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .tech-kare-grid--tips {
    grid-template-columns: repeat(4, 1fr);
  }
}

.story-shell--guide .section-action {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.story-shell--guide .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: #2f6b4f;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(20, 32, 24, 0.16);
}

.story-shell--guide .button:hover {
  background: #275a42;
}

.story-shell--guide .button-print {
  border: 0;
  background: #173d29;
  color: #fff9e8;
  font-family: inherit;
  cursor: pointer;
}

.story-shell--guide .button-print:hover {
  background: #234e36;
  color: #fff9e8;
}

@media print {
  body.application-page .site-topbar,
  body.application-page .mobile-menu,
  body.application-page .site-footer,
  body.application-page .skip-link,
  body.application-page .toast,
  body.application-page .section-action,
  body.application-page .story-jump,
  body.application-page .tech-figure,
  body.application-page .tech-step__media,
  body.application-page .page-hero-shade,
  body.application-page img {
    display: none !important;
  }

  body.application-page,
  body.application-page main#content {
    padding: 0 !important;
    background: #fff !important;
    color: #1a2420;
  }

  body.application-page .page-hero {
    display: block;
    height: auto;
    min-height: 0;
    margin: 0 !important;
    padding: 0 0 1rem !important;
    background: #fff;
    color: #1a2420;
  }

  body.application-page .page-hero-copy h1,
  body.application-page .page-hero-help {
    color: #1a2420;
    text-shadow: none;
  }

  body.application-page .story-band,
  body.application-page .tech-box,
  body.application-page .tech-step,
  body.application-page .tech-panel,
  body.application-page .tech-kare,
  body.application-page .tech-alert {
    background: #fff;
    box-shadow: none;
  }
}

/* Kill old two-column / horizontal scrubber if any leftover markup remains */
.story-shell--guide .guide-track {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  overflow: visible !important;
  width: 100% !important;
  padding: 0 !important;
  scroll-snap-type: none !important;
}

.story-shell--guide .method-guide {
  flex: none !important;
  max-width: none !important;
  width: 100% !important;
  border: 0 !important;
  border-radius: 1.25rem !important;
  background: #fff !important;
  padding: 1.45rem 1.4rem 1.5rem !important;
  box-shadow: 0 4px 18px rgba(20, 32, 24, 0.06);
}

/* —— Blog listing: 1 col mobile · 2 col tablet · full-width rows desktop —— */
.story-shell > .archive-grid {
  gap: 1.15rem;
}

.story-shell > .post-grid {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
  margin: 0;
}

@media (min-width: 700px) and (max-width: 1099px) {
  .story-shell > .post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
  }

  .post-card {
    height: 100%;
  }

  .post-card img {
    height: 11.5rem;
  }
}

.post-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.75rem;
  background: #fff;
  color: #1a2420;
  box-shadow: 0 12px 32px rgba(20, 32, 24, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(20, 32, 24, 0.13);
}

.post-card__media {
  display: block;
  flex: none;
  overflow: hidden;
  text-decoration: none;
}

.post-card img {
  display: block;
  width: 100%;
  height: 13rem;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.post-card:hover img {
  transform: scale(1.035);
}

.post-card .post-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem;
}

.post-card h3 {
  margin: 0;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.post-card h3 a {
  color: inherit;
  text-decoration: none;
  background: none;
  box-shadow: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  display: inline;
}

.post-card h3 a:hover {
  color: #2f6b4f;
  transform: none;
  box-shadow: none;
}

.post-excerpt {
  flex: 1;
  margin: 0.75rem 0 0;
  color: rgba(26, 36, 32, 0.72);
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.post-excerpt__long {
  display: none;
}

.post-excerpt__short {
  display: inline;
}

.post-card__cta {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin-top: 1.25rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: #2f6b4f;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(47, 107, 79, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card__cta:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 14px 28px rgba(47, 107, 79, 0.28);
}

@media (min-width: 1100px) {
  .post-card {
    flex-direction: row;
    align-items: stretch;
    min-height: 6.75rem;
  }

  .post-card__media {
    width: clamp(8.5rem, 22%, 12rem);
    align-self: stretch;
  }

  .post-card img {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .post-card .post-body {
    justify-content: center;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.75rem 1.15rem;
  }

  .post-card h3 {
    font-size: clamp(1.15rem, 1.6vw, 1.4rem);
    line-height: 1.2;
  }

  .post-excerpt {
    margin-top: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 62ch;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .post-excerpt__short {
    display: none;
  }

  .post-excerpt__long {
    display: inline;
  }

  .post-card__cta {
    min-height: 2.15rem;
    margin-top: 0.35rem;
    padding: 0 0.95rem;
    font-size: 0.88rem;
  }
}

/* —— Single article: full-width shell + white boxes (prilozheniia pattern) —— */
.story-shell--article {
  max-width: 80rem;
}

@media (min-width: 768px) {
  .story-shell--article {
    padding-inline: 2rem;
  }
}

/* Article intro: plain featured image + title (no darkened hero) */
.article-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 2.2vw, 1.35rem);
  margin: 0 0 clamp(1.25rem, 2.8vw, 1.85rem);
  width: 100%;
}

.article-intro__media {
  margin: 0;
  width: 100%;
  height: min(22rem, 50vh);
  max-height: min(22rem, 50vh);
  min-height: 0;
  overflow: hidden;
  border-radius: 1rem;
  background: rgba(26, 36, 32, 0.06);
}

.article-intro__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 768px) {
  .article-intro__media {
    width: 55%;
    height: min(26rem, 48vh);
    max-height: min(26rem, 48vh);
  }
}

.article-intro__title {
  margin: 0;
  max-width: none;
  width: 100%;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: clamp(1.85rem, 4.2vw, 3.15rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #1a2420;
  text-wrap: balance;
}

/* Full intro once under the title — not a content card; cards clamp separately. */
.article-intro__lede {
  margin: 0.15rem 0 0;
  max-width: none;
  width: 100%;
  padding: 0.85rem 0 0.85rem 1rem;
  border-left: 3px solid rgba(47, 107, 79, 0.55);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  font-weight: 650;
  line-height: 1.55;
  color: rgba(26, 36, 32, 0.82);
  text-wrap: pretty;
}

.article-band--top {
  padding-top: clamp(1.35rem, 2.8vw, 2.25rem);
}

.article-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
}

.article-box {
  padding: clamp(1.45rem, 2.6vw, 2rem) clamp(1.35rem, 2.4vw, 2rem);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 4px 18px rgba(20, 32, 24, 0.06);
}

.article-box > :first-child {
  margin-top: 0;
}

.article-box > :last-child {
  margin-bottom: 0;
}

.article-box h2 {
  margin: 0 0 1rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #1a2420;
}

.article-box h3 {
  margin: 1.35rem 0 0.65rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #2f6b4f;
}

.article-box h2 + h3 {
  margin-top: 0.85rem;
}

.article-box h2 + h3,
.article-box h2 + p,
.article-box h3:first-child {
  margin-top: 0;
}

.article-box p {
  margin: 0 0 1rem;
  max-width: none;
  width: 100%;
  font-size: clamp(1.02rem, 1.5vw, 1.12rem);
  line-height: 1.7;
  color: rgba(26, 36, 32, 0.86);
}

.article-box a {
  color: #2f6b4f;
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.article-box img,
.article-box figure img,
.article-stack > figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(32rem, 70vh);
  margin-inline: 0;
  object-fit: contain;
  object-position: left center;
  border-radius: 0.85rem;
}

.article-stack > figure {
  margin: 0;
  max-width: 100%;
}

.article-box ul {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.article-box li {
  position: relative;
  margin: 0;
  padding: 0.7rem 0 0.7rem 1.15rem;
  border-top: 1px solid rgba(26, 36, 32, 0.08);
  max-width: none;
  width: 100%;
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(26, 36, 32, 0.84);
}

.article-box li:first-child {
  border-top: 0;
  padding-top: 0.15rem;
}

.article-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: #2f6b4f;
}

.article-box li:first-child::before {
  top: 0.85em;
}

.story-shell--article .section-action {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.story-shell--article .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: #2f6b4f;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.story-shell--article .button:hover {
  background: #275a42;
  color: #fff;
}

.story-shell--article .button-print {
  background: #173d29;
  color: #fff9e8;
}

.story-shell--article .button-print:hover {
  background: #234e36;
  color: #fff9e8;
}

.article-related-band {
  padding-top: 0;
  overflow: visible;
  overflow-x: clip;
}

.related-head {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.35rem;
}

.related-head h2 {
  margin: 0;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.related-head .all-posts {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: #e6eee8;
  color: #1a2420;
  font-weight: 700;
  text-decoration: none;
}

.related-head .all-posts:hover {
  background: #d7e4db;
}

/* Homepage-matching horizontal blog carousel */
.bleed {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  padding: 1.5rem max(1rem, calc((100% - 76rem) / 2)) 2.75rem;
  margin-block: -0.35rem -1.25rem;
  cursor: grab;
}

.bleed.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.bleed::-webkit-scrollbar {
  display: none;
}

.bleed > * {
  flex: 0 0 auto;
}

.bleed img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.journal-card {
  display: flex;
  width: clamp(16.25rem, 76vw, 20.5rem);
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.75rem;
  background: #fff;
  color: #1a2420;
  box-shadow: 0 12px 32px rgba(20, 32, 24, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.journal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(20, 32, 24, 0.13);
}

.journal-card > img,
.journal-card .journal-media {
  display: block;
  width: 100%;
  height: 13rem;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.journal-card:hover > img,
.journal-card:hover .journal-media {
  transform: scale(1.035);
}

.journal-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem;
}

.journal-content h3 {
  margin: 0;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
}

.journal-content p {
  flex: 1;
  margin: 0.75rem 0 0;
  color: rgba(26, 36, 32, 0.7);
  font-size: 0.875rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.journal-btn {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin-top: 1.25rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: #2f6b4f;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(47, 107, 79, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.journal-btn:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 14px 28px rgba(47, 107, 79, 0.28);
}

/* Keep legacy read shell usable if any leftover pages still use it */
.story-shell--read {
  max-width: 80rem;
}

.story-shell--read .prose-article,
.story-shell--read .prose-article .prose {
  width: 100%;
  max-width: none;
  font-size: clamp(1.02rem, 1.5vw, 1.12rem);
  line-height: 1.7;
}

.story-shell--read .prose-article p {
  margin: 0 0 1.15rem;
  max-width: 72ch;
  color: rgba(26, 36, 32, 0.86);
}

.story-shell--read .related h2 {
  margin: 0 0 1rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
}

.story-shell--read .related a {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(26, 36, 32, 0.1);
  color: #2f6b4f;
  font-weight: 700;
  text-decoration: none;
}

@media print {
  body.article-page .site-topbar,
  body.article-page .mobile-menu,
  body.article-page .site-footer,
  body.article-page .section-action,
  body.article-page .article-related-band,
  body.article-page .toast {
    display: none !important;
  }

  body.article-page .article-intro__media {
    max-height: 12rem;
    border-radius: 0;
    background: none;
  }

  body.article-page .article-intro__title {
    color: #000;
  }

  body.article-page,
  body.article-page main#content {
    background: #fff !important;
    color: #000;
  }

  body.article-page .story-band {
    padding: 0 !important;
    background: #fff !important;
  }

  body.article-page .article-box {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}

@media (max-width: 700px) {
  .tech-box[id],
  .tech-step[id],
  .tech-panel[id],
  .tech-alert[id] {
    scroll-margin-top: calc(4.5rem + 4.25rem);
  }
}

.tech-box--note,
.tech-box--results,
.tech-box--tips {
  background: #fff;
}
.tech-box--note .tech-box__num,
.tech-box--results .tech-box__num,
.tech-box--tips .tech-box__num { display: none; }

.tech-box__note,
.tech-step__note {
  margin-top: 1.15rem;
  padding: 1rem 1.1rem 1.05rem;
  border: 1.5px dashed rgba(26, 36, 32, 0.28);
  border-radius: 1rem;
  background: #f7faf6;
}

.tech-box__note h4,
.tech-step__note h4 {
  margin: 0;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  color: #1a2420;
}

.tech-box__note ul,
.tech-step__note ul {
  margin-top: 0.75rem;
}

.tech-box__note p,
.tech-step__note p {
  margin: 0.65rem 0 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(26, 36, 32, 0.84);
}

.tech-results-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1rem;
}
@media (min-width: 800px) {
  .tech-results-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
}
.tech-results-grid h4 {
  margin: 0 0 .65rem;
  font-family: "Sofia Sans Condensed", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #1a2420;
}
.tech-results-grid ul { margin: 0; }

@media print {
  body.application-page .tech-step__media {
    display: none !important;
  }
}
