/* Blog: post pages, the blog home page and author pages. Sits on top of styles.css and pages.css. */

/* -- Post header ------------------------------------------- */
.phero--article { padding-bottom: clamp(40px, 6vh, 64px); }
.phero--article .phero__title { max-width: 24ch; }
.akicker { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-deep); }
.akicker--light { margin-top: clamp(22px, 4vh, 36px); color: var(--gold); }
.akicker--light + .phero__title { margin-top: 10px; }
.abyline { display: flex; align-items: center; gap: 14px; margin-top: 28px; font-size: 14px; color: rgba(242, 245, 247, 0.8); }
.abyline__pic { flex: none; width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(224, 155, 123, 0.6); }
.abyline__pic--initials { display: grid; place-items: center; background: rgba(224, 155, 123, 0.16); color: var(--gold); font: 600 14px var(--font-serif); }
.abyline__who { display: block; color: #f2f5f7; }
.abyline__who strong, .abyline__name { font-weight: 700; color: #f2f5f7; }
.abyline__name { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(242, 245, 247, 0.35); }
.abyline__name:hover { color: var(--gold); }
.abyline__meta { display: block; margin-top: 2px; font-size: 13px; color: rgba(242, 245, 247, 0.68); }

/* -- Post layout ------------------------------------------- */
.awrap { grid-template-columns: minmax(0, 1fr) 320px; }
.aaside { position: sticky; top: 104px; display: grid; gap: 22px; }
.aaside .sidecard { position: static; }
@media (max-width: 1000px) {
  .awrap { grid-template-columns: 1fr; }
  .aaside { position: static; }
  .atoc { display: none; }
}
.article { min-width: 0; }
.ahero { margin: 0 0 30px !important; }
.ahero img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; border-radius: 16px; }
.ahero figcaption, .article .figure figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-dim); }

.anation { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--bg-2); font-size: 13px !important; font-weight: 600; color: var(--navy) !important; }
.anation::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

