/* fonts, served from here. the files are variable, so one covers every weight the page uses.
   latin first; the extended file only loads for characters outside it. */
@font-face {
  font-family: "Familjen Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/familjen-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Familjen Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/familjen-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DotGothic16"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/dotgothic16-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DotGothic16"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/dotgothic16-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Doto"; font-style: normal; font-weight: 900; font-display: swap;
  src: url("/fonts/doto-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Doto"; font-style: normal; font-weight: 900; font-display: swap;
  src: url("/fonts/doto-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* layout: one aluminium instrument made of bolted panels on a 12-column grid, shot from directly above.
   one light, upper left. every shadow falls to the lower right. content only ever appears in the screen. */
:root {
  --desk: #DEDCD8;
  --desk-hi: #F0EFEC;
  --desk-lo: #C4C2BE;
  --alu: #CDCFCE;
  --alu-hi: #DFE1E0;
  --alu-lo: #BFC1C0;
  --gap: #121413;
  --ink: #1D1F1E;
  --print: #2F3231;
  --paint: #1F2120; /* the one ink: panel print and the fill in the key marks */
  --key: #F4F4F1;
  --orange: #FA4A14;
  --blue: #2A62C9;
  --green: #1B9A5C;
  --lcd-bg: #CCD2C4;
  --lcd-ink: #0D110D;
  --lcd-sh: 1px 1.5px 0 rgba(13, 17, 13, .13);

  --f-label: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-screen: "Atkinson Hyperlegible Next", "Helvetica Neue", Arial, sans-serif;
  --f-ui: "DotGothic16", "Courier New", monospace;
  --f-mono: "SF Mono", Menlo, Consolas, monospace;
  --f-dot: "Doto", "Courier New", monospace;

  /* bead-blasted grain, used on every surface */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='.33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0 0 0 0 0 1'/><feComponentTransfer><feFuncR type='linear' slope='2.2' intercept='-.6'/><feFuncG type='linear' slope='2.2' intercept='-.6'/><feFuncB type='linear' slope='2.2' intercept='-.6'/></feComponentTransfer></filter><rect width='256' height='256' filter='url(%23n)'/></svg>");
  --grain-soft: var(--grain);
  /* the desk grain has no fixed size: the noise is computed at the size of the page, so it never tiles */
  --desk-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><filter id='n' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'><feTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' seed='7'/><feColorMatrix values='.33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0 0 0 0 0 1'/><feComponentTransfer><feFuncR type='linear' slope='2.2' intercept='-.6'/><feFuncG type='linear' slope='2.2' intercept='-.6'/><feFuncB type='linear' slope='2.2' intercept='-.6'/></feComponentTransfer></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  /* countersunk hex screw */
  --screw: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><defs><linearGradient id='c' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%23444746'/><stop offset='.55' stop-color='%23a9acab'/><stop offset='1' stop-color='%23ffffff'/></linearGradient><linearGradient id='h' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%23f7f7f6'/><stop offset='.5' stop-color='%23c2c4c3'/><stop offset='1' stop-color='%23858887'/></linearGradient><linearGradient id='s' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%23050606'/><stop offset='1' stop-color='%233a3d3c'/></linearGradient></defs><circle cx='16' cy='16' r='15' fill='url(%23c)'/><circle cx='16' cy='16' r='12' fill='url(%23h)'/><path d='M16 9.2l5.9 3.4v6.8L16 22.8l-5.9-3.4v-6.8z' fill='url(%23s)'/></svg>");

  --u: 8px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  color: var(--ink);
  font-family: var(--f-label);
  font-size: 14px;
  padding-inline: 16px;
  padding-block: 48px 72px;
  background-color: var(--desk);
  background-image: var(--desk-grain), radial-gradient(130% 100% at 15% 0%, var(--desk-hi) 0%, var(--desk) 50%, var(--desk-lo) 100%);
  background-size: cover, 100% 100%;
  background-repeat: no-repeat;
  background-blend-mode: soft-light, normal;
  min-height: 100vh;
}
/* lens falloff */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 20;
  background: radial-gradient(120% 120% at 45% 40%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .2) 100%);
}

.page {
  max-width: 1080px;
  margin-inline: auto;
  display: grid;
  gap: 44px;
}

/* ---------- body and panels ---------- */

.device {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2px;
  background: var(--gap);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .45),
    3px 5px 5px rgba(0, 0, 0, .55),
    10px 18px 18px -2px rgba(0, 0, 0, .36),
    30px 54px 60px -12px rgba(0, 0, 0, .34),
    80px 140px 150px -40px rgba(0, 0, 0, .4);
}
/* one studio light over the whole plate, so the panels read as a single object */
.device::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: soft-light;
  background:
    linear-gradient(114deg, rgba(255, 255, 255, 0) 26%, rgba(255, 255, 255, .34) 41%, rgba(255, 255, 255, 0) 58%),
    radial-gradient(90% 110% at 6% 0%, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(135deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .3) 100%);
}
.dust {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 4;
}

