/* ==========================================================
   Time Cards page (cards.html)
   Swipe carousel on phones, tilted grid from 700px.
   Shared header, tokens and utilities live in base.css.
   ========================================================== */

.page-header .hint,
.page-header .swipe-hint {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-red);
}

.page-header .hint {
  display: none;
}

/* ==========================================================
   CARDS — mobile: swipe carousel
   ========================================================== */
.timeline {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 24px;
  padding: 16px 24px 32px;
  scrollbar-width: none;
}

.timeline::-webkit-scrollbar {
  display: none;
}

/* Each card is a real button, so it works with a keyboard */
.entry {
  position: relative;
  flex: 0 0 85%;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background-color: var(--color-manila);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 30px 20px 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.entry,
.entry:hover {
  color: var(--color-ink);
  text-decoration: none;
}

.entry:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 4px;
}

/* the slot hole for the time clock rack */
.entry::before {
  content: '';
  position: absolute;
  top: 10px;
  left: calc(50% - 22px);
  width: 44px;
  height: 8px;
  border-radius: 999px;
  background-color: var(--color-slot);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid var(--color-rule);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.card-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.card-no {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-red);
}

.field {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}

.field-label {
  flex: 0 0 76px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-ink-faded);
}

.field-value {
  flex: 1;
  border-bottom: 1px solid var(--color-line);
  padding-bottom: 2px;
  font-weight: 700;
}

.punches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--color-rule);
  margin: 6px 0;
}

.punch {
  padding: 8px;
  text-align: center;
}

.punch + .punch {
  border-left: 2px solid var(--color-rule);
}

.punch-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-ink-faded);
  border-bottom: 1px solid var(--color-line);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.punch-time {
  font-weight: 700;
  color: var(--color-red);
}

.punch:last-child .punch-time {
  color: var(--color-blue);
}

.notes {
  flex-grow: 1;
  font-size: 14px;
  line-height: 24px;
  color: #3b372d;
  background-image: repeating-linear-gradient(to bottom, transparent 0 23px, #d9c99c 23px 24px);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.card-duration {
  font-size: 12px;
  color: var(--color-ink-faded);
}

.play-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-blue);
  border: 2px solid var(--color-blue);
  border-radius: 3px;
  padding: 3px 9px;
}

.entry.current .play-badge {
  color: var(--color-green);
  border-color: var(--color-green);
}

/* Visitors who ask their device for less motion get a still picture */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================
   TABLET AND DESKTOP (700px+)
   ========================================================== */
@media (min-width: 700px) {
  .page-header {
    margin: 32px auto 24px;
  }
  .page-header h1 {
    font-size: 32px;
  }
  .page-header .swipe-hint {
    display: none;
  }
  .page-header .hint {
    display: block;
  }

  .timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
    overflow-x: visible;
    scroll-snap-type: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 16px 24px 48px;
  }

  .entry:nth-child(odd) {
    transform: rotate(-0.8deg);
  }
  .entry:nth-child(even) {
    transform: rotate(0.8deg);
  }

  .entry:hover {
    transform: rotate(0deg) translateY(-6px);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
  }
}
