:root {
  color-scheme: light dark;
  --page: #ffffff;
  --ink: #111111;
  --muted: #666666;
  --faint: #999999;
  --line: #d8d8d8;
  --soft: #f3f3f3;
  --inverse: #ffffff;
  --content-width: 720px;
  --shell-width: 1040px;
  --font-sans: Arial, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: Georgia, "Noto Serif SC", "Songti SC", SimSun, serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scrollbar-gutter: stable;
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-serif);
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-style: double;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

.sr-only,
.comment-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.text-site {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.text-site a {
  text-decoration: none;
}

.text-site a:hover {
  text-decoration: underline wavy;
}

.text-header {
  border-bottom: 1px solid var(--line);
}

.text-header__inner,
.text-footer__inner {
  width: min(calc(100% - 48px), var(--shell-width));
  margin: 0 auto;
}

.text-header__inner {
  display: flex;
  min-height: 116px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: 28px 0 24px;
}

.text-brand {
  min-width: 0;
}

.text-brand a {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.text-brand a:hover {
  text-decoration: underline wavy;
}

.text-brand p {
  max-width: 38rem;
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 20px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-nav a {
  text-decoration: none;
}

.text-nav a:hover {
  text-decoration: underline wavy;
}

.text-nav a[aria-current="page"] {
  font-weight: 700;
}

.text-main {
  width: min(calc(100% - 48px), var(--content-width));
  flex: 1;
  margin: 0 auto;
  padding: 72px 0 96px;
}

.text-notice {
  margin-bottom: 36px;
  padding: 12px 16px;
  border-left: 2px solid var(--ink);
  background: var(--soft);
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

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

.text-footer__inner {
  display: flex;
  min-height: 92px;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  line-height: 1.5;
}

.text-footer__inner a {
  color: var(--ink);
}

.site-tools {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.site-tools__progress,
.site-tools__button {
  width: 36px;
  height: 36px;
}

.site-tools__progress {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ink) var(--scroll-progress, 0%), var(--line) 0);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.site-tools__progress::before {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--page);
  content: "";
}

.site-tools__progress span {
  position: relative;
}

.site-tools__button {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--page);
  box-shadow: 0 0 0 1px var(--line), 0 3px 12px rgba(0, 0, 0, 0.08);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 160ms ease, scale 160ms ease;
}

.site-tools__button::before {
  position: absolute;
  inset: -4px;
  content: "";
}

.site-tools__button:hover {
  background: var(--soft);
}

.site-tools__button:active {
  scale: 0.96;
}

.site-tools__top svg {
  width: 18px;
  height: 18px;
}

.site-tools__theme-icons {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.site-tools__theme-icons svg {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  transition: opacity 220ms cubic-bezier(0.2, 0, 0, 1), scale 220ms cubic-bezier(0.2, 0, 0, 1), filter 220ms cubic-bezier(0.2, 0, 0, 1);
}

.site-tools__icon--sun,
:root[data-public-theme="dark"] .site-tools__icon--moon {
  opacity: 0;
  scale: 0.25;
  filter: blur(4px);
}

:root[data-public-theme="dark"] .site-tools__icon--sun {
  opacity: 1;
  scale: 1;
  filter: blur(0);
}

.post-title,
.section-header,
.text-content h1,
.text-content h2,
.text-content h3,
.text-content h4 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  text-wrap: balance;
}

.post-title,
.text-content > h1 {
  margin-bottom: 24px;
  font-size: 2.5rem;
}

.post-detail .post-title {
  margin-bottom: 16px;
  overflow-wrap: anywhere;
  font-size: 1.375rem;
}

.text-content h2,
.section-header {
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  font-size: 1.5rem;
}

.text-content h3 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  font-size: 1.2rem;
}

.text-content h4 {
  margin-top: 1.8em;
  margin-bottom: 0.5em;
  font-size: 1rem;
}

.text-content p,
.text-content ul,
.text-content ol,
.text-content blockquote,
.text-content pre,
.text-content table {
  margin-top: 0;
  margin-bottom: 1.35em;
}

.text-content ul,
.text-content ol {
  padding-left: 1.4em;
}

.text-content li + li {
  margin-top: 0.35em;
}

.text-content blockquote {
  margin-right: 0;
  margin-left: 0;
  padding-left: 20px;
  border-left: 2px solid var(--ink);
  color: var(--muted);
}

.text-content hr {
  height: 1px;
  margin: 48px 0;
  border: 0;
  background: var(--line);
}

.text-content code {
  padding: 0.12em 0.3em;
  background: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.text-content pre {
  overflow: auto;
  padding: 18px 20px;
  border: 1px solid var(--ink);
  background: var(--page);
  color: var(--ink);
  line-height: 1.65;
}

.text-content pre code {
  padding: 0;
  background: transparent;
}

.text-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.text-content th,
.text-content td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.text-content th {
  border-bottom-color: var(--ink);
  font-family: var(--font-sans);
}

.post-content {
  overflow-wrap: anywhere;
}

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

.text-site--default .content-gate {
  --content-gate-accent: #0f766e;
  --content-gate-accent-soft: #e7f6f3;
  display: grid;
  max-width: 38rem;
  margin: 2rem 0;
  padding: 20px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 7px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--content-gate-accent);
  border-radius: 6px;
  background: var(--soft);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  color: var(--ink);
  font-family: var(--font-sans);
}

.text-site--default .content-gate--password {
  --content-gate-accent: #a16207;
  --content-gate-accent-soft: #fff5d6;
}

.text-site--default .content-gate__icon {
  display: grid;
  width: 40px;
  height: 40px;
  grid-row: 1 / span 3;
  place-items: center;
  border-radius: 5px;
  background: var(--content-gate-accent-soft);
  color: var(--content-gate-accent);
}

.text-site--default .content-gate__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.text-site--default .content-gate__title {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  text-wrap: balance;
}

.text-site--default .content-gate__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.text-site--default .content-gate__form,
.text-site--default .content-gate__actions {
  display: flex;
  min-width: 0;
  grid-column: 2;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.text-site--default .content-gate__form {
  margin-top: 5px;
}

.text-site--default .content-gate__field {
  display: grid;
  min-width: min(100%, 220px);
  flex: 1 1 260px;
  gap: 5px;
}

.text-site--default .content-gate__field label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
}

.text-site--default .content-gate__input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4;
}

