/* Signed-in home: the Today screen. The day grid and tray come from
   timeline.css; this file lays them out next to the in-progress, habits and
   check-in cards. The marketing landing page for guests lives in landing.css. */

.homepage {
  flex: 1 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header and quick add -------------------------------------------- */

.today-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.today-summary strong {
  color: var(--ink);
}

.today-quick-add {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.today-quick-add input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.95rem;
}

.today-quick-add input[type="text"]:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: var(--ring);
}

/* ---------- Layout ------------------------------------------------------------- */

.today-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.today-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* The tray scrolls with the other side cards instead of sticking. */
.today-side .timeline-tray {
  position: static;
}

.today-card {
  padding: 16px;
}

.today-card .card-header {
  margin-bottom: 10px;
}

.today-empty {
  color: var(--faint);
  font-size: 0.85rem;
}

.today-wip-note {
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--indigo-wash);
  font-size: 0.78rem;
}

/* ---------- Task and habit lists --------------------------------------------- */

.today-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.today-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.today-item:last-child {
  border-bottom: none;
}

.today-item-toggle {
  display: inline-flex;
  flex: none;
  margin: 2px 0 0;
}

.today-item-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.today-item-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-item-title:hover {
  color: var(--indigo);
}

.today-item.completed .today-item-title {
  color: var(--muted);
  text-decoration: line-through;
}

.today-item-meta {
  color: var(--faint);
  font-size: 0.75rem;
}

.today-habits .today-item-title:hover {
  color: var(--teal-ink);
}

/* ---------- Check-in ------------------------------------------------------------ */

.today-checkin.checkin-nudge {
  border-color: var(--teal);
  box-shadow: var(--ring);
}

.today-checkin-status {
  margin-bottom: 12px;
  color: var(--body);
  font-size: 0.88rem;
}

.today-checkin.checkin-done .today-checkin-status {
  margin-bottom: 0;
}

.today-checkin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.emoji-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.emoji-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.emoji-btn-icon {
  font-size: 1.7rem;
  line-height: 1;
  transition: transform 0.2s var(--ease-out);
}

.emoji-btn-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.emoji-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.emoji-btn:hover .emoji-btn-icon {
  transform: scale(1.12);
}

.emoji-btn.is-selected {
  border-color: var(--teal);
  background: var(--teal-wash);
  box-shadow: var(--ring);
}

.emoji-btn.is-selected .emoji-btn-label {
  color: var(--teal-ink);
  font-weight: 700;
}

.emoji-picker-compact {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.emoji-picker-compact .emoji-btn {
  padding: 6px 0;
}

.emoji-picker-compact .emoji-btn-icon {
  font-size: 1.25rem;
}

.quick-log-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.quick-log-hint.is-warning {
  color: var(--danger-ink);
  font-weight: 600;
}

@media (max-width: 900px) {
  .today-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .today-quick-add {
    flex-wrap: wrap;
  }

  .today-quick-add input[type="text"] {
    flex-basis: 100%;
  }
}

/* "Get started" checklist on Today, for new accounts. */

.onboarding-card {
  margin-bottom: 20px;
}

.onboarding-progress {
  color: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
}

.onboarding-steps {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  list-style: none;
}

.onboarding-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--body);
  line-height: 1.5;
}

.onboarding-steps strong {
  color: var(--ink);
}

.onboarding-steps li.done strong {
  text-decoration: line-through;
  color: var(--body);
}

.onboarding-check {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.onboarding-steps li.done .onboarding-check {
  border-color: var(--teal-deep);
  background: var(--teal-deep);
}

.onboarding-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
