/* Reading layout for the notebook guide. */
.notebook-article {
  background: var(--cream);
  color: var(--navy);
}

.notebook-article .article-header {
  padding-block: 52px 48px;
  background: var(--cream);
}

.notebook-article .article-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 43%);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.notebook-article .article-heading {
  min-width: 0;
}

.notebook-article .article-heading h1 {
  max-width: 17ch;
  font-family: var(--heading-font);
  font-size: clamp(40px, 3.8vw, 52px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-align: left;
}

.notebook-article .article-deck {
  max-width: 46ch;
  margin-top: 22px;
  font-size: 16px;
  line-height: 1.75;
  color: #475675;
}

.notebook-article .article-byline {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 26px;
  font-size: 13px;
  line-height: 1.5;
}

.notebook-article .article-byline img {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
}
.article-reviewed {
  display: block;
  color: #475675;
}

.notebook-article .article-cover {
  aspect-ratio: 3 / 2;
  min-width: 0;
  overflow: hidden;
  background: #e9e4dc;
}

.notebook-article .article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notebook-article .article-cover.article-cover-captioned {
  aspect-ratio: auto;
  overflow: visible;
  background: transparent;
}

.notebook-article .article-cover-captioned > img {
  aspect-ratio: 3 / 2;
  height: auto;
}

.article-cover-captioned figcaption {
  margin-top: 10px;
  color: #475675;
  font-size: 12px;
  line-height: 1.5;
}

.notebook-article .article-cover-object,
.notebook-article .article-related-object > img {
  background-color: #dce4e8;
  background-image:
    linear-gradient(rgb(42 61 107 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(42 61 107 / 6%) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
}

.notebook-article .article-cover-object img {
  padding: 24px;
  object-fit: contain;
}

/* The long subjects sit within the centre band; crop transparent vertical
   padding so their full length uses the available cover width. */
.notebook-article .article-cover-object img.guide-image-long {
  object-fit: cover;
}

.notebook-article .article-reading {
  padding-block: 28px 56px;
}

.notebook-article .article-grid {
  width: min(calc(100% - var(--gutter) * 2), 980px);
  grid-template-columns: 200px minmax(0, 660px);
  align-items: start;
  justify-content: center;
  gap: clamp(32px, 7vw, 120px);
}

.notebook-article .article-aside {
  position: sticky;
  top: 96px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.65;
}

.notebook-article .article-contents > summary {
  display: none;
}

.notebook-article .toc {
  padding: 0;
  border: 0;
}

.notebook-article .toc h2 {
  margin: 0 0 12px;
  font-family: inherit;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
}

.notebook-article .toc :is(ul, ol) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notebook-article .toc a {
  min-height: 44px;
  padding-block: 9px;
  color: #475675;
  overflow-wrap: anywhere;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .notebook-article .toc a:hover {
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.notebook-article .article-body {
  max-width: 660px;
  min-width: 0;
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: break-word;
}

.notebook-article .article-body > section {
  scroll-margin-top: 96px;
}

.notebook-article .article-body > section + section {
  margin-top: 44px;
}

.notebook-article .article-body h2 {
  margin: 0 0 18px;
  font-family: var(--heading-font);
  font-size: clamp(28px, 2.5vw, 32px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.notebook-article .article-body p + p {
  margin-top: 18px;
}

.notebook-article .article-body a:not(.button) {
  font-weight: 600;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .notebook-article .article-body a:not(.button):hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.notebook-article .article-body .callout {
  margin-block: 26px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.notebook-article .article-contact {
  margin-top: 52px;
}

.notebook-article .article-table-hint {
  display: none;
}
.notebook-article .article-table {
  max-width: 100%;
  overflow-x: auto;
  margin-block: 24px;
  border-radius: 4px;
  background: rgb(255 255 255 / 55%);
  font-size: 15px;
  line-height: 1.65;
}
.notebook-article .article-table table {
  width: 100%;
  min-width: 510px;
  border-collapse: collapse;
}
.notebook-article .article-table :is(th, td) {
  padding: 15px 18px;
  text-align: left;
  vertical-align: top;
}
.notebook-article .article-table th {
  font-weight: 600;
}
.notebook-article .article-table thead {
  background: rgb(42 61 107 / 7%);
}
.notebook-article .article-table tbody tr + tr {
  border-top: 1px solid rgb(42 61 107 / 12%);
}
.notebook-article .article-sources {
  font-size: 14px;
}
.notebook-article .article-sources h2 {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0;
}

.notebook-article .article-contact .button {
  max-width: 100%;
  margin-top: 24px;
}

.notebook-article .article-contact .button + p {
  margin-top: 18px;
}

.notebook-article .article-next {
  width: min(calc(100% - var(--gutter) * 2), 980px);
  padding-block: 20px 64px;
}

.notebook-article .article-next-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 26px;
}

.notebook-article .article-next-heading h2 {
  font-family: var(--heading-font);
  font-size: 32px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.notebook-article .article-next-heading > .text-link {
  margin-inline-start: auto;
  white-space: nowrap;
}

.notebook-article .article-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.notebook-article .article-related {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  text-decoration: none;
}

.notebook-article .article-related > img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.notebook-article .article-related-object > img {
  padding: 12px;
  object-fit: contain;
}

.notebook-article .article-related > div {
  min-width: 0;
}

.notebook-article .article-related h3 {
  font-family: var(--heading-font);
  font-size: 24px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-align: left;
}

.notebook-article .article-related .text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--text-link-gap);
  min-height: 44px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .notebook-article .article-related:hover .text-link {
    text-decoration: underline;
    text-underline-offset: var(--text-link-underline-offset);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .notebook-article .article-related:hover .text-link-arrow {
    transform: translate(var(--text-link-arrow-travel), calc(-1 * var(--text-link-arrow-travel)));
  }
}

@media (max-width: 1023px) {
  .notebook-article .article-intro {
    gap: 32px;
  }

  .notebook-article .article-grid {
    grid-template-columns: 170px minmax(0, 660px);
    gap: 36px;
  }

  .notebook-article .article-related {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

@media (max-width: 767.98px) {
  .notebook-article .article-table-hint {
    display: block;
    margin-top: 20px;
    margin-bottom: -12px;
    font-size: 13px;
    color: #475675;
  }
  .notebook-article .article-header {
    padding-block: 32px 28px;
  }

  .notebook-article .article-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .notebook-article .article-heading h1 {
    max-width: 18ch;
    font-size: clamp(34px, 8.7vw, 46px);
  }

  .notebook-article .article-deck {
    margin-top: 18px;
  }

  .notebook-article .article-byline {
    margin-top: 20px;
  }

  .notebook-article .article-cover {
    aspect-ratio: 3 / 2;
  }

  .notebook-article .article-cover-object img {
    padding: 18px;
  }

  .notebook-article .article-reading {
    padding-block: 0 40px;
  }

  .notebook-article .article-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .notebook-article .article-aside {
    position: static;
  }

  .notebook-article .article-contents > summary {
    display: list-item;
    width: fit-content;
    min-height: 44px;
    padding-block: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
  }

  .notebook-article .toc h2 {
    display: none;
  }

  .notebook-article .toc {
    padding-top: 8px;
  }

  .notebook-article .article-contact {
    margin-top: 44px;
  }

  .notebook-article .article-next {
    padding-block: 12px 44px;
  }

  .notebook-article .article-related-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .notebook-article .article-related {
    grid-template-columns: minmax(0, 36%) minmax(0, 1fr);
    gap: 16px;
  }

  .notebook-article .article-related h3 {
    font-size: 22px;
  }
}
.service-detail .article-heading .workbench-actions {
  justify-content: flex-start;
  margin-top: 24px;
}

/* Instructional diagrams are separate panels so labels stay legible on phones. */
.notebook-article .guide-diagram {
  margin-block: var(--space-8);
}
.guide-diagram-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  align-items: start;
  gap: var(--space-6);
}
.guide-diagram-image {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  justify-self: center;
}
.notebook-article .guide-diagram figcaption {
  margin-top: var(--space-4);
  color: #475675;
  font-size: var(--type-ui);
  line-height: var(--leading-body);
}

.notebook-article .guide-equipment {
  margin-block: var(--space-8);
}
.guide-equipment-image {
  display: grid;
  justify-items: center;
  padding: var(--space-6);
  background-color: #dce4e8;
  background-image:
    linear-gradient(rgb(42 61 107 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(42 61 107 / 6%) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
}
.guide-equipment-image img {
  display: block;
  width: min(100%, 360px);
  height: auto;
}
.notebook-article .guide-equipment figcaption {
  margin-top: var(--space-4);
  color: #475675;
  font-size: var(--type-ui);
  line-height: var(--leading-body);
}
