/* ============================================================
   019 BLOG — public pages (/blog, posts, authors, write for us).
   Loaded after theme.css + chapters.css: same "Bright Sky" tokens
   (--hp-*), always light. Colour rules hold: green = success only,
   red = validation errors only, saffron = warmth (never status).
   ============================================================ */
.nav-links a[aria-current="page"] { color: var(--hp-blue-ink); font-weight: 600; }

/* ---- avatars (initials stand in for uploaded photos) ---- */
.avatar { width: 2rem; height: 2rem; border-radius: 50%; flex: none; display: block; object-fit: cover; background: var(--hp-blue-wash); }
.avatar-lg { width: 3.2rem; height: 3.2rem; }
.avatar-xl { width: 5.5rem; height: 5.5rem; }

/* ---- blog home ---- */
.blog-hero h1 { font-size: clamp(2.2rem, 5vw, 3.3rem); font-weight: 800; margin-top: .8rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.3rem; }
.fchip { font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; border-radius: 99px; padding: .42rem 1rem;
  border: 1.5px solid #D2E2F5; background: #fff; color: var(--hp-soft); }
.fchip:hover { border-color: var(--hp-blue); }
.fchip[aria-pressed="true"] { background: var(--hp-blue); border-color: var(--hp-blue); color: #fff; }
.fchip:focus-visible, .fselect:focus-visible { outline: 3px solid var(--hp-ink); outline-offset: 2px; }
.fselect { font: inherit; font-size: .92rem; border: 1.5px solid #D2E2F5; border-radius: 99px; padding: .42rem .9rem; background: #fff; color: var(--hp-ink); margin-left: .3rem; }

.bgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin: 1.6rem 0 1rem; }
@media (max-width: 980px) { .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .bgrid { grid-template-columns: 1fr; } }
.bcard { display: flex; flex-direction: column; background: #fff; border-radius: var(--hp-radius); box-shadow: var(--hp-shadow);
  overflow: hidden; text-decoration: none; transition: transform .15s ease; }
.bcard:hover { transform: translateY(-2px); }
.bcard:focus-visible { outline: 3px solid var(--hp-ink); outline-offset: 3px; }
.bcard .cover { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--hp-blue-wash); }
.bcard-body { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.15rem 1.15rem; flex: 1; }
.bcard h2, .bcard h3 { font-size: 1.28rem; font-weight: 700; line-height: 1.18; }
.bcard p { margin: 0; color: var(--hp-soft); font-size: .95rem; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag-kite { color: var(--kite-ink); background: var(--kite-wash); }
.mini-by { display: flex; align-items: center; gap: .55rem; margin-top: auto; padding-top: .5rem; font-size: .86rem; color: var(--hp-quiet); }
.mini-by b { color: var(--hp-ink); font-weight: 600; }
.bcard.feature { grid-column: 1 / -1; flex-direction: row; }
.bcard.feature .cover { width: 58%; aspect-ratio: auto; min-height: 100%; }
.bcard.feature .bcard-body { padding: 1.6rem 1.8rem; justify-content: center; }
.bcard.feature h2, .bcard.feature h3 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); }
.bcard.feature p { font-size: 1.02rem; }
@media (max-width: 760px) {
  .bcard.feature { flex-direction: column; }
  .bcard.feature .cover { width: 100%; aspect-ratio: 1200 / 630; min-height: 0; height: auto; }
  .bcard.feature .bcard-body { padding: 1rem 1.15rem 1.15rem; }
}
[lang="hi"] { font-family: "Noto Sans Devanagari", "IBM Plex Sans", sans-serif; }
.bcard[lang="hi"] h2, .bcard[lang="hi"] h3 { font-family: "Noto Sans Devanagari", sans-serif; font-weight: 700; line-height: 1.35; }
.pager { display: flex; justify-content: flex-end; margin: .4rem 0 2rem; }