.akeys { margin-top: 22px !important; max-width: 760px; padding: 22px 26px; border-radius: 16px; background: var(--slate); color: #f2f5f7; }
.akeys__title { font-size: 11px !important; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold) !important; }
.akeys p { margin-top: 10px; max-width: none; font-size: 17px !important; line-height: 1.6 !important; color: #f2f5f7 !important; }
.akeys ul { margin-top: 12px; padding-left: 0 !important; list-style: none; }
.akeys li { position: relative; max-width: none; padding-left: 22px; font-size: 15px !important; color: rgba(242, 245, 247, 0.9) !important; }
.akeys li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* -- Text styles inside a post ----------------------------- */
.article ol { padding-left: 22px; }
.article ol li + li { margin-top: 6px; }
.article blockquote { max-width: 760px; margin-top: 28px; padding: 4px 0 4px 24px; border-left: 4px solid var(--gold); }
.article blockquote p { font-family: var(--font-serif); font-size: clamp(19px, 1.8vw, 23px); font-style: italic; line-height: 1.5; color: var(--navy); }
.article .callout { max-width: 760px; margin-top: 26px; padding: 18px 22px; border-radius: 14px; border-left: 4px solid var(--gold); background: #fdf6f1; }
.article .callout > * + * { margin-top: 10px; }
.article .callout::before { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-deep); }
.article .callout p, .article .callout li { color: var(--ink); }
.article .callout--tip::before { content: "Tip"; }
.article .callout--important { border-left-color: #b3392c; background: #fdf1ef; }
.article .callout--important::before { content: "Important"; color: #b3392c; }
.article .callout--key { border-left-color: var(--slate); background: #eef1f3; }
.article .callout--key::before { content: "Key point"; color: var(--slate); }
.article .callout--proposed { border-left-color: #2b5c8a; background: #e8f0f8; }
.article .callout--proposed::before { content: "Proposed change: not law yet"; color: #2b5c8a; }
.article .callout--inforce { border-left-color: #1f7a45; background: #e7f3ec; }
.article .callout--inforce::before { content: "Now in force"; color: #1f7a45; }
.article .figure { max-width: 760px; margin-top: 28px; }
.article .figure img { display: block; width: 100%; height: auto; border-radius: 12px; }
.article hr { max-width: 760px; margin-top: 36px; border: 0; border-top: 1px solid var(--line); }
.table-wrap { max-width: 760px; margin-top: 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-wrap th, .table-wrap td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--ink); }
.table-wrap thead th { background: var(--slate); color: #f2f5f7; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; }
.table-wrap tbody th { font-weight: 700; color: var(--navy); }
.table-wrap tbody tr:nth-child(even) { background: var(--bg-2); }
.table-wrap tbody tr:last-child td, .table-wrap tbody tr:last-child th { border-bottom: 0; }
.article h2, .article h3 { scroll-margin-top: 110px; }
.article #questions + .qa { margin-top: 18px; }

/* -- End of post ------------------------------------------- */
.asources { max-width: 760px; margin-top: 40px !important; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; }
.asources__title { margin: 0 !important; font-family: var(--font-body) !important; font-size: 12px !important; font-weight: 700 !important; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep) !important; }
.asources ul { margin-top: 10px; }
.asources li { font-size: 15px !important; }
.adisclaimer { max-width: 760px; margin-top: 26px !important; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px !important; line-height: 1.6 !important; color: var(--ink-dim) !important; }
.ashare { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; max-width: 760px; margin-top: 30px !important; }
.ashare__label { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--navy); }
.ashare__links { display: flex; flex-wrap: wrap; gap: 8px; }
.ashare__links a, .ashare__copy { padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: none; font: 600 13px var(--font-body); color: var(--navy) !important; text-decoration: none !important; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.ashare__links a:hover, .ashare__copy:hover { border-color: var(--gold); background: #fdf6f1; }
.ashare__copy.is-done { border-color: #1f7a45; color: #1f7a45 !important; }
.aauthor { display: flex; gap: 18px; align-items: flex-start; max-width: 760px; margin-top: 34px !important; padding: 22px 24px; border-radius: 16px; background: var(--bg-2); }
.aauthor__pic { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.aauthor__pic--initials { display: grid; place-items: center; background: var(--slate); color: var(--gold); font: 600 22px var(--font-serif); }
.aauthor__name { font-family: var(--font-serif); font-size: 20px !important; color: var(--navy) !important; }
.aauthor__name a { color: var(--navy) !important; }
.aauthor__role { margin-top: 2px !important; font-size: 13px !important; font-weight: 600; color: var(--gold-deep) !important; }
.aauthor__bio { margin-top: 8px !important; font-size: 14.5px !important; }

/* -- Contents list ----------------------------------------- */
.atoc { padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.atoc__title { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-deep); }
.atoc ol { margin-top: 10px; padding: 0; list-style: none; counter-reset: toc; }
.atoc li { counter-increment: toc; }
.atoc a { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.4; color: var(--ink-dim); text-decoration: none; }
.atoc li:first-child a { border-top: 0; }
.atoc a::before { content: counter(toc, decimal-leading-zero); flex: none; font-size: 11px; font-weight: 700; color: var(--gold-deep); padding-top: 2px; }
.atoc a:hover, .atoc a.is-on { color: var(--navy); }
.atoc a.is-on { font-weight: 700; }

/* -- Cards ------------------------------------------------- */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.bcard { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); text-decoration: none; transition: transform 0.25s var(--ease-out), box-shadow 0.25s; }
.bcard:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(31, 36, 50, 0.12); }
.bcard__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--slate); }
.bcard__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.bcard:hover .bcard__img img { transform: scale(1.04); }
.bcard__ph { display: grid; place-items: center; width: 100%; height: 100%; font: 500 30px var(--font-serif); color: var(--gold); }
.bcard__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 20px 22px 22px; }
.bcard__title { font-family: var(--font-serif); font-size: 22px; font-weight: 500; line-height: 1.25; color: var(--navy); }
.bcard__sum { font-size: 14.5px; line-height: 1.6; color: var(--ink-dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard__meta { margin-top: auto; padding-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-dim); }
.bcard--feature { display: grid; grid-template-columns: 1.25fr 1fr; }
.bcard--feature .bcard__img { aspect-ratio: auto; min-height: 340px; }
.bcard--feature .bcard__body { justify-content: center; padding: clamp(24px, 4vw, 48px); }
.bcard--feature .bcard__title { font-size: clamp(26px, 2.8vw, 38px); }
.bcard--feature .bcard__sum { -webkit-line-clamp: 4; font-size: 16px; }
@media (max-width: 800px) { .bcard--feature { grid-template-columns: 1fr; } .bcard--feature .bcard__img { min-height: 0; aspect-ratio: 16 / 10; } }

/* -- Blog home --------------------------------------------- */
.aindex { padding-top: clamp(36px, 6vh, 60px); }
.aindex__title { margin-bottom: 22px; font-family: var(--font-serif); font-size: clamp(24px, 2.4vw, 32px); font-weight: 500; color: var(--navy); }
.atools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 28px; }
.achips { display: flex; flex-wrap: wrap; gap: 8px; }
.achip { padding: 9px 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font: 600 13.5px var(--font-body); color: var(--navy); cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.achip:hover { border-color: var(--gold); }
.achip.is-on { background: var(--slate); border-color: var(--slate); color: #f2f5f7; }
.asearch input { width: min(320px, 100%); padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 999px; font: 15px var(--font-body); color: var(--ink); background: #fff; }
.asearch input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 155, 123, 0.25); }
.afeature { margin-bottom: 28px; }
.afeature[hidden], .bcard[hidden], .atools[hidden], .anone[hidden] { display: none; }
.anone { padding: 30px 0; text-align: center; color: var(--ink-dim); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* -- Related posts ----------------------------------------- */
.arelated { padding: clamp(46px, 7vh, 80px) var(--pad); background: var(--bg-2); }
.arelated__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 26px; }
.arelated__head h2 { font-family: var(--font-serif); font-size: clamp(26px, 2.6vw, 36px); font-weight: 500; color: var(--navy); }
.arelated__head a { font-weight: 600; color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }

/* -- Author page ------------------------------------------- */
.aprofile { display: flex; align-items: center; gap: 22px; margin-top: clamp(22px, 4vh, 40px); }
.aprofile .phero__title { margin-top: 0; }
.aprofile__pic { flex: none; width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(224, 155, 123, 0.6); }
.aprofile__pic--initials { display: grid; place-items: center; background: rgba(224, 155, 123, 0.16); color: var(--gold); font: 600 34px var(--font-serif); }
.aprofile__role { margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--gold); }

/* -- Staff preview marker ---------------------------------- */
.preview-flag { position: sticky; top: 0; z-index: 2000; margin: 0; padding: 8px 16px; background: #b3392c; color: #fff; text-align: center; font: 700 13px var(--font-body); }

@media print { .aaside, .ashare, .arelated, .ctaband { display: none !important; } }

/* -- Homepage "From the blog" strip ------------------------ */
.blogband { padding: clamp(60px, 10vh, 110px) var(--pad); background: var(--bg-2); }
.blogband__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: clamp(26px, 4vh, 40px); }
.blogband__title { margin-top: 10px; font-family: var(--font-serif); font-size: clamp(30px, 4vw, 54px); font-weight: 500; line-height: 1.1; color: var(--navy); }
.blogband__title em { color: var(--gold-deep); font-style: italic; }
.blogband__all { font-weight: 600; color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
.blogband .agrid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

