/* igresc/homelab theme. Tokens come from the redesign handoff; every
   component below uses them. The site is dark only. */

:root {
  /* Ground and surfaces */
  --hl-bg: #0B0E0D;
  --hl-bg-alt: #0D110F;
  --hl-panel: #0F1412;
  --hl-panel-2: #121816;
  --hl-panel-3: #171E1B;
  --hl-active: #16201B;

  /* Lines */
  --hl-line: #1E2723;
  --hl-line-soft: #1A221F;
  --hl-line-strong: #24302B;
  --hl-line-control: #2C3833;

  /* Text, all at least 4.5:1 on --hl-bg and the panels */
  --hl-text: #E4EBE7;
  --hl-text-body: #C8D3CD;
  --hl-text-2: #A9B6AF;
  --hl-text-3: #94A39B;
  --hl-text-4: #7E8C85;
  --hl-text-deco: #788680;

  /* Accent */
  --hl-accent: #C3A6FF;
  --hl-on-accent: #06140C;

  /* Semantic colors, independent of the accent */
  --hl-compute: #5EE6A0;
  --hl-storage: #7DB4FF;
  --hl-network: #F2B24C;
  --hl-warn: #F2B24C;
  --hl-warn-bg: #1A160D;
  --hl-warn-line: #4A3A1C;
  --hl-warn-text: #E8D5AE;
  --hl-ok-bg: #13241B;
  --hl-ok-line: #2E5A42;
  --hl-ok-text: #8FCBA9;
  --hl-prod-bg: #241D10;
  --hl-prod-line: #5A4520;
  --hl-prod-text: #D9B677;

  /* Type */
  --hl-font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hl-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Radius and layout */
  --hl-radius-sm: 4px;
  --hl-radius: 6px;
  --hl-radius-md: 8px;
  --hl-radius-lg: 10px;
  --hl-container: 1200px;
  --hl-shell: 1440px;
  --hl-prose: 760px;
  --hl-gutter: 24px;
  --hl-section-y: 112px;
  --hl-target: 44px;
}

/* Theme variables. zensical.toml sets the slate scheme with custom primary
   and accent colors, so these are the only values that apply. */
[data-md-color-scheme="slate"] {
  --md-hue: 150;
  --md-default-bg-color: var(--hl-bg);
  --md-default-bg-color--light: var(--hl-panel);
  --md-default-bg-color--lighter: var(--hl-panel-2);
  --md-default-bg-color--lightest: var(--hl-panel-3);
  --md-default-fg-color: var(--hl-text);
  --md-default-fg-color--light: var(--hl-text-2);
  --md-default-fg-color--lighter: var(--hl-text-4);
  --md-default-fg-color--lightest: var(--hl-line-strong);

  --md-primary-fg-color: var(--hl-bg);
  --md-primary-fg-color--light: var(--hl-panel);
  --md-primary-fg-color--dark: var(--hl-bg);
  --md-primary-bg-color: var(--hl-text);
  --md-primary-bg-color--light: var(--hl-text-2);

  --md-accent-fg-color: var(--hl-accent);
  --md-accent-fg-color--transparent: color-mix(in srgb, var(--hl-accent) 12%, transparent);
  --md-accent-bg-color: var(--hl-on-accent);

  --md-typeset-color: var(--hl-text-body);
  --md-typeset-a-color: var(--hl-accent);
  --md-typeset-table-color: var(--hl-line);
  --md-typeset-table-color--light: var(--hl-panel);

  --md-code-bg-color: var(--hl-panel);
  --md-code-fg-color: var(--hl-text-body);

  --md-footer-bg-color: var(--hl-bg);
  --md-footer-bg-color--dark: var(--hl-bg);
  --md-footer-fg-color: var(--hl-text-2);
  --md-footer-fg-color--light: var(--hl-text-4);
  --md-footer-fg-color--lighter: var(--hl-text-4);

  --md-text-font-family: var(--hl-font-sans);
  --md-code-font-family: var(--hl-font-mono);
}

body,
input {
  font-family: var(--hl-font-sans);
  font-feature-settings: normal;
}

body {
  background: var(--hl-bg);
  color: var(--hl-text-body);
}

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

::selection {
  background: var(--hl-accent);
  color: var(--hl-on-accent);
}

:focus-visible {
  outline: 2px solid var(--hl-accent);
  outline-offset: 2px;
}

/* Shell width */
.md-grid {
  max-width: var(--hl-shell);
}

/* ---------------------------------------------------------------- Header */

.md-header {
  background: var(--hl-bg);
  border-bottom: 1px solid var(--hl-line);
  box-shadow: none;
  color: var(--hl-text);
}

.md-header--shadow {
  box-shadow: none;
}

.hl-header__inner {
  gap: 20px;
  min-height: 64px;
  padding: 0 var(--hl-gutter);
}

