@font-face { font-family: 'Nunito'; font-weight: 200 1000; font-style: normal; font-display: swap; src: url('nunito.woff2') format('woff2'); }
/* apc40x.com/manual/ (tools/landing/docs.py): the manual's chapters for the screen. The site's dark room and font;
   each chapter in its own colour (--hue, set on <body>, as in the PDF). The components are the PDF's (render.py:
   key pills, LED chips, panel drawings, tables, boxes), drawn again for a dark page and any width. No script. */

:root {
  --stage: #0E0F12;
  --stage-2: #16181D;
  --stage-3: #1D2027;
  --line: #262931;
  --text: #F3F4F7;
  --soft: #A9AFBC;
  --faint: #6F7583;
  --pink: #FF4F9A;
  --hue: #FF4F9A;
  --mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--stage);
  color: var(--text);
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--hue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* -- the bar: the site's, solid ------------------------------------------------------------------------------- */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; height: 60px;
  padding: 0 24px; background: rgba(14, 15, 18, .94); border-bottom: 1px solid var(--line); }
.mark { display: block; width: 104px; flex: none; }
.mark svg { display: block; width: 100%; height: auto; }
.bar-nav { display: flex; gap: 20px; font-weight: 800; font-size: 15px; }
.bar-nav a { color: var(--soft); text-decoration: none; }
.bar-nav a:hover, .bar-nav a[aria-current] { color: var(--text); }
.bar-end { margin-left: auto; }
.btn { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 800; text-decoration: none;
  border-radius: 999px; border: 0; cursor: pointer; }
