:root {
  color-scheme: light;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: #222;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  width: min(100% - 40px, 720px);
  margin: 0 auto;
  padding: 56px 0 80px;
}

.home {
  width: min(100% - 48px, 1060px);
  display: grid;
  grid-template-columns: 170px minmax(0, 720px);
  column-gap: clamp(48px, 8vw, 100px);
  justify-content: center;
  align-items: start;
}

site-navigation {
  display: contents;
}

.page-header {
  margin-bottom: 2.5rem;
}

.sidebar {
  position: sticky;
  top: 56px;
  grid-column: 1;
  grid-row: 1 / span 2;
}

.sidebar-heading {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-brand {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.sidebar-brand a {
  color: #222;
  text-decoration: none;
}

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

.sidebar-heading:not(:first-child) {
  margin-top: 2.5rem;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
}

.sidebar a {
  color: #68758a;
  font-size: 1rem;
  text-decoration: none;
}

.sidebar a:hover {
  color: #222;
  text-decoration: underline;
}

.sidebar a[aria-current="page"] {
  color: #222;
}

.home main,
.home footer {
  grid-column: 2;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(2rem, 4vw, 2.25rem);
  letter-spacing: -0.035em;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.25rem;
}

h3 {
  margin-top: 2rem;
  font-size: 1.05rem;
}

p,
ul,
ol,
blockquote {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.post-embed {
  margin: 2rem 0;
}

.post-embed .twitter-tweet {
  margin-left: 0 !important;
}

.post-embed figcaption {
  color: #666;
  font-size: 0.82rem;
  line-height: 1.45;
}

.tweet-collage {
  column-count: 2;
  column-gap: 20px;
  margin-top: 2.5rem;
}

.tweet-collage section {
  display: contents;
}

.tweet-collage section > h2,
.tweet-collage section > p {
  display: none;
}

.tweet-collage .post-embed {
  display: inline-block;
  width: 100%;
  min-width: 0;
  margin: 0 0 20px;
  break-inside: avoid;
  vertical-align: top;
}

.tweet-collage .twitter-tweet,
.tweet-collage iframe {
  width: 100% !important;
  margin: 0 !important;
}

.extraordinary-cta {
  margin-top: 2.5rem;
}

.link-preview {
  display: grid;
  grid-template-columns: 180px 1fr;
  margin: 2rem 0;
  overflow: hidden;
  border: 1px solid #ddd;
  color: inherit;
  text-decoration: none;
}

.link-preview:hover {
  border-color: #999;
  color: inherit;
}

.link-preview img {
  width: 100%;
  height: 100%;
  min-height: 145px;
  object-fit: cover;
}

.link-preview-copy {
  align-self: center;
  padding: 18px;
}

.link-preview-copy small,
.link-preview-copy strong,
.link-preview-copy > span {
  display: block;
}

.link-preview-copy small {
  margin-bottom: 0.4rem;
}

.link-preview-copy strong {
  line-height: 1.3;
}

.link-preview-copy > span {
  margin-top: 0.5rem;
  color: #666;
  font-size: 0.88rem;
  line-height: 1.45;
}

.essay-list {
  padding: 0;
  list-style: none;
}

.essay-list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 0.85rem 0;
  border-bottom: 1px solid #ddd;
}

.essay-list li:first-child {
  border-top: 1px solid #ddd;
}

.essay-list small {
  flex: 0 0 auto;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.45rem;
}

li > ul,
li > ol {
  margin-top: 0.45rem;
}

a {
  color: #0645ad;
  text-underline-offset: 2px;
}

a:hover {
  color: #002f7a;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
}

.page-header p,
small {
  color: #666;
}

.page-header p {
  margin-bottom: 0;
  line-height: 1.5;
}

small {
  font-size: 0.82rem;
  line-height: 1.45;
}

.intro {
  font-size: 1.08rem;
  line-height: 1.6;
}

blockquote {
  margin-left: 0;
  padding-left: 18px;
  border-left: 3px solid #ddd;
  color: #555;
}

iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  color: #666;
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .tweet-collage {
    column-count: 1;
  }
}

@media (max-width: 520px) {
  body {
    width: min(100% - 28px, 720px);
    padding-top: 32px;
  }
}

@media (max-width: 560px) {
  .home {
    width: min(100% - 28px, 720px);
    display: block;
    padding-top: 32px;
  }

  .sidebar {
    position: static;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid #ddd;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 16px;
  }

  .sidebar-heading:not(:first-child) {
    margin-top: 1.5rem;
  }

  .sidebar a {
    font-size: 1rem;
    text-decoration: underline;
  }

  .link-preview {
    grid-template-columns: 1fr;
  }

  .link-preview img {
    height: 180px;
    min-height: 0;
  }

  .tweet-collage {
    column-count: 1;
  }
}
