/* vPXE site. The page borrows the boot menu's own look: its navy, its indigo
   selection bar, Inter and JetBrains Mono. The screen band stays dark in both themes,
   as a screen does in a lit room. */

@font-face { font-family: "Inter"; src: url("/fonts/inter-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/fonts/inter-display-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --ground: light-dark(#f4f6fa, #090d1a);
  --panel: light-dark(#ffffff, #11182b);
  --edge: light-dark(#c7cedb, #283452);
  --ink: light-dark(#0f1526, #f1f5f9);
  --dim: light-dark(#475569, #94a3b8);
  --link: light-dark(#4338ca, #a5b4fc);
  --bar: #4f46e5;
  --bar-hover: #4338ca;
  --bar-active: #3730a3;
  --erase: light-dark(#b91c1c, #f87171);
  --chip: light-dark(#e8ecf3, #1e2940);
  /* the screen band: the menu background's own gradient, in both themes */
  --screen-top: #090d1a;
  --screen-bottom: #0f1526;

  --sans: "Inter", system-ui, sans-serif;
  --display: "Inter Display", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  /* spacing: the menu background's dots sit on a 24 px pitch */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 48px; --s7: 72px; --s8: 96px;
  --gutter: 16px;
  --section: var(--s6);
}

@media (min-width: 960px) {
  :root { --gutter: 24px; --section: var(--s8); }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/26px var(--sans);
  font-feature-settings: "calt", "kern";
}

@media (min-width: 960px) {
  body { font-size: 17px; line-height: 28px; }
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--link); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.screen :focus-visible { outline-color: #a5b4fc; }
strong { font-weight: 600; }

code, pre, kbd { font-family: var(--mono); }

code { font-size: 0.88em; }
p code, li code { white-space: nowrap; }
@media (max-width: 599px) {
  p code, li code { white-space: normal; overflow-wrap: anywhere; }
}

.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 2; padding: var(--s2) var(--s4); background: var(--panel); border: 1px solid var(--edge); }
.skip:focus { top: var(--s2); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
/* narrow sections keep the page's left edge, with a shorter measure */
.narrow > * { max-width: 38em; }
.narrow > pre { max-width: 46em; }
.narrow > .code { width: max-content; max-width: 100%; }
.narrow > pre.status { max-width: 100%; width: max-content; }

/* header */

.top {
  max-width: 1200px; margin: 0 auto; padding: var(--s4) var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s5);
}
.brand { display: inline-flex; align-items: center; gap: var(--s3); color: var(--ink); text-decoration: none; font: 700 22px/1 var(--display); }
.mark { width: 32px; height: 32px; }
.mark rect { fill: var(--bar); }
.mark path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.mark circle { fill: #fff; }
.top nav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); }
.top nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.top nav a:hover { text-decoration: underline; }

/* type */

h1, h2 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: 38px; line-height: 42px; letter-spacing: -0.025em; max-width: 20ch; }
h1 span { display: block; }
h2 { font-size: 30px; line-height: 36px; letter-spacing: -0.015em; max-width: 24ch; }
h3 { font-size: 20px; line-height: 28px; font-weight: 600; margin: 0 0 var(--s2); }
p { margin: 0 0 var(--s4); max-width: 38em; }
.lede { font-size: 18px; line-height: 28px; color: var(--dim); margin-top: var(--s4); max-width: 34em; }
.intro { margin-top: var(--s4); }

@media (min-width: 960px) {
  h1 { font-size: 54px; line-height: 58px; }
  h2 { font-size: 40px; line-height: 46px; }
  h3 { font-size: 23px; line-height: 30px; }
  .lede { font-size: 20px; line-height: 30px; }
}

section { padding: var(--section) 0 0; }
section:last-of-type { padding-bottom: var(--section); }

/* buttons: the menu's selection bar is the only filled thing on the page */

.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s5) 0 0; }
.button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border-radius: 6px; border: 1px solid light-dark(#7c879b, #5b6a92);
  color: var(--ink); font: 600 16px/1.2 var(--sans); text-decoration: none;
  transition: background-color 120ms, border-color 120ms;
}
.button:hover { background: var(--panel); }
.button.primary { background: var(--bar); border-color: var(--bar); color: #fff; }
.button.primary:hover { background: var(--bar-hover); border-color: var(--bar-hover); }
.button.primary:active { background: var(--bar-active); box-shadow: inset 0 1px 0 rgb(0 0 0 / 0.25); }
@media (max-width: 599px) {
  .actions .button { width: 100%; justify-content: center; }
}

/* the screen band */

.hero { padding-top: var(--s6); }
.screen {
  margin-top: var(--s6);
  padding: var(--s6) var(--gutter);
  background: linear-gradient(var(--screen-top), var(--screen-bottom));
  box-shadow: inset 0 1px #283452, inset 0 -1px #283452;
  color: #f1f5f9;
}
.shot.hero-shot { max-width: 1024px; margin: 0 auto; }
/* drawn at 1:1, its edges faded into the band: the PNG's glows stop hard at its sides */
.screen .shot img {
  border: 0; background: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 96px, #000 calc(100% - 96px), transparent), linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 96px, #000 calc(100% - 96px), transparent), linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-composite: intersect;
}
.hero-shot figcaption { color: #94a3b8; }
/* the phone crop has no glow at its edges, and its text sits close to them */
@media (max-width: 599px) {
  .screen .shot img { -webkit-mask-image: none; mask-image: none; }
}
.hero-shot figcaption a { color: #a5b4fc; }
.full { white-space: nowrap; }
@media (max-width: 599px) {
  .screen { padding-left: 0; padding-right: 0; }
  .hero-shot figcaption { padding: 0 var(--gutter); }
}

/* one deliberate moment: the mode set, when firmware hands the screen to iPXE. The
   script sets .modeset only on a visible page that allows motion, and removes it once
   the screen is back: without it, nothing covers the screen. */
.screen { position: relative; }
.modeset .screen::after { content: ""; position: absolute; inset: 0; background: #000; pointer-events: none; }

/* screenshots: bare, square, a hairline edge, linked to the full file */

.shot { margin: 0; }
.shot a { display: block; }
.shot img { border: 1px solid var(--edge); background: #000; image-rendering: auto; }
.shot a:hover img { border-color: var(--link); }
figcaption { margin-top: var(--s2); font-size: 14px; line-height: 20px; color: var(--dim); max-width: 38em; }

/* how it works: the three exchanges sit on a cable */

.cable { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; gap: var(--s5); position: relative; }
.cable li { position: relative; padding-left: var(--s5); }
.cable li::before { content: ""; position: absolute; left: 0; top: 0; bottom: calc(-1 * var(--s5)); border-left: 2px solid var(--edge); }
.cable li:last-child::before { bottom: 0; }
.cable li::after { content: ""; position: absolute; left: -5px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--edge); box-shadow: 0 0 0 2px var(--ink); }
.port { display: inline; margin-left: var(--s2); font: 400 14px/1 var(--mono); color: var(--dim); white-space: nowrap; }
.cable p:last-child { margin-bottom: 0; }

@media (min-width: 960px) {
  .cable { grid-template-columns: repeat(3, 1fr); gap: var(--s5); padding-top: 26px; }
  .cable li { padding-left: 0; padding-right: var(--s5); }
  .cable li::before { left: 0; right: calc(-1 * var(--s5)); top: -20px; bottom: auto; border-left: 0; border-top: 2px solid var(--edge); }
  .cable li:last-child::before { right: calc(100% - 12px); }
  .cable li::after { left: 0; top: -25px; }
}

.pair { display: grid; gap: var(--s6); margin-top: var(--s6); align-items: start; }
/* grid items may shrink below their content: code blocks scroll inside instead */
.pair > *, .trio > *, .steps > li, .cable > li { min-width: 0; }
@media (min-width: 960px) {
  .pair { grid-template-columns: 6fr 5fr; }
}

/* code */

pre {
  margin: var(--s4) 0; padding: var(--s4); overflow-x: auto;
  background: var(--panel); border: 1px solid var(--edge); border-radius: 8px;
  font-size: 14px; line-height: 22px; tab-size: 4;
}
@media (min-width: 960px) { pre { font-size: 15px; line-height: 24px; } }
pre code { font-size: inherit; overflow-wrap: normal; white-space: pre; }
.code { position: relative; }
.code pre { padding-right: 72px; }
.copy {
  position: absolute; top: var(--s2); right: var(--s2); min-height: 32px; padding: 0 var(--s3);
  border: 1px solid var(--edge); border-radius: 6px; background: var(--chip); color: var(--ink);
  font: 400 13px/1 var(--mono); cursor: pointer;
}
.copy:hover { border-color: var(--link); }
.copy:active { background: var(--edge); }
.copy[hidden] { display: none; }
/* announced to screen readers, not shown */
.status-line { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }

/* table: a hovered row turns into the menu's selection bar */

.table { margin-top: var(--s5); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; }
caption { text-align: left; caption-side: top; color: var(--dim); font-size: 14px; padding-bottom: var(--s2); }
th, td { text-align: left; vertical-align: top; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--edge); }
thead th { font-weight: 600; background: var(--panel); }
tbody th { font-weight: 600; white-space: nowrap; }
tbody td:nth-child(2) { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
@media (hover: hover) {
  tbody tr:hover { background: var(--bar); color: #fff; }
  tbody tr:hover code, tbody tr:hover td::before { color: #fff; }
}

@media (max-width: 599px) {
  table, caption, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { padding: var(--s3) 0; border-bottom: 1px solid var(--edge); }
  tbody th, tbody td { border: 0; padding: 0; }
  tbody td::before { content: attr(data-label) ": "; content: attr(data-label) ": " / ""; color: var(--dim); font-family: var(--sans); }
  tbody td:nth-child(2) { white-space: normal; }
}

.trio { display: grid; gap: var(--s5); margin-top: var(--s6); align-items: start; }
@media (min-width: 600px) and (max-width: 959px) {
  .trio { grid-template-columns: 1fr 1fr; }
  .trio > :last-child { grid-column: 1 / -1; }
}
/* columns in the images' aspect ratios: the three come out the same height */
@media (min-width: 960px) {
  .trio { grid-template-columns: 2.08fr 3.25fr 1.6fr; }
}

/* windows: a real sequence, so an ordered list */

.steps { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; gap: var(--s5); counter-reset: step; }
.steps li { counter-increment: step; }
.steps figcaption::before { content: counter(step) ". "; font-weight: 600; color: var(--ink); }
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.aside { margin-top: var(--s5); color: var(--dim); }

.status { font-size: 13px; line-height: 20px; }
@media (min-width: 960px) { .status { font-size: 14px; line-height: 22px; } }

/* limits: a plain list, one item flagged */

.limits { margin: var(--s5) 0; padding-left: 1.2em; max-width: 38em; }
.limits li { margin-bottom: var(--s2); }
.limits .erase { list-style: none; margin-left: -1.2em; padding-left: calc(1.2em - 3px); border-left: 3px solid var(--erase); }
.limits .erase strong { color: var(--erase); }

/* footer */

.bottom { border-top: 1px solid var(--edge); padding: var(--s5) 0 var(--s6); color: var(--dim); font-size: 15px; }
.bottom p { margin: 0; }
