/* The age calculator's own pieces. Everything here is scoped to .age-page, and the shared result
   language — the navy hero, the orange edge, the brand line, the tiles, the action row, the next
   step and the related cards — comes from results.css. Nothing new is introduced that a future
   calculator could not reuse from there. */

/* ---------------------------------------------------------------- The form */

.age-page .age-today {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 10px;
}

.age-page .age-today .link-btn { margin: 0; }

/* The live indicator sits under the button and holds its height in both states, so pressing Use
   today does not move the form under the reader's finger. */
.age-page .age-live {
  flex: 1 1 220px;
  min-height: 2.8em;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

/* ---------------------------------------------------------------- The result */

.age-page .age-hero .label { overflow-wrap: anywhere; }
.age-page .age-hero .sub { overflow-wrap: anywhere; }

/* Six tiles of unequal length: days, hours, minutes and seconds all count up while the live count
   is on. min-width:0 and anywhere wrapping keep the longest of them inside the card at 320px. */
.age-page .age-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.age-page .age-tiles .stat { min-width: 0; }
.age-page .age-tiles .stat .value { overflow-wrap: anywhere; }

.age-page .age-year { margin: 4px 0 22px; }
.age-page .age-year .bar-caption { margin-top: 0; }
.age-page .age-bar { height: 18px; margin: 8px 0 0; }
.age-page .age-bar .p1 { background: var(--highlight); }

.age-page .age-table { margin-bottom: 16px; }
.age-page .age-table:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }
.age-page .age-table caption {
  text-align: left;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0 0 8px;
}

.age-page .age-restored { margin: 0 0 16px; }

/* ---------------------------------------------------------------- The article */

.age-page .age-article h3 { font-size: 1.02rem; margin: 22px 0 8px; }
.age-page .age-article p,
.age-page .age-article li { max-width: 78ch; }
.age-page .age-article caption {
  text-align: left;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0 0 10px;
}
.age-page .age-article th[scope="row"] { text-align: left; font-weight: 600; }
.age-page .age-article .formula { white-space: normal; overflow-wrap: anywhere; }
.age-page .age-article .scroll-x:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }

/* The same quiet orange edge and card the reference pages use for their facts. */
.age-page .calc-info .fact-list { display: grid; gap: 12px; margin-top: 14px; }
.age-page .calc-info .fact {
  padding: 14px 16px;
  border-left: 3px solid var(--highlight);
  border-radius: 0 12px 12px 0;
  background: var(--accent);
}
.age-page .calc-info .fact h3 { margin: 0 0 6px; font-size: 0.95rem; line-height: 1.45; }
.age-page .calc-info .fact p { margin: 0; font-size: 0.88rem; line-height: 1.6; }

.age-page .age-sources { margin: 8px 0 0; padding-left: 20px; }
.age-page .age-sources li { margin-bottom: 6px; font-size: 0.9rem; line-height: 1.55; }
.age-page .age-sources a { color: var(--primary); }

@media (max-width: 640px) {
  .age-page .age-today { gap: 8px; }
  .age-page .age-live { flex-basis: 100%; min-height: 0; }
  .age-page .age-tiles .stat { padding: 10px 12px; }
  .age-page .age-tiles .stat .value { font-size: 1rem; }
}

@media (max-width: 380px) {
  .age-page .age-tiles { grid-template-columns: minmax(0, 1fr); }
}
