/* How we work: an interactive engagement timeline with a moving "today" line
   and a details panel for the current stage. Positions use week numbers:
   --s / --e on rows, --g on markers, out of --weeks. */

.process2 { background: #fff; overflow: hidden; isolation: isolate; }
.process2::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(45% 35% at 15% 30%, rgba(108,99,255,.08), transparent 70%); }
.process2 .pr-head h2 span { color: #8A8A96; }

.tl-card { border-radius: 26px; border: 1px solid #ECECF2; background: #fff; box-shadow: 0 1px 2px rgba(30,27,110,.04), 0 40px 80px -50px rgba(30,27,110,.45); overflow: hidden; }
.tl-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px 32px 8px; }
.tl-title b { display: block; font-size: 17px; font-weight: 600; color: var(--ink); }
.tl-title small { font-size: 13px; color: #7A7A88; }
.tl-legend { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: #6B6B78; }
.tl-legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg-gate { width: 11px; height: 11px; background: #1C1C21; transform: rotate(45deg); border-radius: 2px; }
.lg-rel { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }

/* Timeline grid */
.tl { --label: 170px; padding: 12px 32px 28px; position: relative; }
.tl-axis { display: grid; grid-template-columns: var(--label) 1fr; margin-bottom: 6px; }
.tl-ticks { position: relative; height: 24px; border-bottom: 1px solid #EFEFF5; }
.tl-ticks i { position: absolute; left: calc(var(--w) / var(--weeks) * 100%); transform: translateX(-50%); font-style: normal; font-size: 12px; color: #9A9AA6; font-variant-numeric: tabular-nums; }
.tl-ticks i:first-child { transform: none; }
.tl-ticks i:last-child { transform: translateX(-100%); }
.tl-rows { position: relative; }
.tl-rows::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--label); right: 0; pointer-events: none;
  background-image: linear-gradient(90deg, #F2F2F7 1px, transparent 1px); background-size: calc(100% / 9) 100%; }

.tl-row { position: relative; display: grid; grid-template-columns: var(--label) 1fr; align-items: center; width: 100%; padding: 0; height: 64px; border: 0; background: transparent; cursor: pointer; text-align: left; font: inherit; border-radius: 14px; transition: background-color .3s; }
.tl-row:hover { background: #FAFAFD; }
.tl-row.is-on { background: #F6F5FF; }
.tl-name { display: flex; flex-direction: column; padding-left: 12px; font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; line-height: 1.25; }
.tl-dur { display: none; font-size: 11px; font-weight: 600; color: var(--brand); }
.tl-name em { font-style: normal; font-size: 12px; font-weight: 600; color: #9A9AA6; }
.tl-row.is-on .tl-name em { color: var(--brand); }
.tl-track { position: relative; height: 100%; }
.tl-bar { position: absolute; top: 50%; height: 36px; margin-top: -18px; left: calc(var(--s) / var(--weeks) * 100%); width: calc((var(--e) - var(--s)) / var(--weeks) * 100%); border-radius: 11px;
  background: #ECEBFA; border: 1px solid #DCD9FB; display: flex; align-items: center; padding: 0 12px; overflow: hidden; transition: background .4s, border-color .4s, box-shadow .4s; }
.tl-bar b { font-size: 12.5px; font-weight: 600; color: #4A43B8; white-space: nowrap; position: relative; z-index: 1; transition: color .4s; }
.tl-bar::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #5B4FF0, #3730C8); transform: scaleX(var(--fill, 0)); transform-origin: left; }
.tl-row.is-on .tl-bar { border-color: #5B4FF0; box-shadow: 0 10px 22px -12px rgba(55,48,200,.8); }
.tl-row.is-on .tl-bar b, .tl-row.is-done .tl-bar b { color: #fff; }
.tl-bar.free { background: #E7F6EE; border-color: #BFE7D1; min-width: 74px; }
.tl-bar.free b { color: #1F8F57; }
.tl-bar.free::before { background: linear-gradient(90deg, #1FA463, #178A52); }
.tl-bar.open { background: linear-gradient(90deg, #ECEBFA, rgba(236,235,250,0)); border-right-color: transparent; border-radius: 11px 0 0 11px; }
.tl-bar.open::before { background: linear-gradient(90deg, #5B4FF0, rgba(91,79,240,.15)); }
.js .tl-bar { clip-path: inset(0 100% 0 0); transition: clip-path 1s var(--ease), background .4s, border-color .4s, box-shadow .4s; }
.js .tl-card.in .tl-bar { clip-path: inset(0 0 0 0); }
.js .tl-card.in .tl-row:nth-child(2) .tl-bar { transition-delay: .15s; } .js .tl-card.in .tl-row:nth-child(3) .tl-bar { transition-delay: .3s; }
.js .tl-card.in .tl-row:nth-child(4) .tl-bar { transition-delay: .45s; } .js .tl-card.in .tl-row:nth-child(5) .tl-bar { transition-delay: .6s; }

.gate { position: absolute; top: 50%; left: calc(var(--g) / var(--weeks) * 100%); width: 16px; height: 16px; margin: -8px 0 0 -8px; background: #1C1C21; border: 2px solid #fff; border-radius: 3px; transform: rotate(45deg); z-index: 2; box-shadow: 0 4px 10px -2px rgba(0,0,0,.35); }
.rel { position: absolute; top: 50%; left: calc(var(--g) / var(--weeks) * 100%); z-index: 2; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); font-style: normal; font-size: 10px; font-weight: 700; color: var(--brand); display: grid; place-items: center; transition: background-color .3s, color .3s; }
.rel.hit { background: var(--brand); color: #fff; animation: relPop .5s var(--ease); }
@keyframes relPop { 50% { transform: scale(1.25); } }

/* Moving "today" line */
.tl-now { position: absolute; top: -32px; bottom: -6px; left: calc(var(--label) + (100% - var(--label)) * var(--p, 0)); width: 2px; background: var(--brand); z-index: 3; pointer-events: none; }
.tl-now::after { content: ""; position: absolute; bottom: -4px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px rgba(55,48,200,.18); }
.tl-now span { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums; box-shadow: 0 6px 14px -6px rgba(55,48,200,.9); }

/* Details panel */
.tl-details { border-top: 1px solid #EFEFF5; background: linear-gradient(180deg, #FAFAFE, #F6F5FF); }
.td { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 0; }
.td[hidden] { display: none; }
.td > div { padding: 28px 28px 30px; animation: tdIn .5s var(--ease) both; }
.td > div:nth-child(2) { animation-delay: .05s; } .td > div:nth-child(3) { animation-delay: .1s; } .td > div:nth-child(4) { animation-delay: .15s; }
@keyframes tdIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.td > div + div { border-left: 1px solid #ECEBF5; }
.td-main { padding-left: 32px !important; }
.td-main h3 { font-size: 26px; letter-spacing: -.03em; margin: 10px 0 8px; }
.td-main p { font-size: 15.5px; color: var(--muted); margin: 0; }
.td-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: #EFEEFD; color: var(--brand); }
.td-tag.free { background: #E7F6EE; color: #1F8F57; }
.td-col small { display: block; font-size: 12.5px; font-weight: 600; color: #8A8A96; margin-bottom: 12px; }
.td-col strong { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); line-height: 1.25; margin-bottom: 6px; }
.td-col > span { font-size: 14px; color: var(--muted); }
.doc { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid #ECECF2; border-radius: 14px; padding: 12px; box-shadow: 0 12px 24px -18px rgba(30,27,110,.45); }
.doc b { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.doc em { font-style: normal; font-size: 12.5px; color: #7A7A88; line-height: 1.35; display: block; margin-top: 2px; }
.doc-ic { flex: none; width: 34px; height: 42px; border-radius: 6px; background: #fff; border: 1.5px solid #CFCCF8; position: relative; overflow: hidden; }
.doc-ic::before { content: ""; position: absolute; left: 6px; right: 6px; top: 8px; height: 2px; background: var(--brand); box-shadow: 0 6px 0 #DAD8FF, 0 12px 0 #DAD8FF, 0 18px 0 #DAD8FF; }
.doc-ic.proto { border-radius: 8px; border-color: #1C1C21; border-width: 2px; }
.doc-ic.proto::before { left: 5px; right: 5px; top: 6px; height: 8px; background: #EFEEFD; box-shadow: 0 11px 0 #EFEEFD, 0 22px 0 var(--brand); border-radius: 2px; }
.doc-ic.sys { background: var(--brand); border-color: var(--brand); }
.doc-ic.sys::before { left: 12px; right: 12px; top: 16px; height: 8px; background: #fff; box-shadow: none; }
.doc-ic.chart::before { left: 6px; right: auto; top: auto; bottom: 7px; width: 4px; height: 12px; background: var(--brand); box-shadow: 7px -6px 0 var(--brand), 14px -12px 0 #5B4FF0; }

.tl-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.tl-foot span { display: block; position: relative; padding-left: 50px !important; font-size: 15px; color: var(--muted); padding: 18px 20px; border-radius: 16px; background: #F7F7FB; border: 1px solid #EFEFF5; line-height: 1.45; }
.tl-foot span::before { content: ""; position: absolute; left: 20px; top: 20px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.3l2.6 2.6L14.2 7' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center / 20px no-repeat; }
.tl-foot b { color: var(--ink); font-weight: 600; }

@media (max-width: 1000px) {
  .td { grid-template-columns: 1fr 1fr 1fr; }
  .td-main { grid-column: 1 / -1; border-bottom: 1px solid #ECEBF5; }
  .td > div:nth-child(2) { border-left: 0; }
  .tl-foot { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .tl { --label: 96px; padding: 8px 14px 22px; }
  .tl-top { padding: 20px 18px 6px; }
  .tl-name { font-size: 14px; padding-left: 6px; }
  .tl-name em { font-size: 11px; }
  .tl-row { height: 58px; }
  .tl-bar { height: 30px; margin-top: -15px; padding: 0 7px; }
  .tl-bar b { font-size: 10.5px; }
  .tl-bar.free { min-width: 0; }
  .tl-bar b { display: none; }
  .tl-dur { display: block; }
  .tl-name em { display: none; }
  .tl-row { height: 54px; }
  .tl-ticks i:nth-child(even) { display: none; }
  .rel { width: 12px; height: 12px; margin: -6px 0 0 -6px; font-size: 0; border-width: 2px; }
  .gate { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
  .tl-rows::before { background-size: calc(100% / 4.5) 100%; }
  .td { grid-template-columns: 1fr; }
  .td > div { padding: 18px 20px; border-left: 0 !important; }
  .td > div + div { border-top: 1px solid #ECEBF5; }
  .td-main { padding-left: 20px !important; }
}
