/* Entry 027 — I might be wrong about this
   Series: The Unreliable Narrator (first entry).
   Scene art direction: a dark field crossed by one soft, out-of-focus band of
   light — the world half-resolved. Nothing has a hard edge except the one thing
   that should: the answer card. One temperature, a cool study-blue, held against
   the warm fuzz of the band; one accent, a confident cyan, used only on the
   grounding marks. The defocused ground is the concept — certainty is the only
   in-focus object in a world that isn't.
   Display voices, scoped to this entry: Fraunces (the soul — the answer, the ask,
   the question) + IBM Plex Mono (the machine — labels, meter, marks). Corner
   radius a crisp 12px, distinct from 026's softer 18. Accent cool cyan, breaking
   from 026's warm amber-over-water. */

.narrator-scene {
  --deep: #14120f;
  --panel-ink: #eef3f8;
  --panel-dim: rgba(216, 226, 236, 0.56);
  --accent: #5fb8d4;
  --accent-glow: #a9e2ee;
  --radius: 12px;

  display: grid;
  place-items: center;
  min-height: 780px;
  padding: 120px 32px;
  border-color: rgba(12, 12, 16, 0.7);
  /* background-first: a real, deliberately out-of-focus photograph carries the
     mood; a cool scrim keeps the card and type legible. */
  background-image:
    linear-gradient(165deg, rgba(12, 13, 17, 0.62) 0%, rgba(13, 14, 18, 0.30) 46%, rgba(9, 9, 13, 0.72) 100%),
    url("../../public/media/backgrounds/mono-17-guy.jpg");
  background-size: cover, cover;
  background-position: center, center 42%;
  background-repeat: no-repeat, no-repeat;
}

