:root {
  --nyt-serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, 'Times New Roman', serif;
  --nyt-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
  background: #f5f5f5;
  color: #111111;
}

.ambient {
  display: none;
}

.topnav-link--user {
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
}

.topnav-user-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.topnav-user-avatar.is-fallback {
  border: 1px solid rgba(17, 17, 17, 0.2);
  background: #f0f2f6;
  color: #1b2a44;
  font-family: var(--nyt-sans);
  font-weight: 700;
  font-size: 0.68rem;
  line-height: 1;
  text-transform: uppercase;
}

.topnav-user-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topnav-user-label {
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding-top: clamp(5.5rem, 24vh, 13rem);
  padding-bottom: 1.1rem;
  width: min(840px, calc(100% - 2rem));
  margin-inline: auto;
}

.article-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: clamp(1rem, 2.8vw, 1.45rem) 0;
  display: grid;
  gap: 0.82rem;
  font-family: var(--nyt-serif);
}

.back-link {
  width: fit-content;
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(92, 184, 255, 0.56);
  font-size: 0.88rem;
  font-family: var(--nyt-sans);
  letter-spacing: 0.01em;
}

.back-link:hover,
.back-link:focus-visible {
  border-bottom-color: rgba(92, 184, 255, 0.92);
}

.post-top-meta {
  margin: 0;
  font-family: var(--nyt-sans);
  letter-spacing: 0.01em;
  color: #555555;
  font-size: 0.9rem;
}

#postTitle,
.article-card h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.1rem);
  line-height: 1.02;
  font-family: var(--nyt-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: #111111;
}

.post-excerpt {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.54;
  font-family: var(--nyt-serif);
  color: #1f1f1f;
}

.post-view-mode-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-view-mode-label {
  margin: 0;
  color: #4b5563;
  font-size: 0.83rem;
  font-family: var(--nyt-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-view-mode-btn {
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.22);
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
  padding: 0.34rem 0.8rem;
  font-size: 0.78rem;
  font-family: var(--nyt-sans);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.post-view-mode-btn.is-active {
  background: #111827;
  color: #f8fafc;
  border-color: #111827;
}

.post-view-mode-note {
  margin: 0;
  color: #b91c1c;
  font-size: 0.78rem;
  font-family: var(--nyt-sans);
}

.article-body {
  display: grid;
  gap: 0.94rem;
}

.article-body.article-body--bridge {
  display: block;
}

.bridge-reader-shell {
  border: 1px solid #d1d5db;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  padding: 0.88rem;
}

.bridge-reader-pre {
  margin: 0;
  width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 0.94rem;
  line-height: 1.62;
  color: #0f172a;
}

.article-body h2,
.article-body h3 {
  margin: 1.2rem 0 0.3rem;
  line-height: 1.16;
  font-family: var(--nyt-serif);
  font-weight: 700;
  letter-spacing: -0.008em;
  color: #111111;
}

.article-body p,
.article-body li {
  margin: 0;
  color: #1b1b1b;
  line-height: 1.78;
  font-family: var(--nyt-serif);
  font-size: 1.19rem;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.article-body ul {
  margin: 0;
  padding-left: 1.3rem;
}

.article-body li + li {
  margin-top: 0.42rem;
}

.article-body blockquote {
  margin: 0.6rem 0;
  border-left: 3px solid #b7b7b7;
  padding: 0.68rem 0.82rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 0 10px 10px 0;
  color: #222222;
  font-family: var(--nyt-serif);
  font-size: 1.06rem;
  line-height: 1.66;
}

.article-body pre,
.article-body code {
  font-family: var(--font-mono);
}

.article-body pre {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(6, 10, 16, 0.95);
  color: #c8dbf2;
  padding: 0.8rem;
  overflow: auto;
}

.article-body p code,
.article-body li code {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.34rem;
  background: rgba(255, 255, 255, 0.05);
}

.article-body a {
  color: #1d4f8b;
}

#postTags {
  display: none;
}

.article-paywall-sentinel {
  width: 100%;
  height: 1px;
  margin-top: 0.2rem;
}

.article-paywall {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  width: 100%;
  padding: 0 0 env(safe-area-inset-bottom) 0;
  background: rgba(9, 14, 22, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.article-paywall[data-visible='true'] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.article-paywall-preview {
  position: relative;
  border: 0;
  border-radius: 11px;
  padding: 0.64rem 0.72rem;
  background: rgba(255, 255, 255, 0.72);
  max-height: 118px;
  overflow: hidden;
}

.article-paywall-preview p {
  margin: 0.28rem 0;
  color: #3c4758;
  font-size: 0.9rem;
  line-height: 1.42;
  filter: blur(0.45px);
}

.article-paywall-preview::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(233, 237, 243, 0), rgba(233, 237, 243, 0.96));
}

.article-paywall-card {
  position: relative;
  width: var(--paywall-card-width, 320px);
  max-width: calc(100vw - 1rem);
  margin-inline: auto;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f5f7fb, #e9edf3);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  padding: 1rem 1.08rem 1.1rem;
  display: grid;
  gap: 0.64rem;
  text-align: center;
}

.article-paywall-kicker {
  margin: 0 auto;
  width: fit-content;
  border-radius: 999px;
  background: #f1bf31;
  color: #1f2937;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.58rem;
}

.article-paywall-card h3 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  line-height: 1.2;
}

.article-paywall-copy {
  margin: 0;
  color: #273448;
  line-height: 1.55;
}

.article-paywall-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.article-paywall-actions .button {
  color: #f6fbff;
  background: linear-gradient(160deg, #121a28, #0c121d);
  border-color: #121a28;
}

.article-paywall-actions .button:hover,
.article-paywall-actions .button:focus-visible {
  filter: brightness(1.06);
}

.article-paywall-actions .button.button--ghost {
  color: #111827;
  border-color: rgba(17, 24, 39, 0.24);
  background: rgba(255, 255, 255, 0.8);
}

body.article-paywall-active {
  overflow: hidden;
}

.surface-card.related {
  display: none;
}

.surface-card.related h2 {
  margin: 0;
  font-size: 1.08rem;
  font-family: var(--nyt-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.related-list {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.66rem;
}

.related-list li {
  display: grid;
  gap: 0.16rem;
}

.related-list a {
  color: var(--ink);
  text-decoration: none;
  line-height: 1.4;
  font-family: var(--nyt-serif);
  font-size: 1rem;
}

.related-list a:hover,
.related-list a:focus-visible {
  color: var(--accent-2);
}

.related-list span {
  color: var(--muted);
  font-size: 0.76rem;
  font-family: var(--nyt-sans);
}

@media (max-width: 1000px) {
  .topnav-user-label {
    max-width: 7rem;
  }

  .article-main {
    grid-template-columns: 1fr;
    padding-top: clamp(4rem, 18vh, 8rem);
  }

  .article-paywall {
    padding: 0 0 env(safe-area-inset-bottom) 0;
  }

  .article-paywall-card {
    width: calc(100vw - 1.2rem);
    border-radius: 12px;
    padding: 0.9rem 0.86rem 0.95rem;
  }
}
