---
type: "Source File"
title: "<section class=\"hero\">"
description: "{% extends \"base.html\" %} {% block title %}Ask the EU Oracle{% endblock %} {% block content %} <section class=\"hero\"> <h1>Ask the <em>EU Oracle</em></h1> <p class=\"tagline\">Ask anything about EU economics."
resource: "https://eu.copecheck.com"
tags: ["copecheck", "eu", "source-file", "html"]
timestamp: "2026-04-29T21:45:12Z"
site: "eu"
source_path: "copecheck-eu/templates/ask_oracle.html"
---

# <section class="hero">

Source path: `copecheck-eu/templates/ask_oracle.html`  
Index snapshot generated: `2026-11-24T13:27:52Z`  
File modified: `2026-04-29T21:45:12Z`

```html
{% extends "base.html" %}
{% block title %}Ask the EU Oracle{% endblock %}
{% block content %}
<section class="hero">
  <h1>Ask the <em>EU Oracle</em></h1>
  <p class="tagline">Ask anything about EU economics, demographics, AI displacement, or structural cope.</p>
</section>

<section class="oracle-section" style="max-width:700px;margin:0 auto;padding:0 1rem;">
  <div class="oracle-input-box">
    <textarea id="oracle-question" rows="3" placeholder="e.g. Which EU country is most screwed by AI? Why is youth unemployment in Spain really falling?"></textarea>
    <button id="oracle-submit" onclick="askOracle()">Ask the Oracle</button>
  </div>

  <div id="oracle-answer" style="display:none;margin-top:2rem;">
    <div class="answer-header">
      <span class="answer-icon">🔮</span>
      <span class="answer-title">The Oracle Speaks</span>
      <span class="answer-model" id="answer-model"></span>
      <button class="copy-btn" onclick="copyText(this, '#answer-body')" style="margin-left:auto;"><svg viewBox="0 0 24 24"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg> Copy</button>
    </div>
    <div class="answer-body" id="answer-body"></div>
  </div>

  <div id="oracle-error" style="display:none;margin-top:1rem;color:#e63946;"></div>
  <div id="oracle-loading" style="display:none;text-align:center;margin-top:2rem;opacity:0.6;">
    <p>The Oracle is consulting the data...</p>
  </div>

  {% if recent %}
  <div class="recent-questions" style="margin-top:3rem;">
    <h2 class="section-label">Recent Questions</h2>
    {% for q in recent %}
    <a href="/question/{{ q.id }}" class="rq-card">
      <div class="rq-question">{{ q.question }}</div>
      <div class="rq-meta">{{ q.created_at | fmtdate }} · {{ q.model or 'Oracle' }}</div>
    </a>
    {% endfor %}
  </div>
  {% endif %}
</section>
{% endblock %}

{% block scripts %}
<script>
function askOracle() {
  var q = document.getElementById('oracle-question').value.trim();
  if (!q) return;
  document.getElementById('oracle-answer').style.display = 'none';
  document.getElementById('oracle-error').style.display = 'none';
  document.getElementById('oracle-loading').style.display = 'block';
  document.getElementById('oracle-submit').disabled = true;

  fetch('/api/ask-oracle', {
    method: 'POST',
    headers: {'Content-Type': 'application/json'},
    body: JSON.stringify({question: q})
  })
  .then(function(r) { return r.json(); })
  .then(function(data) {
    document.getElementById('oracle-loading').style.display = 'none';
    document.getElementById('oracle-submit').disabled = false;
    if (data.error) {
      document.getElementById('oracle-error').textContent = data.error;
      document.getElementById('oracle-error').style.display = 'block';
    } else {
      document.getElementById('answer-body').innerHTML = data.answer.replace(/\n/g, '<br>');
      document.getElementById('answer-model').textContent = data.model || '';
      document.getElementById('oracle-answer').style.display = 'block';
    }
  })
  .catch(function(err) {
    document.getElementById('oracle-loading').style.display = 'none';
    document.getElementById('oracle-submit').disabled = false;
    document.getElementById('oracle-error').textContent = 'Network error. Try again.';
    document.getElementById('oracle-error').style.display = 'block';
  });
}
</script>
{% endblock %}
```