/* mid layer — the band's own light, spilled and blurred up from the lower-left */
.haze {
  position: absolute;
  z-index: 0;
  left: 24%;
  top: 64%;
  width: min(900px, 96%);
  height: 540px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(58% 58% at 42% 52%, rgba(120, 178, 210, 0.20), transparent 70%),
    radial-gradient(46% 46% at 60% 64%, rgba(176, 132, 92, 0.16), transparent 72%);
  filter: blur(60px);
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* THE COMPONENT — one answer card that wears its own confidence       */
/* ------------------------------------------------------------------ */

.answer {
  position: relative;
  z-index: 2;
  width: min(660px, 100%);
  display: grid;
  gap: 26px;
  padding: 44px 46px 34px;
  border-radius: var(--radius);
  font-family: "IBM Plex Mono", var(--ui-sans);
  /* crisp frosted glass — the one in-focus object in a defocused world */
  background:
    linear-gradient(168deg, rgba(150, 178, 200, 0.12), rgba(14, 18, 26, 0.30));
  border: 1px solid rgba(176, 200, 220, 0.22);
  box-shadow:
    0 1px 0 rgba(214, 230, 244, 0.26) inset,
    0 0 0 1px rgba(8, 10, 16, 0.22),
    0 50px 120px rgba(6, 8, 16, 0.62),
    0 14px 44px rgba(40, 70, 96, 0.22);
  backdrop-filter: blur(26px) saturate(1.2);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
  color: var(--panel-ink);
}

/* the question — small, machine, recessive */
.answer-head { margin: 0; }

.ask {
  margin: 0;
  font-family: "Fraunces", "Newsreader", Georgia, serif;
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.4;
  font-weight: 480;
  color: rgba(226, 234, 244, 0.9);
}

.ask-label {
  display: inline-block;
  margin-right: 10px;
  font-family: "IBM Plex Mono", var(--ui-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(196, 210, 224, 0.42);
  vertical-align: 2px;
}

/* the reply — the hero. serif, large, its confidence rendered into the type. */
.reply {
  margin: 0;
  font-family: "Fraunces", "Newsreader", Georgia, serif;
  font-size: clamp(21px, 3vw, 29px);
  line-height: 1.5;
  letter-spacing: 0.004em;
  color: var(--panel-ink);
  text-wrap: pretty;
}

/* each clause — JS sets its blur + opacity from confidence and the slider.
   Defaults here are the "tell me everything" resting look. */
.seg {
  display: inline;
  cursor: pointer;
  transition: filter 520ms cubic-bezier(0.2, 0.6, 0.2, 1),
              opacity 520ms ease, color 320ms ease;
  border-radius: 3px;
}

.seg:hover { color: #fff; }

/* grounded clauses earn a quiet cyan grounding tick under them */
.seg.grounded {
  text-decoration: underline;
  text-decoration-color: rgba(95, 184, 212, 0.62);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* invented clauses lean italic — improvised, unprovable */
.seg.invented { font-style: italic; }

/* a clause dropped below the slider threshold collapses out of the answer */
.seg.dropped {
  opacity: 0.06 !important;
  filter: blur(5px) !important;
}

/* tapped clause — momentarily ringed while its honest line shows */
.seg.active {
  color: #fff;
  background: rgba(95, 184, 212, 0.12);
  box-shadow: 0 0 0 1px rgba(95, 184, 212, 0.3);
}

/* the honest line behind a tapped clause */
.reveal[hidden] { display: none; }

.reveal {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: -6px 0 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.4);
  border: 1px solid rgba(176, 200, 220, 0.14);
  animation: rise 360ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

.reveal-mark {
  flex: none;
  font-family: "IBM Plex Mono", var(--ui-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.reveal-mark.is-grounded { color: #0c1418; background: var(--accent); }
.reveal-mark.is-estimate { color: var(--accent-glow); border: 1px solid rgba(95, 184, 212, 0.4); }
.reveal-mark.is-invented { color: rgba(232, 196, 168, 0.92); border: 1px solid rgba(196, 140, 96, 0.4); }

.reveal-text {
  font-family: "Newsreader", Georgia, serif;
  font-size: 15.5px;
  line-height: 1.5;
  color: rgba(220, 230, 240, 0.86);
}

/* ---- controls ---- */
.controls {
  display: grid;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid rgba(176, 200, 220, 0.14);
}

.meter {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.meter-num {
  font-family: "IBM Plex Mono", var(--ui-sans);
  font-size: clamp(30px, 4.4vw, 42px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px rgba(95, 184, 212, 0.32);
  transition: color 320ms ease;
}

.meter-cap {
  font-family: "IBM Plex Mono", var(--ui-sans);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(200, 214, 228, 0.6);
}

.slider-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.slider-end {
  font-family: "IBM Plex Mono", var(--ui-sans);
  font-size: 9.5px;
  line-height: 1.25;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(196, 210, 224, 0.5);
}
.slider-end.right { text-align: right; }

.sure {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(196, 210, 224, 0.5), rgba(95, 184, 212, 0.85));
  outline: none;
  cursor: pointer;
}
.sure::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #eaf6fb, var(--accent));
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 16px rgba(95, 184, 212, 0.5);
}
.sure::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #eaf6fb, var(--accent));
  box-shadow: 0 4px 16px rgba(95, 184, 212, 0.5);
}

.prove {
  justify-self: start;
  font-family: "IBM Plex Mono", var(--ui-sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(224, 234, 244, 0.86);
  background: rgba(95, 184, 212, 0.08);
  border: 1px solid rgba(95, 184, 212, 0.32);
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  transition: transform 180ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease;
}
.prove:hover {
  transform: translateY(-1px);
  background: rgba(95, 184, 212, 0.14);
  border-color: rgba(95, 184, 212, 0.55);
  color: #fff;
}
.prove[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #0c1418;
}

.disclaimer {
  margin: 0;
  font-family: "Fraunces", "Newsreader", Georgia, serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: rgba(196, 210, 224, 0.56);
}

/* unobtrusive photo attribution */
.scene-credit {
  position: absolute;
  right: 16px;
  bottom: 13px;
  z-index: 3;
  font-family: "IBM Plex Mono", var(--ui-sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(220, 228, 240, 0.3);
  pointer-events: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .seg, .meter-num { transition: none; }
  .reveal { animation: none; }
}

/* ---- small screens ---- */
@media (max-width: 720px) {
  .narrator-scene { padding: 72px 16px; min-height: 0; }
  .answer { padding: 32px 26px 28px; gap: 22px; }
  .reply { font-size: 20px; }
  .slider-row { gap: 10px; }
}
