/* Purple Foundation: site stylesheet.
 *
 * Direction A ("Ledger") of the 2026 redesign, built on the Purple Group design
 * system: Hanken Grotesk for text, Castoro for serif accents, cloudy white pages,
 * ink-black text and blue-violet accents. Every inline style of the design is a
 * class here; the site's Content Security Policy allows no style attributes.
 *
 * Breakpoints (max-width):
 *   1100px  Home: the featured post sits beside its text
 *    980px  header: burger menu
 *    900px  figures and the "Where we helped" ledger stack
 *    768px  tighter sections, taller photo crops
 *    640px  smaller post rows
 *    480px  smallest phones
 */

/* Fonts: self-hosted, no third party. Both are under the SIL Open Font License;
 * the licence texts sit next to the files. Hanken Grotesk is the same family the
 * Purple Real Estate site uses, as one variable font for every weight.
 *
 * WOFF2, subset to Latin and Latin Extended-A (Czech, Slovak) plus punctuation,
 * € and arrows; a character outside the range falls back to the next font in
 * the stack. Every page preloads both files next to this stylesheet.
 * font-display: optional draws text once: in its own font when the file has
 * arrived by the first paint (it nearly always has on a fast connection, and
 * from the cache on every later page), otherwise in the fallback for that one
 * page view. Text never switches font while it is being read. */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/fonts/hanken-grotesk.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0100-017F, U+0218-021B, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD;
  font-weight: 100 900;
  font-style: normal;
  font-display: optional;
}

/* Castoro: regular only, sentence case only, never italic. */
@font-face {
  font-family: 'Castoro';
  src: url('/assets/fonts/castoro-regular.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0100-017F, U+0218-021B, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD;
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

/* Tokens: the Purple Group palette first, then what the site uses them for. */
:root {
  /* Type scale: one step per level, so nothing shouts. At 1440 px the hero is 64,
   * page titles 56, article titles 42, feature titles 30, figures 42. */
  --fs-hero: clamp(36px, 4.6vw, 64px);
  --fs-display: clamp(34px, 4vw, 56px);
  --fs-title-lg: clamp(28px, 3vw, 42px);
  --fs-title: clamp(22px, 2.2vw, 30px);
  --fs-figure: clamp(30px, 2.8vw, 42px);

  --pg-cloudy-white: #f5fdff;
  --pg-frosted-blue: #a6e1fa;
  --pg-tropical-indigo: #918ef4;
  --pg-blue-violet: #7c3aed;
  --pg-dark-teal: #053a4d;
  --pg-ink-black: #021b2a;
  --pg-white: #fff;

  --pg-font-sans: 'Hanken Grotesk', 'Avenir Next', 'Avenir', ui-sans-serif, system-ui, sans-serif;
  --pg-font-serif: 'Castoro', 'Rooney', Georgia, 'Times New Roman', serif;

  --pg-radius-sm: 4px;
  --pg-radius-md: 8px;
  --pg-radius-lg: 16px;
  --pg-radius-pill: 9999px;

  --pg-shadow-md: 0 4px 12px rgba(2, 27, 42, 0.12);
  --pg-shadow-lg: 0 12px 36px rgba(2, 27, 42, 0.12);
  --pg-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --pg-dur: 220ms;

  --color-bg: var(--pg-cloudy-white);
  --color-text: var(--pg-ink-black);
  --color-body: #23394a;
  --color-muted: #3e5563;
  --color-rule: #b0bfc8;
  --color-rule-strong: var(--pg-dark-teal);
  --color-line: #dce7ec;
  --color-brand: var(--pg-blue-violet);
  --color-brand-hover: #6d28d9;
  --color-link-hover: #5b21b6;
  --color-tint: #ebe1fc;
  --color-tile: var(--pg-white);
  --color-dark: var(--pg-ink-black);
  --color-dark-card: var(--pg-dark-teal);
  --color-dark-card-hover: #06475e;
  --color-on-dark: var(--pg-cloudy-white);
  --color-on-dark-muted: #c9d6dd;
  --color-on-dark-accent: var(--pg-frosted-blue);
  --color-on-dark-line: rgba(255, 255, 255, 0.18);
  --color-on-dark-line-soft: rgba(255, 255, 255, 0.12);
  --color-backdrop: rgba(2, 27, 42, 0.2);
  --focus: var(--color-brand);

  --container: 1320px;
  --gutter: 24px;
  --header-offset: 96px;
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-offset);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--pg-font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-brand);
}

