/* guide-school-age page: own rules from home-sample/guide-school-age-sample-6 */
/* =================== Age guide (sample 1) =================== */

  /* Hero: the guide's title on the left; on the right, a ladder of all five guides with this one lifted out */
  .hero--guide .wrap { min-height: min(620px, calc(100vh - 86px)); padding-bottom: 64px; }
  .hero--guide h1 { max-width: 13ch; }
  .hero--guide h1 .age { display: block; margin-top: 16px; font-family: var(--body); font-weight: 700; font-size: clamp(1rem, 1.5vw, 1.2rem); letter-spacing: 0; line-height: 1.3; color: var(--current); }
  .tagline { margin: 22px 0 0; font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 36; font-weight: 600; font-size: 1.35rem; line-height: 1.3; color: var(--deep); }
  .hero--guide .hero-lede { margin-top: 14px; max-width: 44ch; }
  .motion .tagline { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease-out) .5s, transform 1s var(--ease-out) .5s; }
  .hero-in .tagline { opacity: 1; transform: none; }
  .hero--guide .hero-actions { gap: 26px; align-items: center; flex-wrap: wrap; }

  .stages { justify-self: center; width: min(100%, 420px); }
  .stages-title { margin: 0 0 12px; font-weight: 700; color: var(--current); }
  .stages ol { list-style: none; margin: 0; padding: 0; position: relative; }
  .stages ol::before { content: ""; position: absolute; left: 17px; top: 24px; bottom: 24px; width: 3px; border-radius: 3px; background: var(--line); }
  .stages a { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 16px; align-items: center; padding: 12px 16px 12px 0; border-radius: 18px; text-decoration: none; color: var(--deep); transition: background-color .25s ease; }
  .stages b { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); box-shadow: inset 0 0 0 3px var(--glide); font: 700 .9rem/1 var(--body); color: var(--current); }
  .stages strong { display: block; font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 36; font-weight: 600; font-size: 1.15rem; line-height: 1.25; }
  .stages strong + span { display: block; margin-top: 2px; font-size: .92rem; color: var(--warm); }
  .stages a:hover strong { color: var(--current); }
  .stages a:focus-visible { outline: 3px solid var(--swell); outline-offset: 2px; }
  .stages a[aria-current="page"] { margin-left: -14px; padding-left: 14px; background: var(--white); box-shadow: 0 0 0 1px var(--line), 0 24px 44px -30px rgba(76,28,8,.5); }
  .stages a[aria-current="page"] b { background: var(--swell); box-shadow: none; color: var(--deep); }
  .stages a[aria-current="page"] .here { display: inline-block; margin-left: 8px; font: 700 .8rem/1 var(--body); color: var(--current); vertical-align: middle; }
  .motion .stages { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease-out) .35s, transform 1.1s var(--ease-out) .35s; }
  .hero-in .stages { opacity: 1; transform: none; }

  /* The guide: "In this guide" stays in view on the left, with a thin reading-progress line */
  .guide { padding: 96px 0 88px; }
  .guide .wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 72px; align-items: start; }
  .toc { position: sticky; top: 130px; }
  .toc-title { margin: 0 0 12px; font-weight: 700; color: var(--deep); }
  .toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
  .toc a { display: block; margin-left: -2px; padding: 8px 0 8px 16px; border-left: 2px solid transparent; color: var(--warm); text-decoration: none; font-size: .95rem; line-height: 1.35; transition: color .2s ease, border-color .2s ease; }
  .toc a:hover { color: var(--deep); }
  .toc a[aria-current="true"] { border-left-color: var(--current); color: var(--deep); font-weight: 700; }
  .toc a:focus-visible { outline: 3px solid var(--swell); outline-offset: 2px; }
  .toc-bar { height: 3px; margin: 22px 0 0; border-radius: 3px; background: var(--glide-soft); overflow: hidden; }
  .toc-bar i { display: block; height: 100%; width: 0; background: var(--swell); }
  .toc-book { display: inline-block; margin-top: 20px; padding-block: 4px; font-weight: 700; color: var(--current); text-decoration: none; }
  .toc-book:hover { text-decoration: underline; text-underline-offset: 3px; }

  .article { max-width: 760px; min-width: 0; }
  .g-sec + .g-sec { margin-top: 76px; }
  .g-sec h2 { font-size: clamp(1.8rem, 3vw, 2.45rem); margin: 0 0 20px; scroll-margin-top: 130px; }
  .g-sec h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 8px; }
  .g-sec p { margin: 0 0 16px; font-size: 1.1rem; line-height: 1.7; }
  .g-sec p:last-child { margin-bottom: 0; }
  .g-sec .g-lede { font-size: 1.3rem; line-height: 1.6; color: var(--deep); }
  .g-sec ul, .g-sec ol.plain { margin: 0 0 16px; padding-left: 1.2em; font-size: 1.1rem; line-height: 1.7; }
  .g-sec a { color: var(--current); text-underline-offset: 3px; }

  .g-checks { list-style: none; padding: 0 !important; margin: 4px 0 18px; }
  .g-checks li { position: relative; padding: 6px 0 6px 38px; }
  .g-checks li::before {
    content: ""; position: absolute; left: 0; top: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--glide-soft)
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E63AF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") no-repeat center / 14px;
  }

  .g-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; border-top: 1px solid var(--line); }
  .g-card { padding: 24px 0 26px; border-bottom: 1px solid var(--line); }
  .g-card h3 { display: flex; gap: 12px; align-items: baseline; }
  .g-card h3::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--swell); transform: translateY(-2px); }
  .g-card p { font-size: 1.05rem; }

  .g-steps { list-style: none; margin: 6px 0 0; padding: 0; counter-reset: step; }
  .g-steps li { position: relative; counter-increment: step; padding: 0 0 30px 66px; }
  .g-steps li:last-child { padding-bottom: 0; }
  .g-steps li::before { content: counter(step); position: absolute; left: 0; top: -4px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--deep); color: var(--swell); font: 600 1.1rem/1 var(--display); }
  .g-steps li::after { content: ""; position: absolute; left: 21px; top: 48px; bottom: 6px; width: 2px; background: var(--line); }
  .g-steps li:last-child::after { display: none; }
  .g-steps h3 { margin-top: 6px; }

  .g-note { padding: 26px 30px; border-radius: 22px; background: var(--white); box-shadow: inset 4px 0 0 var(--swell), 0 0 0 1px var(--line); }
  .g-note h2 { font-size: 1.35rem; margin-bottom: 10px; }
  .g-note p { font-size: 1.05rem; }
  .g-note--fine { background: var(--glide-soft); box-shadow: none; }
  .g-note--fine h2 { font-size: 1.1rem; }
  .g-note--fine p { font-size: .98rem; color: var(--deep); }

  .g-faq { border-top: 1px solid var(--line); }
  .g-faq details { border-bottom: 1px solid var(--line); }
  .g-faq summary { position: relative; list-style: none; cursor: pointer; padding: 20px 48px 20px 0; font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 36; font-weight: 600; font-size: 1.18rem; line-height: 1.35; color: var(--deep); }
  .g-faq summary::-webkit-details-marker { display: none; }
  .g-faq summary::before, .g-faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 16px; height: 2px; border-radius: 2px; background: var(--current); transition: transform .3s var(--ease-out); }
  .g-faq summary::after { transform: rotate(90deg); }
  .g-faq details[open] summary::after { transform: rotate(0deg); }
  .g-faq summary:focus-visible { outline: 3px solid var(--swell); outline-offset: 2px; }
  .g-faq .a { padding: 0 48px 22px 0; }
  .g-faq .a p { font-size: 1.05rem; }

  .g-sources { margin-top: 72px; padding-top: 26px; border-top: 1px solid var(--line); }
  .g-sources h2 { font-family: var(--body); font-size: 1rem; font-weight: 700; margin: 0 0 10px; }
  .g-sources ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
  .g-sources li { font-size: .95rem; line-height: 1.5; color: var(--warm); }
  .g-sources a { display: inline-block; padding-block: 2px; color: var(--current); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

  .g-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
  .g-pager a { display: block; padding: 22px 24px; border-radius: 20px; background: var(--white); box-shadow: 0 0 0 1px var(--line); text-decoration: none; color: var(--deep); transition: box-shadow .25s ease; }
  .g-pager a:hover { box-shadow: 0 0 0 2px var(--glide); }
  .g-pager a:focus-visible { outline: 3px solid var(--swell); outline-offset: 2px; }
  .g-pager small { display: block; font-size: .9rem; font-weight: 700; color: var(--current); margin-bottom: 4px; }
  .g-pager strong { display: block; font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 36; font-weight: 600; font-size: 1.2rem; line-height: 1.3; }
  .g-pager .next { text-align: right; grid-column: 2; }
  .g-pager .hub { grid-column: 1 / -1; text-align: center; }

  @media (prefers-reduced-motion: reduce) { .stages a, .toc a, .g-faq summary::before, .g-faq summary::after, .g-pager a { transition: none; } }

  @media (max-width: 1000px) {
    .guide .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .toc { position: static; padding: 22px 24px; border-radius: 20px; background: var(--white); box-shadow: 0 0 0 1px var(--line); }
    .toc-bar { display: none; }
    .article { max-width: none; }
  }
  @media (max-width: 820px) {
    .stages { width: 100%; justify-self: start; }
  }
  @media (max-width: 560px) {
    .hero--guide .wrap { padding-bottom: 48px; }
    .tagline { font-size: 1.2rem; }
    .guide { padding-top: 64px; }
    .g-sec + .g-sec { margin-top: 56px; }
    .g-sec p, .g-sec ul { font-size: 1.05rem; }
    .g-sec .g-lede { font-size: 1.18rem; }
    .g-cards { grid-template-columns: 1fr; }
    .g-steps li { padding-left: 58px; }
    .g-note { padding: 22px 20px; }
    .g-faq summary { font-size: 1.08rem; }
    .g-faq .a { padding-right: 0; }
    .g-pager { grid-template-columns: 1fr; }
    .g-pager .next { grid-column: auto; text-align: left; }
  }
