:root {
  --bg: #f1f0ea;
  --text: #1d1d1f;
  --muted: #737377;
  --tree: #c7c7c2;
  --link: #3f6286;
  --active: #365c50;
  --content-top-offset: 117px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Helvetica Neue",
    Arial,
    sans-serif;
}

main {
  width: min(1080px, calc(100% - 48px));
  margin-left: max(24px, calc((100vw - 1080px) / 2 - 72px));
  margin-right: auto;
  padding-top: 72px;
  padding-bottom: 72px;
}

.content-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

.nav-column,
.content-panel {
  min-width: 0;
}

.content-panel {
  max-width: 650px;
  padding-top: var(--content-top-offset);
}

.content-panel h2 {
  margin: 0 0 18px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.content-panel h3 {
  margin: 30px 0 10px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
}

.content-panel p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.68;
}

.content-panel p:last-child {
  margin-bottom: 0;
}

.content-panel ul {
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.65;
}

.content-panel li {
  margin: 6px 0;
}

.archive-notice {
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

header {
  margin-bottom: 32px;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.tree {
  font-family:
    "SFMono-Regular",
    Menlo,
    Monaco,
    Consolas,
    monospace;
  font-size: 14px;
  line-height: 1.95;
}

.node {
  white-space: nowrap;
  min-height: 1.95em;
}

.root-node a {
  color: var(--text);
  font-weight: 600;
}

.branch {
  color: var(--tree);
}

.toggle {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0 0.7ch 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  display: inline-block;
  width: 3ch;
  text-align: left;
}

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

a.active {
  color: var(--active);
  font-weight: 600;
}

.children[hidden] {
  display: none;
}

@media (max-width: 820px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .content-panel {
    padding-top: 0;
  }
}

/* Papers */
.papers-panel {
  max-width: 760px;
}

.paper-list {
  margin: 0;
  padding-left: 1.6rem;
}

.paper {
  margin: 0 0 22px;
  padding-left: 4px;
}

.paper-title {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
}

.paper-meta,
.paper-venue,
.paper-links {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.45;
}

.paper-meta,
.paper-venue {
  color: var(--muted);
}

.paper-links {
  margin-top: 4px;
}

/* Talks */
.talks-panel {
  max-width: 780px;
}

.talk-list {
  margin: 0;
  padding-left: 1.6rem;
  font-size: 14px;
  line-height: 1.5;
}

.talk-list li {
  margin: 0 0 14px;
  padding-left: 4px;
}

.organized-list li {
  margin-bottom: 10px;
}

.talk-list em {
  color: var(--text);
}

.talk-list br + em {
  display: inline-block;
  margin-top: 2px;
}

/* Expandable directory labels */
.branch-label {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--link);
  font: inherit;
  cursor: pointer;
}

.branch-label:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tree .node {
  display: block;
}

.branch-label.active {
  color: var(--active);
  font-weight: 600;
}

.course-section {
  scroll-margin-top: 48px;
}

/* Filesystem-style course lists */
.course-tree {
  font-family:
    "SFMono-Regular",
    Menlo,
    Monaco,
    Consolas,
    monospace;
  font-size: 14px;
  line-height: 1.75;
  max-width: 760px;
}

.course-root {
  color: var(--text);
  font-weight: 600;
  min-height: 1.75em;
}

.course-row {
  display: grid;
  grid-template-columns: 4ch minmax(0, 1fr);
  align-items: start;
  min-height: 1.75em;
}

.course-branch {
  color: var(--tree);
  white-space: pre;
}

.course-entry {
  min-width: 0;
}

.course-entry a {
  color: var(--link);
}
