/* ─── cards (HUD record list) ──────────────────────────────────────── */

.card-list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }

.card {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: opacity 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
/* card corner ticks — smaller than panel ticks */
.card::before, .card::after,
.card > .tick-tr, .card > .tick-bl {
  content: ""; position: absolute; width: 8px; height: 8px; pointer-events: none;
}
.card::before { top: -1px; left: -1px;  border-top: 1px solid var(--metal-3); border-left: 1px solid var(--metal-3); }
.card::after  { bottom: -1px; right: -1px; border-bottom: 1px solid var(--metal-3); border-right: 1px solid var(--metal-3); }
.card > .tick-tr { top: -1px; right: -1px; border-top: 1px solid var(--metal-3); border-right: 1px solid var(--metal-3); }
.card > .tick-bl { bottom: -1px; left: -1px; border-bottom: 1px solid var(--metal-3); border-left: 1px solid var(--metal-3); }

.card:hover { border-color: var(--cyan-dim); }
.card-info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.card-name {
  font-weight: 500; font-size: 0.95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.card-desc { font-size: 0.82rem; color: var(--muted); }
.card-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.card > turbo-frame { display: contents; }
.card[hidden] { display: none; }

/* state modifiers (no green — completion shown via opacity + cyan accent) */
.card.card-ticked {
  opacity: 0.5;
  background: linear-gradient(180deg, #fff, var(--surface-2));
}
.card.card-attention {
  border-left: 3px solid var(--red);
  border-radius: 4px 4px 4px 0;
}
.card.card-muted .card-name { color: var(--muted); }
.due-date.overdue { color: var(--red); }

/* Compact card variant — single-row layout (time · name · recorded).
   Used on the day-view routine list to fit more rows on screen. */
.card.card-compact {
  padding: 0.45rem 0.9rem;
}
.card.card-compact .card-name {
  display: flex; align-items: baseline; gap: 0.85rem;
  white-space: normal; overflow: visible;
  font-weight: 500;
}
.card.card-compact .rt-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 400;
  flex: 0 0 auto;
  min-width: 4.8em;
}
.card.card-compact .rt-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card.card-compact .rt-recorded {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 400;
  flex: 0 0 auto;
}
.card.card-compact .rt-recorded-abbr { display: none; }

/* Routine action buttons — text label on desktop, icon on mobile.
   Scoped to .card-compact so other pages keep their existing labels. */
.card.card-compact .btn-icon { display: none; }
.card.card-compact .btn-icon svg { width: 14px; height: 14px; stroke-width: 2; vertical-align: middle; }
.card.card-compact .btn-complete,
.card.card-compact .btn-skip { min-width: 40px; }
@media (min-width: 769px) {
  /* Desktop: equalize the action buttons so Log/Done/Skip
     all read as the same-width slot regardless of label length. */
  .card.card-compact .btn-complete,
  .card.card-compact .btn-skip { min-width: 4.5rem; }
}

@media (max-width: 768px) {
  /* Routine cards: short "never" / "5d" replaces full record label;
     action buttons switch from text to lucide icon. */
  .card.card-compact .rt-recorded-full { display: none; }
  .card.card-compact .rt-recorded-abbr { display: inline; }
  .card.card-compact .btn-label { display: none; }
  .card.card-compact .btn-icon { display: inline-flex; align-items: center; }
}

/* notifications prompt — uses .card.notifications-prompt */
.notifications-prompt {
  display: block;
  padding: 0.95rem 1.1rem;
}
.notifications-prompt h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.notifications-prompt p { margin: 0 0 0.75rem; color: var(--ink-2); font-size: 0.9rem; }
.notifications-prompt p:last-of-type { margin-bottom: 0; }
