/* Page-specific presentation for the flatmate bills calculator.
 *
 * Everything here is scoped to .flatmate-bills-page and leans on the shared tokens and result
 * pieces in styles.css and results.css. The two rules that must never be softened are the fact
 * list — a single column of full-width rows at every width, including desktop — and the one
 * figure that matters, which is the household's monthly total rather than any one person's share.
 */

/* ---------------------------------------------------------------- The five approved facts */

/* One fact under the other, each reading right across the panel: a long horizontal row rather
   than a crowded grid or a sideways rail. The orange edge is the site's own accent, and the
   tint is the same quiet accent the rest of the prose sections use. */
.flatmate-bills-page #facts .fact-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.flatmate-bills-page .fact {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--highlight);
  border-radius: 0 12px 12px 0;
  background: var(--accent);
}

.flatmate-bills-page .fact h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.flatmate-bills-page .fact p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- The result hero */

.flatmate-bills-page .flatmate-hero .sub {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Three supporting figures under the hero; they stack on a phone rather than shrinking into
   unreadable columns. */
.flatmate-bills-page .flatmate-tiles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.flatmate-bills-page .flatmate-tiles .stat .label,
.flatmate-bills-page .flatmate-tiles .stat .value {
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- The person cards */

/* The card leads with what the person pays each month, then the share they pay of every bill,
   then the same share read the other three ways. */
.flatmate-bills-page .pc-month {
  margin-left: auto;
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.flatmate-bills-page .pc-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.flatmate-bills-page .pc-sub {
  line-height: 1.5;
}

/* ---------------------------------------------------------------- The method and sources */

.flatmate-bills-page .sources-heading {
  margin-top: 20px;
}

.flatmate-bills-page .source-list {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.flatmate-bills-page .source-list li {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

/* The Reset button sits under the bill rows, at the width of the list it resets. */
.flatmate-bills-page .flatmate-reset {
  width: 100%;
  margin-top: 14px;
}

/* ---------------------------------------------------------------- Narrow screens */

@media (max-width: 720px) {
  .flatmate-bills-page .flatmate-tiles {
    grid-template-columns: minmax(0, 1fr);
  }
}
