:root {
  color-scheme: dark;
  --background: #171717;
  --surface: #1c1c1c;
  --text: #f1f1f1;
  --muted: #b8b8b8;
  --faint: #858585;
  --line: #2b2b2b;
  --content-width: 46rem;
  --radius: 0.625rem;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-width: 20rem;
  background: var(--background);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

img,
video {
  display: block;
  max-width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.feed,
.article {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}

.feed__list {
  border-top: 1px solid var(--line);
}

.feed-card {
  position: relative;
  padding: 2rem 0 2.25rem;
  border-bottom: 1px solid var(--line);
}

.feed-card__hit-area {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}

.feed-card__hit-area:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 0.25rem;
}

.feed-card__title {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
  font-weight: 680;
  line-height: 1.4;
  letter-spacing: -0.012em;
}

.feed-card__title a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 0.2rem;
  border-radius: 0.15rem;
}

.feed-card__excerpt {
  margin: 0.65rem 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  letter-spacing: 0.008em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.feed-card__media {
  position: relative;
  z-index: 2;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}

.feed-card__media-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 0.25rem;
}

.feed-card__image,
.feed-card__video {
  width: 100%;
  max-height: min(42rem, 78vh);
  object-fit: contain;
  background: var(--surface);
}

.feed-card__video {
  aspect-ratio: 16 / 9;
}

.feed__sentinel {
  height: 1px;
}

.feed__fallback {
  display: block;
  padding: 1.5rem 0;
  color: var(--muted);
  text-align: center;
}

.collection-title {
  margin: 0;
  padding: 2.5rem 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 680;
}

.article {
  padding: 3.5rem 0 4rem;
}

.article__home {
  display: inline-block;
  margin-bottom: 3rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.article__home:hover,
.article__home:focus-visible {
  color: var(--text);
}

.article__title {
  margin: 0 0 2rem;
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.article__content {
  color: #dedede;
  font-size: 1.0625rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.article__content > *:first-child {
  margin-top: 0;
}

.article__content h2,
.article__content h3 {
  margin: 2.25em 0 0.75em;
  color: var(--text);
  line-height: 1.4;
}

.article__content p,
.article__content ul,
.article__content ol,
.article__content blockquote {
  margin: 1.2em 0;
}

.article__content a {
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 0.18em;
}

.article__content img,
.article__content video,
.article__content iframe {
  max-width: 100%;
  border-radius: var(--radius);
}

.article__content pre {
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111;
}

.article__content blockquote {
  padding-left: 1rem;
  border-left: 2px solid var(--faint);
  color: var(--muted);
}

.site-footer {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  color: var(--faint);
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: center;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (max-width: 40rem) {
  .feed,
  .article,
  .site-footer {
    width: min(calc(100% - 2rem), var(--content-width));
  }

  .feed-card {
    padding: 1.5rem 0 1.75rem;
  }

  .feed-card__excerpt {
    margin-top: 0.5rem;
    font-size: 0.96875rem;
    line-height: 1.75;
  }

  .feed-card__media {
    margin-top: 0.875rem;
    border-radius: 0.5rem;
  }

  .feed-card__image,
  .feed-card__video {
    max-height: 72vh;
  }

  .article {
    padding: 2rem 0 3rem;
  }

  .article__home {
    margin-bottom: 2rem;
  }

  .article__content {
    font-size: 1rem;
    line-height: 1.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
