/* Sala de Estudos · página da ficha de matrícula (usa os componentes de styles.css) */

.fpage { background: var(--bg); padding-bottom: 0 !important; }

/* Cabeçalho */
.fhead { position: sticky; top: 0; z-index: 40; background: rgba(255, 253, 248, .96); border-bottom: 1px solid var(--line); }
.fhead__inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fhead__nav { display: flex; align-items: center; gap: 14px; }
.fhead__back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; font-size: .95rem; color: var(--ink-2); text-decoration: none; }
.fhead__back:hover { color: var(--g700); }
.fhead__help { gap: 6px; }

/* Introdução e etapas */
.fmain { padding-top: clamp(24px, 4vw, 44px); padding-bottom: clamp(48px, 7vw, 80px); max-width: 1140px; }
.fintro { max-width: 640px; }
.fintro__title { margin-top: 4px; font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.1; letter-spacing: -.02em; color: var(--g800); }
.fintro__lead { margin-top: 10px; font-size: 1.05rem; color: var(--ink-2); }

.fsteps { margin: 28px 0 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: s; }
.fsteps li { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); font-size: .92rem; transition: background .3s, border-color .3s, color .3s; }
.fsteps span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .82rem; background: var(--tint); color: var(--g700); transition: background .3s, color .3s; }
.fsteps b { font-weight: 600; }
.fsteps li.is-current { border-color: var(--g600); color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(11, 122, 114, .1); }
.fsteps li.is-current span { background: var(--g600); color: #fff; }
.fsteps li.is-done { color: var(--g700); }
.fsteps li.is-done span { background: var(--mint); color: var(--g950); font-size: 0; }
.fsteps li.is-done span::after { content: "✓"; font-size: .9rem; }

/* Grade principal */
.fgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.fcard { min-width: 0; padding: clamp(20px, 3.5vw, 36px); border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.fcard__step { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--g600); margin-bottom: 6px; }
.fcard__title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.35rem, 2.6vw, 1.7rem); line-height: 1.2; color: var(--g800); padding: 0; margin-bottom: 2px; }
.fcard__note { margin-top: -6px; font-size: .95rem; color: var(--ink-2); }
.fcard__sub { margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--line); font-weight: 700; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fcard .step { gap: 18px; }
.opt-card__tag { position: absolute; top: -11px; right: 14px; font-style: normal; font-family: var(--hand); font-weight: 700; font-size: 1rem; line-height: 1; color: #fff; background: var(--red); padding: 4px 10px 5px; border-radius: 8px; transform: rotate(-2deg); white-space: nowrap; box-shadow: 0 4px 10px -4px rgba(215, 38, 56, .6); }
.opt-card:has(.opt-card__tag) { margin-top: 10px; }
.choice__hint { grid-column: 1 / -1; }

/* Revisão */
.review { display: grid; gap: 12px; }
.review__group { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.review__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: var(--tint); }
.review__head p { font-weight: 700; font-size: .9rem; color: var(--g800); }
.review__edit { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 0; background: none; color: var(--g600); font-weight: 600; font-size: .9rem; border-radius: 10px; }
.review__edit:hover { background: rgba(11, 122, 114, .08); }
.review dl { display: grid; gap: 0; }
.review dl div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 9px 16px; border-top: 1px solid #F0EBE1; font-size: .93rem; }
.review dl div:first-child { border-top: 0; }
.review dt { color: var(--muted); }
.review dd { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

/* Lateral */
.fside { position: sticky; top: 84px; display: grid; gap: 14px; min-width: 0; }
.fbox { padding: 20px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.fbox__title { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--g800); margin-bottom: 10px; }
.summary { display: grid; gap: 10px; }
.summary div { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.summary dt { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.summary dd { font-size: .93rem; font-weight: 600; color: var(--ink); }
.summary dd.is-empty { font-weight: 400; color: #9AA8A5; font-style: italic; }
.fbox__link { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--g600); }
.fbox--help { background: var(--g800); border-color: var(--g700); color: #D7EBE5; }
.fbox--help .fbox__title { color: #fff; margin-bottom: 4px; }
.help__lead { font-size: .92rem; margin-bottom: 14px; }
.btn--wa { --bg-btn: #25D366; --fg-btn: #06371F; width: 100%; box-shadow: 0 10px 24px -12px rgba(37, 211, 102, .8); }
.btn--wa:hover { --bg-btn: #2EE070; }
.help__phone { margin-top: 10px; font-size: .8rem; color: #9FC4BB; text-align: center; }
.help__faq { margin-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); }
.help__faq details { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.help__faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; font-weight: 600; font-size: .9rem; color: #fff; }
.help__faq summary::-webkit-details-marker { display: none; }
.help__faq summary .ico { flex: none; width: 18px; height: 18px; color: var(--mint); transition: transform .3s var(--ease); }
.help__faq details[open] summary .ico { transform: rotate(45deg); }
.help__faq details p { padding: 0 0 12px; font-size: .88rem; color: #BFE1D7; }
.fside__safe { display: flex; gap: 8px; padding: 0 6px; font-size: .82rem; color: var(--muted); }
.fside__safe .ico { flex: none; margin-top: 2px; color: var(--g600); }

/* Rodapé */
.ffoot { border-top: 1px solid var(--line); background: var(--paper); }
.ffoot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 20px; padding-bottom: 20px; font-size: .85rem; color: var(--muted); }
.ffoot a { color: var(--g700); font-weight: 600; }

/* Ajuda em gaveta (celular) / janela (computador) */
.sheet { border: 0; padding: 0; margin: auto; width: min(460px, calc(100vw - 32px)); max-height: min(86vh, 720px); border-radius: 24px; background: var(--g800); color: #D7EBE5; box-shadow: var(--shadow-lg); overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; animation: chatIn .35s var(--ease); }
.sheet::backdrop { background: rgba(7, 38, 36, .55); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px 20px; }
.sheet__title { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: #fff; }
.sheet__close { width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; }
.sheet__body { padding: 0 20px 22px; overflow-y: auto; }
.sheet__body .fbox__title { display: none; }

/* Sucesso */
.fcard .enroll__done .done__ctas .btn { flex: 1 1 220px; }

/* Responsivo */
@media (max-width: 960px) {
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .fside { position: static; }
  .fbox--summary { display: none; }
}

@media (max-width: 640px) {
  .fhead__inner { height: 58px; }
  .fhead__back span { display: none; }
  .fhead__back { width: 44px; justify-content: center; border-radius: 12px; border: 1px solid var(--line); }
  .fintro__lead { font-size: .98rem; }
  .fsteps { margin: 20px 0 14px; gap: 6px; }
  .fsteps li { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: .72rem; text-align: center; border-radius: 12px; }
  .fsteps span { width: 26px; height: 26px; }
  .fcard { padding: 18px 16px 20px; border-radius: 20px; }
  .fcard .enroll__nav { margin: 18px -16px -20px; border-radius: 0 0 20px 20px; }
  .review dl div { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 8px 14px; }
  .review dt { font-size: .78rem; }
  .sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 88vh; }
  .sheet[open] { animation: sheetUp .35s var(--ease); }
  .sheet__body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}
@keyframes sheetUp { from { transform: translateY(100%); } }

.fhead .logo__name { white-space: nowrap; }
.fcard__title { margin-bottom: 10px; }
@media (max-width: 380px) {
  .fhead .logo { gap: 8px; }
  .fhead .logo__mark { font-size: 1.02rem; }
  .fhead .logo__name { font-size: .8rem; }
  .fhead__nav { gap: 8px; }
}
.fsteps { scroll-margin-top: 80px; }
.summary, .summary dd, .review dl, .review dd { margin: 0; }
.fside { position: static; }
.fside__safe a { color: var(--g700); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 365px) {
  .fpage .fhead__back { display: none; } /* o logo já volta ao site */
}
