/* Blog pages (#823): hub, network indexes and articles.
   Loaded by blog pages only. Uses the Observatory tokens of app.css. */

.obs-blog {
  --blog-accent: var(--live);
  --blog-accent-tint: var(--live-tint);
  width: min(1360px, calc(100% - 80px));
  margin: 0 auto;
  padding: 0 0 64px;
  color: var(--text-body);
  font-size: var(--fs-body);
}
.obs-blog.is-test {
  --blog-accent: var(--test);
  --blog-accent-tint: var(--test-tint);
}
/* Line the breadcrumb up with the page. */
.breadcrumbs:has(~ main .obs-blog) { width: min(1360px, calc(100% - 80px)); }
/* The breadcrumb repeats the article title; keep it to one line. */
.breadcrumbs:has(~ main .obs-blog-article) ol { flex-wrap: nowrap; }
.breadcrumbs:has(~ main .obs-blog-article) li { white-space: nowrap; }
.breadcrumbs:has(~ main .obs-blog-article) li:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obs-blog a { color: var(--data); text-decoration: none; }
.obs-blog a:hover { color: var(--text); text-decoration: underline; }
.obs-blog a:focus-visible { outline: var(--focus-ring); outline-offset: 2px; border-radius: 2px; }
.obs-blog .obs-chain-dot { flex: 0 0 auto; background: var(--live); }
.obs-blog.is-test .blog-head .obs-chain-dot,
.obs-blog .is-test .obs-chain-dot { background: var(--test); }
.blog-sep { margin: 0 8px; color: var(--text-faint); }

/* ---- Page header -------------------------------------------------------- */
.blog-head { max-width: 860px; padding: 28px 0 28px; }
.blog-eyebrow {
  display: flex;
  align-items: center;
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.obs-blog .blog-eyebrow a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.obs-blog .blog-eyebrow a:hover { color: var(--text); text-decoration: none; }
.blog-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.blog-lede {
  max-width: 68ch;
  margin: 16px 0 0;
  color: var(--text-body);
  font-size: 18px;
  line-height: 1.55;
}
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-ui);
}

/* ---- Article ------------------------------------------------------------- */
.blog-article { max-width: 1044px; }
.blog-hero { margin: 0 0 40px; }
.blog-hero img,
.blog-card-image img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
}
.blog-hero img {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(0, 260px);
  gap: 0 64px;
  align-items: start;
}
.blog-toc {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 2px 0 2px 20px;
  border-left: 1px solid var(--border);
  font-size: var(--fs-ui);
}
.obs-blog.is-test .blog-toc { top: 136px; max-height: calc(100vh - 160px); }
.blog-toc-title {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.blog-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.obs-blog .blog-toc a { color: var(--text-muted); line-height: 1.4; }
.obs-blog .blog-toc a:hover { color: var(--text); text-decoration: none; }
.blog-body { grid-column: 1; grid-row: 1; min-width: 0; }

/* Prose. */
.blog-body {
  color: var(--text-body);
  font-size: 17px;
  line-height: 1.7;
  overflow-wrap: break-word;
}
.blog-body > :first-child { margin-top: 0; }
.blog-body p { margin: 0 0 1.25em; }
.blog-body h2, .blog-body h3, .blog-body h4, .blog-body h5, .blog-body h6 {
  color: var(--text);
  font-weight: 600;
  line-height: 1.25;
  scroll-margin-top: 96px;
  text-wrap: balance;
}
.obs-blog.is-test .blog-body :is(h2, h3, h4, h5, h6) { scroll-margin-top: 136px; }
.blog-body h2 { margin: 2.1em 0 0.7em; font-size: 26px; letter-spacing: -0.015em; }
.blog-body h3 { margin: 1.8em 0 0.6em; font-size: 20px; letter-spacing: -0.01em; }
.blog-body h4, .blog-body h5, .blog-body h6 { margin: 1.6em 0 0.5em; font-size: 17px; }
.obs-blog .blog-body a {
  text-decoration: underline;
  text-decoration-color: rgba(109, 184, 242, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.obs-blog .blog-body a:hover { text-decoration-color: currentColor; }
.blog-body strong { color: var(--text); font-weight: 600; }
.blog-body ul, .blog-body ol { margin: 0 0 1.25em; padding-left: 1.4em; }
.blog-body li { margin: 0.4em 0; padding-left: 0.2em; }
.blog-body li::marker { color: var(--text-muted); }
.blog-body li > ul, .blog-body li > ol { margin: 0.4em 0 0; }
.blog-body li > p { margin: 0 0 0.6em; }
.blog-body code {
  padding: 0.12em 0.38em;
  font-size: 0.86em;
  overflow-wrap: anywhere;
}
.blog-body pre.blog-code {
  margin: 0 0 1.4em;
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  font-size: 14px;
  line-height: 1.6;
  -webkit-overflow-scrolling: touch;
}
.blog-body pre.blog-code code { padding: 0; background: none; border: 0; font-size: inherit; overflow-wrap: normal; white-space: pre; }
.blog-body blockquote {
  margin: 0 0 1.4em;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--blog-accent);
  color: var(--text);
}
.blog-body blockquote > :last-child { margin-bottom: 0; }
.blog-body hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--border); }
.blog-body img { max-width: 100%; height: auto; border-radius: var(--r-control); }

