:root {
  --bg: #0b1020;
  --bg-soft: #111830;
  --card: #151c36;
  --border: #1f2847;
  --text: #e6ecff;
  --muted: #8a95b8;
  --accent: #5ee3a1;
  --accent-2: #6aa9ff;
  --danger: #ff6a82;
  --warn: #ffc16a;
  --pos: #2fd38a;
  --neg: #ff5c7a;
  --neu: #8a95b8;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  --mono: "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.9rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
.muted { color: var(--muted); }
.hidden { display: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.2rem; }
.row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.gap { gap: .6rem; }
.hero { padding: 1.5rem 0 1rem; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, rgba(11,16,32,.98), rgba(11,16,32,.9));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.topbar .row { padding: .8rem 0; }
.brand { display: inline-flex; align-items: baseline; gap: .4rem; color: var(--text); font-weight: 700; }
.brand .logo { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.3rem; }
.brand .tag { color: var(--muted); font-size: .95rem; letter-spacing: .02em; }
.nav { display: flex; gap: 1rem; }
.nav a { color: var(--muted); padding: .3rem .2rem; border-bottom: 2px solid transparent; }
.nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.nav a:hover { color: var(--text); text-decoration: none; }
.lang-toggle { border: 1px solid var(--border); border-radius: 6px; padding: .25rem .55rem !important; font-weight: 600; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}
.callout { border-left: 3px solid var(--warn); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; align-items: end; }
.form-grid label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--muted); }
input, select, button {
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: .55rem .7rem; font-family: inherit; font-size: .95rem;
}
input:focus, select:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
button { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #07101e; font-weight: 650; cursor: pointer; border: none; }
button:hover { filter: brightness(1.08); }

.grid-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; margin-top: 1rem; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin: .8rem 0; }
.kpi {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  display: flex; flex-direction: column; gap: .2rem;
}
.kpi .label { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.kpi .value { font-family: var(--mono); font-size: 1.3rem; font-weight: 600; }
.kpi .value.pos { color: var(--pos); }
.kpi .value.neg { color: var(--neg); }
.kpi-pos { border-left: 3px solid var(--pos); }
.kpi-neg { border-left: 3px solid var(--neg); }
.kpi-neu { border-left: 3px solid var(--neu); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.pills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.pills li { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; color: var(--muted); }

.news-list { display: grid; gap: .8rem; }
.news-item { background: var(--bg-soft); border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius); padding: .8rem 1rem; }
.news-item.pos { border-left-color: var(--pos); }
.news-item.neg { border-left-color: var(--neg); }
.news-item.neu { border-left-color: var(--neu); }
.news-item h4 { margin: 0 0 .3rem; font-size: 1rem; }
.news-item .meta { color: var(--muted); font-size: .8rem; }
.news-item p { margin: .3rem 0 0; color: var(--text); font-size: .9rem; }

.htmx-indicator { display: none; color: var(--muted); font-size: .85rem; }
.htmx-request .htmx-indicator { display: inline; }

.footer { border-top: 1px solid var(--border); margin-top: 2rem; padding: 1rem 0 1.5rem; color: var(--muted); font-size: .8rem; }
.footer .row { flex-direction: column; align-items: flex-start; gap: .5rem; }
.disclaimer-mini { max-width: 100%; line-height: 1.5; }

input::placeholder { color: #5e6b8f; }