.hl-header .md-header__button {
  margin: 0;
  padding: 10px;
  color: var(--hl-text-2);
}

.hl-header .md-header__button:hover {
  opacity: 1;
  color: var(--hl-text);
}

.hl-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: var(--hl-target);
  color: var(--hl-text);
  font: 500 14px/1 var(--hl-font-mono);
  white-space: nowrap;
}

.hl-brand:hover {
  color: var(--hl-text);
}

.hl-brand__mark {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--hl-accent);
}

.hl-brand__slash {
  color: var(--hl-text-4);
}

.hl-header__search {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.hl-header .md-search {
  width: 100%;
  max-width: 520px;
  padding: 0;
}

.hl-header .md-search__button {
  width: 100%;
  height: var(--hl-target);
  padding: 0 72px 0 42px;
  border: 1px solid var(--hl-line-strong);
  border-radius: var(--hl-radius);
  background: var(--hl-panel);
  color: var(--hl-text-4);
  font: 400 14px/1 var(--hl-font-sans);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hl-header .md-search__button:hover,
.hl-header .md-search__button:focus {
  border-color: var(--hl-line-control);
  background: var(--hl-panel);
  color: var(--hl-text-3);
}

.hl-header .md-search__button::before {
  top: 13px;
  left: 14px;
  width: 16px;
  height: 16px;
  background-color: var(--hl-text-4);
}

.hl-header .md-search__button::after {
  top: 10px;
  right: 10px;
  padding: 3px 6px;
  border: 1px solid var(--hl-line-control);
  border-radius: var(--hl-radius-sm);
  background: transparent;
  color: var(--hl-text-3);
  content: "Ctrl K";
  font: 500 12px/1.2 var(--hl-font-mono);
}

[data-platform^="Mac"] .hl-header .md-search__button::after {
  content: "⌘K";
}

.hl-header__links {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.hl-header__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--hl-target);
  padding: 0 12px;
  border-radius: var(--hl-radius);
  color: var(--hl-text-2);
  font-size: 14px;
}

.hl-header__link:hover,
.hl-header__link[aria-current] {
  color: var(--hl-text);
}

/* The theme shows the search field from 60em and an icon below that. */
@media screen and (min-width: 60em) {
  .hl-header__search-icon {
    display: none;
  }
}

@media screen and (max-width: 59.984375em) {
  .hl-header__search {
    justify-content: flex-end;
  }
}

@media screen and (max-width: 44.984375em) {
  .hl-header__inner {
    gap: 8px;
    padding: 0 8px 0 4px;
  }

  .hl-header__links {
    display: none;
  }
}

/* --------------------------------------------------------------- Layout */

.md-main__inner {
  margin-top: 0;
}

.md-content {
  min-width: 0;
  padding: 36px 56px 96px;
}

.md-content__inner {
  max-width: var(--hl-prose);
  margin: 0 auto;
  padding: 0;
}

.md-content__inner::before {
  display: none;
}

@media screen and (min-width: 76.25em) {
  .md-content {
    border-left: 1px solid var(--hl-line);
  }
}

@media screen and (max-width: 44.984375em) {
  .md-content {
    padding: 24px 16px 64px;
  }
}

/* -------------------------------------------------------------- Sidebar */

.md-nav {
  font-size: 14px;
  line-height: 1.4;
}

.md-nav__link {
  align-items: center;
}

.hl-nav__num {
  flex: 0 0 26px;
  color: var(--hl-text-4);
  font: 500 12px/1.4 var(--hl-font-mono);
}

.md-nav__link--active .hl-nav__num {
  color: var(--hl-accent);
}

.hl-nav__count {
  margin-left: auto;
  padding-left: 8px;
  color: var(--hl-text-4);
  font: 400 12px/1.4 var(--hl-font-mono);
}

/* The theme pushes the chevron right too, which leaves the count mid-row. */
[dir] .md-nav__link .hl-nav__count ~ .md-icon:last-child {
  margin-left: 4px;
}

@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    width: 280px;
    padding: 28px 0 48px;
  }

  .md-sidebar--primary .md-sidebar__inner {
    padding: 0 16px 0 20px;
  }

  /* Beats the theme's [dir=ltr] indent, so pages line up with their label. */
  .md-sidebar .md-nav--primary .md-nav__list {
    padding: 0;
  }

  .md-nav--primary .md-nav__item {
    padding: 0;
  }

  .md-nav--primary .md-nav__link {
    gap: 10px;
    margin: 2px 0 0;
    padding: 7px 10px;
    border-radius: 5px;
    color: var(--hl-text-2);
  }

  .md-nav--primary .md-nav__container > .md-nav__link {
    margin: 0;
    padding: 0;
  }

  .md-nav--primary .md-nav__link:is(a, label):hover {
    background: var(--hl-panel);
    color: var(--hl-text);
  }

  .md-nav--primary a.md-nav__link--active {
    background: var(--hl-active);
    color: var(--hl-text);
  }

  /* The design has no nav title. The site name is in the header. */
  .md-nav--primary > .md-nav__title {
    display: none;
  }

  /*
    A collapsed section is an ordinary row with its page count. An open
    section becomes a group: a mono label over its pages, 22px from its
    neighbours. Rows inside a group sit 2px apart.
  */
  .md-nav--primary > .md-nav__list > .md-nav__item:not(.md-nav__item--nested) + .md-nav__item--nested,
  .md-nav--primary > .md-nav__list > .md-nav__item--nested:has(> .md-nav__toggle:checked),
  .md-nav--primary > .md-nav__list > .md-nav__item--nested:has(> .md-nav__toggle:checked) + .md-nav__item {
    margin-top: 22px;
  }

  .md-nav--primary > .md-nav__list > .md-nav__item--nested:has(> .md-nav__toggle:checked) > .md-nav__link {
    margin: 0;
    padding: 0 10px 6px;
    background: none;
    color: var(--hl-text-4);
    font: 500 11px/1.4 var(--hl-font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .md-nav--primary > .md-nav__list > .md-nav__item--nested:has(> .md-nav__toggle:checked) > .md-nav__link :is(.md-nav__link, .hl-nav__count) {
    color: inherit;
    font: inherit;
  }

  .md-nav--primary > .md-nav__list > .md-nav__item--nested:has(> .md-nav__toggle:checked) > .md-nav__link:is(label, :has(> a)):hover,
  .md-nav--primary > .md-nav__list > .md-nav__item--nested:has(> .md-nav__toggle:checked) > .md-nav__link a:hover {
    background: none;
    color: var(--hl-text);
  }

  /* A section with an index page wraps its link and toggle in one row. */
  .md-nav--primary .md-nav__container {
    gap: 0;
  }

  .md-nav--primary .md-nav__container > a.md-nav__link {
    flex: 1 1 auto;
    min-width: 0;
    background: none;
    color: inherit;
  }

  .md-nav--primary .md-nav__container:has(> a:hover),
  .md-nav--primary .md-nav__container:has(> a.md-nav__link--active) {
    background: var(--hl-panel);
    color: var(--hl-text);
  }

  .md-nav--primary .md-nav__container:has(> a.md-nav__link--active) {
    background: var(--hl-active);
  }

  /* Nested groups, such as Alert runbooks inside Runbooks */
  .md-nav--primary .md-nav[data-md-level="2"] {
    padding-left: 12px;
  }

  /* The count shows a row opens. The design has no chevrons. */
  .md-nav--primary .md-nav__icon {
    display: none;
  }
}

/* ------------------------------------------------------------------ TOC */

@media screen and (min-width: 60em) {
  .md-sidebar--secondary {
    width: 220px;
    padding: 40px 24px 48px 8px;
  }

  .md-nav--secondary {
    font-size: 13.5px;
  }

  .md-nav--secondary > .md-nav__title {
    padding: 0 0 8px 12px;
    background: none;
    box-shadow: none;
    color: var(--hl-text-4);
    font: 500 11px/1.4 var(--hl-font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .md-nav--secondary .md-nav__item {
    padding: 0;
  }

  .md-nav--secondary .md-nav__link {
    margin: 0;
    padding: 6px 12px;
    border-left: 1px solid var(--hl-line-strong);
    color: var(--hl-text-3);
  }

  .md-nav--secondary .md-nav .md-nav__link {
    padding-left: 24px;
  }

  .md-nav--secondary .md-nav__link:hover {
    color: var(--hl-text);
  }

  .md-nav--secondary .md-nav__link--active {
    border-left-color: var(--hl-accent);
    color: var(--hl-text);
  }
}

/* -------------------------------------------------------------- Article */

.md-typeset {
  color: var(--hl-text-body);
  font-size: 16.5px;
  line-height: 1.7;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: var(--hl-text);
  font-weight: 600;
}

.md-typeset h1 {
  margin: 0 0 20px;
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.md-typeset h2 {
  margin: 2.2em 0 0.6em;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.md-typeset h3 {
  margin: 1.8em 0 0.5em;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.md-typeset a {
  color: var(--hl-accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--hl-accent) 40%, transparent);
  text-underline-offset: 3px;
}

.md-typeset a:hover {
  color: var(--hl-text);
  text-decoration-color: currentcolor;
}

.md-typeset .headerlink {
  color: var(--hl-text-4);
  text-decoration: none;
}

.md-typeset :not(pre) > code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-sm);
  background: var(--hl-panel);
  color: var(--hl-text);
  font-size: 0.85em;
}

.md-typeset pre > code {
  border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-md);
  background: var(--hl-panel);
  font-size: 13.5px;
}

.md-typeset table:not([class]) {
  border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-md);
  background: transparent;
  font-size: 14px;
}

.md-typeset table:not([class]) th {
  min-width: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hl-line);
  background: var(--hl-panel);
  color: var(--hl-text-4);
  font: 500 11px/1.4 var(--hl-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.md-typeset table:not([class]) td {
  padding: 12px 16px;
  border-top: 1px solid var(--hl-line-soft);
}

.md-typeset table:not([class]) tbody tr:first-child td {
  border-top: 0;
}

.md-typeset table:not([class]) tbody tr:hover {
  background: transparent;
  box-shadow: none;
}

/* Admonitions are full-outline boxes, never a left bar. */
.md-typeset .admonition,
.md-typeset details {
  border: 1px solid var(--hl-line-strong);
  border-radius: var(--hl-radius-md);
  background: var(--hl-panel);
  box-shadow: none;
  color: var(--hl-text-body);
  font-size: 15px;
}

.md-typeset .admonition-title,
.md-typeset summary {
  border: 0;
  background: transparent;
  color: var(--hl-text);
}

.md-typeset .admonition-title::before,
.md-typeset summary::before {
  background-color: var(--hl-text-3);
}

.md-typeset :is(.admonition, details):is(.warning, .caution, .attention, .danger, .error) {
  border-color: var(--hl-warn-line);
  background: var(--hl-warn-bg);
  color: var(--hl-warn-text);
}

.md-typeset :is(.warning, .caution, .attention, .danger, .error) > :is(.admonition-title, summary)::before {
  background-color: var(--hl-warn);
}

/* Breadcrumb */
.hl-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
  color: var(--hl-text-3);
  font: 400 12px/1.6 var(--hl-font-mono);
}

.md-typeset .hl-crumbs a {
  color: var(--hl-text-3);
  text-decoration: none;
}

.md-typeset .hl-crumbs a:hover {
  color: var(--hl-text);
}

.hl-crumbs__sep {
  color: var(--hl-text-4);
}

.hl-crumbs [aria-current] {
  color: var(--hl-text-body);
}

/* ADR header and status panel */
.hl-adr {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 12px;
}

.md-typeset .hl-eyebrow {
  margin: 0 0 -8px;
  color: var(--hl-accent);
  font: 500 13px/1.4 var(--hl-font-mono);
  letter-spacing: 0.04em;
}

.md-typeset .hl-adr h1 {
  margin: 0;
}

.md-typeset .hl-lead {
  margin: 0;
  color: var(--hl-text-2);
  font-size: 19px;
  line-height: 1.55;
}

.md-typeset .hl-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 1px;
  margin: 8px 0 0;
  overflow: hidden;
  border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-md);
  background: var(--hl-panel);
}

