/* Editorial layout for blog articles. Loaded after site.css. */

.article-head {
  padding: 62px 0 0;
}

.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #555;
  font: 500 12px var(--mono);
}

.article-breadcrumb a {
  color: var(--ink);
  transition: color .2s;
}

.article-breadcrumb a:hover {
  color: var(--accent-dark);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 18px;
  color: #555;
  font: 400 12px var(--mono);
}

.article-title {
  max-width: 1000px;
  margin: 0;
  font: 500 clamp(34px, 3.9vw, 52px)/1.16 var(--mono);
  letter-spacing: -.045em;
}

.article-hook {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--accent-dark);
  font-size: 20px;
  line-height: 1.55;
}

.article-hook p {
  margin: 0;
}

.article-hook cite {
  display: block;
  margin-top: 10px;
  color: #555;
  font: 400 12px/1.6 var(--mono);
}

.article-rule {
  height: 1px;
  margin: 42px 0 0;
  border: 0;
  background: var(--line);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  column-gap: 110px;
  align-items: start;
  padding: 50px 0 80px;
}

.article-hero-image {
  margin: 0 0 42px;
}

.article-hero-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: contain;
  background: #f2f2f2;
  border: 1px solid var(--line);
}

/* READING COLUMN */

.article-content {
  min-width: 0;
  font-size: 17px;
  line-height: 1.78;
}

.article-content p {
  margin: 0 0 22px;
}

.article-content h2 {
  margin: 0 0 24px;
  font: 500 clamp(22px, 2.1vw, 28px)/1.3 var(--mono);
  letter-spacing: -.04em;
}

.article-content h3 {
  margin: 34px 0 12px;
  font: 600 17px/1.4 var(--mono);
  letter-spacing: -.02em;
}

.article-content strong {
  font-weight: 600;
}

.article-content a {
  color: var(--accent-dark);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(191, 49, 21, .35);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}

.article-content a:hover {
  text-decoration-color: currentColor;
}

.article-content ul,
.article-content ol {
  margin: 0 0 22px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content .section-label {
  margin-bottom: 14px;
}

.post-section {
  margin-bottom: 52px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--line);
}

.post-section > :last-child {
  margin-bottom: 0;
}

/* FIGURES */

.post-image,
.meme-block,
.illustration-block {
  margin: 34px 0;
}

.post-image img,
.meme-block img,
.illustration-block img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.meme-block img,
.illustration-block img {
  max-width: 480px;
  margin: 0 auto;
}

.article-content figcaption {
  margin-top: 10px;
  color: #555;
  font: 400 12px/1.6 var(--mono);
}

.meme-block figcaption,
.illustration-block figcaption {
  text-align: center;
}

/* TABLES */

.table-scroll {
  margin: 30px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.table-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.article-content table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}

.article-content th {
  padding: 12px 14px;
  background: #f2f2f2;
  border-bottom: 1px solid #111;
  font: 600 12px var(--mono);
  text-align: left;
}

.article-content td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.article-content tr:last-child td {
  border-bottom: 0;
}

.article-content td:first-child {
  font: 600 13px/1.5 var(--mono);
}

/* CALLOUTS */

.stat-callout {
  margin: 30px 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent);
}

.stat-callout p {
  margin: 0;
  font: 600 15px/1.6 var(--mono);
  letter-spacing: -.02em;
}

.stat-callout span {
  display: block;
  margin-top: 6px;
  color: #555;
  font-size: 15px;
  line-height: 1.6;
}

.takeaway-box {
  margin-bottom: 44px;
  padding: 28px;
  background: white;
  border: 1px solid #111;
}

.takeaway-box p:last-child {
  margin-bottom: 0;
}

.source-note {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.source-note p {
  margin: 0;
  color: #555;
  font: 400 12px/1.8 var(--mono);
}

.source-note a {
  color: #555;
  font-weight: 400;
}

/* SIDEBAR */

.article-sidebar {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.5;
}

.sidebar-block + .sidebar-block {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.sidebar-title {
  margin: 0 0 12px;
  color: #555;
  font: 600 11px var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--line);
  color: #444;
  transition: color .2s, border-color .2s;
}

.toc-list a:hover {
  color: var(--ink);
}

.toc-list a[aria-current] {
  border-left-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 500;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-action {
  padding: 8px 11px;
  background: transparent;
  border: 1px solid #111;
  color: var(--ink);
  font: 600 11px var(--mono);
  transition: background .2s, color .2s;
}

.share-action:hover {
  background: #111;
  color: white;
}

.share-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--accent-dark);
  font: 500 11px/1.6 var(--mono);
}

.sidebar-links a {
  display: block;
  padding: 7px 0;
  font: 500 12px/1.5 var(--mono);
  transition: color .2s;
}

.sidebar-links a:hover {
  color: var(--accent-dark);
}

/* MOBILE CONTENTS */

.toc-mobile {
  display: none;
  margin: 0 0 34px;
  border: 1px solid #111;
  background: white;
}

.toc-mobile summary {
  padding: 13px 15px;
  font: 600 12px var(--mono);
  cursor: pointer;
}

.toc-mobile .toc-list {
  padding: 0 15px 14px;
}

/* MORE FROM BORINGBI */

.article-more {
  padding: 60px 0;
  background: white;
  border-top: 1px solid var(--line);
}

.article-more h2 {
  margin: 0 0 22px;
  color: var(--accent);
  font: 600 11px var(--mono);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.more-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #111;
}

.more-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 130px 24px;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  transition: color .2s;
}

.more-row:hover {
  color: var(--accent-dark);
}

.more-title {
  font: 500 17px/1.4 var(--mono);
  letter-spacing: -.03em;
}

.more-category,
.more-date {
  color: #555;
  font: 400 12px var(--mono);
}

.more-arrow {
  font: 500 15px var(--mono);
  text-align: right;
  transition: transform .2s;
}

.more-row:hover .more-arrow {
  transform: translateX(4px);
}

/* CTA */

.article-cta {
  padding: 75px 0;
}

.article-cta .section-sub {
  margin-bottom: 0;
}

.cta-more {
  margin: 0;
  color: #555;
  font: 400 12px/1.7 var(--mono);
}

.cta-more a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    column-gap: 60px;
  }
}

@media (max-width: 900px) {
  .article-head {
    padding-top: 44px;
  }

  .article-rule {
    margin-top: 30px;
  }

  .article-layout {
    display: block;
    padding: 30px 0 60px;
  }

  .toc-mobile {
    display: block;
  }

  .article-sidebar {
    position: static;
    max-height: none;
    margin-top: 44px;
    padding-top: 26px;
    border-top: 1px solid #111;
  }

  .sidebar-toc {
    display: none;
  }

  .sidebar-toc + .sidebar-block {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .more-row {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 6px 14px;
  }

  .more-title {
    grid-column: 1;
  }

  .more-arrow {
    grid-column: 2;
    grid-row: 1;
  }

  .more-category,
  .more-date {
    grid-column: 1;
  }
}

@media (max-width: 550px) {
  .article-title {
    font-size: 32px;
  }

  .article-hook {
    font-size: 18px;
  }

  .article-content {
    font-size: 16.5px;
  }

  .takeaway-box {
    padding: 22px 18px;
  }

  .post-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
  }
}
