:root {
  --paper: #fff;
  --ink: #111;
  --muted: #6d6d6d;
  --line: #dedede;
  --soft-line: #e8e8e8;
  --surface: #fff;
  --link: #0645ad;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

html, body { background: var(--paper) !important; color: var(--ink); }
body { margin: 0; font-family: var(--serif); -webkit-font-smoothing: antialiased; }
body *, body *::before, body *::after { box-shadow: none !important; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--link) !important;
  outline-offset: 4px;
}

.site-shell {
  width: min(1240px, calc(100% - 64px)) !important;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 !important;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  position: relative !important;
  top: auto !important;
  z-index: 30;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center;
  gap: 28px;
  padding: 31px 0 !important;
  border-bottom: 1px solid var(--line);
  background: var(--paper) !important;
}

.topbar .brand {
  width: 40px !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 11px !important;
  justify-self: start;
}

.topbar .topnav {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.topbar .topnav a,
.topbar .topnav a.active {
  min-height: 0 !important;
  display: inline-flex;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--link) !important;
  background: transparent !important;
  font: 700 .72rem/1 var(--sans) !important;
  letter-spacing: .13em;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 5px !important;
  text-transform: uppercase;
}

.topbar .topnav a:hover { color: var(--ink) !important; }
.topbar .topnav svg { display: none !important; }
.account-actions { justify-self: end; gap: 8px !important; }
.account-actions button, .account-actions a { font-family: var(--sans); }
.account-actions .round-action, .desktop-compose-launch {
  border-color: transparent !important;
  background: transparent !important;
}
.join-button { border: 0 !important; border-radius: 0 !important; color: var(--link) !important; background: transparent !important; text-decoration: underline !important; }
.language-switch { color: var(--muted); }

.app-grid {
  width: 100% !important;
  min-height: 0 !important;
  align-self: stretch;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--paper) !important;
}

.people-column { display: none !important; }
.page-home .people-column, .page-following .people-column {
  width: min(760px, 100%);
  min-height: 100%;
  margin: 0 auto;
  display: flex !important;
  align-items: center;
}
.page-home .profile-panel, .page-following .profile-panel { display: none !important; }

.people-panel {
  width: 100%;
  padding: 72px 0 86px !important;
  border: 0 !important;
  background: transparent !important;
}
.people-heading, .sidebar-meta, .sidebar-legal { display: none !important; }
.people-list {
  counter-reset: now-person;
  width: 100%;
  max-height: none !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}