/* Shadows fill the 1px gaps, so an empty track blends into the panel. */
.hl-status__cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  box-shadow: 1px 0 0 var(--hl-line), 0 1px 0 var(--hl-line);
}

.md-typeset .hl-status dt {
  margin: 0;
  color: var(--hl-text-4);
  font: 500 11px/1.4 var(--hl-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.md-typeset .hl-status dd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--hl-text);
  font-size: 14px;
  line-height: 1.4;
}

.md-typeset .hl-status__related {
  gap: 10px;
  font-family: var(--hl-font-mono);
}

.md-typeset .hl-status__related a {
  color: var(--hl-text);
}

.hl-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hl-text-4);
}

.hl-dot--pending {
  background: var(--hl-warn);
}

.hl-dot--done {
  background: var(--hl-compute);
}

.hl-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--hl-warn-line);
  border-radius: var(--hl-radius-md);
  background: var(--hl-warn-bg);
  color: var(--hl-warn-text);
  font-size: 15px;
  line-height: 1.6;
}

.hl-note svg {
  flex: 0 0 auto;
  margin-top: 3px;
  fill: none;
  stroke: var(--hl-warn);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.md-typeset .hl-note p {
  margin: 0;
}

/* Rollout gates */
.md-typeset .hl-gates {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-md);
  list-style: none;
}