.mod {
  position: relative;
  min-width: 0;
  padding: calc(var(--u) * 4);
  border-radius: 2px;
  background-color: var(--alu);
  background-image: var(--grain), linear-gradient(135deg, var(--alu-hi) 0%, var(--alu) 55%, var(--alu-lo) 100%);
  background-size: 256px 256px, 100% 100%;
  background-blend-mode: soft-light, normal;
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, .95),
    inset -1.5px -1.5px 0 rgba(0, 0, 0, .24),
    inset 4px 4px 5px -3px rgba(255, 255, 255, .7),
    inset -4px -4px 6px -3px rgba(0, 0, 0, .12);
}

.mod-head   { grid-column: span 12; padding-block: calc(var(--u) * 2.75); padding-inline: calc(var(--u) * 5.5); }
.mod-screen { grid-column: span 8; }
.mod-wheel  { grid-column: span 4; }
.mod-keys   { grid-column: span 8; }
.mod-knobs  { grid-column: span 4; }

/* machined steel screws, countersunk into the plate */
.screw {
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(135deg, #4A4D4C 0%, #8F9291 40%, #E9EAE9 72%, #FFFFFF 100%);
  box-shadow:
    0 0 0 .5px rgba(0, 0, 0, .4),
    1px 1px 0 .5px rgba(255, 255, 255, .75),
    -1px -1px 0 .5px rgba(0, 0, 0, .2);
}
.screw.tl { top: 9px; left: 9px; }
.screw.tr { top: 9px; right: 9px; }
.screw.bl { bottom: 9px; left: 9px; }
.screw.br { bottom: 9px; right: 9px; }
.screw.ml { top: 50%; left: 9px; margin-top: -10px; }
.screw.mr { top: 50%; right: 9px; margin-top: -10px; }
.screw b {
  position: absolute; inset: 3px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, rgba(0, 0, 0, .1) 0 .5px, rgba(0, 0, 0, 0) .5px 1.3px),
    conic-gradient(from var(--r, 0deg), #FFFFFF, #8B8E8D, #E4E5E4, #787B7A, #FAFAFA, #979A99, #ECECEC, #808382, #FFFFFF);
  box-shadow:
    0 0 0 .75px rgba(0, 0, 0, .7),
    inset .75px .75px .5px rgba(255, 255, 255, .95),
    inset -.75px -.75px 1px rgba(0, 0, 0, .4),
    1px 1.5px 1.5px rgba(0, 0, 0, .55);
}
.screw svg { position: absolute; inset: 3px; width: 14px; height: 14px; }

/* raised parts. the camera sits above the centre of the plate, so each part leans
   away from the centre and shows the wall that faces it. --dx, --dy and --wl come from script. */
.key, .knob, .wheel {
  --t: 1;
  --ox: calc(var(--dx, 0) * var(--t) * -1px);
  --oy: calc(var(--dy, 0) * var(--t) * -1px);
  --lift: calc(var(--h) * var(--t) * 1px);
  --wall: color-mix(in srgb, var(--side-lit) calc(var(--wl, .5) * 100%), var(--side-dark));
  --walls:
    calc(var(--ox) * .125) calc(var(--oy) * .125) 0 0 var(--wall),
    calc(var(--ox) * .25) calc(var(--oy) * .25) 0 0 var(--wall),
    calc(var(--ox) * .375) calc(var(--oy) * .375) 0 0 var(--wall),
    calc(var(--ox) * .5) calc(var(--oy) * .5) 0 0 var(--wall),
    calc(var(--ox) * .625) calc(var(--oy) * .625) 0 0 var(--wall),
    calc(var(--ox) * .75) calc(var(--oy) * .75) 0 0 var(--wall),
    calc(var(--ox) * .875) calc(var(--oy) * .875) 0 0 var(--wall),
    var(--ox) var(--oy) 0 0 var(--wall);
  --base:
    calc(var(--ox) + var(--lift) * .6) calc(var(--oy) + var(--lift) * 1) calc(var(--lift) * .8) rgba(0, 0, 0, .55),
    calc(var(--ox) + var(--lift) * 1.9) calc(var(--oy) + var(--lift) * 3.1) calc(var(--lift) * 2.6) calc(var(--lift) * -.3) rgba(0, 0, 0, .3),
    var(--ox) var(--oy) 0 1.5px var(--gap),
    calc(var(--ox) + 1px) calc(var(--oy) + 1px) 0 2.5px rgba(255, 255, 255, .85),
    calc(var(--ox) - 1px) calc(var(--oy) - 1px) 0 2.5px rgba(0, 0, 0, .24);
  transform: translate(calc(var(--dx, 0) * var(--t) * 1px), calc(var(--dy, 0) * var(--t) * 1px));
}

/* silkscreen print */
.print {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .005em;
  color: var(--paint);
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
}

/* ---------- head ---------- */

.mod-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--paint);
}
.head-right { display: flex; align-items: center; gap: 22px; }
.power { display: flex; align-items: center; gap: 9px; }

