/* 03 · Como funciona: "Do áudio bagunçado ao trabalho feito." (v7.1 #flow), em 3 colunas.
   Colunas, títulos e cartão da tarefa acompanham o tom global; o áudio e o balão
   do WhatsApp são blocos de cor fixa. */

#como-funciona .cf-title { max-width: 15ch; }
#como-funciona .cf-flow {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line);
}
#como-funciona .cf-st { position: relative; display: flex; flex-direction: column; padding: 26px clamp(18px, 2.4vw, 34px) 8px; border-left: 1px solid var(--line); }
#como-funciona .cf-st:first-child { border-left: 0; padding-left: 0; }
#como-funciona .cf-st:last-child { padding-right: 0; }
#como-funciona .cf-n { font: 600 .72rem/1.4 var(--mono); letter-spacing: .14em; color: var(--accent); }
#como-funciona .cf-st h3 { font: 500 clamp(1.3rem, 1.05rem + .8vw, 1.72rem)/1.15 var(--sans); letter-spacing: -.025em; color: var(--ink); margin: 10px 0 24px; min-height: 2.3em; }
#como-funciona .cf-vis { margin-top: auto; }

/* 01 · áudio (cor fixa, WhatsApp) */
/* 17/10: fundo e borda iguais aos do cartão da tarefa no tom escuro (--surface e --line), fixos */
#como-funciona .cf-audio { border-radius: 16px; background: #0d1822; border: 1px solid rgba(238, 242, 245, .14); color: var(--wa-txt); padding: 12px 14px 14px; box-shadow: 0 24px 50px -34px rgba(7, 17, 28, .6); font-family: var(--f-body6); }
#como-funciona .cf-audio-top { display: flex; align-items: center; gap: 10px; }
#como-funciona .cf-play {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: var(--wa-txt); transition: background-color .2s, transform .15s;
}
#como-funciona .cf-play:hover { background: rgba(255, 255, 255, .2); }
#como-funciona .cf-play:active { transform: scale(.94); }
#como-funciona .cf-play svg { width: 15px; height: 15px; fill: currentColor; }
#como-funciona .cf-i-pause { display: none; }
#como-funciona .cf-audio.playing .cf-i-play { display: none; }
#como-funciona .cf-audio.playing .cf-i-pause { display: block; }
#como-funciona .cf-wave { display: flex; align-items: center; gap: 2px; height: 28px; flex: 1; min-width: 0; }
#como-funciona .cf-wave i { display: block; width: 3px; flex: none; border-radius: 2px; background: rgba(233, 237, 239, .55); height: calc(var(--h) * 1%); transition: background-color .2s; }
#como-funciona .cf-wave i.p { background: #2fe0cc; }
#como-funciona .cf-time { font: 500 .74rem var(--mono); color: var(--wa-meta); font-variant-numeric: tabular-nums; }
#como-funciona .cf-trs { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: .98rem; line-height: 1.5; color: #c8d2d9; font-style: italic; }
#como-funciona .cf-trs mark { background: transparent; color: inherit; font-style: normal; box-shadow: inset 0 -2px 0 transparent; transition: color .35s, box-shadow .35s; }
#como-funciona .cf-trs mark.on { color: #2fe0cc; box-shadow: inset 0 -2px 0 rgba(47, 224, 204, .6); }

/* 02 · cartão da tarefa (acompanha o tom) */
#como-funciona .cf-task { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 16px 16px 14px; box-shadow: 0 24px 50px -36px rgba(7, 17, 28, .45); }
#como-funciona .cf-task-t { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
#como-funciona .cf-lbl { font: 500 .72rem/1.35 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
#como-funciona .cf-stt { font: 600 .7rem/1.35 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
#como-funciona .cf-task h4 { font: 600 1.16rem/1.25 var(--sans); letter-spacing: -.02em; color: var(--ink); margin: 12px 0 10px; min-height: 1.25em; }
#como-funciona .cf-task dl { display: grid; gap: 7px; margin: 0; }
#como-funciona .cf-task dl div { display: grid; grid-template-columns: 7.4em minmax(0, 1fr); gap: 10px; font-size: .93rem; }
#como-funciona .cf-task dt { font: 500 .66rem/1.9 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
#como-funciona .cf-task dd { margin: 0; color: var(--ink); min-height: 1.4em; }
#como-funciona .cf-task .fill { transition: opacity .3s; }
#como-funciona .cf-task.armed .fill { opacity: 0; }
#como-funciona .cf-task .fill.on { opacity: 1; }

