/* ============================================================================
   Orbit Axis — Reading history
   ----------------------------------------------------------------------------
   Every daily reading Orbit Axis has written for you, newest first, each one a
   disclosure that opens in place. The week strip on Today opens straight into
   one of these, so an entry has to be identifiable by its date at a glance.
   ========================================================================== */

.history-controls {
  display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap;
}
.history-controls label {
  color: var(--color-muted);
  font-size: var(--type-caption);
  letter-spacing: var(--track-caption);
}
/* A scope picker is a compact control, not a form field. Full-width it read as
   an empty text box someone was supposed to fill in. */
.history-controls select {
  width: auto;
  min-width: 12rem;
  max-width: 100%;
  border-radius: var(--radius-pill);
  background-color: var(--color-surface-ghost);
  border-color: transparent;
  font-size: var(--type-caption);
  min-height: 44px;
  padding: var(--space-xs) var(--space-xl) var(--space-xs) var(--space-md);
}

.history-list { display: grid; gap: var(--space-sm); }

.history-entry {
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.history-entry > summary {
  cursor: pointer; list-style: none;
  padding: var(--space-md); display: grid; gap: var(--space-xxs);
  min-height: 44px;
}
.history-entry > summary::-webkit-details-marker { display: none; }
.history-entry > summary:focus-visible { box-shadow: var(--focus-ring); }
.history-entry__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-sm); flex-wrap: wrap;
}
.history-entry__date {
  font-family: var(--font-display);
  font-size: var(--type-body);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--track-body);
  color: var(--color-primary);
}
.history-entry__chart { font-size: var(--type-caption); color: var(--color-muted); }
.history-entry__chips { display: flex; gap: var(--space-xs); align-items: center; flex-wrap: wrap; }
.history-entry__num {
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-semibold);
  color: var(--color-secondary);
  background: var(--color-surface-ghost);
  border-radius: var(--radius-xs);
  padding: 3px var(--space-xs);
  font-size: var(--type-caption);
}
/* The swatch IS the lucky colour, so its border cannot be the colour too — it
   is the only thing separating a pale swatch from a light card. */
.history-entry__swatch {
  width: 18px; height: 18px; border-radius: var(--radius-xs);
  border: var(--border-width) solid var(--color-border-strong);
}
.history-entry__mood { color: var(--color-secondary); font-size: var(--type-caption); }
.history-entry__love { color: var(--color-muted); font-size: var(--type-caption); }

.history-entry__detail {
  padding: 0 var(--space-md) var(--space-md);
  display: grid; gap: var(--space-sm);
  border-top: var(--border-width) solid var(--color-border);
  padding-top: var(--space-md);
}
.history-detail-row { display: grid; gap: 2px; }
.history-detail-row .lbl {
  font-size: var(--type-fine);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--color-muted);
}
.history-detail-row .val {
  font-size: var(--type-body);
  letter-spacing: var(--track-body);
  color: var(--color-primary);
  line-height: var(--lead-body);
}

/* Empty state — soft, and with no streak pressure. Coming back tomorrow is an
   invitation here, not a scoreboard. */
.history-empty {
  display: grid; justify-items: center; text-align: center;
  gap: var(--space-md); padding: var(--space-xxl) var(--space-lg);
}
.history-empty__art { position: relative; width: 120px; height: 120px; }
.history-empty h2 {
  font-size: var(--type-tagline);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--track-display);
  color: var(--color-primary);
}
.history-empty p {
  color: var(--color-muted);
  font-size: var(--type-caption);
  letter-spacing: var(--track-caption);
  max-width: 40ch;
  line-height: var(--lead-body);
}

@media (forced-colors: active) {
  .history-entry { border: 1px solid CanvasText; }
}
