/* Parts of the Wagtail site that the prototype has no design for, built from its tokens and components:
   the sections of Insights, pagination, the download buttons of old report pages and the sign-up to read. */

/* Insights: featured posts with the recent ones and an Ask Kasi box beside them, then lists filtered by category. */
.insights-featured { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.insights-featured .article-lead { gap: 32px; padding-bottom: 40px; margin-top: 32px; }
.insights-featured .article-lead__title { font-size: var(--display-sm); }
.insights-featured .article-grid { margin-top: 40px; }
.insights-featured .article-card h3 { font-size: var(--text-xl); }
.insights-featured .article-card__summary { display: none; }
.article-card__image--empty { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--secondary); color: var(--primary); }
.insights-featured__aside { display: grid; gap: 24px; }
.recent-posts { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.recent-posts__title { font-size: var(--text-lg); font-weight: var(--weight-heading); }
.recent-posts ol { display: grid; gap: 18px; margin-top: 16px; }
.recent-posts li { display: grid; gap: 4px; padding-top: 16px; border-top: 1px solid var(--border); }
.recent-posts li:first-child { padding-top: 0; border-top: 0; }
.recent-posts a { font-weight: 700; line-height: 1.4; }
.recent-posts a:hover { color: var(--primary); }
.recent-posts time { font-size: var(--text-sm); color: var(--muted-foreground); }
.ask-box { display: grid; gap: 20px; justify-items: start; padding: 24px; border-radius: var(--radius-lg); background: var(--brand-deep); color: var(--on-brand); }
.ask-box p { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-heading); line-height: 1.3; }
.filter-bar + .article-grid, .filter-bar + .post-list__empty { margin-top: 32px; }
a.filter-chip:hover { border-color: var(--teal); }
.filter-chip[aria-current] { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.filter-chip--more { display: inline-flex; align-items: center; gap: 6px; border-style: dashed; border-color: var(--primary); color: var(--primary); }
.filter-chip--more:hover { background: var(--secondary); }
.filter-chip--more[hidden] { display: none; }
.post-list__empty { color: var(--muted-foreground); }
.insights-newsletter { padding-block: 64px; }
@media (max-width: 1080px) {
  .insights-featured { grid-template-columns: minmax(0, 1fr); }
  .insights-featured__aside { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination__pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination__page, .pagination__step { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--background); font-size: var(--text-sm); font-weight: 700; }
a.pagination__page:hover, .pagination__step:hover { border-color: var(--teal); }
.pagination__page[aria-current] { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.pagination__gap { padding-inline: 4px; color: var(--muted-foreground); }

.article-download { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-bottom: 40px; }
.article-download__title { font-size: var(--text-lg); font-weight: var(--weight-heading); }

/* The sign-up to read (core.gate): the opening fades out above the form. */
.gate-opening { padding-bottom: 0; -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent); mask-image: linear-gradient(to bottom, #000 45%, transparent); }
.gate { display: flex; gap: 20px; margin-block: 8px 48px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--secondary); }
.gate__icon { display: grid; flex-shrink: 0; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--background); color: var(--primary); }
.gate__body { flex: 1; min-width: 0; }
.gate h2 { font-family: var(--font-display); font-size: var(--display-sm); font-weight: var(--weight-heading); line-height: 1.25; }
.gate__body > p { margin-top: 8px; color: var(--muted-foreground); }
.gate__form { display: grid; gap: 18px; margin-top: 22px; }
.gate__form .btn { justify-self: start; }
.gate__error { font-size: var(--text-sm); font-weight: 600; color: var(--signal-down); }
.gate .fine-print a { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) {
  .gate { flex-direction: column; padding: 22px; }
}

/* Old landing pages in the new design (press releases, sustainability pieces, survey thank-yous, demo requests). */
.landing-hero__text > * + * { margin-top: 0.6em; }
.landing-hero__text a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.landing-topic__head { padding-top: 64px; }
.landing-topic__head .lead { margin-top: 12px; }
.landing-topics { padding-top: 32px; }
.landing-topics .filter-bar { margin-top: 0; }
.landing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-bottom: 56px; }
.landing-actions__title { flex-basis: 100%; font-size: var(--text-lg); font-weight: var(--weight-heading); }
.landing-cards .icon-card { display: flex; flex-direction: column; }
.landing-cards .icon-card .btn--link { margin-top: auto; padding-top: 16px; align-self: flex-start; }
.landing-cards__image { width: 100%; aspect-ratio: 16 / 9; margin-bottom: 18px; object-fit: cover; border-radius: var(--radius-sm); }
.section-title + .landing-video { margin-top: 32px; }
.landing-video { max-width: 880px; }
.landing-demo { align-items: start; }
.landing-demo__form { display: grid; gap: 18px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--background); }
.landing-demo__form .btn { justify-self: start; }
.landing-demo__message { font-weight: 600; }
.landing-demo__message:empty { display: none; }

/* Account pages: log in, password reset, profile and subscribing. */
.account { max-width: calc(520px + 2 * var(--gutter)); }
.account--wide { max-width: calc(760px + 2 * var(--gutter)); }
.account-panel { display: grid; gap: 20px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--background); }
.account-panel .btn { justify-self: start; }
.account-panel__title { margin-top: 8px; font-size: var(--text-lg); font-weight: var(--weight-heading); }
.account-panel__note { color: var(--muted-foreground); }
.account-details { display: grid; gap: 12px; }
.account-details > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.account-details dt { color: var(--muted-foreground); }
.account-details dd { font-weight: 600; overflow-wrap: anywhere; }
.account-details__notice dd { color: var(--signal-down); }
.field-error { font-size: var(--text-sm); font-weight: 600; color: var(--signal-down); }
.field-help ul { padding-left: 1.2em; list-style: disc; }
.account #checkout { margin-top: 24px; }
.account-panel .fine-print a, .field-error a, .gate__error a { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.gate__body > .gate__account { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); font-size: var(--text-sm); }
.gate__account a { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* The account link sits beside the main button only where the menu leaves room for it (at least 1200px wide).
   Narrower, it is in the footer, and in the phone menu below 861px. */
.header-actions { display: flex; align-items: center; gap: 24px; }
.header-account { display: none; font-size: 15px; font-weight: 600; }
@media (min-width: 1200px) {
  .header-account { display: inline; }
}
@media (max-width: 860px) {
  .header-actions { display: none; }
}
