:root {
  --background: #0b1018;
  --card-top: #17212e;
  --card-bottom: #111822;
  --track: #1c2633;
  --text: #dce4ec;
  --dim: #7c8a99;
  --line: #3f7cc4;
  --match: #e0a040;
}
.accent-kernel {
  --accent: #4a9cf0;
  --accent-text: #4a9cf0;
  --border-top: #254364;
  --border-bottom: #182a3e;
}
.accent-program {
  --accent: #58d878;
  --accent-text: #58d878;
  --border-top: #295342;
  --border-bottom: #1a322d;
}
.accent-memory {
  --accent: #38c0b0;
  --accent-text: #38c0b0;
  --border-top: #204d52;
  --border-bottom: #162f35;
}
.accent-machine {
  --accent: #d070b0;
  --accent-text: #d070b0;
  --border-top: #4a3652;
  --border-bottom: #2b2435;
}
.accent-boot {
  --accent: #e0a040;
  --accent-text: #e0a040;
  --border-top: #4e4433;
  --border-bottom: #2d2a26;
}
.accent-firmware {
  --accent: #8e7cc3;
  --accent-text: #8e7cc3;
  --border-top: #383a57;
  --border-bottom: #222538;
}
*, *::before, *::after { box-sizing: border-box; }
:root {
  --reading: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", "DejaVu Sans Mono", "Liberation Mono", Menlo, Consolas, monospace;
}
html {
  background: var(--background);
  color: var(--text);
  font-family: var(--reading);
  font-size: 16px;
  line-height: 24px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { margin: 0; }
.page { max-width: 1152px; margin: 0 auto; padding: 0 16px; }
code, pre, kbd, .code, .time, .line, .label, .who { font-family: var(--mono); font-size: 14px; }
code { color: var(--text); background: var(--track); padding: 0 4px; overflow-wrap: anywhere; }
pre { background: var(--track); padding: 8px 16px; overflow-x: auto; line-height: 20px; }
pre code { padding: 0; background: none; overflow-wrap: normal; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { background: var(--track); }
a.term { text-decoration-style: dotted; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--line); outline-offset: 2px; }
h1 { font-size: 32px; line-height: 40px; margin: 32px 0 16px; font-weight: 700; }
h2 { font-size: 24px; line-height: 32px; margin: 40px 0 16px; font-weight: 700; }
h3 { font-size: 18px; line-height: 24px; margin: 32px 0 8px; font-weight: 700; }
h4 { font-size: 16px; line-height: 24px; margin: 24px 0 8px; font-weight: 700; color: var(--dim); }
p, ul, ol, blockquote { margin: 0 0 16px; }
ul, ol { padding-left: 24px; }
li { margin-bottom: 4px; }
blockquote { margin-left: 0; padding-left: 16px; border-left: 2px solid var(--line); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card-top); padding: 4px 8px; }

/* The bar: the heron and the name, then the sections as buttons. */
.bar { background: linear-gradient(var(--card-top), var(--card-bottom)); border-bottom: 1px solid var(--track); }
.bar-inner { max-width: 1152px; margin: 0 auto; padding: 4px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.bar-home { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--mono); font-weight: 700; }
.bar-home img { display: block; image-rendering: pixelated; }
.bar nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bar nav li { margin: 0; }
.bar nav a { display: inline-block; padding: 0 8px; line-height: 24px; background: var(--track); text-decoration: none; border-bottom: 2px solid transparent; }
.bar nav a[aria-current="page"] { border-bottom-color: var(--line); }
/* The search: a box at the right of the bar, in the place of the clock of
   the desktop, and a list as the completion list of the console: the
   matched characters in the accent, what each row is at its right, dim. */