.md-typeset .hl-gates__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  padding: 14px 16px;
  border-top: 1px solid var(--hl-line-soft);
  font-size: 15px;
  line-height: 1.55;
}

.md-typeset .hl-gates__item:first-child {
  border-top: 0;
}

.hl-gates__box {
  flex: 0 0 14px;
  height: 14px;
  margin-top: 4px;
  border: 1.5px solid #4A5852;
  border-radius: 3px;
}

.hl-gates__item--done .hl-gates__box {
  border-color: var(--hl-compute);
  background: var(--hl-compute);
}

.hl-gates__text {
  flex: 1 1 auto;
  min-width: 0;
}

.hl-gates__state {
  flex: 0 0 auto;
  color: var(--hl-warn);
  font: 500 12px/1.9 var(--hl-font-mono);
}

.hl-gates__item--done .hl-gates__state {
  color: var(--hl-compute);
}

/* Previous and next cards, then the source line */
.hl-pager {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 16px;
  margin-top: 56px;
}

.md-typeset .hl-pager__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--hl-line-strong);
  border-radius: var(--hl-radius-md);
  color: var(--hl-text);
  text-decoration: none;
}

.md-typeset .hl-pager__link:hover {
  border-color: var(--hl-line-control);
  background: var(--hl-panel);
  color: var(--hl-text);
}

