/* Hardware page. Loaded after ../static/css/base.css: the same bar, type and
   palette as the project page, with quiet grey panels instead of boxed
   borders. Nothing animates. */

/* Step links in the bar ---------------------------------------------------- */

.bar-steps {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.75rem);
}

.bar-steps a {
  color: var(--muted-dark);
  font-size: 14px;
  font-weight: 500;
}

.bar-steps a:hover {
  color: #fff;
  text-decoration: none;
}

/* Opening: a short black band that eases into the white page -------------- */

.hw-hero {
  padding: clamp(48px, 9vh, 96px) 32px clamp(110px, 15vh, 150px);
  background: linear-gradient(
    180deg,
    #000 0%,
    #000 calc(100% - 110px),
    #1a1a1a calc(100% - 88px),
    #5a5a5a calc(100% - 66px),
    #a5a5a5 calc(100% - 44px),
    #e4e4e4 calc(100% - 22px),
    #fff 100%
  );
}

.hw-hero h1 {
  max-width: 1180px;
  margin: 0 auto;
  color: #fff;
  font-size: clamp(44px, 5.2vw, 88px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

main,
footer {
  width: min(calc(100% - 4rem), 1180px);
  margin-inline: auto;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

/* Buttons as pills: dark for downloads, outlined for the way out ---------- */

.order-actions,
.firmware-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  padding: 11px 18px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.button:hover {
  text-decoration: none;
}

.button--primary {
  background: var(--ink);
  color: #fff;
}

.button--primary:hover {
  background: #000;
  color: #fff;
}

.button--secondary {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.button--secondary:hover {
  background: var(--panel);
  color: var(--ink);
}

/* Build steps -------------------------------------------------------------- */

.build-flow {
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  scroll-margin-top: calc(var(--bar-h) + 16px);
}

.flow-step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 52px;
  bottom: 4px;
  left: 21px;
  width: 2px;
  background: #e5e5ea;
}

.flow-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.flow-step > section {
  min-width: 0;
  padding: 0 0 clamp(3rem, 6vw, 5rem);
}

.step-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 12px;
}

h2 {
  margin-bottom: 0;
  padding-top: 4px;
  color: var(--heading);
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.pcb-description {
  max-width: var(--column);
  margin-bottom: 20px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
}

/* Panels: grey, rounded, no borders. */

.order-guide > li,
.bom-list details,
.print-guide > *,
.firmware-grid article {
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--panel);
}

.order-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-copy {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  min-height: 92px;
  padding: 16px 18px;
}

.guide-copy b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.guide-copy span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.guide-copy strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.order-guide img {
  width: 100%;
  height: 300px;
  padding: 0 12px 12px;
  object-fit: contain;
}

/* Bill of materials */

.bom-list {
  display: grid;
  gap: 12px;
}

.bom-list summary {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}

.bom-list summary::-webkit-details-marker {
  display: none;
}

.bom-list summary span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bom-list summary b {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.bom-list summary small {
  color: var(--muted);
  font-size: 14px;
}

.expand-label {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 980px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.expand-label::after {
  content: " +";
}

details[open] .expand-label::after {
  content: " −";
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  box-shadow: inset 0 1px 0 var(--hair);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--hair);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

th:nth-child(2),
td:nth-child(2) {
  width: 120px;
  white-space: nowrap;
}

td:last-child {
  color: var(--muted);
}

.bom-category th {
  padding-top: 20px;
  padding-bottom: 8px;
  background: #fff;
  color: var(--accent-deep);
  font-size: 13px;
}

.table-wrap td:first-child a {
  font-weight: 600;
}

/* Print and firmware */

.print-guide {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr);
  align-items: start;
  gap: 16px;
  margin-top: 4px;
}

.print-guide > * {
  margin: 0;
}

.print-settings {
  padding: 20px;
}

.print-settings h3,
.firmware-grid h3 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.print-settings dl {
  margin: 0;
}

.print-settings dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 10px 0;
  border-top: 1px solid var(--hair);
}

.print-settings dt {
  color: var(--muted);
}

.print-settings dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.finger-mark-guide img {
  width: 100%;
  background: #fff;
}

.finger-mark-guide figcaption {
  padding: 14px 18px;
  color: var(--muted);
  font-size: 15px;
}

.firmware-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.firmware-grid article {
  padding: 20px;
}

.firmware-grid h3 span {
  margin-right: 6px;
  color: var(--accent-deep);
}

.firmware-grid article > p,
.firmware-grid ol {
  color: var(--text);
  font-size: 15px;
}

.firmware-grid article > p {
  margin-bottom: 12px;
}

.firmware-grid ol {
  margin: 0;
  padding-left: 1.2rem;
}

.firmware-grid li + li {
  margin-top: 6px;
}

pre {
  margin: 14px 0 0;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--ink);
  color: #f5f5f7;
  font-size: 13px;
  line-height: 1.6;
}

.safety {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff4e0;
  color: #6b4f12;
  font-size: 14px;
}

.checksum {
  display: flex;
  gap: 10px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.checksum code {
  overflow-wrap: anywhere;
}

/* Footer */

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 24px 0 48px;
  border-top: 2px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

footer p {
  max-width: 1020px;
  margin-bottom: 0;
}

footer > a {
  flex: 0 0 auto;
  font-weight: 600;
}

/* Narrower windows ---------------------------------------------------------- */

@media (max-width: 1080px) {
  .bar-steps {
    display: none;
  }

  .step-heading {
    flex-direction: column;
    gap: 14px;
  }

  .order-actions,
  .firmware-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .hw-hero {
    padding: 36px 16px 110px;
  }

  main,
  footer {
    width: min(calc(100% - 2rem), 1180px);
  }

  .flow-step {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .flow-step:not(:last-child)::before {
    top: 40px;
    left: 15px;
  }

  .flow-marker {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  h2 {
    padding-top: 0;
    overflow-wrap: anywhere;
  }

  .order-guide,
  .print-guide,
  .firmware-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-guide img {
    height: auto;
    max-height: 280px;
  }

  .guide-copy {
    min-height: auto;
  }

  .bom-list summary small {
    display: none;
  }

  .checksum {
    display: block;
  }

  footer {
    flex-direction: column;
    gap: 8px;
  }
}
