/* steps — numbered process steps + status variants */

/* ── Numbered Steps (.tl-steps)
   Usage: <steps>…</steps> → <div class="tl-steps">
── */

article .tl-steps {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

article .tl-step {
  display: flex;
  gap: 1.125rem;
  padding-bottom: 1.75rem;
  position: relative;
}

article .tl-step:last-child {
  padding-bottom: 0;
}

article .tl-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1.875rem / 2 - 1px);
  top: 1.875rem;
  bottom: 0;
  width: 2px;
  background: var(--color-neutral-200);
}

article .tl-step-badge {
  flex-shrink: 0;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-top: 0.0625rem;
}

article .tl-step-content {
  flex: 1;
}

article .tl-step.is-active .tl-step-badge {
  background: var(--color-accent);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--color-accent);
}

article .tl-step.is-active .tl-step-title {
  color: var(--color-accent);
}

article .tl-step-desc p {
  margin: 0 0 0.5rem;
}

article .tl-step-desc p:last-child {
  margin-bottom: 0;
}

article .tl-step-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

article .tl-step-desc {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.55;
  margin: 0;
}

/* ── Numbered Steps colored (.tl-steps--colored / .tl-steps-h--colored)
   --step-color injected per step by renderer
── */

article .tl-steps--colored .tl-step-badge {
  background: var(--step-color, var(--color-primary));
}

article .tl-steps--colored .tl-step.is-active .tl-step-badge {
  background: var(--step-color, var(--color-accent));
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--step-color, var(--color-accent));
}

article .tl-steps--colored .tl-step.is-active .tl-step-title {
  color: var(--step-color, var(--color-accent));
}

article .tl-steps--colored .tl-step:not(:last-child)::after {
  background: var(--step-color, var(--color-neutral-200));
  opacity: 0.35;
}

article .tl-steps-h--colored .tl-steps-item-h .tl-step-badge {
  background: var(--step-color, var(--color-primary));
}

article .tl-steps-h--colored .tl-steps-item-h.is-active .tl-step-badge {
  background: var(--step-color, var(--color-accent));
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--step-color, var(--color-accent));
}

article .tl-steps-h--colored .tl-steps-item-h.is-active .tl-step-title {
  color: var(--step-color, var(--color-accent));
}

/* ── Status Steps vertical (.tl-status)
   Usage: <steps variant="status">…</steps> → <div class="tl-status">
── */

article .tl-status {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

article .tl-status-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.5rem;
  position: relative;
}

article .tl-status-item:last-child {
  padding-bottom: 0;
}

article .tl-status-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1.5rem / 2 - 1px);
  top: 1.5rem;
  bottom: 0;
  width: 2px;
  background: var(--color-neutral-200);
}

article .tl-status-item.is-done:not(:last-child)::after {
  background: #52a80c;
}

article .tl-status-item.is-active:not(:last-child)::after {
  background: var(--color-neutral-200);
}

article .tl-status-dot {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--color-neutral-300);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-top: 0.0625rem;
}

article .tl-status-item.is-done .tl-status-dot,
article .tl-status-item-h.is-done .tl-status-dot {
  background: #52a80c;
  border-color: #52a80c;
}

article .tl-status-item.is-done .tl-status-dot::after,
article .tl-status-item-h.is-done .tl-status-dot::after {
  content: '✓';
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}

article .tl-status-item.is-active .tl-status-dot,
article .tl-status-item-h.is-active .tl-status-dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

article .tl-status-item.is-active .tl-status-dot::after,
article .tl-status-item-h.is-active .tl-status-dot::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

article .tl-status-item.is-pending .tl-status-dot,
article .tl-status-item-h.is-pending .tl-status-dot {
  border-color: var(--color-neutral-200);
}

article .tl-status-item.is-pending .tl-status-title,
article .tl-status-item-h.is-pending .tl-status-title {
  color: var(--color-neutral-400);
}

article .tl-status-item.is-pending .tl-status-body,
article .tl-status-item-h.is-pending .tl-status-body {
  color: var(--color-neutral-300);
}

article .tl-status-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-neutral-400);
  margin: 0 0 0.15rem;
}

article .tl-status-item.is-done .tl-status-eyebrow,
article .tl-status-item-h.is-done .tl-status-eyebrow {
  color: #52a80c;
}

article .tl-status-item.is-active .tl-status-eyebrow,
article .tl-status-item-h.is-active .tl-status-eyebrow {
  color: var(--color-accent);
}

article .tl-status-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.2rem;
  line-height: 1.3;
}

