/* Foundation */

@font-face {
  font-family: "Patrick Hand";
  src: url("../fonts/patrick-hand.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper-channels: 241 231 208;
  --paper: rgb(var(--paper-channels));
  --paper-highlight: #fbf4e3;
  --ink-channels: 23 52 74;
  --ink: rgb(var(--ink-channels));
  --route: #315f78;
  --secure: #4e7054;
  --accent: #a74c39;
  --ink-muted: #465b65;
  --rule-strong: rgb(var(--ink-channels) / 64%);
  --rule: rgb(var(--ink-channels) / 36%);
  --rule-soft: rgb(var(--ink-channels) / 20%);
  --mono:
    "Courier Prime", "American Typewriter", "Nimbus Mono PS", "Courier New", Courier,
    monospace;
  --annotation: "Patrick Hand", "Segoe Print", "Bradley Hand", sans-serif;
  --gutter: clamp(28px, 4cqi, 58px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #c8c6bc;
  color: var(--ink);
  font-family: var(--mono);
  line-height: 1.35;
}

body::after {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .08;
  background-image: radial-gradient(rgb(63 50 30 / 48%) .45px, transparent .7px);
  background-size: 4px 5px;
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--route);
  outline-offset: 3px;
}

[id] { scroll-margin-top: 16px; }

:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd) { margin: 0; }

button, input, select, textarea { font: inherit; }

svg { display: block; }

.icon {
  width: var(--icon-size, 25px);
  height: var(--icon-size, 25px);
  flex: 0 0 var(--icon-size, 25px);
  color: var(--icon-color, currentColor);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:where(.site-shell, .drawing-sheet, .kingdom-chapter, .system-map, .host-frame,
  .proxmox-frame, .vm-grid) { min-width: 0; }

.site-shell { container: page / inline-size; }

/* Paper and navigation */

.drawing-sheet {
  position: relative;
  width: min(1420px, calc(100% - 24px));
  margin: 12px auto 38px;
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  border-radius: 3px 7px 4px 6px;
  background-color: var(--paper);
  background-image:
    radial-gradient(at 82% 7%, rgb(115 83 38 / 6%), transparent 28%),
    radial-gradient(at 6% 90%, rgb(255 255 255 / 30%), transparent 31%),
    linear-gradient(101deg, transparent 0 47%, rgb(67 54 32 / 3%) 50%, transparent 53%),
    linear-gradient(rgb(var(--ink-channels) / 3.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--ink-channels) / 3.5%) 1px, transparent 1px),
    linear-gradient(rgb(var(--ink-channels) / 1.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--ink-channels) / 1.5%) 1px, transparent 1px);
  background-size: auto, auto, auto, 24px 24px, 24px 24px, 6px 6px, 6px 6px;
  box-shadow: 0 15px 38px rgb(48 42 31 / 22%);

  &::before {
    position: absolute;
    inset: 7px;
    pointer-events: none;
    content: "";
    border: 1px solid rgb(var(--ink-channels) / 18%);
  }
}

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: 280px 1fr 30px;
  align-items: center;
  gap: 22px;
  height: 76px;
  margin: 0 29px;
  border-bottom: 2px solid var(--ink);

  &::after {
    position: absolute;
    inset: auto 0 -5px;
    content: "";
    border-bottom: 1px solid var(--rule);
  }
}

.wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;

  strong {
    letter-spacing: .025em;
    font-size: 1.125rem;
  }

  span {
    margin-top: 3px;
    font-size: .5625rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
}

.anchor-nav {
  display: flex;
  justify-self: end;
  gap: clamp(18px, 2.8cqi, 42px);

  a {
    padding: 10px 0;
    border-bottom: 1px solid transparent;
    font-size: .6875rem;
    font-weight: 800;
    text-decoration: none;

    &:where(:hover, :focus-visible) {
      border-color: var(--ink);
    }
  }
}

.registration {
  position: relative;
  display: block;
  width: 21px;
  height: 21px;
  border: 1px solid var(--ink);
  border-radius: 50%;

  &::before, &::after {
    position: absolute;
    content: "";
    background: var(--ink);
  }

  &::before {
    top: 9px;
    left: -6px;
    width: 31px;
    height: 1px;
  }
  &::after {
    top: -6px;
    left: 9px;
    width: 1px;
    height: 31px;
  }
}

.mobile-anchor-nav { display: none; }

/* Introduction */

