/*
 * CivicView / OpenCitiesLab webfonts for Superset.
 *
 * Baked into the image at /app/superset/static/assets/civicview/brand.css and
 * <link>-injected into Superset's SPA template head by the Dockerfile. The palette
 * itself is applied via THEME_DEFAULT (Ant Design tokens) in superset_config.py;
 * this file only self-hosts the fonts named by that theme's fontFamily token so
 * they render under Superset's strict same-origin CSP (no external CDN).
 *
 * Everything here is same-origin (/static/assets/...) so it satisfies the existing
 * Talisman CSP (style-src 'self'; font-src falls back to default-src 'self').
 */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/static/assets/civicview/fonts/montserrat.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/assets/civicview/fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/static/assets/civicview/fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('/static/assets/civicview/fonts/poppins-600.woff2') format('woff2');
}

/* The Ant theme sets the global fontFamily (Poppins); use Montserrat for headings
 * to match the OCL site. */
h1, h2, h3, h4, h5,
.ant-typography h1, .ant-typography h2, .ant-typography h3,
.header-title, .editable-title {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Constrain the OCL mark on Superset's server-rendered login page. Scoped to the
 * Antd <Image> wrapper the login uses; the SPA nav logo is a bare <img> sized by
 * APP_ICON_WIDTH, so it is unaffected. */
.ant-image img[src*="ocl-logo"] {
  max-width: 220px !important;
  height: auto !important;
}
