/* ============================================================
   study-guides.css
   Styling for study-guides.html — UPCPI
   Covers BOTH views in that file: the library (#view-library)
   and the guide detail view (#view-detail). One stylesheet, one
   background — see the ".page-content" rule below, which is the
   single source of the page backdrop for both views so there's
   no seam when JS swaps one for the other.

   Design notes:
   - Palette: --fire / dark base, plus a warm parchment surface
     (#f4ede4) for "this is a document" surfaces — the ledger rows
     in the library, and the PDF card in the detail sidebar.
   - Typeface stays Montserrat throughout.
   - Library signature element: the session ledger, each row
     showing its real week/session count as a large numeral.
   - Detail signature element: numbered session cards (not a
     connecting-line timeline — a card list holds up better when
     note lengths vary and is simpler on mobile) plus the parchment
     PDF card in the sidebar.
   ============================================================ */

:root {
  --study-paper: #f4ede4;
  --study-paper-dim: #e8ddcd;
  --study-paper-edge: #d8c9a8;
  --study-ink: #1c1410;
  --study-ink-soft: rgba(28, 20, 16, 0.6);
  --study-ink-faint: rgba(28, 20, 16, 0.38);
  --study-surface: #14100d;
}

/* ══════════ ONE SHARED BACKGROUND FOR THE WHOLE PAGE ══════════
   Applied once, here, instead of separately on .study-hero /
   .study-library / .sgd-hero / .sgd-layout. Both views sit on top
   of this same backdrop, so switching between them never shows a
   seam or a flash of a different color. */
.page-content {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 900px 600px at 18% 8%, rgba(255,90,0,.10) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 88% 30%, rgba(255,90,0,.06) 0%, transparent 60%),
    linear-gradient(165deg, #0a0908 0%, #100d0a 50%, #0a0908 100%);
}

/* ══════════════════════════════════════════════════════════════
   VIEW: LIBRARY
   ══════════════════════════════════════════════════════════════ */

.study-hero {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 7% 40px;
}

.study-hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 35%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 35%, #000 0%, transparent 75%);
}

.study-hero-split {
    width: 100%;
    max-width: 1280px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
}

.study-hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    max-width: 560px;
}

.study-hero::after {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%) translate(calc(var(--mx) * -20px), calc(var(--my) * -20px));
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,90,0,0.07) 0%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  transition: transform 400ms ease-out;
}

.study-hero-art {
  position: relative;
  width: 100%;
  height: 460px;
}

.study-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 480px;
  height: 480px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
}

.study-fade {
  opacity: 0;
  transform: translateY(16px);
  animation: studyFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes studyFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.study-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--fire);
  margin-bottom: 24px;
}

.study-hero-live-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fire);
  flex-shrink: 0;
}

.study-hero-live-dot::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--fire);
  opacity: 0.6;
  animation: studyLiveDotPing 2.2s ease-out infinite;
}

@keyframes studyLiveDotPing {
  0%   { transform: scale(0.4); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}

.study-hero-kicker::before,
.study-hero-kicker::after {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--fire);
  opacity: 0.5;
}

.study-hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 24px;
}

.study-hero-title em {
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #ff5a00, #ffb347, #ff5a00);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: studyGradientShift 6s ease-in-out infinite;
}

@keyframes studyGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.study-hero-desc {
  font-size: 1.02rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.5);
  max-width: 480px;
  margin: 0 0 36px;
}

.study-hero-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-bottom: 0;
}

.study-hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 100px;
  background: var(--fire);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 28px -8px rgba(255,90,0,0.4);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.study-hero-cta::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 100px;
  background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.5), transparent 30%);
  opacity: 0;
  transition: opacity 200ms ease;
  z-index: -1;
  animation: studyCtaSpin 3s linear infinite;
}

.study-hero-cta:hover::before {
  opacity: 0.5;
}

@keyframes studyCtaSpin {
  to { transform: rotate(360deg); }
}

.study-hero-cta:hover {
  background: #ff7a2e;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(255,90,0,0.5);
}

.study-hero-cta i {
  transition: transform 160ms ease;
}

.study-hero-cta:hover i {
  transform: translateX(3px);
}

.study-hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

.study-hero-meta i {
  color: var(--fire);
  font-size: 0.78rem;
}

#studyScrollCue {
  text-decoration: none;
}

/* ── Library ──
   No background of its own — sits on .page-content's backdrop.
   The hairline top border is the only separator from the hero,
   replacing the old opaque "lifted sheet" panel. */