/* 03 · balão do resumo (cor fixa, WhatsApp) */
#como-funciona .cf-sum { border-radius: 16px; background: var(--wa-bg); color: var(--wa-txt); padding: 12px 12px 14px; font: 400 14px/1.38 var(--f-body6); box-shadow: 0 24px 50px -34px rgba(7, 17, 28, .6); display: flex; flex-direction: column; gap: 4px; }
#como-funciona .cf-msg { position: relative; max-width: 100%; padding: .45em .6em .5em .68em; border-radius: .6em; box-shadow: 0 1px .5px rgba(0, 0, 0, .25); overflow-wrap: anywhere; }
#como-funciona .cf-msg.in { align-self: flex-start; background: var(--wa-in); }
#como-funciona .cf-msg.out { align-self: flex-end; background: var(--wa-out); max-width: 86%; }
#como-funciona .cf-msg.tail.in { border-top-left-radius: 0; }
#como-funciona .cf-msg.tail.out { border-top-right-radius: 0; }
#como-funciona .cf-meta { float: right; margin: .45em 0 -.3em .75em; font-size: .76em; line-height: 1; color: var(--wa-meta); }
#como-funciona .cf-msg.out .cf-meta { color: rgba(233, 237, 239, .6); }
#como-funciona .cf-sum-a { display: flex; gap: 8px; margin-top: 8px; }
#como-funciona .cf-sum-a[hidden] { display: none; }
#como-funciona .cf-sum-a button {
  flex: 1; min-height: 44px; border-radius: 22px; border: 1px solid rgba(0, 200, 180, .5); background: rgba(0, 200, 180, .1);
  color: #dafffa; font: 600 .88rem/1 var(--f-body6); cursor: pointer; transition: background-color .2s, transform .15s;
}
#como-funciona .cf-sum-a button:hover { background: rgba(0, 200, 180, .22); }
#como-funciona .cf-sum-a button:active { transform: scale(.97); }
#como-funciona .cf-reply { display: flex; flex-direction: column; gap: 4px; }
#como-funciona .cf-reply:empty { display: none; }
#como-funciona .cf-reply .cf-msg { animation: como-funciona-pop .34s var(--ease-out) both; }
@keyframes como-funciona-pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

#como-funciona .cf-foot { display: flex; justify-content: flex-end; margin-top: 18px; }
#como-funciona .cf-replay {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer;
  font: 500 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
#como-funciona .cf-replay:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
#como-funciona .cf-replay svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 980px) {
  #como-funciona .cf-flow { grid-template-columns: minmax(0, 1fr); }
  #como-funciona .cf-st { border-left: 0; padding: 26px 0; border-top: 1px solid var(--line); }
  #como-funciona .cf-st:first-child { border-top: 0; }
  #como-funciona .cf-st h3 { min-height: 0; margin-bottom: 18px; }
  #como-funciona .cf-vis { max-width: 460px; }
}
@media (prefers-reduced-motion: reduce) {
  #como-funciona .cf-trs mark, #como-funciona .cf-task .fill, #como-funciona .cf-wave i { transition: none; }
  #como-funciona .cf-reply .cf-msg { animation: none; }
}

/* aviso "Clique para ouvir": a animação automática roda sem som; o som só toca no clique */
#como-funciona .cf-hint { margin-top: 10px; font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #2fe0cc; transition: opacity .3s; }
#como-funciona .cf-audio.playing .cf-hint { opacity: 0; }
