:root {
  --tape: #f7ce3e;
  --ink: #15202b;
  --paper: #f6f8f4;
  --muted: #47535e;
  --net: #1457a8;
  --print: #b3261e;
  --account: #5b2a86;
  --files: #0b6b4b;
  --machine: #15202b;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --run: clamp(3.5rem, 22vw, 20rem);
  --heavy: "Arial Black", "Archivo Black", "Helvetica Neue", Arial, sans-serif;
  --text: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --ui: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.site-footer :focus-visible {
  outline-color: var(--tape);
}

h1,
h2,
h3 {
  font-family: var(--heavy);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

code {
  font-size: 0.92em;
  background: #e4e9e2;
  padding: 0.05em 0.3em;
  overflow-wrap: anywhere;
}

.skip {
  position: absolute;
  left: -100vw;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
}

.skip:focus {
  left: 0;
  top: 0;
  z-index: 2;
}

/* Header */

.site-header {
  background: var(--tape);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.1rem var(--gutter);
  font-family: var(--ui);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--heavy);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 1.75rem;
  height: 1.75rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

/* Patch panel: the home hero and the 404 page */

.hero {
  background: var(--tape);
  padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
}

.hero h1 {
  padding: 0 var(--gutter);
  font-size: clamp(2.6rem, 9.5vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 11ch;
  box-sizing: content-box;
}

.hero-note {
  margin: 1.25rem 0 clamp(2rem, 4vw, 3.5rem);
  padding: 0 var(--gutter) 0 calc(var(--run) + 1.25rem);
  max-width: calc(36rem + var(--run));
}

.panel {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.panel li {
  border-bottom: 2px solid var(--ink);
}

.panel a {
  --c: var(--ink);
  position: relative;
  display: block;
  padding: 0.8rem var(--gutter) 0.8rem calc(var(--run) + 1.25rem);
  font-family: var(--ui);
  font-size: clamp(1.15rem, 2.6vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* The cable runs in from off-screen so sliding it never shows a gap. */
.panel a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -2rem;
  width: calc(var(--run) - 1.6rem);
  height: 0.5rem;
  margin-top: -0.25rem;
  background: var(--c);
  transition: transform 160ms ease-out;
}

.panel a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(var(--run) - 2.6rem);
  width: 2.6rem;
  height: 1.25rem;
  margin-top: -0.625rem;
  border-radius: 2px 0.45rem 0.45rem 2px;
  background: linear-gradient(to right, var(--c) 45%, var(--paper) 45%, var(--paper) 52%, var(--c) 52%);
  transition: transform 160ms ease-out;
}

.panel a:hover,
.panel a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.panel a:hover::before,
.panel a:hover::after,
.panel a:focus-visible::before,
.panel a:focus-visible::after {
  transform: translateX(0.75rem);
}

.panel a:hover,
.panel a:focus-visible {
  --c: var(--tape);
}

.panel a:focus-visible {
  outline-offset: -3px;
  outline-color: var(--tape);
}

.net { --c: var(--net); }
.print { --c: var(--print); }
.account { --c: var(--account); }
.files { --c: var(--files); }
.machine { --c: var(--machine); }

.panel a.net { --c: var(--net); }
.panel a.print { --c: var(--print); }
.panel a.account { --c: var(--account); }
.panel a.files { --c: var(--files); }
.panel a.machine { --c: var(--machine); }

.panel a:hover,
.panel a:focus-visible {
  --c: var(--tape);
}

/* Reading pages */

.page {
  padding: clamp(2rem, 5vw, 4.5rem) var(--gutter) clamp(3rem, 6vw, 6rem);
}

.page-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  letter-spacing: -0.035em;
  max-width: 16ch;
}

.lede {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.5;
  max-width: 34em;
  margin: 1.25rem 0 0;
}

.prose {
  max-width: 38em;
}

.prose h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin: 2.75rem 0 0.75rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.mail {
  display: inline-block;
  margin: 0.75rem 0 0;
  padding: 0.65rem 1.1rem;
  background: var(--tape);
  border: 2px solid var(--ink);
  font-family: var(--ui);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.mail:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Guides */

.guide-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 40em);
  gap: clamp(2rem, 6vw, 6rem);
  margin-top: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.guide-index {
  position: sticky;
  top: 1.5rem;
  font-family: var(--ui);
  font-size: 1rem;
  line-height: 1.3;
}

.guide-index h2 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.guide-index ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-index li {
  --c: var(--ink);
  border-left: 0.5rem solid var(--c);
  padding: 0.3rem 0 0.3rem 0.7rem;
  margin-bottom: 0.35rem;
}

.guide {
  --c: var(--ink);
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  scroll-margin-top: 1.5rem;
}

.guide:last-child {
  margin-bottom: 0;
}

.guide::before {
  content: "";
  display: block;
  height: 0.5rem;
  background: var(--c);
  margin-bottom: 0.9rem;
}

.guide-kind {
  margin: 0 0 0.3rem;
  font-family: var(--ui);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c);
}

.guide h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
}

.guide ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.guide li {
  margin-bottom: 0.55rem;
  padding-left: 0.25rem;
}

.guide li::marker {
  font-family: var(--ui);
  font-weight: 700;
}

.guide p {
  margin: 0;
}

.guide .escalate {
  border-left: 3px solid var(--c);
  padding-left: 0.9rem;
}

/* Home: below the panel */

.first-checks {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.5rem clamp(2rem, 6vw, 6rem);
  padding: clamp(3rem, 6vw, 5.5rem) var(--gutter);
}

.first-checks h2 {
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  letter-spacing: -0.03em;
}

.first-checks ol {
  margin: 0;
  padding-left: 1.6rem;
  max-width: 34em;
}

.first-checks li {
  margin-bottom: 1rem;
}

.first-checks li::marker {
  font-family: var(--heavy);
  font-weight: 900;
}

.first-checks strong {
  font-family: var(--ui);
}

.first-checks .after {
  grid-column: 2;
  margin: 0;
  max-width: 34em;
}

/* 404: one plug, pulled out of its cable */

.unplugged {
  position: relative;
  height: 1.25rem;
  margin: clamp(2rem, 5vw, 3.5rem) 0;
}

.unplugged::before {
  content: "";
  position: absolute;
  top: 0.375rem;
  left: 0;
  width: 42%;
  height: 0.5rem;
  background: var(--print);
}

.unplugged::after {
  content: "";
  position: absolute;
  top: 0;
  left: calc(42% + 3rem);
  width: 2.6rem;
  height: 1.25rem;
  border-radius: 2px 0.45rem 0.45rem 2px;
  background: linear-gradient(to right, var(--print) 45%, var(--paper) 45%, var(--paper) 52%, var(--print) 52%);
}

.lost {
  flex: 1;
}

.lost .hero-note {
  padding-left: var(--gutter);
  max-width: 38rem;
}

.lost a {
  font-weight: 700;
}

/* Footer */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.75rem var(--gutter);
  font-family: var(--ui);
  font-size: 0.98rem;
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 760px) {
  body {
    font-size: 1.0625rem;
  }

  .guide-layout,
  .first-checks {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-index {
    position: static;
  }

  .first-checks .after {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel a::before,
  .panel a::after {
    transition: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .guide-index {
    display: none;
  }

  .guide-layout {
    display: block;
  }
}