.hero {
  padding: clamp(44px, 4.5cqi, 62px) var(--gutter) clamp(38px, 3.5cqi, 50px);

  h1 {
    color: var(--ink);
    font-size: clamp(3.625rem, 6cqi, 5.375rem);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -.073em;
    text-shadow: .45px 0 var(--ink);
    white-space: nowrap;
  }

  .positioning {
    max-width: 30ch;
    margin-top: 20px;
    font-size: clamp(1.3125rem, 2.05cqi, 1.8125rem);
    font-weight: 700;
    line-height: 1.34;
    letter-spacing: -.025em;
  }
}

.intro-block { max-width: 900px; }

.eyebrow {
  margin-bottom: 17px;
  color: var(--accent);
  font-size: .6875rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .075em;
}

/* Evidence and footer */

.registers {
  margin: 0 var(--gutter);
  border-top: 4px double var(--ink);
}

.registers-chapter {
  display: flex;
  min-height: 126px;
  flex-direction: column;
  justify-content: center;
  padding: 26px 4px 23px;
  border-bottom: 1px solid rgb(var(--ink-channels) / 34%);
  background: linear-gradient(90deg, rgb(49 95 120 / 6%), transparent 63%);

  span {
    color: var(--accent);
    font-size: .625rem;
    font-weight: 900;
    letter-spacing: .1em;
  }
  h2 {
    margin-top: 9px;
    font-size: clamp(1.875rem, 3cqi, 2.625rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.045em;
  }
}

.register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  /* This register is intentionally a fixed 2×2 composition. */
  > article {
    display: flex;
    min-width: 0;
    min-height: 280px;
    flex-direction: column;
    padding: 28px clamp(22px, 2.8cqi, 38px) 25px;
    border-right: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    background: rgb(251 244 227 / 20%);

    &:nth-child(2n) { border-right: 0; }
    &:nth-child(n + 3) { border-bottom: 0; }
    &:where(#method, #tools) { background: rgb(221 208 180 / 18%); }

    > header {
      --icon-size: 29px;
      --icon-color: var(--route);
      display: grid;
      grid-template-columns: 31px 1fr;
      gap: 11px;
      min-height: 48px;

      > div {
        display: flex;
        flex-direction: column;
      }
      h3 {
        font-size: 1.1875rem;
        line-height: 1.1;
      }
      small {
        margin-top: 5px;
        color: var(--ink-muted);
        font: 400 1rem/1.15 var(--annotation);
      }
    }
  }
}
.register-content { padding-top: 13px; }

.experience-list {
  section {
    margin-bottom: 13px;
    padding-bottom: 13px;
    border-bottom: 1px dashed rgb(var(--ink-channels) / 22%);

    &:last-child {
      margin-bottom: 0;
      padding-bottom: 0;
      border-bottom: 0;
    }
  }

  h4, small {
    display: block;
    font-family: var(--mono);
  }
  h4 { font-size: .75rem; }
  small {
    margin-top: 4px;
    color: var(--accent);
    font-size: .6875rem;
    font-weight: 900;
  }
}
.experience-list p,
.register-content li,
.contact-copy p { font: 400 1.0625rem/1.38 var(--annotation); }
.experience-list p { margin-top: 7px; }

.register-content ul {
  padding: 0;
  list-style: none;
}
.register-content li {
  position: relative;
  margin: 8px 0;
  padding-left: 17px;
}
.register-content li::before {
  position: absolute;
  left: 0;
  content: "✓";
  color: var(--secure);
  font: .6875rem var(--mono);
}

.tool-list > div {
  display: flex;
  margin-bottom: 10px;
  color: var(--ink-muted);
  font-size: .875rem;
  line-height: 1.45;
}
.tool-list dt {
  flex: 0 0 62px;
  color: var(--ink);
  font-weight: 900;
}
.tool-list dd { min-width: 0; }

.contact-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-style: normal;

  a {
    margin-top: 9px;
    border-bottom: 1px solid var(--ink);
    font-size: .9375rem;
    font-weight: 900;
    text-decoration: none;
  }
  span {
    margin-top: 12px;
    font: 400 .8125rem var(--annotation);
  }
}

.sheet-footer {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  margin: 0 var(--gutter);
}

.sheet-footer-minimal small {
  margin-left: auto;
  color: var(--ink-muted);
  font-size: .5625rem;
}