/* led lens sitting in a drilled hole */
.led {
  width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #A9ACAB 0 12%, #5B5E5D 45%, #2C2E2D 100%);
  --h: 6;
  --side-lit: #F4F5F4;
  --side-dark: #63666A;
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, .95),
    inset 0 0 0 3.5px rgba(0, 0, 0, .1),
    inset -3px -4px 6px rgba(0, 0, 0, .12),
    var(--walls),
    var(--base);
}
.led.on {
  background: radial-gradient(circle at 35% 30%, #FFE3D2 0 14%, #FF7A3D 40%, #E63A05 100%);
  box-shadow:
    0 0 0 1.5px var(--gap),
    0 0 9px 3px rgba(255, 90, 30, .5),
    0 0 22px 8px rgba(255, 90, 30, .16),
    1px 1px 0 2.5px rgba(255, 255, 255, .8),
    -1px -1px 0 2.5px rgba(0, 0, 0, .2);
}

.sw-wrap { display: flex; align-items: center; gap: 9px; }
.sw {
  appearance: none; border: 0; padding: 0; cursor: pointer;
  width: 46px; height: 22px; border-radius: 4px;
  background: #0B0D0C;
  box-shadow:
    inset 2px 3px 4px rgba(0, 0, 0, .95),
    1px 1px 0 rgba(255, 255, 255, .85),
    -1px -1px 0 rgba(0, 0, 0, .22);
  position: relative;
}
.sw::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 16px; border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 1.5px, rgba(0, 0, 0, .28) 1.5px 3px),
    linear-gradient(135deg, #E9EAE9, #A9ACAB);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .85),
    inset -1px -1px 0 rgba(0, 0, 0, .3),
    2px 3px 3px rgba(0, 0, 0, .8);
  transition: transform .12s ease-out;
}
.sw[aria-checked="true"]::after { transform: translateX(20px); }

/* ---------- screen: glass set flush into the plate, lcd underneath ---------- */

.glass {
  position: relative;
  height: 100%;
  padding: 13px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1E201F 0%, #0B0C0C 60%, #060707 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .07),
    0 0 0 1.5px var(--gap),
    1px 1px 0 2.5px rgba(255, 255, 255, .85),
    -1px -1px 0 2.5px rgba(0, 0, 0, .25);
}
/* softbox reflection across the glass */
.glass::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(122deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, .03) 16%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(300deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, 0) 30%);
}

