/* The Compound Savings page's own layer.
 *
 * Everything here is scoped to .savings-page and sits on top of styles.css and results.css, which
 * already carry the shared hero, tiles, actions, chart and disclosure styles. Nothing new is
 * introduced: every colour, radius and shadow is an existing token, so both themes work without a
 * second set of rules. */

/* ---------------------------------------------------------------- The cards below the result */

/* A little more air between the editorial cards than the site-wide 24px, so a page with five
   facts and a long method does not read as one continuous block. */
.savings-page .calc-info { gap: 30px; }
.savings-page .calc-info > .panel { min-width: 0; }

/* Interior prose takes the full width of its card. Only the affected elements are named; the
   site-wide typography is untouched. */
.savings-page .calc-info p,
.savings-page .calc-info li,
.savings-page .calc-info .faq p { width: 100%; max-width: none; }

.savings-page .calc-info h3 { margin: 22px 0 8px; font-size: 1rem; line-height: 1.4; }
.savings-page .calc-info h3:first-of-type { margin-top: 18px; }

/* ---------------------------------------------------------------- The facts */

/* One full-width card per row at every width: the facts read as a single list, never a grid. */
.savings-page .calc-info .fact-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.savings-page .calc-info .fact {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--highlight);
  border-radius: 0 12px 12px 0;
  background: var(--accent);
}
.savings-page .calc-info .fact h3 { margin: 0 0 6px; font-size: 0.95rem; line-height: 1.45; }
.savings-page .calc-info .fact p { margin: 0; font-size: 0.88rem; line-height: 1.6; }

/* ---------------------------------------------------------------- Formula and sources */

.savings-page .calc-info .formula {
  margin: 10px 0 14px;
  padding: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
  background: var(--accent);
  border-left: 3px solid var(--highlight);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* The four linked references at the bottom of the method, in the same compact list shape the
   Powerball page uses: a real anchor, the publisher, and what the source supports. */
.savings-page .savings-sources { margin: 8px 0 0; padding-left: 20px; }
.savings-page .savings-sources li { margin-bottom: 8px; font-size: 0.88rem; line-height: 1.55; }
.savings-page .savings-sources li:last-child { margin-bottom: 0; }
.savings-page .savings-sources a {
  color: var(--primary);
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.savings-page .savings-sources a:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; border-radius: 4px; }

/* ---------------------------------------------------------------- The result panel */

/* The interpretation line sits directly under the hero and belongs to it, so it keeps a little
   more space below than the shared .calc-meaning default. */
.savings-page .calc-results .calc-meaning { margin: 14px 0 18px; }
.savings-page .calc-result-actions { margin-top: 4px; }

/* The yearly table may scroll inside its own boundary on a phone; the page itself must not. */
.savings-page .savings-wrap { max-height: 340px; -webkit-overflow-scrolling: touch; }
.savings-page .savings-table { width: 100%; }

/* ---------------------------------------------------------------- Narrow screens */

@media (max-width: 900px) {
  .savings-page .calc-info { gap: 24px; }
}
@media (max-width: 600px) {
  .savings-page .calc-info { gap: 20px; }
  .savings-page .calc-info .fact { padding: 12px 14px; }
}
