/* The Journal reuses landing.css for tokens, chrome and typography.
   This file only adds what long-form reading needs. */

body.blog {
  --measure: 720px;
  margin: 0;
  overflow: visible;
  color-scheme: dark;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* landing.css sets `.landing-page { background: transparent }` because the landing
     page paints its ground with a React-rendered .landing-fixed-background div.
     Static article pages have no React, so they must paint their own. */
  background: #111;
}

body.blog::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #111 url('/landing/assets/landing/app-gradient.svg') center top / cover no-repeat;
}

.blog * { box-sizing: border-box; }
.blog img { max-width: 100%; height: auto; }

/* The landing nav floats over the hero. Here it sits in the flow. */
.blog .landing-nav { position: static; padding-top: 8px; }
.blog .landing-footer { margin-top: 88px; }

.post,
.hub { width: min(var(--measure), calc(100% - 40px)); margin-inline: auto; }
.hub { --measure: 1080px; }

/* ------------------------------------------------------------- headings */

.blog h1,
.blog .post-body h2,
.blog .post-faq h2,
.blog .post-related h2 {
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.hub-head h1 {
  margin: 12px 0 0;
  font-size: clamp(52px, 8vw, 104px);
  font-weight: 800;
  line-height: .92;
}
.post-head h1 {
  margin: 12px 0 0;
  font-size: clamp(40px, 6.4vw, 74px);
  font-weight: 800;
  line-height: .96;
}
.hub-dek,
.post-dek {
  margin: 18px 0 0;
  max-width: 46ch;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.5;
}
.post-meta { margin: 16px 0 0; color: rgba(255, 255, 255, .42); font-size: 13px; }

.post-crumbs { margin: 26px 0 30px; color: rgba(255, 255, 255, .42); font-size: 12px; letter-spacing: .04em; }
.post-crumbs a { text-decoration: none; }
.post-crumbs a:hover { color: var(--coral); }
.post-crumbs span[aria-hidden] { padding: 0 7px; opacity: .45; }

.post-kicker {
  margin: 0;
  color: rgba(255, 255, 255, .55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------- figures */

.post-figure { margin: 34px 0; }
.post-figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
}
.post-figure-hero img { aspect-ratio: 3 / 2; object-fit: cover; }
.post-figure figcaption { margin-top: 11px; color: rgba(255, 255, 255, .38); font-size: 12px; }
.post-figure figcaption a { color: rgba(255, 255, 255, .62); text-decoration: underline; text-underline-offset: 2px; }
.post-figure figcaption a:hover { color: var(--coral); }

/* -------------------------------------------------------- answer + boxes */

.post-answer {
  margin: 10px 0 34px;
  padding: 22px 24px;
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--mint);
  border-radius: 16px;
  background: var(--panel);
  backdrop-filter: blur(14px);
}
.post-answer-label,
.post-takeaway-label,
.post-toc-label {
  margin: 0 0 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.post-answer-label { color: var(--mint); }
.post-answer p:last-child { margin: 0; font-size: 18px; }

.post-takeaway {
  margin: 32px 0;
  padding: 22px 24px;
  border: 1px solid rgba(255, 215, 95, .3);
  border-radius: 16px;
  background: rgba(255, 215, 95, .06);
}
.post-takeaway-label { color: var(--gold); }
.post-takeaway p:last-child { margin: 0; }

.post-toc {
  margin: 0 0 44px;
  padding: 20px 24px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
}
.post-toc-label { color: rgba(255, 255, 255, .55); }
.post-toc ol { margin: 0; padding-left: 20px; color: rgba(255, 255, 255, .62); font-size: 14.5px; }
.post-toc li { margin: 6px 0; }
.post-toc a { text-decoration: none; }
.post-toc a:hover { color: var(--coral); }

/* ------------------------------------------------------------------ body */

.post-body h2,
.post-faq h2,
.post-related h2 {
  margin: 52px 0 14px;
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 700;
  line-height: 1.02;
  scroll-margin-top: 24px;
}
.post-body h3,
.post-faq h3 { margin: 32px 0 8px; font-size: 20px; font-weight: 700; scroll-margin-top: 24px; }
.post-body p { margin: 0 0 19px; color: rgba(255, 255, 255, .84); }
.post-body ul,
.post-body ol { margin: 0 0 19px; padding-left: 22px; color: rgba(255, 255, 255, .84); }
.post-body li { margin: 8px 0; }
.post-body strong { color: #fff; }
.post-body a,
.post-faq a { color: var(--coral); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-body code { padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .09); font-size: .9em; }
.post-body blockquote {
  margin: 30px 0;
  padding: 2px 0 2px 22px;
  border-left: 2px solid var(--coral);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  line-height: 1.22;
  letter-spacing: -.02em;
}
.post-body blockquote p { margin: 0; color: #fff; }

.post-table-wrap { margin: 30px 0; overflow-x: auto; border: 1px solid var(--panel-border); border-radius: 16px; background: rgba(255, 255, 255, .02); }
.post-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.post-table th,
.post-table td { padding: 13px 15px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.post-table thead th {
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.post-table tbody th { color: #fff; font-weight: 700; }
.post-table tbody td { color: rgba(255, 255, 255, .78); }
.post-table tbody tr:last-child th,
.post-table tbody tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------------ faq/related */

.post-faq,
.post-related { margin-top: 60px; border-top: 1px solid rgba(255, 255, 255, .1); }
.post-faq-item { margin: 0 0 22px; }
.post-faq-item p { margin: 0; color: rgba(255, 255, 255, .78); }

.post-related-list { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.post-related-list a {
  display: grid;
  gap: 7px;
  padding: 20px 22px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s cubic-bezier(.16, 1, .3, 1);
}
.post-related-list a:hover { border-color: rgba(254, 99, 99, .5); transform: translateY(-2px); }
.post-related-kicker { color: rgba(255, 255, 255, .5); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.post-related-title { font-family: 'Barlow Condensed', sans-serif; font-size: 27px; font-weight: 700; line-height: 1.04; letter-spacing: -.03em; }
.post-related-dek { color: rgba(255, 255, 255, .58); font-size: 14px; line-height: 1.5; }
.post-related-hub { margin: 22px 0 0; }
.post-related-hub a { color: var(--coral); font-weight: 700; text-decoration: none; }

/* ------------------------------------------------------------------- hub */

.hub-head { margin-bottom: 8px; }
.hub-list-section { margin-top: 52px; }
.hub-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.hub-list a {
  display: grid;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--panel);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s cubic-bezier(.16, 1, .3, 1), background .2s ease;
}
.hub-list a:hover { border-color: rgba(254, 99, 99, .5); background: rgba(255, 255, 255, .06); transform: translateY(-2px); }
.hub-card-media { display: block; overflow: hidden; border-radius: 14px; }
.hub-card-media img { display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: cover; transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.hub-list a:hover .hub-card-media img { transform: scale(1.035); }
.hub-card-text { display: grid; gap: 9px; align-content: center; }
.hub-card-title { font-family: 'Barlow Condensed', sans-serif; font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.hub-card-dek { color: rgba(255, 255, 255, .6); font-size: 15px; line-height: 1.5; }
.hub-card-meta { color: rgba(255, 255, 255, .34); font-size: 11.5px; letter-spacing: .02em; }

@media (min-width: 760px) {
  .hub-list a { grid-template-columns: 300px minmax(0, 1fr); gap: 24px; padding: 18px; }
  .blog .landing-nav { width: min(1080px, calc(100% - 40px)); }
  .blog .landing-footer { width: min(1080px, calc(100% - 40px)); }
}

@media (max-width: 759px) {
  body.blog { font-size: 16px; }
  .post-figure img,
  .post-answer,
  .post-toc,
  .post-takeaway { border-radius: 14px; }
}