.lcd {
  position: relative;
  height: 100%;
  min-height: 400px;
  padding: 18px 22px;
  border-radius: 2px;
  background-color: var(--lcd-bg);
  background-image: var(--grain-soft), linear-gradient(135deg, rgba(0, 0, 0, .06) 0%, rgba(0, 0, 0, 0) 45%, rgba(255, 255, 255, .08) 100%);
  background-size: 256px 256px, 100% 100%;
  background-blend-mode: soft-light, normal;
  color: var(--lcd-ink);
  font-family: var(--f-screen);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .7),
    inset 3px 4px 7px rgba(0, 0, 0, .34),
    inset -1px -1px 2px rgba(255, 255, 255, .12);
  overflow: hidden;
}
.lcd[data-mode="oled"]  { --lcd-bg: #090B0A; --lcd-ink: #F1F4EE; --lcd-sh: 0 0 4px rgba(241, 244, 238, .28); }
.lcd[data-mode="amber"] { --lcd-bg: #140D03; --lcd-ink: #FFB62E; --lcd-sh: 0 0 4px rgba(255, 182, 46, .32); }

/* panel texture: a fine dot pitch, faint enough to stay out of the way of the text */
.lcd::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, var(--lcd-ink) 0 .5px, transparent .5px 2px),
    repeating-linear-gradient(90deg, var(--lcd-ink) 0 .5px, transparent .5px 2px);
  opacity: .045;
}

.lcd-inner {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  opacity: var(--contrast, 1);
  /* the segments float above the reflector and throw a faint shadow on it */
  text-shadow: var(--lcd-sh);
}

.lcd-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--f-ui);
  font-size: 16px;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.lcd-bar.top { border-bottom: 2px solid currentColor; padding-bottom: 8px; }
.lcd-bar.bottom { border-top: 2px solid currentColor; padding-top: 8px; }

.panes {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 9fr);
  gap: 32px;
  align-items: start;
}

.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-family: var(--f-ui); font-size: 16px; letter-spacing: .02em; }
.menu button {
  appearance: none; border: 0; background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
  text-shadow: inherit;
  display: block; width: 100%;
  padding: 5px 10px;
  overflow-wrap: anywhere;
}
.menu button[aria-current="true"] {
  background: var(--lcd-ink);
  color: var(--lcd-bg);
  text-shadow: none;
  box-shadow: var(--lcd-sh);
}
.menu button:focus-visible { outline: 2px dashed currentColor; outline-offset: 2px; }

.detail { min-width: 0; display: grid; gap: 12px; align-content: start; container-type: inline-size; }
/* sized to its own column, not the viewport: "bit127" is about 3.4em wide, so 27cqw keeps it on one line */
.detail .big {
  font-family: var(--f-dot);
  font-weight: 900;
  font-size: clamp(3rem, 27cqw, 6rem);
  line-height: .85;
  letter-spacing: -.02em;
  margin: 0 0 6px -4px;
  max-width: none;
}
/* pixel art strip above the text. the segments throw the same faint shadow as the type */
.detail .art {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  margin-bottom: 4px;
  fill: currentColor;
  shape-rendering: crispEdges;
  filter: drop-shadow(var(--lcd-sh));
}
/* a second pixel line under the name, sized so "web studio" spans the same width as "bit127" */
.detail .big.sub { font-size: clamp(1.75rem, 16cqw, 3.55rem); margin: -2px 0 10px -2px; }
.detail .meta { margin: 0; font-family: var(--f-ui); font-size: 16px; opacity: .8; }
.detail p { margin: 0; max-width: 40ch; line-height: 1.55; overflow-wrap: anywhere; text-wrap: pretty; }
.who { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 20px; align-items: start; }
.who-text { display: grid; gap: 10px; min-width: 0; }
.photo {
  width: 132px; height: 165px;
  display: block;
  image-rendering: pixelated;
  border: 2px solid currentColor;
  box-shadow: var(--lcd-sh);
}
.status { margin: 0; font-family: var(--f-ui); font-size: 16px; letter-spacing: .02em; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; }
.status dt { opacity: .7; }
.status dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .who { grid-template-columns: minmax(0, 1fr); }
}
.detail .link {
  font-family: var(--f-ui);
  font-size: 16px;
  letter-spacing: .02em;
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  justify-self: start;
}
.detail .link:focus-visible { outline: 2px dashed currentColor; outline-offset: 3px; }