.drawing-sheet--error .masthead { grid-template-columns: 1fr 30px; }
.error-page {
  min-height: 500px;
  padding: 120px var(--gutter);
}
.error-page h1 {
  margin-top: 14px;
  font-size: clamp(2.75rem, 6cqi, 5rem);
  line-height: 1;
  letter-spacing: -.07em;
}
.error-page > p:not(.eyebrow) {
  margin-top: 18px;
  font: 400 1.3125rem/1.35 var(--annotation);
}
.back-link {
  display: inline-block;
  margin-top: 28px;
  font-weight: 900;
}

/* Responsive adjustments */

@container page (width >= 1700px) {
  .page-flow { padding-inline: 29px; }
  .hero {
    padding-right: 0;
    padding-left: 0;
  }
  .registers { margin-inline: 0; }
}

/* Swap navigation when the masthead cannot hold roughly 112 characters. */
@media (width < 112.5ch) {
  body { background: var(--paper); }
  .drawing-sheet {
    width: 100%;
    margin: 0;
    border-inline: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .masthead {
    grid-template-columns: 1fr 28px;
    height: 68px;
    margin-inline: 18px;
  }
  .masthead .anchor-nav { display: none; }
  .mobile-anchor-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 42px;
    margin-inline: 18px;
    border-bottom: 1px solid rgb(var(--ink-channels) / 28%);
  }
  .mobile-anchor-nav a {
    display: grid;
    place-items: center;
    padding: 11px clamp(2px, 1.3cqi, 5px) 10px;
    border-right: 1px solid var(--rule-soft);
    font-size: clamp(.5625rem, 2.57cqi, .625rem);
    font-weight: 800;
    text-decoration: none;
  }
  .mobile-anchor-nav a:last-child { border-right: 0; }
  .hero { padding-top: 36px; }
}

