:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #272724;
  background: #fdfdfc;
  font-size: 14px;
  --muted: #767672;
  --line: #e5e5e1;
  --serif: Georgia, "Songti SC", "STSong", serif;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
button,
input {
  color: inherit;
  font: inherit;
}
button,
input,
a {
  outline-offset: 5px;
}
:focus-visible {
  outline: 2px solid #777770;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  background: transparent;
}
button:hover {
  border-color: #b8b8b2;
}
.primary {
  background: #292926;
  border-color: #292926;
  color: #fff;
}
.primary:hover {
  background: #464642;
  border-color: #464642;
}
.quiet {
  border-color: transparent;
}
.quiet:hover {
  border-color: transparent;
  color: #272724;
}
.small {
  font-size: 12px;
  padding: 5px 8px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
h1 {
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: -0.5px;
  font-weight: 700;
}
h2 {
  font-size: 21px;
  line-height: 1.45;
  font-weight: 650;
}
h3 {
  font-size: 18px;
  line-height: 1.5;
}
p {
  line-height: 1.85;
}
.muted,
.footnote {
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  min-height: 100vh;
}
.topbar,
.content,
.reader-footer {
  max-width: 788px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
.topbar {
  padding-top: 44px;
}
.logo {
  display: inline-block;
  color: #242422;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.75px;
  line-height: 1.4;
  text-decoration: none;
}
.topbar::after {
  content: "";
  display: block;
  margin-top: 24px;
  border-bottom: 1px solid var(--line);
}
.tag-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 20px;
  row-gap: 10px;
  margin-top: 22px;
}
.tag-nav:empty {
  display: none;
}
.tag-nav button,
.tag-button {
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  text-align: left;
}
.tag-nav button:hover,
.tag-button:hover {
  color: #272724;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.tag-nav button.active,
.tag-nav button[aria-pressed="true"],
.tag-button[aria-pressed="true"] {
  color: #272724;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.main {
  min-width: 0;
}
.content {
  padding-top: 36px;
}
.article-list {
  padding: 0;
}
.article-count {
  margin: 0;
}
.article-item {
  margin-bottom: 44px;
  padding: 0;
}
.article-item h2 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: -0.25px;
  font-weight: 700;
}
.article-item h2 a {
  border: 0;
  padding: 0;
  border-radius: 0;
  font: inherit;
  letter-spacing: inherit;
  background: transparent;
  text-align: left;
  text-decoration: none;
}
.article-item h2 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.article-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 3px;
}
.tags .tag-button {
  font-size: 12px;
}
.article-item p {
  margin: 15px 0 0;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.85;
  color: #4d4d47;
  overflow-wrap: anywhere;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.pagination button {
  border: 0;
  padding: 6px 0;
  font-size: 12px;
}
.pagination button:not(:disabled):hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.reader-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 0 0 30px;
}
.reader-heading > a {
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.reader-heading > a:hover {
  color: #272724;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.doc-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 28px;
}
.doc-title {
  font-size: 30px;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.preview {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
  color: #373732;
  overflow-wrap: anywhere;
}
.preview h1 {
  font-size: 30px;
  margin-bottom: 26px;
  color: #272724;
}
.preview h2 {
  margin: 34px 0 17px;
  color: #272724;
  font-size: 23px;
}
.preview h3 {
  margin: 30px 0 15px;
  color: #272724;
  font-size: 19px;
}
.preview p {
  line-height: inherit;
  margin-bottom: 23px;
}
.preview li {
  margin: 5px 0;
}
.preview img {
  display: block;
  max-width: 100%;
  height: auto;
}
.preview pre {
  overflow: auto;
  margin: 26px 0;
  padding: 18px;
  background: #f1f1ee;
  border-radius: 3px;
  line-height: 1.65;
}
.preview code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82em;
}
.preview :not(pre) > code {
  padding: 2px 4px;
  background: #f1f1ee;
  border-radius: 2px;
}
.preview blockquote {
  margin: 26px 0;
  padding-left: 21px;
  border-left: 2px solid #d3d3cd;
  color: #77776f;
}
.preview table {
  display: block;
  max-width: 100%;
  overflow: auto;
  border-collapse: collapse;
}
.preview td,
.preview th {
  border: 1px solid var(--line);
  padding: 8px 12px;
}
.preview hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 34px 0;
}
.reader-footer {
  margin-top: 56px;
  padding-bottom: 38px;
}
.reader-footer::before {
  content: "";
  display: block;
  border-top: 1px solid var(--line);
  margin-bottom: 18px;
}
.reader-footer button {
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}

.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-inner {
  width: 340px;
  max-width: 100%;
}
.auth-inner .logo {
  margin-bottom: 44px;
}
.auth-inner h1 {
  margin-bottom: 28px;
  font-size: 24px;
}
.auth-description,
.auth-notice {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.auth-description {
  margin-bottom: 16px;
}
.auth-notice:empty {
  display: none;
}
.auth-notice:not(:empty) {
  margin: 16px 0;
}
.auth-options {
  margin-top: 10px;
  text-align: right;
}
.auth-options button {
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}
label {
  display: block;
  margin: 18px 0 7px;
  font-size: 13px;
}
input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9d9d3;
  border-radius: 4px;
  padding: 10px 11px;
  background: transparent;
}
.auth-inner .primary {
  width: 100%;
  margin: 24px 0 18px;
  padding: 11px;
}
.switch {
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.switch button {
  padding: 0 3px;
  color: #272724;
}
.footnote {
  margin-top: 30px;
  font-size: 11px;
  line-height: 1.7;
}
.auth-inner .footnote {
  text-align: center;
}
.error {
  border: 1px solid #efdfd9;
  border-radius: 4px;
  padding: 12px;
  margin: 16px 0;
  background: #fff8f5;
  color: #a03d32;
  font-size: 13px;
  line-height: 1.6;
}
.empty {
  padding: 32px 0;
}
.empty h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
}
.empty p {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 16px;
}
.loading {
  padding: 44px 0;
  color: var(--muted);
  font-size: 13px;
}
.boot {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 22px;
}
.boot span {
  color: var(--muted);
  font-size: 13px;
}
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: none;
  max-width: calc(100vw - 48px);
  background: #292926;
  color: #fff;
  padding: 12px 17px;
  border-radius: 4px;
  font-size: 13px;
}

@media (max-width: 600px) {
  .topbar {
    padding-top: 30px;
  }
  .logo {
    font-size: 23px;
  }
  .tag-nav {
    column-gap: 17px;
    margin-top: 19px;
  }
  .topbar::after {
    margin-top: 21px;
  }
  .content {
    padding-top: 30px;
  }
  .article-item {
    margin-bottom: 37px;
  }
  .article-item h2 {
    font-size: 20px;
  }
  .article-item p {
    margin-top: 13px;
  }
  .reader-heading {
    margin-bottom: 26px;
  }
  .doc-title,
  .preview h1 {
    font-size: 27px;
  }
  .preview {
    font-size: 16px;
  }
  .preview h2 {
    font-size: 22px;
  }
  .reader-footer {
    margin-top: 42px;
    padding-bottom: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