.study-library {
    position: relative;
    padding: 64px 7% 120px;
    z-index: 5;
}

/* Divider between hero and library — a fading gradient line rather
   than a flat border, so it reads as a deliberate accent instead of
   a hard UI seam. */
.study-library::before {
  content: '';
  position: absolute;
  top: 0;
  left: 7%;
  right: 7%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.14) 18%,
    rgba(255,90,0,0.55) 50%,
    rgba(255,255,255,0.14) 82%,
    transparent 100%
  );
}

.study-library-head {
  max-width: 700px;
  margin-bottom: 32px;
}

.study-library-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fire);
  margin-bottom: 14px;
}

.study-library-kicker::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--fire);
  opacity: 0.6;
}

.study-library-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
  margin-bottom: 14px;
}

.study-library-desc {
  font-size: 0.96rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.52);
  margin-bottom: 32px;
}

.study-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--white-10);
}

.study-tab {
  padding: 10px 4px;
  margin-right: 28px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,0.45);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}

.study-tab:hover {
  color: rgba(255,255,255,0.75);
}

.study-tab--active {
  color: #fff;
  border-bottom-color: var(--fire);
}

.study-ledger {
  display: flex;
  flex-direction: column;
}

.study-row {
  display: grid;
  grid-template-columns: 64px 132px 1fr 44px;
  align-items: center;
  gap: 28px;
  padding: 22px 18px 22px 14px;
  border-bottom: 1px solid var(--white-10);
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background 160ms ease, border-left-color 160ms ease;
}

.study-row:hover,
.study-row:focus-visible {
  background: rgba(255,255,255,0.045);
  border-left-color: var(--fire);
}

.study-row:focus-visible {
  outline: none;
}

.study-row.is-hidden {
  display: none;
}

.study-row-sessions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  line-height: 1;
}

.study-row-num {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(255, 160, 90, 0.92);
  font-variant-numeric: tabular-nums;
}

.study-row-num-label {
  margin-top: 5px;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.34);
}

.study-row-thumb {
  position: relative;
  width: 132px;
  height: 78px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.study-row-thumb-bg {
  position: absolute;
  inset: 0;
}

.study-row-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.3rem;
  color: rgba(255,255,255,0.85);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}