a:hover {
  color: var(--color-link-hover);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--color-text);
  color: var(--color-on-dark);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--text {
  max-width: 760px;
}

/* Type shared by several pages */
.display {
  margin: 0;
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.accent {
  color: var(--color-brand);
  font-family: var(--pg-font-serif);
  font-weight: 400;
}

/* Small capitals labels (the design system's tag styles) */
.post__meta,
.figure__label,
.blog-head__count,
.post-page__meta,
.file-card__meta,
.footer-card__map-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.back-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 56px;
  padding-bottom: 48px;
}

.page-head__lede,
.section__intro {
  max-width: 680px;
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.5;
}

.section {
  padding-top: 40px;
  padding-bottom: 96px;
}

.section__intro {
  margin-bottom: 48px;
}

/* "01 News ———": numbered capsule, label pill and a rule to the edge */
.chapter {
  display: flex;
  align-items: center;
  margin: 0 0 48px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.chapter::after {
  flex: 1 1 auto;
  min-width: 24px;
  height: 1px;
  background: var(--color-rule-strong);
  content: '';
}

.chapter__num {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--pg-radius-pill);
  background: var(--color-brand);
  color: var(--pg-white);
  font-size: 15px;
  letter-spacing: 0;
}

.chapter__label {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: 8px;
  padding: 12px 18px;
  border: 1px solid var(--color-rule-strong);
  border-radius: 22px;
}

.chapter + .section__intro {
  margin-top: -24px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 14px 22px;
  border: 1px solid var(--color-brand);
  border-radius: var(--pg-radius-sm);
  background: var(--color-brand);
  color: var(--pg-white);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}

.button:hover {
  border-color: var(--color-brand-hover);
  background: var(--color-brand-hover);
  color: var(--pg-white);
}

.button--ghost {
  border-color: var(--color-text);
  background: transparent;
  color: var(--color-text);
}

.button--ghost:hover {
  border-color: var(--color-text);
  background: var(--color-text);
  color: var(--color-on-dark);
}

/* Header: sticky bar; below 980px the menu is a CSS-only checkbox toggle */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bg);
}

.site-header__bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gutter);
  background: var(--color-bg);
}

.site-header__logo {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 44px;
}

.site-header__logo-img {
  width: auto;
  height: 34px;
}

.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav__link:hover,
.site-nav__link[aria-current] {
  color: var(--color-brand);
}

.site-nav__link--cta,
.site-nav__link--cta:hover {
  padding: 0 20px;
  border-radius: var(--pg-radius-sm);
  background: var(--color-brand);
  color: var(--pg-white);
}

.site-nav__link--cta:hover {
  background: var(--color-brand-hover);
}

.site-nav__link--cta[aria-current] {
  background: var(--color-text);
  color: var(--pg-white);
}

.site-header__tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.menu-toggle,
.menu-button,
.menu-backdrop {
  display: none;
}

@media (min-width: 981px) and (max-width: 1180px) {
  .site-nav__list {
    gap: 20px;
  }
}

@media (max-width: 980px) {
  .menu-toggle {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    opacity: 0;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-rule);
    border-radius: var(--pg-radius-md);
    color: var(--color-text);
    cursor: pointer;
  }

  .menu-button__close,
  .menu-toggle:checked ~ .site-header__tools .menu-button__open {
    display: none;
  }

  .menu-toggle:checked ~ .site-header__tools .menu-button__close {
    display: block;
  }

  .menu-toggle:focus-visible ~ .site-header__tools .menu-button {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    padding: 4px var(--gutter) 24px;
    border-bottom: 1px solid var(--color-line);
    background: var(--color-bg);
    box-shadow: var(--pg-shadow-lg);
  }

  .menu-toggle:checked ~ .site-nav {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    width: 100%;
    min-height: 52px;
    border-bottom: 1px solid var(--color-line);
    font-size: 14px;
  }

  .site-nav__link--cta,
  .site-nav__link--cta:hover {
    width: auto;
    margin-top: 16px;
    padding: 0 28px;
    border-bottom: 0;
  }

  .site-nav__item:last-child {
    display: flex;
  }

  /* Below the bar only, so the header itself stays bright; clicking it closes. */
  .menu-backdrop {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 100vh;
    background: var(--color-backdrop);
  }

  .menu-toggle:checked ~ .menu-backdrop {
    display: block;
  }
}

