/* =====================================================================
   LAB.THUART · janela de assinatura do Feed Pronto
   Usada na landing (v4.html) e na amostra (amostra.html), com js/assinar.js.
   Tudo prefixado com .ck e com os tokens redefinidos no escopo da janela:
   funciona com ou sem css/v4.css e não mexe em nada fora da janela.
   ===================================================================== */
dialog.ck {
  --ink: #080808; --paper: #e9ebdd; --red: #ff4208; --red-d: #d93400; --red-ink: #c42d00;
  --line: rgba(8, 8, 8, .13); --line-2: rgba(8, 8, 8, .26); --t2: rgba(8, 8, 8, .66); --t3: rgba(8, 8, 8, .45);
  --fill: rgba(8, 8, 8, .06); --err: #c42d00; --focus: var(--ink);
  border: 0; padding: 0; margin: auto; width: min(700px, calc(100vw - 32px)); height: auto; max-height: calc(100dvh - 32px);
  background: #fff; color: var(--ink); box-shadow: 0 40px 90px -30px rgba(8, 8, 8, .65); overflow: hidden;
  font-family: 'Mundial', 'Helvetica Neue', Arial, sans-serif; font-weight: 300; font-size: 16px; line-height: 1.5; text-align: left;
  -webkit-font-smoothing: antialiased;
}
dialog.ck[open] { display: flex; flex-direction: column; animation: ck-in .24s cubic-bezier(.2, .7, .2, 1); }
dialog.ck::backdrop { background: rgba(8, 8, 8, .62); }
@keyframes ck-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ck-sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ck-spin { to { transform: rotate(360deg); } }
.ck *, .ck *::before, .ck *::after { box-sizing: border-box; }
.ck :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.ck :focus:not(:focus-visible) { outline: none; }
.ck h2, .ck p, .ck fieldset, .ck legend { margin: 0; }
.ck b, .ck strong { font-weight: 700; }
.ck a { color: inherit; }
.ck [hidden] { display: none !important; }
.ck .sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.ck-form { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 32px); width: 100%; }

/* topo */
.ck-h { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 22px 18px 28px; border-bottom: 1px solid var(--line); background: #fff; }
.ck-tag { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 400; color: var(--red-ink); line-height: 1.3; }
.ck-tag::before { content: ''; width: 8px; height: 8px; background: currentColor; flex: none; }
.ck-title { font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; line-height: .92; font-size: clamp(30px, 4.4vw, 44px); margin-top: 10px; }
.ck-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; padding: 0; cursor: pointer; transition: transform .2s; }
.ck-x:hover { transform: rotate(90deg); }
.ck-x svg { width: 16px; height: 16px; }
.ck-x:focus-visible { outline-color: var(--red); }

