/* ===========================================================================
   PHASE 7.6 -- WHO SAID IT, WOULD YOU RATHER, HIGHER OR LOWER.

   Loaded LAST, after phase75.css, for the reason each of these stylesheets is
   loaded after the previous one: the new cards extend `.dailycard` from
   phase7.css, and extending it from a later stylesheet means ordinary
   specificity rather than `!important`.

   ---------------------------------------------------------------------------
   NO INLINE STYLES, ANYWHERE -- AND ONE PLACE IT NEARLY MATTERED
   ---------------------------------------------------------------------------
   The Content Security Policy is `style-src 'self'`, which blocks
   `element.style.*` outright and SILENTLY: the layout simply never applies.
   Phase 7 shipped a release where every progress bar in the application
   rendered empty because of it.

   The Would You Rather split bars are the one thing in this phase that wants a
   computed width. They get `.dg76-w0` ... `.dg76-w100` -- eleven classes, one
   per ten per cent -- and the EXACT percentage is printed as text beside the
   bar. So the number is the truth and the bar is an illustration of it, which
   also means a rounding of 62% to a 60%-wide bar is not a lie anybody can read
   off the screen.

   phase6.css already defines `.is-pN` at 5% steps for meters, and those are
   reused where a meter is a meter. These are deliberately separate because a
   vote split is two bars that must add up, not one bar that fills.

   ---------------------------------------------------------------------------
   PHONE FIRST, AND THE 44px RULE
   ---------------------------------------------------------------------------
   Every interactive element in this phase is a `.btn`, a `.hwdyk-choice` label
   or `.dg76-tap`, and all three are at least `--tap` (48px) high. The two-choice
   games are the reason `.dg76-tap` exists at all: a Would You Rather side can be
   a long sentence, so the button has to grow to fit the text and still never
   shrink below the minimum when the text is short.

   Checked at 320px, which is the narrowest phone this family actually uses.
   Nothing here sets a fixed width, so there is no horizontal overflow to find.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   SHARED
   --------------------------------------------------------------------------- */

/*
 * The minimum tap target, applied to every button this phase adds.
 *
 * `min-height` rather than `height`: a Would You Rather option is a sentence and
 * must be allowed to wrap onto three lines on a 320px screen. A fixed height
 * would clip it, and `overflow: hidden` on a tappable thing is how a choice
 * becomes unreadable.
 */
.dg76-tap {
  min-height: var(--tap);
  height: auto;
  padding-block: 0.7rem;
  white-space: normal;
  line-height: 1.3;
}

.dg76-band {
  margin: 0.6rem 0;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev-2);
  font-weight: 600;
  text-align: center;
}

