/* Template sections: How it works variants (template-sections/how-it-works.html) */
.ts-how p { color: var(--text-medium); }

/* V1 steps + connector */
.ts-how__steps { position: relative; display: grid; gap: var(--space-10); counter-reset: none; }
.ts-how__steps li { position: relative; display: grid; justify-items: center; gap: var(--space-2); text-align: center; }
.ts-how__steps p { max-width: 320px; }
.ts-how__num {
  position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: var(--space-3);
  border: 1px solid var(--border-thin); border-radius: 50%; background: var(--base-high); box-shadow: 0 0 0 6px var(--base-high), var(--shadow-sm);
  font-family: var(--font-heading); font-weight: var(--fw-medium); font-size: 18px; color: var(--text-strong);
}
.ts-how__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-4); margin-top: var(--space-12); }
@media (min-width: 768px) {
  .ts-how__steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
  .ts-how__steps::before { content: ""; position: absolute; top: 24px; left: 16.6%; right: 16.6%; border-top: 1.5px dashed var(--border-strong); }
}

/* V2 timeline */
.ts-how__timeline { position: relative; display: grid; gap: var(--space-8); max-width: 880px; margin-inline: auto; padding-left: 28px; }
.ts-how__timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), var(--border-thin)); }
.ts-how__timeline li { position: relative; display: grid; gap: var(--space-1); }
.ts-how__timeline li::before { content: ""; position: absolute; left: -28px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--base-high); border: 2px solid var(--accent); }
.ts-how__timeline time { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--body-sm-size); color: var(--accent); }
.ts-how__timeline div { display: grid; gap: var(--space-1); }
@media (min-width: 768px) {
  .ts-how__timeline { padding-left: 0; gap: var(--space-4); }
  .ts-how__timeline::before { left: 50%; translate: -1px 0; }
  .ts-how__timeline li { grid-template-columns: 1fr 1fr; column-gap: var(--space-16); align-items: start; }
  .ts-how__timeline li::before { left: 50%; translate: -50% 0; }
  .ts-how__timeline time { text-align: right; padding-top: 2px; }
  .ts-how__timeline li:nth-child(even) time { order: 2; text-align: left; }
  .ts-how__timeline li:nth-child(even) div { text-align: right; }
  .ts-how__timeline li { padding-block: var(--space-4); }
}