/* ---- subscribe box ---- */
.subbox { background: linear-gradient(135deg, var(--hp-blue-wash), #F3FAFF); border: 1px solid #CFE4FA; border-radius: var(--hp-radius);
  padding: clamp(1.1rem, 3vw, 1.6rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1rem 2rem; align-items: start; margin: 1.4rem 0; }
.subbox h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); font-weight: 800; }
.subbox .sub-lede { margin: .35rem 0 0; color: var(--hp-soft); }
.subbox .sub-fine { margin: 0; font-size: .8rem; color: var(--hp-soft); line-height: 1.45; }
.post-note { margin: 1.75rem 0 0; font-size: .86rem; color: var(--hp-soft); line-height: 1.5; max-width: 70ch; }
.sub-fine a, .post-note a { color: inherit; text-decoration: underline; }
@media (max-width: 760px) { .subbox { grid-template-columns: 1fr; } }
.subform { display: grid; gap: .65rem; }
.subrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .6rem; }
@media (max-width: 480px) { .subrow { grid-template-columns: 1fr; } }
.pinput { font: inherit; font-size: 1rem; width: 100%; padding: .68rem .8rem; border-radius: 10px; border: 1.5px solid #CADCF0; background: #fff; color: var(--hp-ink); }
.pinput:focus-visible { outline: 3px solid var(--hp-ink); outline-offset: 1px; border-color: var(--hp-blue); }
.pinput[aria-invalid="true"] { border-color: var(--pen); }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; border: 0; padding: 0; margin: 0; align-items: center; }
.pills legend { font-size: .88rem; font-weight: 600; color: var(--hp-soft); float: left; margin-right: .4rem; padding: 0; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border-radius: 99px; border: 1.5px solid #CADCF0; background: #fff; font-weight: 600; font-size: .92rem; color: var(--hp-soft); }
.pill input:checked + span { background: var(--hp-blue); border-color: var(--hp-blue); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--hp-ink); outline-offset: 2px; }
.consent { display: flex; gap: .55rem; align-items: flex-start; font-size: .86rem; color: var(--hp-soft); line-height: 1.45; }
.consent input { width: 1.15rem; height: 1.15rem; margin-top: .1rem; accent-color: var(--hp-blue); flex: none; }
.perr { color: var(--pen); font-size: .84rem; font-weight: 500; margin: 0; }
.perr:empty { display: none; }
.done-msg { display: flex; gap: .7rem; align-items: center; background: #fff; border-radius: 12px; padding: .9rem 1rem; color: var(--ok-deep); font-weight: 600; }
.done-msg .chk { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; font-size: 1rem; }
.done-msg span { color: var(--hp-soft); font-weight: 400; display: block; font-size: .92rem; }
.hp { position: absolute; left: -9999px; }

/* ---- write for us band ---- */
.wfu { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  background: var(--kite-wash); border-radius: var(--hp-radius); padding: 1.3rem 1.6rem; margin: 1.6rem 0 2.4rem; }
.wfu h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 800; }
.wfu p { margin: .3rem 0 0; color: var(--hp-soft); max-width: 60ch; }

/* ---- post page ---- */
.post-hero { padding-bottom: 1.6rem; }
.post-head { max-width: 760px; }
.post-head h1 { font-size: clamp(2rem, 4.6vw, 2.75rem); font-weight: 800; margin: .7rem 0 .9rem; line-height: 1.12; }
.byline { display: flex; align-items: center; gap: .75rem; font-size: .92rem; color: var(--hp-quiet); flex-wrap: wrap; }
.byline a { color: var(--hp-ink); font-weight: 600; text-decoration: none; }
.byline a:hover { text-decoration: underline; }
.byline .who { display: grid; line-height: 1.35; }
.byline .when { display: block; }
.post-cover { margin: 0 0 1.6rem; max-width: 900px; }
.post-cover img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--hp-radius); box-shadow: var(--hp-shadow); }
.post-body { max-width: 720px; font-size: 1.125rem; line-height: 1.75; color: #24395E; }
.post-body h2 { font-size: 1.55rem; font-weight: 800; margin: 2rem 0 .6rem; }
.post-body h3 { font-size: 1.25rem; font-weight: 700; margin: 1.5rem 0 .4rem; }
.post-body p { margin: 0 0 1.05rem; }
.post-body ul, .post-body ol { margin: 0 0 1.05rem; padding-left: 1.4rem; }
.post-body li { margin-bottom: .35rem; }
.post-body a { color: var(--hp-blue-ink); }
.post-body figure { margin: 1.6rem 0; }
.post-body figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--hp-line); background: #fff; }
.post-body figcaption { font-size: .9rem; color: var(--hp-quiet); margin-top: .45rem; line-height: 1.45; }
.post-body blockquote { margin: 1.5rem 0; padding: .3rem 0 .3rem 1.2rem; border-left: 4px solid var(--kite); font-family: "Baloo 2", sans-serif; font-size: 1.32rem; line-height: 1.4; color: var(--hp-ink); }
.share-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1.6rem 0; max-width: 720px; padding-top: 1.2rem; border-top: 1px solid var(--hp-line); }
.share-row .lbl { font-weight: 600; font-size: .92rem; margin-right: .3rem; }
.practise { max-width: 720px; margin: 2rem 0; }
.practise h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: .2rem; }
.practise .chgrid { margin: .8rem 0 0; }
.chcard .try { font-size: .88rem; font-weight: 600; color: var(--hp-blue-ink); margin-top: .3rem; }
.author-box { display: flex; gap: 1.1rem; align-items: flex-start; max-width: 720px; background: #fff; border: 1px solid var(--hp-line); border-radius: var(--hp-radius); padding: 1.2rem 1.3rem; margin: 2rem 0; }
.author-box h2 { font-size: 1.3rem; font-weight: 800; }
.author-box .role { font-size: .9rem; color: var(--hp-quiet); margin: 0; }
.author-box p { margin: .45rem 0 0; color: var(--hp-soft); font-size: .97rem; }
.author-box .links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .55rem; font-size: .92rem; }
.author-box .links a { color: var(--hp-blue-ink); font-weight: 600; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); font-weight: 800; }

