/* The European film development funding page
   (landing/european-film-development-funding.html), on top of
   formatter-page.css (the base, .wrap, .section, .pitch, .others, .btn).
   Copied to landing/european-film-development-funding/page.css by build.mjs.

   A civic ledger: warm paper, deep blue ink, hairline rules, every sum in
   JetBrains Mono with tabular figures, and a map shaded in five blues. The
   chart colours are repeated in page.js (T), because the share image is
   drawn on a canvas that cannot read CSS. Change one, change both.
   See .claude/data-pages-registry.md. */

.ef {
  --paper: #f2eee5;
  --paper-2: #e9e3d6;
  --paper-3: #ddd6c6;
  --ink: #15213a;
  --ink-2: #3a4663;
  --ink-3: #6b7490;
  --rule: #cfc7b5;
  --rule-2: #b6ad99;
  --blue: #1f4e8c;
  --blue-deep: #0f3464;
  --blue-wash: #dbe5f1;
  --map-0: #e4ded0;
  --map-1: #c3d3e6;
  --map-2: #8fb0d3;
  --map-3: #5583b6;
  --map-4: #27588f;
  --map-5: #0f3464;
  --outside: #ebe7dc;
  --pick: #15213a;
}

.ef-band { background: var(--paper); color: var(--ink); }
.ef-band ::selection { background: var(--blue); color: #fff; }
.ef-band a { color: var(--blue); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 0.18em; }
.ef-band a:hover { text-decoration-color: currentColor; }
.ef .num, .ef .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ───────────────────── the head ───────────────────── */
.ef-desk-band { padding: 52px 0 72px; border-bottom: 1px solid var(--rule); }
.ef-head { max-width: 62ch; }
.ef-kicker { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--blue); }
.ef h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 4.8vw, 62px);
  font-weight: 500; letter-spacing: -0.022em; line-height: 1.02;
  margin: 0; text-wrap: balance; color: var(--ink);
}
.ef-lede { font-size: 17.5px; line-height: 1.6; color: var(--ink-2); margin: 20px 0 0; }

/* the running total, written like the foot of a ledger page */
.ef-board {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
  margin: 34px 0 0; padding: 18px 0;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.ef-board strong { font-family: var(--mono); font-weight: 600; font-size: clamp(26px, 3.2vw, 40px); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ef-board span { font-size: 16px; color: var(--ink-2); max-width: 60ch; }

/* ───────────────────── the controls ───────────────────── */
.ef-controls { margin: 26px 0 0; display: grid; gap: 22px; }
.ef-schemes { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ef-schemes legend { float: left; margin: 0 10px 0 0; padding: 0; font-size: 14px; color: var(--ink-3); line-height: 34px; }
.ef-schemes label { position: relative; cursor: pointer; }
.ef-schemes input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ef-schemes span {
  display: inline-block; padding: 7px 13px; border-radius: 4px;
  border: 1px solid var(--rule-2); background: transparent;
  font-size: 14px; font-weight: 500; color: var(--ink-2); line-height: 1.3;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.ef-schemes label:hover span { border-color: var(--ink-2); color: var(--ink); }
.ef-schemes input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ef-schemes input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 3px; }
.ef-scheme-note { margin: -12px 0 0; font-size: 14px; color: var(--ink-3); min-height: 1.4em; }
.ef-scheme-note:empty { display: none; }

.ef-ruler { display: grid; gap: 6px; }
.ef-ruler-head { display: flex; align-items: baseline; gap: 14px; }
.ef-ruler-head label { font-size: 14px; color: var(--ink-3); }
.ef-ruler-head output { font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.ef-text-btn {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--blue);
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em;
}
.ef-text-btn:hover { text-decoration-color: currentColor; }
.ef-text-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.ef-text-btn[hidden] { display: none; }

/* the year slider drawn as a ruler */
.ef-ruler input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 30px; margin: 0; background: transparent; cursor: pointer;
}
.ef-ruler input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--ink); }
.ef-ruler input[type="range"]::-moz-range-track { height: 2px; background: var(--ink); }
.ef-ruler input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 24px; margin-top: -11px; border-radius: 2px;
  background: var(--blue); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--blue);
}
.ef-ruler input[type="range"]::-moz-range-thumb {
  width: 10px; height: 20px; border-radius: 2px;
  background: var(--blue); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--blue);
}
.ef-ruler input[type="range"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 4px; }
.ef-ticks { position: relative; height: 22px; }
.ef-ticks span {
  position: absolute; top: 0; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  padding-top: 8px; white-space: nowrap;
}
.ef-ticks span::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 6px; background: var(--rule-2); }
.ef-ticks span.on { color: var(--ink); font-weight: 600; }
.ef-ticks span.on::before { background: var(--ink); height: 8px; }

