/* Resources hub, cornerstone guides, weekly posts and the newsletter block (23 Oct 2026). Loaded after pages.css. */

/* ---------- hub: section heads ---------- */
.res-head { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(20px, 4vw, 72px); align-items: end; margin-bottom: clamp(32px, 5vw, 64px); }
.res-head .lede { margin: 0; }
@media (max-width: 900px) { .res-head { grid-template-columns: 1fr; } }

/* ---------- hub: guide cards ---------- */
.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); list-style: none; margin: 0; padding: 0; }
.res-card { position: relative; display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .4s var(--ease), transform .4s var(--ease); }
.res-card:hover { transform: translateY(-2px); box-shadow: 0 30px 60px -40px rgba(20, 24, 28, .45); }
.res-card .media { aspect-ratio: 16 / 10; border-radius: 0; }
.res-card .media img { transition: transform 1.2s var(--ease); }
.res-card:hover .media img { transform: scale(1.03); }
.res-card__body { display: flex; flex-direction: column; gap: 10px; padding: clamp(20px, 2.2vw, 30px); flex: 1; }
.res-card__cat { font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--sapphire); }
.res-card h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem); line-height: 1.2; }
.res-card h3 a { text-decoration: none; }
.res-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link target */
.res-card h3 a:focus-visible { outline: none; }
.res-card:focus-within { outline: 2px solid var(--sapphire); outline-offset: 3px; }
.res-card p { margin: 0; color: var(--ink-2); font-size: 1rem; }
.res-card__meta { margin-top: auto; padding-top: 8px; font-size: var(--fs-small); color: var(--ink-3); }
@media (max-width: 760px) { .res-grid { grid-template-columns: 1fr; } }

/* ---------- hub: weekly feed ---------- */
.feed { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.feed__item { position: relative; display: grid; grid-template-columns: 11rem 1fr 220px; gap: clamp(16px, 3vw, 44px); align-items: center; padding: clamp(20px, 2.6vw, 32px) 0; border-bottom: 1px solid var(--line); }
.feed__date { font-size: var(--fs-small); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.feed__date b { display: block; font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--sapphire); margin-bottom: 4px; }
.feed__item h3 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); line-height: 1.2; margin-bottom: 8px; }
.feed__item h3 a { text-decoration: none; }
.feed__item h3 a::after { content: ""; position: absolute; inset: 0; }
.feed__item h3 a:focus-visible { outline: none; }
.feed__item:focus-within { outline: 2px solid var(--sapphire); outline-offset: 4px; }
.feed__item p { margin: 0; color: var(--ink-2); font-size: 1rem; }
.feed__item .media { aspect-ratio: 16 / 10; }
.feed__item:hover h3 { color: var(--sapphire); }
.feed__rss { display: inline-flex; align-items: center; min-height: 44px; margin-top: 18px; font-size: var(--fs-small); color: var(--ink-3); }
@media (max-width: 900px) { .feed__item { grid-template-columns: 1fr 160px; } .feed__date { grid-column: 1 / -1; } }
/* phone (1 Nov 2026 QA): each post is a compact row, 96x72 image left, label then title, summary hidden */
@media (max-width: 520px) {
  .feed__item { grid-template-columns: 96px 1fr; grid-template-areas: "img date" "img body"; gap: 4px 14px; align-items: start; padding: 16px 0; }
  .feed__item .media { grid-area: img; width: 96px; height: 72px; aspect-ratio: auto; order: 0; }
  .feed__date { grid-area: date; grid-column: auto; font-size: .8125rem; }
  .feed__date b { margin-bottom: 2px; }
  .feed__item > div:not(.media) { grid-area: body; }
  .feed__item h3 { font-size: 1.0625rem; margin: 0; }
  .feed__item > div:not(.media) p { display: none; }
}
/* the older posts sit behind a native <details>: no script, CSP-safe */
.feed__more > summary { list-style: none; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 20px; padding: 0 22px; border: 1px solid var(--sapphire); border-radius: 999px; color: var(--sapphire); font-weight: 500; cursor: pointer; }
.feed__more > summary::-webkit-details-marker { display: none; }
.feed__more > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.feed__more > summary:hover { background: var(--sapphire); color: #fff; }
.feed__more > summary:focus-visible { outline: 2px solid var(--sapphire); outline-offset: 3px; }
.feed__more[open] > summary { display: none; }
.feed--more { border-top: 0; }

/* ---------- article ---------- */
.article-head { padding: calc(var(--crisis-h) + var(--nav-h) + clamp(36px, 6vw, 88px)) 0 clamp(28px, 4vw, 48px); }
/* one fixed measure for every block (ch would scale with each element's font size): ~68 characters of 18px body text */
.article-col { max-width: var(--measure); margin-inline: auto; }
.article-head, .article-body { --measure: 40rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; list-style: none; margin: 0 0 clamp(22px, 3vw, 34px); padding: 0; font-size: var(--fs-small); color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 10px; color: var(--ink-3); opacity: .6; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--sapphire); }
.article-head h1 { font-size: clamp(2.3rem, 4.6vw, 4rem); margin: 14px 0 20px; }
.article-head h1 em { color: var(--sapphire); }
.article-head .lede { margin: 0 0 22px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: var(--fs-small); color: var(--ink-3); }
.article-meta span + span::before { content: "·"; margin-right: 16px; opacity: .6; }
.article-figure { max-width: calc(var(--maxw) - 2 * var(--gutter)); margin: 0 auto clamp(36px, 5vw, 64px); padding-inline: var(--gutter); }
.article-figure .media { aspect-ratio: 21 / 9; }
.article-figure figcaption { margin-top: 10px; font-size: var(--fs-small); color: var(--ink-3); }
@media (max-width: 760px) { .article-figure .media { aspect-ratio: 4 / 3; } }

