@layer components {
  .progress { display: flex; flex-direction: column; gap: 6px; }
  .progress__caption { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
  .progress__count { font-family: var(--font-mono); color: var(--ink); }

  .progress__track { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
  .progress__fill { height: 100%; background: var(--action); }

  .segments { display: flex; gap: 4px; }
  .segments__item { flex: 1; height: 6px; border-radius: 3px; background: var(--line-strong); }
  .segments__item--done { background: var(--action); }
  .segments__item--current { background: var(--ink); }

  .stepper { display: flex; align-items: center; }
  .stepper__step {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 13px;
  }
  .stepper__step--current { border-color: var(--ink); background: var(--ink); color: var(--white); box-shadow: 0 0 0 4px var(--line-faint); }
  .stepper__step--done { border-color: var(--action); background: var(--action); color: var(--white); }
  .stepper__line { flex: 1; height: 2px; background: var(--line); }
}

@layer components {
  /* Session picker on "Conteúdo": steps grouped by module */
  .modules { min-width: 760px; display: flex; gap: 24px; }
  .modules__group { flex: 1 1 0; display: flex; flex-direction: column; gap: 10px; }
  .stepper__step--link { width: var(--touch); height: var(--touch); color: var(--body); text-decoration: none; background: var(--white); }
  .stepper__step--link:hover { border-color: var(--ink); color: var(--ink); }
  .stepper__step--link.stepper__step--current { background: var(--ink); border: 2px solid var(--ink); color: var(--white); box-shadow: 0 0 0 4px var(--line-faint); }
  .stepper .stepper__line { min-width: 16px; }
}

@layer components {
  /* "Conteúdo": session index on the left, the session being edited on the right. */
  .content-editor { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
  .content-material { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
  @media (max-width: 960px) {
    .content-editor, .content-material { grid-template-columns: minmax(0, 1fr); }
  }

  .session-index { padding: 16px 12px; gap: 14px; position: sticky; top: 16px; }
  .session-index__module { display: flex; flex-direction: column; gap: 2px; }
  .session-index__label { padding: 0 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); }
  .session-index__item { display: flex; align-items: center; gap: 10px; min-height: var(--touch); padding: 8px 10px; border-radius: var(--radius-control); color: var(--body); text-decoration: none; font-size: 14px; }
  .session-index__item:hover { background: var(--soft); color: var(--ink); }
  .session-index__item[aria-current="page"] { background: var(--ink); color: var(--white); font-weight: 600; }
  .session-index__number { width: 22px; flex-shrink: 0; font-family: var(--font-mono); font-size: 12px; opacity: 0.8; }
  .session-index__title { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }

  .session-editor-head { padding: 24px 28px 0; gap: 16px; }
  .session-editor-head__bar { align-items: center; flex-wrap: wrap; }
  .session-editor-head__bar .tabs { box-shadow: none; }
}
