/* truegivers.com: TruePyramids.Web's layout and components, in TrueGivers' colors (taken from the WordPress theme:
   green #007f32 / #71ae47, navy #0b3954 / #03263b, light blue #bddae6, coral #ff6663). */
:root {
  --brand-950: #03263B;
  --brand-900: #0B3954;
  --brand-800: #00662A;
  --brand-700: #007F32;
  --brand-600: #71AE47;
  --brand-300: #8FB9DA;
  --brand-100: #BDDAE6;
  --brand-50: #EDF6EF;
  --accent-400: #71AE47;
  --accent-50: #F0F7EA;
  --coral: #FF6663;
  --ink: #202223;
  --ink-2: #4B5563;
  --ink-3: #5B6472;
  --line: #DDE1E7;
  --line-strong: #C9CFD8;
  --line-soft: #E8EBEF;
  --page: #F5F5F5;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
a { color: var(--brand-700); }
a:hover { color: var(--brand-900); }
:focus-visible { outline: 2px solid var(--brand-700); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.015em; margin: 0; color: var(--ink); }
h1 { font-size: 40px; line-height: 1.1; }
h2 { font-size: 26px; line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.25; }
p { margin: 0; }
img, video { max-width: 100%; height: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner { max-width: 1200px; margin: 0 auto; padding: 10px clamp(16px, 4vw, 24px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 44px; width: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.nav a:not(.btn) { display: inline-flex; align-items: center; height: 44px; padding: 0 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--brand-700); }
.nav a[aria-current="page"] { background: var(--brand-50); color: var(--brand-900); font-weight: 600; }
.nav .btn { margin-left: 6px; }

/* Layout */
.wrap { max-width: 1200px; margin: 0 auto; padding-left: clamp(16px, 4vw, 24px); padding-right: clamp(16px, 4vw, 24px); }
.section { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 36px; }
.section__head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-600); }
.lede { font-size: 18px; color: var(--ink-2); text-wrap: pretty; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 16px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card--link { text-decoration: none; color: inherit; }
.card--link:hover { border-color: var(--brand-300); color: inherit; }
.card__icon { width: 40px; height: 40px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--ink); border-color: #A3ABB8; }
.btn--primary { background: var(--brand-700); border-color: var(--brand-700); color: #fff; font-weight: 600; }
.btn--primary:hover { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.btn--light { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn--light:hover { border-color: #fff; color: #fff; }
.btn--lg { height: 50px; padding: 0 28px; font-size: 17px; }
.input { height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; color: var(--ink); background: var(--surface); }

/* Hero */
.hero { padding-top: 80px; padding-bottom: 80px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 48px; align-items: center; }
.hero__title { font-size: clamp(38px, 6vw, 56px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.hero .lede { font-size: 19px; max-width: 34em; }
.stats { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 24px 48px -24px rgba(11, 57, 84, 0.3); }
.stats__item { display: flex; gap: 16px; align-items: flex-start; }
.stats__item + .stats__item { border-top: 1px solid var(--line-soft); padding-top: 20px; }
.stats__item img { width: 40px; height: 40px; flex: none; }
.stats__value { font-family: var(--font-head); font-weight: 700; font-size: 32px; line-height: 1.1; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.stats__value:empty::before { content: "—"; color: var(--line-strong); }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.quote { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.quote__title { font-size: 20px; }
.quote__who { margin-top: auto; font-size: 14px; color: var(--ink-3); }

/* Closing call to action */
.cta { background: var(--brand-900); color: #fff; }
.cta h2 { color: #fff; }
.cta .lede { color: var(--brand-100); }

/* Article pages: ported content and posts */
.page { max-width: 820px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 24px) 80px; display: flex; flex-direction: column; gap: 28px; }
.page--wide { max-width: none; }
.page--wide .page__head, .page--wide .prose > :not(table) { max-width: 1200px; }
.page--wide .prose { overflow-wrap: normal; }
.page--wide .prose table { display: table; table-layout: auto; }
.page--wide .prose td, .page--wide .prose th { hyphens: auto; }
@media (max-width: 900px) { .page--wide .prose table { display: block; } }
.page__head { display: flex; flex-direction: column; gap: 10px; }
.page__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--ink-3); }
.tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand-900); border: 1px solid var(--brand-100); font-size: 13px; font-weight: 600; text-decoration: none; }
.tag:hover { color: var(--brand-900); border-color: var(--brand-300); }
.tag[aria-current="page"] { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.prose { font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 26px; margin-top: 1.6em; }
.prose h3 { font-size: 21px; margin-top: 1.4em; }
.prose h4 { font-size: 18px; margin-top: 1.2em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 0; }
.prose li + li { margin-top: 0.35em; }
.prose img { border-radius: 8px; border: 1px solid var(--line-soft); }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent-400); color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); }
.prose pre { background: var(--brand-950); color: #E6F0F6; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
.prose code { font-family: var(--font-mono); font-size: 0.92em; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); }
.contact-email { font-size: 20px; font-weight: 600; }
.calculator { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.calculator label { font-weight: 600; }
.calculator__price { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--brand-700); }

/* Posts list */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.post-card { height: 100%; }
.post-card h2 { font-size: 20px; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--brand-700); }
.pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }

/* /api */
.api-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 28px; }
.api-steps > li { counter-increment: step; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; }
.api-steps > li::before { content: counter(step); grid-row: span 9; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-700); color: #fff; font-family: var(--font-head); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.api-steps > li > * + * { margin-top: 8px; }
.code { position: relative; }
.code pre { margin: 0; background: var(--brand-950); color: #E6F0F6; padding: 16px; border-radius: 10px; overflow-x: auto; font-family: var(--font-mono); font-size: 14px; line-height: 1.55; white-space: pre; }
.code--prompt pre { white-space: pre-wrap; max-height: 520px; overflow-y: auto; }
.copy { position: absolute; top: 10px; right: 10px; height: 34px; padding: 0 12px; font-size: 14px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.copy:hover { color: #fff; border-color: #fff; }
.ref { width: 100%; border-collapse: collapse; font-size: 15px; }
.ref th, .ref td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.ref td:first-child { font-family: var(--font-mono); font-size: 14px; white-space: nowrap; }
.ref-wrap { overflow-x: auto; }
.notice { padding: 14px 18px; border-radius: 10px; background: var(--accent-50); border: 1px solid var(--accent-400); color: var(--brand-950); }

/* Footer */
.site-footer { background: var(--brand-950); color: var(--brand-100); font-size: 15px; }
.site-footer__inner { padding-top: 48px; padding-bottom: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 32px; }
.site-footer h2 { font-size: 15px; color: #fff; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: var(--brand-100); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__legal { border-top: 1px solid rgba(189, 218, 230, 0.2); padding-top: 20px; padding-bottom: 28px; font-size: 13px; color: var(--brand-300); }
.site-footer__logo { height: 40px; width: auto; align-self: flex-start; } /* in a flex column: without align-self it stretches to the column width */

@media (max-width: 600px) {
  h1 { font-size: 32px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .nav { width: 100%; }
  .nav a:not(.btn) { padding: 0 8px; }
}


/* Series (categories named series-*): the part note under a post's title and Previous/Next between parts. */
.series-note { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--brand-600); background: var(--accent-50); font-size: .95rem; }
.series-pager { justify-content: space-between; margin: 40px 0 8px; }
.series-pager .btn { max-width: 44%; white-space: normal; text-align: left; }
.series-parts { counter-reset: part; }
.series-parts > li { counter-increment: part; }
.series-parts .post-card h2::before { content: "Part " counter(part) ": "; color: var(--ink-3); font-weight: 400; }
