.nut-page {
  width: min(1280px, calc(100% - 2 * clamp(18px, 4vw, 54px)));
  margin-inline: auto;
}

.nut-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  padding-block: clamp(26px, 4vw, 52px) 24px;
}
.nut-page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4.25vw, 54px);
  line-height: 1.22;
  letter-spacing: -.025em;
}
.nut-page-hero p { max-width: 33em; margin: 0; color: var(--muted); }
.nut-hero-media {
  overflow: hidden;
  border-radius: 8px;
  background: #e1e8e6;
}
.nut-hero-media img {
  display: block;
  width: 100%;
  height: auto;
}

.nut-page-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}
.nut-page-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 48px;
  padding: 8px clamp(11px, 1.6vw, 20px);
  background: #f5f8f6;
  color: var(--ink);
  font-weight: 700;
}
.nut-page-nav a:hover,
.nut-page-nav a:focus-visible { background: #e9f1ed; }
.nut-page-nav a:focus-visible { outline-offset: -4px; }
.nut-page-nav span,
.nut-page-link { color: #963d20; }
.nut-page-link { font-size: 14px; font-weight: 700; }
.nut-page-link:hover { text-decoration: underline; }

.nut-page > .product-section {
  margin: 0;
  padding-block: clamp(28px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
}
.nut-page .section-title { margin-bottom: clamp(16px, 2vw, 25px); }
.nut-page .type-choice[aria-pressed="true"] {
  border-color: #285a63;
  background: #e8f2f0;
}
.nut-stock-detail {
  margin-top: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: clamp(12px, 2vw, 23px);
  background: #f5f8f7;
}
.nut-stock-detail-head,
.nut-download-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 14px;
}
.nut-stock-detail-head #typeHeading { margin: 0; }
.nut-stock-detail .nut-filters { margin-block: 14px; }
.nut-stock-detail .nut-filters .secondary { margin: 0; }
.nut-stock-detail .nut-detail { background: #fff; }
.nut-stock-detail .nut-list { max-height: min(560px, 66vh); }
.nut-stock-detail #previewHandField { max-width: 210px; margin: 8px 20px 0; }
.nut-stock-detail .download-buttons { flex-wrap: wrap; }

.nut-custom-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  align-items: center;
  gap: clamp(16px, 3vw, 42px);
  margin-bottom: clamp(17px, 2.8vw, 30px);
}
.nut-custom-intro h2 {
  margin: 0 0 9px;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.4;
}
.nut-custom-intro p { max-width: 33em; margin: 0; color: var(--muted); }
.nut-custom-intro img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 7px;
  background: #e1e8e6;
}

.nut-quote-layout {
  display: grid;
  grid-template-columns: minmax(0, .77fr) minmax(0, 1.23fr);
  gap: clamp(12px, 2vw, 24px);
}
.nut-quote-guide {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f3f7f5;
}
.nut-quote-photo {
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  background: #ced7d6;
}
.nut-quote-photo img {
  display: block;
  /* The 4:5 source becomes 5:4 after the quarter turn. */
  width: 80%;
  height: auto;
  transform: rotate(-90deg);
}
.nut-quote-guide-copy { padding: clamp(13px, 2vw, 23px); }
.nut-quote-guide h3 { margin: 0 0 7px; line-height: 1.4; }
.nut-quote-guide p { margin: 0; color: #485e64; font-size: 14px; }
.nut-quote-layout .nut-drawing-form { max-width: none; background: #f9faf9; }
.nut-quote-layout .nut-file { border-color: #b98d77; background: #fbf3eb; }
.nut-quote-layout .nut-file input {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}
.nut-file ::file-selector-button {
  margin: 0 12px 0 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  background: #a94421;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nut-file ::file-selector-button:hover { background: #8e351a; }
.nut-quote-layout label > span[aria-hidden] { color: #a94421; }

.nut-download-group {
  margin-top: 12px;
  padding: clamp(10px, 1.5vw, 18px);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.nut-download-heading h3 { margin: 0; font-size: 17px; }
.nut-page-related { padding-block: 17px 23px; flex-wrap: wrap; gap: 5px 20px; }

@media (max-width: 760px) {
  .nut-page-hero { grid-template-columns: minmax(0, 1fr); }
  .nut-page-hero p { font-size: 14px; }
  .nut-page-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); font-size: 13px; }
  .nut-stock-detail .nut-list { max-height: 330px; }
  .nut-custom-intro { grid-template-columns: minmax(0, 1fr); }
  .nut-quote-layout { grid-template-columns: minmax(0, 1fr); }
  .nut-quote-guide { grid-template-columns: 110px minmax(0, 1fr); grid-template-rows: auto; }
}
@media (max-width: 590px) {
  .nut-page #typeGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .nut-page .type-choice { padding: 8px; gap: 6px; font-size: 13px; }
  .nut-page .type-choice img { height: 92px; }
  .nut-quote-layout .nut-drawing-form { grid-template-columns: minmax(0, 1fr); }
  .nut-quote-layout .nut-drawing-form button { width: 100%; }
}