.form { display: grid; gap: 16px; max-width: 46ch; align-content: start; }
.form[hidden], .panes[hidden] { display: none; }
.form label { display: grid; gap: 6px; font-family: var(--f-ui); font-size: 16px; letter-spacing: .02em; }
.form input, .form textarea {
  font-family: var(--f-screen);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  color: inherit;
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 0;
  padding: 8px 10px;
  width: 100%;
  min-width: 0;
  text-shadow: none;
}
.form textarea { resize: vertical; }
.form :is(input, textarea):focus-visible { outline: 2px dashed currentColor; outline-offset: 3px; }
.form .send {
  appearance: none; cursor: pointer;
  font-family: var(--f-ui); font-size: 16px; letter-spacing: .02em;
  border: 2px solid currentColor;
  background: var(--lcd-ink); color: var(--lcd-bg);
  padding: 8px 16px;
  justify-self: start;
  text-shadow: none;
}
.form .send:focus-visible { outline: 2px dashed var(--lcd-ink); outline-offset: 3px; }
.form .lead { margin: 0; max-width: 40ch; line-height: 1.55; text-wrap: pretty; }
.form .note { margin: 0; font-family: var(--f-ui); font-size: 16px; letter-spacing: .02em; opacity: .8; }
/* the honeypot: a field no person sees or fills in */
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* turnstile only draws itself when it needs the visitor to do something */
.form .ts:empty { display: none; }
.detail .addr { font-family: var(--f-mono); user-select: all; border-bottom: 2px dotted currentColor; justify-self: start; }

/* tetris: the screen becomes a game. every cell is a segment of the same lcd, so it follows the screen colour */
.tetris { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; }
.tetris[hidden] { display: none; }
.tz-board, .tz-next {
  display: grid;
  gap: 1px;
  padding: 3px;
  border: 2px solid currentColor;
  box-shadow: var(--lcd-sh);
}
.tz-board { grid-template-columns: repeat(10, 15px); grid-auto-rows: 15px; }
.tz-next { grid-template-columns: repeat(4, 11px); grid-auto-rows: 11px; justify-self: start; }
.tetris i { display: block; background: currentColor; opacity: .07; }
.tetris i.on { opacity: 1; box-shadow: var(--lcd-sh); }
.tz-field { position: relative; justify-self: start; }
/* a card of inverted segments laid over the board: ready, paused, game over */
.tz-over { position: absolute; inset: 0; display: grid; place-content: center; padding: 10px; }
.tz-over[hidden] { display: none; }
.tz-card {
  display: grid; gap: 4px; text-align: center;
  padding: 10px 12px;
  background: var(--lcd-ink); color: var(--lcd-bg);
  font-family: var(--f-ui); font-size: 16px; letter-spacing: .02em; line-height: 1.3;
  text-shadow: none; box-shadow: var(--lcd-sh);
}
.tz-card b { font-weight: 400; text-transform: uppercase; }
.tz-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.tz-msg { margin: 0; font-family: var(--f-ui); font-size: 16px; letter-spacing: .02em; }
@media (max-width: 560px) {
  .tetris { gap: 16px; }
  .tz-board { grid-template-columns: repeat(10, 13px); grid-auto-rows: 13px; }
}

/* ---------- wheel: lathe-turned aluminium disc ---------- */

