/* ==========================================================================
   Post pages made from the dashboard (one pre-rendered page per post).
   Loaded after site.css; uses its colours and type.
   Blocks: paragraph, headings, lists, quote, callout, divider, pictures,
   video, YouTube / Instagram / Facebook / X, link card, table.
   ========================================================================== */

.post__content { line-height: 1.8; }
.post__content > * + * { margin-top: 1.15rem; }

.post__content > :is(h2, h3) {
  font-family: var(--font-display);
  color: var(--navy);
  text-wrap: balance;
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}
.post__content > h2 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem); font-weight: 600; line-height: 1.3; margin-top: 2.4rem; }
.post__content > h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.38; margin-top: 1.9rem; }
.post__content > :is(h2, h3) + * { margin-top: 0.65rem; }
.post__content > :first-child { margin-top: 0; }

.post__content a:not(.bm) {
  color: var(--crimson);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.post__content a:not(.bm):hover { text-decoration-thickness: 2px; }
.post__content b { font-weight: 650; color: var(--navy); }
.post__content mark { background: var(--apricot-soft); color: inherit; padding: 0 0.15em; border-radius: 3px; }
.post__content code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.88em; background: rgba(5, 42, 64, 0.07); padding: 0.1em 0.35em; border-radius: 4px; }

/* lists */
.post__content > ul { list-style: disc; padding-left: 1.4rem; }
.post__content > ol { list-style: decimal; padding-left: 1.6rem; }
.post__content li + li { margin-top: 0.4rem; }
.post__content li::marker { color: var(--crimson); font-weight: 600; }

/* quote and callout */
.post__content > blockquote {
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 3px solid var(--crimson);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--navy);
}
.post__content > .callout {
  padding: 1rem 1.2rem;
  background: var(--apricot-soft);
  border-radius: var(--r-m);
  border-left: 4px solid var(--apricot);
}
.post__content > hr {
  border: 0;
  height: 0;
  margin-block: 2.2rem;
  border-top: 1.5px solid var(--line);
}

/* pictures, video, embeds */
.post__content > .fig { margin-top: 1.5rem; margin-bottom: 0.4rem; }
.post__content > .fig + * { margin-top: 1.5rem; }
.fig figcaption { margin-top: 0.6rem; font-size: var(--fs-small); color: var(--ink-soft); line-height: 1.55; text-align: center; }
.fig--one .ph { display: block; }
.fig--one .ph img { width: 100%; height: auto; max-height: 80vh; object-fit: contain; }
.fig .pgrid--post { margin-bottom: -0.75rem; }
.vid { position: relative; overflow: hidden; border-radius: var(--r-m); background: var(--navy-deep); max-height: 80vh; }
.vid video { width: 100%; height: 100%; object-fit: contain; }
.vid--vertical { max-width: 22rem; margin-inline: auto; }
.fig .media--vertical { margin-inline: auto; }

/* link card */
.bm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--white);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bm:hover { border-color: var(--navy); box-shadow: 0 6px 20px -12px rgba(5, 42, 64, 0.4); }
.bm__b { display: grid; align-content: center; gap: 0.25rem; padding: 0.9rem 1.1rem; min-width: 0; }
.bm__b b { font: 600 1.05rem/1.4 var(--font-display); color: var(--navy); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bm__b span { font-size: var(--fs-small); color: var(--ink-soft); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bm__b small { display: inline-flex; align-items: center; gap: 0.35rem; font-size: var(--fs-tiny); color: var(--crimson); font-weight: 600; }
.bm__b small svg { width: 0.9rem; height: 0.9rem; flex: none; }
.bm__img { width: clamp(6.5rem, 26vw, 12rem); background: var(--apricot-soft); }
.bm__img img { width: 100%; height: 100%; object-fit: cover; }

/* table */
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--white); }
.tbl:focus-visible { outline-offset: 2px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); line-height: 1.55; }
.tbl :is(th, td) { padding: 0.65rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 7rem; }
.tbl th { background: var(--apricot-soft); color: var(--navy); font-weight: 600; white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:nth-child(even) td { background: rgba(5, 42, 64, 0.025); }

/* "इस पोस्ट में": table of contents for long posts */
.toc { padding: 1rem 1.2rem; border-radius: var(--r-m); background: var(--white); border: 1.5px solid var(--line); }
.toc p { font-size: var(--fs-tiny); font-weight: 700; letter-spacing: 0.04em; color: var(--crimson); }
.toc ol { list-style: decimal; padding-left: 1.3rem; margin-top: 0.4rem; font-size: var(--fs-small); }
.toc li + li { margin-top: 0.2rem; }
.toc a { text-decoration: none; color: var(--navy); }
.toc a:hover { color: var(--crimson); text-decoration: underline; }

/* dashboard preview only */
.preview-bar {
  position: sticky; top: 0; z-index: 90;
  padding: 0.45rem 1rem;
  background: #FDE68A; color: #713F12;
  font-size: var(--fs-tiny); font-weight: 600; text-align: center;
}

@media (max-width: 40rem) {
  .bm { grid-template-columns: minmax(0, 1fr); }
  .bm__img { width: 100%; aspect-ratio: 1.91 / 1; order: -1; }
  .post__content > blockquote { font-size: 1.15rem; }
}
