:root {
  --bg: #090b10;
  --ink: #f3efe6;
  --muted: #9c9488;
  --line: rgba(228, 194, 122, 0.16);
  --panel: rgba(14, 16, 22, 0.82);
  --accent: #e4c27a;
  --up: #b7d7ae;
  --down: #e7a090;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

body[data-tone="up"] { --accent: #b7d7ae; }
body[data-tone="down"] { --accent: #e7a090; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Outfit, "Segoe UI", sans-serif;
  font-weight: 340;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(228, 194, 122, 0.09), transparent 60%),
    radial-gradient(800px 480px at 100% 0%, rgba(126, 176, 196, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  letter-spacing: 0.01em;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
h2 { font-family: Fraunces, Georgia, serif; font-weight: 520; font-size: 1.15rem; margin: 0; }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(rgba(255,255,255,0.18) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: end;
  padding: 28px 32px 8px;
}
.brand-line {
  display: flex;
  align-items: center;
  gap: 14px 18px;
  flex-wrap: wrap;
}
.mark {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.7rem;
  margin: 0;
  letter-spacing: -0.03em;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lang-name {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}
.lang-switch[data-lang="nl"] [data-set="nl"],
.lang-switch[data-lang="en"] [data-set="en"] { color: var(--ink); }
.lang-track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  padding: 0;
}
.lang-track i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.18s ease;
  pointer-events: none;
}
.lang-switch[data-lang="en"] .lang-track i { transform: translateX(20px); }
.visit-kicker { margin-top: 18px; }
.sub, .kicker, .eyebrow, .hint, .form-note, footer, .chart-head p, .muted {
  color: var(--muted);
}
.sub { margin: 4px 0 0; }
.hero-price { text-align: center; }
.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}
.px {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(3.4rem, 7vw, 5.4rem);
  line-height: 0.9;
  margin: 6px 0 0;
  font-variation-settings: "opsz" 144, "SOFT" 40;
  color: var(--accent);
}
.px-day { margin: 8px 0 0; font-size: 1.05rem; }
.px-day.up { color: var(--up); }
.px-day.down { color: var(--down); }
.hero-meta { text-align: right; }
.hero-meta p { margin: 0 0 8px; }
.status-line { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.live {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px transparent; }
}
.links { display: flex; justify-content: flex-end; gap: 14px; }

.chart-wrap, footer { padding: 8px 32px 0; }
.chart-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 8px; }
.chart-head.stack { flex-direction: column; align-items: flex-start; }
.chart-head.stack p { max-width: 68ch; }
.chart-head p, .hint, footer p { margin: 0; font-size: 0.86rem; }
#chart {
  width: 100%;
  height: 230px;
  display: block;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 70%);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.sentiment {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  margin: 14px 32px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.02);
}
.gauge-card { text-align: center; }
#gauge { width: 100%; height: 150px; display: block; }
.gauge-read {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.45rem;
  margin: 0;
}
.gauge-card .muted { margin: 4px 0 8px; font-size: 0.78rem; }
.track-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 0.82rem; }
.track { position: relative; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--down), var(--accent), var(--up)); opacity: 0.9; }
.track i {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: var(--ink);
  transform: translateX(-50%);
}
.track-row em { font-style: normal; color: var(--muted); white-space: nowrap; }
#voices { list-style: none; margin: 8px 0 0; padding: 0; max-height: 168px; overflow: auto; }
#voices li { padding: 7px 0; border-top: 1px solid rgba(255,255,255,0.05); font-size: 0.84rem; line-height: 1.35; }
#voices b { font-weight: 560; margin-right: 6px; }
#voices .up b { color: var(--up); }
#voices .down b { color: var(--down); }
#voices time, #voices a { color: var(--muted); font-size: 0.75rem; }
.figures {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 32px 0;
}
.figure {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px 12px;
  background: rgba(255,255,255,0.02);
  min-width: 0;
}
.figure.tick { animation: tick 0.7s ease; }
@keyframes tick { 50% { border-color: var(--accent); } }
.figure span { display: block; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em; }
.figure strong {
  display: block;
  margin-top: 4px;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
  font-weight: 520;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.figure em { font-style: normal; font-size: 0.78rem; }
.figure em.up { color: var(--up); }
.figure em.down { color: var(--down); }
.figure small { display: block; color: var(--muted); font-size: 0.7rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overview, .gallery, .hypos { padding: 18px 32px 0; }
.gallery .lead, .shot-note, .shot-origin, .shot-miss { color: var(--muted); font-size: 0.8rem; }
.event-block { margin: 0 0 18px; }
.event-block h3 { font-family: Fraunces, Georgia, serif; font-weight: 520; font-size: 1.15rem; margin: 0 0 10px; }
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}
.shot img { display: block; width: 100%; height: 180px; object-fit: cover; background: #141820; }
.shot figcaption { padding: 10px 12px 12px; }
.shot blockquote { margin: 0; font-size: 0.86rem; line-height: 1.45; }
.shot-note, .shot-origin, .shot-miss { margin: 8px 0 0; }
#overview {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
}
.ov {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px 14px;
  background: rgba(255, 255, 255, 0.02);
}
.ov.wide { grid-column: 1 / -1; }
.ov h3 { font-family: Fraunces, Georgia, serif; font-weight: 520; font-size: 1.2rem; margin: 0; }
.ov .lead { color: var(--muted); font-size: 0.8rem; margin: 4px 0 14px; }
.meter-line, .money-line {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  margin: 7px 0;
  font-size: 0.84rem;
}
.meter-line strong, .money-line strong { font-family: Fraunces, Georgia, serif; font-weight: 520; text-align: right; }
.axis { position: relative; height: 12px; border-radius: 99px; background: rgba(255,255,255,0.05); }
.axis::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: rgba(243, 239, 230, 0.35);
}
.axis b { position: absolute; top: 0; height: 100%; border-radius: 99px; min-width: 2px; }
.axis b.up { left: 50%; background: var(--up); }
.axis b.down { right: 50%; background: var(--down); }
.logbar { position: relative; height: 10px; border-radius: 99px; background: rgba(255,255,255,0.05); }
.logbar b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.range-labels, .stack-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.75rem; }
.range { position: relative; height: 22px; margin: 8px 0; }
.range .line {
  position: absolute;
  left: 0; right: 0; top: 9px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #e7a090, #e4c27a 18%, #b7d7ae);
}
.range .dot {
  position: absolute;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid #090b10;
  transform: translateX(-50%);
}
.stack { display: flex; height: 18px; border-radius: 99px; overflow: hidden; margin: 8px 0; }
.stack .cash { background: #e4c27a; }
.stack .paper { background: #8fb9a4; }
.share {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}
.share-col { height: 120px; display: flex; flex-direction: column-reverse; border-radius: 12px; overflow: hidden; }
.share-cash { background: #e4c27a; }
.share-prem { background: rgba(228, 194, 122, 0.22); }
.share p { margin: 4px 0 0; color: var(--muted); font-size: 0.8rem; }
.sheet { width: 100%; border-collapse: collapse; }
.sheet th {
  text-align: left;
  color: var(--muted);
  font-weight: 480;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 12px 8px 0;
}
.sheet td { padding: 8px 12px 8px 0; border-top: 1px solid rgba(255,255,255,0.06); vertical-align: middle; }
.sheet td.num { font-family: Fraunces, Georgia, serif; font-size: 1.05rem; white-space: nowrap; }
.sheet tr[data-id] { cursor: pointer; }
.sheet tr[data-id]:hover td { color: var(--accent); }
.sheet .up { color: var(--up); }
.sheet .down { color: var(--down); }
.conf { display: block; width: 84px; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.08); margin: 0 0 6px; }
.conf-cell { min-width: 11rem; }
.conf-cell .lead { display: block; margin-top: 4px; }
.conf span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  padding: 16px 32px 8px;
  min-height: 640px;
}
.map-wrap, .panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.map-wrap { position: relative; height: 72vh; min-height: 560px; overflow: hidden; }
.map-bar {
  position: absolute;
  z-index: 2;
  left: 14px; right: 14px; top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button, .ghost, .ask-row button {
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
}
.filters button.on { color: var(--ink); border-color: var(--accent); }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hint { position: absolute; left: 16px; bottom: 12px; z-index: 3; max-width: 220px; }
.map-wrap:has(#projection:not([hidden])) .hint { opacity: 0; }
#projection {
  position: fixed;
  z-index: 8;
  left: 24px;
  bottom: 20px;
  width: min(520px, calc(100vw - 420px));
  pointer-events: none;
  padding: 14px 16px 15px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(9, 11, 16, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
#projection[hidden] { display: none; }
#projection h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 520;
  font-size: 1.18rem;
  line-height: 1.25;
  margin: 0;
}
#proj-body { margin: 6px 0 0; line-height: 1.45; }

aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 72vh;
  min-height: 560px;
  min-width: 0;
}
.panel { padding: 16px 16px 14px; }
#dossier {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.dossier-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
}
.dossier-scroll::-webkit-scrollbar { width: 8px; }
.dossier-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 99px; }
.eyebrow { margin: 0 0 6px; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.68rem; }
#d-title { font-family: Fraunces, Georgia, serif; font-size: 1.55rem; margin: 0; }
#d-sub { margin: 4px 0 10px; }
#d-body { margin: 0; line-height: 1.45; }
.meter { height: 4px; border-radius: 99px; background: rgba(255,255,255,0.08); margin: 0 0 12px; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.sources, #log { list-style: none; padding: 0; margin: 12px 0 0; }
.sources a, #d-links button {
  display: inline-block;
  margin: 0 8px 6px 0;
  font-size: 0.82rem;
}
#d-links button { background: none; border: 0; padding: 0; color: var(--accent); }
.agent label { display: block; margin-bottom: 6px; }
.ask-row { display: flex; gap: 8px; }
.ask-row input {
  flex: 1;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  border-radius: 12px;
  padding: 10px 12px;
}
.ask-row button { border-radius: 12px; padding: 0 14px; color: var(--ink); }
.form-note { min-height: 1.2em; font-size: 0.8rem; }
#refresh { margin-top: 8px; }
.agent { flex: 0 0 auto; min-height: 0; max-height: 46%; overflow: auto; }
#log { max-height: min(200px, 22vh); overflow: auto; }
#log li { padding: 7px 0; border-top: 1px solid rgba(255,255,255,0.05); font-size: 0.84rem; }
#log time { display: block; color: var(--muted); font-size: 0.72rem; }