.btn.primary { background: var(--pink); color: #121318; }
.btn.small { font-size: 14px; padding: 8px 16px; }
.btn .price { opacity: .75; }
@media (max-width: 560px) { .bar { gap: 16px; padding: 0 16px; } .mark { width: 84px; } .bar-nav { gap: 14px; } }

/* -- the page: the chapter list beside the text (a menu above it on narrow screens) --------------------------- */
.docs { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 56px; justify-content: center;
  padding: 44px 24px 72px; }
.toc-side { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow: auto;
  font-size: 15px; }
.toc-menu { display: none; }
@media (max-width: 1000px) {
  .docs { grid-template-columns: minmax(0, 760px); gap: 20px; padding-top: 20px; }
  .toc-side { display: none; }
  .toc-menu { display: block; border: 1px solid var(--line); border-radius: 14px; background: var(--stage-2);
    margin-bottom: 24px; }
  .toc-menu > summary { cursor: pointer; padding: 10px 16px; font-weight: 800; color: var(--soft); }
  .toc-menu[open] > summary { border-bottom: 1px solid var(--line); }
  .toc-menu .toc-list { padding: 8px; }
}
@media (max-width: 560px) { .docs { padding-left: 16px; padding-right: 16px; } }

.toc-title { font-size: 12px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
  margin: 0 0 10px 10px; }
.toc-title a { text-decoration: none; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list > li > a { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px;
  text-decoration: none; font-weight: 800; color: var(--soft); }
.toc-list > li > a:hover { color: var(--text); }
.toc-list > li.current > a { background: var(--stage-3); color: var(--text); }
.toc-num { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--c); color: #121318;
  font-size: 13px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
.toc-sections { list-style: none; margin: 0; padding: 4px 0 8px 44px; }
.toc-sections a { display: block; padding: 3px 0; color: var(--soft); text-decoration: none; font-weight: 600; }
.toc-sections a:hover { color: var(--text); }

/* -- a chapter: its head (the opener), then a section per page of the PDF -------------------------------------- */
.chapter-head { display: flex; flex-direction: column; gap: 20px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.chapter-head > * { margin: 0; }
.kicker { align-self: flex-start; font-weight: 900; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: #121318; background: var(--hue); padding: 4px 12px; border-radius: 999px; }
.chapter-title { margin: 0; line-height: 0; }
.chapter-title svg { display: block; height: 72px; width: auto; max-width: 100%; }
@media (max-width: 560px) { .chapter-title svg { height: 48px; } }
.lead { font-size: 21px; font-weight: 700; line-height: 1.4; color: #DADDE5; }
.play-link { align-self: flex-start; font-size: 15px; font-weight: 800; color: var(--soft); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.play-link:hover { color: var(--text); border-color: var(--soft); }

.doc-section { padding-top: 44px; }
.doc-section > * { margin: 0; }
.doc-section > * + * { margin-top: 18px; }
.doc-section h2 { font-size: 32px; line-height: 1.12; font-weight: 900; letter-spacing: -.01em; }
.doc-section h3 { font-size: 21px; font-weight: 900; margin-top: 30px; }
.doc-section h3::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px;
  background: var(--hue); margin-right: 10px; vertical-align: .05em; }
.doc-section h4 { font-size: 18px; font-weight: 900; margin-top: 24px; }
p { margin: 0; }
ul { margin: 0; padding-left: 22px; }
li { margin: 4px 0; }
li::marker { color: var(--hue); }
strong { color: #FFFFFF; font-weight: 800; }
code { font-family: var(--mono); font-size: .88em; background: var(--stage-3); padding: 1px 6px; border-radius: 5px; }
@media (max-width: 560px) { .doc-section h2 { font-size: 26px; } .lead { font-size: 18px; } }

/* -- pictures -------------------------------------------------------------------------------------------------- */
.panel-wrap { margin: 0; background: var(--stage-2); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--hue) 55%, transparent); }
.panel-wrap svg { display: block; width: 100%; height: auto; }
.panel-wrap figcaption { color: var(--soft); font-size: 14px; font-weight: 700; padding: 8px 4px 0; }
.panel-wrap.scaled, .panel-wrap.wide { margin-left: auto; margin-right: auto; }
.panel-wrap.half { width: 60%; }
.panel-wrap.wide { width: 86%; }
.box .panel-wrap.scaled { margin-left: 0; }
.chapter-head .panel-wrap { background: transparent; border: 0; padding: 0; box-shadow: none; border-radius: 14px;
  overflow: hidden; }
@media (max-width: 640px) { .panel-wrap.half, .panel-wrap.wide, .panel-wrap.scaled { width: 100% !important; } }

.mini-grid { margin: 0; display: inline-block; width: 160px; }
.mini-grid svg { display: block; width: 100%; height: auto; }
.mini-grid figcaption { font-size: 13px; font-weight: 800; text-align: center; color: var(--soft); margin-top: 4px; }
.grid-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; }
.grid-row .mini-grid { width: 140px; }
.grid-row.small .mini-grid { width: 108px; }

.diagram { margin: 0; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { font-size: 14px; font-weight: 700; color: var(--soft); margin-top: 6px; }
.pixel-title svg { display: block; width: auto; max-width: 100%; height: 56px; }

/* -- boxes ------------------------------------------------------------------------------------------------------ */
.box { border-radius: 16px; padding: 14px 18px; position: relative; }
.box > * { margin: 0; }
.box > * + * { margin-top: 8px; }
.box-label { display: inline-block; font-weight: 900; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  padding: 2px 10px; border-radius: 999px; }
.box.try { background: color-mix(in srgb, var(--hue) 11%, var(--stage)); border: 1.5px solid color-mix(in srgb, var(--hue) 75%, transparent); }
.box.try .box-label { background: var(--hue); color: #121318; }
.box.tip { background: rgba(245, 180, 0, .07); border: 1.5px dashed rgba(245, 180, 0, .75); }
.box.tip .box-label { background: #F5B400; color: #3B2A00; }
.box.heads-up { background: rgba(255, 106, 61, .09); border: 1.5px solid #FF6A3D; }
.box.heads-up .box-label { background: #FF6A3D; color: #121318; }
.box.card { background: var(--stage-2); border: 1px solid var(--line); }
.box.card .box-label { background: var(--stage-3); color: var(--text); border: 1px solid var(--line); }
.box.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 0; }
.box.row > * + * { margin-top: 0; }
.box.col { padding: 0; }
.chapter-head .box.card ul { padding-left: 20px; }
.chapter-head .box.card li { font-weight: 700; }

/* -- keys, chips, numbers ------------------------------------------------------------------------------------- */
.keys { white-space: nowrap; }
.plus { font-weight: 900; color: var(--faint); margin: 0 3px; }
.key { display: inline-flex; align-items: center; gap: 5px; font-weight: 900; font-size: .84em; line-height: 1.3;
  color: #FFFFFF; background: #2C3039; border: 1px solid #3A3F4A; border-radius: 6px; padding: 1px 8px 2px 6px;
  box-shadow: 0 2px 0 #07080A; vertical-align: .05em; }
.key::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--led, #5B616D);
  box-shadow: 0 0 6px color-mix(in srgb, var(--led, transparent) 70%, transparent); }
.key.plain::before { background: #5B616D; box-shadow: none; }
.key.rgb::before { background: var(--led); box-shadow: none; }
.chip { display: inline-block; width: 19px; height: 12px; border-radius: 3px; background: var(--c);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 0 8px color-mix(in srgb, var(--c) 45%, transparent);
  vertical-align: -.15em; }  /* a faint outline: the darkest LED colours (navy 127) vanish on a dark page otherwise */
.chip.big { width: 26px; height: 16px; flex: 0 0 auto; }
.chip.two { box-shadow: inset -8px 0 0 var(--c2), inset 0 0 0 1px rgba(0, 0, 0, .28); }
.chip.two.big { box-shadow: inset -13px 0 0 var(--c2), inset 0 0 0 1px rgba(0, 0, 0, .28); }
.msg svg { vertical-align: -.2em; background: #16181C; border: 1px solid var(--line); border-radius: 4px; padding: 2px; }
.num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px;
  background: var(--hue); color: #121318; font-weight: 900; font-size: 13px; vertical-align: .05em; margin-right: 3px; }
@media (max-width: 560px) { .keys { white-space: normal; } }

/* -- tables, swatches, the palette ------------------------------------------------------------------------------ */
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 15px; line-height: 1.4; }
th { text-align: left; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  padding: 0 10px 6px; }
td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:nth-child(odd) td { background: rgba(255, 255, 255, .025); }
table.combos td.control { width: 38%; }
.control-name { font-weight: 800; }
@media (max-width: 560px) { table { font-size: 14px; } td { padding: 6px; } th { padding: 0 6px 6px; }
  table.combos td.control { width: 44%; } }

.swatches { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.swatches li { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 15px; }
.box .swatches { flex-direction: column; gap: 4px; }

.palette { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.palette .cell { aspect-ratio: 1.45; border-radius: 3px; background: var(--c); display: flex; align-items: flex-end;
  justify-content: flex-end; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.palette .cell b { font-size: 9px; font-weight: 800; color: var(--t); padding: 0 2px 1px 0; }
@media (max-width: 560px) { .palette { grid-template-columns: repeat(8, 1fr); } }

/* -- previous / next, the manual's index ------------------------------------------------------------------------ */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; padding-top: 28px;
  border-top: 1px solid var(--line); }
.pager a { display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none;
  font-weight: 800; }
.pager a:hover { border-color: var(--soft); }
.pager small { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.pager .next { grid-column: 2; text-align: right; }

.manual-head { display: flex; flex-direction: column; gap: 16px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.manual-head h1 { margin: 0; font-size: 44px; line-height: 1.05; font-weight: 900; letter-spacing: -.01em; }
.manual-head p { margin: 0; font-size: 19px; color: #DADDE5; }
.chapter-cards { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; }
.chapter-cards a { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--stage-2); text-decoration: none; }
.chapter-cards a:hover { border-color: var(--c); }
.chapter-cards .toc-num { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; font-size: 17px; }
.chapter-cards b { font-size: 21px; font-weight: 900; }
.chapter-cards span.what { color: var(--soft); }

.fine { font-size: 14px; color: var(--faint); }
.version { display: inline-block; font-weight: 900; font-size: 13px; letter-spacing: .08em; padding: 4px 12px;
  border-radius: 999px; border: 2px solid var(--hue); }

/* -- the footer ------------------------------------------------------------------------------------------------- */
.docs-foot { border-top: 1px solid var(--line); padding: 28px 24px 40px; color: var(--faint); font-size: 14px; }
.docs-foot .wide { max-width: 1056px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--soft); }
.foot-links { display: flex; gap: 10px; }
.icon-link { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px; color: var(--soft); }
.icon-link:hover { color: var(--text); border-color: var(--soft); }
.icon-link svg { width: 20px; height: 20px; }
.docs-foot p { margin: 0; }
