:root {
  --blue: #0038b8;
  --blue-dark: #00277f;
  --ink: #172033;
  --muted: #5d6b83;
  --line: #d8e0eb;
  --panel: #f5f7fa;
  --warm: #fff8e8;
  color-scheme: light;
  font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  scroll-behavior: smooth;
}

@media screen and (min-width: 1100px) {
  :root { zoom: 0.85; }
}

* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; background: #fff; color: var(--ink); font-size: 16px; line-height: 1.55; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: #245dd2; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  min-height: 60px;
  padding: 0 3rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.brand, .topbar nav, .back-link { display: flex; align-items: center; }
.brand { gap: 0.55rem; color: var(--ink); font-weight: 700; }
.brand img { width: 28px; height: 28px; }
.topbar nav { justify-content: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
.topbar nav a, .back-link { color: #4c5a70; font-size: 0.875rem; font-weight: 700; }
.topbar nav a:hover, .back-link:hover { color: var(--blue); }

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

.hero {
  padding: clamp(2.8rem, 5vw, 4.5rem) 0 clamp(2rem, 3vw, 3rem);
}
.hero > div { max-width: 920px; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0.8rem; font-size: clamp(2.6rem, 4vw, 3.6rem); line-height: 1.12; letter-spacing: -0.02em; }
.order-actions, .firmware-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 0.9rem;
  border: 1px solid var(--blue);
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 700;
}
.button span { font-size: 0.8rem; font-weight: 600; opacity: 0.78; }
.button--primary { background: var(--blue); color: #fff; }
.button--primary:hover { background: var(--blue-dark); color: #fff; }
.button--dark { border-color: var(--ink); background: var(--ink); color: #fff; }
.button--dark:hover { background: #28344a; color: #fff; }
.button--secondary { background: #fff; color: var(--blue); }

.build-flow { margin: 0; padding: 0; list-style: none; }
.flow-step {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  position: relative;
  scroll-margin-top: 76px;
}
.flow-step:not(:last-child)::before { position: absolute; top: 54px; bottom: -12px; left: 25px; width: 2px; background: #b8c6dc; content: ""; }
.flow-marker { position: relative; z-index: 1; display: grid; width: 52px; height: 52px; place-items: center; border: 2px solid var(--blue); border-radius: 50%; background: #fff; color: var(--blue); font-size: 0.85rem; font-weight: 700; }
.flow-step > section { min-width: 0; padding: 0 0 clamp(3rem, 5vw, 5rem); }

.step-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: start; margin-bottom: 0.45rem; }
h2 { margin-bottom: 0.85rem; font-size: clamp(1.75rem, 2.5vw, 2.45rem); line-height: 1.28; letter-spacing: -0.025em; }
.pcb-description { max-width: 930px; margin-bottom: 1rem; color: var(--muted); font-size: 0.95rem; }
.order-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin: 0; padding: 0; list-style: none; }
.order-guide > li { min-width: 0; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.guide-copy { display: grid; grid-template-columns: 1.8rem 1fr; gap: 0.55rem; min-height: 96px; padding: 0.75rem; }
.guide-copy b { display: grid; width: 1.7rem; height: 1.7rem; place-items: center; background: var(--blue); color: #fff; font-size: 0.8rem; }
.guide-copy span { color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
.guide-copy strong { display: block; margin-bottom: 0.1rem; color: var(--ink); font-size: 0.95rem; }
.order-guide img { display: block; width: 100%; height: 320px; border-top: 1px solid var(--line); background: #eef1f5; object-fit: contain; }

.bom-list { display: grid; gap: 0.65rem; }
.bom-list details { border: 1px solid var(--line); background: #fff; }
.bom-list summary { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1rem; cursor: pointer; list-style: none; }
.bom-list summary::-webkit-details-marker { display: none; }
.bom-list summary span:first-child { display: flex; flex-direction: column; }
.bom-list summary b { font-size: 1rem; }
.bom-list summary small { color: var(--muted); font-size: 0.875rem; }
.expand-label { flex: 0 0 auto; padding: 0.35rem 0; color: var(--blue); font-size: 1rem; font-weight: 800; line-height: 1.2; }
.expand-label::after { content: " +"; }
details[open] .expand-label::after { content: " −"; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.65rem 0.85rem; border-bottom: 1px solid #e7ebf1; text-align: left; vertical-align: top; }
th { background: var(--panel); color: #46546b; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
th:nth-child(2), td:nth-child(2) { width: 110px; white-space: nowrap; }
td:last-child { color: var(--muted); }
.bom-category th { padding-top: 0.8rem; padding-bottom: 0.55rem; background: #eaf0fa; color: var(--blue-dark); font-size: 0.85rem; }
.table-wrap td:first-child a { font-weight: 700; }
.bom-note { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.875rem; }

.order-actions, .firmware-actions { justify-content: flex-end; }
.order-actions .button, .firmware-actions .button { min-height: 40px; }
.print-guide { display: grid; grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr); gap: 0.8rem; margin-top: 1rem; }
.print-guide > * { min-width: 0; margin: 0; border: 1px solid var(--line); background: var(--panel); }
.print-settings { padding: 1rem; }
.print-settings h3 { margin-bottom: 0.7rem; font-size: 1.1rem; }
.print-settings dl { margin: 0; }
.print-settings dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.print-settings dt { color: var(--muted); }
.print-settings dd { margin: 0; font-weight: 700; text-align: right; }
.finger-mark-guide img { display: block; width: 100%; height: auto; }
.finger-mark-guide figcaption { padding: 0.75rem 0.9rem; color: var(--muted); font-size: 0.9rem; }
.firmware-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.firmware-grid article { min-width: 0; padding: 1rem; border: 1px solid var(--line); background: var(--panel); }
.firmware-grid h3 { margin-bottom: 0.6rem; font-size: 1.1rem; }
.firmware-grid h3 span { margin-right: 0.45rem; color: var(--blue); }
.firmware-grid article > p { margin-bottom: 0.7rem; color: #4f5c70; font-size: 0.9rem; }
.firmware-grid ol { margin: 0; padding-left: 1.2rem; color: #4f5c70; font-size: 0.9rem; }
.firmware-grid li + li { margin-top: 0.42rem; }
pre { margin: 0.8rem 0 0; padding: 0.8rem; overflow-x: auto; background: #111827; color: #eff4ff; font-size: 0.82rem; line-height: 1.55; }
.safety { margin: 0.75rem 0 0; padding: 0.65rem 0.75rem; border-left: 3px solid #d19114; background: var(--warm); color: #665327; font-size: 0.875rem; }
.checksum { display: flex; gap: 0.6rem; margin: 0.7rem 0 0; color: var(--muted); font-size: 0.8rem; }
.checksum code { overflow-wrap: anywhere; }

footer { display: flex; justify-content: space-between; gap: 2rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }
footer p { max-width: 1020px; margin-bottom: 0; }
footer > a { flex: 0 0 auto; font-weight: 700; }

@media screen and (max-width: 1080px) {
  .topbar { grid-template-columns: 1fr auto; padding-inline: 1.5rem; }
  .topbar nav { display: none; }
  main, footer { width: min(calc(100% - 2.5rem), 1380px); }
  .step-heading { flex-direction: column; gap: 0.7rem; }
  .order-actions, .firmware-actions { justify-content: flex-start; }
}

@media screen and (max-width: 680px) {
  .topbar { min-height: 56px; padding-inline: 0.8rem; }
  .brand span { font-size: 0.9rem; }
  .back-link { font-size: 0.8rem; }
  main, footer { width: min(calc(100% - 1.2rem), 1380px); }
  .hero { padding-top: 2.6rem; }
  h1 { max-width: 100%; font-size: clamp(2.4rem, 10vw, 2.9rem); overflow-wrap: anywhere; }
  .flow-step { grid-template-columns: 42px minmax(0, 1fr); }
  .flow-step:not(:last-child)::before { left: 16px; }
  .flow-marker { width: 34px; height: 34px; font-size: 0.75rem; }
  h2 { max-width: 100%; font-size: clamp(1.75rem, 8vw, 2.25rem); 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; }
  .order-actions, .firmware-actions { width: 100%; }
  .order-actions .button:first-child, .firmware-actions .button:first-child { width: 100%; }
  .bom-list summary small { display: none; }
  .checksum { display: block; }
  footer { flex-direction: column; gap: 0.5rem; }
}