.hypo-scale {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.hypo-scale li {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.hypo-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 8px;
}
.hypo {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  border-radius: 16px;
  padding: 12px;
  min-height: 132px;
}
.hypo-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hypo strong { display: block; font-family: Fraunces, Georgia, serif; font-size: 1.05rem; margin-top: 4px; }
.hypo em { font-style: normal; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.03em; }
.hypo .band { display: block; margin-top: 4px; color: var(--accent); font-size: 0.95rem; }
.hypo p { margin: 8px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.hypo .band-why { margin-top: 6px; }
.hypo-src { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 0.82rem; line-height: 1.35; }
.hypo-src span { display: block; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.03em; }
.hypo-src a { display: block; margin-top: 3px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
footer { padding-bottom: 28px; }

#notices {
  position: fixed;
  z-index: 20;
  top: 18px;
  right: 18px;
  width: min(420px, calc(100vw - 36px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.notice {
  pointer-events: auto;
  position: relative;
  padding: 14px 40px 15px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(9, 11, 16, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  animation: notice-in 380ms ease;
}
.notice h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 520;
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0;
}
.notice-body { margin: 6px 0 0; line-height: 1.45; }
.notice-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
}
.notice-x:hover { color: var(--ink); }
.notice[data-node]:not([data-node=""]) { cursor: pointer; }
@keyframes notice-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .top { grid-template-columns: 1fr; text-align: left; }
  .hero-price, .hero-meta, .status-line, .links { text-align: left; justify-content: flex-start; }
  .sentiment { grid-template-columns: 1fr; margin-left: 14px; margin-right: 14px; }
  .overview, .gallery, .hypos { padding-left: 14px; padding-right: 14px; }
  .hypo-scale { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr 1fr; }
  #overview, .two { grid-template-columns: 1fr; }
  .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  main { grid-template-columns: 1fr; }
  .map-wrap { min-height: 520px; }
  aside { height: auto; min-height: 0; }
  .dossier-scroll { flex: 0 1 auto; max-height: 42vh; min-height: 160px; }
  .agent { max-height: none; }
  #projection { width: min(520px, calc(100vw - 32px)); left: 16px; }
  .hypo-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .top, .chart-wrap, .hypos, footer, main, .figures, .sentiment, .gallery { padding-left: 14px; padding-right: 14px; }
  .shots { grid-template-columns: 1fr; }
  .figures { grid-template-columns: 1fr 1fr; }
  .hypo-row, .hypo-scale { grid-template-columns: 1fr; }
  .chart-head { flex-direction: column; }
}
