/* The Ryker View timeline challenge. Uses the site tokens from /assets/site.css; phase colors mark seals, trumpets,
   bowls, the millennium and eternity, and green or red marks a card placed right or wrong. */
.tl {
  --tl-pre: #8a9aa9;
  --tl-seal: var(--dawn);
  --tl-trum: var(--sky);
  --tl-bowl: #b5472f;
  --tl-mill: var(--sky-ink);
  --tl-eter: #d9a43a;
  --tl-ok: #23703f;
  --tl-ok-bg: #e7f4eb;
  --tl-bad: #b3261e;
  --tl-bad-bg: #fdecea;
  display: grid;
  gap: 22px;
}
.tl-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.tl-score {
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
}
.tl-score b {
  font: 800 30px/1 var(--display);
  color: var(--ink);
}
.tl-score span {
  color: var(--muted);
}
.tl-meter {
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  width: min(260px, 60vw);
  align-self: center;
}
.tl-meter i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--tl-ok);
  transition: width 0.3s;
}
.tl-ledger {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--white);
  -webkit-overflow-scrolling: touch;
}
.tl-phases,
.tl-track {
  display: grid;
  grid-template-columns: repeat(15, 150px);
  width: max-content;
}
.tl-phases {
  font: 700 14px/1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.tl-phases div {
  padding: 9px 12px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.tl-phases div:last-child,
.tl-zone:last-child {
  border-right: 0;
}
.tl-zone {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  min-height: 330px;
  background: var(--white);
  transition: background 0.15s;
}
.tl-zone.hot {
  background: var(--sky-wash);
}
.tl-zone.target {
  box-shadow: inset 0 0 0 2px var(--sky);
}
.tl-zh {
  padding: 10px 12px 8px;
  border-top: 5px solid var(--phase);
  background: var(--paper);
  display: grid;
  gap: 3px;
  min-height: 82px;
  align-content: start;
}
.tl-day {
  font: 800 21px/1.05 var(--display);
  color: var(--ink);
}
.tl-sub {
  font-size: 13.5px;
  line-height: 1.25;
  color: var(--muted);
}
.tl-drop {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tl-drop:empty::after {
  content: 'Drop here';
  font-size: 13px;
  color: var(--muted);
  opacity: 0.7;
  text-align: center;
  margin-top: 18px;
}
.tl-card {
  font: 600 15px/1.25 var(--ui);
  text-align: left;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--dawn);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  display: grid;
  gap: 2px;
}
.tl-card small {
  font-weight: 400;
  font-size: 12.5px;
  color: var(--muted);
}
.tl-card.sel {
  box-shadow: 0 0 0 3px var(--sky);
}
.tl-card.ok {
  border-left-color: var(--tl-ok);
  background: var(--tl-ok-bg);
}
.tl-card.bad {
  border-left-color: var(--tl-bad);
  background: var(--tl-bad-bg);
}
.tl-mark {
  font: 700 12px/1.2 var(--ui);
  letter-spacing: 0.04em;
}
.tl-card.ok .tl-mark {
  color: var(--tl-ok);
}
.tl-card.bad .tl-mark {
  color: var(--tl-bad);
}
.tl-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 60;
  opacity: 0.94;
  transform: rotate(-1.5deg);
  box-shadow: 0 10px 28px rgba(11, 26, 42, 0.28);
  max-width: 230px;
}
.tl-feedback {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--white);
  padding: 18px 20px;
  display: grid;
  gap: 8px;
}
.tl-feedback[data-state='ok'] {
  border-color: var(--tl-ok);
}
.tl-feedback[data-state='bad'] {
  border-color: var(--tl-bad);
}
.tl-fb-k {
  font: 700 13px/1.2 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tl-feedback[data-state='ok'] .tl-fb-k {
  color: var(--tl-ok);
}
.tl-feedback[data-state='bad'] .tl-fb-k {
  color: var(--tl-bad);
}
.tl-fb-t {
  font: 800 26px/1.1 var(--display);
  margin: 0;
  color: var(--ink);
}
.tl-fb-r {
  margin: 0;
  max-width: 70ch;
  font-family: var(--read);
  font-size: 17px;
}
.tl-fb-v {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.tl-fb-v b {
  color: var(--ink);
}
.tl-fb-a {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tl-tray-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.tl-tray-head .muted {
  margin: 0;
}
.tl-tray {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  min-height: 64px;
  background: var(--white);
}
.tl-tray:empty::after {
  content: 'Every card is on the timeline.';
  color: var(--muted);
}
@media (max-width: 560px) {
  .tl-zone {
    min-height: 260px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tl-zone,
  .tl-meter i {
    transition: none;
  }
}
body.tl-dragging,
body.tl-dragging * {
  user-select: none;
  cursor: grabbing;
}
