/* Blog post page (RDS-108). Plain: the site's white, thin serif titles, and a contents list on the left that
   lights up the section you are reading. Based on Ripplix 4839 (Vibrant blog article). Loads after page.css. */
@import url("https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,300;6..72,400&display=swap");

/* same white and lines as every other inner page (page.css) */
body.pg.post-page { --paper-line: var(--rds-line); }
.post-page .bar-cta { background: var(--rds-gold); border-color: var(--rds-gold); color: var(--rds-ink); box-shadow: 0 4px 14px rgba(23, 44, 45, .18); }
.post-page .bar-cta:hover { background: var(--rds-gold-hover); color: #fff; }

/* contents on the left, the post on the right; both start on the page's left edge */
.post-layout { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: clamp(40px, 6vw, 88px); align-items: start; }
.post-side { position: sticky; top: calc(var(--rds-nav-h, 64px) + 40px); }
.post-side ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--paper-line); }
.post-side li a {
  display: block; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent;
  font-size: .84rem; line-height: 1.35; font-weight: 400 !important; color: var(--rds-text-3) !important; text-decoration: none;
  transition: color .25s ease, border-color .25s ease;
}
.post-side li a:hover { color: var(--rds-ink) !important; }
.post-side li a.is-on { color: var(--rds-ink) !important; border-left-color: var(--rds-teal); }
.post-side .side-label { display: block; margin-bottom: 12px; font-size: .78rem; color: var(--rds-text-3); }

/* type: the titles are a light serif, everything else stays Inter */
.post-page h1, .post-page .post h2 { font-family: "Newsreader", Georgia, serif; font-weight: 300; letter-spacing: -0.01em; color: var(--rds-ink); }
.post-page h1 { font-size: clamp(2.3rem, 4.6vw, 3.5rem); line-height: 1.08; max-width: 18ch; }
.post-page .post h2 { margin-top: 56px; font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.15; }
.post-page .post h3 { margin-top: 28px; font-size: 1.02rem; }
.post-page .post p, .post-page .post li { font-size: 1.05rem; line-height: 1.7; color: var(--rds-text); }
.post-page .crumbs { font-size: .86rem; color: var(--rds-text-3); }
.post-page .post-meta { margin-top: 16px; font-size: .9rem; color: var(--rds-text-3); }

/* the short answer reads as the opening paragraph, set apart by a gold rule */
.post-page .answer { margin-top: 32px; padding: 4px 0 4px 20px; background: none; border-radius: 0; border-left: 2px solid var(--rds-gold); }
.post-page .answer .label { display: none; }
.post-page .answer p { font-size: 1.15rem; line-height: 1.65; color: var(--rds-ink); }

/* the inline contents list is for phones; the side list does the job on wide screens */
.post-page .post > .toc { display: none; }

.post-page .post table th, .post-page .post table td { border-bottom-color: var(--paper-line); }
.post-page .post code { font-size: .88em; padding: 1px 5px; border-radius: 4px; background: var(--rds-surface-2); color: var(--rds-ink); }
.post-page .post details { border-top: 1px solid var(--paper-line); padding: 14px 0; }
.post-page .post details:last-of-type { border-bottom: 1px solid var(--paper-line); }
.post-page .post summary { cursor: pointer; font-weight: 600; color: var(--rds-ink); }
.post-page .post details p { margin-top: 10px; }
.post-page .foot { border-top: 1px solid var(--paper-line); }

@media (max-width: 900px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-side { display: none; }
  .post-page .post > .toc { display: block; padding: 16px 0; border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
  .post-page .post > .toc ol { padding: 6px 0 0; list-style: none; }
  .post-page .post > .toc strong { font-size: .84rem; font-weight: 400; color: var(--rds-text-3); }
  .post-page .post > .toc li a { display: block; padding: 6px 0; font-size: .95rem; font-weight: 400 !important; color: var(--rds-text-2) !important; text-decoration: none; }
}