.mod-wheel {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 22px;
}
.wheel {
  width: min(100%, 250px);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  cursor: grab;
  touch-action: none;
  background:
    repeating-radial-gradient(circle at center, rgba(0, 0, 0, .085) 0 .6px, rgba(255, 255, 255, .05) .6px 1.2px, transparent 1.2px 2.2px),
    conic-gradient(from 38deg,
      #FDFDFD 0deg, #D3D5D4 22deg, #A1A4A3 58deg, #C9CBCA 88deg,
      #F3F4F3 126deg, #B6B9B8 160deg, #FFFFFF 200deg, #CDCFCE 228deg,
      #9B9E9D 262deg, #D6D8D7 298deg, #B9BCBB 330deg, #FDFDFD 360deg);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, .95),
    inset 0 0 0 3.5px rgba(0, 0, 0, .1),
    inset -3px -4px 6px rgba(0, 0, 0, .12),
    4px 7px 6px rgba(0, 0, 0, .5),
    14px 24px 26px -4px rgba(0, 0, 0, .32),
    0 0 0 3px var(--gap),
    1px 1px 0 4px rgba(255, 255, 255, .85),
    -1px -1px 0 4px rgba(0, 0, 0, .24);
}
.wheel:active { cursor: grabbing; }
.wheel-rot {
  position: absolute; inset: 0;
  border-radius: 50%;
  transform: rotate(var(--rot, 0deg));
}
.wheel-rot::before {
  /* finger dimple. counter-rotated so its shading stays true to the light */
  content: "";
  position: absolute;
  top: 8%; left: 50%;
  width: 20%; aspect-ratio: 1;
  transform: translateX(-50%) rotate(calc(var(--rot, 0deg) * -1));
  border-radius: 50%;
  background: linear-gradient(135deg, #7E8180 0%, #C6C8C7 50%, #F8F8F8 100%);
  box-shadow:
    inset 3px 4px 6px rgba(0, 0, 0, .5),
    inset -1px -1px 1px rgba(255, 255, 255, .8),
    1px 1px 0 rgba(255, 255, 255, .85),
    -1px -1px 0 rgba(0, 0, 0, .18);
}
.wheel-rot::after {
  /* paint-filled index mark */
  content: "";
  position: absolute;
  bottom: 11%; left: 50%;
  width: 4px; height: 9%;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--orange);
  box-shadow: inset 1px 1px 1px rgba(0, 0, 0, .45);
}
.hub {
  position: absolute;
  inset: 35%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, rgba(255, 255, 255, .05) 0 .6px, transparent .6px 2px),
    conic-gradient(from 38deg, #3A3C3B, #0D0E0E 70deg, #2E302F 130deg, #0B0C0C 200deg, #383A39 260deg, #0D0E0E 320deg, #3A3C3B);
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, .3),
    inset -1px -1px 2px rgba(0, 0, 0, .6),
    3px 5px 5px rgba(0, 0, 0, .55),
    0 0 0 1px #000;
  display: grid; place-items: center;
  color: #C4C7C6;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  pointer-events: none;
}

/* ---------- keys: matte caps sitting in cutouts ---------- */

.mod-keys { display: grid; align-content: center; }
.keys {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 118px));
  justify-content: start;
  gap: 24px;
}
.slot { display: grid; gap: 14px; justify-items: center; align-content: start; min-width: 0; }
.slot .print { text-align: center; }

