/* /tunne — one dataset, three sentences above it, four people looking.
   Layout follows the plain single-column pages (nrd, jarkko); the stage is
   the only thing that is new: a map with a moving point, and a quote that
   changes when the sentence above the map changes. */

.tunne-verbs {
  display: flex;
  gap: 14px;
  margin: -6px 0 18px;
  font-family: Georgia, Cambria, serif;
  font-size: 1.15rem;
  color: var(--muted);
}
.tunne-verbs span { position: relative; }
.tunne-verbs .is-strike { opacity: 0; animation: tunne-appear 0.5s ease 4.1s forwards; color: var(--ink); }
@keyframes tunne-appear { to { opacity: 1; } }
.tunne-verbs span:not(.is-strike)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 55%;
  height: 2px;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: left;
  animation: tunne-strike 0.6s ease forwards;
}
.tunne-verbs span:nth-child(1)::after { animation-delay: 1.2s; }
.tunne-verbs span:nth-child(2)::after { animation-delay: 2.2s; }
.tunne-verbs span:nth-child(3)::after { animation-delay: 3.2s; }
@keyframes tunne-strike { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .tunne-verbs span:not(.is-strike)::after { animation: none; transform: scaleX(1); }
  .tunne-verbs .is-strike { animation: none; opacity: 1; }
}

.tunne-stage {
  margin: 28px 0 34px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Scene tabs: the sentence above the data. */
.tunne-scenes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tunne-scene {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  line-height: 1.25;
  cursor: pointer;
}
.tunne-scene-n {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--line);
  font-weight: 800;
  font-size: 0.85rem;
}
.tunne-scene.is-active { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.tunne-scene.is-active .tunne-scene-n { background: var(--forest); color: #fffaf0; }
.tunne-scene[data-scene="fake"].is-active { border-color: var(--clay); box-shadow: inset 0 0 0 1px var(--clay); }
.tunne-scene[data-scene="fake"].is-active .tunne-scene-n { background: var(--clay); }
.tunne-scene[data-scene="sea"].is-active { border-color: var(--water); box-shadow: inset 0 0 0 1px var(--water); }
.tunne-scene[data-scene="sea"].is-active .tunne-scene-n { background: var(--water); }
@media (max-width: 560px) {
  .tunne-scenes { grid-template-columns: 1fr; }
}

/* The map and everything laid over it. */
.tunne-map-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #e9eef0;
  aspect-ratio: 4 / 3;
  max-height: 72vh;
}
.tunne-map { position: absolute; inset: 0; }
.tunne-map .maplibregl-ctrl-attrib { font-size: 10px; }

.tunne-claim {
  position: absolute;
  left: 12px; right: 12px; top: 12px;
  z-index: 5;
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(24, 49, 45, 0.88);
  color: #f3eee0;
  font-family: Georgia, Cambria, serif;
  font-size: clamp(0.98rem, 2.4vw, 1.15rem);
  line-height: 1.35;
  text-wrap: balance;
  transition: background 0.4s ease;
}
.tunne-map-wrap[data-scene="fake"] .tunne-claim { background: rgba(183, 78, 55, 0.9); }
.tunne-map-wrap[data-scene="sea"] .tunne-claim { background: rgba(57, 127, 157, 0.9); }

.tunne-readout {
  position: absolute;
  left: 12px; bottom: 56px;
  z-index: 5;
  display: flex;
  gap: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 250, 240, 0.92);
  border: 1px solid var(--line);
}
.tunne-readout div { display: flex; flex-direction: column; min-width: 58px; }
.tunne-k { font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tunne-v { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.05rem; line-height: 1.2; }

.tunne-controls {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 250, 240, 0.92);
  border: 1px solid var(--line);
}
.tunne-play {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--forest);
  color: #fffaf0;
  font-size: 0.95rem;
  cursor: pointer;
}
.tunne-controls input[type="range"] { flex: 1; min-width: 0; accent-color: var(--forest); }

.tunne-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  margin: 0;
  display: grid;
  place-content: center;
  background: rgba(247, 243, 233, 0.85);
  color: var(--muted);
  font-size: 0.95rem;
}
.tunne-loading[hidden] { display: none; }

/* Who is looking. */
.tunne-viewers { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tunne-viewers-label {
  margin: 0 6px 0 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun);
}
.tunne-viewer {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.tunne-viewer.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* What they feel. */
.tunne-feeling {
  margin: 4px 0 0;
  padding: 18px 22px;
  border-left: 4px solid var(--forest);
  background: var(--panel);
  border-radius: 0 12px 12px 0;
  min-height: 96px;
  transition: border-color 0.4s ease;
}
.tunne-feeling[data-scene="fake"] { border-left-color: var(--clay); }
.tunne-feeling[data-scene="sea"] { border-left-color: var(--water); }
.tunne-quote {
  margin: 0;
  font-family: Georgia, Cambria, serif;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  line-height: 1.3;
  text-wrap: balance;
  animation: tunne-in 0.35s ease;
}
.tunne-note { margin: 10px 0 0; font-size: 0.86rem; color: var(--muted); line-height: 1.45; }
.tunne-note:empty { display: none; }
@keyframes tunne-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tunne-quote { animation: none; } }