.article-body { padding-bottom: clamp(56px, 8vw, 110px); }
.article-body > * { max-width: var(--measure); margin-inline: auto; }
.article-body h2 { font-size: clamp(1.6rem, 2.5vw, 2.15rem); margin: clamp(44px, 6vw, 64px) auto 14px; scroll-margin-top: calc(var(--crisis-h) + var(--nav-h) + 24px); }
.article-body h3 { font-size: 1.25rem; margin: 30px auto 8px; }
.article-body p, .article-body li { color: var(--ink-2); }
.article-body p { margin-bottom: 1.1em; }
.article-body ul, .article-body ol:not(.toc ol) { padding-left: 1.3em; display: grid; gap: 8px; margin-bottom: 1.3em; }
.article-body li::marker { color: var(--sapphire); }
.article-body a { color: var(--sapphire-deep); }
.article-body a:hover { color: var(--sapphire); }
.article-body strong { color: var(--ink); font-weight: 600; }

.toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.4vw, 28px) clamp(20px, 2.6vw, 32px); margin-bottom: clamp(32px, 4vw, 48px); }
.toc__h { margin: 0 0 12px; font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-2); }
.toc ol { counter-reset: t; list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.toc li { counter-increment: t; display: flex; gap: 12px; font-size: 1rem; }
.toc li::before { content: counter(t, decimal-leading-zero); min-width: 1.8em; font-size: var(--fs-small); font-variant-numeric: tabular-nums; color: var(--sapphire); padding-top: .2em; }
.toc a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.toc a:hover { border-color: var(--sapphire); color: var(--sapphire); }

.help-now { display: flex; gap: 14px; align-items: flex-start; background: var(--ink); color: #E9ECF5; border-radius: var(--radius); padding: 16px 20px; margin-bottom: clamp(28px, 4vw, 40px); font-size: .9375rem; line-height: 1.55; }
.help-now p { margin: 0; color: inherit !important; }
.help-now a { color: #fff !important; font-weight: 600; white-space: nowrap; display: inline-block; padding: 12px 0; margin: -12px 0; } /* 44px tap target, no layout shift */
.help-now__dot { flex: none; width: 8px; height: 8px; margin-top: .55em; border-radius: 50%; background: var(--dawn); box-shadow: 0 0 0 4px rgba(156, 200, 255, .2); }

.callout { border-left: 2px solid var(--sapphire); background: rgba(15, 82, 186, .05); padding: 16px 20px; margin: 24px auto; border-radius: 0 var(--radius) var(--radius) 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: #9B2C2C; background: rgba(155, 44, 44, .05); }
.callout__h { display: block; margin-bottom: 6px; font-weight: 600; color: var(--ink); }

.disclaimer { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; margin: clamp(40px, 5vw, 56px) auto 0; font-size: var(--fs-small); }
.disclaimer p { margin: 0 0 .6em; color: var(--ink-3) !important; }
.disclaimer p:last-child { margin: 0; }
.disclaimer b { color: var(--ink-2); }

.article-cta { margin-top: clamp(40px, 5vw, 56px) !important; padding: clamp(26px, 3.6vw, 44px); border-radius: var(--radius-lg); background: var(--sapphire-night); color: #E9ECF5; }
.article-cta h2 { margin: 0 0 10px; color: #fff; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.article-cta h2 em { color: var(--dawn); }
.article-cta p { color: rgba(233, 236, 245, .78) !important; margin-bottom: 22px; }
.article-cta .btns { display: flex; flex-wrap: wrap; gap: 10px; }
.article-cta .btn--ghost { color: #fff; }

/* ---------- related ---------- */
.related { padding-block: clamp(56px, 8vw, 110px); background: var(--paper); border-top: 1px solid var(--line); }
.related h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: clamp(22px, 3vw, 36px); }
.related .res-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .related .res-grid { grid-template-columns: 1fr; } .related .res-card { flex-direction: row; } .related .res-card .media { flex: 0 0 34%; aspect-ratio: auto; } }
@media (max-width: 520px) { .related .res-card .res-card__body { padding: 14px 16px; gap: 6px; } .related .res-card h3 { font-size: 1.1rem; } .related .res-card p { display: none; } }

/* ---------- newsletter (demo) ---------- */
.newsletter { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(26px, 4vw, 56px); border-radius: var(--radius-lg); background: var(--sapphire-night); color: #E9ECF5; }
.newsletter h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 14px 0 14px; }
.newsletter h2 em { color: var(--dawn); }
.newsletter__copy p { margin: 0; color: rgba(233, 236, 245, .78); max-width: 34em; }
.newsletter__form, .newsletter__done { background: #fff; color: var(--ink); border-radius: var(--radius); padding: clamp(20px, 2.6vw, 32px); display: grid; gap: 14px; }
.newsletter__row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; }
.newsletter .switch { padding: 4px 0 10px; }
.newsletter .switch small { color: var(--ink-3); }
.newsletter__fine { margin: 0; font-size: .8125rem; color: var(--ink-3); }
.newsletter__done[hidden] { display: none; }
.newsletter__done h3 { font-size: 1.4rem; }
.newsletter__done p { margin: 0; color: var(--ink-2); }
.newsletter__done .btn { justify-self: start; }
.newsletter .tag--demo { justify-self: start; }
.newsletter__copy .tag--concept { background: rgba(156, 200, 255, .18); color: var(--dawn); }
@media (max-width: 900px) { .newsletter { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .newsletter__row { grid-template-columns: 1fr; } }

/* 23 Oct 2026 (Hugo audit 2): the newsletter is a full-bleed night band, the in-article call is a ruled block */
.section:has(> .wrap > .newsletter) { background: var(--sapphire-night); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.newsletter { padding: 0; border-radius: 0; background: none; }
.newsletter h2 em { color: inherit; }
.article-cta { background: none; color: var(--ink); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; padding: clamp(24px, 3vw, 36px) 0; }
.article-cta h2 { color: var(--ink); font-size: clamp(1.7rem, 2.8vw, 2.4rem); }
.article-cta h2 em { color: inherit; }
.article-cta p { color: var(--ink-2) !important; }
.article-cta .btn--light { --bg: var(--ink); --fg: #fff; }
.article-cta .btn--ghost, .article-cta .hero__ghost { color: var(--ink); border-color: rgba(20, 24, 28, .4); }
/* 31 Oct: the article link colour beat the button's own colour, leaving navy text on the ink button (1.25:1) */
.article-body .article-cta a.btn--light { color: #fff; }
.article-body .article-cta a.btn--ghost { color: var(--ink); }
main .article-body > p:not([class]) { max-width: var(--measure); }   /* base.css 68ch rule was widening article paragraphs past the headings */
@media (min-width: 521px) { .feed__date { white-space: nowrap; } }
