/**
 * Development work by David Lane
 */
/**
 * Genealogy source file.
 * Author: Levi Lane.
 * Heritage tokens: /shared/design-tokens.css (--lf-*, --lf-gold, --lf-surface-dark)
 */
.lane-trading-cards-page {
  background: linear-gradient(
    180deg,
    var(--lf-surface-dark) 0%,
    color-mix(in srgb, var(--lf-ink) 92%, black) 45%,
    color-mix(in srgb, var(--lf-surface-dark) 88%, var(--lf-accent)) 100%
  );
  color: var(--lf-ink-on-dark);
  min-height: 100vh;
  font-family: var(--lf-sans);
}

.ltc-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0.9rem 2rem;
}

.ltc-hero {
  border: 1px solid var(--lf-gold-muted);
  border-radius: 14px;
  background: color-mix(in srgb, var(--lf-surface-dark) 88%, transparent);
  padding: 1rem;
}

.ltc-kicker {
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--lf-gold);
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
}

.ltc-title {
  margin-bottom: 0.45rem;
}

.ltc-lede {
  color: var(--lf-muted-on-dark);
  margin-bottom: 0.5rem;
}

.ltc-toolbar {
  margin-top: 1rem;
  background: var(--lf-bg-elevated);
  color: var(--lf-ink);
  border: 1px solid var(--lf-line);
}

.ltc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ltc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.ltc-card {
  border: 1px solid var(--lf-gold-muted);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(26, 31, 44, 0.98) 0%, rgba(18, 23, 34, 0.96) 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

.ltc-card--clickable {
  cursor: pointer;
}

.ltc-card--clickable:focus-visible {
  outline: 2px solid rgba(233, 214, 160, 0.92);
  outline-offset: 2px;
}

.ltc-card-face {
  margin: 0.7rem 0.7rem 0;
  aspect-ratio: 2.5 / 3.5;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--lf-gold) 45%, transparent);
  background: linear-gradient(145deg, #111722 0%, #1c2435 100%);
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(248, 228, 168, 0.18);
}

.ltc-card-art {
  flex: 1;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(243, 223, 166, 0.2);
  background: radial-gradient(circle at 20% 15%, #2b3348 0%, #171d2b 62%, #141926 100%);
}

.ltc-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.ltc-card-cover {
  position: absolute;
  inset: 0;
  display: none;
  padding: 0.7rem;
  background:
    linear-gradient(160deg, rgba(223, 192, 118, 0.14) 0%, rgba(27, 34, 50, 0.14) 100%),
    radial-gradient(circle at 18% 10%, rgba(244, 228, 178, 0.1) 0%, rgba(17, 23, 35, 0.92) 66%);
}

.ltc-card-cover-kicker {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--lf-gold);
}

.ltc-card-cover-title {
  margin-top: 0.35rem;
  font-size: 1.02rem;
  line-height: 1.2;
  font-weight: 700;
  color: #f1f2f6;
}

.ltc-card-cover-dates {
  margin-top: 0.45rem;
  color: #d7dbea;
  font-size: 0.76rem;
}

.ltc-card-cover-meta {
  margin-top: 0.42rem;
  color: #bdc5d9;
  font-size: 0.68rem;
}

.ltc-card-face--cover .ltc-card-cover {
  display: block;
}

.ltc-card-face--cover .ltc-card-image {
  display: none;
}

.ltc-card-face--default-cover .ltc-card-cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.2rem;
  background:
    linear-gradient(180deg, rgba(11, 15, 24, 0) 36%, rgba(11, 15, 24, 0.58) 66%, rgba(11, 15, 24, 0.88) 100%),
    linear-gradient(145deg, rgba(223, 192, 118, 0.1) 0%, rgba(28, 36, 53, 0.22) 100%);
}

.ltc-card-face--default-cover .ltc-card-image {
  object-fit: contain;
  object-position: top center;
}

.ltc-card-face--default-cover .ltc-card-cover-title,
.ltc-card-face--default-cover .ltc-card-cover-dates,
.ltc-card-face--default-cover .ltc-card-cover-meta {
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.65);
}

