/*
 * Saleleni inner pages (design v2): Insights listing, single articles, 404 and the privacy policy.
 * Loaded after site.css (tokens, header, pills, bands, post grid, footer), on these templates only.
 */

/* ---------- Page head (Insights, 404, privacy) ---------- */
.sl-pagehead { padding: clamp(56px, 8vw, 112px) 0 clamp(36px, 5vw, 64px); }
.sl-pagehead__title {
  max-width: 16ch;
  font-size: clamp(2.5rem, 6.4vw, 5.5rem); font-weight: 900;
  line-height: 0.98; letter-spacing: -0.03em; word-spacing: 0.04em; text-transform: uppercase;
}
.sl-pagehead__intro { margin-top: 28px; max-width: 36em; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.65; color: var(--graphite); }
.sl-pagehead__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 40px; }
.sl-pagehead__code { display: inline-block; margin-bottom: 28px; padding: 0.06em 0.2em 0.1em; border-radius: 0.18em; background: var(--amber); color: var(--ink); font-size: clamp(4rem, 13vw, 9rem); font-weight: 900; line-height: 0.9; letter-spacing: -0.05em; }

.sl-fine { font-size: 0.9375rem; line-height: 1.5; color: var(--stone); }
.sl-fine a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- Insights listing ---------- */
.sl-filter { display: flex; flex-wrap: wrap; gap: 10px; }
.sl-chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border: 2px solid var(--ink); border-radius: 999px;
  font-size: 0.875rem; font-weight: 700; text-decoration: none; color: var(--ink);
  transition: background-color .2s ease, color .2s ease;
}
.sl-chip:hover { background: var(--ink); color: var(--paper); }
.sl-chip.is-active { background: var(--ink); color: var(--paper); }

.sl-featured { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; text-decoration: none; }
.sl-featured__img { aspect-ratio: 16 / 9; border-radius: 26px; overflow: hidden; background: #E3E2DC; box-shadow: 0 2px 6px rgba(20, 20, 30, .06), 0 30px 60px -18px rgba(20, 20, 30, .28); }
.sl-featured__img img { width: 100%; height: 100%; object-fit: cover; }
.sl-featured__cat { display: block; font-size: 0.875rem; font-weight: 700; color: var(--graphite); }
.sl-featured__title { margin-top: 10px; font-size: clamp(1.75rem, 3.2vw, 2.75rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.03em; }
.sl-featured__excerpt { margin-top: 18px; max-width: 30em; color: var(--graphite); font-size: 1.0625rem; line-height: 1.65; }
.sl-featured__meta { margin-top: 18px; font-size: 0.875rem; color: var(--stone); }
.sl-featured__more { display: inline-block; margin-top: 22px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.sl-featured:hover .sl-featured__title { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }

.sl-listing { padding-top: clamp(40px, 6vw, 72px); }
.sl-listing .sl-posts { margin-top: clamp(48px, 7vw, 80px); }
.sl-listing .sl-featured + .sl-posts { margin-top: clamp(56px, 8vw, 96px); }

.sl-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 64px; }
.sl-pagination .page-numbers {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 16px;
  border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: 0.9375rem; text-decoration: none; color: var(--ink);
}
.sl-pagination a.page-numbers:hover, .sl-pagination .page-numbers.current { background: var(--ink); color: var(--paper); }
.sl-pagination .page-numbers.dots { border-color: transparent; }
.sl-empty { max-width: 34em; padding: 24px 0 8px; font-size: 1.125rem; line-height: 1.65; color: var(--graphite); }
.sl-empty .sl-pill { margin-top: 24px; }

.sl-post__excerpt { margin-top: 10px; color: var(--graphite); font-size: 1rem; line-height: 1.6; }
.sl-post__img-fallback { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 900; font-size: 1.5rem; letter-spacing: -0.03em; }

/* ---------- Single article ---------- */
#saleleni-progress-bar { position: fixed; top: 0; left: 0; z-index: 200; width: 0; height: 4px; background: var(--amber); transition: width .1s linear; }
.admin-bar #saleleni-progress-bar { top: 32px; }

.sl-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--stone); }
.sl-crumbs a { color: var(--graphite); text-decoration: none; font-weight: 500; }
.sl-crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.sl-posthead { padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 48px); }
.sl-posthead__inner { max-width: 880px; }
.sl-posthead__title { margin-top: 28px; font-size: clamp(2.25rem, 5.2vw, 4.25rem); font-weight: 900; line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.sl-posthead__standfirst { margin-top: 24px; max-width: 38em; font-size: clamp(1.125rem, 1.7vw, 1.375rem); line-height: 1.55; color: var(--graphite); }
.sl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 28px; font-size: 0.9375rem; color: var(--graphite); }
.sl-meta strong { color: var(--ink); font-weight: 700; }
.sl-meta__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--stone); }
.sl-share { display: flex; gap: 8px; margin-left: auto; }
.sl-share a { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 50%; color: var(--ink); }
.sl-share a:hover { background: var(--ink); color: var(--paper); }
.sl-share svg { width: 16px; height: 16px; }