/* Recompose the sheet when it cannot hold roughly 90 characters. */
@media (width < 90ch) {
  :root { --gutter: 14px; }
  .drawing-sheet {
    width: calc(100% - 6px);
    margin: 3px auto 20px;
    border-inline: 1px solid rgb(var(--ink-channels) / 55%);
  }
  .masthead {
    height: 64px;
    margin-inline: 12px;
  }
  .wordmark strong { font-size: 1rem; }
  .mobile-anchor-nav { margin-inline: 12px; }
  .hero { padding: 27px var(--gutter) 33px; }
  .hero .eyebrow {
    margin-bottom: 15px;
    font-size: .625rem;
  }
  .hero h1 {
    white-space: normal;
    font-size: clamp(2.375rem, 11.8cqi, 3.25rem);
    letter-spacing: -.066em;
  }
  .hero .positioning {
    max-width: 29ch;
    margin-top: 16px;
    font-size: clamp(1.0625rem, 4.62cqi, 1.125rem);
    line-height: 1.4;
  }
  .registers-chapter {
    min-height: 108px;
    padding: 23px 2px 20px;
  }
  .registers-chapter h2 { font-size: 1.6875rem; }
  .register-grid { display: block; }
  .register-grid > article {
    min-height: 0;
    padding: 24px 2px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    background: transparent;
  }
  .register-grid > :where(#method, #tools) { background: transparent; }
  .register-grid > article:last-child { border-bottom: 0; }
  .sheet-footer { min-height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Exhibit and system map */

/* Shared frame and type roles */

:where(.kingdom-chapter, .host-frame) {
  border: 4px double var(--ink);
  border-radius: 6px 9px 5px 8px;
  box-shadow: 4px 5px rgb(var(--ink-channels) / 7%);
}

:where(.chapter-tab, .kingdom-chapter-title small, .diagram-header h3) {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: .06em;
}

:where(
  .ingress-node small,
  .entry-line small,
  .module-description,
  .network-bus small,
  .offsite-backup .detail
) {
  color: var(--ink-muted);
  font-size: .75rem;
}

:where(.entry-line b, .network-bus strong, .remote-step strong) {
  font-size: .8125rem;
}

:where(.module-heading, .vm) h6 {
  font-size: 1.0625rem;
}

:where(.diagram-meta, .proxmox-frame > header span) {
  color: var(--ink-muted);
  font-size: .625rem;
}

:where(.host-annotation, .vm span) {
  color: var(--ink-muted);
  font-size: .8125rem;
}

:where(.host-service, .remote-step) .detail {
  color: var(--ink-muted);
  font-size: .6875rem;
}

.module-heading small, .vm > small {
  color: var(--accent);
  font-size: .6875rem;
  font-weight: 900;
}

.gateway > p, .vm .signal-path {
  color: var(--secure);
  font-size: .6875rem;
}

:where(.host-service, .offsite-backup) {
  display: grid;
  gap: 10px;
  color: var(--secure);
}

:where(.host-service h5, .offsite-backup h4) {
  margin-top: 3px;
}

.kingdom-chapter {
  container: kingdom / inline-size;
  position: relative;
  margin: 0 var(--gutter) 42px;
  padding: 0 16px 24px;
  background: rgb(var(--paper-channels) / 15%);
}

.chapter-tab {
  position: absolute;
  top: -9px;
  left: 18px;
  padding: 0 8px;
  background: var(--paper);
  font-size: .5625rem;
}

.kingdom-chapter-banner { padding: 31px 8px 24px; }

.kingdom-chapter-title {
  small {
    font-size: .6875rem;
  }

  h2 {
    margin-top: 8px;
    font-size: clamp(3rem, 5.2vw, 4.625rem);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -.075em;
  }

  p {
    margin-top: 13px;
    color: var(--ink-muted);
    font-size: 1rem;
  }
}

.system-map {
  padding: 0 8px;
}

.system-map-preamble {
  display: grid;
  grid-template-columns: minmax(320px, 1.08fr) minmax(300px, .92fr);
  align-items: start;
  gap: 18px clamp(24px, 3.8vw, 58px);
  margin-bottom: 26px;
}

.diagram-header {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--rule);

  h3 {
    font-size: .6875rem;
  }
}

.diagram-meta {
  display: flex;
  gap: 18px;
  font-weight: 900;
  letter-spacing: .06em;
}

.kingdom-context-note {
  align-self: start;
  width: min(520px, 100%);
  margin: 18px 0 0 6px;
  padding: 25px 20px 16px;
  font: 400 1.0625rem/1.35 var(--annotation);
  transform: rotate(-.75deg);
}

.taped-note {
  position: relative;
  border: 1px solid rgb(84 67 42 / 50%);
  background: rgb(251 244 227 / 94%);
  box-shadow: 2px 4px 8px rgb(54 43 25 / 15%);
}

.tape {
  position: absolute;
  top: -12px;
  left: 24px;
  width: 70px;
  height: 23px;
  background: rgb(124 129 72 / 53%);
  clip-path: polygon(3% 10%, 98% 0, 95% 91%, 0 100%);
  transform: rotate(-6deg);
}

.ingress {
  display: flex;
  grid-column: 2;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  gap: 5px;
  min-width: 0;
  min-height: 220px;
}

.ingress-node {
  --icon-size: 28px;
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 2px 8px;
  width: min(224px, 100%);
  min-height: 72px;
  padding: 8px 11px;

  .icon {
    z-index: 1;
    grid-row: 1 / 3;
  }
  h4 {
    font-size: 1rem;
    line-height: 1.1;
  }
  small {
    grid-column: 2;
  }
}

:where(.ingress-loop, .flow-arrow) {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ingress-loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: var(--ink);
  stroke-width: 1.6px;
}

.entry-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(220px, 100%);
  color: var(--route);
  text-align: center;

  small {
    margin-top: 2px;
  }
}

.flow-arrow {
  overflow: visible;
  stroke: currentColor;
  stroke-width: 1.5px;
}

.flow-arrow-line, .flow-arrow-head { vector-effect: non-scaling-stroke; }

.vertical-flow-arrow {
  width: 20px;
  height: 106px;
  margin-top: 8px;
}

/* Host and virtual machines */

.host-frame {
  background: rgb(251 244 227 / 60%);

  > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    min-height: 74px;
    padding: 17px 20px 15px;
    border-bottom: 1px solid var(--rule);
    background: linear-gradient(90deg, rgb(49 95 120 / 6%), transparent 78%);

    h4 {
      margin-top: 6px;
      font-size: clamp(1.25rem, 1.8vw, 1.5rem);
      line-height: 1.2;
    }
  }
}

.host-heading, .host-service > div, .offsite-backup > div,
.remote-endpoint > div, .remote-network > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.host-frame > header small, .host-service small,
.offsite-backup small, .remote-label {
  color: var(--accent);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .05em;
}

.host-annotation {
  max-width: 24ch;
  line-height: 1.3;
  text-align: right;
}

