.guide-page, .resource-library { padding-bottom: clamp(48px,6vw,82px); }
.guide-page [data-guide-heading], .resource-library [data-guide-heading] { scroll-margin-top: 24px; }
.guide-page [data-guide-heading]:focus, .resource-library [data-guide-heading]:focus { outline: none; }
.guide-page [data-guide-heading]:focus-visible, .resource-library [data-guide-heading]:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 5px;
}

.guide-cover, .resource-library-head {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--brand-hover) url('assets/brand/machined-grain.webp');
  color: white;
}
.guide-cover { grid-template-columns: minmax(0,1.34fr) minmax(0,1fr); overflow: hidden; }
.guide-cover-copy {
  align-self: center;
  padding: clamp(26px,4vw,58px);
}
.guide-topic {
  margin-bottom: 16px;
  border-left: 3px solid #df9e7a;
  padding-left: 12px;
  color: #e3edf0;
  font-size: 14px;
  font-weight: 600;
}
.guide-cover h1, .resource-library-head h1 {
  font-size: clamp(32px,4.25vw,57px);
  letter-spacing: -.027em;
  line-height: 1.07;
}
.guide-cover h1 { max-width: 23ch; }
.guide-intro, .resource-library-head p {
  margin-top: 19px;
  max-width: 56ch;
  color: #deedf0;
  font-size: clamp(16px,1.4vw,19px);
  line-height: 1.58;
}
.guide-cover > .guide-figure { border: 0; border-radius: 0; }
.guide-cover > .guide-figure img { height: clamp(260px,26vw,343px); }
.guide-cover > .guide-figure figcaption { padding-inline: clamp(15px,2vw,26px); }