.study-thumb--fire     { background: linear-gradient(135deg, #4a1d05, #ff5a00); }
.study-thumb--water    { background: linear-gradient(135deg, #0c2b3a, #2f7fa3); }
.study-thumb--ember     { background: linear-gradient(135deg, #3a1208, #c2531c); }
.study-thumb--dusk      { background: linear-gradient(135deg, #241935, #5b3b86); }
.study-thumb--charcoal  { background: linear-gradient(135deg, #1c1c1c, #4a4540); }
.study-thumb--violet    { background: linear-gradient(135deg, #2a1330, #7a3f8c); }

.study-row-body {
  min-width: 0;
}

.study-row-title {
  font-family: 'Fraunces', serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #fff;
  margin-bottom: 7px;
}

.study-row-desc {
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.52);
  margin-bottom: 10px;
  max-width: 540px;
}

.study-row-meta {
  display: flex;
  gap: 18px;
  font-size: 0.74rem;
  font-weight: 500;
  color: rgba(255,255,255,0.56);
}

.study-row-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.study-row-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.study-row:hover .study-row-arrow {
  border-color: var(--fire);
  color: var(--fire);
  transform: translateX(3px);
}

.study-empty {
  display: none;
  padding: 50px 10px;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.52);
}

.study-empty.is-visible {
  display: block;
}

@media (max-width: 760px) {
  .study-row {
    grid-template-columns: 48px 100px 1fr;
    gap: 16px;
  }

  .study-row-arrow {
    display: none;
  }

  .study-row-thumb {
    width: 100px;
    height: 64px;
  }

  .study-row-num {
    font-size: 1.3rem;
  }
}

@media (max-width: 520px) {
  .study-row {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  .study-row-sessions {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    align-self: flex-start;
  }

  .study-row-thumb {
    width: 100%;
    height: 140px;
  }
}

/* ── Verse Spotlight (hero right column) ── */
.study-verse-spotlight {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.svs-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 90, 0, 0.18);
  border-radius: 20px;
  padding: 2rem 2rem 1.5rem;
  box-shadow:
    0 0 0 1px rgba(255,90,0,0.06),
    0 8px 40px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.svs-card.svs-exit {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.svs-card.svs-enter {
  opacity: 0;
  transform: translateY(-10px);
}

.svs-ref {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ff7a2e;
  margin-bottom: 1rem;
}

.svs-text {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  font-style: italic;
  min-height: 5em;
}

.svs-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.svs-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}

.svs-dots {
  display: flex;
  gap: 6px;
}

.svs-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.25s ease, transform 0.25s ease;
}

.svs-dot--active {
  background: #ff5a00;
  transform: scale(1.3);
}

.svs-dot:focus-visible {
  outline: 2px solid #ff7a2e;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .study-hero-split {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .study-hero-content {
    align-items: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .study-hero::after,
  .study-fade,
  .study-hero-title em,
  .study-hero-cta::before,
  .study-hero-live-dot::before {
    animation: none !important;
  }

  .study-fade {
    opacity: 1;
    transform: none;
  }

  .study-row,
  .study-row-arrow,
  .study-hero-cta,
  .study-hero-cta i {
    transition: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   VIEW: GUIDE DETAIL
   No background of its own — same .page-content backdrop as the
   library. Editorial treatment: Fraunces serif for the title (the
   same display face already used on the sermons hero, so this
   page reads as part of the same publication rather than a
   different product), a giant faint icon as hero atmosphere
   instead of an app-icon badge, a table-of-contents style session
   list instead of repeated boxy cards, and a PDF "card" built to
   read as a physical insert — hole-punch holes down the spine
   (same motif as the Youth Catalogs page) and a tear-line above
   the download button.
   ══════════════════════════════════════════════════════════════ */

.sgd-hero {
  position: relative;
  overflow: hidden;
  padding: 168px 7% 64px;
  border-bottom: 1px solid var(--white-10);
}

.sgd-hero-glow {
  position: absolute;
  top: -220px;
  left: 50%;
  width: 700px;
  height: 500px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 0, 0.12) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Giant faint backdrop icon — atmosphere, not UI. Tinted to the
   guide's track color via the same data-track attribute used for
   the hero glow, so it always matches without per-guide markup. */
.sgd-icon-backdrop {
  position: absolute;
  top: 50%;
  right: 4%;
  transform: translateY(-50%);
  z-index: 0;
  font-size: clamp(220px, 32vw, 420px);
  color: var(--fire);
  opacity: 0.06;
  pointer-events: none;
  line-height: 1;
}

.sgd-hero[data-track="discipleship"] .sgd-icon-backdrop { color: #9a64b8; }

.sgd-back {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 160ms ease, gap 160ms ease;
}

.sgd-back:hover {
  color: #fff;
  gap: 12px;
}

/* "Stamp" — track + scripture, read together like a ticket stub
   rather than a standalone pill + separate badge. */
.sgd-stamp {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.sgd-track-pill {
  color: var(--fire);
}

.sgd-hero[data-track="discipleship"] .sgd-track-pill { color: #c994e0; }

.sgd-stamp-sep {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
}

.sgd-stamp-scripture {
  color: rgba(255, 255, 255, 0.45);
}

.sgd-title {
  position: relative;
  z-index: 1;
  max-width: 760px;
  font-family: 'Fraunces', serif;
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: #fff;
  text-wrap: balance;
  margin-bottom: 20px;
}

.sgd-desc {
  position: relative;
  z-index: 1;
  max-width: 600px;
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  text-wrap: pretty;
  margin: 0 0 30px;
}

.sgd-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--white-10);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.sgd-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sgd-meta i {
  color: var(--fire);
}

/* ── Layout: sidebar (actions) + main (session list) ──
   Source order puts the sidebar first so it appears above the
   reading list on mobile (act first, read after). On wider
   screens, `order` puts the long read on the left. */
.sgd-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 64px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 7% 120px;
  align-items: start;
}

.sgd-main    { order: 1; }
.sgd-sidebar { order: 2; }

.sgd-main-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.sgd-main-sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
  max-width: 480px;
}

/* ── Session list — a table of contents, not a grid of identical
   cards. A large faint serif numeral marks each entry; a hairline
   divides rows; hover brings in a left accent bar, the way you'd
   underline a line you're about to read. ── */
.sgd-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--white-10);
}

.sgd-toc-item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 26px 4px 26px 18px;
  border-bottom: 1px solid var(--white-10);
  transition: padding-left 220ms cubic-bezier(0.19, 1, 0.22, 1);
}

.sgd-toc-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--fire);
  opacity: 0;
  transition: opacity 220ms ease;
}

.sgd-toc-item:hover {
  padding-left: 26px;
}

.sgd-toc-item:hover::before {
  opacity: 1;
}

.sgd-toc-num {
  flex-shrink: 0;
  width: 56px;
  font-family: 'Fraunces', serif;
  font-size: 2.1rem;
  font-weight: 500;
  color: rgba(255, 144, 84, 0.22);
  font-variant-numeric: tabular-nums;
  transition: color 220ms ease;
}

.sgd-toc-item:hover .sgd-toc-num {
  color: rgba(255, 144, 84, 0.55);
}

.sgd-toc-body {
  min-width: 0;
}

.sgd-toc-range {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 160, 90, 0.8);
  margin-bottom: 7px;
}

.sgd-toc-title {
  font-family: 'Fraunces', serif;
  font-size: 1.18rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 7px;
}

.sgd-toc-note {
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
  max-width: 50ch;
}

/* ── Sidebar ── */
.sgd-sidebar {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Signature element — the PDF "document." Parchment surface, a
   slight resting tilt, hole-punch holes down the left spine (same
   motif as the Youth Catalogs index cards), and a perforated
   tear-line above the action — built to read as a thing you'd pull
   out of a binder, not a UI panel with a download icon on it. */
.sgd-doc {
  position: relative;
  transform: rotate(-0.6deg);
  border-radius: 4px;
  box-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.55);
  transition: transform 220ms ease;
}

.sgd-doc:hover {
  transform: rotate(0deg) translateY(-2px);
}

.sgd-doc-holes {
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  z-index: 1;
}

.sgd-doc-holes span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0a0908;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}

.sgd-doc-body {
  position: relative;
  background: var(--study-paper);
  border: 1px solid var(--study-paper-edge);
  border-radius: 4px;
  padding: 24px 24px 24px 40px;
  color: var(--study-ink);
}

.sgd-doc-ribbon {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--study-ink-faint);
  margin-bottom: 14px;
}

.sgd-pdf-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sgd-pdf-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 20, 16, 0.08);
  color: #b5481c;
  font-size: 1.1rem;
}

.sgd-pdf-info h3 {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--study-ink);
  margin-bottom: 4px;
}

.sgd-pdf-meta {
  font-size: 0.72rem;
  color: var(--study-ink-faint);
}

.sgd-doc-tear {
  position: relative;
  height: 1px;
  margin: 20px 0 18px;
  background-image: linear-gradient(90deg, var(--study-paper-edge) 60%, transparent 0%);
  background-size: 10px 1px;
  background-repeat: repeat-x;
}

/* ── Combined leader / tips panel — one bordered surface with an
   internal hairline, instead of two separate stacked cards. ── */
.sgd-panel {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--white-10);
  overflow: hidden;
}