/* V3 mini screens */
.ts-how__screens { display: grid; gap: var(--space-10) var(--space-6); }
.ts-how__screens li { display: grid; align-content: start; gap: var(--space-2); }
.ts-how__screen {
  display: grid; align-content: start; gap: var(--space-2); height: 200px; margin-bottom: var(--space-4); padding: var(--space-5);
  border: 1px solid var(--border-thin); border-radius: var(--radius-lg); background: var(--stone-50); overflow: hidden; font-size: 12px; color: var(--text-strong);
}
.ts-how__screen-title { display: flex; justify-content: space-between; margin-bottom: var(--space-2); font-weight: var(--fw-medium); font-size: 13px; color: var(--text-strong) !important; }
.ts-how__screen-title em { font-style: normal; font-family: ui-monospace, Menlo, monospace; color: var(--emerald-600); }
.ts-how__repo { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; background: var(--base-high); border: 1px solid var(--border-thin); }
.ts-how__repo b { font-weight: var(--fw-medium); }
.ts-how__repo i { position: relative; width: 26px; height: 15px; border-radius: 99px; background: var(--base-low); }
.ts-how__repo i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--base-high); box-shadow: var(--shadow-sm); }
.ts-how__repo i.is-on { background: var(--emerald-500); }
.ts-how__repo i.is-on::after { left: 13px; }
.ts-how__prompt { padding: 10px 12px; border-radius: 10px; background: var(--base-high); border: 1px solid var(--border-strong); line-height: 1.5; }
.ts-how__prompt i { display: inline-block; width: 1px; height: 13px; margin-left: 2px; vertical-align: -2px; background: var(--text-strong); animation: ts-how-blink 1s steps(1) infinite; }
@keyframes ts-how-blink { 50% { opacity: 0; } }
.ts-how__chips { display: flex; gap: 6px; }
.ts-how__chips em { padding: 2px 8px; border-radius: 99px; background: var(--peach-100); font-style: normal; color: var(--amber-800); }
.ts-how__screen code { display: block; padding: 3px 8px; border-radius: 4px; font-family: ui-monospace, Menlo, monospace; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-how__screen code.is-add { background: rgb(0 188 125 / 0.12); }
.ts-how__screen code.is-del { background: rgb(251 44 54 / 0.1); text-decoration: line-through; color: var(--text-low); }
.ts-how__label { font-weight: var(--fw-medium); font-size: var(--body-sm-size); color: var(--accent); }
@media (min-width: 768px) { .ts-how__screens { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { .ts-how__prompt i { animation: none; } }

/* V4 dark code tabs */
.ts-how__dev { display: grid; gap: var(--space-10); align-items: center; }
.ts-how__dev-copy { display: grid; justify-items: start; gap: var(--space-4); }
.ts-how__tablist { display: grid; gap: var(--space-2); width: 100%; margin-top: var(--space-4); }
.ts-how__tablist [role="tab"] {
  display: flex; gap: var(--space-4); width: 100%; padding: var(--space-4); border: 1px solid transparent; border-radius: var(--radius-md); text-align: left; color: var(--text-low);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.ts-how__tablist [role="tab"] b { font-family: ui-monospace, Menlo, monospace; font-weight: var(--fw-regular); font-size: 13px; padding-top: 2px; }
.ts-how__tablist [role="tab"] span { display: grid; gap: 2px; font-weight: var(--fw-medium); font-size: var(--body-lg-size); }
.ts-how__tablist small { font-weight: var(--fw-regular); font-size: var(--para-sm-size); color: var(--text-low); }
.ts-how__tablist [aria-selected="true"] { border-color: var(--border-thin); background: var(--base-high); color: var(--text-strong); }
.ts-how__tablist [aria-selected="true"] b { color: var(--orange-400); }
@media (hover: hover) { .ts-how__tablist [role="tab"]:hover { color: var(--text-strong); } }
.ts-how__code { min-width: 0; }
.ts-how__code .ts-code { min-height: 240px; border: 1px solid var(--border-thin); }
@media (min-width: 1024px) { .ts-how__dev { grid-template-columns: 1fr 1.2fr; gap: var(--space-16); } }

/* V5 setup checklist */
.ts-how__setup { display: grid; gap: var(--space-10); align-items: center; }
.ts-how__setup-copy { display: grid; justify-items: start; gap: var(--space-4); max-width: 480px; }
.ts-how__card { padding: var(--space-6); border: 1px solid var(--border-thin); border-radius: var(--radius-xl); background: var(--base-high); box-shadow: var(--shadow-md); }
.ts-how__progress { display: flex; justify-content: space-between; font-weight: var(--fw-medium); font-size: var(--body-sm-size); color: var(--text-strong); }
.ts-how__progress span { color: var(--text-low); }
.ts-how__bar { height: 6px; margin-block: var(--space-3) var(--space-5); border-radius: 99px; background: var(--base-medium); overflow: hidden; }
.ts-how__bar span { display: block; height: 100%; border-radius: inherit; background: var(--emerald-500); }
.ts-how__checklist { display: grid; gap: var(--space-2); }
.ts-how__checklist li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); }
.ts-how__checklist li > i { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-thin); font-style: normal; font-weight: var(--fw-medium); font-size: 13px; color: var(--text-low); }
.ts-how__checklist li > i .ts-svg { width: 14px; height: 14px; stroke-width: 2; }
.ts-how__checklist li > span { display: grid; flex: 1; min-width: 0; }
.ts-how__checklist b { font-weight: var(--fw-medium); color: var(--text-strong); }
.ts-how__checklist small { font-size: var(--body-sm-size); color: var(--text-low); }
.ts-how__checklist .is-done > i { border-color: transparent; background: var(--emerald-500); color: #fff; }
.ts-how__checklist .is-done b { color: var(--text-low); text-decoration: line-through; }
.ts-how__checklist .is-current { background: var(--stone-50); box-shadow: inset 0 0 0 1px var(--border-thin); }
.ts-how__checklist .is-current > i { border-color: var(--accent); color: var(--accent); }
@media (max-width: 479px) { .ts-how__checklist .is-current { flex-wrap: wrap; } .ts-how__checklist .is-current .btn { margin-left: 40px; } }
@media (min-width: 1024px) { .ts-how__setup { grid-template-columns: 1fr 1fr; gap: var(--space-20); } .ts-how__card { padding: var(--space-8); } }
