/* ── Insights page ──────────────────────────────────────────────────────
   Chrome (surfaces/ink) matches the check-in app's warm cream palette.
   Data marks use a validated categorical set (see dataviz skill) for the
   4-phase bar, and the brand ink color for single-series charts. */

:root {
  --phase-menstrual: #e34948;
  --phase-follicular: #eda100;
  --phase-ovulatory: #1baf7a;
  --phase-luteal: #4a3aa7;
  --chart-mark: var(--ink);
  --chart-mark-muted: #c9bfb2;
  --chart-grid: #e7ddd0;
}

.insights-frame { overflow-y: auto; }

.insights-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 20px 40px;
}

/* Loading / empty states */
.ins-loading, .ins-empty {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 24px;
}
.ins-loading-text, .ins-empty-text {
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 260px;
}
.ins-empty-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  margin: 0;
}
.ins-empty-cta {
  margin-top: 8px;
  display: inline-block;
  background: var(--dark);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-pill);
  padding: 13px 28px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
}

/* Cards */
.ins-card {
  background: var(--card);
  border: 1px solid rgba(38,34,32,0.08);
  border-radius: 22px;
  padding: 20px 20px 22px;
  margin: 14px 0;
}
.ins-card-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 4px;
}

/* Hero */
.ins-hero-day {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 52px;
  line-height: 1;
  margin: 2px 0 2px;
  color: var(--ink);
}
.ins-hero-phase {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 10px;
}
.ins-hero-desc {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 20px;
  line-height: 1.5;
}

/* Phase bar */
.phase-bar-track {
  position: relative;
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--track);
}
.phase-seg { height: 100%; }
.phase-marker {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--ink);
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.phase-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 11px;
  gap: 4px;
}
.phase-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.phase-legend-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.phase-legend-item.active {
  color: var(--ink);
  font-weight: 700;
}

/* Focus / tips list */
.tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tips-list li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}
.tips-list li .tip-mark {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  margin-top: 7px;
}

/* Stat tiles */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.stat-tile {
  background: var(--card);
  border: 1px solid rgba(38,34,32,0.08);
  border-radius: 18px;
  padding: 14px 12px;
  text-align: center;
}
.stat-value {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
}
.stat-label {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 3px;
  line-height: 1.3;
}

/* Metric tabs */
.metric-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.metric-tabs::-webkit-scrollbar { display: none; }
.metric-tab {
  flex: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: 1.5px solid rgba(38,34,32,0.18);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  cursor: pointer;
}
.metric-tab.active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

/* Line chart */
.chart-wrap {
  position: relative;
  width: 100%;
}
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-empty-note {
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  padding: 30px 10px;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--dark);
  color: #fff;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.35;
  padding: 6px 10px;
  border-radius: 10px;
  white-space: nowrap;
  transform: translate(-50%, -120%);
  opacity: 0;
  transition: opacity .1s ease;
  z-index: 5;
}
.chart-tooltip.show { opacity: 1; }

/* Symptom bars */
.symptom-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.symptom-row {
  display: grid;
  grid-template-columns: 92px 1fr 26px;
  align-items: center;
  gap: 8px;
}
.symptom-name {
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.symptom-track {
  background: var(--track);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.symptom-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
}
.symptom-count {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: right;
}

.ins-disclaimer {
  font-size: 11.5px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.5;
  margin: 24px 6px 4px;
}