.key {
  --cap-a: #C7C9C8;
  --cap-b: #D8DAD9;
  --cap-c: #E8E9E8;
  appearance: none; border: 0; padding: 0; cursor: pointer;
  width: 100%;
  max-width: 94px;
  aspect-ratio: 1;
  border-radius: 11px;
  background-color: var(--cap-b);
  background-image: var(--grain), linear-gradient(135deg, var(--cap-a) 0%, var(--cap-b) 48%, var(--cap-c) 100%);
  background-blend-mode: soft-light, normal;
  --h: 5;
  --side-lit: #E4E6E5;
  --side-dark: #6E7170;
  background-size: 256px 256px, 100% 100%;
  box-shadow:
    inset 1.5px 1.5px 1px rgba(255, 255, 255, .95),
    inset -1.5px -2px 2px rgba(0, 0, 0, .16),
    inset 0 0 0 1px rgba(0, 0, 0, .05),
    var(--walls),
    var(--base);
  transition: transform .06s ease-out, box-shadow .06s ease-out, filter .06s ease-out;
  display: grid; place-items: center;
}
.key svg {
  width: 38%; height: 38%;
  fill: none; stroke: #000; stroke-width: 1.35;
  stroke-linecap: butt; stroke-linejoin: miter;
  overflow: visible;
  filter: url(#paint);
}
.key.accent svg { filter: url(#paint-light); }
/* in the game the same keys read left, turn, right, and a fourth key drops. no orange: the caps are all plain */
.ic-game, .lbl-game { display: none; }
.slot.game-only { display: none; }
.game .ic-sec, .game .lbl-sec { display: none; }
.game .ic-game { display: block; }
.game .lbl-game { display: inline; }
.game .slot.game-only { display: grid; }
.game .keys { grid-template-columns: repeat(4, minmax(0, 118px)); }
.keys .slot:nth-child(4) .key { background-position: 190px 41px, 0 0; filter: brightness(.994); }
.game .key.accent {
  --cap-a: #C7C9C8;
  --cap-b: #D8DAD9;
  --cap-c: #E8E9E8;
  --side-lit: #E4E6E5;
  --side-dark: #6E7170;
}
.game .key.accent svg { filter: url(#paint); }
/* three separate parts, not three copies: each cap's grain sits differently and its tone varies a little */
.keys .slot:nth-child(1) .key { background-position: 0 0, 0 0; filter: brightness(1.008); }
.keys .slot:nth-child(2) .key { background-position: 61px 23px, 0 0; filter: brightness(.988); }
.keys .slot:nth-child(3) .key { background-position: 128px 77px, 0 0; filter: brightness(1.016); }
.keys .slot:nth-child(2) .key svg { transform: rotate(.6deg); }
.keys .slot:nth-child(3) .key svg { transform: rotate(-.4deg); }
/* a pressed key sinks toward the plate: less lean, less wall, tighter shadow */
.keys .slot .key:active, .keys .slot .key.down {
  --t: .25;
  filter: brightness(.955);
}
.key.accent {
  --cap-a: #E23E0C;
  --cap-b: var(--orange);
  --cap-c: #FF6A33;
  --side-lit: #FF7846;
  --side-dark: #8A2504;
}

:is(.key, .sw, .wheel, .knob):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 7px;
}

/* ---------- knobs and grille ---------- */

.mod-knobs { display: grid; gap: 30px; align-content: center; }
.knobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.knob {
  width: 56px;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  cursor: ns-resize;
  touch-action: none;
  background-color: var(--c);
  background-image:
    var(--grain-soft),
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, rgba(255, 255, 255, .16) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .22) 100%);
  background-size: 256px 256px, 100% 100%, 100% 100%;
  background-blend-mode: soft-light, normal, normal;
  --h: 12;
  --side-lit: color-mix(in srgb, var(--c) 78%, #FFFFFF);
  --side-dark: color-mix(in srgb, var(--c) 42%, #000000);
  box-shadow:
    inset 1.5px 1.5px 1.5px rgba(255, 255, 255, .5),
    inset -2px -3px 4px rgba(0, 0, 0, .3),
    inset 0 0 0 1px rgba(0, 0, 0, .12),
    var(--walls),
    var(--base);
}
.knob i {
  position: absolute; inset: 0;
  border-radius: 50%;
  transform: rotate(var(--a, 0deg));
}
.knob i::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 15px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--m, #F4F4F1);
  box-shadow: inset 1px 1px 1px rgba(0, 0, 0, .4);
}

.knob.green { --c: var(--green); }
.knob.white { --c: var(--key); --m: var(--ink); }
.knob.blue  { --c: var(--blue); }

/* drilled speaker holes. the lower right lip of each hole catches the light */
.grille {
  height: 48px;
  background-image:
    radial-gradient(circle at 50% 50%, #0E100F 0 1.5px, rgba(14, 16, 15, 0) 1.9px),
    radial-gradient(circle at 57% 58%, rgba(255, 255, 255, .95) 0 1.9px, rgba(255, 255, 255, 0) 2.4px),
    radial-gradient(circle at 43% 42%, rgba(0, 0, 0, .3) 0 1.9px, rgba(0, 0, 0, 0) 2.4px);
  background-size: 10px 10px;
}

/* ---------- small print under the instrument ---------- */

.fine {
  margin: -16px 0 0;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .01em;
  color: var(--paint);
  opacity: .6;
  text-transform: lowercase;
}

/* ---------- caption ---------- */

.caption {
  margin: 0;
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--paint);
}

/* ---------- narrow ---------- */

@media (max-width: 860px) {
  .mod { grid-column: span 12; padding: calc(var(--u) * 3.5); }
  .mod-head   { order: 1; padding-inline: 42px; }
  .mod-screen { order: 2; }
  .mod-keys   { order: 3; }
  .mod-wheel  { order: 4; }
  .mod-knobs  { order: 5; }
  .wheel { width: min(100%, 210px); }
  .knobs { justify-items: center; }
}
@media (max-width: 560px) {
  body { padding-block: 20px 48px; }
  .page { gap: 36px; }
  .mod { padding: 26px 22px; }
  .mod-head { padding-inline: 40px; }
  .panes { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lcd { min-height: 0; font-size: 17px; padding: 16px; }
  .menu, .lcd-bar { font-size: 16px; }
  .glass { padding: 9px; }
  .keys { gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game .keys { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .key { border-radius: 8px; }
  .slot .print { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .key, .sw::after { transition: none; }
}
