/* 2026_11_ir_ec-charts.css — runtime frozen for the 2026 11_IR post.
 * Copy of central/ec-chart.css as of git cf0e501, 2026-11-12; version built for the November post.
 * Charts of this month load THIS file; edit it only for fixes to this
 * month's charts. Later months get their own copy. */
/* ============================================================================
 * EUROCONSTRUCT chart embed — layout & typography
 * Layout mirrors embed_layout.png: thin blue top rule, FIGURE label,
 * bold takeaway title, grey unit subtitle, chart, source bottom-left,
 * CHART DATA & DOWNLOADS link bottom-right.
 * ========================================================================== */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/montserrat-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/montserrat-medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/montserrat-semibold.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/montserrat-bold.woff2') format('woff2');
}

:root {
  --ec-navy: #15365a;
  --ec-blue: #346aa1;
  --ec-teal: #0097a7;
  --ec-magenta: #f72585;
  --ec-subtle: #5f6b7a;
  --ec-grid: #e3e7ec;
  --ec-surface: #ffffff;
  --ec-bg: #f6f7f9;              /* outer chart area */
  --ec-font: 'Montserrat', 'Segoe UI', sans-serif;
}

/* page-level rules apply ONLY inside chart files (the runtime sets
 * html.ec-doc); :where() keeps their specificity at zero, as before.
 * Loaded on a host page by mistake, they leave the theme untouched. */
:where(html.ec-doc) * { box-sizing: border-box; margin: 0; padding: 0; }

:where(html.ec-doc), :where(html.ec-doc) body {
  background: var(--ec-bg);
  font-family: var(--ec-font);
  color: var(--ec-navy);
  -webkit-font-smoothing: antialiased;
}

.ec-figure {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 4px 8px;
  border-top: 3px solid var(--ec-navy);
}

/* ── header ── */
.ec-head { padding: 14px 0 20px; }

.ec-figno {
  color: var(--ec-blue);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* series legend on its own row below the unit subtitle */
.ec-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.ec-legend:not(:empty) { margin-top: 14px; }
.ec-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ec-navy);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.ec-legend-item .ec-sw {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  flex: none;
}
.ec-legend-item.off { opacity: 0.35; }

.ec-title {
  font-size: clamp(17px, 2.6vw, 21px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ec-navy);
}

.ec-subtitle {
  font-size: clamp(13px, 2vw, 15px);
  font-weight: 400;
  color: var(--ec-subtle);
  margin-top: 4px;
}

/* ── chart ── */
div.ec-chart {
  width: 100%;
  min-height: 240px;
}

/* ── two-panel figures (config.panels) ──
 * DOM order: head a, head b, chart a, chart b; the inline `order` values
 * interleave them (head a, chart a, head b, chart b) when stacked. In the
 * side-by-side row the heads share row 1, so both charts start level. */
.ec-duo { display: flex; flex-direction: column; }
.ec-duo .ec-cell-head { padding-bottom: 12px; }
.ec-duo:not(.ec-duo-row) .ec-chart:not(:last-child) { margin-bottom: 22px; }
.ec-duo.ec-duo-row {
  display: grid;
  grid-template-columns: repeat(var(--ec-cols, 2), minmax(0, 1fr));
  grid-auto-flow: row;
  column-gap: 24px;
}
.ec-duo.ec-duo-row > * { order: 0 !important; }
.ec-duo .ec-subtitle { margin-top: 0; }
.ec-table-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--ec-subtle);
  padding: 12px 14px 6px;
}

/* ── footer: light band, source left, links right (01template.png) ── */
.ec-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #eaedf1;           /* one step darker than the page bg */
  padding: 2px 14px;
  margin-top: 10px;
}

.ec-source {
  font-size: 12px;
  color: var(--ec-subtle);
}

.ec-datalink {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ec-navy);
  text-decoration: none;
  cursor: pointer;
  padding: 12px 0;             /* >= 44px effective tap target */
  white-space: nowrap;
}
.ec-datalink:hover { text-decoration: underline; }

/* ── data table panel ── */
.ec-panel {
  background: var(--ec-surface);
  border: 1px solid var(--ec-grid);
  border-radius: 6px;
  margin: 10px 0 4px;
  overflow: hidden;
  animation: ec-slide 0.35s cubic-bezier(0.25, 0.8, 0.3, 1);
}
@keyframes ec-slide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ec-panel-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: #f6f8fa;
  border-bottom: 1px solid var(--ec-grid);
}

.ec-panel-title { font-size: 13px; font-weight: 600; }

.ec-buttons { display: flex; gap: 8px; }

.ec-btn {
  font-family: var(--ec-font);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: var(--ec-blue);
  border: 0;
  border-radius: 4px;
  padding: 12px 16px;          /* >= 44px tap target */
  cursor: pointer;
}
.ec-btn:hover { background: var(--ec-navy); }
.ec-btn.ec-btn-ghost {
  color: var(--ec-blue);
  background: transparent;
  border: 1px solid var(--ec-blue);
}
.ec-btn.ec-btn-ghost:hover { color: var(--ec-navy); border-color: var(--ec-navy); }

/* no height cap: the iframe auto-grows, so the data area opens fully */
.ec-tablewrap { overflow-x: auto; }

table.ec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ec-table th, .ec-table td {
  padding: 7px 14px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--ec-grid);
}
.ec-table th:first-child, .ec-table td:first-child { text-align: left; }
.ec-table thead th {
  position: sticky;
  top: 0;
  background: var(--ec-surface);
  font-weight: 600;
  border-bottom: 2px solid var(--ec-navy);
}
.ec-table tbody tr:nth-child(even) { background: #f8fafb; }
.ec-table tbody tr:last-child td { border-bottom: 0; }

/* ── small screens ── */
@media (max-width: 520px) {
  .ec-head { padding-top: 10px; }
  .ec-foot { padding-top: 8px; }
  .ec-table th, .ec-table td { padding: 6px 10px; font-size: 12px; }
}