.search { margin-left: auto; position: relative; }
.search[hidden], .search-panel[hidden] { display: none; }
.search-label { position: absolute; left: -9999px; }
.search input { width: 224px; height: 24px; padding: 0 8px; font-family: var(--mono); font-size: 14px; color: var(--text); background: var(--track); border: 1px solid var(--track); border-radius: 0; }
.search input::placeholder { color: var(--dim); }
.search input:focus-visible { outline: 2px solid var(--line); outline-offset: 0; }
.search-panel { position: absolute; right: 0; top: 32px; z-index: 10; width: 640px; max-width: calc(100vw - 32px); padding: 4px; background: var(--card-bottom); border: 1px solid var(--line); }
.search-hint, .search-detail { margin: 0; padding: 0 4px; font-family: var(--mono); font-size: 12px; line-height: 20px; color: var(--dim); }
.search-detail:empty { display: none; }
.search-list { list-style: none; margin: 0; padding: 0; }
.search-list li { margin: 0; }
.search-list a { display: flex; justify-content: space-between; gap: 16px; padding: 0 4px; line-height: 24px; font-family: var(--mono); font-size: 14px; text-decoration: none; border-left: 2px solid transparent; }
.search-list [aria-selected="true"] a { background: var(--track); border-left-color: var(--line); }
.search-name, .search-what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-name { flex: 0 1 auto; }
.search-what { flex: 0 1 auto; color: var(--dim); }
.search-name mark { background: none; color: var(--match); font-weight: 700; }
.crumbs ol { list-style: none; margin: 16px auto 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; color: var(--dim); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--dim); }
.foot { margin-top: 64px; padding: 16px 0 32px; border-top: 1px solid var(--track); color: var(--dim); font-size: 14px; }
.foot a, .foot code { color: var(--dim); }
.source, .missing, .date, .status, figcaption, .contents-title { color: var(--dim); }
.source { font-size: 14px; }

/* Prose: a guide. The contents beside it on a wide screen. */
.prose { max-width: 72ch; }
.prose.wide { max-width: none; }
.guide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 32px; }
.contents { font-size: 14px; }
.contents ul { list-style: none; padding: 0; margin: 0; }
.contents li { margin: 0; }
.contents .level-3 { padding-left: 16px; }
.contents a { text-decoration: none; }
@media (min-width: 1100px) {
  .guide { grid-template-columns: 224px minmax(0, 1fr); }
  .contents { grid-column: 1; grid-row: 1; position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow-y: auto; }
}
ol.labelled { list-style: none; padding-left: 0; }
ol.labelled > li { padding-left: 48px; text-indent: -48px; }
ol.labelled > li > * { text-indent: 0; }
.label { display: inline-block; min-width: 40px; color: var(--dim); }
.neighbours { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 32px; }

/* Tables: the look of the tables of the system: the titles of the columns in
   the dim color, rows of 24 pixels, every second row on a band.
   The cells wrap; a name (an identifier, a path, a signature) stays on one
   line. A table scrolls sideways only on a narrow screen. */
.table { margin: 0 0 16px; }
table { border-collapse: collapse; min-width: 100%; }
th { color: var(--dim); font-weight: 400; text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--track); white-space: nowrap; }
td { padding: 4px 8px; vertical-align: top; overflow-wrap: break-word; }
tbody tr:nth-child(odd) { background: var(--card-top); }
td.name, td.name code { white-space: nowrap; overflow-wrap: normal; }
a.reference { text-decoration-style: dashed; }

/* Cards: a border of 1 pixel in the accent, the bar of 4 by 16 pixels
   before the title. */
.card { min-width: 0; padding: 16px; margin-bottom: 8px; background: linear-gradient(var(--card-top), var(--card-bottom)); border: 1px solid var(--border-top); border-image: linear-gradient(var(--border-top), var(--border-bottom)) 1; }
.card h2, .card h3 { margin: 0 0 16px; font-size: 16px; line-height: 24px; text-transform: uppercase; font-family: var(--mono); }
.card h2::before, .card h3::before { content: ""; display: inline-block; width: 4px; height: 16px; margin-right: 8px; vertical-align: -2px; background: var(--accent); }
.card.measure h3 { text-transform: none; font-family: var(--reading); }
.card p:last-child { margin-bottom: 0; }
.measures, .pictures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.line code { display: block; padding: 8px; white-space: pre-wrap; }

/* The home. */
/* The head takes the height of its picture: the name under the heron is in
   the picture, and the card below starts after it. */
