
:root {
  --text: #111111;
  --muted: #646464;
  --link: #1f1f1f;
  --content-width: 74ch;
  --sidebar-width: 16ch;
  --layout-gap: 1.5rem;
  --layout-width: calc(var(--content-width) + var(--sidebar-width) + var(--layout-gap));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: #ffffff;
  color: var(--text);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  z-index: 100;
  padding: 0.4rem 0.8rem;
  background: var(--text);
  color: #ffffff;
}

.skip-link:focus {
  left: 0.5rem;
}

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

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

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

.site-header {
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 1rem 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.header-main {
  display: grid;
  gap: 0.45rem;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 1em;
  font-weight: 600;
}

.top-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a.active {
  color: var(--text);
  text-decoration: underline;
}

.page-grid {
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 0.25rem 1rem 2rem;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, var(--content-width));
  gap: var(--layout-gap);
}

.page-grid.no-sidebar .page-content {
  grid-column: 2;
  max-width: var(--content-width);
  width: 100%;
  margin: 0;
}

.section-nav {
  position: sticky;
  top: 1rem;
  height: fit-content;
}

.section-nav ul {
  margin: 0;
  padding-left: 1.1rem;
}

.section-nav a {
  color: var(--muted);
  text-decoration: none;
}

.section-nav a.active,
.section-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.page-content {
  width: 100%;
  max-width: var(--content-width);
  min-width: 0;
}

.hero-shell,
.content-shell {
  margin: 0;
  padding: 0;
  background: transparent;
}

.hero-shell {
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-headline h1 {
  margin: 0.4rem 0 0.65rem;
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  line-height: 1.2;
}

.hero-headline p {
  margin: 0;
  color: var(--muted);
}

.route-grid {
  margin-top: 0.85rem;
}

.route-card {
  display: block;
  margin: 0 0 0.45rem;
  color: inherit;
  text-decoration: none;
}

.route-card h2 {
  display: inline;
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.route-card p {
  display: inline;
  margin: 0;
  color: var(--muted);
}

.route-card p::before {
  content: " - ";
}

.content-shell :is(h1, h2, h3, h4) {
  margin: 1.4rem 0 0.6rem;
  line-height: 1.25;
  font-weight: 600;
}

.content-shell h1 {
  margin-top: 0;
  font-size: clamp(1.45rem, 2.9vw, 2rem);
}

.content-shell p,
.content-shell ul,
.content-shell ol {
  margin: 0 0 0.9rem;
}

.content-shell img {
  max-width: 100%;
  height: auto;
}

.content-shell pre {
  overflow-x: auto;
  padding: 0.75rem;
  background: #f5f5f5;
}

.content-shell code {
  font-family: inherit;
}

.content-shell .lead-image {
  display: block;
  margin: 0;
}

.content-shell .image-credit {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.content-shell .image-credit a {
  color: inherit;
}

.home-links {
  margin: 0 0 1rem;
}

.profile-inline {
  float: right;
  width: 130px;
  max-width: 34%;
  margin: 0 0 0.5rem 1rem;
}

@media (max-width: 960px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  .page-grid.no-sidebar {
    grid-template-columns: 1fr;
  }

  .page-grid.no-sidebar .page-content {
    grid-column: 1;
    max-width: 100%;
  }

  .section-nav {
    position: static;
  }
}

@media (max-width: 640px) {
  .profile-inline {
    float: none;
    display: block;
    margin: 0 auto 1rem;
    max-width: min(220px, 70%);
    width: 100%;
  }
}