.dg76-band--good {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.dg76-band--bad {
  border-color: var(--danger);
  color: var(--danger);
}

.dg76-band--neutral {
  color: var(--metal);
}

.dg76-or {
  margin: 0.35rem 0;
  text-align: center;
  color: var(--text-faint);
  text-transform: lowercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.dg76-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.dg76-names {
  margin: 0.15rem 0 0.5rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  /* A list of names must be allowed to wrap; `overflow-wrap` covers the one
   * very long display name that would otherwise push the card sideways. */
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------------------
   WHO SAID IT?
   --------------------------------------------------------------------------- */

.dg76-quote {
  margin: 0 0 0.5rem;
  padding: 0.25rem 0 0.25rem 0.8rem;
  border-left: 3px solid var(--accent-dim);
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.45;
  /* A quote is somebody's actual words, so it keeps its own line breaks and is
   * allowed to wrap anywhere rather than widening the card. */
  overflow-wrap: anywhere;
}

.dg76-quote--small {
  font-size: 1rem;
}

.dg76-context {
  margin-top: -0.25rem;
  font-style: italic;
}

/*
 * "You are sitting this one out."
 *
 * Deliberately not styled as an error or a warning. Being the subject of the
 * quote is the nicest thing that can happen to you in this game, and a red
 * banner would read as a telling-off.
 */
.dg76-sitout {
  margin: 0.5rem 0 0.25rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  color: var(--metal);
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   WOULD YOU RATHER?
   --------------------------------------------------------------------------- */

.dg76-rather-lead {
  margin: 0 0 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

.dg76-side {
  margin-bottom: 0.85rem;
}

.dg76-side--mine .dg76-side__label {
  color: var(--accent);
}

.dg76-side__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.dg76-side__percent {
  margin: 0.25rem 0 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.dg76-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.dg76-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent-dim);
}

.dg76-side--mine .dg76-bar__fill {
  background: var(--accent);
}

/*
 * THE ELEVEN WIDTHS.
 *
 * One class per ten per cent, because the CSP forbids an inline width and a
 * silently-unapplied style is worse than a coarse bar. See the header.
 */
.dg76-w0 { width: 0; }
.dg76-w10 { width: 10%; }
.dg76-w20 { width: 20%; }
.dg76-w30 { width: 30%; }
.dg76-w40 { width: 40%; }
.dg76-w50 { width: 50%; }
.dg76-w60 { width: 60%; }
.dg76-w70 { width: 70%; }
.dg76-w80 { width: 80%; }
.dg76-w90 { width: 90%; }
.dg76-w100 { width: 100%; }

/* ---------------------------------------------------------------------------
   HIGHER OR LOWER?
   --------------------------------------------------------------------------- */

.dg76-summary {
  margin: 0.75rem 0 0.5rem;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.6rem;
}

.dg76-summary--inline {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-soft);
}

.dg76-row {
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--line);
  background: var(--bg-elev-2);
}

.dg76-row--good { border-left-color: var(--accent); }
.dg76-row--bad { border-left-color: var(--danger); }
.dg76-row--neutral { border-left-color: var(--metal-dim); }

.dg76-row__prompt {
  margin: 0 0 0.2rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.dg76-row__verdict {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.dg76-row__fact {
  margin: 0.3rem 0 0;
  color: var(--text-faint);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------------------
   #/quotes -- THE WARNING AND THE FORM
   --------------------------------------------------------------------------- */

/*
 * The family-friendly notice.
 *
 * `--warn` rather than `--danger`: this is guidance given before anything has
 * gone wrong, and shouting at somebody about to write down something their
 * grandmother said is the wrong tone. It is still visually distinct from the
 * card below it, so it cannot be skimmed past as decoration.
 */
.dg76-warn {
  margin-bottom: 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--warn);
  background: var(--bg-elev-2);
}

.dg76-warn__title {
  margin: 0 0 0.3rem;
  color: var(--warn);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}

.dg76-warn__body {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.45;
}

.dg76-form {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

/*
 * The confirmation, immediately above Submit.
 *
 * A whole-row label so the tap target is the sentence rather than the 18px box
 * the platform draws -- the same reason every radio in this application is
 * wrapped in a `.hwdyk-choice` label.
 */
.dg76-confirm {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  min-height: var(--tap);
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev-2);
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.45;
  cursor: pointer;
}

.dg76-confirm input {
  /* Big enough to hit on its own, though the whole label is the target. */
  width: 1.3rem;
  height: 1.3rem;
  margin-top: 0.1rem;
  flex: 0 0 auto;
}

.dg76-poolline {
  margin: 0 0 1rem;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.dg76-myquote {
  margin-bottom: 0.75rem;
}

.dg76-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ---------------------------------------------------------------------------
   #/yesterday -- THE GROUP RESULTS
   --------------------------------------------------------------------------- */

.dg76-result {
  margin-bottom: 1rem;
}

.dg76-disclosure {
  margin-top: 0.75rem;
}

.dg76-everybody {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}

.dg76-everybody__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  /*
   * Zebra striping is done with a background on alternate rows rather than a
   * border, so a list of eight names does not turn into a grid of lines on a
   * small screen.
   */
  background: transparent;
}

.dg76-everybody__row:nth-child(odd) {
  background: var(--bg-elev-2);
}

/* Your own line, marked without colour alone. */
.dg76-everybody__row--you .dg76-everybody__name {
  color: var(--accent);
  font-weight: 700;
}

.dg76-everybody__name {
  overflow-wrap: anywhere;
}

/*
 * The value column -- a choice, a tick, a cross, or "No answer".
 *
 * "No answer" and "No vote" are styled EXACTLY like any other value: same
 * colour, same weight, no icon. B6 asks not to shame nonparticipants and names
 * "keep 'No vote' visually neutral", and the surest way to keep it neutral is to
 * give it no style of its own at all, so there is nothing for a future change to
 * make louder.
 */
.dg76-everybody__value {
  color: var(--text-dim);
  text-align: right;
  flex: 0 0 auto;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------------------
   320px -- THE NARROWEST PHONE IN THE FAMILY
   --------------------------------------------------------------------------- */

@media (max-width: 360px) {
  .dg76-quote {
    font-size: 1.05rem;
    padding-left: 0.6rem;
  }

  /*
   * The name and the value stack rather than squeeze. At 320px a long display
   * name beside "Never eat dessert again" leaves neither readable, and a
   * two-line row is better than two truncated ones.
   */
  .dg76-everybody__row {
    flex-direction: column;
    gap: 0.15rem;
  }

  .dg76-everybody__value {
    text-align: left;
  }
}