article .tl-status-body {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

/* ── Status Steps horizontal (.tl-status-h)
   Usage: <steps variant="status-horizontal">…</steps> → <div class="tl-status-h">
── */

article .tl-status-h {
  display: flex;
  position: relative;
  margin-bottom: 1.5rem;
}

article .tl-status-h::before {
  content: "";
  position: absolute;
  top: calc(0.75rem - 1px);
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--color-neutral-200);
}

article .tl-status-item-h {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

article .tl-status-item-h .tl-status-dot {
  margin-top: 0;
  margin-bottom: 0.625rem;
  z-index: 1;
}

article .tl-status-item-h .tl-status-title {
  font-size: 0.8125rem;
}

article .tl-status-item-h .tl-status-eyebrow {
  font-size: 0.625rem;
}

article .tl-status-item-h .tl-status-body {
  font-size: 0.75rem;
}

/* ── Numbered Steps horizontal (.tl-steps-h)
   Usage: <steps variant="numbered-horizontal">…</steps> → <div class="tl-steps-h">
── */

article .tl-steps-h {
  display: flex;
  position: relative;
  margin-bottom: 1.5rem;
}

article .tl-steps-h::before {
  content: "";
  position: absolute;
  top: calc(1.875rem / 2 - 1px);
  left: calc(1.875rem / 2);
  right: calc(1.875rem / 2);
  height: 2px;
  background: var(--color-neutral-200);
}

article .tl-steps-item-h {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

article .tl-steps-item-h .tl-step-badge {
  margin-top: 0;
  margin-bottom: 0.625rem;
  z-index: 1;
}

article .tl-steps-item-h.is-active .tl-step-badge {
  background: var(--color-accent);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--color-accent);
}

article .tl-steps-item-h.is-active .tl-step-title {
  color: var(--color-accent);
  font-weight: 700;
}

article .tl-steps-item-h .tl-step-title {
  font-size: 0.8125rem;
}

article .tl-steps-item-h .tl-step-desc {
  font-size: 0.75rem;
  color: #475569;
  margin-top: 0.2rem;
}

/* ── Chevron Band (.tl-chevron)
   Usage: <steps variant="chevron-band">…</steps> → <div class="tl-chevron">
   Variants: tl-chevron--spectrum, tl-chevron--trail
── */

article .tl-chevron {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-bottom: 1.5rem;
}

article .tl-chev-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

article .tl-chev-badge {
  width: 100%;
  height: 44px;
  background: var(--color-neutral-200, #e2e8f0);
  clip-path: polygon(0% 0%, calc(100% - 10px) 0%, 100% 50%, calc(100% - 10px) 100%, 0% 100%, 10px 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #94a3b8;
  transition: background 150ms ease-out, color 150ms ease-out;
}

article .tl-chev-step:first-child .tl-chev-badge {
  clip-path: polygon(0% 0%, calc(100% - 10px) 0%, 100% 50%, calc(100% - 10px) 100%, 0% 100%);
}

article .tl-chev-step:last-child .tl-chev-badge {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 10px 50%);
}

article .tl-chev-step.is-done .tl-chev-badge  { background: var(--color-primary); color: #fff; }
article .tl-chev-step.is-active .tl-chev-badge { background: var(--color-accent);  color: #fff; }

article .tl-chev-label {
  margin-top: 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  text-align: center;
  line-height: 1.3;
  padding: 0 0.25rem;
}

article .tl-chev-step.is-done .tl-chev-label  { color: var(--color-primary); }
article .tl-chev-step.is-active .tl-chev-label { color: var(--color-accent);  }

/* spectrum — computed per-step color injected as --chev-color by renderer */
article .tl-chevron--spectrum .tl-chev-badge { background: var(--chev-color, var(--color-primary)); color: #fff; }
article .tl-chevron--spectrum .tl-chev-label { color: var(--chev-color, var(--color-primary)); }

/* trail — done steps get computed gradient color from renderer via --chev-color */
article .tl-chevron--trail .tl-chev-step.is-done .tl-chev-badge { background: var(--chev-color, var(--color-primary)); }
article .tl-chevron--trail .tl-chev-step.is-done .tl-chev-label { color: var(--chev-color, var(--color-primary)); }

article .tl-chevron--trail .tl-chev-step.is-active .tl-chev-label { font-weight: 900; }

/* linked steps */
article a.tl-chev-step { text-decoration: none; }
article a.tl-chev-step:hover .tl-chev-badge { filter: brightness(0.9); }
article a.tl-chev-step:hover .tl-chev-label  { text-decoration: underline; }