.hl-pager__link--next {
  grid-column: -2;
  text-align: right;
}

.hl-pager__dir {
  color: var(--hl-text-4);
  font: 400 12px/1.4 var(--hl-font-mono);
}

.hl-pager__title {
  font-size: 16px;
  line-height: 1.4;
}

.md-typeset .hl-meta {
  margin: 32px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--hl-line);
  color: var(--hl-text-4);
  font: 400 12px/1.6 var(--hl-font-mono);
}

/* ---------------------------------------------------------- Page footer */

.md-footer-meta {
  border-top: 1px solid var(--hl-line);
  background: var(--hl-bg);
}

.md-footer-meta__inner {
  padding: 8px var(--hl-gutter);
}

.md-copyright {
  color: var(--hl-text-4);
  font: 400 12px/1.6 var(--hl-font-mono);
}

.md-top {
  border: 1px solid var(--hl-line-strong);
  background: var(--hl-panel);
  box-shadow: none;
  color: var(--hl-text-2);
}

/* The theme renders an empty repository slot when repo_url is unset. */
.md-header__source:not(:has(*)) {
  display: none;
}

/* ------------------------------------------------------- Buttons and kbd */

.hl-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--hl-target);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--hl-radius);
  color: var(--hl-text);
  font: 500 14px/1.2 var(--hl-font-sans);
  white-space: nowrap;
}

.hl-button--ghost {
  border-color: var(--hl-line-control);
}

.hl-button--ghost:hover {
  border-color: var(--hl-text-4);
  color: var(--hl-text);
}

.hl-button--primary {
  min-height: 48px;
  padding: 0 22px;
  background: var(--hl-accent);
  color: var(--hl-on-accent);
  font-size: 15px;
  font-weight: 600;
}

.hl-button--primary:hover {
  background: var(--hl-text);
  color: var(--hl-on-accent);
}

.hl-button--lg {
  min-height: 52px;
  padding: 0 26px;
  font-size: 16px;
}

/* ---------------------------------------------------------- Home header */

/* The landing renders no sidebar, so the drawer would be empty. */
body:has(.hl-landing) .hl-header__menu {
  display: none;
}

@media screen and (max-width: 44.984375em) {
  body:has(.hl-landing) .hl-header__inner {
    padding: 0 var(--hl-gutter) 0 calc(var(--hl-gutter) - 8px);
  }
}

/* -------------------------------------------------------------- Landing */

.md-main__inner:has(> .hl-landing) {
  max-width: none;
  margin: 0;
  padding: 0;
}

.hl-landing {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--hl-text);
  font-family: var(--hl-font-sans);
  -webkit-font-smoothing: antialiased;
}

.hl-landing :is(h1, h2, h3, p, ol, ul, figure, blockquote) {
  margin: 0;
}

.hl-landing :is(ol, ul) {
  padding: 0;
  list-style: none;
}

.hl-landing a {
  color: var(--hl-text-2);
}

.hl-landing a:hover {
  color: var(--hl-text);
}

.hl-landing a.hl-button--primary,
.hl-landing a.hl-button--primary:hover {
  color: var(--hl-on-accent);
}

.hl-landing a.hl-button--ghost {
  color: var(--hl-text);
}

.hl-wrap {
  box-sizing: border-box;
  max-width: var(--hl-container);
  margin: 0 auto;
  padding: 0 var(--hl-gutter);
}

.hl-mono {
  font-family: var(--hl-font-mono);
}

.hl-dim {
  color: var(--hl-text-4);
}

.hl-landing .hl-eyebrow {
  color: var(--hl-accent);
  font: 400 12px/1.4 var(--hl-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hl-label {
  color: var(--hl-text-3);
  font: 500 12px/1.4 var(--hl-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hl-led {
  display: inline-block;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--hl-text-4);
}

.hl-led--compute {
  background: var(--hl-compute);
}

.hl-led--storage {
  background: var(--hl-storage);
}

.hl-led--network {
  background: var(--hl-network);
}

/* Sections */

.hl-section {
  border-bottom: 1px solid var(--hl-line);
}

.hl-section--alt {
  background: var(--hl-bg-alt);
}

.hl-section__inner {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding-top: var(--hl-section-y);
  padding-bottom: var(--hl-section-y);
}

.hl-section__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
}

.hl-section__head h2 {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.hl-section__head p {
  color: var(--hl-text-2);
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
}

.hl-split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 48px;
}

.hl-split__side {
  display: flex;
  flex: 1 1 480px;
  flex-direction: column;
  gap: 36px;
  min-width: 0;
}

.hl-split__side--narrow {
  flex-basis: 340px;
  gap: 16px;
}

.hl-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Hero */

.hl-hero {
  border-bottom: 1px solid var(--hl-line);
  background-color: var(--hl-bg);
  background-image: radial-gradient(circle, #1B2521 1px, transparent 1.4px);
  background-size: 22px 22px;
}

.hl-hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 104px;
  padding-bottom: 96px;
}

.hl-hero__copy {
  display: flex;
  flex: 1 1 520px;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.hl-landing .hl-eyebrow--dot {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--hl-text-3);
}

.hl-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hl-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hl-accent) 14%, transparent);
}

