:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #20292f;
  --muted: #65727a;
  --line: #e1e6e9;
  --accent: #315f70;
  --focus: #1769aa;
  --header-height: 48px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
}

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

.site-header {
  position: relative;
  z-index: 1;
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand {
  font-size: 14px;
  font-weight: 620;
  letter-spacing: -0.025em;
  text-decoration: none;
}

#header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.back-link,
.source-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

.back-link:hover,
.source-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.app-main {
  display: flow-root;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
}

.loading-message,
.error-message {
  margin: 28px 24px;
  color: var(--muted);
  font-size: 14px;
}

.library,
.empty-state {
  width: min(100% - 48px, 720px);
  margin: 40px auto;
}

.page-heading {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.page-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.page-list-item {
  border-bottom: 1px solid var(--line);
}

.page-link {
  min-height: 52px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

.page-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.frame-shell {
  width: 100%;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  overflow: hidden;
  background: var(--paper);
}

.document-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: var(--paper);
}

.frame-shell--hide-notion-topbar .document-frame {
  height: calc(100% + 44px);
  transform: translateY(-44px);
}

.text-link {
  color: var(--accent);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 5;
  top: 8px;
  left: -10000px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}

.skip-link:focus {
  left: 16px;
}

@media (max-width: 600px) {
  .site-header {
    padding: 0 16px;
  }

  #header-nav {
    gap: 14px;
  }

  .library,
  .empty-state {
    width: calc(100% - 32px);
    margin: 32px auto;
  }
}