@media (max-width: 480px) {
  .site-header__logo-img {
    height: 28px;
  }
}

@media (max-width: 400px) {
  .site-header__bar {
    gap: 12px;
    padding-inline: 16px;
  }

  .site-nav {
    padding-inline: 16px;
  }

  .site-header__logo-img {
    height: 24px;
  }
}

/* The smallest phones (320 px): logo and menu button side by side. */
@media (max-width: 360px) {
  .site-header__bar {
    gap: 10px;
  }

  .site-header__logo-img {
    height: 22px;
  }
}

/* Home: headline, figures, team photo */
.hero {
  padding-top: 56px;
  padding-bottom: 32px;
}

.hero__title {
  max-width: 1180px;
  font-size: var(--fs-hero);
}

.hero__figures {
  padding-top: 24px;
  padding-bottom: 72px;
}

.figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--color-rule-strong);
  border-bottom: 1px solid var(--color-rule-strong);
}

.figure {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 24px;
  border-left: 1px solid var(--color-rule);
}

.figure:first-child {
  padding-left: 0;
  border-left: 0;
}

.figure__label {
  color: var(--color-muted);
}

.figure__value {
  margin: 0;
  font-size: var(--fs-figure);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.figure__unit {
  font-size: 0.45em;
  letter-spacing: 0.06em;
}

.hero-photo {
  margin: 48px 0 0;
}

.hero-photo__img,
.about-photo__img {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  border-radius: var(--pg-radius-lg);
  object-fit: cover;
}

.hero-photo__caption {
  margin-top: 14px;
  color: var(--color-muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .figures {
    grid-template-columns: 1fr;
  }

  .figure {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 0;
    border-top: 1px solid var(--color-rule);
    border-left: 0;
  }

  .figure:first-child {
    border-top: 0;
  }

  .figure__value {
    font-size: 34px;
  }
}

@media (max-width: 768px) {
  .hero-photo__img,
  .about-photo__img {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .figure {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 0;
  }

  .figure__value {
    font-size: 30px;
  }
}

/* Posts: featured, rows (Home News) and cards (Blog). The title's link
   stretches over the whole post. */
.post {
  position: relative;
}

.post__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.post__meta {
  margin: 0;
  color: var(--color-muted);
}

.post__title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.post__link {
  color: var(--color-text);
  text-decoration: none;
}

.post__link::after {
  position: absolute;
  inset: 0;
  content: '';
}

.post__link .icon {
  display: inline-block;
  margin-left: 6px;
  vertical-align: -1px;
}

.post:hover .post__link {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* A post with a Czech version: EN and CS share the first line with the date,
   when the browser can tell (:has); otherwise they follow the title. They sit
   above the title's stretched link, so a click on them is theirs, and hovering
   them does not underline the title. */
.post__body:has(> .versions) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.post__body:has(> .versions) > * {
  grid-column: 1 / -1;
}

.post__body:has(> .versions) > .post__meta {
  grid-row: 1;
  grid-column: 1;
}

/* The pills are taller than the date; the small negative margin keeps the
   title of such a post close to level with the posts beside it while leaving
   the pills room above the title. */
.post__body:has(> .versions) > .versions {
  grid-row: 1;
  grid-column: 2;
  align-self: center;
  margin-block: -4px;
}

.post .versions {
  position: relative;
  z-index: 1;
}

.post:has(.versions:hover) .post__link {
  text-decoration: none;
}

/* Small pills on a card's date line; the link's hit area still reaches 44 px
   for touch. */
.post .versions {
  padding: 2px;
}

.post .versions__link {
  position: relative;
  min-width: 30px;
  min-height: 20px;
  padding: 0 8px;
  font-size: 10px;
}

.post .versions__link::before {
  position: absolute;
  inset: -12px 0;
  content: '';
}

.post__excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post__img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.post--feature {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post--feature .post__body {
  gap: 14px;
}

.post__img--feature {
  aspect-ratio: 4 / 3;
  border-radius: var(--pg-radius-lg);
}

.post__title--feature {
  font-size: var(--fs-title);
  letter-spacing: -0.015em;
  line-height: 1.08;
}

.post__excerpt--feature {
  font-size: 18px;
  line-height: 1.5;
  -webkit-line-clamp: 4;
}

.post__more {
  margin: 4px 0 0;
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post--row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-rule);
}

.post__img--row {
  aspect-ratio: 3 / 2;
  border-radius: var(--pg-radius-md);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 56px 24px;
  margin: 0;
  padding: 40px 0 0;
  border-top: 1px solid var(--color-rule);
  list-style: none;
}

.post--card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post--card .post__body {
  gap: 10px;
}

.post__img--card {
  aspect-ratio: 3 / 2;
  border-radius: var(--pg-radius-lg);
}

@media (max-width: 640px) {
  .post--row {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 16px;
  }

  .post--row .post__title {
    font-size: 18px;
  }

  .post--row .post__excerpt {
    -webkit-line-clamp: 2;
  }
}

/* Home News: the featured post beside the rows */
.section--news {
  padding-bottom: 88px;
}

/* One grid: the featured post takes the left column for the first NEWS_BESIDE
   rows (templates/home.mjs), the rows fill the right column beside it and then
   both columns under it, so no space is left empty. */
.news {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: 48px;
}

.news > .post--feature {
  grid-column: 1;
  grid-row: 1 / span 4;
  min-width: 0;
  padding-bottom: 24px;
}

.news > .post--row {
  border-top: 1px solid var(--color-rule);
  border-bottom: 0;
}

/* "Show all N posts" works only with JavaScript (html.js, set by site.js);
   without it every row is shown and the button is not. It always follows the
   last post shown. */
.news__toggle {
  display: none;
  margin-top: 32px;
}

.js .news__toggle {
  display: inline-flex;
}

.js .news:not(.is-expanded) > .post--extra {
  display: none;
}

.news__toggle[aria-expanded='true'] .news__toggle-more,
.news__toggle[aria-expanded='false'] .news__toggle-less {
  display: none;
}

@media (max-width: 1100px) {
  .news {
    grid-template-columns: minmax(0, 1fr);
  }

  .news > .post--feature {
    grid-row: auto;
    padding-bottom: 32px;
    flex-direction: row;
    align-items: center;
    gap: 28px;
  }

  .news > .post--feature .post__img--feature {
    flex: 0 0 44%;
    width: 44%;
  }

  .news > .post--feature .post__body {
    flex: 1 1 0;
  }
}

@media (max-width: 600px) {
  .news > .post--feature {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .news > .post--feature .post__img--feature {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* Home: "Where we helped", one ledger row per year */
.section--helped {
  padding-bottom: 88px;
}

.ledger {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-rule-strong);
  list-style: none;
}

.ledger__year {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--color-rule);
}

.ledger__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.ledger__y {
  margin: 0;
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.ledger__count {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.logo-row {
  position: relative;
  min-width: 0;
}

/* The snap positions start inside the 2 px padding (scroll-padding-inline), so
   a row does not scroll at all while the page loads, and the first tile's focus
   ring stays in view. Any scroll while the page loads, a smooth one above all,
   makes Chrome stop measuring Largest Contentful Paint as if the reader had
   scrolled, and Home then has none. So there is no scroll-behavior: smooth here
   either; site.js asks for the smooth scroll on the arrows. */
.logo-row__scroller {
  overflow-x: auto;
  padding: 2px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

/* With JavaScript the arrows scroll the row, so its scrollbar can go. */
.js .logo-row__scroller {
  scrollbar-width: none;
}

.js .logo-row__scroller::-webkit-scrollbar {
  display: none;
}

.logo-row__list {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.logo-row__item {
  display: flex;
  flex: 0 0 168px;
  scroll-snap-align: start;
}

.logo-tile {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 140px;
  padding: 14px 12px 12px;
  border: 1px solid var(--color-rule);
  border-radius: var(--pg-radius-md);
  background: var(--color-tile);
  color: var(--color-text);
  text-decoration: none;
  transition: box-shadow var(--pg-dur) var(--pg-ease);
}

a.logo-tile:hover {
  box-shadow: var(--pg-shadow-md);
  color: var(--color-text);
}

.logo-tile__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 84px;
}

.logo-tile__img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 84px;
  object-fit: contain;
}

.logo-tile__name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.logo-row__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-rule);
  border-radius: var(--pg-radius-pill);
  background: var(--pg-white);
  box-shadow: var(--pg-shadow-md);
  color: var(--color-text);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background var(--pg-dur) var(--pg-ease);
}

.logo-row__arrow:hover {
  border-color: var(--color-brand);
  background: var(--color-tint);
}

.logo-row__arrow--prev {
  left: -14px;
}

.logo-row__arrow--next {
  right: -14px;
}

@media (max-width: 900px) {
  .ledger__year {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .ledger__head {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
  }
}

/* Home: Transparency links */
.section--transparency {
  padding-bottom: 112px;
}

.tlinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  column-gap: 48px;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-rule);
  list-style: none;
}

.tlink {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--color-rule);
  color: var(--color-text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.tlink:hover {
  color: var(--color-brand);
}

.tlink .icon {
  flex: 0 0 auto;
  margin-left: auto;
}

@media (max-width: 768px) {
  .section,
  .section--helped {
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .ledger__y {
    font-size: 30px;
  }

  .tlink {
    font-size: 17px;
  }
}

/* About: who we are, team photo, principles, team */
.about-intro {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 32px 72px;
  padding-bottom: 64px;
}

.about-intro__title {
  flex: 1 1 300px;
  font-size: var(--fs-display);
}

.about-intro__text {
  display: flex;
  flex: 999 1 480px;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: 760px;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.55;
}

.about-intro__p p {
  margin: 0;
  overflow-wrap: break-word;
}

.about-intro__p--lead {
  color: var(--color-text);
  font-size: 20px;
  line-height: 1.45;
}

.about-intro__p--accent {
  color: var(--color-brand);
  font-family: var(--pg-font-serif);
  font-size: 22px;
  line-height: 1.35;
}

.about-photo {
  padding-bottom: 96px;
}

.section--principles,
.section--team {
  padding-top: 0;
}

.section--team {
  padding-bottom: 112px;
}

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-rule);
  list-style: none;
}

.principle {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px 28px 0;
  border-bottom: 1px solid var(--color-rule);
}

.principle__name {
  margin: 0;
  color: var(--color-brand);
  font-family: var(--pg-font-serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
}

.principle__text {
  margin: 0;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.5;
}

.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.member__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: var(--pg-radius-lg);
  object-fit: cover;
  object-position: 50% 20%;
}

.member__name {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.member__text {
  margin: 0;
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.55;
}

@media (min-width: 481px) and (max-width: 900px) {
  .team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .about-intro {
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .about-intro__p--lead {
    font-size: 18px;
  }

  .about-intro__p--accent {
    font-size: 20px;
  }

  .about-photo {
    padding-bottom: 56px;
  }
}

/* Blog: title, latest post, all others as cards */
.blog-head {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  padding-top: 64px;
  padding-bottom: 40px;
}

.blog-head__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-head__text .page-head__lede {
  max-width: 560px;
}

.blog-head__count {
  margin: 0;
  color: var(--color-muted);
}

.blog-feature {
  padding-bottom: 72px;
}

.blog-feature .post--feature {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 48px;
  padding-top: 40px;
  border-top: 1px solid var(--color-rule-strong);
}

.blog-feature .post__img--feature {
  flex: 1 1 520px;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 10;
}

.blog-feature .post__body {
  flex: 1 1 380px;
  gap: 16px;
}

.blog-feature .post__title--feature {
  font-size: var(--fs-title-lg);
}

.blog-feature .post__excerpt--feature {
  line-height: 1.55;
}

.blog-list {
  padding-bottom: 112px;
}

@media (max-width: 1060px) {
  .blog-feature .post--feature {
    flex-wrap: nowrap;
    gap: 28px;
  }

  .blog-feature .post__img--feature {
    flex: 0 0 44%;
    width: 44%;
    aspect-ratio: 4 / 3;
  }

  .blog-feature .post__body {
    flex: 1 1 0;
  }
}

@media (max-width: 768px) {
  .blog-head {
    padding-top: 40px;
  }

  .blog-feature {
    padding-bottom: 40px;
  }

  .blog-feature .post--feature {
    gap: 20px;
    padding-top: 28px;
  }
}

@media (max-width: 600px) {
  .blog-feature .post--feature {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .blog-feature .post__img--feature {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* Article page */
.post-page {
  padding-bottom: 96px;
}

.post-page__head {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 48px 0 40px;
}

.post-page__meta {
  margin: 0;
  color: var(--color-muted);
}

/* The date with EN and CS at its right end. The negative margin keeps the
   taller pills from pushing the title down. */
.post-page__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

/* Larger than on a card, where the article is one of many; the hit area
   still reaches 44 px for touch. */
.post-page__meta-row .versions {
  margin-block: -9px;
  padding: 2px;
}

.post-page__meta-row .versions__link {
  position: relative;
  min-width: 38px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

.post-page__meta-row .versions__link::before {
  position: absolute;
  inset: -8px 0;
  content: '';
}

.post-page__title {
  margin: 0;
  font-size: var(--fs-title-lg);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  overflow-wrap: break-word;
}

/* An article's language versions: EN and CS, the version shown filled. */
.versions {
  display: inline-flex;
  align-self: flex-start;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--color-rule);
  border-radius: var(--pg-radius-pill);
}

.versions__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--pg-radius-pill);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.versions__link:hover {
  color: var(--color-brand);
}

.versions__link--current,
.versions__link--current:hover {
  background: var(--color-text);
  color: var(--pg-white);
}

.post-page__back {
  margin: 48px 0 0;
}

.article-body {
  color: var(--color-body);
  font-size: 18px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.article-body > :first-child {
  margin-top: 0;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin: 0 0 24px;
}

.article-body li + li {
  margin-top: 8px;
}

.article-body h1,
.article-body h2,
.article-body h3 {
  margin: 48px 0 16px;
  color: var(--color-text);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.article-body h1,
.article-body h2 {
  font-size: 28px;
}

.article-body h3 {
  font-size: 22px;
}

.article-body strong {
  color: var(--color-text);
  font-weight: 700;
}

/* The width and height attributes are the file's own size (templates/article.mjs),
   so a photo shows at its own width, at most the column's, and its space is
   reserved before it arrives. */
.article-body img {
  max-width: 100%;
  height: auto;
  margin: 32px 0 0;
  border-radius: var(--pg-radius-lg);
}

.article-body img + p,
.article-body img + h2,
.article-body img + h3,
.article-body img + ul,
.article-body img + ol {
  margin-top: 32px;
}

.article-body__intro {
  margin: 0 0 40px;
}

.article-body__caption {
  margin: 10px 0 32px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.4;
}

.article-body .article-body__intro {
  margin-top: 0;
}

/* A first paragraph set entirely in italics is the post's lead: the serif. */
.article-body > p:first-of-type:has(> em:only-child) {
  color: var(--color-brand);
  font-family: var(--pg-font-serif);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.35;
}

.article-body > p:first-of-type > em:only-child {
  font-style: normal;
}

@media (max-width: 768px) {
  .post-page__head {
    padding-top: 32px;
  }

  .article-body {
    font-size: 17px;
  }

  .article-body h1,
  .article-body h2 {
    font-size: 24px;
  }
}

/* Annual reports and Downloads */
.files-head {
  padding-bottom: 48px;
}

.files-body {
  padding-bottom: 112px;
}

.files-group + .files-group {
  margin-top: -32px;
}

.files-group .chapter {
  margin-bottom: 40px;
}

.report-grid,
.download-grid {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 48px 24px;
  padding-top: 40px;
  border-top: 1px solid var(--color-rule-strong);
}

.download-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 40px 24px;
  max-width: 900px;
}

.file-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.file-card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.file-card__cover {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--color-line);
  border-radius: var(--pg-radius-md);
  object-fit: cover;
  transition: box-shadow var(--pg-dur) var(--pg-ease);
}

.file-card__icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 128px;
  border: 1px solid var(--color-line);
  border-radius: var(--pg-radius-md);
  background: var(--color-tile);
  color: var(--color-brand);
  transition: box-shadow var(--pg-dur) var(--pg-ease);
}

.file-card__type {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.file-card__year {
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.file-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.file-card__link {
  color: var(--color-text);
  text-decoration: none;
}

.file-card__link::after {
  position: absolute;
  inset: 0;
  content: '';
}

.file-card__meta {
  margin: 0;
  color: var(--color-muted);
}

.file-card__cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 18px;
  border-radius: var(--pg-radius-sm);
  background: var(--color-brand);
  color: var(--pg-white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.file-card:hover .file-card__cta {
  background: var(--color-brand-hover);
}

.file-card:hover .file-card__cover,
.file-card:hover .file-card__icon {
  box-shadow: var(--pg-shadow-lg);
}

.file-card:hover .file-card__link {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 768px) {
  .files-head {
    padding-top: 40px;
  }

  .files-body {
    padding-bottom: 56px;
  }

  .files-group + .files-group {
    margin-top: 0;
  }
}

/* 404 */
.not-found {
  padding-top: 40px;
  border-top: 1px solid var(--color-rule-strong);
}

.not-found__block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.not-found__title {
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.not-found__text {
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
}

/* Footer */
.site-footer {
  --focus: var(--color-on-dark-accent);
  background: var(--color-dark);
  color: var(--color-on-dark);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 80px;
  padding-bottom: 80px;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-on-dark-line);
}

.site-footer__contact {
  display: flex;
  flex: 1 1 360px;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.site-footer__label {
  margin: 0;
  color: var(--color-on-dark-accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-footer__lead {
  margin: 0;
  color: var(--color-on-dark-muted);
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.3;
}

.site-footer__mail {
  align-self: flex-start;
  max-width: 100%;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--color-brand);
  color: var(--color-on-dark);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.site-footer__mail:hover {
  border-color: var(--color-on-dark-accent);
  color: var(--color-on-dark-accent);
}

.site-footer__mail:focus-visible {
  outline-offset: 4px;
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--pg-radius-pill);
  color: var(--color-on-dark);
  font-size: 16px;
  text-decoration: none;
}

.social-pill:hover {
  border-color: var(--color-on-dark-accent);
  background: var(--color-on-dark-line-soft);
  color: var(--color-on-dark);
}

.social-pill__icon {
  width: 24px;
  height: 24px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.footer-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 28px;
  border: 1px solid var(--color-on-dark-line);
  border-radius: var(--pg-radius-md);
  font-style: normal;
}

.footer-card__title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

.footer-card__lines {
  margin: 0;
  color: var(--color-on-dark-muted);
  font-size: 16px;
  line-height: 1.7;
}

.footer-card__phone {
  color: var(--color-on-dark);
}

.footer-card__phone:hover {
  color: var(--pg-white);
}

.footer-card--map {
  justify-content: space-between;
  gap: 24px;
  min-height: 220px;
  background: var(--color-dark-card);
  color: var(--color-on-dark);
  text-decoration: none;
}

.footer-card--map:hover {
  background: var(--color-dark-card-hover);
  color: var(--color-on-dark);
}

.footer-card--map .icon {
  color: var(--color-on-dark-accent);
}

.footer-card__map-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-card__map-address {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.footer-card__map-label {
  color: var(--color-on-dark-accent);
}

.footer-links {
  gap: 0;
  padding: 12px 28px;
  list-style: none;
}

.footer-links__link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-on-dark-line-soft);
  color: var(--color-on-dark);
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
}

.footer-links li:last-child .footer-links__link {
  border-bottom: 0;
}

.footer-links__link:hover {
  color: var(--color-on-dark-accent);
}

.footer-links__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}

@media (min-width: 624px) and (max-width: 919px) {
  .footer-links {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
  }

  .footer-links li:nth-child(n + 3) .footer-links__link {
    border-bottom: 0;
  }

  .footer-links li:nth-child(-n + 2) .footer-links__link {
    border-bottom: 1px solid var(--color-on-dark-line-soft);
  }
}

@media (max-width: 768px) {
  .site-footer__inner {
    gap: 32px;
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .site-footer__top {
    gap: 28px;
    padding-bottom: 32px;
  }

  .footer-card--map {
    min-height: 160px;
  }
}

/* Readers who ask their system for less motion get none: no hover fades, no
   smooth scrolling (site.js checks the same setting for the arrows and for
   "Show fewer posts"). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
