/* sensorview.nz
   Palette from the kit itself: STOP-sign red, reflective white, the black of the hard cases,
   the aluminium of the arms. One loud device, the red/white barrier stripe under the header;
   everything else stays quiet. Type: Big Shoulders Stencil for headings (the stamp logo and the
   CREW signs are stencilled), Atkinson Hyperlegible Next for reading in a cab in daylight. */

@font-face {
  font-family: "Big Shoulders Stencil";
  src: url("/fonts/big-shoulders-stencil.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --red: #c4161c;
  --red-deep: #9b1015;
  --white: #ffffff;
  --case: #1f2328;
  --ink: #1f2328;
  --muted: #59616a;
  --alu: #e9ecef;
  --alu-line: #cbd2d8;
  --stencil: "Big Shoulders Stencil", "Arial Narrow", sans-serif;
  --text: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 40rem;
  --gutter: max(1rem, 4vw);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--text);
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--red-deep); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
p, ul, ol { margin: 0 0 1rem; }
strong { font-weight: 700; }

h1, h2 { font-family: var(--stencil); font-weight: 800; line-height: 0.98; letter-spacing: 0.005em; margin: 0 0 1rem; }
h1 { font-size: clamp(2.75rem, 1.6rem + 4.6vw, 5.25rem); }
h2 { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.75rem); }
h3 { font: 700 1.3rem/1.25 var(--text); margin: 0 0 0.4rem; }
h3 a { color: inherit; text-decoration: none; }
h3 a:hover { text-decoration: underline; }

.wrap { max-width: 74rem; margin: 0 auto; padding-inline: var(--gutter); }
.lede { font-size: 1.25rem; max-width: var(--measure); color: var(--muted); }
.small { font-size: 0.95rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--white); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.stripe { display: none; }

/* buttons */
.btn {
  display: inline-block;
  font: 700 1.05rem/1.2 var(--text);
  padding: 0.8rem 1.2rem;
  border: 2px solid var(--red);
  border-radius: 2px;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn[data-added] { background: var(--case); border-color: var(--case); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* header: the one loud thing is its bottom edge */
.site-header { background: var(--case); color: var(--white); position: relative; }
.site-header::after {
  content: "";
  display: block;
  height: 12px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 16px, var(--white) 16px 32px);
}
.bar { max-width: 74rem; margin: 0 auto; padding: 0.6rem var(--gutter); display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--white); text-decoration: none; margin-right: auto; flex-shrink: 0; }
.brand img { width: 48px; height: 48px; }
.brand span { font: 800 1.9rem/1 var(--stencil); letter-spacing: 0.01em; }
.site-header nav ul { list-style: none; margin: 0; padding: 0; }
.nav-wide { display: none; gap: 1.4rem; }
.site-header nav a { color: var(--white); text-decoration: none; font-weight: 700; font-size: 1rem; }
.site-header nav a:hover, .site-header nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.menu summary { cursor: pointer; font-weight: 700; list-style: none; padding: 0.4rem 0.2rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " ▾"; }
.menu[open] ul {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  background: var(--case); padding: 0.5rem var(--gutter) 1rem; display: grid; gap: 0.25rem;
  border-top: 1px solid #3a4048;
}
.menu[open] li a { display: block; padding: 0.5rem 0; font-size: 1.1rem; }
.quote-link {
  color: var(--white); background: var(--red); text-decoration: none; font-weight: 700;
  padding: 0.5rem 0.9rem; border-radius: 2px; white-space: nowrap; font-size: 1rem;
}
.quote-link:hover { background: var(--red-deep); }
.quote-count { margin-left: 0.4rem; background: var(--white); color: var(--red-deep); border-radius: 999px; padding: 0 0.45rem; font-size: 0.85rem; }
.site-header :focus-visible { outline-color: var(--white); }
@media (min-width: 960px) {
  .menu { display: none; }
  .nav-wide { display: flex; }
}
@media (max-width: 520px) {
  .bar { gap: 0.75rem; }
  .brand img { width: 38px; height: 38px; }
  .brand span { font-size: 1.5rem; }
  .quote-link { padding: 0.45rem 0.7rem; }
}