.ef-find { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ef-find label { font-size: 14px; color: var(--ink-3); }
.ef-find input {
  flex: 1 1 220px; max-width: 380px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--rule-2); border-radius: 4px;
  padding: 9px 12px;
}
.ef-find input::placeholder { color: var(--ink-3); }
.ef-find input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ───────────────────── the desk: map and ledger ───────────────────── */
.ef-desk {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 28px 40px; align-items: start;
  margin: 34px 0 0; padding-top: 28px; border-top: 1px solid var(--rule);
}
.ef-map-fig { margin: 0; min-width: 0; }
.ef-map { position: relative; width: 100%; aspect-ratio: 431 / 390; }
.ef-map svg { display: block; width: 100%; height: 100%; }
.ef-map path.land { stroke: var(--paper); stroke-width: 0.6; stroke-linejoin: round; transition: fill 0.25s; }
.ef-map path.land.in { cursor: pointer; }
.ef-map path.land.in:hover { stroke: var(--ink); stroke-width: 1; }
.ef-map path.land.pick { stroke: var(--ink); stroke-width: 1.4; }
.ef-map path.land:focus-visible { outline: none; stroke: var(--blue); stroke-width: 1.6; }
.ef-map path.out { fill: var(--outside); stroke: var(--paper); stroke-width: 0.6; }
.ef-map .sea { fill: none; }
.ef-map-foot { margin: 10px 0 0; display: grid; gap: 8px; }
.ef-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.ef-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ef-legend i { display: inline-block; width: 18px; height: 11px; border: 1px solid rgba(21, 33, 58, 0.18); }
.ef-map-caption { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }

.ef-ledger { min-width: 0; }
.ef-ledger-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 0 0 8px; }
.ef-ledger h2 {
  margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; color: var(--ink);
}
.ef-table-wrap { max-height: 560px; overflow-y: auto; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule-2); scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; }
.ef-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ef-table th { position: sticky; top: 0; background: var(--paper); text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 8px 6px 7px; border-bottom: 1px solid var(--rule-2); z-index: 1; }
.ef-table th.num, .ef-table td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ef-table td { padding: 7px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink); }
.ef-table td.num { color: var(--ink); font-size: 13.5px; }
.ef-table td.name { position: relative; }
.ef-table td.name .bar { position: absolute; left: 0; bottom: 3px; height: 3px; background: var(--map-2); max-width: 100%; }
.ef-table tr.row-c { cursor: pointer; }
.ef-table tr.row-c:hover td { background: rgba(255, 255, 255, 0.5); }
.ef-table tr.row-c.on td { background: var(--blue-wash); }
.ef-table tr.row-c td.name button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
}
.ef-table tr.row-c td.name button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.ef-table td .sub { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.ef-table td .tilde { color: var(--ink-3); margin-right: 2px; }
.ef-table tfoot td { font-weight: 600; border-bottom: 0; padding-top: 9px; border-top: 1px solid var(--ink); }
.ef-table tfoot td.num { font-weight: 600; }
.ef-table td.empty { padding: 22px 6px; color: var(--ink-3); font-size: 14px; }
.ef-ledger-note { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.ef-ledger-note:empty { display: none; }

/* ───────────────────── share ───────────────────── */
.ef-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--rule); }
.ef-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 4px; cursor: pointer;
  font: 600 14px var(--sans); color: var(--ink);
  background: transparent; border: 1px solid var(--rule-2);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.ef-btn:hover { border-color: var(--ink); }
.ef-btn:disabled { opacity: 0.6; cursor: default; }
.ef-btn-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ef-btn-ink:hover { background: var(--blue); border-color: var(--blue); }
.ef-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.ef-share-note { font-size: 14px; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; }
.ef-share-note:empty { display: none; }