/* ---- author page ---- */
.author-hero { display: flex; gap: 1.3rem; align-items: center; flex-wrap: wrap; }
.author-hero h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); font-weight: 800; }
.author-hero .role { margin: .2rem 0 0; color: var(--hp-blue-ink); font-weight: 600; }
.author-hero .bio { margin: .5rem 0 0; color: var(--hp-soft); max-width: 62ch; }

/* ---- write for us ---- */
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.4rem 0 .6rem; }
@media (max-width: 860px) { .why { grid-template-columns: 1fr; } }
.why > div { background: #fff; border: 1px solid var(--hp-line); border-radius: 16px; padding: 1.1rem 1.2rem; }
.why h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: .4rem; }
.why ul { margin: 0; padding-left: 1.1rem; color: var(--hp-soft); font-size: .95rem; }
.why li { margin-bottom: .3rem; }
.note-line { font-size: .92rem; color: var(--hp-soft); max-width: 70ch; }
.pform { max-width: 720px; background: #fff; border-radius: var(--hp-radius); box-shadow: var(--hp-shadow); padding: clamp(1.1rem, 3vw, 1.8rem); margin: 1rem 0 2.6rem; display: grid; gap: 1rem; }
.pform h2 { font-size: 1.5rem; font-weight: 800; }
.pfield { display: grid; gap: .3rem; }
.pfield > label, .pfield > .plabel { font-weight: 600; font-size: .92rem; }
.pfield .hint { font-size: .84rem; color: var(--hp-quiet); margin: 0; }
.pfield .opt { font-weight: 400; color: var(--hp-quiet); }
.prow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .prow2 { grid-template-columns: 1fr; } }
textarea.pinput { min-height: 6.5rem; resize: vertical; line-height: 1.5; }
.counter { font-size: .8rem; color: var(--hp-quiet); text-align: right; font-variant-numeric: tabular-nums; }
.or-line { text-align: center; font-size: .84rem; color: var(--hp-quiet); }
.thanks { max-width: 720px; background: #fff; border-radius: var(--hp-radius); box-shadow: var(--hp-shadow); padding: 1.6rem 1.8rem; margin: 1rem 0 2.6rem; }
.thanks h2 { font-size: 1.6rem; font-weight: 800; margin: .7rem 0 .3rem; }
.thanks p { color: var(--hp-soft); margin: 0 0 1rem; }

/* ---- small centred cards (confirm, join) ---- */
.mini-page { min-height: 62vh; display: grid; place-items: center; padding: 2rem 0; background: linear-gradient(180deg, var(--hp-sky-top), var(--hp-sky-mid)); }
.mini-card { width: min(480px, 92vw); background: #fff; border-radius: var(--hp-radius); box-shadow: var(--hp-shadow); padding: 1.6rem 1.7rem; display: grid; gap: .9rem; }
.mini-card h1 { font-size: 1.85rem; font-weight: 800; }
.mini-card .eyebrow { justify-self: start; }
.mini-card p { margin: 0; color: var(--hp-soft); }
.mini-card .email-shown { font-weight: 600; color: var(--hp-ink); background: var(--hp-blue-wash); border-radius: 10px; padding: .55rem .8rem; }

/* visually hidden, still read by screen readers (worksheets.css has the same rule) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- views and likes (019 BLG-23) ---- */
.pstats { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .15rem; font-size: .84rem; color: var(--hp-quiet); }
.pstats .ps { display: inline-flex; align-items: center; gap: .25rem; font-variant-numeric: tabular-nums; }
.pstats svg { width: 1em; height: 1em; flex: none; }
.mini-by > span { display: grid; }
.byline .when .pstats { margin-top: .2rem; }
.share-row .grow-sp { flex: 1; }
.like-btn { font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; border-radius: 99px; padding: .5rem 1rem; min-height: 2.75rem;
  border: 1.5px solid #D2E2F5; background: #fff; color: var(--hp-ink); }
.like-btn svg { width: 1.2rem; height: 1.2rem; }
.like-btn b { font-variant-numeric: tabular-nums; color: var(--hp-soft); }
.like-btn:hover { border-color: var(--hp-blue); }
.like-btn:focus-visible { outline: 3px solid var(--hp-ink); outline-offset: 2px; }
.like-btn[aria-pressed="true"] { --heart-fill: currentColor; background: var(--hp-blue-wash); border-color: var(--hp-blue); color: var(--hp-blue-ink); }
.like-btn[aria-pressed="true"] b { color: var(--hp-blue-ink); }

/* 019 — the writer's preview banner (not in the prototype). */
.preview-ribbon { background: var(--hp-kite-wash, #FAEDD3); color: var(--hp-ink, #223564); text-align: center; padding: .55rem 1rem; font-weight: 600; font-size: .92rem; border-bottom: 1px solid var(--hp-rule, #C7D8EC); }
a.fchip { text-decoration: none; display: inline-flex; align-items: center; }
.empty-blog { text-align: center; padding: 2.5rem 1rem 1rem; }

/* 019 DEC-2: the banner when Write for us opens from an admin's invite */
.inv-banner { max-width: 46rem; background: var(--kite-wash); border: 1px solid var(--kite); border-radius: 10px; padding: .8rem 1rem; margin: 0 0 1.2rem; line-height: 1.5; color: var(--hp-ink); }
.inv-banner a { font-weight: 600; color: inherit; text-decoration: underline; }

/* 019 DEC-4: the post page is one centred reading column with a compact
   header, so the text starts on the first screen; pictures have 3 sizes. */
.post-col { width: min(720px, 90vw); }
.post-hero { background: none; padding: 1.1rem 0 0; }
.post-top { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; }
.post-top .crumbs { margin: 0; }
.post-head { max-width: none; }
.post-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.3rem); line-height: 1.15; margin: .8rem 0 .6rem; }
.post-lede { font-size: 1.12rem; line-height: 1.5; color: var(--hp-soft); margin: 0 0 .9rem; }
.post-hero .byline { padding: .6rem 0; border-top: 1px solid var(--hp-line); border-bottom: 1px solid var(--hp-line); gap: .7rem; }
.post-hero .byline .when { margin-left: auto; text-align: right; font-size: .86rem; }
.post-col .post-cover { max-width: none; margin: 1.1rem 0 1.5rem; }
.post-col .post-cover img { border-radius: 12px; box-shadow: none; border: 1px solid var(--hp-line); }
.post-col .post-body { max-width: none; }
.post-body figure { margin: 2rem auto; }
.post-body figure.pic-s { width: 50%; }
.post-body figure.pic-m { width: 75%; }
.post-body figcaption { text-align: center; }
.post-col .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-col .subbox { grid-template-columns: 1fr; }
@media (max-width: 640px) {
  .post-hero .byline .when { margin-left: 0; text-align: left; flex-basis: 100%; }
  .post-body figure.pic-s { width: 75%; }
  .post-body figure.pic-m { width: 100%; }
  .post-col .bgrid { grid-template-columns: 1fr; }
}

/* --- 019 DEC-5: cover sizes, a card without a cover, a writer's links ---- */
.post-col .post-cover { margin-left: auto; margin-right: auto; }
.post-col .post-cover.cover-s { width: 50%; }
.post-col .post-cover.cover-m { width: 75%; }
@media (max-width: 600px) { .post-col .post-cover.cover-s { width: 75%; } .post-col .post-cover.cover-m { width: 100%; } }
.bcard .cover-none { display: flex; align-items: center; justify-content: center; gap: .6rem; color: #14305A;
  background: radial-gradient(circle, rgba(20,48,90,.10) 1px, transparent 1.4px) 0 0 / 16px 16px, var(--hp-blue-wash, #E4EEF9); }
.bcard.feature .cover-none { width: 58%; min-height: 100%; }
.bcard .cover-none i { width: 1.3rem; height: 1.3rem; background: #EFA63B; border-radius: 4px; transform: rotate(45deg); }
.bcard .cover-none b { font-size: 1.6rem; font-weight: 800; }
.soc { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.soc a { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem .3rem .5rem; border: 1px solid var(--hp-line); border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--hp-blue-ink); text-decoration: none; background: #fff; }
.soc a:hover { border-color: currentColor; }
.soc svg { width: 1.05rem; height: 1.05rem; }

/* 019 DEC-6: an admin's post is the Clay team's. */
.team-tag { display: inline-block; margin-left: .45rem; padding: .08rem .5rem; border-radius: 999px;
  background: var(--hp-blue-wash); color: var(--hp-blue-ink); font-size: .72rem; font-weight: 600; letter-spacing: .01em;
  vertical-align: middle; white-space: nowrap; }