/* home: hero */
.hero { position: relative; background: var(--case); color: var(--white); }
.hero img { width: 100%; height: min(46vh, 440px); object-fit: cover; object-position: center 55%; }
.hero-text { padding: 2rem var(--gutter) 2.5rem; }
.hero-text p { max-width: 36rem; font-size: 1.2rem; }
.hero .btn-ghost { color: var(--white); border-color: var(--white); }
.hero .btn-ghost:hover { background: var(--white); color: var(--case); }
.hero :focus-visible { outline-color: var(--white); }
@media (min-width: 900px) {
  .hero img { height: min(82vh, 760px); }
  .hero-text {
    position: absolute; left: var(--gutter); bottom: 2.5rem; max-width: 40rem;
    background: var(--case); padding: 2rem 2.25rem 2.25rem;
  }
}

/* home: how it works */
.how { padding-block: 4rem 3rem; }
.chain { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0.5rem; }
.node { max-width: 26rem; }
.node p { color: var(--muted); }
.node-art { display: flex; align-items: flex-end; gap: 0.6rem; height: 72px; margin-bottom: 1rem; }
.node-art .arm {
  width: 92px; height: 14px; border: 2px solid var(--case);
  background: repeating-linear-gradient(-45deg, var(--red) 0 10px, var(--white) 10px 20px);
}
.node-art .box { width: 64px; height: 44px; background: var(--case); border-radius: 4px; position: relative; }
.node-art .box::after { content: ""; position: absolute; right: 10px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.node-art .phone { width: 38px; height: 68px; border: 3px solid var(--case); border-radius: 7px; background: linear-gradient(var(--alu), var(--alu)) 50% 40% / 24px 30px no-repeat; }
.link-label {
  font-size: 0.95rem; font-weight: 700; color: var(--muted); padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px dashed var(--alu-line); margin-left: 1rem;
}
@media (min-width: 900px) {
  .chain { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: start; gap: 1.5rem; }
  .link-label { border-left: 0; border-top: 3px dashed var(--alu-line); margin: 3rem 0 0; padding: 0.4rem 0 0; min-width: 6rem; text-align: center; }
}

/* home: systems */
.systems { padding-block: 2rem 4rem; }
.system { display: grid; gap: 1.5rem; padding-block: 1.5rem; border-top: 4px solid var(--case); align-items: center; }
.system img { width: 100%; }
.system-small { border-top-width: 1px; border-color: var(--alu-line); }
.system-small img { max-width: 22rem; }
@media (min-width: 900px) {
  .system { grid-template-columns: 1.25fr 1fr; gap: 3rem; }
  .system-small { grid-template-columns: 22rem 1fr; }
}
.price { font-weight: 700; font-variant-numeric: tabular-nums; margin: 0; }
.price span { font-weight: 400; color: var(--muted); font-size: 0.9em; }
.price-big { font-size: 1.6rem; margin: 0.5rem 0 1rem; }

/* home: film */
.film { background: var(--alu); padding-block: 3.5rem; }
.film-inner { display: grid; gap: 2rem; align-items: center; }
.film video { max-height: 70vh; width: auto; background: var(--case); }
@media (min-width: 760px) { .film-inner { grid-template-columns: auto 1fr; gap: 3rem; } }

.parts-teaser { padding-block: 4rem; }
.parts-teaser p { max-width: var(--measure); }
.group-links { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.group-links a { font-weight: 700; }

/* inner pages */
.page-head { padding-block: 3rem 1rem; }
.crumbs { font-size: 0.95rem; color: var(--muted); margin: 2rem 0 1rem; }

/* catalogue */
.catalogue { padding-bottom: 4rem; }
.group { padding-top: 2.5rem; }
.group h2 { border-top: 4px solid var(--case); padding-top: 1rem; }
.parts { list-style: none; padding: 0; margin: 0; }
.part {
  display: grid; grid-template-columns: 96px 1fr; gap: 0.75rem 1.25rem;
  padding-block: 1rem; border-bottom: 1px solid var(--alu-line); align-items: center;
}
.part .thumb { width: 96px; height: 72px; object-fit: cover; background: var(--alu); }
.part-text p { margin: 0; color: var(--muted); font-size: 1rem; }
.part-buy { grid-column: 2; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.part-buy .btn { padding: 0.55rem 0.9rem; font-size: 0.95rem; }
@media (min-width: 760px) {
  .part { grid-template-columns: 136px 1fr auto; }
  .part .thumb { width: 136px; height: 102px; }
  .part-buy { grid-column: auto; justify-content: flex-end; text-align: right; }
}

/* product page */
.product { padding-bottom: 4rem; }
.product-grid { display: grid; gap: 2rem; }
.gallery { display: grid; gap: 1rem; }
.gallery img { width: 100%; background: var(--alu); }
.product-text p { max-width: var(--measure); }
.buy { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; margin: 1.5rem 0 1rem; }
.buy label { width: 100%; font-weight: 700; font-size: 1rem; }
@media (min-width: 900px) { .product-grid { grid-template-columns: 1.15fr 1fr; gap: 3rem; } }
.related { margin-top: 3rem; border-top: 4px solid var(--case); padding-top: 1rem; }
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1.25rem; }
.related a { color: var(--ink); text-decoration: none; display: grid; gap: 0.3rem; }
.related a:hover span:first-of-type { text-decoration: underline; }
.related img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--alu); }
.related .price { font-weight: 400; color: var(--muted); font-size: 0.95rem; }

