/* ---------- Dashboard: liquid glass over the family hero ---------- */

/* The homepage hero photo, held still behind the glass.
   This must live on <html>, not <body>: style.css paints <html> cream, which
   blocks the usual body-background-to-canvas propagation and leaves bare gaps. */
html { background: #181c13; }

body.dash-page { background: transparent; }

/* A fixed layer rather than `background-attachment: fixed`, which tears
   against the sticky header while scrolling. */
body.dash-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(24,28,19,0.32) 0%, rgba(24,28,19,0.76) 60%, rgba(16,19,12,0.92) 100%),
    url('img/hero.jpg') center center / cover no-repeat;
}

.dash-body {
  position: relative;
  min-height: 100vh;
}

.dash-body header {
  background: rgba(24, 28, 19, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(232, 187, 119, 0.18);
}

.dash-body .brand { color: #f6f0e4; }
.dash-body nav a { color: #f6f0e4; }
.dash-body nav a:hover,
.dash-body nav a.active { color: #e8bb77; }

.dash-body footer {
  background: transparent;
  border-top: 1px solid rgba(246, 240, 228, 0.14);
  color: rgba(246, 240, 228, 0.6);
}

.dash-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 90px;
}

.dash-head h1 {
  color: #f6f0e4;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  margin: 0 0 8px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
}

.dash-head p {
  margin: 0 0 34px;
  color: rgba(246, 240, 228, 0.72);
  font-size: 0.98rem;
}

.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 26px;
}

/* ---------- The glass pill ---------- */
.pill {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 26px 28px 24px;
  background: linear-gradient(155deg, rgba(246,240,228,0.16) 0%, rgba(246,240,228,0.06) 45%, rgba(24,28,19,0.22) 100%);
  border: 1px solid rgba(246, 240, 228, 0.22);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  color: #f6f0e4;
}

/* specular highlight sweep */
.pill::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -20%;
  width: 90%;
  height: 150%;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.05) 38%, rgba(255,255,255,0) 62%);
  transform: rotate(-8deg);
}

.pill-wide { grid-column: 1 / -1; }

.pill-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.pill-eyebrow {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: #e8bb77;
  margin-bottom: 7px;
}

.pill h2 {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 600;
  color: #f6f0e4;
  letter-spacing: 0.3px;
}

.pill-action {
  flex: none;
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #f6f0e4;
  padding: 9px 16px;
  border-radius: 100px;
  cursor: pointer;
  background: rgba(246, 240, 228, 0.10);
  border: 1px solid rgba(246, 240, 228, 0.32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pill-action:hover {
  background: rgba(232, 187, 119, 0.20);
  border-color: rgba(232, 187, 119, 0.6);
  color: #e8bb77;
}

.chart-host {
  position: relative;
  width: 100%;
}

.chart-host svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Legend ---------- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 14px;
  padding-top: 15px;
  border-top: 1px solid rgba(246, 240, 228, 0.16);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  color: rgba(246, 240, 228, 0.86);
}

.legend-swatch {
  width: 26px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

/* ---------- Notes ---------- */
.pill-notes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.note {
  border-radius: 16px;
  padding: 15px 17px;
  background: rgba(246, 240, 228, 0.07);
  border: 1px solid rgba(246, 240, 228, 0.16);
}

.note h3 {
  margin: 0 0 6px;
  font-size: 0.74rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 700;
}

.note p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(246, 240, 228, 0.78);
}

.note-cool { border-color: rgba(93, 209, 184, 0.34); }
.note-cool h3 { color: #7fdcc6; }
.note-warm { border-color: rgba(232, 143, 90, 0.34); }
.note-warm h3 { color: #f0a878; }

@media (max-width: 640px) {
  .dash-wrap { padding: 36px 16px 70px; }
  .pill { padding: 20px 18px 20px; border-radius: 20px; }
  .pill-top { flex-direction: column; }
  .dash-body header { padding: 16px 20px; }
  .dash-body nav { gap: 18px; }
}