/* etapas: plano feito, pagamento agora, acesso ao app depois (réguas iguais às dos planos) */
.ck-steps { flex: none; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #fff; }
.ck-steps li { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 16px 11px 28px; font-size: 13px; line-height: 1.2; color: var(--t3); font-weight: 400; }
.ck-steps li + li { border-left: 1px solid var(--line); padding-left: 16px; }
.ck-steps li::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: transparent; }
.ck-steps li.done { color: var(--t2); }
.ck-steps li.done::before { background: var(--ink); }
.ck-steps li.now { color: var(--ink); font-weight: 700; }
.ck-steps li.now::before { background: var(--red); }
.ck-steps i { flex: none; width: 20px; height: 20px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 900; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--t2); }
.ck-steps li.done i { background: var(--ink); color: #fff; box-shadow: none; }
.ck-steps li.now i { background: var(--red); color: #fff; box-shadow: none; }
.ck-steps i svg { width: 12px; height: 12px; }
.ck-steps span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* corpo */
.ck-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 28px 28px; display: grid; gap: 24px; align-content: start; }
.ck-fs { border: 0; padding: 0; min-width: 0; }
.ck-fs > legend, .ck-lbl { display: block; padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; }
.ck-fs > legend .opt, .ck-field > label .opt { font-weight: 300; color: var(--t2); }

/* planos: células com réguas, igual aos planos da landing */
.ck-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.ck-plan { position: relative; display: grid; gap: 6px; align-content: start; padding: 14px 16px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; background: #fff; transition: background-color .18s, color .18s; min-width: 0; }
.ck-plan:hover { background: rgba(8, 8, 8, .03); }
.ck-plan input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ck-plan .n { font-weight: 700; font-size: 15px; line-height: 1.2; }
.ck-plan .p { font-weight: 900; font-size: 28px; letter-spacing: -.045em; line-height: 1; white-space: nowrap; }
.ck-plan .p small { font-size: 12px; font-weight: 300; letter-spacing: 0; opacity: .66; margin-left: 2px; }
.ck-plan .s { font-size: 12px; color: var(--t2); line-height: 1.3; }
.ck-plan .s.hot { color: var(--red-ink); font-weight: 700; }
.ck-plan.on { background: var(--ink); color: #fff; }
.ck-plan.on .s { color: rgba(255, 255, 255, .72); }
.ck-plan.on .s.hot { color: var(--red); }
.ck-plan.on::after { content: ''; position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; background: var(--red); }
.ck-plan:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: -5px; }

/* quem posta: toggle pílula, igual ao da landing */
.ck-toggle { display: inline-flex; gap: 2px; background: var(--fill); border-radius: 999px; padding: 5px; max-width: 100%; }
.ck-toggle label { position: relative; display: block; min-width: 0; }
.ck-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ck-toggle span { display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--t2); white-space: nowrap; transition: background-color .2s, color .2s, box-shadow .2s; }
.ck-toggle label:hover span { color: var(--ink); }
.ck-toggle input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.ck-toggle input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.ck-help { font-size: 13px; color: var(--t2); line-height: 1.45; margin-top: 10px; }

/* campos */
.ck-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.ck-grid > .full { grid-column: 1 / -1; }
.ck-field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.ck-field > label { font-size: 13px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; }
.ck-input { display: block; width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 0; background: #fff; color: var(--ink); font: inherit; font-size: 16px; font-weight: 300; line-height: 1.3; outline: none; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s; }
.ck-input::placeholder { color: var(--t3); opacity: 1; }
.ck-input:hover { border-color: rgba(8, 8, 8, .5); }
.ck-input:focus, .ck-input:focus-visible { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); outline: none; }
.ck-input[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.ck-group { display: flex; align-items: stretch; border: 1px solid var(--line-2); background: #fff; transition: border-color .15s, box-shadow .15s; }
.ck-group:hover { border-color: rgba(8, 8, 8, .5); }
.ck-group:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ck-group:has([aria-invalid="true"]) { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.ck-group > .pre { display: grid; place-items: center; padding-left: 16px; color: var(--t2); font-weight: 700; }
.ck-group > .ck-input { border: 0; box-shadow: none !important; padding-left: 6px; flex: 1; min-width: 0; height: 50px; }
.ck-err { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; font-weight: 700; color: var(--err); line-height: 1.4; }
.ck-err::before { content: ''; width: 8px; height: 8px; margin-top: 5px; background: currentColor; flex: none; }

/* caixa de papel: primeira semana e permanência */
.ck-note { display: grid; gap: 12px; background: var(--paper); padding: 16px 18px; font-size: 14px; line-height: 1.45; }
.ck-note > div { display: flex; gap: 12px; align-items: flex-start; }
.ck-note .ic { width: 24px; height: 24px; background: var(--red); color: #fff; display: grid; place-items: center; flex: none; }
.ck-note .ic svg { width: 13px; height: 13px; }
.ck-note b { font-weight: 700; }

/* rodapé preto: valor cobrado + botão */
.ck-f { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; align-items: center; padding: 20px 28px 22px; background: var(--ink); color: #fff; --focus: #fff; }
.ck-sum { display: grid; gap: 4px; min-width: 0; }
.ck-sum .k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .72); font-weight: 400; }
.ck-sum .v { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ck-sum .v b { font-weight: 900; font-size: 34px; letter-spacing: -.045em; line-height: 1; }
.ck-sum .v span { font-size: 14px; color: rgba(255, 255, 255, .8); }
.ck-sum .m { font-size: 13px; color: rgba(255, 255, 255, .72); }
.ck-go { min-width: 240px; }
.ck .btn.ck-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 28px; border-radius: 999px; border: 0; font: inherit; font-weight: 700; font-size: 16px; line-height: 1; background: var(--red); color: #fff; box-shadow: 0 14px 30px -14px rgba(255, 66, 8, .8); cursor: pointer; white-space: nowrap; transition: transform .2s, background-color .2s; }
.ck .btn.ck-go:hover { transform: translateY(-2px); background: #ff5320; }
.ck .btn.ck-go svg { width: 16px; height: 16px; flex: none; }
.ck .btn.ck-go:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ck .btn.ck-go[aria-busy="true"] { pointer-events: none; transform: none; background: var(--red-d); }
.ck .btn.ck-go[aria-busy="true"]::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ck-spin .7s linear infinite; flex: none; }
.ck .btn.ck-go[aria-busy="true"] svg { display: none; }
.ck-next { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .9); padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .14); }
.ck-next .ic { flex: none; width: 24px; height: 24px; display: grid; place-items: center; background: var(--red); color: #fff; margin-top: -1px; }
.ck-next .ic svg { width: 13px; height: 13px; }
.ck-legal { grid-column: 1 / -1; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, .66); margin-top: -4px; }
.ck-legal a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .5); text-decoration: none; }
.ck-legal a:hover { border-bottom-color: #fff; }
.ck-alert { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; background: var(--red-d); color: #fff; padding: 12px 14px; font-size: 14px; line-height: 1.45; font-weight: 400; }
.ck-alert::before { content: ''; width: 8px; height: 8px; margin-top: 6px; background: #fff; flex: none; }
.ck-alert a { color: #fff; font-weight: 700; border-bottom: 1px solid currentColor; text-decoration: none; white-space: nowrap; }
.ck-alert.info { background: rgba(255, 255, 255, .1); }

@media (max-width: 600px) {
  dialog.ck { width: 100%; max-width: 100%; margin: auto 0 0; max-height: calc(100dvh - 10px); }
  dialog.ck[open] { animation: ck-sheet .28s cubic-bezier(.2, .7, .2, 1); }
  .ck-form { max-height: calc(100dvh - 10px); }
  .ck-h { padding: 18px 16px 14px 20px; }
  .ck-title { font-size: 30px; }
  .ck-steps { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.2fr); }
  .ck-steps li { padding: 10px 8px 9px 20px; gap: 7px; font-size: 12px; }
  .ck-steps li + li { padding-left: 10px; }
  .ck-steps li:last-child { padding-right: 16px; }
  .ck-steps i { width: 18px; height: 18px; font-size: 10px; }
  .ck-b { padding: 20px 20px 24px; gap: 22px; }
  .ck-plan { padding: 12px 10px 14px; }
  .ck-plan .n { font-size: 13px; }
  .ck-plan .p { font-size: 22px; }
  .ck-plan .p small { display: block; margin: 4px 0 0; }
  .ck-plan .s { font-size: 11px; }
  .ck-plan.on::after { top: 10px; right: 10px; width: 8px; height: 8px; }
  .ck-toggle { display: flex; width: 100%; }
  .ck-toggle label { flex: 1 1 0; }
  .ck-toggle span { padding: 0 10px; font-size: 13px; }
  .ck-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ck-f { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); }
  .ck-sum { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2px 12px; }
  .ck-sum .k { grid-column: 1 / -1; }
  .ck-sum .v b { font-size: 28px; }
  .ck-sum .m { text-align: right; }
  .ck-go, .ck .btn.ck-go { width: 100%; min-width: 0; }
  .ck-next { font-size: 13px; gap: 10px; padding-top: 12px; }
  .ck-next .ic { width: 22px; height: 22px; }
  .ck-legal { font-size: 11px; margin-top: -2px; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.ck[open] { animation: none; }
  .ck-x:hover, .ck .btn.ck-go:hover { transform: none; }
}

/* =====================================================================
   Botão "Assinar" de fora da janela: o CTA principal que abre a janela.
   Usado no hero da landing e da amostra. Pílula branca (sobre o vermelho),
   com o preço visível embaixo do verbo e a seta num círculo vermelho.
   <a class="ck-buy" data-assinar="trimestral"><span class="t"><b>Assinar agora</b><small>a partir de R$400/mês</small></span><span class="go">seta</span></a>
   ===================================================================== */
.ck-buy { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; height: 64px; padding: 0 9px 0 26px; border: 0; border-radius: 999px; background: #fff; color: #080808; font-family: 'Mundial', 'Helvetica Neue', Arial, sans-serif; text-decoration: none; text-align: left; white-space: nowrap; cursor: pointer; box-shadow: 0 18px 40px -20px rgba(60, 5, 0, .7); transition: transform .2s cubic-bezier(.2, .7, .2, 1); -webkit-tap-highlight-color: transparent; }
.ck-buy:hover { transform: translateY(-2px); }
.ck-buy:active { transform: none; }
.ck-buy:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ck-buy .t { display: grid; gap: 5px; line-height: 1; min-width: 0; }
.ck-buy .t b { font-weight: 700; font-size: 17px; letter-spacing: -.005em; }
.ck-buy .t small { font-size: 12.5px; font-weight: 400; color: rgba(8, 8, 8, .66); letter-spacing: .01em; }
.ck-buy .go { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #ff4208; color: #fff; transition: transform .2s; }
.ck-buy:hover .go { transform: translateX(2px); }
.ck-buy .go svg { width: 17px; height: 17px; }
@media (prefers-reduced-motion: reduce) { .ck-buy:hover, .ck-buy:hover .go { transform: none; } }
