/* Hari 2 · komponen khusus: siklus 5R, kalkulator, funnel, template */
.r-row{display:flex;gap:8px;flex-wrap:wrap;margin:22px 0 4px}
.r-chip{display:flex;align-items:center;gap:8px;padding:8px 14px 8px 8px;border-radius:99px;background:var(--surface-2);font-weight:700;font-size:14px;cursor:pointer;border:1px solid transparent;transition:all .2s}
.r-chip:hover{border-color:var(--accent)}
.r-chip i{font-style:normal;width:26px;height:26px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:12px}
.path{position:relative;padding-top:6px}
.path .pick{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.path .pick button{text-align:left;border:1px solid var(--line);background:var(--bg);border-radius:10px;padding:10px 12px;cursor:pointer;font-size:14px;transition:all .2s}
.path .pick button[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft)}
/* ---------- 5R cycle ---------- */
.cycle-wrap{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:22px;align-items:center}
#cycle{width:100%;max-width:420px;display:block;margin:0 auto}
#cycle .node{cursor:pointer}
#cycle .node circle{fill:var(--surface);stroke:var(--line);stroke-width:2;transition:all .35s}
#cycle .node text{fill:var(--text);font-weight:800;font-size:15px;text-anchor:middle;dominant-baseline:central;pointer-events:none}
#cycle .node .sub{font-size:10px;font-weight:600;fill:var(--muted)}
#cycle .node.hot circle{fill:var(--accent);stroke:var(--accent)}
#cycle .node.hot text{fill:#fff}
#cycle .ring{fill:none;stroke:var(--line);stroke-width:2;stroke-dasharray:4 7}
#cycle .ring-run{fill:none;stroke:var(--accent);stroke-width:3;stroke-linecap:round;stroke-dasharray:880;stroke-dashoffset:880}
.page.active #cycle .ring-run{animation:draw 2.4s ease forwards}
@keyframes draw{to{stroke-dashoffset:0}}
#cycleInfo{min-height:190px}
.kw-out{max-height:240px;overflow:auto;display:flex;flex-wrap:wrap;gap:6px;padding:12px;border-radius:10px;background:var(--surface-2);margin-top:12px}
.kw-out span{font-size:13px;padding:4px 10px;border-radius:99px;background:var(--surface);border:1px solid var(--line);animation:pop .35s backwards}
.counter-strip{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.dots{display:flex;flex-wrap:wrap;gap:4px;margin-top:14px}
.dots i{width:9px;height:9px;border-radius:3px;background:var(--line);transition:background .3s}
.dots i.on{background:var(--accent)}
/* ---------- R3 funnel ---------- */
.funnel-box{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:18px;align-items:stretch}
#funnelCanvas{width:100%;height:400px;display:block;border-radius:12px;background:var(--surface-2)}
.stage-list{display:flex;flex-direction:column;gap:8px}
.stage{display:flex;justify-content:space-between;align-items:baseline;padding:10px 14px;border-radius:10px;background:var(--surface-2);font-size:14px}
.stage b{font-size:20px;font-variant-numeric:tabular-nums}
.stage.final{background:var(--accent);color:#fff}
.stage small{display:block;font-size:11.5px;opacity:.75}
.hits{font-size:13px;color:var(--muted);margin-top:8px}
.hits b{color:var(--accent)}
/* ---------- templates ---------- */
.vars{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.chat-flow{display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:13px;font-weight:700;margin:4px 0 14px}
.chat-flow span{padding:6px 11px;border-radius:99px;background:var(--surface-2)}
.chat-flow em{font-style:normal;color:var(--muted)}
.ritual{display:flex;height:46px;border-radius:12px;overflow:hidden;margin:12px 0 8px}
.ritual div{display:grid;place-items:center;color:#fff;font-size:12.5px;font-weight:700;white-space:nowrap;overflow:hidden;width:0;transition:width 1s cubic-bezier(.3,.8,.2,1)}
@media (max-width:900px){
  .cycle-wrap,.funnel-box,.vars{grid-template-columns:1fr}
  #funnelCanvas{height:340px}
}
