/* murdenihcam USR machines */
:root {
  /* Sampled from the machines' web logos */
  --lcd-red: #cd2824;
  --lcd-ink: #000000;

  --text: #111111;
  --muted: #3d3f42;
  --line: rgba(0, 0, 0, 0.22);
  --plate: rgba(255, 255, 255, 0.38);
  --link: #8f1714;
  --pixel: "Silkscreen", "VT323", ui-monospace, "Courier New", monospace;
  --mono: "VT323", ui-monospace, "Courier New", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 16px/1.55 var(--sans);
  background: #c9cbcd; /* light grey, aluminium-coloured */
}
a { color: var(--link); }
a:hover { color: #000; }
code { font-family: var(--mono); font-size: 1.15em; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-head, .site-foot { max-width: 1440px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.site-head { padding-top: 40px; padding-bottom: 8px; }
.wordmark { margin: 0; line-height: 0; display: flex; justify-content: center; }
.wordmark img {
  display: block;
  width: 672px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 168 / 33;
  /* red behind the SVG, so when a phone scales it by an odd amount the edge pixels never show the page through */
  background-color: var(--lcd-red);
  box-shadow: 0 0 0 3px #000, 0 4px 10px rgba(0,0,0,0.22);
}
.lede { max-width: 62ch; color: var(--muted); font-size: 17px; margin: 22px 0 24px; }

.site-head { text-align: center; }
.lede, .install, .terms { margin-left: auto; margin-right: auto; }
.install { border-top: 2px solid #000; padding-top: 14px; max-width: 820px; }
.install ol { list-style-position: inside; padding-left: 0 !important; }
.lede-ask { margin-top: -12px; color: #000; }
.lede-talk { margin-top: -14px; font-size: 15px; }
.site-foot { text-align: center; }
.terms { max-width: 820px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; color: var(--muted); }
.terms p { margin: 0 0 8px; }
.terms b { color: #000; }
.install h2 { font: 400 20px/1 var(--pixel); margin: 0 0 10px; }
.install ol { margin: 0 0 12px; padding-left: 22px; }
.install li { margin: 4px 0; }
.install .note { color: var(--muted); font-size: 14px; margin: 0; }

/* Section nav and grouped grids */
.machines { max-width: 1440px; margin: 0 auto; padding: 0 16px 48px; }
.section-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; }
.section-nav a {
  font: 400 14px/1 var(--pixel);
  color: #000;
  text-decoration: none;
  border: 2px solid #000;
  background: var(--plate);
  padding: 8px 10px;
}
.section-nav a:hover, .section-nav a:focus-visible { background: var(--lcd-red); }
.section-nav a.is-active { background: #000; color: #fff; }
.section-nav a.is-active .count { opacity: 0.8; }
.machine-section[hidden] { display: none; }
.section-nav .count { margin-left: 6px; opacity: 0.6; }
.machine-section { padding-top: 28px; scroll-margin-top: 8px; }
.section-head { font: 400 24px/1 var(--pixel); margin: 0 0 6px; }
.section-head::before { content: ""; display: inline-block; width: 14px; height: 14px; background: var(--lcd-red); border: 2px solid #000; margin-right: 10px; vertical-align: -1px; }
.section-sub { color: var(--muted); font-size: 15px; margin: 0 0 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 20px;
}
.card {
  background: var(--plate);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 3px 8px rgba(0,0,0,0.16);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-name { margin: 0; font: 400 21px/1.25 var(--pixel); min-width: 0; }
.card-name .nb { white-space: nowrap; }
.card-ver { font: 20px/1 var(--mono); color: var(--muted); flex: none; }

/* Square brackets drawn as boxes: full cap height plus a pixel above and below, 2px ticks */
.brk {
  display: inline-block;
  position: relative;
  width: 0.36em;
  height: calc(0.78em + 4px);
  vertical-align: -0.12em;
  border: 2px solid currentColor;
  margin: 0 0.06em;
}
.brk-l { border-right: 0; }
.brk-r { border-left: 0; }

/* Pixel LCD */
.lcd-wrap {
  background: #000;
  padding: 4px;
  width: fit-content;
  margin: 0 auto;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px #333, 0 1px 0 rgba(255,255,255,0.7);
  display: flex;
  justify-content: center;
}
.lcd {
  display: block;
  width: 384px;
  height: 192px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.card-desc { margin: 0; font-size: 15.5px; }

.demo { margin: 0; display: grid; gap: 4px; }
.demo figcaption { font: 400 12px/1 var(--pixel); }
.demo audio { width: 100%; height: 36px; }

/* Parameter notes */
.params { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.params div { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.params dt { font: 400 13px/1.5 var(--pixel); }
.params dd { margin: 0; font-size: 14px; line-height: 1.45; }

.aware {
  border: 2px solid #000;
  background: rgba(255,255,255,0.45);
  padding: 8px 12px;
}
.aware h4 { margin: 0 0 4px; font: 400 13px/1.2 var(--pixel); }
.aware ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.aware li { margin: 3px 0; }

.sub { margin: 4px 0 -6px; font: 400 13px/1 var(--pixel); }
.tracks-wrap { display: grid; gap: 8px; }
.tracks-wrap .sub { margin: 4px 0 0; }
.tracks-cap { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.tracks div { border: 1px solid var(--line); background: rgba(255,255,255,0.35); padding: 5px 8px; }
.tracks dt { font: 400 11px/1 var(--pixel); margin-bottom: 3px; }
.tracks dd { margin: 0; font: 18px/1 var(--mono); }
.tracks small { display: block; font: 13px/1.3 var(--sans); color: var(--muted); margin-top: 2px; }

/* Downloads */
.downloads { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dl {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
  color: var(--text);
  text-decoration: none;
}
.dl:hover, .dl:focus-visible { border-color: #000; color: var(--text); background: #fff; }
.dl:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.dl-logo { width: 48px; height: 36px; image-rendering: pixelated; flex: none; }
.dl-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.dl-text b { font: 400 14px/1.2 var(--pixel); }
.dl-meta { font-size: 13px; color: var(--muted); }
.dl-meta i { font-style: italic; }
.dl-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font: 400 12px/1 var(--pixel);
  background: #000; color: #fff;
  padding: 7px 10px;
  border-radius: 3px;
  box-shadow: 0 2px 0 var(--lcd-red);
}
.dl-btn svg { fill: currentColor; }
.dl:hover .dl-btn, .dl:focus-visible .dl-btn { background: var(--lcd-red); color: #000; box-shadow: 0 2px 0 #000; }

.site-foot { padding-bottom: 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.nojs { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

@media (max-width: 480px) {
  .params div { grid-template-columns: 46px 1fr; }
  .card { padding: 12px; }
}
.nowrap { white-space: nowrap; }

/* How to install: keep each step on one line wherever the screen is wide enough */
.install { max-width: 980px; }
@media (min-width: 900px) {
  .install ol li { white-space: nowrap; }
}