.ltc-card-footer {
  margin-top: 0.35rem;
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
}

.ltc-card-footer-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #f2f3f8;
  line-height: 1.2;
}

.ltc-card-footer-dates {
  font-size: 0.65rem;
  color: #ced4e3;
  margin-top: 0.2rem;
}

.ltc-card-qr {
  width: 62px;
  height: 62px;
  border: 1px solid rgba(242, 233, 209, 0.4);
  border-radius: 6px;
  background: #f7f8fb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ltc-card-qr img {
  display: block;
  border-radius: 2px;
}

.ltc-card-qr-slot {
  display: block;
}

.ltc-card--qr-off .ltc-card-qr {
  visibility: hidden;
}

.ltc-card-body {
  padding: 0.75rem;
}

.ltc-card-meta {
  color: #b5bac8;
  font-size: 0.8rem;
}

.ltc-card-summary {
  color: #d8dce7;
  font-size: 0.88rem;
  margin: 0.45rem 0;
}

.ltc-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ltc-tag {
  border: 1px solid rgba(200, 171, 87, 0.45);
  border-radius: 999px;
  color: var(--lf-gold);
  font-size: 0.72rem;
  padding: 0.08rem 0.45rem;
}

.ltc-export-mount {
  position: fixed;
  left: -200vw;
  top: 0;
  width: 920px;
}

.ltc-export-single,
.ltc-export-sheet,
.ltc-export-catalog {
  background: #ffffff;
  color: #111;
  padding: 16px;
}

.ltc-export-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ltc-export-tile {
  border: 1px solid #222;
  min-height: 288px;
  padding: 8px;
}

.ltc-card-face--export {
  margin: 0;
  border-color: #272727;
  background: linear-gradient(145deg, #0f1320 0%, #1d2536 100%);
}

.ltc-card-face--export .ltc-card-footer {
  min-height: 56px;
}

.ltc-card-face--compact .ltc-card-cover-title {
  font-size: 0.84rem;
}

.ltc-card-face--compact .ltc-card-cover-dates,
.ltc-card-face--compact .ltc-card-cover-meta {
  font-size: 0.62rem;
}

.ltc-card-face--compact .ltc-card-footer-title {
  font-size: 0.62rem;
}

.ltc-card-face--compact .ltc-card-footer-dates {
  font-size: 0.56rem;
}

.ltc-card-face--compact .ltc-card-qr {
  width: 44px;
  height: 44px;
}

.ltc-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Keep detail modal readable on light modal surfaces. */
#ltcDetailModal .modal-content,
#ltcDetailModal .modal-header,
#ltcDetailModal .modal-body,
#ltcDetailModal .modal-footer {
  background-color: #ffffff;
  color: #1a1f2b;
}

#ltcDetailModal .modal-title,
#ltcDetailModal h1,
#ltcDetailModal h2,
#ltcDetailModal h3,
#ltcDetailModal h4,
#ltcDetailModal h5,
#ltcDetailModal h6,
#ltcDetailModal p,
#ltcDetailModal li,
#ltcDetailModal strong,
#ltcDetailModal label {
  color: #1a1f2b;
}

#ltcDetailModal .text-muted {
  color: #5b6475 !important;
}

#ltcDetailModal a {
  color: #0d57c9;
}

#ltcDetailModal a:hover {
  color: #0a46a3;
}

#ltcDetailModal .history-context-evidence-note {
  color: #2b3345;
}

@media (max-width: 768px) {
  .ltc-actions .btn {
    width: 100%;
  }
}

/* Catalog key — archival tier definitions */
.ltc-catalog-key {
  margin-top: 0.75rem;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 10px;
  background: rgba(12, 15, 22, 0.55);
}

.ltc-catalog-key__summary {
  cursor: pointer;
  padding: 0.55rem 0.75rem;
  color: #d4c48a;
  font-size: 0.88rem;
}

.ltc-catalog-key__body {
  padding: 0 0.75rem 0.75rem;
}

.ltc-catalog-key__list {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0;
  font-size: 0.82rem;
}

