/**
 * vibe.css
 *
 * Shared styles for the unified stat grid used by the main /vibe/
 * page (and, per project decision 2026-10-22, intended for reuse by a
 * future homepage summary-card section). Kept as one file rather than
 * per-page inline <style> blocks (the previous pattern, which had
 * near-identical rules independently repeated across 5 different
 * single-stat boxes on the main page alone) so there is exactly one
 * place to adjust the shared card look.
 *
 * Detail pages keep their OWN inline <style> blocks for page-specific
 * things (charts, tables, polar-plot legends) -- this file only covers
 * the generic grid-card look, which detail pages don't currently use
 * for their single "current reading" box (that box is larger/centered
 * on its own, not part of a multi-item grid) and so don't need to pull
 * this file in. If a future page wants one of these cards standalone,
 * it can include this stylesheet too.
 */

.vibe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 24px 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.vibe-card {
  display: block;
  background: #f4f8fb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

/* Cards that link to a detail page are styled identically to cards
   that (for now) don't yet have one -- no underline/link-blue -- so
   the grid looks uniform regardless of which cards happen to be
   linked. */
a.vibe-card:hover {
  background: #e9f1f7;
}

.vibe-card .vibe-card-value {
  font-size: 1.3em;
  font-weight: 700;
  /* Black (not the link-blue used elsewhere on this site), per
     project decision 2026-10-22 -- the label below is now styled to
     look like the hyperlink instead (see .vibe-card-label below), so
     the value itself no longer needs to carry that color. */
  color: #1a1a1a;
  line-height: 1.2;
  min-height: 1.6em; /* keeps card heights consistent whether the value wraps to 1 or 2 lines */
}

.vibe-card .vibe-card-detail {
  font-size: 0.85em;
  color: #555;
  margin-top: 4px;
  min-height: 1.2em;
}

/* Styled to look like a blue underlined hyperlink -- per project
   decision 2026-10-22 -- both to emphasize the label text itself and
   to make it visually obvious that a detail page exists for this
   card, even though the clickable area is actually the whole card
   (the <a>/<div> wrapper from vibe-card.html), not just this label
   text. Applied unconditionally (not only on cards that currently
   have an href) so the grid looks uniform regardless of which cards
   happen to be linked yet -- matches this file's existing a.vibe-card
   hover-background rule, which takes the same "look uniform" stance. */
.vibe-card .vibe-card-label {
  font-size: 0.8em;
  color: #0b5f8a;
  text-decoration: underline;
  margin-top: 6px;
}

.vibe-card .vibe-card-error {
  display: none;
  color: #58151c;
  font-size: 0.85em;
}

/* Small inline badge next to a value that successfully loaded, but is
   older than the source's configured staleness threshold -- distinct
   from vibe-card-error (which means "failed to load at all"). */
.vibe-card .vibe-card-stale {
  display: none;
  color: #9a6400;
  font-size: 0.8em;
  margin-top: 4px;
}
.vibe-card .vibe-card-stale::before {
  content: "\26A0 ";
}

#vibe-page-loading {
  text-align: center;
  color: #555;
  padding: 40px 0;
}

#vibe-page-error {
  display: none;
  max-width: 700px;
  margin: 24px auto;
  background: #f8d7da;
  color: #58151c;
  border: 1px solid #f1aeb5;
  border-radius: 6px;
  padding: 14px;
  text-align: center;
}

.vibe-attribution {
  max-width: 700px;
  margin: 32px auto 0;
  text-align: center;
  font-size: 0.85em;
  color: #777;
}
.vibe-attribution a {
  color: #0b5f8a;
}