.hl-hero__title {
  font-size: 64px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hl-hero__lead {
  max-width: 560px;
  color: var(--hl-text-2);
  font-size: 19px;
  line-height: 1.55;
  text-wrap: pretty;
}

.hl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hl-actions .hl-button--ghost {
  min-height: 48px;
  padding: 0 20px;
  font-size: 15px;
}

.hl-byline {
  color: var(--hl-text-4);
  font: 400 12.5px/1.5 var(--hl-font-mono);
}

.hl-terminal {
  flex: 1 1 440px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--hl-line-strong);
  border-radius: var(--hl-radius-lg);
  background: var(--hl-panel);
  box-shadow: 0 40px 90px -40px rgb(0 0 0 / 90%);
}

.hl-terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hl-line);
}

.hl-terminal__bar > span:not(.hl-terminal__path) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #26312C;
}

.hl-terminal__path {
  margin-left: 8px;
  color: var(--hl-text-4);
  font: 400 12px/1.4 var(--hl-font-mono);
}

.hl-terminal__body {
  margin: 0;
  padding: 22px 22px 26px;
  overflow-x: auto;
  color: var(--hl-text-body);
  font: 400 13.5px/1.85 var(--hl-font-mono);
}

.hl-terminal__prompt {
  color: var(--hl-accent);
}

.hl-terminal__dir {
  color: var(--hl-storage);
}

.hl-terminal__note {
  color: var(--hl-text-4);
}

.hl-terminal__cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--hl-accent);
  vertical-align: -3px;
}

/* Stats */

.hl-stats {
  border-bottom: 1px solid var(--hl-line);
}

.hl-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1px;
  padding: 0;
  border-right: 1px solid var(--hl-line);
  border-left: 1px solid var(--hl-line);
  background: var(--hl-line);
}

.hl-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px var(--hl-gutter);
  background: var(--hl-bg);
}

.hl-stat__value {
  font: 500 36px/1.2 var(--hl-font-mono);
  letter-spacing: -0.02em;
}

.hl-stat__label {
  color: var(--hl-text-3);
  font-size: 14px;
}

/* Rack elevation. One rack unit is 26px tall plus a 3px gap, so a row of
   --u units spans --u * 26px + (--u - 1) * 3px. */

.hl-rack {
  display: flex;
  flex: 0 1 520px;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.hl-rack__frame {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 16px 16px 8px;
  border: 1px solid var(--hl-line-strong);
  border-radius: var(--hl-radius-lg);
  background: var(--hl-panel);
  font-family: var(--hl-font-mono);
}

.hl-rack__row {
  display: flex;
  gap: 10px;
  height: calc(var(--u) * 26px + (var(--u) - 1) * 3px);
}

.hl-rack__spacer {
  height: max(calc(var(--u) * 26px - 3px), 4px);
}

.hl-rack__label {
  flex: none;
  width: 52px;
  color: var(--hl-text-deco);
  font-size: 11px;
  line-height: 26px;
  text-align: right;
}

.hl-rack__free {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border: 1px dashed #26302B;
  border-radius: 3px;
  color: var(--hl-text-deco);
  font-size: 11px;
}

.hl-rack__bays {
  display: flex;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.hl-rack__unit {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid #26302B;
  border-radius: 3px;
  background: var(--hl-panel-3);
  font-size: 12px;
}

.hl-rack__unit--passive {
  justify-content: space-between;
  border-color: #222B27;
  background-color: #141A17;
  background-image: repeating-linear-gradient(90deg, transparent 0 10px, #1B2320 10px 12px);
}

.hl-rack__unit--passive .hl-rack__name {
  color: var(--hl-text-3);
}

.hl-rack__name {
  overflow: hidden;
  color: var(--hl-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hl-rack__note {
  margin-left: auto;
  overflow: hidden;
  color: var(--hl-text-4);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hl-rack__unit--tall {
  align-items: stretch;
  gap: 14px;
  padding: 12px 14px;
}

.hl-rack__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.hl-rack__body .hl-rack__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.hl-rack__body .hl-rack__note {
  margin-left: 0;
  color: var(--hl-text-3);
}

.hl-rack__vent {
  flex: none;
  width: 120px;
  border-radius: 2px;
  background-image: repeating-linear-gradient(90deg, #222B27 0 3px, transparent 3px 7px);
}

.hl-rack__drives {
  display: grid;
  flex: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: 120px;
}

.hl-rack__drives span {
  border: 1px solid #2A3530;
  border-radius: 2px;
  background: #1F2825;
}

.hl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--hl-text-4);
  font: 400 12px/1.4 var(--hl-font-mono);
}

.hl-legend > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hl-legend .hl-legend__source {
  margin-left: auto;
}

/* Host table and cards */

.hl-table {
  overflow-x: auto;
  border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-md);
}

.hl-table .md-typeset__scrollwrap,
.hl-table .md-typeset__table {
  display: block;
  margin: 0;
  padding: 0;
}

.hl-table table {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  font-size: 14px;
}

.hl-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hl-line);
  color: var(--hl-text-4);
  font: 500 11px/1.4 var(--hl-font-mono);
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.hl-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hl-line-soft);
  color: var(--hl-text-2);
}

.hl-table td.hl-mono:first-child {
  color: var(--hl-text);
}

.hl-table td.hl-dim {
  color: var(--hl-text-4);
}

.hl-table tr:last-child td {
  border-bottom: 0;
}

.hl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}