.ltc-catalog-key__term {
  margin: 0;
  color: #e9d6a0;
  font-weight: 600;
}

.ltc-catalog-key__def {
  margin: 0;
  color: #c5cad6;
}

/* Tier + kind pills */
.ltc-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}

.ltc-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.ltc-pill--tier {
  background: rgba(28, 34, 48, 0.92);
  color: #d8dce8;
  border-color: rgba(180, 188, 205, 0.35);
}

.ltc-tier--notable {
  border-color: rgba(168, 178, 198, 0.45);
  color: #dbe2ef;
}

.ltc-tier--rare {
  border-color: rgba(176, 152, 98, 0.55);
  color: #e8d4a8;
  background: rgba(42, 36, 22, 0.55);
}

.ltc-tier--legendary {
  border-color: rgba(212, 175, 55, 0.65);
  color: #f0dfaa;
  background: rgba(48, 40, 18, 0.62);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.18);
}

.ltc-pill--kind {
  background: rgba(24, 30, 42, 0.88);
  color: #c8d0df;
  border-color: rgba(140, 152, 172, 0.4);
}

.ltc-kind--artifact {
  border-color: rgba(148, 132, 98, 0.55);
  color: #e6dcc4;
}

.ltc-kind--event {
  border-color: rgba(118, 138, 168, 0.55);
  color: #d4e0f0;
}

.ltc-kind--person {
  border-color: rgba(160, 168, 188, 0.4);
  color: #c8cedc;
}

.ltc-card-kind-ribbon {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 2;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(12, 15, 22, 0.78);
  border: 1px solid rgba(180, 188, 205, 0.35);
  color: #e8ebf2;
}

.ltc-card-tier-badge {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 2;
  border-radius: 999px;
  padding: 0.14rem 0.42rem;
  font-size: 0.56rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(12, 15, 22, 0.82);
  border: 1px solid rgba(180, 188, 205, 0.35);
  color: #d8dce8;
}

.ltc-card-tier-badge.ltc-tier--legendary {
  border-color: rgba(212, 175, 55, 0.65);
  color: #f0dfaa;
}

.ltc-card--artifact .ltc-card-face {
  box-shadow: inset 0 0 0 2px rgba(168, 148, 102, 0.35);
}

.ltc-card--event .ltc-card-art::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 2;
  background: linear-gradient(90deg, rgba(118, 138, 168, 0.85), rgba(168, 178, 198, 0.45));
}

.ltc-card--legendary {
  border-color: rgba(212, 175, 55, 0.48);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26), inset 0 0 0 1px rgba(212, 175, 55, 0.12);
}

/* Timeline view */
.ltc-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 12px;
  background: rgba(17, 21, 30, 0.72);
  padding: 0.75rem 0.85rem;
}

.ltc-timeline-row {
  display: grid;
  grid-template-columns: 18px 72px 1fr;
  gap: 0.65rem 0.85rem;
  align-items: start;
  padding: 0.65rem 0.35rem;
  border-bottom: 1px solid rgba(180, 188, 205, 0.12);
}

.ltc-timeline-row:last-child {
  border-bottom: 0;
}

.ltc-timeline-track {
  position: relative;
  align-self: stretch;
  border-left: 2px solid rgba(212, 175, 55, 0.35);
  margin-left: 7px;
}

.ltc-timeline-dot {
  position: absolute;
  left: -5px;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4af37;
  box-shadow: 0 0 0 2px rgba(17, 21, 30, 0.95);
}

.ltc-timeline-year {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #e9d6a0;
  font-size: 0.92rem;
  line-height: 1.35;
}

.ltc-timeline-label {
  color: #e8e9ef;
  font-size: 0.95rem;
  line-height: 1.35;
}

.ltc-timeline-note {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #aab0bf;
}

.ltc-timeline-row--clickable {
  cursor: pointer;
  border-radius: 8px;
}

.ltc-timeline-row--clickable:hover,
.ltc-timeline-row--clickable:focus-visible {
  background: rgba(212, 175, 55, 0.08);
  outline: none;
}

.ltc-timeline-row--clickable:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(233, 214, 160, 0.55);
}