.person-row {
  counter-increment: now-person;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) !important;
  align-items: baseline !important;
  gap: 18px !important;
  padding: 20px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  transform: none !important;
}
.person-row::before {
  content: counter(now-person, decimal-leading-zero);
  color: var(--muted);
  font: 700 .75rem/1 var(--sans);
  letter-spacing: .08em;
}
.person-row::after { display: none !important; content: none !important; }
.person-row .avatar-wrap, .person-row .chevron, .person-row time, .person-row em { display: none !important; }
.person-row .person-main, .person-row .person-main > span { display: block !important; min-width: 0; }
.person-row .person-main strong {
  color: var(--ink) !important;
  font: 400 clamp(1.65rem, 3vw, 2.45rem)/1.1 var(--serif) !important;
  letter-spacing: -.025em !important;
}
.person-row:hover .person-main strong { color: var(--ink) !important; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.person-row.selected::before { content: counter(now-person, decimal-leading-zero) !important; position: static !important; width: auto !important; height: auto !important; background: transparent !important; }

.profile-panel {
  width: min(760px, 100%) !important;
  margin: 0 auto !important;
  padding: 72px 40px 100px !important;
  background: transparent !important;
}
.profile-header { padding-bottom: 24px !important; border-bottom: 1px solid var(--line) !important; }
.profile-avatar-wrap, .profile-avatar { border-radius: 0 !important; }
.profile-identity h2 { font: 700 2rem/1.05 var(--serif) !important; letter-spacing: -.035em !important; }
.profile-identity p, .profile-professional, .profile-bio, .profile-stats { font-family: var(--sans) !important; }
.profile-actions .secondary-button { border: 1px solid var(--ink) !important; border-radius: 0 !important; color: var(--ink) !important; background: var(--paper) !important; }
.profile-actions .follow-button:not(.following) { color: var(--paper) !important; background: var(--ink) !important; }

.legacy-current,
.history-section { display: none !important; }

.chapter-index {
  counter-reset: now-chapter;
  margin-top: 48px;
  border-top: 1px solid var(--line);
}
.chapter-row {
  counter-increment: now-chapter;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: baseline;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink) !important;
  text-decoration: none !important;
}
.chapter-number::before {
  content: counter(now-chapter, decimal-leading-zero);
  color: var(--muted);
  font: 700 .72rem/1 var(--sans);
  letter-spacing: .08em;
}
.chapter-row strong {
  font: 400 clamp(1.6rem, 3vw, 2.2rem)/1.15 var(--serif);
  letter-spacing: -.025em;
}
.chapter-row:hover strong {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.chapter-empty { padding: 32px 0; color: var(--muted); font: 400 1rem/1.6 var(--sans); }

.page-chapter .profile-header { display: none !important; }
.page-chapter .profile-panel { padding-top: 54px !important; }
.chapter-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--link) !important;
  font: 700 .72rem/1 var(--sans);
  letter-spacing: .12em;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-transform: uppercase;
}
.chapter-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.chapter-reader { margin-top: 50px !important; }
.chapter-reader .book-entry-title { max-width: 700px; }
.chapter-reader .book-entry-body { max-width: 680px; }
.chapter-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 42px;
  color: var(--muted);
  font: 400 .78rem/1.4 var(--sans);
}
.chapter-byline a { color: var(--link); }

