/* The weekly discussion card. Self-contained: it sits on a content page and
   inside the app, which style themselves differently, so it brings its own
   palette and inherits nothing but the font. */

/* The card carries its own box model. It is dropped into a content page and
   into the app, and it must not depend on either of them having reset this. */
.dsc, .dsc *, .dsc *::before, .dsc *::after { box-sizing: border-box; }

.dsc {
  --dsc-rose: #C83D6B;
  --dsc-coral: #FF6B7D;
  --dsc-pink: #FFC2CE;
  --dsc-cream: #FFF5F1;
  --dsc-lilac: #EADFF1;
  direction: rtl;
  text-align: right;
  background: var(--dsc-cream);
  border: 1px solid var(--dsc-pink);
  border-radius: 1.1rem;
  padding: 1.4rem 1.5rem;
  margin: 2.5rem 0;
  font-family: Heebo, -apple-system, "Segoe UI", Arial, sans-serif;
  color: #2d2f2f;
}

.dsc-kicker {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--dsc-rose);
  margin: 0 0 .5rem;
}

.dsc-q {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.55;
  margin: 0 0 1.1rem;
  color: #2d2f2f;
}

/* The line that says a crowd is already inside, and that the answer is behind
   the click. Quiet: it invites, it does not shout. */
.dsc-invite {
  font-size: .86rem;
  color: #7a6268;
  margin: -.5rem 0 .9rem;
}

.dsc-options { display: grid; gap: .6rem; }

.dsc-opt {
  font: inherit;
  text-align: right;
  background: #fff;
  border: 1.5px solid var(--dsc-pink);
  border-radius: .85rem;
  padding: .85rem 1.1rem;
  cursor: pointer;
  color: #2d2f2f;
  transition: border-color .15s ease, background .15s ease;
}
.dsc-opt:hover { border-color: var(--dsc-coral); background: #fff; }
.dsc-opt:focus-visible { outline: 3px solid var(--dsc-rose); outline-offset: 2px; }
.dsc-opt[disabled] { cursor: default; }

/* Results. The bar is a picture of the number that is already written beside
   it, so nothing is lost to anyone who cannot see the colour. */
.dsc-result { display: grid; gap: .75rem; }

.dsc-row { display: block; }
.dsc-row-top {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: .95rem; margin-bottom: .35rem;
}
.dsc-row-top b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--dsc-rose); }
.dsc-row.mine .dsc-row-top span { font-weight: 700; }
.dsc-bar { height: .7rem; border-radius: 99px; background: var(--dsc-lilac); overflow: hidden; }
.dsc-bar i { display: block; height: 100%; background: var(--dsc-rose); border-radius: 99px; }
.dsc-row.mine .dsc-bar i { background: var(--dsc-coral); }

.dsc-total { font-size: .82rem; color: #666; margin: .9rem 0 0; }

/* Where this answer landed against everyone else. */
.dsc-verdict {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dsc-rose);
  margin: .5rem 0 0;
}

/* The line about the topic, shown once the answer is in. Set apart from the
   numbers above it so it reads as a thought, not as a caption. */
.dsc-insight {
  font-size: .96rem;
  line-height: 1.75;
  color: #4a4548;
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--dsc-pink);
}

/* The visitor's own read on themselves. Lilac rather than rose so it reads as
   a different kind of thing from the crowd's numbers above it. */
