:root {
  color-scheme: light;
  --ink: #1f2724;
  --muted: #6d7772;
  --line: #d8dfda;
  --paper: #fbfcfb;
  --soft: #f1f5f2;
  --accent: #2b6d62;
  --accent-2: #9a5a3d;
  --max: 1160px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Iowan Old Style", Charter, Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.62;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

.hero {
  min-height: 72vh;
  padding: 76px max(24px, calc((100vw - var(--max)) / 2)) 42px;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1.12fr);
  gap: 34px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(247, 250, 247, 0.96), rgba(238, 244, 240, 0.7)),
    linear-gradient(150deg, #fbfcfb, #edf3ef);
  position: relative;
}

.hero nav,
.site-header {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.hero nav {
  position: absolute;
  top: 24px;
  right: max(24px, calc((100vw - var(--max)) / 2));
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(38px, 5.2vw, 66px);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 600;
}

.hero p {
  max-width: 680px;
  margin: 0;
  font-size: 21px;
  color: var(--muted);
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.entry-links a,
.note-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
  border-radius: 6px;
}

.entry-links a {
  padding: 8px 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 14px max(20px, calc((100vw - var(--max)) / 2));
  background: rgba(251, 252, 250, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 680; color: var(--ink); text-decoration: none; }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 760px);
  gap: 42px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 82px;
  padding-top: 10px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  color: var(--muted);
}

input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  background: white;
}

.results {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.results a {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.note {
  min-width: 0;
}

.note h1 {
  margin-top: 0;
  font-size: 42px;
  line-height: 1.06;
  letter-spacing: 0;
  font-weight: 640;
}

.note h2 {
  margin-top: 38px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.path,
.muted {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
}

.path {
  margin-bottom: 12px;
}

.missing-link {
  color: var(--accent-2);
  border-bottom: 1px dotted currentColor;
}

pre {
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.search-band,
.band {
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.note-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  text-decoration: none;
}

.note-card span { color: var(--ink); font-weight: 700; }
.note-card small { color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; }

.graph-page {
  max-width: 900px;
}

.connection-list section {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.lede {
  color: var(--muted);
  font-size: 20px;
}

@media (max-width: 780px) {
  .layout {
    display: block;
  }

  .sidebar {
    position: static;
    margin-bottom: 28px;
  }

  .hero {
    min-height: 70vh;
    padding-top: 82px;
    grid-template-columns: 1fr;
  }

  .hero nav {
    left: 20px;
    right: 20px;
    justify-content: flex-start;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 19px;
  }

}