.now-hero {
  margin: 50px 0 0 !important;
  padding: 0 0 42px !important;
  overflow: visible !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  color: var(--ink) !important;
  background: transparent !important;
  font-family: var(--serif) !important;
}
.now-meta { color: var(--muted) !important; font: 700 .72rem/1 var(--sans) !important; letter-spacing: .1em !important; text-transform: uppercase !important; }
.now-meta span { padding: 0 !important; color: var(--muted) !important; background: transparent !important; }
.now-meta i { display: none !important; }
.now-hero p, .now-hero p.quiet {
  max-width: none !important;
  margin: 34px 0 0 !important;
  color: var(--ink) !important;
  font: 400 1.28rem/1.72 var(--serif) !important;
  letter-spacing: 0 !important;
  white-space: pre-wrap;
}
.book-entry-title {
  display: block;
  margin-bottom: 38px;
  font: 700 clamp(3rem, 6vw, 5rem)/.98 var(--serif);
  letter-spacing: -.045em;
}
.book-entry-body { display: block; font-weight: 400; }
.now-image-grid { margin-top: 36px !important; border-radius: 0 !important; }
.now-image-grid img { border-radius: 0 !important; }
.hero-footer { margin-top: 28px !important; }
.hero-actions .like-toggle, .hero-actions .comment-toggle, .hero-actions .message-now-action, .hero-actions .item-menu {
  color: var(--muted) !important;
  background: transparent !important;
}
.hero-actions .like-toggle.liked { color: #c92323 !important; }
.now-hero .hero-comments-panel, .comments-panel {
  margin-top: 24px !important;
  padding: 20px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-radius: 0 !important;
  color: var(--ink) !important;
  background: transparent !important;
}

.composer {
  margin-top: 42px;
  padding: 22px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.composer textarea { min-height: 180px !important; font: 400 1.16rem/1.65 var(--serif) !important; }
.composer button, .reply-form button { border-radius: 0 !important; color: var(--paper) !important; background: var(--ink) !important; }
.composer .attach-photo { color: var(--link) !important; background: transparent !important; }

.history-section { margin-top: 62px !important; }
.history-heading { margin-bottom: 28px !important; }
.history-heading h3 { font: 700 .75rem/1 var(--sans) !important; letter-spacing: .13em !important; text-transform: uppercase; }
.history-group { grid-template-columns: 66px minmax(0, 1fr) !important; gap: 20px !important; }
.history-group h4 { font-family: var(--sans) !important; }
.history-item { grid-template-columns: 50px minmax(0, 1fr) max-content !important; gap: 16px !important; padding: 20px 0 !important; border-bottom: 1px solid var(--line); }
.history-item > time { grid-column: 1; font-family: var(--sans) !important; }
.history-line { display: none !important; }
.history-copy { grid-column: 2; }
.history-copy p, .history-copy p.expanded {
  display: block !important;
  margin: -4px 0 8px !important;
  overflow: visible !important;
  color: var(--ink) !important;
  font: 400 1.08rem/1.65 var(--serif) !important;
  white-space: pre-wrap;
  -webkit-line-clamp: unset !important;
}
.history-copy .book-entry-title { margin-bottom: 20px; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.history-actions { grid-column: 3; }

.desktop-compose-dialog { width: min(720px, calc(100% - 40px)) !important; border-radius: 0 !important; background: var(--paper) !important; }
.desktop-compose-dialog textarea { min-height: 48vh !important; font: 400 1.18rem/1.65 var(--serif) !important; }

.book-footer {
  display: flex;
  justify-content: flex-end;
  padding: 28px 0 34px;
  border-top: 1px solid var(--line);
}
.book-footer a { color: var(--muted); font: 700 .75rem/1 var(--sans); letter-spacing: .04em; text-decoration: none; }
.book-footer a:hover { color: var(--link); text-decoration: underline; }

@media (max-width: 700px) {
  .site-shell { width: calc(100% - 36px) !important; display: block; }
  .topbar { grid-template-columns: auto 1fr auto !important; gap: 16px; padding: 22px 0 !important; }
  .topbar .brand { width: 34px !important; height: 34px !important; }
  .topbar .topnav { gap: 18px !important; }
  .topbar .topnav a, .topbar .topnav a.active { display: inline-flex !important; font-size: .62rem !important; }
  .account-actions .round-action, .desktop-compose-launch, .language-switch { display: none !important; }
  .account-actions .account-menu { display: block !important; }
  .mobile-page-title { display: none !important; }
  .app-grid { min-height: calc(100dvh - 130px) !important; }
  .people-panel { padding: 52px 0 64px !important; }
  .person-row { grid-template-columns: 38px minmax(0, 1fr) !important; gap: 10px !important; padding: 17px 0 !important; }
  .person-row .person-main strong { font-size: 1.65rem !important; }
  .profile-panel { display: block !important; width: 100% !important; padding: 52px 0 90px !important; }
  .page-home .profile-panel, .page-following .profile-panel { display: none !important; }
  .mobile-profile-topline { display: none !important; }
  .profile-header { display: flex !important; }
  .profile-identity { gap: 12px !important; }
  .profile-avatar-wrap, .profile-avatar { width: 50px !important; height: 50px !important; }
  .profile-identity h2 { font-size: 1.55rem !important; }
  .chapter-index { margin-top: 38px; }
  .chapter-row { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 18px 0; }
  .chapter-row strong { font-size: 1.65rem; }
  .page-chapter .profile-panel { padding-top: 38px !important; }
  .chapter-reader { margin-top: 38px !important; }
  .now-hero { margin-top: 38px !important; padding-bottom: 34px !important; }
  .book-entry-title { margin-bottom: 30px; font-size: clamp(2.8rem, 14vw, 4rem); }
  .now-hero p, .now-hero p.quiet { font-size: 1.12rem !important; line-height: 1.7 !important; }
  .history-group { display: block !important; }
  .history-group h4 { margin: 32px 0 12px !important; }
  .history-item { grid-template-columns: 42px minmax(0, 1fr) !important; }
  .history-actions { grid-column: 2 !important; justify-self: end; }
  .mobile-nav { border-top: 1px solid var(--line) !important; background: rgba(255,255,255,.97) !important; }
  .book-footer { margin-bottom: 66px; }
}