.sl-posthero { margin: 0 auto; }
.sl-posthero img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 26px; box-shadow: 0 2px 6px rgba(20, 20, 30, .06), 0 30px 60px -18px rgba(20, 20, 30, .28); }

.sl-postbody { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); }
.sl-postlayout { display: grid; grid-template-columns: minmax(0, 680px) 300px; gap: clamp(40px, 6vw, 88px); justify-content: start; align-items: start; }
.sl-aside { position: sticky; top: calc(var(--header-h) + 32px); }
.admin-bar .sl-aside { top: calc(var(--header-h) + 64px); }
.sl-aside .sl-card { padding: 28px; box-shadow: 0 2px 6px rgba(20, 20, 30, .06), 0 30px 60px -18px rgba(20, 20, 30, .22); background: #fff; }
.sl-aside__title { font-size: 1.375rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.sl-aside__text { margin-top: 12px; color: var(--graphite); font-size: 1rem; line-height: 1.6; }
.sl-aside .sl-pill { margin-top: 22px; width: 100%; justify-content: space-between; }
.sl-aside__alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 0.9375rem; color: var(--graphite); }
.sl-aside__alt a { display: inline-block; margin-top: 4px; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* The article body: every standard WordPress block that the posts use. The rules are `.sl-prose x`, which
   beats GeneratePress's element rules and the block-library defaults. */
.sl-prose { font-size: 1.125rem; line-height: 1.75; color: var(--graphite); }
.sl-prose > :first-child { margin-top: 0; }
.sl-prose p { margin: 0 0 1.4em; }
.sl-prose strong { color: var(--ink); font-weight: 700; }
.sl-prose h2 { margin: 2.2em 0 0.6em; font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; color: var(--ink); }
.sl-prose h3 { margin: 2em 0 0.5em; font-size: clamp(1.375rem, 2.2vw, 1.625rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
.sl-prose h4 { margin: 1.6em 0 0.4em; font-size: 1.1875rem; font-weight: 800; line-height: 1.3; color: var(--ink); }
.sl-prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sl-prose a:hover { color: var(--amber-ink); }
.sl-prose ul, .sl-prose ol { margin: 0 0 1.4em; }
.sl-prose ul { list-style: none; padding: 0; }
.sl-prose ul li { position: relative; margin: 0.55em 0; padding-left: 28px; }
.sl-prose ul li::before { content: ''; position: absolute; left: 0; top: 0.85em; width: 14px; height: 2px; background: var(--tick); }
.sl-prose ol { list-style: decimal; padding-left: 1.5em; }
.sl-prose ol li { margin: 0.55em 0; padding-left: 0.3em; }
.sl-prose ol li::marker { font-weight: 800; color: var(--ink); }
.sl-prose li > ul, .sl-prose li > ol { margin: 0.6em 0 0; }
.sl-prose blockquote { margin: 2em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--amber); font-size: 1.3125rem; line-height: 1.5; font-weight: 600; color: var(--ink); }
.sl-prose blockquote p { margin: 0 0 0.6em; }
.sl-prose figure { margin: 2.2em 0; }
.sl-prose img { border-radius: 16px; }
.sl-prose figcaption { margin-top: 12px; font-size: 0.875rem; line-height: 1.5; color: var(--stone); }
.sl-prose hr { height: 0; margin: 3em 0; border: 0; border-top: 1px solid var(--rule); background: none; opacity: 1; width: 100%; max-width: none; }
.sl-prose code { padding: 2px 6px; border-radius: 6px; background: var(--mist); font-size: 0.9em; }
.sl-prose pre { margin: 1.8em 0; padding: 20px 24px; overflow-x: auto; border-radius: 16px; background: var(--ink); color: var(--paper); font-size: 0.9375rem; line-height: 1.6; }
.sl-prose pre code { padding: 0; background: none; }
.sl-prose .wp-block-columns { display: flex; flex-wrap: wrap; gap: 28px; margin: 2em 0; }
.sl-prose .wp-block-column { flex: 1 1 240px; min-width: 0; }
.sl-prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 2em 0; }

/* Tables: the first row is the header (the posts use plain cells with bold text), wide tables scroll sideways */
.sl-prose .wp-block-table { margin: 2.2em 0; overflow-x: auto; border-radius: 16px; background: #fff; box-shadow: 0 2px 6px rgba(20, 20, 30, .06), 0 20px 40px -20px rgba(20, 20, 30, .2); }
.sl-prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.55; text-align: left; }
.sl-prose td, .sl-prose th { padding: 14px 18px; vertical-align: top; border: 0; border-bottom: 1px solid var(--rule); }
.sl-prose tr:last-child td { border-bottom: 0; }
.sl-prose tbody tr:first-child td, .sl-prose th { background: var(--mist); color: var(--ink); font-weight: 800; }

/* Buttons inside articles: the same pill as everywhere else */
.sl-prose .wp-block-button__link, .sl-prose .wp-element-button {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px;
  border: 2px solid var(--amber); border-radius: 999px; background: var(--amber); color: var(--ink);
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.sl-prose .wp-block-button__link:hover, .sl-prose .wp-element-button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Editor patterns (Insert, Patterns, Saleleni) */
.sl-prose .key-takeaway { margin: 2em 0; padding: 24px 28px; border-radius: 20px; background: var(--amber); color: var(--ink); }
.sl-prose .key-takeaway__label { margin: 0 0 8px; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.04em; color: var(--ink); }
.sl-prose .key-takeaway__text { margin: 0; font-size: 1.1875rem; font-weight: 700; line-height: 1.45; color: var(--ink); }
.sl-prose .stat-callout { margin: 2.2em 0; padding: 40px 28px; border-radius: 20px; background: var(--ink); text-align: center; }
.sl-prose .stat-callout__number { margin: 0 0 8px; padding: 0; border: 0; font-size: clamp(3rem, 7vw, 4.5rem); font-weight: 900; line-height: 1; letter-spacing: -0.05em; color: var(--amber); }
.sl-prose .stat-callout__label { margin: 0; font-size: 1rem; color: #B4B5B8; }
.sl-prose .mid-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin: 2.2em 0; padding: 24px 28px; border-radius: 20px; background: var(--mist); }
.sl-prose .mid-cta__text { flex: 1 1 220px; margin: 0; font-size: 1.1875rem; font-weight: 700; color: var(--ink); }
.sl-prose .mid-cta .wp-block-buttons { margin: 0; }

/* Author */
.sl-author { padding: 0 0 clamp(56px, 8vw, 96px); }
.sl-author__row { display: flex; align-items: center; gap: 24px; padding-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--rule); }
.sl-author__photo { flex: none; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.sl-author__name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.sl-author__title { margin-top: 2px; font-size: 0.9375rem; color: var(--stone); }
.sl-author__text { margin-top: 10px; max-width: 40em; color: var(--graphite); font-size: 1rem; line-height: 1.6; }
.sl-author .sl-text-link { display: inline-block; margin-top: 12px; }

/* Calls to action at the end of an article / 404 (amber band) */
.sl-cta { text-align: left; }
.sl-cta__title { max-width: 18ch; font-size: clamp(2rem, 4.4vw, 3.5rem); font-weight: 900; line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }
.sl-cta__text { margin-top: 24px; max-width: 34em; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.65; }
.sl-cta .sl-pill { margin-top: 36px; }
.sl-related .sl-insights__head { align-items: flex-end; }

/* ---------- Privacy policy ---------- */
.sl-policy { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: clamp(40px, 6vw, 96px); align-items: start; }
.sl-policy__toc { position: sticky; top: calc(var(--header-h) + 32px); }
.admin-bar .sl-policy__toc { top: calc(var(--header-h) + 64px); }
.sl-policy__toc p { margin-bottom: 14px; font-size: 0.9375rem; font-weight: 800; color: var(--ink); }
.sl-policy__toc li { margin-bottom: 10px; }
.sl-policy__toc a { font-size: 0.9375rem; line-height: 1.4; color: var(--graphite); text-decoration: none; }
.sl-policy__toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.policy-section { margin-bottom: 56px; padding-bottom: 56px; border-bottom: 1px solid var(--rule); }
.policy-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.policy-section h2 { margin: 0 0 20px; font-size: clamp(1.625rem, 2.6vw, 2rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; color: var(--ink); }
.policy-section h3 { margin: 32px 0 12px; font-size: 1.1875rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.policy-section p { margin: 0 0 16px; color: var(--graphite); font-size: 1.0625rem; line-height: 1.75; }
.policy-section p:last-child { margin-bottom: 0; }
.policy-section strong { color: var(--ink); }
.policy-section a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.policy-section a:hover { color: var(--amber-ink); }
.policy-section ul { list-style: none; margin: 16px 0 20px; padding: 0; }
.policy-section ul li { position: relative; margin-bottom: 12px; padding-left: 28px; color: var(--graphite); font-size: 1.0625rem; line-height: 1.7; }
.policy-section ul li::before { content: ''; position: absolute; left: 0; top: 0.85em; width: 14px; height: 2px; background: var(--tick); }
.policy-infobox { margin: 24px 0; padding: 22px 26px; border-radius: 16px; background: #fff; box-shadow: 0 2px 6px rgba(20, 20, 30, .06), 0 20px 40px -20px rgba(20, 20, 30, .2); }
.policy-infobox p { margin-bottom: 6px; font-size: 1rem; }
.policy-table-wrap { margin: 24px 0; overflow-x: auto; border-radius: 16px; background: #fff; box-shadow: 0 2px 6px rgba(20, 20, 30, .06), 0 20px 40px -20px rgba(20, 20, 30, .2); }
.policy-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.9375rem; text-align: left; }
.policy-table th { padding: 14px 18px; background: var(--mist); color: var(--ink); font-size: 0.875rem; font-weight: 800; border-bottom: 1px solid var(--rule); }
.policy-table td { padding: 14px 18px; vertical-align: top; line-height: 1.6; color: var(--graphite); border-bottom: 1px solid var(--rule); }
.policy-table tbody tr:last-child td { border-bottom: 0; }
.policy-table code { padding: 1px 6px; border-radius: 6px; background: var(--mist); font-size: 0.875em; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .sl-postlayout { grid-template-columns: minmax(0, 680px); }
  .sl-aside { position: static; margin-top: 56px; }
}
@media (max-width: 860px) {
  .sl-featured { grid-template-columns: minmax(0, 1fr); }
  .sl-policy { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .sl-policy__toc { position: static; padding: 24px; border-radius: 20px; background: #fff; box-shadow: 0 2px 6px rgba(20, 20, 30, .06), 0 20px 40px -20px rgba(20, 20, 30, .2); }
  .sl-policy__toc ol { display: grid; grid-template-columns: minmax(0, 1fr) 1fr; gap: 6px 20px; }
  .sl-share { margin-left: 0; }
  .sl-author__row { align-items: flex-start; }
}
@media (max-width: 540px) {
  .sl-policy__toc ol { grid-template-columns: minmax(0, 1fr); }
  .sl-author__row { flex-direction: column; }
  .sl-prose { font-size: 1.0625rem; }
}
