/* ---------- Build guides: editorial layout (no cards) ---------- */
.guides-page {
  padding-bottom: 96px;
}

.guides-hero {
  padding-top: 88px;
  padding-bottom: 56px;
}

.guides-hero h1 {
  max-width: 900px;
  font-size: clamp(36px, 5.6vw, 72px);
  line-height: 1.12;
  letter-spacing: -0.045em;
  margin: 18px 0 22px;
}

.guides-hero h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.guide-intro {
  max-width: 620px;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.85;
  margin: 0;
}

.guide-categories {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 36px;
  font-size: 14px;
}

.guide-categories a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 6px;
  color: var(--text-2);
  transition: color 0.25s ease;
}

.guide-categories a span {
  font: 11px var(--font-mono);
  color: var(--muted);
}

.guide-categories a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.guide-categories a:hover {
  color: var(--text);
}

.guide-categories a:hover::after {
  transform: scaleX(1);
}

/* Shared story pieces */
.story-index {
  margin: 0;
  font: 11px var(--font-mono);
  letter-spacing: 0.18em;
  color: var(--orange);
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.story-more {
  display: inline-flex;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.story-more span,
.story-arrow {
  transition: transform 0.35s var(--ease-out);
}

/* Lead story */
.story-feature {
  margin-bottom: 72px;
}

.story-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  padding: 40px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.story-lead-media {
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 6px;
  background: var(--panel);
}

.story-lead-media img,
.story-thumb img,
.reading-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-lead-media img,
.story-thumb img {
  transition: transform 0.9s var(--ease-out), filter 0.5s ease;
  filter: saturate(0.92);
}

.story-lead-copy h2 {
  margin: 16px 0 16px;
  font-size: clamp(28px, 2.8vw, 40px);
  text-wrap: balance;
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.story-lead-copy > p:not(.story-index) {
  margin: 0 0 22px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.85;
}

.story-lead-copy .story-more {
  margin-top: 30px;
}

.story-lead:hover img,
.story-row:hover img {
  transform: scale(1.04);
  filter: saturate(1.05);
}

.story-lead:hover .story-more span,
.story-row:hover .story-arrow {
  transform: translateX(6px);
}

/* Category lists */
.story-group {
  margin-bottom: 72px;
}

.story-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
}

.story-group-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  scroll-margin-top: 150px;
}

.story-group-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.story-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-list li {
  border-bottom: 1px solid var(--line);
}

.story-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 200px minmax(0, 1fr) 32px;
  gap: 28px;
  align-items: center;
  padding: 26px 0;
}

.story-row::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.story-row:hover::before {
  transform: scaleX(1);
}

.story-number {
  font: 13px var(--font-mono);
  color: var(--muted);
  transition: color 0.25s ease;
}

.story-thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 4px;
  background: var(--panel);
}

.story-copy {
  display: grid;
  gap: 8px;
}

.story-copy strong {
  font-size: clamp(19px, 1.8vw, 23px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
}

.story-copy > span:not(.story-meta) {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.75;
}

.story-arrow {
  justify-self: end;
  color: var(--muted);
  font-size: 18px;
}

.story-row:hover .story-number,
.story-row:hover .story-arrow,
.story-row:hover strong {
  color: var(--amber);
}

.story-row:focus-visible,
.story-lead:focus-visible,
.guide-categories a:focus-visible,
.reading-toc a:focus-visible,
.guide-breadcrumb a:focus-visible,
.reading-figure a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
  border-radius: 4px;
}

/* CTA: a quiet closing line, not a box */
.guide-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 40px 0 0;
  border-top: 1px solid var(--line-strong);
}

.guide-cta h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.guide-cta p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}

.guide-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Article page ---------- */
.guide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 40px;
  color: var(--muted);
  font-size: 13px;
}

.guide-breadcrumb a {
  transition: color 0.2s ease;
}

.guide-breadcrumb a:hover {
  color: var(--amber);
}

.reading-hero {
  max-width: 860px;
  padding: 56px 0 40px;
}

.reading-hero h1 {
  text-wrap: balance;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.16;
  letter-spacing: -0.04em;
  margin: 18px 0 20px;
}

.reading-hero .guide-intro {
  font-size: 19px;
  margin-bottom: 22px;
}

.reading-figure {
  margin: 0;
}

.reading-figure img {
  aspect-ratio: 16 / 8;
  border-radius: 6px;
  background: var(--panel);
}

.reading-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.reading-figure figcaption a {
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.reading-figure figcaption a:hover {
  color: var(--text);
  border-color: var(--orange);
}

.reading-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding: 64px 0 80px;
}

.reading-toc {
  position: sticky;
  top: 110px;
}

.reading-toc h2 {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.reading-toc a {
  display: grid;
  grid-template-columns: 28px 1fr;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.55;
  transition: color 0.2s ease;
}

.reading-toc a span {
  font: 11px/1.9 var(--font-mono);
  color: var(--muted);
}

.reading-toc a:hover {
  color: var(--amber);
}

.reading-content {
  max-width: 700px;
  min-width: 0;
}

.guide-takeaway {
  margin: 0 0 48px;
  padding: 2px 0 2px 24px;
  border-left: 2px solid var(--orange);
}

.guide-takeaway strong {
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}


.reading-content section {
  margin-bottom: 44px;
}

.reading-content h2 {
  scroll-margin-top: 150px;
  font-size: 25px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.reading-content p {
  margin: 0 0 18px;
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.reading-content .guide-takeaway p {
  margin: 8px 0 0;
  font-size: 19px;
  line-height: 1.75;
  color: var(--text);
}

.reading-content .reading-note {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

.related-group {
  margin-bottom: 64px;
}

.related-group .story-row {
  grid-template-columns: 56px 160px minmax(0, 1fr) 32px;
  padding: 20px 0;
}

@media (max-width: 1100px) {
  .reading-toc {
    top: 150px;
  }
}

@media (max-width: 900px) {
  .story-lead {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 28px;
  }

  .story-row,
  .related-group .story-row {
    grid-template-columns: 36px 140px minmax(0, 1fr);
    gap: 20px;
  }

  .story-arrow {
    display: none;
  }

  .reading-layout {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 40px;
  }

  .reading-toc {
    position: static;
    padding-bottom: 8px;
  }

  .guide-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .guides-hero {
    padding-top: 44px;
    padding-bottom: 40px;
  }

  .story-group-heading h2,
  .reading-content h2 {
    scroll-margin-top: 190px;
  }

  .story-group-heading p {
    display: none;
  }

  .story-row,
  .related-group .story-row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    padding: 20px 0;
    align-items: start;
  }

  .story-number {
    display: none;
  }

  .story-copy > span:not(.story-meta) {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13.5px;
  }

  .story-copy strong {
    font-size: 17px;
  }

  .reading-hero {
    padding-top: 32px;
  }

  .reading-hero .guide-intro {
    font-size: 17px;
  }

  .reading-figure img {
    aspect-ratio: 3 / 2;
  }

  .reading-content p {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-lead img,
  .story-row img,
  .story-row::before,
  .guide-categories a::after,
  .story-more span,
  .story-arrow {
    transition: none;
  }

  .story-lead:hover img,
  .story-row:hover img {
    transform: none;
  }
}