/* ───────────────────── the registers ───────────────────── */
.ef-registers-band { padding: 56px 0 64px; border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.ef-section-head { max-width: 64ch; }
.ef-section-head h2, .ef-ch-head {
  margin: 0; font-family: var(--serif); font-size: clamp(28px, 3.2vw, 38px); font-weight: 500; letter-spacing: -0.018em; line-height: 1.1; color: var(--ink);
}
.ef-section-head p { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.ef-registers { margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ef-reg {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; padding: 10px 11px 8px;
  font: inherit; color: var(--ink); transition: border-color 0.12s, box-shadow 0.12s;
}
.ef-reg:hover { border-color: var(--ink-2); }
.ef-reg.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ef-reg:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ef-reg .name { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.ef-reg .sum { display: block; margin-top: 2px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ef-reg svg { display: block; width: 100%; height: 40px; margin-top: 8px; }
.ef-reg .n { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink-3); }
.ef-small { font-size: 13px; line-height: 1.55; color: var(--ink-3); }
#ef-registers-note { margin: 16px 0 0; }

/* ───────────────────── the chapters ───────────────────── */
.ef-chapters { padding: 56px 0 24px; }
.ef-ch { max-width: 860px; padding: 34px 0 44px; border-top: 1px solid var(--ink); }
.ef-ch + .ef-ch { margin-top: 10px; }
.ef-ch-n { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--blue); }
.ef-ch-head { font-size: clamp(26px, 3vw, 34px); max-width: 24ch; }
.ef-ch-head:empty::before { content: "\00a0"; }
.ef-ch-body { margin: 16px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 66ch; }
.ef-ch-chart { margin: 26px 0 0; min-width: 0; }
.ef-ch-chart svg { display: block; width: 100%; height: auto; }
.ef-ch-chart .chart-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.5; }

/* a ledger table inside a chapter */
.ef-ch-chart table { width: 100%; border-collapse: collapse; font-size: 14px; border-top: 2px solid var(--ink); }
.ef-ch-chart th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 8px 6px 7px; border-bottom: 1px solid var(--rule-2); }
.ef-ch-chart td { padding: 7px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ef-ch-chart th.num, .ef-ch-chart td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ef-ch-chart td .sub { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.ef-ch-chart td.years { font-family: var(--mono); font-size: 12px; color: var(--ink-2); letter-spacing: 0.02em; }
.ef-ch-chart td.years i { display: inline-block; width: 6px; height: 6px; margin-right: 3px; background: var(--map-4); vertical-align: middle; }
.ef-ch-chart td.years i.off { background: var(--paper-3); }

/* ───────────────────── about ───────────────────── */
.ef-about { padding-top: 64px; }
.ef-about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 48px; margin-top: 26px; }
.ef-about h3 { margin: 18px 0 8px; font-size: 16px; font-weight: 600; }
.ef-about h3:first-child { margin-top: 0; }
.ef-about p, .ef-about li { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.ef-about ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.ef-about a { color: var(--accent); font-weight: 600; }
.ef-about a:hover { text-decoration: underline; }
.ef-about p.ef-download { margin: 22px 0 0; }
.ef-about p.ef-small { margin-top: 18px; }
.ef-about p.ef-tm { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ───────────────────── the tooltip ───────────────────── */
.ef-tip {
  position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none;
  max-width: 280px; padding: 9px 12px; border-radius: 4px;
  background: #15213a; color: #f2eee5; font-size: 13px; line-height: 1.45;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}
.ef-tip[hidden] { display: none; }
.ef-tip strong { display: block; font-weight: 600; margin-bottom: 2px; }
.ef-tip .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ef-tip .dim { color: #b8bfd2; }

/* ───────────────────── small screens ───────────────────── */
@media (max-width: 900px) {
  .ef-desk { grid-template-columns: minmax(0, 1fr); }
  .ef-about-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .ef-desk-band { padding: 36px 0 52px; }
  .ef-board strong { font-size: 26px; }
  .ef-schemes legend { float: none; display: block; margin: 0 0 6px; line-height: 1.3; }
  .ef-schemes span { padding: 7px 10px; font-size: 13px; }
  .ef-ticks span:nth-child(even) { display: none; }
  .ef-table-wrap { max-height: 480px; }
  .ef-table { font-size: 13.5px; }
  .ef-registers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ef-ch { padding: 26px 0 34px; }
  .ef-ch-chart th.years, .ef-ch-chart td.years { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ef-map path.land, .ef-schemes span, .ef-btn { transition: none; }
}