.sgd-panel-section {
  padding: 22px;
}

.sgd-panel-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.sgd-panel-section p {
  font-size: 0.84rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 18px;
}

.sgd-panel-divider {
  height: 1px;
  background: var(--white-10);
}

.sgd-card-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.sgd-card-tag--ghost {
  color: rgba(255, 255, 255, 0.4);
}

.sgd-panel-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sgd-panel-section li {
  position: relative;
  padding-left: 18px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.52);
}

.sgd-panel-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fire);
}

/* ── Buttons ── */
.sgd-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 100px;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, color 160ms ease;
}

.sgd-btn--paper {
  background: var(--study-ink);
  color: var(--study-paper);
}

.sgd-btn--paper:hover {
  background: #2a1f18;
  transform: translateY(-2px);
}

.sgd-btn--secondary {
  background: transparent;
  border: 1px solid rgba(255, 90, 0, 0.4);
  color: var(--fire);
}

.sgd-btn--secondary:hover {
  background: rgba(255, 90, 0, 0.08);
  border-color: var(--fire);
  transform: translateY(-2px);
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .sgd-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sgd-sidebar {
    position: static;
  }

  .sgd-icon-backdrop {
    right: -6%;
  }
}

@media (max-width: 560px) {
  .sgd-hero {
    padding: 148px 6% 48px;
  }

  .sgd-layout {
    padding: 40px 6% 80px;
  }

  .sgd-icon-backdrop {
    font-size: clamp(160px, 50vw, 260px);
    opacity: 0.05;
  }

  .sgd-toc-item {
    gap: 14px;
    padding: 20px 4px 20px 14px;
  }

  .sgd-toc-num {
    width: 38px;
    font-size: 1.5rem;
  }

  .sgd-doc {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sgd-btn,
  .sgd-back,
  .sgd-toc-item,
  .sgd-toc-item::before,
  .sgd-toc-num,
  .sgd-doc {
    transition: none !important;
  }
}