.hl-cards--220 {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 12px;
}

.hl-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-md);
}

.hl-card h3 {
  font-size: 19px;
  font-weight: 600;
}

.hl-card p {
  color: var(--hl-text-2);
  font-size: 15px;
  line-height: 1.6;
}

.hl-card__kicker {
  color: var(--hl-text-4);
  font: 400 12px/1.4 var(--hl-font-mono);
}

.hl-landing .hl-card .hl-card__kicker {
  color: var(--hl-text-4);
  font-size: 12px;
}

.hl-card--panel {
  border-color: #222B27;
  border-radius: var(--hl-radius-lg);
  background: var(--hl-panel-2);
}

.hl-cards--220 .hl-card {
  gap: 6px;
  padding: 18px;
  border-color: var(--hl-line);
  border-radius: var(--hl-radius-md);
  background: var(--hl-panel);
}

.hl-cards--220 .hl-card p {
  font-size: 14px;
  line-height: 1.5;
}

.hl-card__name {
  color: var(--hl-text);
  font: 400 13px/1.4 var(--hl-font-mono);
}

/* Platform layers and toolbox */

.hl-layers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hl-layer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding: 22px 24px;
  border: 1px solid #222B27;
  border-radius: var(--hl-radius-md);
  background: var(--hl-panel-2);
}

.hl-layer__num {
  width: 28px;
  color: var(--hl-text-4);
  font: 400 12px/1.4 var(--hl-font-mono);
}

.hl-layer__name {
  flex: 0 0 200px;
  font-size: 18px;
  font-weight: 600;
}

.hl-layer__owner {
  flex: none;
  padding: 4px 10px;
  border-radius: var(--hl-radius-sm);
  background: var(--hl-accent);
  color: var(--hl-on-accent);
  font: 400 13px/1.4 var(--hl-font-mono);
}

.hl-layer__scope {
  flex: 1 1 280px;
  color: var(--hl-text-2);
  font-size: 15px;
}

.hl-toolbox {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 32px;
}

.hl-landing .hl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
}

.hl-chips li {
  padding: 6px 12px;
  border: 1px solid #26302B;
  border-radius: 999px;
}

/* Delivery lanes */

.hl-lanes {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-lg);
  background: var(--hl-panel);
}

.hl-lane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hl-lane + .hl-lane {
  padding-top: 20px;
  border-top: 1px solid var(--hl-line);
}

.hl-lane__title {
  color: var(--hl-accent);
  font: 400 11px/1.4 var(--hl-font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hl-landing .hl-lane__title--prod {
  color: var(--hl-warn);
}

.hl-landing .hl-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hl-step {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hl-step + .hl-step::before {
  content: "──›" / "";
  color: #4A5852;
  font-family: var(--hl-font-mono);
}

.hl-step--next::before {
  content: "┄┄›" / "";
}

.hl-step__box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #26302B;
  border-radius: var(--hl-radius);
  background: #161D1A;
}

.hl-step__box span {
  font-size: 15px;
  font-weight: 500;
}

.hl-step__box small {
  color: var(--hl-text-4);
  font: 400 11.5px/1.4 var(--hl-font-mono);
}

.hl-step--ok .hl-step__box {
  border-color: var(--hl-ok-line);
  background: var(--hl-ok-bg);
}

.hl-step--ok .hl-step__box small {
  color: var(--hl-ok-text);
}

.hl-step--prod .hl-step__box {
  border-color: var(--hl-prod-line);
  background: var(--hl-prod-bg);
}

.hl-step--prod .hl-step__box small {
  color: var(--hl-prod-text);
}

.hl-step--next .hl-step__box {
  border: 1px dashed #3A4842;
  background: none;
}

.hl-step--next .hl-step__box span {
  color: var(--hl-text-body);
}

/* Decisions */

.hl-adrs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-lg);
  background: var(--hl-line);
}