.dsc-profile {
  background: var(--dsc-lilac);
  border-radius: .9rem;
  padding: 1.1rem 1.2rem;
  margin-top: 1.2rem;
}
.dsc-profile-kicker {
  font-size: .76rem; font-weight: 700; letter-spacing: .04em;
  color: #6b4b7a; margin: 0 0 .3rem;
}
.dsc-profile-title { font-size: 1.05rem; font-weight: 700; color: #4a2d59; margin: 0 0 .4rem; }
.dsc-profile-text { font-size: .93rem; line-height: 1.7; color: #4a2d59; margin: 0; }

/* Two meters that move with every answer, so the reading visibly tightens. */
.dsc-meters { display: grid; gap: .8rem; margin: 1rem 0 .7rem; }
.dsc-meter-ends {
  display: flex; justify-content: space-between;
  font-size: .76rem; color: #6b4b7a; margin-bottom: .3rem;
}
.dsc-meter-bar { position: relative; height: .4rem; border-radius: 99px; background: rgba(255,255,255,.75); }
.dsc-meter-bar i {
  position: absolute; top: 50%; width: .8rem; height: .8rem; border-radius: 99px;
  background: var(--dsc-rose); transform: translate(50%, -50%);
  transition: inset-inline-start .35s ease;
}
.dsc-profile-base { font-size: .78rem; color: #6b4b7a; margin: 0; }

@media (prefers-reduced-motion: reduce) { .dsc-meter-bar i { transition: none; } }

/* The quietest control on the card: available, never competing. */
.dsc-profile-open {
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  background: none;
  border: 0;
  color: #6b4b7a;
  cursor: pointer;
  padding: .5rem .25rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(107, 75, 122, .35);
}
.dsc-profile-open:hover { text-decoration-color: #6b4b7a; }
.dsc-profile-open:focus-visible { outline: 3px solid #6b4b7a; outline-offset: 2px; border-radius: .4rem; }

.dsc-profile-slot:empty { display: none; }
.dsc-profile-slot .dsc-profile { margin-top: 1.1rem; }

.dsc-foot { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; align-items: center; }

/* On most cards this is the only thing to press, so it looks like it. It steps
   back to an outline only on the one card a week that also carries the link to
   Facebook, where that link has to stay the louder of the two. */
.dsc-next {
  font: inherit;
  font-weight: 700;
  background: var(--dsc-rose);
  color: #fff;
  border: 1.5px solid var(--dsc-rose);
  border-radius: 99px;
  padding: .8rem 1.9rem;
  cursor: pointer;
}
.dsc-next:hover { background: var(--dsc-coral); border-color: var(--dsc-coral); }
.dsc-next:focus-visible { outline: 3px solid #2d2f2f; outline-offset: 2px; }

.dsc-foot.has-cta .dsc-next {
  background: transparent;
  color: var(--dsc-rose);
  border-color: var(--dsc-pink);
  padding: .72rem 1.5rem;
}
.dsc-foot.has-cta .dsc-next:hover { background: transparent; border-color: var(--dsc-rose); }
.dsc-foot.has-cta .dsc-next:focus-visible { outline-color: var(--dsc-rose); }

.dsc-cta {
  display: inline-block;
  background: var(--dsc-rose);
  color: #fff;
  text-decoration: none;
  padding: .75rem 1.6rem;
  border-radius: 99px;
  font-weight: 700;
}
.dsc-cta:hover { background: var(--dsc-coral); }
.dsc-cta:focus-visible { outline: 3px solid #2d2f2f; outline-offset: 2px; }

@media (max-width: 600px) {
  .dsc { padding: 1.2rem 1.15rem; margin: 2rem 0; }
  .dsc-foot { flex-direction: column; align-items: stretch; }
  .dsc-cta, .dsc-next { display: block; text-align: center; width: 100%; }
}

/* The invitation inside the app. A strip, never an overlay: it sits in the
   flow at the foot of the swipe screen, and ignoring it costs nothing. */
.dsn {
  --dsc-rose: #C83D6B;
  --dsc-pink: #FFC2CE;
  --dsc-cream: #FFF5F1;
  box-sizing: border-box;
  direction: rtl;
  display: flex;
  align-items: center;
  gap: .7rem;
  background: var(--dsc-cream);
  border: 1px solid var(--dsc-pink);
  border-radius: .9rem;
  padding: .7rem .9rem;
  margin: .6rem 0 0;
  font-family: Heebo, -apple-system, "Segoe UI", Arial, sans-serif;
  animation: dsn-in .2s ease;
}
.dsn * { box-sizing: border-box; }
.dsn-text { flex: 1; margin: 0; font-size: .86rem; line-height: 1.5; color: #2d2f2f; }
.dsn-cta {
  flex: none; background: var(--dsc-rose); color: #fff; text-decoration: none;
  padding: .5rem 1.1rem; border-radius: 99px; font-weight: 700; font-size: .85rem;
}
.dsn-x {
  flex: none; font: inherit; font-size: 1.15rem; line-height: 1; background: none;
  border: 0; color: #9a8a8f; cursor: pointer; padding: .25rem .4rem; border-radius: .4rem;
}
.dsn-x:hover { color: #2d2f2f; }
.dsn-cta:focus-visible, .dsn-x:focus-visible { outline: 3px solid var(--dsc-rose); outline-offset: 2px; }

@keyframes dsn-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dsn { animation: none; } }

/* The clock, made visible. A question that vanishes without warning reads as a
   fault; one with a line running out reads as a stack moving on. */
.dsc-timer {
  height: .2rem;
  border-radius: 99px;
  background: var(--dsc-lilac);
  overflow: hidden;
  margin-top: 1.1rem;
}
.dsc-timer i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--dsc-pink);
  transform-origin: right center;
  animation: dsc-tick linear forwards;
}
@keyframes dsc-tick { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .dsc-timer { display: none; } }