.host-facts {
  --icon-size: 22px;
  --icon-color: var(--route);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px dashed var(--rule);

  > li {
    display: grid;
    grid-template-columns: 23px 1fr;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 5px 8px;
    border-right: 1px solid rgb(var(--ink-channels) / 14%);

    &:last-child { border-right: 0; }
  }

  span {
    overflow-wrap: anywhere;
    font-size: .6875rem;
    line-height: 1.25;
  }
}

.proxmox-frame {
  margin: 11px;
  padding: 9px;
  border: 2px solid var(--ink);
  border-radius: 5px 7px 4px 6px;

  > header {
    --icon-size: 23px;
    --icon-color: var(--accent);
    display: grid;
    grid-template-columns: 25px 1fr auto;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 2px 5px 7px;
    border-bottom: 2px solid var(--ink);

    h5 { font-size: .8125rem; }
  }
}

.gateway {
  min-width: 0;
  margin-top: 10px;
  padding: 12px 14px 11px;
  border: 2px solid var(--route);
  background: rgb(251 244 227 / 78%);

  > p {
    margin-top: 7px;
  }
}

.module-heading {
  --icon-size: 31px;
  --icon-color: var(--accent);
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;

}
.module-title {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0 9px;
}

.module-description {
  grid-column: 2;
}

.gateway-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;

  span {
    padding: 4px 7px;
    border: 1px solid var(--rule);
    background: var(--paper-highlight);
    font-size: .75rem;
  }
}

.network-bus {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  min-height: 78px;
  color: var(--route);
  text-align: center;

  &::after {
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 2px;
    height: 18px;
    content: "";
    background: var(--route);
  }

}

.vm-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 17px;

  &::before {
    position: absolute;
    inset: 0 16.5% auto;
    height: 0;
    content: "";
    border-top: 2px solid var(--route);
  }
}

.vm {
  --icon-size: 31px;
  --icon-color: var(--route);
  position: relative;
  display: grid;
  grid-template-columns: 33px 1fr;
  align-content: center;
  gap: 5px 10px;
  min-height: 142px;
  padding: 30px 15px 15px;
  border: 2px solid var(--ink);
  background: rgb(251 244 227 / 78%);

  &::before {
    position: absolute;
    top: -17px;
    left: 50%;
    width: 0;
    height: 17px;
    content: "";
    border-left: 2px solid var(--route);
  }

  > small {
    position: absolute;
    top: 8px;
    right: 9px;
  }

  &:nth-of-type(3) { --icon-color: var(--accent); }
  h6 {
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
  .operator { color: var(--accent); }
  span {
    grid-column: 2;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .signal-path {
    margin-top: 5px;
  }
}

.host-service {
  --icon-size: 30px;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  min-height: 78px;
  padding: 13px 18px;
  border-top: 2px dashed var(--accent);

  h5 {
    font-size: .9375rem;
  }
  .detail {
    margin-top: 2px;
  }
}

/* Startup, backup and remote access */

.startup-and-backup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .62fr);
  align-items: end;
  gap: 26px;
}

.startup-note {
  width: min(520px, 100%);
  min-height: 150px;
  padding: 29px 22px 18px;
  transform: rotate(-.5deg);

  header {
    display: flex;
    justify-content: space-between;
    font-size: .8125rem;
    font-weight: 900;
  }
  h4 { font-size: inherit; }
  p {
    margin-top: 10px;
    font: 400 1rem/1.28 var(--annotation);
  }
  ol {
    margin-top: 10px;
    padding: 0;
    list-style: none;
    font-size: .6875rem;
  }
  li {
    position: relative;
    margin: 5px 0;
  }
  em {
    display: block;
    margin-top: 8px;
    color: var(--accent);
    font: 400 .9375rem/1.2 var(--annotation);
  }
}
.boot-step-number {
  position: relative;
  display: inline-block;
}
.boot-circle {
  position: absolute;
  top: -3px;
  left: -8px;
  width: 35px;
  height: 20px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4px;
}

.backup-cluster {
  display: grid;
  grid-template-rows: 70px auto;
  min-width: 0;
}

.backup-route {
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 70px;
  color: var(--accent);

  span {
    justify-self: end;
    font: 400 .9375rem/1.1 var(--annotation);
    transform: rotate(-.5deg);
  }
}
.backup-arrow {
  width: 70px;
  height: 18px;
  transform: rotate(90deg);
}