.hl-landing .hl-adrs__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  min-height: 120px;
  padding: 24px;
  background: var(--hl-bg-alt);
  color: var(--hl-text);
}

.hl-landing .hl-adrs__item:hover {
  background: var(--hl-panel-2);
  color: var(--hl-text);
}

.hl-adrs__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--hl-text-4);
  font: 400 12px/1.4 var(--hl-font-mono);
}

.hl-adrs__pending {
  color: var(--hl-warn);
}

.hl-adrs__title {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}

.hl-landing .hl-adrs__item--more {
  justify-content: flex-end;
  color: var(--hl-accent);
  font-size: 17px;
  font-weight: 500;
}

/* Principles */

.hl-principles .hl-section__inner {
  gap: 64px;
  padding-top: 120px;
  padding-bottom: 120px;
}

.hl-quote {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 920px;
}

.hl-quote blockquote {
  padding: 0;
  border: 0;
  color: var(--hl-text);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hl-quote p {
  max-width: 640px;
  color: var(--hl-text-2);
  font-size: 17px;
  line-height: 1.6;
}

.hl-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 32px;
}

.hl-rule {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--hl-line-control);
}

.hl-rule h3 {
  font-size: 17px;
  font-weight: 600;
}

.hl-rule p {
  color: var(--hl-text-2);
  font-size: 15px;
  line-height: 1.6;
}

/* Operations */

.hl-alerts {
  flex: 1 1 560px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-lg);
  background: var(--hl-bg);
}

.hl-alerts__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hl-line);
  color: var(--hl-text-4);
  font: 400 11px/1.4 var(--hl-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hl-alerts li + li {
  border-top: 1px solid #161D1A;
}

.hl-landing .hl-alerts a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 20px;
  color: var(--hl-text);
  font-size: 15px;
}

.hl-landing .hl-alerts a:hover {
  background: var(--hl-panel);
}

.hl-alerts__title {
  flex: 1;
  min-width: 0;
}

.hl-alerts__open {
  color: var(--hl-text-4);
  font: 400 12px/1.4 var(--hl-font-mono);
}

.hl-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
}

.hl-links a {
  display: block;
  padding: 8px 0;
}

/* Call to action and footer */

.hl-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-top: var(--hl-section-y);
  padding-bottom: 96px;
}

.hl-cta__copy {
  display: flex;
  flex: 1 1 520px;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.hl-cta h2 {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hl-cta p {
  max-width: 560px;
  color: var(--hl-text-2);
  font-size: 17px;
  line-height: 1.6;
}

.hl-landing-footer {
  border-top: 1px solid var(--hl-line);
  background: var(--hl-bg);
}

.hl-landing-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 28px;
  padding-bottom: 28px;
  color: var(--hl-text-4);
  font: 400 12px/1.6 var(--hl-font-mono);
}

.hl-landing-footer nav {
  display: flex;
  gap: 20px;
}

.hl-landing-footer a {
  color: var(--hl-text-2);
}

.hl-landing-footer a:hover {
  color: var(--hl-text);
}

/* Phones. The hero title steps from 64px to 40px. */

@media screen and (max-width: 44.984375em) {
  :root {
    --hl-section-y: 72px;
  }

  .hl-hero__inner {
    gap: 40px;
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .hl-hero__title {
    font-size: 40px;
    line-height: 1.05;
  }

  .hl-hero__lead {
    font-size: 17px;
  }

  .hl-section__inner {
    gap: 40px;
  }

  .hl-section__head h2 {
    font-size: 30px;
  }

  .hl-quote blockquote {
    font-size: 30px;
  }

  .hl-cta h2 {
    font-size: 34px;
  }

  .hl-lanes {
    padding: 20px;
  }

  .hl-rack__label {
    width: 40px;
  }

  .hl-rack__vent,
  .hl-rack__drives {
    width: 64px;
  }

  .hl-layer__name {
    flex-basis: auto;
  }

  .hl-legend .hl-legend__source {
    margin-left: 0;
  }

  .hl-rack__bays .hl-rack__note {
    display: none;
  }

  .hl-landing .hl-flow,
  .hl-step {
    flex-direction: column;
    align-items: flex-start;
  }

  .hl-landing .hl-flow {
    gap: 6px;
  }

  .hl-step {
    gap: 6px;
  }

  .hl-step + .hl-step::before {
    content: "↓" / "";
    padding-left: 16px;
  }

  .hl-step--next::before {
    content: "┆" / "";
  }
}