.home-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: start; padding: 32px 0; margin-bottom: 16px; }
.home-head picture { display: block; }
.tiles { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 2px; }
.tiles li { margin: 0; flex: 1 1 96px; min-width: 48px; height: 24px; line-height: 20px; padding: 0 4px; overflow: hidden; white-space: nowrap; font-family: var(--mono); font-size: 12px; background: var(--track); border-bottom: 1px solid var(--dim); }
.tiles a { display: block; color: inherit; text-decoration: none; }
.tiles a:hover { background: none; text-decoration: underline; }
.mark { display: block; image-rendering: pixelated; }
.lead { font-size: 18px; line-height: 28px; max-width: 60ch; }
.doors { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.doors a { display: inline-block; padding: 4px 16px; background: var(--track); text-decoration: none; border-bottom: 2px solid var(--line); }
.stages { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 8px; }
.stages li { margin: 0; padding: 4px 8px; background: var(--track); border-top: 2px solid var(--accent); }
.stages .who { display: block; color: var(--dim); }
.stages .time { display: block; }
figure { min-width: 0; margin: 0; padding: 8px; background: var(--card-bottom); border: 1px solid var(--track); }
figure.wide { grid-column: 1 / -1; }
figure a { display: block; }
figure a:hover { background: none; }
figure img { display: block; width: 100%; height: auto; }
figcaption { padding-top: 8px; font-size: 14px; }

/* The news: a card for each entry; its kind is the colored mark of the card. */
.card.news-entry { margin-bottom: 16px; }
.card.news-entry h2, .card.news-card h3 { text-transform: none; font-family: var(--reading); margin-bottom: 8px; }
.card.news-entry h2 { font-size: 20px; line-height: 28px; }
.news-meta, .news-links { color: var(--dim); font-size: 14px; }
.news-kind { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--accent-text); border-left: 4px solid var(--accent); padding-left: 4px; }
.news-body.with-picture { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 384px); gap: 16px; align-items: start; }
.news-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.news-card figure { margin-bottom: 8px; padding: 4px; }
@media (max-width: 719px) {
  .news-body.with-picture, .news-cards { grid-template-columns: minmax(0, 1fr); }
  .table { overflow-x: auto; }
  .home-head { grid-template-columns: minmax(0, 1fr); }
  .measures, .pictures { grid-template-columns: minmax(0, 1fr); }
  figure.wide { grid-column: auto; }
  h1 { font-size: 28px; line-height: 32px; }
}
@media print {
  .bar, .crumbs, .contents, .neighbours, .skip { display: none; }
  html, body { background: #fff; color: #000; }
  a { color: #000; }
  .prose { max-width: none; }
  pre, code { background: none; }
}
.section-home {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Crect width='2' height='2' fill='%2318212d'/%3E%3C/svg%3E");
  background-position: 12px 12px;
}
@media (prefers-color-scheme: light) {
:root {
  --background: #f4f6f8;
  --card-top: #ffffff;
  --card-bottom: #f9fafb;
  --track: #d6dbe0;
  --text: #0b1018;
  --dim: #4a525b;
  --line: #3f7cc4;
  --match: #6f4f1f;
}
.accent-kernel {
  --accent: #4a9cf0;
  --accent-text: #0b1018;
  --border-top: #cce3fa;
  --border-bottom: #e0edf9;
}
.accent-program {
  --accent: #58d878;
  --accent-text: #0b1018;
  --border-top: #d0f4d9;
  --border-bottom: #e2f5e9;
}
.accent-memory {
  --accent: #38c0b0;
  --accent-text: #0b1018;
  --border-top: #c7ede9;
  --border-bottom: #def2f0;
}
.accent-machine {
  --accent: #d070b0;
  --accent-text: #0b1018;
  --border-top: #f1d7e9;
  --border-bottom: #f3e7f0;
}
.accent-boot {
  --accent: #e0a040;
  --accent-text: #0b1018;
  --border-top: #f6e4c9;
  --border-bottom: #f5ede1;
}
.accent-firmware {
  --accent: #8e7cc3;
  --accent-text: #0b1018;
  --border-top: #dfdaee;
  --border-bottom: #eae8f3;
}
.section-home { background-image: none; }
}