/* Tables scroll inside their own box on a narrow screen. */
.blog-table-wrap {
  margin: 0 0 1.6em;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  -webkit-overflow-scrolling: touch;
}
.blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
.blog-table th, .blog-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}
.blog-table thead th {
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.blog-table thead td { background: var(--surface); }
.blog-table tbody th { color: var(--text); font-weight: 600; }
.blog-table tbody tr:last-child > * { border-bottom: 0; }
.blog-table .blog-right { text-align: right; }
.blog-table .blog-center { text-align: center; }

/* FAQ and topics close the article. */
.blog-faq { margin-top: 3em; padding-top: 0.4em; border-top: 1px solid var(--border); }
.blog-faq-item { padding: 0 0 0.2em; }
.blog-body .blog-faq-item h3 { margin: 1.4em 0 0.4em; font-size: 18px; }
.blog-tags { margin-top: 2.6em; }
.blog-tags-title {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}
.blog-body .blog-tags ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.blog-body .blog-tags li {
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-chip);
  color: var(--text-muted);
  font-size: var(--fs-label);
  line-height: 1.5;
}

/* ---- Lists of articles --------------------------------------------------- */
.blog-section { margin: 0 0 48px; }
.blog-section-title {
  margin: 0 0 20px;
  color: var(--text);
  font-size: var(--fs-section);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.blog-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.blog-card:hover, .blog-card:focus-within { border-color: var(--border-strong); }
.blog-card-image { border-bottom: 1px solid var(--border); }
.blog-card-body { display: flex; flex: 1 1 auto; flex-direction: column; padding: 18px 20px 20px; }
.blog-card-chain {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.blog-card-title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.obs-blog .blog-card-title a { color: var(--text); }
.obs-blog .blog-card-title a:hover { color: var(--text); text-decoration: none; }
/* The title link covers the whole card. */
.blog-card-title a::after { content: ""; position: absolute; inset: 0; }
.obs-blog .blog-card-title a:focus-visible { outline: none; }
.blog-card:has(.blog-card-title a:focus-visible) { outline: var(--focus-ring); outline-offset: 2px; }
.blog-card-text {
  margin: 10px 0 0;
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.55;
}
.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: auto 0 0;
  padding-top: 16px;
  color: var(--text-muted);
  font-size: var(--fs-label);
}

.blog-chains {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-chain {
  min-width: 0;
  padding: 18px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.blog-chain-title { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.obs-blog .blog-chain-title a { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.blog-chain-meta { display: flex; flex-wrap: wrap; align-items: center; margin: 8px 0 0; color: var(--text-muted); font-size: var(--fs-label); }
.blog-chain-list { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--hairline); display: grid; gap: 10px; font-size: 14px; line-height: 1.45; }
.blog-chain-empty { margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--hairline); color: var(--text-muted); font-size: 14px; }
.blog-chain-all { margin: 14px 0 0; font-size: var(--fs-ui); }

.blog-empty {
  max-width: 720px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  line-height: 1.6;
}
.blog-empty p { margin: 0 0 10px; color: var(--text); }
.blog-empty ul { margin: 0; padding-left: 1.2em; }

.blog-more { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); }
.blog-more-links { display: flex; flex-wrap: wrap; align-items: center; margin: 24px 0 0; font-size: var(--fs-ui); }

/* ---- Narrower screens ---------------------------------------------------- */
@media (max-width: 1180px) {
  /* The header is no longer pinned below this width. */
  .blog-body :is(h2, h3, h4, h5, h6),
  .obs-blog.is-test .blog-body :is(h2, h3, h4, h5, h6) { scroll-margin-top: 16px; }
}
@media (max-width: 1080px) {
  .blog-layout { display: block; }
  .blog-toc { display: none; }
  .blog-body { max-width: 720px; }
  .blog-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .obs-blog, .breadcrumbs:has(~ main .obs-blog) { width: calc(100% - 32px); }
  .obs-blog { padding-bottom: 48px; }
  .blog-head { padding: 20px 0 22px; }
  .blog-lede { font-size: 17px; }
  .blog-hero { margin-bottom: 28px; }
  .blog-body { font-size: 16.5px; line-height: 1.68; }
  .blog-body h2 { font-size: 23px; }
  .blog-body h3 { font-size: 19px; }
  .blog-table { font-size: 14px; }
  .blog-table th, .blog-table td { padding: 9px 12px; }
  /* A table of four or more columns keeps readable columns and scrolls sideways. */
  .blog-table:has(thead tr > :nth-child(4)) { min-width: 560px; }
  .blog-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .blog-chains { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .blog-more { margin-top: 48px; padding-top: 32px; }
  .obs-blog .blog-more-links a, .obs-blog .blog-meta a { display: inline-flex; align-items: center; min-height: 32px; }
}
@media print {
  .blog-toc, .blog-more { display: none; }
  .blog-layout { display: block; }
}
