.hardware-page {
  background: #fff;
}

.hardware-container {
  width: min(960px, calc(100% - 3rem));
  margin-inline: auto;
}

.hardware-page a {
  color: #187879;
}

.hardware-page a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.hardware-page a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 5px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: .75rem 1rem;
  background: white;
}

.skip-link:focus {
  top: 1rem;
}

.hardware-nav {
  border-bottom: 1px solid var(--line);
}

.hardware-nav > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  font-size: .85rem;
}

.hardware-page .hardware-brand {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.04em;
}

.hardware-intro {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 3rem;
  padding-block: 3.5rem 2.5rem;
}

.hardware-intro h1 {
  margin: .75rem 0 1rem;
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.35rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.hardware-lead {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hardware-overview {
  margin: 0;
}

.hardware-overview img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: contain;
}

.hardware-overview figcaption {
  margin-top: .65rem;
  color: var(--muted);
  font-size: .72rem;
  text-align: center;
}

.hardware-page h2 {
  margin: .5rem 0 0;
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.document-preview {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.document-preview summary {
  padding: 1.2rem 1.4rem;
  background: var(--wash);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.document-preview summary span {
  display: inline-block;
  margin-left: .7rem;
  font-size: .75rem;
  font-weight: 400;
  color: var(--muted);
}

.document-preview summary:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: -3px;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  padding: 1rem 1.4rem;
  font-size: .8rem;
  line-height: 1.7;
}

.preview-toolbar p {
  flex: 1 1 22rem;
  color: var(--muted);
}

.preview-toolbar a {
  flex-shrink: 0;
  font-weight: 600;
}

.document-preview iframe {
  display: block;
  width: 100%;
  height: 720px;
  max-height: 85vh;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--wash);
}

/* Keep the anchored YAM rows in view instead of showing the handheld rows above. */
.document-preview.yam-preview iframe {
  height: 420px;
}

.sheet-zoom {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--ink);
  font-weight: 600;
}

.sheet-zoom select {
  padding: .35rem .55rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.sheet-zoom select:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.sheet-viewport {
  --sheet-zoom: 1;
  --sheet-height: min(720px, 85vh);
  height: var(--sheet-height);
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.document-preview .sheet-viewport iframe {
  width: calc(100% / var(--sheet-zoom));
  height: calc(var(--sheet-height) / var(--sheet-zoom));
  max-height: none;
  border-top: 0;
  transform: scale(var(--sheet-zoom));
  transform-origin: top left;
}

.yam-preview .sheet-viewport {
  --sheet-height: min(calc(420px * var(--sheet-zoom)), 85vh);
}

.hardware-footer {
  padding-inline: 0;
}

.hardware-footer > div, .hardware-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.hardware-footer .hardware-attribution {
  display: block;
  margin-top: 1rem;
  text-align: center;
}

@media screen and (max-width: 768px) {
  .hardware-intro {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding-top: 2.5rem;
  }

  .hardware-overview img {
    height: 260px;
  }

  .document-preview summary span {
    display: block;
    margin: .35rem 0 0 1.1rem;
  }

  .document-preview iframe {
    height: 580px;
  }

  .sheet-viewport {
    --sheet-height: min(580px, 85vh);
  }

  .yam-preview .sheet-viewport {
    --sheet-height: min(calc(420px * var(--sheet-zoom)), 85vh);
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

}

.build-nav {
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--wash);
}

.build-nav h2 {
  margin: 0 0 .4rem;
  font-size: 1.2rem;
}

.build-nav ol {
  margin: 0;
  padding-left: 1.5rem;
  list-style: decimal;
}

.build-nav li::marker {
  color: var(--teal);
  font-weight: 700;
}

.build-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 38px;
  padding: .35rem .4rem;
  border-radius: 4px;
  font-size: .9rem;
  font-weight: 600;
}

.build-nav a:hover {
  background: #fff;
}

.build-nav-extra {
  margin-top: .35rem;
  padding-top: .35rem;
  border-top: 1px solid var(--line);
}

.build-section {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
}

.build-section > .section-kicker {
  font-size: .85rem;
}

.build-copy,
.build-subsection > p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.8;
}

.build-copy p + p,
.build-copy ul + p {
  margin-top: .75rem;
}

.build-copy ol,
.build-copy ul {
  padding-left: 1.4rem;
}

.build-copy ul {
  list-style: disc;
  margin-top: .75rem;
}

.build-copy code {
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: .85em;
  overflow-wrap: anywhere;
}

.build-copy li + li {
  margin-top: .6rem;
}

.build-links {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1.5rem;
  margin-block: 1.25rem;
  font-size: .9rem;
  font-weight: 600;
}

.build-subsection {
  margin-top: 2rem;
}

.build-subsection h3 {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -.02em;
}