.text-site--default .content-gate__input:focus-visible {
  outline-color: var(--content-gate-accent);
}

.text-site--default .content-gate__submit,
.text-site--default .content-gate__link {
  display: inline-flex;
  min-height: 44px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--content-gate-accent);
  border-radius: 4px;
  background: var(--content-gate-accent);
  color: var(--inverse);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition-property: background-color, border-color, color, transform;
  transition-duration: 150ms;
  transition-timing-function: ease;
}

.text-site--default .content-gate__submit:hover,
.text-site--default .content-gate__submit:focus-visible,
.text-site--default .content-gate__link:hover,
.text-site--default .content-gate__link:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--page);
  text-decoration: none;
}

.text-site--default .content-gate__submit:active,
.text-site--default .content-gate__link:active {
  transform: scale(0.96);
}

.text-site--default .content-gate__error {
  width: 100%;
  margin: 0;
  color: #b42318;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.meta,
.time,
.archives-time {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.meta {
  display: flex;
  margin: -10px 0 40px;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.post-detail .meta {
  margin-top: 0;
  line-height: 1.5;
}

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

.posts .post {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 24px;
  padding: 16px 0;
  align-items: baseline;
}

.posts .post a {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.55;
}

.pinned-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  border: 1px solid #dc2626;
  background: #dc2626;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  vertical-align: 0.12em;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.page-next {
  text-align: right;
}

.text-site .post-navigation {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin: 32px 0 0;
  padding: 0;
}

.text-site .post-navigation li + li {
  margin-top: 0;
}

.text-site .post-navigation a {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  text-decoration: none;
}

.text-site .post-navigation a::after {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  content: attr(data-post-title);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
}

.text-site .post-navigation a:hover::after {
  text-decoration: underline wavy;
}

.post-tags {
  margin-top: 40px;
}

.post-tag-list,
.nav.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.post-tag,
.tag-chip {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 14px;
  margin-top: 22px;
  padding: 6px 8px 0 0;
}

.tag-index-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  padding: 6px 23px 6px 11px;
  border-radius: 4px;
  background: var(--soft);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
}

.tag-index-link:hover {
  background: var(--line);
}

.tag-index-link:hover span {
  text-decoration: underline wavy;
}

.text-site .tag-index-link:hover,
.text-site .friend-link:hover {
  text-decoration: none;
}

.tag-index-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tag-index-link strong {
  position: absolute;
  top: -6px;
  right: -7px;
  display: flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--inverse);
  font-size: 0.625rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.category-index,
.archives-item-content,
.archives-item-content p {
  margin-top: 0;
}

.text-content .archives-list {
  padding-left: 0;
  list-style: none;
}

.archives-item {
  margin-bottom: 36px;
}

.archives-item-content p {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.links-page > .post-title {
  margin-bottom: 8px;
}

.links-page > .meta {
  margin: 0;
  line-height: 1.5;
}

.friend-links {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.friend-link {
  display: grid;
  min-width: 0;
  min-height: 52px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--soft);
  text-decoration: none;
  transition: background-color 160ms ease;
}

.friend-link:hover {
  background: var(--line);
}

.friend-link:hover strong {
  text-decoration: underline wavy;
}

.friend-link__avatar {
  position: relative;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--page);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.friend-link__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
}

.friend-link__content {
  display: flex;
  min-width: 0;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 10px;
}

.friend-link__content > * {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.friend-link__content strong {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4;
}

.friend-link__content > span {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.empty-notice {
  padding: 18px 0;
  color: var(--muted);
}

.empty-notice p:last-child {
  margin-bottom: 0;
}

.comments {
  margin-top: 64px;
}

.comments__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.comments__head .section-header,
.comments__head h2 {
  margin: 0;
}

.comments__count {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.comment-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.comment-item {
  min-width: 0;
  padding: 20px 0;
}

.comment-item + .comment-item {
  border-top: 1px solid var(--line);
}

.comment-item--reply {
  padding-left: 24px;
}

.comment-item__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
}

.comment-item__avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  object-fit: cover;
}

.comment-item__author-details {
  display: inline-flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.comment-item__identity {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.comment-item__author {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
  text-decoration: none;
}

.comment-item__time,
.comment-item__reply-label,
.comment-item__reply-target {
  color: var(--muted);
}

.comment-item__time {
  font-size: 0.75rem;
  line-height: 1.35;
}

.comment-item__reply-target {
  text-decoration: none;
}

.comment-item__body {
  margin-top: 10px;
  padding-left: 46px;
  overflow-wrap: anywhere;
}

.comment-item__body p {
  margin: 10px 0 0;
}

.comment-reply-button,
.comment-reply-cancel {
  min-height: 40px;
  margin-left: auto;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-decoration: underline;
}

.comment-reply-button svg {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
}

.comment-form {
  display: grid;
  gap: 18px;
  margin-top: 48px;
}

.comment-form__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.125rem;
}

.comment-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.comment-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.comment-field--wide {
  grid-column: 1 / -1;
}

.comment-field label {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--page);
}

.comment-form textarea {
  min-height: 140px;
  resize: vertical;
}

.comment-form__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.terminal-action {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--inverse);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
}

.terminal-action:hover,
.terminal-action:focus-visible {
  background: var(--page);
  color: var(--ink);
}

.terminal-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.comment-reply-state,
.comment-notice {
  padding: 12px 14px;
  border-left: 2px solid var(--ink);
  background: var(--soft);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
}

.comment-reply-state {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-reply-state[hidden] {
  display: none;
}

.comment-reply-state__text {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.comment-notice p,
.comment-notice ul {
  margin: 0;
}

.media-embed {
  display: block;
  width: 100%;
  margin: 28px 0;
  overflow: hidden;
  border: 1px solid var(--ink);
}

.media-embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

.media-embed--video {
  position: relative;
  aspect-ratio: 16 / 9;
}

.media-embed--video iframe {
  position: absolute;
  inset: 0;
  height: 100%;
}

.media-embed--audio iframe {
  height: var(--media-height, 86px);
}

.media-link-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  min-width: 0;
  margin: 28px 0;
  padding: 16px 0;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.media-link-card__cover {
  position: relative;
  display: grid;
  width: 88px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--soft);
  filter: grayscale(1);
}

.media-link-card__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-link-card__body {
  min-width: 0;
}

.media-link-card__eyebrow,
.media-link-card__subtitle,
.media-link-card__facts,
.media-link-card__credits,
.media-link-card__rating small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
}

.media-link-card__title {
  margin: 4px 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
}

.media-link-card__facts,
.media-link-card__credits {
  display: flex;
  margin-top: 7px;
  flex-wrap: wrap;
  gap: 5px 12px;
}

.media-link-card__side,
.media-link-card__rating {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.media-link-card__rating b {
  font-family: var(--font-sans);
  font-size: 1.5rem;
}

.media-link-card__action {
  margin-top: 18px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
}

:root[data-public-theme="light"] {
  color-scheme: light;
}

:root[data-public-theme="dark"] {
  color-scheme: dark;
  --page: #101010;
  --ink: #f5f5f5;
  --muted: #b0b0b0;
  --faint: #777777;
  --line: #3a3a3a;
  --soft: #202020;
  --inverse: #111111;
}

:root[data-public-theme="dark"] .text-site--default .content-gate--reply {
  --content-gate-accent: #5eead4;
  --content-gate-accent-soft: #153d39;
}

:root[data-public-theme="dark"] .text-site--default .content-gate--password {
  --content-gate-accent: #facc15;
  --content-gate-accent-soft: #493b12;
}

:root[data-public-theme="dark"] .text-site--default .content-gate__error {
  color: #fda29b;
}

:root[data-public-theme="dark"] .friend-link__avatar img {
  outline-color: rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-public-theme="light"]) {
    color-scheme: dark;
    --page: #101010;
    --ink: #f5f5f5;
    --muted: #b0b0b0;
    --faint: #777777;
    --line: #3a3a3a;
    --soft: #202020;
    --inverse: #111111;
  }

  :root:not([data-public-theme="light"]) .friend-link__avatar img {
    outline-color: rgba(255, 255, 255, 0.1);
  }

  :root:not([data-public-theme="light"]) .text-site--default .content-gate--reply {
    --content-gate-accent: #5eead4;
    --content-gate-accent-soft: #153d39;
  }

  :root:not([data-public-theme="light"]) .text-site--default .content-gate--password {
    --content-gate-accent: #facc15;
    --content-gate-accent-soft: #493b12;
  }

  :root:not([data-public-theme="light"]) .text-site--default .content-gate__error {
    color: #fda29b;
  }

  :root:not([data-public-theme="light"]) .site-tools__icon--moon {
    opacity: 0;
    scale: 0.25;
    filter: blur(4px);
  }

  :root:not([data-public-theme="light"]) .site-tools__icon--sun {
    opacity: 1;
    scale: 1;
    filter: blur(0);
  }
}