.offsite-backup {
  --icon-size: 32px;
  grid-template-columns: 34px 1fr;
  align-content: center;
  min-height: 128px;
  padding: 20px 18px 18px;
  border: 2px dashed var(--secure);
  background: rgb(222 230 200 / 24%);

  h4 { font-size: 1rem; }
  .detail {
    margin-top: 3px;
  }
}

.remote-access {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 56px minmax(190px, .88fr) 56px minmax(190px, .86fr);
  align-items: center;
  gap: 8px;
  min-height: 100px;
  margin-top: 24px;
  padding: 16px 18px;
  border: 2px dashed var(--secure);
  background: rgb(222 230 200 / 18%);
  color: var(--secure);
}

.remote-step {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 0;
  min-height: 62px;
  color: var(--ink);

}
.remote-step-number {
  position: absolute;
  top: 1px;
  left: 0;
  color: var(--accent);
  font: 900 .5625rem/1 var(--mono);
}
.remote-endpoint {
  --icon-size: 38px;
  --icon-color: var(--secure);
  grid-template-columns: 40px 1fr;
  gap: 10px;
  padding: 10px 10px 8px 25px;
}
.remote-overlay {
  --icon-size: 23px;
  --icon-color: var(--secure);
  grid-template-columns: 24px 1fr;
  gap: 8px;
  padding: 18px 8px 8px 33px;
}
.remote-network { padding: 18px 8px 8px 24px; }
.remote-label { line-height: 1; }
.remote-connector {
  width: 56px;
  height: 20px;
}
.remote-annotation {
  position: absolute;
  right: 18px;
  bottom: 6px;
  font: 400 .875rem/1 var(--annotation);
  transform: rotate(-.6deg);
}

.path-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 16px;
  padding: 12px 0 9px;
  border-top: 1px solid var(--rule-soft);

  b, span { font-size: .625rem; }

  span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-muted);

    &::before {
      width: 27px;
      content: "";
      border-top: 2px solid currentColor;
    }
  }

  .route { color: var(--route); }
  .secure { color: var(--secure); }
  .backup { color: var(--accent); }
}

.exhibit-end {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--ink);
  color: var(--ink-muted);
  font-size: .5625rem;
  letter-spacing: .07em;

  b { color: var(--accent); }
}

/* Layout transitions */

/* Let the exhibit use the extra room when the drawing sheet reaches its maximum width. */
@container page (width >= 1700px) {
  .kingdom-chapter { margin-inline: 0; }
  .system-map { padding-inline: 0; }
}

/* Compact the wide map before changing its topology. */
@container kingdom (width <= 950px) {
  .system-map-preamble {
    grid-template-columns: minmax(240px, 1fr) minmax(230px, .9fr);
    gap: 18px 16px;
  }
  .host-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }
  .host-facts > li {
    border-right: 0;
    border-bottom: 1px solid rgb(var(--ink-channels) / 16%);
  }
  .host-facts > li:nth-last-child(-n + 2) { border-bottom: 0; }
  .host-facts > li:nth-child(2n) { padding-right: 0; }
  .remote-access {
    grid-template-columns:
      minmax(190px, 1fr) 34px minmax(170px, .9fr) 34px minmax(170px, .9fr);
    padding-inline: 12px;
  }
}

/* Move secondary paths and the third VM onto their own rows. */
@container kingdom (width <= 790px) {
  .vm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vm-grid::before {
    right: 25%;
    left: 25%;
  }
  .vm-grid:has(> .vm:nth-of-type(3):last-of-type) > .vm:last-of-type {
    grid-column: 1 / -1;
  }
  .startup-and-backup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .remote-access {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding: 17px 18px 20px;
  }
  .remote-step { min-height: 66px; }
  .remote-connector {
    width: 50px;
    height: 18px;
    margin: 16px 0 16px 18px;
    transform: rotate(90deg);
  }
  .remote-overlay, .remote-network { padding-left: 25px; }
  .remote-annotation {
    right: 14px;
    bottom: 8px;
  }
}