.guide-reading {
  display: grid;
  grid-template-columns: minmax(0,768px) minmax(216px,300px);
  justify-content: space-between;
  align-items: start;
  gap: clamp(32px,5vw,76px);
  max-width: 1140px;
  margin-inline: auto;
  margin-top: clamp(27px,4vw,48px);
}
.guide-copy { grid-column: 1; grid-row: 1; min-width: 0; }
.guide-toc {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 24px;
  padding: 17px 18px 9px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: 5px;
  background: var(--paper);
}
.guide-toc h2 { margin: 0 9px 7px; font-size: 19px; letter-spacing: -.01em; }
.guide-toc ul, .guide-references ul, .guide-tiles, .product-guide-links ul, .resource-library-head ul { list-style: none; margin: 0; padding: 0; }
.guide-toc a {
  display: block;
  padding: 10px 9px;
  border-radius: 3px;
  color: var(--brand);
  font-size: 14px;
  line-height: 1.3;
}
.guide-toc li + li { border-top: 1px solid var(--line); }
.guide-toc a:hover, .guide-toc a:focus-visible { background: #e4eef0; text-decoration: underline; text-underline-offset: 3px; }
.guide-first-check {
  padding: 16px clamp(17px,2vw,24px);
  border-left: 3px solid var(--copper);
  border-radius: 0 4px 4px 0;
  background: var(--paper);
}
.guide-first-check strong { color: #79442e; font-size: 14px; }
.guide-first-check p { margin-top: 4px; color: var(--ink); font-size: 16px; }
.guide-section { margin-top: clamp(33px,4.5vw,57px); }
.guide-section + .guide-section { border-top: 1px solid var(--line); padding-top: clamp(28px,3.4vw,42px); }
.guide-section h2 { font-size: clamp(24px,2.6vw,32px); letter-spacing: -.023em; }
.guide-section > p, .guide-steps, .guide-points {
  max-width: 70ch;
  margin-top: 14px;
  color: #34464d;
  font-size: clamp(16px,1.25vw,17px);
  line-height: 1.69;
}
.guide-steps, .guide-points { padding-left: 1.38em; margin-bottom: 0; }
.guide-steps li, .guide-points li { padding-left: .26em; }
.guide-steps li + li, .guide-points li + li { margin-top: 8px; }
.guide-steps li::marker, .guide-points li::marker { color: var(--brand); font-weight: 700; }

.guide-figure {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
}
.guide-figure a { display: grid; place-items: center; position: relative; flex: 1 0 auto; }
.guide-figure a:focus-visible { outline-offset: -4px; }
.guide-figure img {
  display: block;
  width: 100%;
  height: clamp(205px,26vw,322px);
  object-fit: contain;
}
.guide-figure-wide img { object-fit: cover; }
.guide-figure-diagram img { height: auto; }
.guide-figure figcaption {
  padding: 12px 15px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.guide-enlarge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #a5b6ba;
  border-radius: 4px;
  background: #fff;
  color: var(--brand);
  font-size: 20px;
  line-height: 1;
}
.guide-figure a:hover .guide-enlarge { background: var(--brand); color: #fff; border-color: var(--brand); }
.guide-figures { margin-top: 22px; }
.guide-figures-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.guide-figures-pair img { height: clamp(172px,22vw,248px); }

.guide-table-scroll { margin-top: 21px; overflow-x: auto; border: 1px solid var(--line); border-radius: 5px; }
.guide-table-scroll:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.guide-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; line-height: 1.5; }
.guide-table-wide .guide-table { min-width: 520px; }
.guide-table :is(th,td) { padding: 11px 15px; vertical-align: top; overflow-wrap: anywhere; }
.guide-table thead { background: var(--brand-hover); color: #fff; }
.guide-table tbody th { color: var(--ink); font-weight: 650; }
.guide-table tbody td { color: #34464d; }
.guide-table tbody tr:nth-child(even) { background: var(--paper); }
.guide-table tbody tr + tr { border-top: 1px solid var(--line); }
.guide-section .guide-table-hint { display: none; font-size: 13px; color: var(--muted); }
.guide-table-link { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.guide-table-link:hover, .guide-next-head .text-link:hover, .guide-action .text-link:hover { color: #79442e; }

.guide-references {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}
.guide-references h3 {
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font: 650 14px/1.4 var(--body);
  letter-spacing: 0;
}
.guide-references a, .product-guide-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 15px;
  color: var(--brand);
  font-weight: 600;
}
.guide-references a {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  font-size: 15px;
}
.guide-references a.guide-ref-with-number { grid-template-columns: minmax(0,1fr) minmax(0,12rem) auto; }
.guide-references li + li { border-top: 1px solid var(--line); }
.guide-references a:hover, .product-guide-links a:hover { background: #f0f6f7; text-decoration: underline; text-underline-offset: 3px; }
.guide-references a:focus-visible { outline-offset: -3px; }
.guide-references code {
  color: var(--ink);
  font: 650 14px/1.4 var(--body);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.guide-arrow { flex: 0 0 auto; color: var(--brand); font-size: 19px; line-height: 1; }

.guide-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-top: clamp(40px,5vw,68px);
  padding: clamp(21px,3.75vw,39px);
  background: #e4eef0;
  border: 1px solid #c7d9de;
  border-left: 3px solid var(--brand);
  border-radius: 5px;
}
.guide-action h2, .guide-next h2, .resource-topic h2 { font-size: clamp(24px,3vw,33px); }
.guide-action p { margin-top: 9px; color: #34464d; font-size: 16px; }
.guide-action-links { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 0 0 auto; }
.guide-action-links .text-link, .guide-next-head .text-link { text-decoration: underline; text-underline-offset: 3px; }
.guide-next { margin-top: clamp(33px,4vw,52px); }
.guide-next-head { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin-bottom: 16px; }

.resource-library-head {
  grid-template-columns: minmax(0,1fr) minmax(218px,320px);
  gap: 26px clamp(26px,4vw,62px);
  align-items: center;
  padding: clamp(27px,4vw,55px);
}
.resource-library-head h1 { max-width: 21ch; }
.resource-library-head a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 3px;
  border-bottom: 1px solid #ffffff50;
  color: #f4fafb;
  font-size: 15px;
  font-weight: 600;
}
.resource-library-head a span { color: #f5b999; font-size: 18px; }
.resource-library-head a:hover { text-decoration: underline; text-underline-offset: 4px; }
.resource-topic { margin-top: clamp(30px,4vw,47px); }
.resource-topic h2 { margin-bottom: 15px; }
.guide-tiles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.home-guide-tiles { grid-template-columns: repeat(3,minmax(0,1fr)); }
.guide-tile {
  display: grid;
  grid-template-columns: minmax(0,.42fr) minmax(0,1fr) auto;
  align-items: center;
  min-height: 148px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  overflow: hidden;
}
.guide-tile-visual { position: relative; align-self: stretch; background: #fff; border-right: 1px solid var(--line); }
.guide-tile-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; padding: 9px; }
.guide-tile-copy { padding: 16px clamp(13px,2vw,24px); }
.guide-tile h3 { font-size: clamp(19px,2vw,24px); line-height: 1.2; }
.guide-tile p { margin-top: 7px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.guide-tile .guide-arrow { margin-inline-end: 16px; }
.guide-tile:hover { border-color: #7c9ca4; background: #eaf3f4; }
.guide-tile:hover h3 { text-decoration: underline; text-underline-offset: 4px; color: var(--brand); }

.product-guide-links {
  margin: -18px 0 48px;
  padding: 16px 19px 7px;
  max-width: 820px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.product-guide-links h2 { font-size: 22px; }
.product-guide-links ul { margin-top: 9px; }
.product-guide-links li + li { border-top: 1px solid var(--line); }
.product-guide-links a { padding-inline: 0; }
.product-guide-links small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 400; }

@media (max-width: 880px) {
  .home-guide-tiles { grid-template-columns: minmax(0,1fr); }
  .guide-reading { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .guide-toc { grid-column: 1; grid-row: auto; position: static; }
  .guide-toc ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 8px; }
  .guide-toc li + li { border-top: 0; }
  .guide-toc li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .guide-toc a { min-height: 42px; display: flex; align-items: center; }
  .guide-copy { grid-row: auto; }
}
@media (max-width: 650px) {
  .guide-cover, .resource-library-head, .guide-tiles { grid-template-columns: minmax(0,1fr); }
  .guide-page .breadcrumb, .resource-library .breadcrumb { padding-top: 18px; margin-bottom: 18px; }
  .guide-cover-copy { padding: 22px 19px; }
  .guide-cover h1 { font-size: clamp(30px,7vw,42px); }
  .guide-topic { margin-bottom: 12px; }
  .guide-intro, .resource-library-head p { margin-top: 12px; }
  .guide-cover > .guide-figure img { height: clamp(190px,54vw,265px); }
  .guide-cover > .guide-figure-wide img { height: clamp(154px,46vw,245px); }
  .resource-library-head { gap: 17px; padding: 25px 20px 21px; }
  .guide-toc { padding-inline: 10px; }
  .guide-table :is(th,td) { padding: 9px 10px; }
  .guide-references a.guide-ref-with-number { grid-template-columns: minmax(0,1fr) auto; row-gap: 3px; }
  .guide-ref-with-number code { grid-column: 1; grid-row: 2; }
  .guide-ref-with-number .guide-arrow { grid-column: 2; grid-row: 1 / 3; }
  .guide-action { flex-direction: column; align-items: stretch; gap: 15px; }
  .guide-action-links { align-items: stretch; text-align: center; }
  .guide-tile { min-height: 128px; }
  .guide-tiles { gap: 10px; }
  .guide-figures-pair { grid-template-columns: minmax(0,1fr); }
  .guide-figures-pair img { height: clamp(190px,58vw,260px); }
}
@media (max-width: 554px) {
  .guide-section .guide-table-hint { display: block; margin-top: 14px; }
  .guide-table-hint + .guide-table-scroll { margin-top: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.guide-article, .resource-library) { scroll-behavior: auto; }
}