/* manuals */
.docs { padding-bottom: 4rem; display: grid; gap: 2.5rem; }
.doc { display: grid; gap: 1.5rem; border-top: 4px solid var(--case); padding-top: 1.5rem; align-items: start; }
.doc h2 a { color: inherit; text-decoration: none; }
.doc p { max-width: var(--measure); }
@media (min-width: 900px) { .doc { grid-template-columns: 1fr 1.2fr; gap: 2.5rem; } }
.note { background: var(--alu); padding: 1.5rem 1.75rem; }
.note h2 { font-size: 1.75rem; }

/* guide */
.guide { padding-bottom: 4rem; }
.guide-note { max-width: var(--measure); margin: 1.25rem 0 0; padding: 0.9rem 1.1rem;
  background: var(--alu); border-left: 4px solid var(--red); }
.player { margin: 2rem 0; }
.screen { background: var(--case); }
.screen video { width: 100%; aspect-ratio: 16 / 9; }
.now-title { font-weight: 700; font-size: 1.25rem; margin: 1rem 0 0.2rem; }
.now-facts { color: var(--muted); margin: 0 0 1rem; }
.controls { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.auto { display: flex; gap: 0.5rem; align-items: center; font-size: 1rem; }
.parts-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 1rem; border-top: 4px solid var(--case); padding-top: 1rem; margin-top: 2.5rem; }
.parts-head p { color: var(--muted); margin: 0; }
.guide-parts { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.75rem; }
.guide-parts button {
  width: 100%; display: grid; grid-template-columns: 160px 1fr; gap: 1rem; align-items: start;
  background: var(--white); border: 1px solid var(--alu-line); border-left: 6px solid var(--alu-line);
  padding: 0.75rem; text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.guide-parts button:hover { border-left-color: var(--case); }
.guide-parts li[aria-current="true"] button { border-left-color: var(--red); background: var(--alu); }
.guide-parts .thumb { position: relative; }
.guide-parts .thumb img { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; }
.guide-parts .num { position: absolute; left: 0; top: 0; background: var(--case); color: var(--white); font: 800 1.4rem/1 var(--stencil); padding: 0.25rem 0.5rem; }
.guide-parts h3 { font-size: 1.15rem; }
.guide-parts p { margin: 0 0 0.4rem; color: var(--muted); font-size: 1rem; }
.guide-parts .facts { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; font-size: 0.9rem; color: var(--muted); }
.chip { font-weight: 700; color: var(--ink); }
.chip.playing { color: var(--red-deep); }
@media (max-width: 560px) { .guide-parts button { grid-template-columns: 1fr; } .guide-parts .thumb img { width: 100%; } }
.downloads { display: grid; gap: 0.75rem; margin: 2rem 0 1rem; }
.downloads a { font-weight: 700; }
.downloads span { font-weight: 400; color: var(--muted); margin-left: 0.5rem; }

/* app */
.app { padding-bottom: 4rem; }
.app-head { display: grid; gap: 2rem; padding-top: 3rem; align-items: center; }
@media (min-width: 960px) { .app-head { grid-template-columns: 1fr 1.3fr; } }
.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.stores img { height: 50px; width: auto; }
.app-body { display: grid; gap: 0 3rem; margin-top: 2.5rem; }
@media (min-width: 960px) { .app-body { grid-template-columns: 1fr 1fr; } }
.app-body section { border-top: 4px solid var(--case); padding-top: 1rem; margin-top: 1.5rem; }
.app-body h2 { font-size: 2rem; }
.facts, .steps { padding-left: 1.25rem; }
.facts li, .steps li { margin-bottom: 0.6rem; }
.facts li::marker { color: var(--red); }

/* prose: about, support, legal */
.prose { max-width: 48rem; padding-block: 3rem 4rem; }
.prose h2 { font-size: 1.9rem; margin-top: 2.5rem; }
.prose p, .prose li { max-width: var(--measure); }
.legal .prose { font-size: 1.05rem; }
.legal .prose h2 { font-size: 1.6rem; }

/* contact */
.contact { display: grid; gap: 2rem; padding-block: 3rem 4rem; }
@media (min-width: 960px) { .contact { grid-template-columns: 1fr 1.4fr; gap: 4rem; } }
.form label { display: block; font-weight: 700; margin: 1rem 0 0.35rem; font-size: 1rem; }
.form input, .form textarea, .buy input {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 0.6rem 0.7rem;
  border: 2px solid var(--case); border-radius: 2px; background: var(--white); color: var(--ink);
}
.form textarea { resize: vertical; }
.buy input { width: 6rem; }
.form .btn { margin-top: 1.5rem; }
.two { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
.hp { position: absolute; left: -9999px; }
.quote-list { background: var(--alu); padding: 1rem 1.25rem; margin-bottom: 0.5rem; }
.quote-list h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.quote-list ul { list-style: none; padding: 0; margin: 0 0 0.5rem; }
.quote-list li { display: grid; grid-template-columns: 1fr 5rem auto; gap: 0.75rem; align-items: center; padding-block: 0.4rem; border-bottom: 1px solid var(--alu-line); }
.quote-list li input { width: 5rem; padding: 0.35rem 0.5rem; }
.quote-list button { background: none; border: 0; color: var(--red-deep); font: inherit; text-decoration: underline; cursor: pointer; padding: 0.25rem; }

/* footer */
.site-footer { background: var(--case); color: #d9dde1; padding: 3rem var(--gutter) 2rem; }
.site-footer .cols { max-width: 74rem; margin: 0 auto; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.site-footer h2 { font: 700 1rem/1.3 var(--text); color: var(--white); margin-bottom: 0.6rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer a { color: var(--white); }
.site-footer :focus-visible { outline-color: var(--white); }
.foot-brand { font: 800 2rem/1 var(--stencil); color: var(--white); }
.site-footer .small { color: #aeb5bc; }
.copy { max-width: 74rem; margin: 2rem auto 0; font-size: 0.9rem; color: #aeb5bc; }

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

/* The app guide on /app (build.py app_guide_section): the video, its chapters, the PDFs. */
.app-guide { border-top: 4px solid var(--case); padding-top: 1rem; margin-top: 2.5rem; }
.app-guide h2 { font-size: 2rem; }
.app-guide .screen video.portrait { aspect-ratio: 9 / 16; max-height: 80vh; display: block; margin: 0 auto; }
.chapters { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.4rem; }
@media (min-width: 720px) { .chapters { grid-template-columns: repeat(2, 1fr); } }
.chapters button { font: inherit; font-weight: 700; background: none; border: 0; padding: 0.2rem 0; color: inherit;
  text-decoration: underline; cursor: pointer; text-align: left; }
.chapters span { color: var(--muted); margin-left: 0.4rem; }