/* The exhibit itself cannot establish this breakpoint, so use the viewport here. */
@media (width < 90ch) {
  /* Exhibit */
  .kingdom-chapter {
    margin: 0 6px 38px;
    padding: 0 8px 17px;
    border-width: 3px;
    box-shadow: 3px 4px rgb(var(--ink-channels) / 7%);
  }
  .chapter-tab {
    left: 13px;
    font-size: .5rem;
  }
  .kingdom-chapter-banner { padding: 29px 5px 22px; }
  .kingdom-chapter-title h2 {
    margin-top: 9px;
    font-size: clamp(2.5625rem, 13vw, 3.5rem);
  }
  .kingdom-chapter-title p {
    margin-top: 11px;
    font-size: .9375rem;
  }
  .system-map { padding: 0 2px 8px; }
  .system-map-preamble {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px 12px;
    margin-bottom: 0;
  }
  .diagram-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 5px 12px;
    padding: 2px 0 10px;
  }
  .diagram-header h3 { font-size: .625rem; }
  .diagram-meta {
    gap: 9px;
    font-size: .5625rem;
  }
  .kingdom-context-note {
    grid-column: 1;
    width: calc(100% - 12px);
    margin: 3px 0 0 6px;
    padding: 23px 16px 15px;
    font-size: 1.0625rem;
  }
  .ingress {
    grid-column: 1;
    width: 100%;
    min-height: 198px;
  }
  .vertical-flow-arrow {
    height: 86px;
    margin-top: 7px;
  }

  /* Host and virtual machines */
  .host-frame > header {
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    padding: 13px 12px 12px;
  }
  .host-frame > header small { font-size: .6875rem; }
  .host-frame > header h4 { font-size: 1.0625rem; }
  .host-annotation {
    max-width: none;
    font-size: .75rem;
    text-align: left;
  }
  .host-facts {
    gap: 0 10px;
    padding: 4px 10px;
  }
  .host-facts > li {
    min-height: 48px;
    padding: 7px 0;
  }
  .host-facts span { font-size: .75rem; }
  .proxmox-frame {
    margin: 7px;
    padding: 8px;
  }
  .proxmox-frame > header { grid-template-columns: 26px 1fr; }
  .proxmox-frame > header span {
    grid-column: 2;
    font-size: .75rem;
  }
  .gateway {
    margin-top: 9px;
    padding: 11px;
  }
  .gateway .module-heading small,
  .gateway > p,
  .gateway .gateway-capabilities span { font-size: .75rem; }
  .network-bus {
    min-height: 86px;
    padding-inline: 4px;
  }
  .network-bus strong { font-size: .75rem; }
  .vm-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 0 0 25px;
  }
  .vm-grid::before {
    inset: 0 auto 12px 7px;
    width: 0;
    height: auto;
    border-top: 0;
    border-left: 2px solid var(--route);
  }
  .vm-grid:has(> .vm:nth-of-type(3):last-of-type) > .vm:last-of-type {
    grid-column: auto;
  }
  .vm {
    grid-template-columns: 31px 1fr;
    min-height: 118px;
    padding: 27px 12px 13px;
  }
  .vm::before {
    top: 50%;
    left: -18px;
    width: 18px;
    height: 0;
    border-top: 2px solid var(--route);
    border-left: 0;
  }
  .vm h6 { font-size: 1rem; }
  .vm span { font-size: .75rem; }
  .host-service {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 12px;
  }
  .host-service small, .host-service .detail { font-size: .6875rem; }
  .host-service h5 { font-size: .8125rem; }

  /* Startup, backup and remote access */
  .startup-and-backup {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .backup-cluster {
    order: 1;
    grid-template-rows: 58px auto;
  }
  .backup-route {
    grid-template-columns: 1fr 24px;
    height: 58px;
  }
  .backup-route span { font-size: .875rem; }
  .backup-arrow {
    width: 58px;
    height: 16px;
  }
  .offsite-backup { min-height: 115px; }
  .startup-note {
    order: 2;
    width: 100%;
    min-height: 0;
  }
  .startup-note p { font-size: .9375rem; }
  .remote-access {
    margin-top: 20px;
    padding: 14px 10px;
  }
  .remote-label { font-size: .6875rem; }
  .remote-step strong { font-size: .75rem; }
  .remote-annotation {
    position: static;
    align-self: flex-end;
    margin: 8px 4px 2px;
    font-size: .8125rem;
  }
  .path-key {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .path-key b, .path-key span { font-size: .6875rem; }
  .exhibit-end { font-size: .5rem; }
}

@container kingdom (width <= 320px) {
  .host-facts { grid-template-columns: 1fr; }
  .host-facts > li:nth-last-child(2) { border-bottom: 1px solid rgb(var(--ink-channels) / 16%); }
}