@media (max-width: 920px) {
  .site-tools {
    right: max(20px, env(safe-area-inset-right));
  }
}

@media (max-width: 860px) {
  .text-site--default .text-main {
    padding-right: 56px;
  }
}

@media (max-width: 720px) {
  .text-header__inner,
  .text-footer__inner,
  .text-main {
    width: min(calc(100% - 32px), 100%);
  }

  .text-header__inner {
    min-height: 0;
    padding: 22px 0 18px;
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .text-brand a {
    font-size: 1.5rem;
  }

  .text-nav {
    justify-content: flex-start;
    gap: 8px 16px;
  }

  .text-main {
    padding: 48px 0 64px;
  }

  .post-title,
  .text-content > h1 {
    font-size: 2rem;
  }

  .post-detail .post-title {
    font-size: 1.25rem;
  }

  .posts .post {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .comment-form__grid {
    grid-template-columns: 1fr;
  }

  .comment-field--wide {
    grid-column: auto;
  }

  .media-link-card {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .media-link-card__cover {
    width: 70px;
  }

  .media-link-card__side {
    grid-column: 2;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .text-site--default .content-gate {
    padding: 16px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 7px 12px;
  }

  .text-site--default .content-gate__icon {
    width: 36px;
    height: 36px;
  }

  .text-site--default .content-gate__form,
  .text-site--default .content-gate__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .text-site--default .content-gate__field {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  .text-site--default .content-gate__submit,
  .text-site--default .content-gate__link {
    width: 100%;
  }

  .comment-item__meta {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
  }

  .comment-item__avatar {
    grid-column: 1;
    grid-row: 1;
  }

  .comment-item__author-details {
    grid-column: 2;
    grid-row: 1;
  }

  .comment-reply-button {
    grid-column: 2;
    margin-left: 0;
    justify-self: end;
  }
}

@media (max-width: 420px) {
  .site-tools {
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .text-footer__inner {
    min-height: 0;
    padding: 22px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .comments__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .comment-item--reply {
    padding-left: 12px;
  }

  .terminal-action {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-tools__button,
  .site-tools__theme-icons svg,
  .text-site--default .content-gate__submit,
  .text-site--default .content-gate__link {
    transition: none;
  }
}

@media print {
  .text-nav,
  .text-footer,
  .site-tools,
  .comment-form,
  .comment-reply-button,
  .content-gate__form {
    display: none !important;
  }

  .text-main {
    width: 100%;
    padding: 24px 0;
  }
}
