:root {
  color-scheme: light;
  --ink: oklch(0.24 0.035 255);
  --muted: oklch(0.52 0.035 250);
  --paper: oklch(0.985 0.013 226);
  --surface: oklch(0.998 0.006 210);
  --line: oklch(0.88 0.038 220);
  --blue: oklch(0.53 0.16 242);
  --teal: oklch(0.48 0.09 180);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", "Nunito Sans", Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid color-mix(in oklch, var(--line) 75%, transparent);
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1120px, calc(100% - 48px));
  min-height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
}

.nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
}

.nav-link:hover,
.breadcrumbs a:hover,
.footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 80px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.page-heading {
  padding: 52px 0 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
}

.page-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.study-entry {
  min-height: 48px;
  margin-top: 20px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: var(--blue);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 750;
  transition: background-color 160ms ease, transform 160ms ease;
}

.study-entry:hover {
  background: color-mix(in oklch, var(--blue) 88%, black);
  transform: translateY(-1px);
}

.study-entry:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--blue) 38%, transparent);
  outline-offset: 3px;
}

.catalog-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.35;
}

.topic-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: topics;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}

.topic-list li {
  min-width: 0;
  min-height: 52px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border-bottom: 1px solid color-mix(in oklch, var(--line) 72%, transparent);
  overflow-wrap: anywhere;
  counter-increment: topics;
}

.topic-list li::before {
  content: counter(topics, decimal-leading-zero);
  padding-top: 1px;
  color: var(--blue);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.topic-list--one-column {
  grid-template-columns: minmax(0, 1fr);
}

.footer {
  min-height: 68px;
  padding: 20px max(24px, calc((100% - 1120px) / 2));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--ink);
  font-weight: 750;
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .nav,
  .page-shell {
    width: calc(100% - 32px);
  }

  .brand span {
    display: none;
  }

  .page-heading {
    padding: 38px 0 22px;
  }

  .topic-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .topic-list li {
    min-height: 48px;
  }

  .footer {
    padding-inline: 16px;
  }
}
