/* Reading rhythm and subheads for the Understanding Whisky Production lessons. */
.guide-prose h3 {
  margin: 1.35em 0 .55em;
  font-size: clamp(20px, 2.4vw, 24px);
}

.guide-prose h4 {
  margin: 1.4em 0 .5em;
  color: var(--accent-hi);
  font: 600 17px/1.35 var(--sans);
}

.guide-prose > :is(.data-table-block, .course-diagram, .infographic, .fact-card, blockquote) {
  margin-block: 2rem 2.25rem;
}

/* Match the wider reading layout and sticky contents rail used by long-form guides. */
.section-understanding-whisky-production .guide-prose {
  max-width: 1120px;
}

.section-understanding-whisky-production .guide-prose > :is(h1, h2, h3, h4, p, ul, ol, blockquote) {
  max-width: 760px;
}

.section-understanding-whisky-production .guide-prose :is(h2, h3, h4) {
  scroll-margin-top: 82px;
}

@media (min-width: 1100px) {
  .section-understanding-whisky-production .guide-prose {
    display: grid;
    grid-template-columns: minmax(190px, 220px) minmax(0, 760px);
    column-gap: 32px;
    max-width: 1044px;
  }

  .section-understanding-whisky-production .guide-prose > :not(.guide-toc) {
    grid-column: 2;
  }

  .section-understanding-whisky-production .guide-toc {
    grid-column: 1;
    grid-row: 1 / span 99;
    position: sticky;
    top: 82px;
    align-self: start;
    margin: 0;
    max-height: calc(100vh - 98px);
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .section-understanding-whisky-production .guide-toc summary {
    display: none;
  }

  .section-understanding-whisky-production .guide-toc:not([open]) > :not(summary) {
    display: block;
  }

  .section-understanding-whisky-production .guide-toc > nav {
    padding: 0 12px 0 0;
    border-right: 1px solid var(--line);
  }

  .section-understanding-whisky-production .guide-toc ul {
    padding: 0;
    list-style: none;
  }

  .section-understanding-whisky-production .guide-toc li {
    margin: 0;
  }

  .section-understanding-whisky-production .guide-toc a {
    display: block;
    padding: 6px 0;
  }

  .section-understanding-whisky-production .guide-toc li ul {
    padding-left: 12px;
    margin: 0;
  }
}

/* Keep long table values inside the final column; mobile tables remain scrollable. */
.section-understanding-whisky-production .prose .data-table-block--wide .data-table {
  table-layout: fixed;
  overflow-wrap: anywhere;
}
